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
GET /cartegroupe: get all the tuileGroupe.
@GetMapping("/tuile-groupe") public ResponseEntity<List<TuileGroupeDTO>> getAllTuileGroupe(@RequestParam(value = "search", required = false) String criteria ) { log.debug("requete REST pour obtenir une liste de TuileGroupe avec criteres: {}", criteria); List<TuileGroupeDTO> entityList = tuileGroupeService.findAll(criteria); return ResponseEntity.ok().body(entityList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Groupe> getAll() {\n\n // Creation de l'entity manager\n EntityManager em = GestionFactory.factory.createEntityManager();\n\n // Recherche\n @SuppressWarnings(\"unchecked\")\n List<Groupe> list = em.createQuery(\"SELECT e FROM Groupe e\").getResultList();\n\n return list;\n }", "@Override\r\n\tpublic List<Groupe> getGroupes() {\n\t\treturn dao.getGroupes();\r\n\t}", "@GetMapping(\"/conto-contabiles\")\n @Timed\n public List<ContoContabile> getAllContoContabiles() {\n log.debug(\"REST request to get all ContoContabiles\");\n return contoContabileService.findAll();\n }", "public ResponseEntity<List<GrupoDS>> buscarGrupos() {\n \tList<GrupoDS> lista = new ArrayList<>();\n \tfor (GrupoModel model : grupoRepository.findAll()) {\n \t\tlista.add(new GrupoDS(model));\n \t}\n return new ResponseEntity<List<GrupoDS>>(lista, HttpStatus.OK);\n }", "@GetMapping(\"/familles\")\n public List<FamilleDTO> getAllFamilles() {\n log.debug(\"REST request to get all Familles\");\n return familleService.findAll();\n }", "public static List<Carro> getCarros() {\n CarroDAO dao = CarrosApplication.getInstance().getCarroDAO();\n List<Carro> carros = dao.findAll();\n return carros;\n }", "@RequestMapping(value=\"/list\", method=RequestMethod.GET)\r\n\tpublic HashMap<String, Object> getAll(){\r\n\t\t\r\n\t\tHashMap<String, Object> h = new HashMap<String, Object>();\r\n\t\tList<JuridictionGroupe> jGroupes = jGRep.findAll();\r\n\t\th.put(\"message\", \"success\");\r\n\t\th.put(\"list_juridiction_groupe\", jGroupes);\r\n\t\th.put(\"status\", 0);\r\n\t\treturn h;\r\n\t}", "public NavigableSet<Groupe> getGroupes(Utilisateur utilisateur);", "@GetMapping(\"/getallCommande_Fournisseur\")\n\tprivate List<Commande_Fournisseur> getAllCommandes()\n\t{\n\t\tSystem.out.println(\"get all commandes frournisseur\");\n\t\treturn commande_FournisseurController.findAll();\n\t}", "public List<Grupo> obtenerTodosLosGrupos() {\n return this.grupoFacade.findAll();\n }", "@GET\n\t@Path(\"/carrocerias\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic ArrayList<CarroceriaDTO> listarCarrocerias(){\n\t\tSystem.out.println(\"ini: listarCarrocerias()\");\n\t\t\n\t\tCarroceriaService tipotService = new CarroceriaService();\n\t\tArrayList<CarroceriaDTO> lista = tipotService.ListadoCarroceria();\n\t\t\n\t\tif (lista == null) {\n\t\t\tSystem.out.println(\"Listado Vacío\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Consulta Exitosa\");\n\t\t}\n\n\t\tSystem.out.println(\"fin: listarCarrocerias()\");\n\t\t\n\t\treturn lista;\n\t}", "@GET\n public List<JsonGenre> getAll() {\n \tList<Genre> genres = genreDao.getGenres();\n \tLOGGER.info(\"find \"+genres.size()+\" genres in the database\");\n \tArrayList<JsonGenre> ls = new ArrayList<JsonGenre>();\n \tfor (Genre s:genres) {\n \t\tls.add(new JsonGenre(s.getId(), s.getName()));\n \t}\n \treturn ls;\n }", "public NavigableSet<Groupe> getGroupes();", "@GetMapping(\"/receta/all\")\t\n\tpublic List<Receta> listarReceta(){\n\t\t\treturn this.recetaService.findAll();\n\t}", "@GetMapping(\"/relacions\")\n @Timed\n public List<Relacion> getAllRelacions() {\n log.debug(\"REST request to get all Relacions\");\n return relacionRepository.findAll();\n }", "@GetMapping(\"/categorie/nom\")\n List<String> getAllNomategorie() {\n return categorieProduitMetier.getAllNomCategorie();\n }", "@GetMapping(\"/contabancarias\")\n @Timed\n public List<ContabancariaDTO> getAllContabancarias() {\n log.debug(\"REST request to get all Contabancarias\");\n List<Contabancaria> contabancarias = contabancariaRepository.findAll();\n return contabancariaMapper.toDto(contabancarias);\n }", "List<Videogioco> retriveByGenere(String genere);", "@GetMapping(\"/selo-cartaos\")\n public List<SeloCartao> getAllSeloCartaos() {\n log.debug(\"REST request to get all SeloCartaos\");\n return seloCartaoService.findAll();\n }", "public List<String> getGroceries()\n {\n List<String> groceryList=new ArrayList<String>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_GROCERIES;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n groceryList.add(cursor.getString(0));\n } while (cursor.moveToNext());\n }\n\n return groceryList;\n }", "public List<Etudiant> findByGroupe(int groupe) {\n\t\treturn null;\n\t}", "public NavigableSet<Utilisateur> getUtilisateurs(Groupe groupe);", "@Override\n\tpublic List<Grupo> obtenerGrupos() {\n\t\tSystem.out.println(\"Grupo Service\");\n\t\ttry {\n\t\t\t \n\t\t\t\tList<Grupo> tmp=this.grupoDao.obtenerGrupos();\n\t\t\t\tSystem.out.println(\"Lista de Grupos\"+tmp.size());\n\t\t\t\t\treturn tmp;\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@RequestMapping(value=\"/list/groupe/{id}\", method=RequestMethod.GET)\r\n\tpublic HashMap<String, Object> getJuridictionGroupeByGroupe(@PathVariable int id){\r\n\t\t\r\n\t\tHashMap<String, Object> h= new HashMap<String, Object>();\r\n\t\tGroupe g = gRep.findOne(id);\r\n\t\tif (g == null) {\r\n\t\t\th.put(\"message\", \"Le groupe n'existe pas.\");\r\n\t\t\th.put(\"status\", -1);\r\n\t\t\treturn h;\r\n\t\t}\r\n\t\tList<JuridictionGroupe> jGroupes = jGRep.findByGroupe(g);\r\n\t\th.put(\"message\", \"success\");\r\n\t\th.put(\"list_juridiction_groupe\", jGroupes);\r\n\t\th.put(\"status\", 0);\r\n\t\treturn h;\r\n\t}", "public static Car[] getAll() {\n Car[] cars = null;\n RequestGetObject requestGetObject = new RequestGetObject();\n try {\n String carsString = requestGetObject.execute(\"https://waiting-list-garage.herokuapp.com/car\").get();\n Gson gson = new Gson();\n cars = gson.fromJson(carsString, Car[].class);\n } catch (ExecutionException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return cars;\n }", "List<Receta> getAllWithUSer();", "@GetMapping(\"/cargos\")\n @Timed\n public List<Cargo> getAllCargos() {\n log.debug(\"REST request to get all Cargos\");\n return cargoRepository.findAll();\n }", "public void buscarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setDescripcionSeccion(\"Primaria\");\n \tgrado.setNumGrado(4);\n \tgrado.setDescripcionUltimoGrado(\"NO\");\n \tString respuesta = negocio.buscarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "public Collection<Proyecto> leerProyectosCollection() {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto[] proyecto = plantilla.getForObject(\"http://localhost:5000/proyectos\", Proyecto[].class);\n\t\t\tList<Proyecto> listaProyectos = Arrays.asList(proyecto);\n\t\t\treturn listaProyectos;\n\t\t}", "public void setGroupe(String groupe) {\r\n this.groupe = groupe;\r\n }", "@Override\n\tpublic List<ContactGroup> listGroupe() {\n\t\ttry {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"************************* je suis dans Liste des groupes *********************************\");\n\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\ttx = session.beginTransaction();\n\n\t\t\tQuery query = session.createQuery(\"from ContactGroup\");\n\n\t\t\tSystem.out.println(\"\\n\");\n\t\t\tSystem.out.println(\"******************list de groupes:\" + String.valueOf(query.list()));\n\n\t\t\tList<ContactGroup> lg = (List<ContactGroup>) query.list();\n\t\t\ttx.commit();\n\t\t\tsession.close();\n\n\t\t\treturn lg;\n\n\t\t} catch (HibernateException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public Groupe getGroupe (int id_groupe) {\n\n String tableName = \"groupe\";\n String[] columns = { \"id_groupe\", \"nom_groupe\" };\n String condition = \"id_groupe = ?\";\n String[] value = { \"\"+id_groupe };\n\n Cursor cursor = this.getReadableDatabase().query(tableName, columns, condition, value, null,\n null, null);\n\n String nom_groupe = cursor.getString(cursor.getColumnIndex(\"nom_groupe\"));\n\n cursor.close();\n\n return new Groupe(id_groupe, nom_groupe);\n }", "@GET\r\n @Produces(\"application/json\")\r\n @Path(\"Carro/get/{placa}\")\r\n public String getCarro(@PathParam(\"placa\") String placa) throws Exception {\r\n CarroModel c = new CarroModel();\r\n c.setPlaca(placa);\r\n\r\n //CarroDao dao = new CarroDao();\r\n CarroDao dao = CarroDao.getInstance();\r\n c = dao.buscar(c);\r\n\r\n //Converter para Gson\r\n Gson g = new Gson();\r\n return g.toJson(c);\r\n }", "@GetMapping(\"/costo-servicios/general/{id}\")\n @Timed\n public List<CostoServicioDTO> getAllCostosGeneralById(@PathVariable Long id) {\n log.debug(\"REST request to get a page of Expedientes\");\n List<CostoServicioDTO> ls = costoServicioService.findByTramite_general_id(id);\n// HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(1, \"/api/expedientes/user\");\n // return new ResponseEntity<>(ls, HeaderUtil.createAlert(\"ok\", \"\"), HttpStatus.OK); \n return ls;\n }", "@GetMapping(\"/afficher-contenu\")\r\n\tpublic List<PanierItem> afficherContenu(){\r\n\t\t\r\n\t\ttry{\r\n\t\t\treturn panierService.listerTout();\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\n\tpublic List<CiclosCarreras> listar() {\n\t\treturn repoCiclos.findAll();\n\t}", "@GetMapping(\"/categorie/getallcategoriesbyclasse/{classe}\")\n Page<CategorieProduit> getCategorieByClasse(@PathVariable String classe, Pageable pageable) {\n return categorieProduitMetier.getAllCategorieByClasse(classe, pageable);\n }", "@ResponseBody\r\n\t@RequestMapping(value = \"/listeCompteurA48\", produces = \"application/json;charset=utf-8\", method = RequestMethod.GET)\r\n\tpublic List<CompteurDto> getListeCompteur(@RequestParam(value = \"annee\", required = false) Integer annee,\r\n\t\t\t@RequestParam(value = \"idOrganisation\", required = false) Integer idOrganisation,\r\n\t\t\t@RequestParam(value = \"pageSize\", required = false) Integer pageSize,\r\n\t\t\t@RequestParam(value = \"pageNumber\", required = false) Integer pageNumber, \r\n\t\t\t@RequestParam(value = \"idAgentRecherche\", required = false) Integer idAgentRecherche ) {\r\n\r\n\t\tlogger.debug(\"entered GET [asaA48/listeCompteurA48] => getListeCompteur \");\r\n\r\n\t\tList<CompteurDto> result = counterService.getListeCompteur(idOrganisation, annee, pageSize, pageNumber,idAgentRecherche);\r\n\r\n\t\tif (result.size() == 0)\r\n\t\t\tthrow new NoContentException();\r\n\r\n\t\treturn result;\r\n\t}", "public List<Carro> getCarros(){\n\t\t\n\t\ttry {\t\t\t\n\t\t\tList<Carro> carros = db.getCarros();\n\t\t\treturn carros;\n\t\t\t\n\t\t} catch(SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn new ArrayList<>();\n\t\t}\n\t\t\n\t}", "@GetMapping(\"/costo-servicios\")\n @Timed\n public List<CostoServicioDTO> getAllCostoServicios() {\n log.debug(\"REST request to get all CostoServicios\");\n return costoServicioService.findAll();\n }", "public List<Carona> getCaronas() {\r\n\t\tList<Carona> retorno = new LinkedList<Carona>();\r\n\r\n\t\tfor (Usuario UsuarioTemp : listaDeUsuarios) {\r\n\t\t\tretorno.addAll(UsuarioTemp.getCaronas());\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "public List<GrupoLocalResponse> buscarTodos();", "@GET\r\n @Produces(\"application/json\")\r\n public String listCarro() throws Exception {\r\n List<CarroModel> lista;\r\n //CarroDao dao = new CarroDao();\r\n CarroDao dao = CarroDao.getInstance();\r\n List<model.CarroModel> carros = dao.getAll();\r\n //Converter para Gson\r\n Gson g = new Gson();\r\n return g.toJson(carros);\r\n }", "public String getGroupe() {\r\n return groupe;\r\n }", "public String[] getAllCopiers();", "@GetMapping(value = \"buscar-categorias/{nitrest}\")\n public ResponseEntity<List<String>> buscarCategoriasPorRestaurante(@PathVariable(\"nitrest\") String nit) {\n List<String> categorias = miServicioPlatos.buscarCategoriasPorRestaurante(nit);\n \n if (categorias == null){\n return ResponseEntity.notFound().build();\n }\n \n if (categorias.size() <= 0){\n return ResponseEntity.notFound().build();\n }\n \n return ResponseEntity.ok(categorias);\n }", "public List<Factura> getAllFacturas(){\n return facturaFacade.findAll();\n }", "@Override\n @Transactional(readOnly = true)\n public List<CatCarburantDTO> findAll() {\n log.debug(\"Request to get all CatCarburants\");\n return catCarburantRepository.findAll().stream()\n .map(catCarburantMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "@RequestMapping(value = \"/getGeneros\", method = RequestMethod.GET)\r\n public @ResponseBody List<Genero> getGeneros() {\r\n return (List<Genero>) this.generoRepository.findAll();\r\n }", "public void getAllCursos() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT * FROM curso;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n int familia = rs.getInt(\"id_familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n System.out.format(\"%d,%s,%d,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@PreAuthorize(\"hasAnyRole('ROLE_Super_ADMIN','ROLE_ADMIN')\") //Anotación para indicar que roles tienen permiso para acceder al controlador.\r\n\t@GetMapping(value = \"/listadoGraficas\") // esta es la ruta, no se mete el parametro Get ya que este se encarga de\r\n\t\t\t\t\t\t\t\t\t\t// mostrar el form\r\n\tpublic String listadoGraficas(Map<String, Object> model, Authentication authentication, RedirectAttributes flash) {// recibe el objeto model para poder pasar datos a la vista o bien\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// un map de java util\r\n\r\n\t\tmodel.put(\"titulo\", \"Listado de Graficas\"); // agregamos al modelo el nombre y el valor del atributo titulo el cual solamente se pasa para ser utilizado en la vista.\r\n\t\treturn \"graficas/listadoGraficas\"; // retornamos el nombre de la vista especificando su ruta la cual se encuentra en src/main/resources dentro de la carpeta templates la cual tendra la carpeta reportes con las vistas dentro de ella con la extensión .html.\r\n\t}", "public List<ParCuentasGenerales> listaCuentasGeneralesPorAsignar() {\n return parParametricasService.listaCuentasGenerales();\n }", "@GetMapping(\"/tema/{id}/comentarios\")\n public Iterable<Comentario> findAllComentarios(@PathVariable(\"id\") Long id) {\n return repository.findById(id).get().getComentarios();\n }", "public abstract java.util.Collection getTecnico_peticion();", "@GetMapping(\"/categoriesfu\")\n public synchronized List<Category> getAllCategories() {\n log.debug(\"REST request to get a page of Categories\");\n //fu\n final String user =SecurityUtils.getCurrentUserLogin().get();\n final UserToRestaurant userToRestaurant=userToRestaurantRepository.findOneByUserLogin(user);\n final Restaurant restaurant=userToRestaurant.getRestaurant();\n return categoryRepository.findAllByRestaurant(restaurant);\n }", "@GetMapping(\"/restaurantes/com-frete-gratis\")\n public List<Restaurante> restaurantesComFreteGratis(String nome){\n return restauranteRepository.findComFreteGratis(nome);\n }", "List<Curso> obtenerCursos();", "@Override\n public Collection<Curso> getAll() {\n Collection<Curso> retValue = new ArrayList();\n\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT c.idcurso, c.idprofesor, p.nombre as nombreprofesor,p.apellido as apellido, c.nombrecurso, c.claveprofesor,\\n\" +\n\" c.clavealumno from curso c, persona p\\n\" +\n\"where c.idprofesor = p.id\");\n \n\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n String nombre=\"\\\"\"+rs.getString(\"nombreprofesor\")+\" \"+rs.getString(\"apellido\")+\"\\\"\";\n retValue.add(new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"), rs.getInt(\"idprofesor\"), nombre,rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\")));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n }", "@GET\n @Path(\"/ListCaracteristique\")\n public Response ListCaracteristique() {\n return Response\n\t\t .status(200)\n .header(\"Access-Control-Allow-Origin\", \"*\")\n .header(\"Access-Control-Allow-Headers\", \"origin, content-Type, accept, authorization\")\n .header(\"Access-Control-Allow-Credentials\", \"true\")\n\t\t .header(\"Access-Control-Allow-Methods\", \"GET, POST, PUT, DELETE, OPTIONS, HEAD\")\n\t\t .header(\"Access-Control-Max-Age\", \"1209600\")\n\t\t .entity(caractdao.getAll())\n\t\t .build();\n }", "public List<Carona> getTodasAsCaronas() {\r\n\t\tList<Carona> retorno = new LinkedList<Carona>();\r\n\r\n\t\tfor (Usuario usuario : listaDeUsuarios) {\r\n\t\t\tfor (Carona caronaTemp : usuario.getCaronas()) {\r\n\t\t\t\tretorno.add(caronaTemp);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "@GetMapping(\"projekat\")\n\tpublic Collection<Projekat> getProjekat() {\n\t\treturn projekatRepository.findAll();\n\t}", "public List<Tripulante> obtenerTripulantes();", "@GetMapping(\"/cuentas\")\n @Timed\n public ResponseEntity<List<Cuenta>> getAllCuentas(Pageable pageable) {\n log.debug(\"REST request to get a page of Cuentas\");\n Page<Cuenta> page = cuentaRepository.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/cuentas\");\n return ResponseEntity.ok().headers(headers).body(page.getContent());\n }", "List<TotalCarritoDTO> getTotalCarritoCompras(String userName,TipoMoneda tipoMoneda);", "@GetMapping\n\t public List<Categories> touslescategories() {\n\t\treturn catsociete.findAll();}", "List<Videogioco> retriveByNome(String nome);", "public List<BeanGrupo> getGrupos() {\n\t\treturn grupos;\n\t}", "List<RocketDTO> findAllRockets();", "public ListaResponse<G> listar();", "public Collection<Seance> getSeances() {\n RestTemplate restTemplate = new RestTemplate();\n String url = \"http://admin:8080/cinema/seances\";\n Collection<Seance> r = null;\n Collection<Seance> result = restTemplate.getForObject(url, r.getClass());\n return result;\n }", "@Override\n\tpublic ArrayList<Carpo> getAllCars() {\n\t\treturn inList.getAll();\n\t}", "@Override\n\t\tpublic List<Carrera> getAll() {\n\t\t\t\treturn null;\n\t\t}", "@SuppressWarnings({\"checkstyle:WhitespaceAround\", \"checkstyle:DesignForExtension\", \"checkstyle:MissingJavadocMethod\"})\n @GetMapping(\"/findAllComplaint\")\n public List<Complaint> findAll() {\n\n return complaintService.findAll();\n }", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "@RequestMapping(value = \"/cophongs\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Cophong> getAllCophongs() {\n log.debug(\"REST request to get all Cophongs\");\n List<Cophong> cophongs = cophongRepository.findAll();\n return cophongs;\n }", "@Override\n\tpublic List<Ciclo> listarCiclos() {\n\t\treturn repository.findAll();\n\t}", "List<Corretor> findAll();", "@GetMapping\n public List<Tipovehiculo>listar(){\n return service.listar();\n }", "@GetMapping(\"/covs\")\n @Timed\n public List<Cov> getAllCovs() {\n log.debug(\"REST request to get all Covs\");\n return covService.findAll();\n }", "public ArrayList<Casella> getGrup()\n\t{\n\t\treturn grup;\n\t}", "public List<ProgressionCourrier> getAllUsers() {\n Query q = getEntityManager().createQuery(\"select U from ProgressionCourrier U order by U.nomPrenoms\");\n // set parameters\n List<ProgressionCourrier> suggestions = q.getResultList();\n\n // avoid returing null to managed beans\n if (suggestions == null) {\n suggestions = new ArrayList<>();\n }\n\n // return the suggestions\n return suggestions;\n\n }", "@GetMapping(\"/terrenos\")\n @Timed\n public List<Terreno> getAllTerrenos() {\n log.debug(\"REST request to get all Terrenos\");\n List<Terreno> terrenos = terrenoRepository.findAll();\n return terrenos;\n }", "@GET\n public GridResponse<UsuarioDTO> getAll() {\n return service.getAll();\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Profilo> getAll() {\r\n\t\t//Recupero la sessione da Hibernate\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\t//Creo la query usando il linguaggio HQL (Hibernate Query Language)\r\n\t\tQuery query = session.createQuery(\"FROM Vocelicenza\");\r\n\t\t\t\r\n\t\t//Restituisco la lista di Profili\r\n\t\treturn query.list();\r\n\t}", "public void getAll() {\n try {\n\n String sql = \"select * from project_zero.carlot where owner = 'DEALERSHIP';\";\n Statement st = ConnectionUtil.getInstance().getConnection().createStatement();\n ResultSet rs = st.executeQuery(sql);\n\n while(rs.next()) {\n Car c = new Car(rs.getInt(1), rs.getString(2), rs.getString(3),\n rs.getInt(4), rs.getString(5), rs.getString(6), rs.getInt(7));\n System.out.println(c.toString());\n\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@GetMapping (path=\"peliculas\",produces= {MediaType.APPLICATION_JSON_VALUE})\n\t//1.-mapeo de recursos a url 2.- verbo 3.- multiples representaciones \n\tpublic ResponseEntity<List<Pelicula>> listarPeliculas() {\n\t\tList<Pelicula> lista = daoPelicula.findAll();\n\t\tResponseEntity<List<Pelicula>> re = new ResponseEntity<>(lista,HttpStatus.OK);\n\t\t//4.-basado codigos de respuesta, si el recurso exite le devolvemos el ok un 200\n\t\treturn re;\n\t\t//5.-uso de cabeceras\n\t}", "public List<Tripulante> buscarTodosTripulantes();", "@GetMapping (\"/pertenezco\")\n public String pertenezco(Authentication authentication,Model model){\n User sessionUser = (User)authentication.getPrincipal();\n try{\n List<GrupoPertenezcoDTO> grupoPertenezcoDTO = grupoService.listAllUser(sessionUser.getId())\n .stream()\n .map(grupo -> modelMapper.map(grupo,GrupoPertenezcoDTO.class))\n .collect(Collectors.toList());\n model.addAttribute(\"grupoPertenezco\", grupoPertenezcoDTO);\n return \"/grupos/pertenezco\";\n }catch (Exception e){\n LOG.log(Level.WARNING,\"grupos/pertenezco\" + e.getMessage());\n return \"/error\";\n }\n\n }", "public List<CurriculumVO> getAllCurriculum();", "@GetMapping(value = \"/semanario/buscar-por-dia/{nitrest}\")\n\tpublic ResponseEntity<List<Plato>> buscarPlatosPorDia(@PathVariable(\"nitrest\") String nit, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t @RequestParam(name = \"dia\", required = false) String dia,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t @RequestParam(name = \"categoria\", required = false) String categoria){\n\t\t\n\t\t//si dia es nulo, devuelve del dia de hoy\n\t\t//si categiria es nulo, devuelve todas las categorias\n\t\t\n\t\tList<Plato> platos = miServicioPlatos.buscarPlatosPorDia(nit, dia, categoria);\n\t\t\n\t\tSystem.out.println(\"\\n\" + platos + \"\\n\");\n\t\t\n\t\t//No se encontraron platos\n\t\tif(platos == null){\n return ResponseEntity.noContent().build();\n } \t\t\n\t\tif(platos.size() <= 0){\n return ResponseEntity.noContent().build();\n } \n\t\t\n\t\t\t\t\n\t\treturn ResponseEntity.ok(platos);\n\t}", "public List<RutaDTO> getAllRutas() {\n TypedQuery<RutaDTO> query = em.createQuery(\n \"SELECT r FROM ruta r ORDER BY r.id\", RutaDTO.class);\n return query.getResultList();\n }", "@GetMapping(value = \"buscar-por-restaurante/{nitrest}\")\n public ResponseEntity<List<Plato>> buscarPlatoPorRestaurante(@PathVariable(\"nitrest\") String nit) {\n List<Plato> platos = miServicioPlatos.buscarPlatoPorRestaurante(nit);\n \n if (platos == null){\n return ResponseEntity.notFound().build();\n }\n \n if (platos.size() <= 0){\n return ResponseEntity.notFound().build();\n }\n \n return ResponseEntity.ok(platos);\n }", "@GetMapping(\"/all\")\n public BasePageResponse getAllGroup() throws NodeMgrException {\n BasePageResponse pageResponse = new BasePageResponse(ConstantCode.SUCCESS);\n Instant startTime = Instant.now();\n log.info(\"start getAllGroup startTime:{}\", startTime.toEpochMilli());\n\n // get group list\n int count = groupService.countOfGroup(null, GroupStatus.NORMAL.getValue());\n if (count > 0) {\n List<TbGroup> groupList = groupService.getGroupList(GroupStatus.NORMAL.getValue());\n pageResponse.setTotalCount(count);\n pageResponse.setData(groupList);\n }\n\n // reset group\n resetGroupListTask.asyncResetGroupList();\n\n log.info(\"end getAllGroup useTime:{} result:{}\",\n Duration.between(startTime, Instant.now()).toMillis(),\n JsonTools.toJSONString(pageResponse));\n return pageResponse;\n }", "public List<Gasto> findAll(){\n\t\treturn (List<Gasto>) gastoModel.findAll();\n\t}", "public ArrayList<Integer> getIdGroupe (int idProjet) throws RemoteException {\r\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\r\n\t\t\t\r\n\t\t String requete = \"Select a_idgroupe from association where a_idprojet = \" + idProjet;\r\n\t\t System.out.println(\"requete : \" + requete);\r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t \r\n\t\t String[] line = null;\r\n\t\t while (data.hasMoreElements()) {\r\n\t\t \tline = data.nextElement();\r\n\t\t \tlist.add(Integer.parseInt(line[1]));\r\n\t\t }\r\n\r\n\t\t return list;\t\r\n\t\t}", "public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }", "@GetMapping(\"/age-group-types\")\n @Timed\n public List<AgeGroupType> getAllAgeGroupTypes() {\n log.debug(\"REST request to get all AgeGroupTypes\");\n List<AgeGroupType> ageGroupTypes = ageGroupTypeRepository.findAll();\n return ageGroupTypes;\n }", "public static ArrayList<Course> getAllCorsiMateria() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_ALL_COURSES;\n\t\t\tReceiveContent rp1 = sendReceive(rp);\n\t\t\tArrayList<Course> lista = (ArrayList<Course>) rp1.parameters[0];\n\t\t\tfor (Course m : lista) {\n\t\t\t\n\t\t\t}\n\t\t\treturn lista;\n\t\t} catch (Exception e) {\n\t\t\tLogger.WriteError(e, \"ClientConnection\", \"GET_ALL_COURSES\");\n\t\t}\n\t\treturn new ArrayList<Course>();\n\t}", "public java.util.List<Campus> findAll();", "public List<GnTipoAgrupamiento> getAllGnTipoAgrupamiento()throws Exception{\n\t\tList<GnTipoAgrupamiento> lista=new LinkedList<GnTipoAgrupamiento>();\n\t\ttry{\n\t\t\tStringBuffer SQL=new StringBuffer(\"select tipo_agrupamiento_id,descripcion,descripcion_corta from \").append(Constante.schemadb).append(\".gn_tipo_agrupamiento order by descripcion asc\");\n\t\t\t\n\t\t\tPreparedStatement pst=connect().prepareStatement(SQL.toString());\n\t\t\tResultSet rs=pst.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tGnTipoAgrupamiento obj=new GnTipoAgrupamiento(); \n\t\t\t\tobj.setTipoAgrupamientoId(rs.getInt(\"tipo_agrupamiento_id\"));\n\t\t\t\tobj.setDescripcion(rs.getString(\"descripcion\"));\n\t\t\t\tobj.setDescripcionCorta(rs.getString(\"descripcion_corta\"));\n\t\t\t\t\n\t\t\t\tlista.add(obj);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tthrow(e);\n\t\t}\n\t\treturn lista;\n\t}" ]
[ "0.71088403", "0.6694338", "0.65458256", "0.6461933", "0.6350455", "0.6284263", "0.62662566", "0.6255926", "0.62459064", "0.6242609", "0.6233323", "0.6126614", "0.61223", "0.6110941", "0.6109675", "0.60892236", "0.60736966", "0.60572666", "0.60495305", "0.6024459", "0.6015756", "0.5980111", "0.5973129", "0.59674865", "0.59596336", "0.59476256", "0.59465057", "0.59294355", "0.5917461", "0.5912491", "0.5911504", "0.59083915", "0.58962667", "0.58536744", "0.58429945", "0.5837657", "0.5811932", "0.58112955", "0.5809836", "0.5808196", "0.5796325", "0.5788362", "0.57820314", "0.57611346", "0.5747099", "0.57469386", "0.5735847", "0.5726045", "0.57188475", "0.5717431", "0.57110876", "0.5707774", "0.56803447", "0.56768334", "0.5662318", "0.56519026", "0.56484544", "0.5645927", "0.5627502", "0.5626668", "0.5623068", "0.56004906", "0.5589802", "0.5589116", "0.5588807", "0.5586676", "0.5572153", "0.5570523", "0.55691224", "0.55646515", "0.5564562", "0.5564348", "0.5563878", "0.5547052", "0.55467665", "0.55460334", "0.55456483", "0.55451816", "0.5544788", "0.55394226", "0.5538862", "0.55320483", "0.55302644", "0.552513", "0.55182034", "0.5517062", "0.5510852", "0.5504799", "0.55041873", "0.5496013", "0.5490138", "0.54839116", "0.5479013", "0.5475259", "0.5474719", "0.5474645", "0.5456943", "0.5455428", "0.545249", "0.54516834" ]
0.65951496
2
Creates the SQL constraint used to find the AdjustmentType for VRA ER handling.
public String createStatement(Context ctx) { return AbstractAdjustmentType.NAME_PROPERTY + " = " + getName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "QueryConstraintType createQueryConstraintType();", "Constraint createConstraint();", "Constraint createConstraint();", "static String getAlterArtifactInstancesAddAccountIdConstraintTemplate() {\n // Each \"%s\" will be replaced with the relevant TYPE_instances table name.\n return \"ALTER TABLE %s\"\n + \" ADD CONSTRAINT account_id_fk foreign key (account_id) references accounts(id)\";\n }", "void addHasRestraintType(Integer newHasRestraintType);", "public int constraintType()\n\t{\n\t\treturn _constraintType;\n\t}", "@DISPID(1610940427) //= 0x6005000b. The runtime will prefer the VTID if present\n @VTID(33)\n Constraints constraints();", "public Constraint addConstraint() {\n\t\tConstraint newType = new Constraint();\n\t\tgetConstraint().add(newType);\n\t\treturn newType; \n\t}", "FieldRuleType createFieldRuleType();", "public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;", "protected Constraint createConstraint(Structure constraintStructure, Long ownerOMA, Ipo influenceIpo, \r\n\t\t\t\t\t\tBlenderContext blenderContext) throws BlenderFileException {\r\n\t\tString constraintClassName = this.getConstraintClassName(constraintStructure, blenderContext);\r\n\t\tClass<? extends Constraint> constraintClass = constraintClasses.get(constraintClassName);\r\n\t\tif(constraintClass != null) {\r\n\t\t\ttry {\r\n\t\t\t\treturn (Constraint) constraintClass.getDeclaredConstructors()[0].newInstance(constraintStructure, ownerOMA, influenceIpo, \r\n\t\t\t\t\t\tblenderContext);\r\n\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\tthrow new BlenderFileException(e.getLocalizedMessage(), e);\r\n\t\t\t} catch (SecurityException e) {\r\n\t\t\t\tthrow new BlenderFileException(e.getLocalizedMessage(), e);\r\n\t\t\t} catch (InstantiationException e) {\r\n\t\t\t\tthrow new BlenderFileException(e.getLocalizedMessage(), e);\r\n\t\t\t} catch (IllegalAccessException e) {\r\n\t\t\t\tthrow new BlenderFileException(e.getLocalizedMessage(), e);\r\n\t\t\t} catch (InvocationTargetException e) {\r\n\t\t\t\tthrow new BlenderFileException(e.getLocalizedMessage(), e);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new BlenderFileException(\"Unknown constraint type: \" + constraintClassName);\r\n\t\t}\r\n\t}", "TriggerType createTriggerType();", "com.microsoft.schemas.crm._2011.contracts.ArrayOfConstraintRelation addNewConstraints();", "protected BaseOracleBean getDatabeanInstance() {\n return new VwConstraintDefOracleBean();\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n DBCheckConstraint dBCheckConstraint0 = new DBCheckConstraint(\"alter table\", false, \"Pg`v\", \"select\");\n StringBuilder stringBuilder0 = new StringBuilder();\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBCheckConstraint0, stringBuilder0, nameSpec0);\n assertEquals(\"\", stringBuilder1.toString());\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[3];\n DBUniqueConstraint dBUniqueConstraint0 = new DBUniqueConstraint(defaultDBTable0, (String) null, false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.createConstraintSpecBuilder(dBUniqueConstraint0, nameSpec0);\n StringBuilder stringBuilder1 = stringBuilder0.append('8');\n SQLUtil.addRequiredCondition(\"Unknown constraint type: \", stringBuilder1);\n assertEquals(\"8 and Unknown constraint type: \", stringBuilder1.toString());\n assertEquals(\"8 and Unknown constraint type: \", stringBuilder0.toString());\n }", "boolean hasHasRestraintType();", "protected abstract void defineConstraints();", "Collection<? extends Integer> getHasRestraintType();", "public void addLowerConstraint(String type) {\n\t\tfinal JvmLowerBound constraint = this.jvmTypesFactory.createJvmLowerBound();\n\t\tconstraint.setTypeReference(newTypeRef(this.context, type));\n\t\tgetJvmTypeParameter().getConstraints().add(constraint);\n\t}", "private VwConstraintDef fromBeanToObject(BaseOracleBean baseBean) {\n VwConstraintDefOracleBean bean = (VwConstraintDefOracleBean) baseBean;\n VwConstraintDef object = new VwConstraintDef();\n object.setConsType(bean.getConsType());\n object.setConsName(bean.getConsName());\n object.setMainTable(bean.getMainTable());\n object.setRefTable(bean.getRefTable());\n object.setTable1(bean.getTable1());\n object.setCol1(bean.getCol1());\n return object;\n }", "public String getType() {\n\t\tString type = C;\n\t\t// Modify if constrained\n\t\tParameterConstraint constraint = this.constraint;\n\t\tif (constraint != null) type = \"Constrained\" + type;\n\t\treturn type;\n\t}", "LengthConstraint createLengthConstraint();", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n DBSchema dBSchema0 = new DBSchema((String) null);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable((String) null, dBSchema0);\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\" start/stop selectivity is : \", false, defaultDBTable0, (String[]) null, defaultDBTable0, (String[]) null);\n StringBuilder stringBuilder0 = new StringBuilder();\n NameSpec nameSpec0 = NameSpec.ALWAYS;\n StringBuilder stringBuilder1 = SQLUtil.appendConstraintName((DBConstraint) dBForeignKeyConstraint0, stringBuilder0, nameSpec0);\n SQLUtil.addOptionalCondition((String) null, stringBuilder1);\n assertEquals(\"CONSTRAINT \\\" start/stop selectivity is : \\\" or null\", stringBuilder1.toString());\n assertEquals(\"CONSTRAINT \\\" start/stop selectivity is : \\\" or null\", stringBuilder0.toString());\n }", "private Expression getConstraint(Type type, Expression exp, Type etype)\n {\n return Validation.getConstraint(type, transform(exp), etype);\n }", "UdtType createUdtType();", "private void createReferentialIntegrityConstraints() {\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" ADD FOREIGN KEY (THE_BOOK_FK) REFERENCES \" + IDaoBooks.TABLE + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" ADD FOREIGN KEY (THE_AUTHOR_FK) REFERENCES \" + IDaoPersons.TABLE + \" (ID) ON UPDATE SET NULL\");\n\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_KIND_FK) REFERENCES \" + SimpleData.DataType.KIND.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_LANGUAGE_FK) REFERENCES \" + SimpleData.DataType.LANGUAGE.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_LENDING_FK) REFERENCES \" + IDaoLendings.TABLE + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_SAGA_FK) REFERENCES \" + SimpleData.DataType.SAGA.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_TYPE_FK) REFERENCES \" + SimpleData.DataType.TYPE.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_EDITOR_FK) REFERENCES \" + IDaoEditors.TABLE + \" (ID) ON UPDATE SET NULL\");\n }", "String getAssetTypeRestriction();", "@Override\n\tpublic void addConstraint(String constraint) {\n\n\t}", "RecordTypeRule createRecordTypeRule();", "RelDataType getColumnType(String sql);", "RegExConstraint createRegExConstraint();", "private void processCreateCheckConstraintCondition(Constraint c)\n throws HsqlException {\n\n tokenizer.getThis(Token.T_OPENBRACKET);\n\n Parser parser = new Parser(session, database, tokenizer);\n Expression condition = parser.parseExpression();\n\n tokenizer.getThis(Token.T_CLOSEBRACKET);\n\n c.core.check = condition;\n }", "DriveConstraintType getDriveConstraint();", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[0];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"*F(PV|\", true, stringArray0);\n String string0 = SQLUtil.constraintName(dBPrimaryKeyConstraint0);\n assertEquals(\"CONSTRAINT *F(PV| \", string0);\n }", "public static String addDatatypeForParameters( GenerateCVC1 cvc, QueryBlockDetails queryBlock ){\n\t\tString retVal = \"\";\n\t\tIterator<ArrayList<String>> itr = queryBlock.getParamsNodeMap().keySet().iterator();\n\t\tint val = 0;\n\t\tboolean isMaxOrMin = false;\n\t\twhile(itr.hasNext()){\n\t\t\tArrayList<String> params = (ArrayList<String>)itr.next();\n\t\t\tNode n = queryBlock.getParamsNodeMap().get(params);\n\t\t\t//String datatype = getDatatypeFromNode(n);\n\t\t\t//modified by bikash to ensure that datatype is the same as column name to ensure that range constraints get satisfied\n\t\t\t//FIXME: What if left side is aggregation\n\t\t\tString datatype;\n\n\t\t\tif(n.getLeft().getType().equalsIgnoreCase(Node.getAggrNodeType()))//If the left side of node is aggregate function\n\t\t\t\tdatatype = n.getLeft().getAgg().getAggExp().getColumn().getColumnName();\n\t\t\telse if (n.getRight().getType().equalsIgnoreCase(Node.getAggrNodeType()))//If the right side of node is aggregate function\n\t\t\t\tdatatype = n.getRight().getAgg().getAggExp().getColumn().getColumnName();\n\n\t\t\telse if(n.getLeft().getColumn()!=null)//if left side is not aggregate\n\t\t\t\tdatatype = n.getLeft().getColumn().getColumnName();\n\t\t\telse\n\t\t\t\tdatatype = n.getRight().getColumn().getColumnName();\n\t\t\t//System.out.println(\"datatype: \"+datatype);*/\n\t\t\t//String datatype = getDatatypeFromNode(n);\n\t\t\tif(n.getType().equalsIgnoreCase(Node.getBroNodeType())){\n\t\t\t\tif(n.getLeft().getType().equalsIgnoreCase(Node.getAggrNodeType()) ||\n\t\t\t\t\t\tn.getRight().getType().equalsIgnoreCase(Node.getAggrNodeType())){\n\t\t\t\t\tif(n.getAggFuncFromNode().getFunc().equalsIgnoreCase(\"MAX\")){\n\t\t\t\t\t\tisMaxOrMin = true;\n\t\t\t\t\t\tVector<Column> cols = n.getAggFuncFromNode().getAggExp().getColumnsFromNode();\n\t\t\t\t\t\tval = 0;\n\t\t\t\t\t\tfor(int i=0;i<cols.size();i++){\n\t\t\t\t\t\t\tif(val < cols.get(i).getMaxVal())\tval = (int)cols.get(i).getMaxVal();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(n.getAggFuncFromNode().getFunc().equalsIgnoreCase(\"MIN\")){\n\t\t\t\t\t\tisMaxOrMin = true;\n\t\t\t\t\t\tVector<Column> cols = n.getAggFuncFromNode().getAggExp().getColumnsFromNode();\n\t\t\t\t\t\tval = 1000000;\n\t\t\t\t\t\tfor(int i=0;i<cols.size();i++){\n\t\t\t\t\t\t\tif(val > cols.get(i).getMinVal())\tval = (int)cols.get(i).getMinVal();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Add the data type for all the params to CVC\n\t\t\tfor(int i=0;i<params.size();i++){\n\t\t\t\tretVal += params.get(i) + \" : \" + datatype +\";\\n\";\n\t\t\t\tif(isMaxOrMin)\n\t\t\t\t\tretVal += \"ASSERT \"+params.get(i)+\" = \"+val+\";\\n\";\n\t\t\t}\n\t\t\tisMaxOrMin = false;\n\t\t}\n\n\t\treturn retVal;\n\t}", "public Builder addConstraint(ConstraintType type, ConstraintId constraintId, ConstraintItem item) {\n ClusterConstraints existConstraints = getConstraintsInstance(type);\n existConstraints.addConstraintItem(constraintId, item);\n return this;\n }", "public CheckConstraints() {\n this(DSL.name(\"CHECK_CONSTRAINTS\"), null);\n }", "Restriction generate(ValueStoreReader entityInstReader, String rule) throws UnifyException;", "DomainType createDomainType();", "private static void addReservationConstraint()\n {\n ReservationConstraints constraint = new ReservationConstraints(new Date(), new Date(), \"bogusCarType\");\n System.out.println(\"press any key to try to register quote : \" + constraint);\n Main.readLine();\n \n if(session.createQuote(constraint) != null)\n System.out.println(\"Quote registered\");\n }", "public Delta addConstraintItem(ConstraintType type, ConstraintId constraintId,\n ConstraintItem item) {\n _builder.addConstraint(type, constraintId, item);\n return this;\n }", "public static String generateNegativeConstraintsConjunct(GenerateCVC1 cvc, QueryBlockDetails queryBlock, Conjunct conjunct) throws Exception {\n\n\t\t\n\t\tString constraintString = \"\";\n\n\t\tconstraintString += \"%--------------------------------\\n%NEGATIVE CONSTRAINTS FOR THIS CONJUNCT\\n%---------------------------------------\\n\";\n\t\t\n\t\tVector<String> OrConstraints=new Vector<String>();\n\t\tVector<String> OrStringConstraints = new Vector<String>();\n\n\t\t/** Generate negative constraint for equivalence class.*/\n\t\t/**FIXME: Mahesh..Ask Amol why the below code and why cant't we use getconstraintsforequijoins()*/\n\t\tif(!conjunct.getEquivalenceClasses().isEmpty()){\n\n\t\t\t/**Get the equivalence classes*/\n\t\t\tVector<Vector<Node>> equivalenceClasses = conjunct.getEquivalenceClasses();\n\n\t\t\tfor(int i=0; i<equivalenceClasses.size(); i++){\t/** For each equivalence class list*/\n\n\t\t\t\t/**Get this equivalence */\n\t\t\t\tVector<Node> ec = equivalenceClasses.get(i);\n\n\t\t\t\t/**for each node in this equivalence*/\n\t\t\t\tfor(int j=0;j<ec.size(); j++)\n\t\t\t\t{\n\n\t\t\t\t\tNode eceNulled = ec.get(j);\t\t\t/** This is R.a - to be nulled */\n\n\n\t\t\t\t\tString CVCStr = \"%DataSet Generated By Nulling: \"+ ((Node)eceNulled).toString() + \"\\n\";\n\t\t\t\t\tTable tableNulled = eceNulled.getTable();\n\t\t\t\t\tColumn colNulled = eceNulled.getColumn();\n\n\t\t\t\t\t/** TODO: Have one vector for positive and negative conditions. */\n\n\t\t\t\t\tcvc.setResultsetTableColumns1( new HashMap<Table, Vector<String>>() );\t\t\t\t\t\n\n\t\t\t\t\t/** S = set of elements in ec which have a foreign key relationship with R.a <use closure for this> */\n\t\t\t\t\tArrayList<Node> S = new ArrayList<Node>();\n\t\t\t\t\tVector<Node> nullableFKs = new Vector<Node>();\n\t\t\t\t\tS.add(eceNulled);\n\n\t\t\t\t\tfor(int k=0; k<ec.size(); k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tNode ece = ec.get(k);\n\t\t\t\t\t\tTable tableEce = ece.getTable();\n\t\t\t\t\t\tColumn colEce = ece.getColumn();\n\t\t\t\t\t\t/**TODO Maintain a datasructure for list of PK and FK so as to compare in one pass.*/\n\t\t\t\t\t\tfor(int l=0; l < cvc.getForeignKeys().size(); l++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/**In ForeignKeys Left points to the foreign key attribute while the right points to the Primary or the referenced column*/\n\t\t\t\t\t\t\tNode fk = cvc.getForeignKeys().get(l);\n\n\t\t\t\t\t\t\t/**Adapted for Nullable foreign keys.\n\t\t\t\t\t\t\t *If FK is not nullable, then we need to null it along with the referenced relation which is eceNulled*/\n\t\t\t\t\t\t\tif( (fk.getLeft().getTable() == tableEce && fk.getLeft().getColumn() == colEce) \n\t\t\t\t\t\t\t\t\t&& (fk.getRight().getTable() == tableNulled && fk.getRight().getColumn() == colNulled)){\n\t\t\t\t\t\t\t\tif(!colEce.isNullable())\n\t\t\t\t\t\t\t\t\tS.add(ece);/**To be taken along with nulled Column*/\n\t\t\t\t\t\t\t\tif(colEce.isNullable())\n\t\t\t\t\t\t\t\t\tnullableFKs.add(ece);/** To be taken along with nulled column, in case P.size > 1 */\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\t/**\n\t\t\t\t\t * Now, we have in S, the nulled column along with the foreign key columns in that equivalence class\n\t\t\t\t\t * that reference the nulled column and are not nullable.\n\t\t\t\t\t * But, if EC - S, contains a nullable column which references the nulled column, \n\t\t\t\t\t * AND also contains some other column which may or may not be nullable, \n\t\t\t\t\t * then we cannot assign NULL to the nullable FK column. We then need to nullify the nullable FK column\n\t\t\t\t\t * along with the nulled column. If EC - S, just contains a single nullable column referencing the \n\t\t\t\t\t * nulled column, then we can assign NULL to that column in order to nullify the nulled column. \n\t\t\t\t\t */\n\n\n\t\t\t\t\t/** Form P = EC - S */\n\t\t\t\t\tVector<Node> P = new Vector<Node>();\n\t\t\t\t\tfor(int k=0; k<ec.size(); k++)\t\t\t\t\t\t\n\t\t\t\t\t\tif( cvc.getqParser().alreadyNotExistInEquivalenceClass(S, ec.get(k)))\n\t\t\t\t\t\t\tP.add(ec.get(k));\n\n\n\t\t\t\t\tSystem.out.println(\"R.a = \"+eceNulled);\n\t\t\t\t\tSystem.out.print(\"EC : \"); Node.printPredicateVector(ec);\n\n\t\t\t\t\t/**For Now : if P is empty continue;*/\n\t\t\t\t\tif(P.size() == 0)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tif(P.size() == 1 \n\t\t\t\t\t\t\t&& P.get(0).getColumn().getReferenceColumn() == eceNulled.getColumn()\n\t\t\t\t\t\t\t&& P.get(0).getColumn().isNullable()){\n\n\t\t\t\t\t\t/**check if the column in P is referencing the nulled column and is nullable.\n\t\t\t\t\t\t *If so, then we can nullify the nulled relation inspite of the FK*/\n\t\t\t\t\t\tOrConstraints.add( GenerateCVCConstraintForNode.cvcSetNull(cvc, P.get(0).getColumn(), \"1\"));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t/**Otherwise, we need to nullify the foreign keys along with the nulled column.\n\t\t\t\t\t\t * Note that we need to do this irrespective of whether the column in P is FK \n\t\t\t\t\t\t * or whether it is nullable. Because, then we cannot assign NULL to any of the columns in P\n\t\t\t\t\t\t * This is because, NULLs cannot be equated and hence the joins in P will not be propogated up.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tP.removeAll(nullableFKs);\n\n\t\t\t\t\t\t/** Generate positiveConds for members in P*/ \n\t\t\t\t\t\tGenerateJoinPredicateConstraints.genPositiveConds(P);\n\t\t\t\t\t}\n\n\t\t\t\t\t/**Now generate negative conditions for Nulled relation\n\t\t\t\t\t *i.e. NOT EXISTS (i: Nulled Rel): NulledRel[i].col = P[1].col*/\n\t\t\t\t\tOrConstraints.add( GenerateJoinPredicateConstraints.genNegativeConds( cvc, queryBlock, colNulled, P.get(0)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t\t/**Now generate Positive conditions for each of the non equi join conditions \n\t\t * that were not considered when building equivalence classes*/\n\t\tVector<Node> allConds = conjunct.getAllConds();\n\t\t\n\t\t/**get constraint*/\n\t\tString constraint = GenerateJoinPredicateConstraints.getNegativeConstraintsForNonEquiJoins(cvc, queryBlock, allConds) ;\n\n\t\tif( constraint.length() != 0)\n\t\t\tOrConstraints.add( constraint );\n\n\t\t/** Now generate Negative constraints for selection conditions */\n\t\tVector<Node> selectionConds = conjunct.getSelectionConds();\n\n\t\t/**get negative conditions for these nodes*/\n\t\tVector<Node> negativeSelConds = GenerateCVCConstraintForNode.getNegativeConditions(selectionConds);\n\n\t\t/**Generate constraints for the negative conditions*/\n\t\tfor(int k = 0; k < negativeSelConds.size(); k++){\n\n\t\t\t/**get table details*/\n\t\t\tString tableNo = negativeSelConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo)* queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;;\n\t\t\tfor(int l = 1; l <= count; l++)\n\t\t\t\tOrConstraints.add( \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, negativeSelConds.get(k),l+offset-1)+\";\" +\"\\n\" );\n\t\t}\n\n\n\n\t\t/**Generate negative constraints for string selection conditions */\n\t\tVector<Node> stringSelectionConds = conjunct.getStringSelectionConds();\t\n\n\t\t/**get negative conditions for these nodes*/\n\t\tVector<Node> negativeStringSelConds = GenerateCVCConstraintForNode.getNegativeConditions(stringSelectionConds);\n\n\t\t/**Generate constraints for the negative conditions*/\n\t\tfor(int k = 0; k < negativeStringSelConds.size(); k++){\n\n\t\t\t/**get table details*/\n\t\t\tString tableNo = negativeStringSelConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo)* queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;;\n\t\t\tfor(int l = 1; l <= count; l++)\n\t\t\t\tOrStringConstraints.add( \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, negativeStringSelConds.get(k),l+offset-1)+\";\" +\"\\n\" );\n\t\t}\n\n\n\t\t/**Generate negative constraints for like conditions */\n\t\tVector<Node> likeConds = conjunct.getLikeConds();\n\n\t\t/**get negative conditions for these nodes*/\n\t\tVector<Node> negativeLikeConds = GenerateCVCConstraintForNode.getNegativeConditions(likeConds);\n\n\t\tfor(int k=0; k<likeConds.size(); k++){\n\n\t\t\t/**get table details*/\n\t\t\tString tableNo = negativeLikeConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo)* queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;;\n\t\t\tfor(int l=1;l<=count;l++)\n\t\t\t\tOrStringConstraints.add( \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, negativeLikeConds.get(k),l+offset-1)+\";\" +\"\\n\" );\n\t\t}\n\n\n\t\t/**get the where clause sub query conditions in this conjunct*/\n\t\tif(conjunct.getAllSubQueryConds() != null){\n\t\t\tfor(int i=0; i < conjunct.getAllSubQueryConds().size(); i++){\n\t\t\t\t\n\t\t\t\tNode subQ = conjunct.getAllSubQueryConds().get(i);\n\t\t\t\t\n\t\t\t\t/**FIXME: Add negative constraints for this where clause sub query block\n\t\t\t\t * We could use methods of class: GenerateConstraintsForWhereClauseSubQueryBlock*/\n\t\t\t\t/**FIXME:If the given conjunct has NOT EXISTS conditions, then negative of that becomes positive*/\n\t\t\t\tint index = UtilsRelatedToNode.getQueryIndexOfSubQNode(subQ);\n\n\t\t\t\t/**get sub query block*/\n\t\t\t\tQueryBlockDetails subQuery = queryBlock.getWhereClauseSubQueries().get(index);\n\t\t\t\t\n\t\t\t\tString negativeConstraint = \"\";\n\t\t\t\t\n\t\t\t\t/**if this sub query is of EXISTS Type*/\n\t\t\t\tif(subQ.getType().equals(Node.getExistsNodeType()) ){\n\t\t\t\t\t\n\t\t\t\t\tfor (Conjunct con: subQuery.getConjuncts())\n\t\t\t\t\t\tnegativeConstraint += generateNegativeConstraintsConjunct(cvc, subQuery, con);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/**if sub query is of type NOT Exists*/\n\t\t\t\t/**We need to get positive constraints for this sub query*/\n\t\t\t\telse if ( subQ.getType().equals(Node.getNotExistsNodeType() ) ){\n\t\t\t\t\t\n\t\t\t\t\tfor (Conjunct con: subQuery.getConjuncts())\n\t\t\t\t\t\tnegativeConstraint += getConstraintsForConjuct(cvc, queryBlock, con);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\t/**get negative condition for this sub query node*/\n\t\t\t\t\tNode subQNegative = GenerateCVCConstraintForNode.getNegativeCondition(subQ);\n\t\t\t\t\t\n\t\t\t\t\t/**get negative constraints for where clause connective*/\t\t\t\t\t\n\t\t\t\t\tnegativeConstraint = GenerateConstraintsForWhereClauseSubQueryBlock.getConstraintsForWhereSubQueryConnective(cvc, queryBlock, subQNegative);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconstraintString += negativeConstraint;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!OrConstraints.isEmpty() && OrConstraints.size() != 0)\n\t\t\tconstraintString += processOrConstraints(OrConstraints);\n\t\tconstraintString += \"\\n%--------------------------------\\n%END OF NEGATIVE CONSTRAINTS FOR THIS CONJUNCT\\n%---------------------------------------\";\n\n\t\tif(!OrStringConstraints.isEmpty() && OrStringConstraints.size() != 0 )\n\t\t\tcvc.getStringConstraints().add(processOrConstraints(OrStringConstraints));\n\n\t\treturn constraintString;\n\t}", "public static String getConstraintsForConjuct(GenerateCVC1 cvc, QueryBlockDetails queryBlock, Conjunct conjunct) throws Exception {\n\n\t\tString constraintString = \"\";\n\n\t\t/** If the given conjunct is null then no constraints need to be generated */\n\t\tif(conjunct == null)\n\t\t\treturn constraintString;\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% EQUIVALENCE CLASS CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\t/** Get the equivalence class constraints for this conjunct*/\n\t\tVector<Vector<Node>> equivalenceClasses = conjunct.getEquivalenceClasses();\n\t\tfor(int k=0; k<equivalenceClasses.size(); k++){\n\t\t\tVector<Node> ec = equivalenceClasses.get(k);\n\t\t\tfor(int i=0;i<ec.size()-1;i++){\n\t\t\t\tNode n1 = ec.get(i);\n\t\t\t\tNode n2 = ec.get(i+1);\n\t\t\t\tconstraintString += GenerateJoinPredicateConstraints.getConstraintsForEquiJoins(cvc, queryBlock, n1,n2) +\"\\n\";\n\t\t\t}\n\t\t}\n\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% SELECTION CLASS CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\t/** Get the constraints for the selection conditions of the form A.x = Constant of this conjunct */\n\t\tVector<Node> selectionConds = conjunct.getSelectionConds();\n\t\tfor(int k=0; k< selectionConds.size(); k++){\n\n\t\t\tString tableNo = selectionConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo) * queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */\n\t\t\tfor(int l=1;l<=count;l++)\n\t\t\t\tconstraintString += \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, selectionConds.get(k),l+offset-1)+\";\" +\"\\n\";\n\t\t}\n\n\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% ALL CLASS CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\t/** Get the constraints for the non equi-join conditions */\n\t\tVector<Node> allConds = conjunct.getAllConds();\n\t\tfor(int k=0; k<allConds.size(); k++)\n\t\t\tconstraintString += GenerateJoinPredicateConstraints.getConstraintsForNonEquiJoins(cvc, queryBlock, allConds) +\"\\n\";\n\n\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% STRING SELECTION CLASS CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\t/**get the constraints for the conditions of the form A.x=cons where cons is a string constant */\n\t\tVector<Node> stringSelectionConds = conjunct.getStringSelectionConds();\n\t\tfor(int k=0; k<stringSelectionConds.size(); k++){\n\n\t\t\tString tableNo = stringSelectionConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo) * queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;\n\t\t\tfor(int l=1;l<=count;l++)\n\t\t\t\tcvc.getStringConstraints().add( \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, stringSelectionConds.get(k),l+offset-1)+\";\" +\"\\n\" );\n\t\t}\n\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% LIKE CLAUSE CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\t/** Generate constraints for the like conditions of this conjunct*/\n\t\tVector<Node> likeConds = conjunct.getLikeConds();\n\t\tfor(int k=0; k<likeConds.size(); k++){\n\n\t\t\tString tableNo = likeConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo) * queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;\n\t\t\tfor(int l=1;l<=count;l++)\n\t\t\t\tcvc.getStringConstraints().add( \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, likeConds.get(k),l+offset-1)+\";\\n\" );\n\t\t}\n\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% WHERE CLAUSE SUBQUERY BLOCK CONSTRAINTS\\n%---------------------------------\\n\";\n\t\tconstraintString += GenerateConstraintsForWhereClauseSubQueryBlock.getConstraintsForWhereClauseSubQueryBlock(cvc, queryBlock, conjunct);\n\t\tconstraintString += \"\\n%---------------------------------\\n% END OF WHERE CLAUSE SUBQUERY BLOCK CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\tConstraints finalConstraints=new Constraints();\n\t\tfinalConstraints.constraints.add(\"\");\n\t\tfinalConstraints.stringConstraints.add(\"\");\n\t\tfor(Disjunct disjunct:conjunct.disjuncts){\n\t\t\tConstraints constraints=GenerateConstraintsForDisjunct.getConstraintsForDisjuct(cvc, queryBlock, disjunct);\n\t\t\tfinalConstraints=Constraints.mergeConstraints(finalConstraints,constraints);\n\t\t}\n\t\tif(!conjunct.disjuncts.isEmpty()){\n\t\t\tconstraintString+=\"\\n\"+Constraints.getConstraint(finalConstraints) + \"\\n\";\n\t\t\tcvc.getStringConstraints().add(Constraints.getStringConstraints(finalConstraints));\n\t\t}\n\t\t\n\t\treturn constraintString;\n\t}", "public ConstraintDefinition() {\n\t\tthis(\"\");\n\t}", "TransactionType createTransactionType();", "SQLCaseOperand createSQLCaseOperand();", "public StrColumn getDateHoldNmrConstraints() {\n return delegate.getColumn(\"date_hold_nmr_constraints\", DelegatingStrColumn::new);\n }", "@Test(timeout = 4000)\n public void test054() throws Throwable {\n String[] stringArray0 = new String[20];\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \" = \", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n StringBuilder stringBuilder0 = new StringBuilder(\" = \");\n SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, stringBuilder0, nameSpec0);\n assertEquals(\" = CONSTRAINT \\\" = \\\" \", stringBuilder0.toString());\n }", "GeneralClause createGeneralClause();", "@Override\n public Constraint converConstrain(String classname, String parvarn1, String parvarn2, String parvarn3) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {\n IntVar varConverX = new IntVar(); IntVar varConverY = new IntVar(); IntVar varConverZ = new IntVar(); varConverX.id = parvarn1;varConverY.id = parvarn2; varConverZ.id = parvarn3 ;\n Class<?> clasCon = Class.forName(classname);\n Constructor<?> constru2 = clasCon.getDeclaredConstructor(new Class<?>[] {JaCoP.core.IntVar.class,JaCoP.core.IntVar.class, JaCoP.core.IntVar.class});\n Constraint c = (Constraint) constru2.newInstance(varConverX,varConverY, varConverZ);\n return c;\n }", "public PrimitiveConstraint getConstraint() {\r\n return new XlteqC(var, value);\r\n }", "private VwConstraintDefOracleBean fromObjectToBean(VwConstraintDef object) {\n VwConstraintDefOracleBean bean = new VwConstraintDefOracleBean();\n bean.setConsType(object.getConsType());\n bean.setConsName(object.getConsName());\n bean.setMainTable(object.getMainTable());\n bean.setRefTable(object.getRefTable());\n bean.setTable1(object.getTable1());\n bean.setCol1(object.getCol1());\n return bean;\n }", "ValueRangeConstraint createValueRangeConstraint();", "public Vector FilterRecordByType(int FKComp, int resType, int companyID, int orgID) throws SQLException, Exception {\n\t\tString query = \"\";\n\t\t\n\t\t// Changed by Ha 10/06/08 change ResType-->resType\n\t\tif(FKComp != 0 && resType != 0) {\n\t\t\tquery = query + \"Select tblDRARes.ResID, tblDRARes.Resource, tblDRARes.ResType, tblOrigin.Description \";\n\t\t\tquery = query + \"from tblDRARes \";\n\t\t\tquery = query + \" inner join tblOrigin on tblDRARes.IsSystemGenerated = tblOrigin.PKIsSystemGenerated \";\n\t\t\tquery = query + \"where (CompetencyID = \" + FKComp;\n\t\t\tquery = query + \" and tblDRARes.ResType = \" + resType;\n\t\t\tquery = query + \" and FKCompanyID = \" + companyID + \" and FKOrganizationID = \" + orgID;\n\t\t\tquery = query + \") or (CompetencyID = \" + FKComp;\n\t\t\tquery = query + \" and tblDRARes.ResType = \" + resType;\n\t\t\tquery = query + \" and IsSystemGenerated = 1) order by \";\n\t\t\t\n\t\t} else if(FKComp == 0 && resType != 0) {\n\t\t\tquery = query + \"SELECT ResID, Resource, ResType, Description FROM tblDRARes \";\n\t\t\tquery = query + \" inner join tblOrigin on tblDRARes.IsSystemGenerated = tblOrigin.PKIsSystemGenerated \";\n\t\t\tquery = query + \" WHERE (ResType = \" + resType;\n\t\t\tquery = query + \" and FKCompanyID = \" + companyID + \" and FKOrganizationID = \" + orgID;\n\t\t\tquery = query + \") or (tblDRARes.ResType = \" + resType;\n\t\t\tquery = query + \" and IsSystemGenerated = 1)\";\n\t\t\tquery = query + \" ORDER BY \";\n\t\t\t\n\t\t} else if(FKComp != 0 && resType == 0) {\n\t\t\tquery = query + \"Select tblDRARes.ResID, tblDRARes.Resource, tblDRARes.ResType, tblOrigin.Description \";\n\t\t\tquery = query + \"from tblDRARes \";\n\t\t\tquery = query + \" inner join tblOrigin on tblDRARes.IsSystemGenerated = tblOrigin.PKIsSystemGenerated \";\n\t\t\tquery = query + \"where (CompetencyID = \" + FKComp;\n\t\t\tquery = query + \" and FKCompanyID = \" + companyID + \" and FKOrganizationID = \" + orgID;\n\t\t\tquery = query + \") or (CompetencyID = \" + FKComp;\n\t\t\tquery = query + \" and IsSystemGenerated = 1) order by \";\n\t\t\t\n\t\t} else {\n\t\t\tquery = query + \"Select tblDRARes.ResID, tblDRARes.Resource, tblDRARes.ResType, tblOrigin.Description \";\n\t\t\tquery = query + \"from tblDRARes \";\n\t\t\tquery = query + \" inner join tblOrigin on tblDRARes.IsSystemGenerated = tblOrigin.PKIsSystemGenerated \";\n\t\t\tquery = query + \"where (FKCompanyID = \" + companyID + \" and FKOrganizationID = \" + orgID;\n\t\t\tquery = query + \") or (IsSystemGenerated = 1) order by \";\n\t\t}\n\t\t\n\t\tif(SortType == 1)\n\t\t\tquery = query + \"tblDRARes.Resource\";\n\t\telse\n\t\t\tquery = query + \"IsSystemGenerated\";\n\n\t\tif(Toggle[SortType - 1] == 1)\n\t\t\tquery = query + \" DESC\";\n\t\t\n\t\tVector v=new Vector();\n\t\t\n\t\tConnection con = null;\n\t\tStatement st = null;\n\t\tResultSet rs = null;\n\n\t\ttry{\n\t\t\tcon=ConnectionBean.getConnection();\n\t\t\tst=con.createStatement();\n\t\t\trs=st.executeQuery(query);\n\t\t\twhile(rs.next()){\n\t\t\t\t//tblDRARes.ResID, tblDRARes.Resource, tblDRARes.ResType, tblOrigin.Description \n\t\t\t\tvotblDRARES vo=new votblDRARES();\n\t\t\t\t\n\t\t\t\tvo.setResID(rs.getInt(\"ResID\"));\n\t\t\t\tvo.setResource(rs.getString(\"Resource\"));\n\t\t\t\tvo.setResType(rs.getInt(\"ResType\"));\n\t\t\t\tvo.setDescription(rs.getString(\"Description\"));\n\t\t\t\tv.add(vo);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"DevelpmentResources.java - FilterRecordByType - \"+e);\n\t\t}finally{\n\t\t\tConnectionBean.closeRset(rs); //Close ResultSet\n\t\t\tConnectionBean.closeStmt(st); //Close statement\n\t\t\tConnectionBean.close(con); //Close connection\n\n\t\t}\n\t\tSystem.out.println(\"QUERY: \"+query);\n\t\treturn v;\n\t}", "void addConstraintRelation(IViewRelation relation);", "private void createForPlanningTypeMaintenance(ConditionerEntity conditionerEntity, String typeMaintenanceUuid) {\n List<TypeMaintenanceEntity> typeMaint = conditionerEntity.getMaintenance().stream()\n .filter(m -> m.getUuidTypeMaintenance().equals(typeMaintenanceUuid)).collect(Collectors.toList());\n for (TypeMaintenanceEntity entity : typeMaint) {\n Integer hoursBeforeTypeMaintenance = entity.getHoursBeforeTypeMaintenance();\n LocalDateTime startDate = conditionerEntity.getStartDate();\n LocalDateTime nextTypeMaintenancy = startDate.plusHours(hoursBeforeTypeMaintenance);\n ForPlanningTypeMaintenanceEntity en = ForPlanningTypeMaintenanceEntity.builder()\n .inventoryNumber(conditionerEntity.getInventoryNumber())\n .lastTypeMaintenanceDate(conditionerEntity.getStartDate())\n .nameConditioner(conditionerEntity.getNameConditioner())\n .nextTypeMaintenanceDate(nextTypeMaintenancy)\n .place(conditionerEntity.getPlace())\n .uuidConditioner(conditionerEntity.getUuidConditioner())\n .uuidTypeMaintenance(typeMaintenanceUuid)\n .uuidRecord(utils.createRandomUuid())\n .build();\n forPlanningTypeMaintenanceRepository.save(en);\n LOGGER.info(Messages.RECORD_FOR_PLANNING + Messages.CHECK_UNIQUE_CONDITIONER +\n conditionerEntity.getInventoryNumber() + Messages.CREATED);\n }\n }", "ViolationType getViolationType(int violationTypeId);", "public boolean supportsUniqueConstraintInCreateAlterTable() {\n \t return true;\n \t}", "ConstraintModelFactory getConstraintModelFactory();", "protected abstract String statementType();", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[7];\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint(\"p2Gs!^@lUVq$\", true, defaultDBTable0, stringArray0, defaultDBTable0, stringArray0);\n StringBuilder stringBuilder0 = new StringBuilder();\n SQLUtil.appendConstraintName((DBConstraint) dBForeignKeyConstraint0, stringBuilder0);\n assertEquals(\"CONSTRAINT p2Gs!^@lUVq$ \", stringBuilder0.toString());\n }", "public interface ArchetypeLevelsSchema {\n\tString TABLE_NAME = \"creature_archetype_levels\";\n\n\tString COLUMN_ARCHETYPE_ID = \"archetypeId\";\n\tString COLUMN_LEVEL = \"level\";\n\tString COLUMN_ATTACK = \"attack\";\n\tString COLUMN_ATTACK2 = \"attack2\";\n\tString COLUMN_DEF_BONUS = \"defensiveBonus\";\n\tString COLUMN_BODY_DEV = \"bodyDevelopment\";\n\tString COLUMN_PRIME_SKILL = \"primeSkill\";\n\tString COLUMN_SECONDARY_SKILL = \"secondarySkill\";\n\tString COLUMN_POWER_DEV = \"powerDevelopment\";\n\tString COLUMN_SPELLS = \"spells\";\n\tString COLUMN_TALENT_DP = \"talentDP\";\n\tString COLUMN_AGILITY = \"agility\";\n\tString COLUMN_CONS_STAT = \"constitutionStat\";\n\tString COLUMN_CONSTITUTION = \"constitution\";\n\tString COLUMN_EMPATHY = \"empathy\";\n\tString COLUMN_INTUITION = \"intuition\";\n\tString COLUMN_MEMORY = \"memory\";\n\tString COLUMN_PRESENCE = \"presence\";\n\tString COLUMN_QUICKNESS = \"quickness\";\n\tString COLUMN_REASONING = \"reasoning\";\n\tString COLUMN_SELF_DISC = \"selfDiscipline\";\n\tString COLUMN_STRENGTH = \"strength\";\n\n\tString TABLE_CREATE = \"CREATE TABLE IF NOT EXISTS \"\n\t\t\t+ TABLE_NAME\n\t\t\t+ \" (\"\n\t\t\t+ COLUMN_ARCHETYPE_ID + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_LEVEL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_ATTACK2 + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_DEF_BONUS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_BODY_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRIME_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SECONDARY_SKILL + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_POWER_DEV + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SPELLS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_TALENT_DP + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_AGILITY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONS_STAT + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_CONSTITUTION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_EMPATHY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_INTUITION + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_MEMORY + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_PRESENCE + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_QUICKNESS + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_REASONING + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_SELF_DISC + \" INTEGER NOT NULL, \"\n\t\t\t+ COLUMN_STRENGTH + \" INTEGER NOT NULL, \"\n\t\t\t+ \"PRIMARY KEY(\" + COLUMN_ARCHETYPE_ID + \",\" + COLUMN_LEVEL + \")\"\n\t\t\t+ \")\";\n\n\tString[] COLUMNS = new String[] { COLUMN_ARCHETYPE_ID, COLUMN_LEVEL, COLUMN_ATTACK, COLUMN_ATTACK2, COLUMN_DEF_BONUS,\n\t\t\tCOLUMN_BODY_DEV, COLUMN_PRIME_SKILL, COLUMN_SECONDARY_SKILL, COLUMN_POWER_DEV, COLUMN_SPELLS, COLUMN_TALENT_DP,\n\t\t\tCOLUMN_AGILITY, COLUMN_CONS_STAT, COLUMN_CONSTITUTION, COLUMN_EMPATHY, COLUMN_INTUITION, COLUMN_MEMORY,\n\t\t\tCOLUMN_PRESENCE, COLUMN_QUICKNESS, COLUMN_REASONING, COLUMN_SELF_DISC, COLUMN_STRENGTH};\n}", "DatatypesType createDatatypesType();", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n String[] stringArray0 = new String[0];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"*F(PV|\", true, stringArray0);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n String string0 = SQLUtil.constraintSpec(dBPrimaryKeyConstraint0, nameSpec0);\n assertEquals(\"CONSTRAINT *F(PV| PRIMARY KEY ()\", string0);\n }", "public interface Constraint extends TOSCAObject<Constraint> {\n\n\tpublic String name();\n\n\tpublic default Constraint.Type type() {\n\t\treturn Type.valueOf(Type.class, name());\n\t}\n\n\t/* this is a one entry map so here we pick the single \n\t */\n\tpublic default Object expression() {\n\t\treturn info().values().iterator().next();\n\t}\n\n\tpublic enum Type {\n\t\tequal,\n\t\tgreater_than,\n\t\tgreater_or_equal,\n\t\tless_than,\n\t\tless_or_equal,\n\t\tin_range,\n\t\tvalid_values,\n\t\tlength,\n\t\tmin_length,\n\t\tmax_length,\n\t\tpattern\n\t}\n}", "DatatypeType createDatatypeType();", "@Override\n public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) {\n RelDataType relDataType = super.deriveType(validator, scope, call);\n ((SqlBasicCall) call).setOperator(new VersionedSqlUserDefinedFunction((SqlUserDefinedFunction) (call.getOperator()),\n ivyDependencies, viewDependentFunctionName));\n return relDataType;\n }", "final public ColumnConstraint ColumnConstraint() throws ParseException {Token tk = null, tk2 = null, tk3 = null, tk4 = null;\n String constraintName = null;\n String indexName = null;\n List<ColumnName> indexColumnNames = null;\n ColumnReference reference = null;\n ExpressionValue checkExpr = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case PRIMARY:\n case CONSTRAINT:\n case UNIQUE:\n case FOREIGN:{\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case CONSTRAINT:{\n tk = jj_consume_token(CONSTRAINT);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n constraintName = DbObjectName();\n break;\n }\n default:\n jj_la1[96] = jj_gen;\n ;\n }\n break;\n }\n default:\n jj_la1[97] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case PRIMARY:{\n tk2 = jj_consume_token(PRIMARY);\n tk3 = jj_consume_token(KEY);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[98] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[99] = jj_gen;\n ;\n }\n break;\n }\n case UNIQUE:{\n tk2 = jj_consume_token(UNIQUE);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case KEY:{\n tk3 = jj_consume_token(KEY);\n break;\n }\n default:\n jj_la1[100] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n indexName = DbObjectName();\n break;\n }\n default:\n jj_la1[101] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[102] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[103] = jj_gen;\n ;\n }\n break;\n }\n case FOREIGN:{\n tk2 = jj_consume_token(FOREIGN);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case KEY:{\n tk3 = jj_consume_token(KEY);\n break;\n }\n default:\n jj_la1[104] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n indexName = DbObjectName();\n break;\n }\n default:\n jj_la1[105] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case REFERENCES:{\n reference = ColumnReference();\n break;\n }\n default:\n jj_la1[106] = jj_gen;\n ;\n }\n break;\n }\n default:\n jj_la1[107] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n }\n case KEY:{\n tk2 = jj_consume_token(KEY);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n indexName = DbObjectName();\n break;\n }\n default:\n jj_la1[108] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[109] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[110] = jj_gen;\n ;\n }\n break;\n }\n case INDEX:{\n tk2 = jj_consume_token(INDEX);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n indexName = DbObjectName();\n break;\n }\n default:\n jj_la1[111] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[112] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USING:{\n jj_consume_token(USING);\n tk4 = jj_consume_token(S_IDENTIFIER);\n break;\n }\n default:\n jj_la1[113] = jj_gen;\n ;\n }\n break;\n }\n case FULLTEXT:\n case SPATIAL:{\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case FULLTEXT:{\n tk2 = jj_consume_token(FULLTEXT);\n break;\n }\n case SPATIAL:{\n tk2 = jj_consume_token(SPATIAL);\n break;\n }\n default:\n jj_la1[114] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case INDEX:{\n tk3 = jj_consume_token(INDEX);\n break;\n }\n default:\n jj_la1[115] = jj_gen;\n ;\n }\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case S_IDENTIFIER:\n case S_QUOTED_IDENTIFIER:{\n indexName = DbObjectName();\n break;\n }\n default:\n jj_la1[116] = jj_gen;\n ;\n }\n jj_consume_token(118);\n indexColumnNames = ColumnNames();\n jj_consume_token(119);\n break;\n }\n case CHECK:{\n tk2 = jj_consume_token(CHECK);\n jj_consume_token(118);\n checkExpr = ExpressionValue();\n jj_consume_token(119);\n break;\n }\n default:\n jj_la1[117] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\nreturn new ColumnConstraint(tk != null, constraintName, (tk2 != null ? tk2.image : \"\") + (tk3 != null ? \" \" + tk3.image : \"\"),\n indexColumnNames, (tk4 != null ? tk4.image : null), indexName, reference, checkExpr);\n}", "ISModifyDataType createISModifyDataType();", "public StrColumn getDepReleaseCodeNmrConstraints() {\n return delegate.getColumn(\"dep_release_code_nmr_constraints\", DelegatingStrColumn::new);\n }", "SQLCaseWhens createSQLCaseWhens();", "VariantConditionModel createInstanceOfVariantConditionModel();", "public static String getConstraintsForConjuctExceptWhereClauseSubQueryBlock(GenerateCVC1 cvc, QueryBlockDetails queryBlock, Conjunct conjunct) throws Exception {\n\n\t\tString constraintString = \"\";\n\n\t\t/** If the given conjunct is null then no constraints need to be generated */\n\t\tif(conjunct == null)\n\t\t\treturn constraintString;\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% EQUIVALENCE CLASS CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\t/** Get the equivalence class constraints for this conjunct*/\n\t\tVector<Vector<Node>> equivalenceClasses = conjunct.getEquivalenceClasses();\n\t\tfor(int k=0; k<equivalenceClasses.size(); k++){\n\t\t\tVector<Node> ec = equivalenceClasses.get(k);\n\t\t\tfor(int i=0;i<ec.size()-1;i++){\n\t\t\t\tNode n1 = ec.get(i);\n\t\t\t\tNode n2 = ec.get(i+1);\n\t\t\t\tconstraintString += GenerateJoinPredicateConstraints.getConstraintsForEquiJoins(cvc, queryBlock, n1,n2) +\"\\n\";\n\t\t\t}\n\t\t}\n\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% SELECTION CLASS CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\t/** Get the constraints for the selection conditions of the form A.x = Constant of this conjunct */\n\t\tVector<Node> selectionConds = conjunct.getSelectionConds();\n\t\tfor(int k=0; k<selectionConds.size(); k++){\n\n\t\t\tString tableNo = selectionConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo)* queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;;\n\t\t\tfor(int l=1;l<=count;l++)\n\t\t\t\tconstraintString += \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, selectionConds.get(k),l+offset-1)+\";\" +\"\\n\";\n\t\t}\n\n\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% ALL CLASS CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\t/** Get the constraints for the non equi-join conditions */\n\t\tVector<Node> allConds = conjunct.getAllConds();\n\t\tfor(int k=0; k<allConds.size(); k++)\n\t\t\tconstraintString += GenerateJoinPredicateConstraints.getConstraintsForNonEquiJoins(cvc, queryBlock, allConds) +\"\\n\";\n\n\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% STRING SELECTION CLASS CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\t/**get the constraints for the conditions of the form A.x=cons where cons is a string constant */\n\t\tVector<Node> stringSelectionConds = conjunct.getStringSelectionConds();\n\t\tfor(int k=0; k<stringSelectionConds.size(); k++){\n\n\t\t\tString tableNo = stringSelectionConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo)* queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;;\n\t\t\tfor(int l=1;l<=count;l++)\n\t\t\t\tcvc.getStringConstraints().add( \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, stringSelectionConds.get(k),l+offset-1)+\";\" +\"\\n\" );\n\t\t}\n\n\n\t\tconstraintString += \"\\n%---------------------------------\\n% LIKE CLAUSE CONSTRAINTS\\n%---------------------------------\\n\";\n\n\t\t/** Generate constraints for the like conditions of this conjunct*/\n\t\tVector<Node> likeConds = conjunct.getLikeConds();\n\t\tfor(int k=0; k<likeConds.size(); k++){\n\n\t\t\tString tableNo = likeConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo)* queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;;\n\t\t\tfor(int l=1;l<=count;l++)\n\t\t\t\tcvc.getStringConstraints().add( \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, likeConds.get(k),l+offset-1)+\";\\n\" );\n\t\t}\n\n\t\treturn constraintString;\n\t}", "public static ExpressionType construire(Element elemType) {\n ExpressionType expr = null;\n Element classeElem = (Element) elemType\n .getElementsByTagName(\"expression-class\").item(0);\n String classe = classeElem.getChildNodes().item(0).getNodeValue();\n Element motCleElem = (Element) elemType.getElementsByTagName(\"keyword\")\n .item(0);\n String motCleNom = motCleElem.getChildNodes().item(0).getNodeValue();\n ConstraintOperator keyWord = ConstraintOperator\n .shortcut(StringEscapeUtils.unescapeXml(motCleNom));\n if (classe.equals(ConfigExpressionType.class.getSimpleName())) {\n expr = new ConfigExpressionType(null, keyWord);\n } else if (classe.equals(MarginExpressionType.class.getSimpleName())) {\n Element pourElem = (Element) elemType.getElementsByTagName(\"margin\")\n .item(0);\n Double pourcent = Double\n .valueOf(pourElem.getChildNodes().item(0).getNodeValue());\n double pourcentage = 0.0;\n if (pourcent != null)\n pourcentage = pourcent.doubleValue();\n // on récupère l'unité\n Element unitElem = (Element) elemType.getElementsByTagName(\"unit\")\n .item(0);\n ValueUnit unite = ValueUnit\n .valueOf(unitElem.getChildNodes().item(0).getNodeValue());\n expr = new MarginExpressionType(null, keyWord, pourcentage, unite);\n } else if (classe.equals(ReductionExpressionType.class.getSimpleName())) {\n Element pourElem = (Element) elemType.getElementsByTagName(\"value\")\n .item(0);\n double pourcentage = Double\n .valueOf(pourElem.getChildNodes().item(0).getNodeValue());\n expr = new ReductionExpressionType(null, keyWord, pourcentage);\n } else {\n // on récupère la valeur\n Element valElem = (Element) elemType.getElementsByTagName(\"value\")\n .item(0);\n String valeurS = valElem.getChildNodes().item(0).getNodeValue();\n CharacterValueType type = getTypeSimple(valeurS);\n Object valeur = valeurS;\n if (type.equals(CharacterValueType.INT))\n valeur = Integer.valueOf(valeurS);\n else if (type.equals(CharacterValueType.REAL))\n valeur = Double.valueOf(valeurS);\n else if (type.equals(CharacterValueType.BOOLEAN))\n valeur = Boolean.valueOf(valeurS);\n // on récupère l'unité\n Element unitElem = (Element) elemType.getElementsByTagName(\"unit\")\n .item(0);\n ValueUnit unite = ValueUnit\n .valueOf(unitElem.getChildNodes().item(0).getNodeValue());\n if (classe.equals(ThreshExpressionType.class.getSimpleName()))\n expr = new ThreshExpressionType(null, keyWord, valeur, unite);\n else\n expr = new ControlExpressionType(null, keyWord, valeur, unite);\n }\n return expr;\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n String[] stringArray0 = new String[5];\n DBSchema dBSchema0 = new DBSchema(\"\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"k4#~A6 _d6{6v)5_\", dBSchema0);\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"\", false, stringArray0);\n NameSpec nameSpec0 = NameSpec.NEVER;\n StringBuilder stringBuilder0 = SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, (StringBuilder) null, nameSpec0);\n assertNull(stringBuilder0);\n }", "protected Command createChangeConstraintCommand( EditPart child, Object constraint ) {\n return null;\r\n }", "@Override\n\tpublic Constraint converConstrain(String classname, String parvarn1, String parvarn2) throws ClassNotFoundException,\n\t\t\tSecurityException, NoSuchMethodException, IllegalArgumentException,\n\t\t\tInstantiationException, IllegalAccessException,\n\t\t\tInvocationTargetException {\n\n\t\tIntVar varConverX = new IntVar(); IntVar varConverY = new IntVar(); varConverX.id = parvarn1;varConverY.id = parvarn2; \n\t\tClass<?> clasCon = Class.forName(classname);\n\t\tConstructor<?> constru2 = clasCon.getDeclaredConstructor(new Class<?>[] {JaCoP.core.IntVar.class,JaCoP.core.IntVar.class});\n\t\tConstraint c = (Constraint) constru2.newInstance(varConverX,varConverY);\n\t\treturn c;\n\t}", "@Test(timeout = 4000)\n public void test095() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionCntext\");\n String[] stringArray0 = new String[4];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, (String) null, true, stringArray0);\n SQLUtil.appendConstraintName((DBConstraint) dBPrimaryKeyConstraint0, (StringBuilder) null);\n assertNull(dBPrimaryKeyConstraint0.getDoc());\n }", "public LinearConstraint() {\n\n }", "protected void createMimoentslotconstraintsAnnotations() {\n\t\tString source = \"mimo-ent-slot-constraints\";\n\t\taddAnnotation\n\t\t (getInvoice_InvoiceStatuses(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"statusDate\", \"*NOW\"\n\t\t });\n\t}", "public VcmsArticleType create(\n\t\tvn.gov.hoabinh.service.persistence.VcmsArticleTypePK vcmsArticleTypePK);", "QueryType createQueryType();", "String getConstraintSetId();", "VmHealthCheckType createVmHealthCheckType();", "@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tvoid riskAnalysisType(int pVal);", "public static String getCreateSQLString(){\n\t\treturn \"create table \" +TABLE_NAME_FAMILY_PLANNING_RECORDS +\" ( \"\n\t\t\t\t+SERVICE_REC_ID+\" integer primary key, \"\n\t\t\t\t+FamilyPlanningServices.SERVICE_ID +\" integer, \"\n\t\t\t\t+CommunityMembers.COMMUNITY_MEMBER_ID +\" integer, \"\n\t\t\t\t+SERVICE_DATE+\" text,\"\n\t\t\t\t+SCHEDULE_DATE+\" text, \"\n\t\t\t\t+QUANTITY+\" numberic ,\"\n\t\t\t\t+SERVICE_TYPE+\" integer default 0,\"\n\t\t\t\t+DataClass.REC_STATE+ \" integer \"\n\t\t\t\t+\")\";\n\t}", "public interface SimpleRestriction extends SchemaComponent {\n public static final String ENUMERATION_PROPERTY = \"enumerations\";\n public static final String PATTERN_PROPERTY = \"patterns\";\n public static final String MIN_EXCLUSIVE_PROPERTY = \"minExclusives\";\n public static final String MIN_LENGTH_PROPERTY = \"minLengths\";\n public static final String MAX_LENGTH_PROPERTY = \"maxLengths\";\n public static final String FRACTION_DIGITS_PROPERTY = \"fractionDigits\";\n public static final String WHITESPACE_PROPERTY = \"whitespaces\";\n public static final String MAX_INCLUSIVE_PROPERTY = \"maxInclusives\";\n public static final String TOTAL_DIGITS_PROPERTY = \"totalDigits\";\n public static final String LENGTH_PROPERTY = \"lengths\";\n public static final String MIN_INCLUSIVE_PROPERTY = \"minInclusives\";\n public static final String MAX_EXCLUSIVE_PROPERTY = \"maxExclusives\";\n public static final String BASE_PROPERTY = \"base\";\n public static final String INLINETYPE_PROPERTY = \"inlinetype\";\n \n Collection<TotalDigits> getTotalDigits();\n void addTotalDigit(TotalDigits td);\n void removeTotalDigit(TotalDigits td);\n \n Collection<MinExclusive> getMinExclusives();\n void addMinExclusive(MinExclusive me);\n void removeMinExclusive(MinExclusive me);\n \n Collection<MinInclusive> getMinInclusives();\n void addMinInclusive(MinInclusive me);\n void removeMinInclusive(MinInclusive me);\n \n Collection<MinLength> getMinLengths();\n void addMinLength(MinLength ml);\n void removeMinLength(MinLength ml);\n \n Collection<MaxLength> getMaxLengths();\n void addMaxLength(MaxLength ml);\n void removeMaxLength(MaxLength ml);\n \n Collection<Pattern> getPatterns();\n void addPattern(Pattern p);\n void removePattern(Pattern p);\n \n Collection<MaxExclusive> getMaxExclusives();\n void addMaxExclusive(MaxExclusive me);\n void removeMaxExclusive(MaxExclusive me);\n \n Collection<MaxInclusive> getMaxInclusives();\n void addMaxInclusive(MaxInclusive me);\n void removeMaxInclusive(MaxInclusive me);\n \n Collection<Length> getLengths();\n void addLength(Length me);\n void removeLength(Length me);\n \n Collection<Whitespace> getWhitespaces();\n void addWhitespace(Whitespace me);\n void removeWhitespace(Whitespace me);\n \n Collection<FractionDigits> getFractionDigits();\n void addFractionDigits(FractionDigits fd);\n void removeFractionDigits(FractionDigits fd);\n \n Collection<Enumeration> getEnumerations();\n void addEnumeration(Enumeration fd);\n void removeEnumeration(Enumeration fd);\n \n LocalSimpleType getInlineType();\n void setInlineType(LocalSimpleType aSimpleType);\n \n}", "@Override\n\tprotected void getConstraintFromNetlistConstraintFile() {\n\n\t}", "protected abstract DbType getDatabaseType();", "UserDefinedType createUserDefinedType();", "public StrColumn getDateNmrConstraints() {\n return delegate.getColumn(\"date_nmr_constraints\", DelegatingStrColumn::new);\n }", "private void addConstraint(String tok) throws SyntaxError {\n assert(tok.startsWith(PREFIX_OP_STR));\n \n if (!tok.endsWith(\")\")) {\n throw new SyntaxError(String.format(\"Wrong format for the constraint '%s', expected format: %s\",\n tok, CONSTR_FMT));\n }\n int pos = tok.indexOf('(');\n if (pos == -1) {\n throw new SyntaxError(String.format(\"Missing '(' in the constraint '%s', expected format: %s\",\n tok, CONSTR_FMT)); \n }\n String op = tok.substring(1, pos);\n ConstraintType type = ConstraintType.CONSTRAINT_PARENT;\n if (op.equalsIgnoreCase(CONSTR_CONTAINS)) {\n type = ConstraintType.CONSTRAINT_CONTAINS;\n } else if (!op.equalsIgnoreCase(CONSTR_PARENT)) {\n throw new SyntaxError(String.format(\"Wrong constraint name '%s' in the element '%s'\", op, tok));\n }\n // Labels cannot contain commas\n String parts[] = tok.substring(pos + 1, tok.length() - 1).split(\",\");\n if (parts.length < 2) {\n throw new SyntaxError(String.format(\n \"There should be at least 2 elements between '(' and ')'\" + \n \" in the constraint '%s', expected format %s\",\n tok, CONSTR_FMT));\n }\n String headLabel = parts[0].trim();\n Integer headId = mLabel2Id.get(headLabel);\n if (null == headId) {\n throw new SyntaxError(String.format(\"Cannot find a lexical entry \" +\n \" for the label '%s', constraint '%s'\", headLabel, tok)); \n }\n\n ArrayList<ConstraintType> constr = mConstrType.get(headId);\n ArrayList<Integer> dependIds = mDependId.get(headId);\n \n if (ConstraintType.CONSTRAINT_PARENT == type) {\n if (mTypes.get(headId) != FieldType.FIELD_ANNOTATION) {\n throw new SyntaxError(String.format(\n \"The parent in the constraint '%s' should be an annotation\", tok));\n }\n }\n \n for (int i = 1; i < parts.length; ++i) {\n String depLabel = parts[i].trim();\n Integer depId = mLabel2Id.get(depLabel);\n if (null == depId) {\n throw new SyntaxError(String.format(\"Cannot find a lexical entry \" +\n \" for the label '%s', constraint '%s'\", depLabel, tok)); \n }\n \n if (ConstraintType.CONSTRAINT_PARENT == type) {\n if (mTypes.get(depId) != FieldType.FIELD_ANNOTATION) {\n throw new SyntaxError(String.format(\n \"A child (label '%s') in the constraint '%s' should be an annotation\", \n depLabel, tok));\n }\n } \n \n constr.add(type);\n dependIds.add(depId);\n\n /*\n * This is a potentially horrible linear-time complexity search\n * in an array. However, for a reasonable-size user query \n * these arrays are going to be tiny and, in practice, \n * such a linear search be as fast as or likely even faster than \n * a hash/tree map lookup.\n */\n if (!mEdges.get(depId).contains(headId))\n mEdges.get(depId).add(headId);\n if (!mEdges.get(headId).contains(depId))\n mEdges.get(headId).add(depId);\n\n }\n }", "SchemaDefinition createSchemaDefinition();", "OrColumn createOrColumn();", "void addConstraintEntity(IViewEntity entity);", "@IID(\"{05518018-2339-4E08-87BE-D14C69527B7A}\")\npublic interface ICustomizationReqType extends com.gc.ICustomizationType {\n\t// Methods:\n\t/**\n\t * <p>\n\t * Indicates if this requirement type supports direct coverage by tests or\n\t * test instances.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"HasDirectCoverage\"\n\t * </p>\n\t * \n\t * @return Returns a value of type boolean\n\t */\n\n\t@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(20)\n\tboolean hasDirectCoverage();\n\n\t/**\n\t * <p>\n\t * Indicates if this requirement type supports direct coverage by tests or\n\t * test instances.\n\t * </p>\n\t * <p>\n\t * Setter method for the COM property \"HasDirectCoverage\"\n\t * </p>\n\t * \n\t * @param pVal\n\t * Mandatory boolean parameter.\n\t */\n\n\t@DISPID(10)\n\t// = 0xa. The runtime will prefer the VTID if present\n\t@VTID(21)\n\tvoid hasDirectCoverage(boolean pVal);\n\n\t/**\n\t * <p>\n\t * The Type of the Risk Analysis that is applicable to this requirement.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"RiskAnalysisType\"\n\t * </p>\n\t * \n\t * @return Returns a value of type int\n\t */\n\n\t@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(22)\n\tint riskAnalysisType();\n\n\t/**\n\t * <p>\n\t * The Type of the Risk Analysis that is applicable to this requirement.\n\t * </p>\n\t * <p>\n\t * Setter method for the COM property \"RiskAnalysisType\"\n\t * </p>\n\t * \n\t * @param pVal\n\t * Mandatory int parameter.\n\t */\n\n\t@DISPID(11)\n\t// = 0xb. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tvoid riskAnalysisType(int pVal);\n\n\t// Properties:\n}", "public void addUpperConstraint(String type) {\n\t\tfinal JvmUpperBound constraint = this.jvmTypesFactory.createJvmUpperBound();\n\t\tconstraint.setTypeReference(newTypeRef(this.context, type));\n\t\tgetJvmTypeParameter().getConstraints().add(constraint);\n\t}", "SqlCaseWhen createSqlCaseWhen();", "DomainValuesType createDomainValuesType();" ]
[ "0.6403276", "0.5824255", "0.5824255", "0.5681915", "0.5638663", "0.5577264", "0.54524", "0.51819456", "0.5177972", "0.5174223", "0.51455367", "0.50748485", "0.50530076", "0.50381243", "0.5002787", "0.49689394", "0.49675834", "0.496444", "0.49372688", "0.4851933", "0.4821006", "0.48143217", "0.4810359", "0.47845465", "0.477991", "0.47641766", "0.47627532", "0.47604957", "0.47544673", "0.47326747", "0.46769473", "0.46742386", "0.4655731", "0.46474606", "0.46416962", "0.46392676", "0.46190432", "0.46183652", "0.46169177", "0.46074626", "0.45855093", "0.45846418", "0.45789155", "0.45409572", "0.45385236", "0.45324805", "0.45275953", "0.4525789", "0.45150945", "0.4511516", "0.4511216", "0.45022896", "0.44991454", "0.4497986", "0.4493419", "0.4491735", "0.44850242", "0.44800082", "0.44765463", "0.44704553", "0.44694418", "0.44593182", "0.4453273", "0.4447952", "0.44476998", "0.44466472", "0.44466436", "0.44343236", "0.44329587", "0.44237643", "0.4420495", "0.4407257", "0.4403428", "0.4386832", "0.43855864", "0.43718776", "0.43673983", "0.4363976", "0.43560356", "0.4338863", "0.4333279", "0.43317878", "0.43304428", "0.43297884", "0.432929", "0.432858", "0.43280932", "0.43260548", "0.43254903", "0.43229878", "0.43149516", "0.4314249", "0.43109998", "0.43064606", "0.43060586", "0.43039376", "0.4300481", "0.4290798", "0.4285387", "0.42825538" ]
0.56264514
5
Set a PreparedStatement with the supplied Object.
public void set(Context ctx, XPreparedStatement ps) throws SQLException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract void setStatement(@NotNull PreparedStatement preparedStatement, @NotNull T object) throws SQLException, NotEnoughDataException;", "public void setObject(int parameterIndex, Object x) throws SQLException {\n currentPreparedStatement.setObject(parameterIndex, x);\n }", "abstract void setUpdateStatementId(@NotNull PreparedStatement preparedStatement, @NotNull T object) throws SQLException;", "protected abstract void prepareStatementForUpdate(PreparedStatement statement, T object) throws PersistException;", "Statement setParameter(String name, Object param);", "@Override\n\tpublic void setParameter(PreparedStatement ps, int arg1, Object arg2, String arg3) throws SQLException {\n\t}", "public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException {\n currentPreparedStatement.setObject(parameterIndex, x, targetSqlType);\n }", "public void setObject(int parameterIndex, Object x, SQLType targetSqlType) throws SQLException {\n/* */ try {\n/* 49 */ if (this.wrappedStmt != null) {\n/* 50 */ ((PreparedStatement)this.wrappedStmt).setObject(parameterIndex, x, targetSqlType);\n/* */ } else {\n/* 52 */ throw SQLError.createSQLException(\"No operations allowed after statement closed\", \"S1000\", this.exceptionInterceptor);\n/* */ } \n/* 54 */ } catch (SQLException sqlEx) {\n/* 55 */ checkAndFireConnectionError(sqlEx);\n/* */ } \n/* */ }", "Statement setParameter(int index, Object param);", "protected abstract void fillUpdateStatement (final PreparedStatement statement, final T obj)\n \t\t\tthrows SQLException;", "private void setValues(PreparedStatement statement, int index, Object obj)\n\t\t\tthrows SQLException {\n\t\tif (obj != null) {\n\t\t\tstatement.setObject(index, obj);\n\t\t} else {\n\t\t\tstatement.setNull(index, Types.NULL);\n\t\t}\n\t}", "Statement setParameters(Object... params);", "protected abstract void prepareStatementForInsert(PreparedStatement statement, T object)\n throws PersistException;", "public static void setPreparedStatement(Connection conn, String sqlStatement)\n throws SQLException {\n statement = conn.prepareStatement(sqlStatement);\n }", "public void setPreparedStatementType(Class<? extends PreparedStatement> preparedStatementType)\r\n/* 30: */ {\r\n/* 31: 78 */ this.preparedStatementType = preparedStatementType;\r\n/* 32: */ }", "protected abstract void fillInsertStatement (final PreparedStatement statement, final T obj)\n \t\t\tthrows SQLException;", "void setValues(PreparedStatement ps) throws SQLException;", "public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException {\n/* */ try {\n/* 70 */ if (this.wrappedStmt != null) {\n/* 71 */ ((PreparedStatement)this.wrappedStmt).setObject(parameterIndex, x, targetSqlType, scaleOrLength);\n/* */ } else {\n/* 73 */ throw SQLError.createSQLException(\"No operations allowed after statement closed\", \"S1000\", this.exceptionInterceptor);\n/* */ } \n/* 75 */ } catch (SQLException sqlEx) {\n/* 76 */ checkAndFireConnectionError(sqlEx);\n/* */ } \n/* */ }", "@Override\n public void prepare(PreparedStatement statement) {\n }", "@Override\r\n\tpublic void setParameter(PreparedStatement ps, int i, String parameter,\r\n\t\t\tJdbcType jdbcType) throws SQLException {\n\t\t\r\n\t}", "@Override\n\tpublic void setParameter(PreparedStatement ps, int i, String parameter,\n\t\t\tJdbcType jdbcType) throws SQLException {\n\t\t\n\t}", "private void setParameter(PreparedStatement stm, Object[] parameters) {\n\t\ttry {\n\t\t\tfor (int i = 0; i < parameters.length; i++) {\n\t\t\t\tObject parameter = parameters[i];\n\t\t\t\tint index = i + 1;\n\t\t\t\tif (parameter instanceof Long) {\n\t\t\t\t\tstm.setLong(index, (long) parameter);\n\t\t\t\t} else if (parameter instanceof String) {\n\t\t\t\t\tstm.setString(index, (String) parameter);\n\t\t\t\t} else if (parameter instanceof Integer) {\n\t\t\t\t\tstm.setInt(index, (int) parameter);\n\t\t\t\t} else if (parameter instanceof Float) {\n\t\t\t\t\tstm.setFloat(index, (float) parameter);\n\t\t\t\t} else if (parameter instanceof Boolean) {\n\t\t\t\t\tstm.setBoolean(index, (boolean) parameter);\n\t\t\t\t} else if (parameter instanceof Double) {\n\t\t\t\t\tstm.setDouble(index, (double) parameter);\n\t\t\t\t} else if (parameter instanceof Byte) {\n\t\t\t\t\tstm.setByte(index, (byte) parameter);\n\t\t\t\t} else if (parameter instanceof Short) {\n\t\t\t\t\tstm.setShort(index, (short) parameter);\n\t\t\t\t} else if (parameter instanceof Timestamp) {\n\t\t\t\t\tstm.setTimestamp(index, (Timestamp) parameter);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "Statement setParameters(Map<String, Object> params);", "void setObject(int index, Object value) throws SQLException;", "public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException {\n currentPreparedStatement.setObject(parameterIndex, x, targetSqlType, scaleOrLength);\n\n }", "void setStatement(Statement statement);", "void setObject(int index, Object value, int sqlType)\n throws SQLException;", "PreparedStatementEx(PreparedStatement preparedStatement, String sql) {\r\n this.pStmt = preparedStatement;\r\n this.origSql = (null == sql) ? EMPTY_SQL : sql;\r\n }", "@Override\n public void setStatementParameter(PS preparedStatement, int index, DataType dataType, Object value, Dialect dialect) {\n switch (dataType) {\n case UUID:\n if (value != null && dialect.requiresStringUUID(dataType)) {\n value = value.toString();\n }\n break;\n case JSON:\n if (value != null && jsonCodec != null && !value.getClass().equals(String.class)) {\n value = new String(jsonCodec.encode(value), StandardCharsets.UTF_8);\n }\n break;\n case ENTITY:\n if (value != null) {\n RuntimePersistentProperty<Object> idReader = getIdReader(value);\n Object id = idReader.getProperty().get(value);\n if (id == null) {\n throw new DataAccessException(\"Supplied entity is a transient instance: \" + value);\n }\n setStatementParameter(preparedStatement, index, idReader.getDataType(), id, dialect);\n return;\n }\n break;\n default:\n break;\n }\n\n dataType = dialect.getDataType(dataType);\n\n if (QUERY_LOG.isTraceEnabled()) {\n QUERY_LOG.trace(\"Binding parameter at position {} to value {} with data type: {}\", index, value, dataType);\n }\n preparedStatementWriter.setDynamic(\n preparedStatement,\n index,\n dataType,\n value);\n }", "public <E extends Retrievable> void setObject(String sql, E e);", "final public static PreparedStatement createPstmtUpdate(Connection conn, DotProjectObject obj)\n\t{\n\t\tClass<? extends DotProjectObject> clazz = obj.getClass();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tString table = null;\n\t\tField[] beanFields = null;\n\t\tString[] dbFields = null;\n\t\tObject[] dbValuesData = null;\n\t\tObject[] dbValuesRestriction = null;\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\ttable = AnnotationUtil.getAnnotationValue(clazz, DbAnnotations.TABLE_ANNOTATION);\n\t\tsb.append(\"UPDATE \");\n\t\tsb.append(table);\n\t\t\n\t\tbeanFields = AnnotationUtil.getAnnotatedFields(clazz, DbAnnotations.PROPERTY_ANNOTATION);\n\t\tdbFields = new String[beanFields.length];\n\t\tdbValuesData = new Object[beanFields.length];\n\t\tfor (int i = 0; i < beanFields.length; i++) {\n\t\t\t// Identificator fields cannot be changed when updating.\n\t\t\tif (beanFields[i].isAnnotationPresent(DbAnnotations.IDENTIFICATOR_ANNOTATION)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdbFields[i] = AnnotationUtil.getAnnotationValue(beanFields[i], DbAnnotations.PROPERTY_ANNOTATION);\n\t\t\ttry {\n\t\t\t\tdbValuesData[i] = beanFields[i].get(obj);\n\t\t\t\tif (dbValuesData[i] == null) {\n\t\t\t\t\tdbFields[i] = null;\n\t\t\t\t}\n\t\t\t} catch (IllegalAccessException iae) {\n\t\t\t\tdbFields[i] = null;\n\t\t\t\tdbValuesData[i] = null;\n\t\t\t}\n\t\t}\n\t\tdbFields = ArrayUtil.clean(dbFields);\n\t\tdbValuesData = ArrayUtil.clean(dbValuesData);\n\t\t\t\n\t\tsb.append(\" SET \");\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tsb.append(\", \");\n\t\t\t}\n\t\t\tsb.append(dbFields[i]);\n\t\t\tsb.append(\"=?\");\n\t\t}\n\t\t\n\n\t\t// Update restriction on identificator\n\t\tsb.append(\" WHERE \");\n\t\tbeanFields = AnnotationUtil.getAnnotatedFields(clazz, DbAnnotations.IDENTIFICATOR_ANNOTATION);\n\t\tdbFields = new String[beanFields.length];\n\t\tdbValuesRestriction = new Object[beanFields.length];\n\t\tfor (int i = 0; i < beanFields.length; i++) {\n\t\t\tdbFields[i] = AnnotationUtil.getAnnotationValue(beanFields[i], DbAnnotations.PROPERTY_ANNOTATION);\n\t\t\ttry {\n\t\t\t\tdbValuesRestriction[i] = beanFields[i].get(obj);\n\t\t\t} catch (Exception iae) {\n\t\t\t\tdbFields[i] = null;\n\t\t\t\tdbValuesRestriction[i] = null;\n\t\t\t}\n\t\t}\n\t\tdbFields = ArrayUtil.clean(dbFields);\n\t\tdbValuesRestriction = ArrayUtil.clean(dbValuesRestriction);\n\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i != 0) {\n\t\t\t\tsb.append(\" AND \");\n\t\t\t}\n\t\t\tsb.append(dbFields[i]);\n\t\t\tsb.append(\"=?\");\n\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\tint stmtCount = 1;\n\t\ttry {\n\t\t\tstmt = conn.prepareStatement(sb.toString());\n\t\t\tfor (Object o : dbValuesData) {\n\t\t\t\tstmt.setObject(stmtCount, o);\n\t\t\t\tstmtCount++;\n\t\t\t}\n\t\t\tfor (Object o : dbValuesRestriction) {\n\t\t\t\tstmt.setObject(stmtCount, o);\n\t\t\t\tstmtCount++;\n\t\t\t}\n\t\t} catch (SQLException se) {\n\t\t\tstmt = null;\n\t\t}\n\t\t\n\t\treturn stmt;\n\t}", "abstract T setObjectParams(@NotNull ResultSet rs) throws SQLException;", "public void setObject(ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value)\r\n {\r\n if (mmd != null)\r\n {\r\n setObject(ec, ps, exprIndex, value, null, mmd.getAbsoluteFieldNumber());\r\n }\r\n else\r\n {\r\n super.setObject(ec, ps, exprIndex, value);\r\n }\r\n }", "public static boolean populatePreparedStatement(final ILogger aLogger,\r\n final PreparedStatement aStm,\r\n final Object[] aArgs) {\r\n String method= \"populatePreparedStatement\";\r\n if (aStm == null) return false;\r\n try {\r\n for (int i = 0, n = aArgs.length; i < n; i++) {\r\n aStm.setObject(i + 1, aArgs[i]);\r\n }\r\n } catch (Exception e) {\r\n error(aLogger, method, \"Setting prepared statement parameters\", e);\r\n return false;\r\n }\r\n return true;\r\n }", "void setObject(int index, Object value, int sqlType, int scale)\n throws SQLException;", "@OfMethod({\"setObject(java.lang.String,java.lang.Object\",\n \"setObject(int,java.lang.Object\",\n \"setObject(java.lang.String,java.lang.Object,int\",\n \"setObject(int,java.lang.Object,int\",\n \"setObject(java.lang.String,java.lang.Object,int,int\",\n \"setObject(int,java.lang.Object,int,int\"})\n public void testSetObject() throws Exception {\n String parameterName = getParameterName();\n int parameterIndex = getParameterIndex();\n Object x = Integer.valueOf(1);\n int targetSqlType = getParameterType();\n int scale = getParameterScale();\n CallableStatement instance = newClosedCall();\n\n try {\n instance.setObject(parameterName, x);\n fail(\"Allowed set object by parameter name after close\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setObject(parameterIndex, x);\n fail(\"Allowed set object by parameter index after close\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setObject(parameterName, x, targetSqlType);\n fail(\"Allowed set object by parameter name and target sql type after close\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setObject(parameterIndex, x, targetSqlType);\n fail(\"Allowed set object by parameter index and target sql type after close\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setObject(parameterName, x, targetSqlType, scale);\n fail(\"Allowed set object by parameter name, target sql type and scale after close\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n\n try {\n instance.setObject(parameterIndex, x, targetSqlType, scale);\n fail(\"Allowed set object by parameter index, target sql type and scale or length after close\");\n } catch (SQLException ex) {\n checkException(ex);\n }\n }", "public static void convertAndSetParameter(PreparedStatement p, int number, Column column, Object value)\n throws SQLException\n {\n StringFormatter formatter;\n int type;\n Object o;\n\n // Get the column's type.\n\n type = column.getType();\n\n // Set the parameter to null if the value is null.\n\n if (value == null)\n {\n p.setNull(number, type);\n return;\n }\n\n // Convert the object to the correct type.\n\n try\n {\n formatter = column.getFormatter();\n if (value instanceof String)\n {\n o = formatter.parse((String)value, type);\n }\n else\n {\n o = ConvertObject.convertObject(value, type, formatter);\n }\n }\n catch (XMLMiddlewareException e)\n {\n throw new SQLException(\"[XML-DBMS] \" + e.getMessage());\n }\n\n // Call setParameter to actually set the parameter\n\n setParameter(p, number, column, o);\n }", "private void setParameters(final PreparedStatement statement, final Map<Integer, Object> params)\n throws SQLException {\n\n if (params != null) {\n for (Map.Entry<Integer, Object> entry : params.entrySet()) {\n statement.setObject(entry.getKey(), entry.getValue());\n }\n }\n\n }", "public void prepareInsertObject() {\n // Require modify row to prepare.\n if (getModifyRow() == null) {\n return;\n }\n\n if (hasMultipleStatements()) {\n for (Enumeration statementEnum = getSQLStatements().elements();\n statementEnum.hasMoreElements();) {\n ((SQLModifyStatement)statementEnum.nextElement()).setModifyRow(getModifyRow());\n }\n } else if (getSQLStatement() != null) {\n ((SQLModifyStatement)getSQLStatement()).setModifyRow(getModifyRow());\n }\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareInsertObject();\n }", "abstract void setObjectId(@NotNull ResultSet rs, @NotNull T object) throws SQLException;", "@Override\n public void setNonNullParameter(PreparedStatement ps, int i, Watermark parameter, JdbcType jdbcType)\n throws SQLException {\n ps.setString(i, parameter.toString());\n }", "public BindClause(Object object) {\n\t\t\tthis.object = object;\n\t\t}", "public static void setPreparedStatement(Connection conn, String sqlStatement, int returnGeneratedKeys) throws SQLException {\n statement = conn.prepareStatement(sqlStatement);\n }", "public void update(T object) throws SQLException;", "public void setObjectElement(Object paramObject, long paramLong)\n/* */ throws SQLException\n/* */ {\n/* 916 */ if (paramObject == null)\n/* */ {\n/* 918 */ getLazyOracleArray();\n/* */ }\n/* */ \n/* 921 */ resetOracleElement(paramLong);\n/* */ \n/* 923 */ getLazyArray()[((int)paramLong)] = paramObject;\n/* */ }", "private static void prepare(PreparedStatement preparedStatement, ReserveTime reserveTime){\n\t\ttry {\n\t\t\tpreparedStatement.setInt(1, reserveTime.getUnitID());\n\t\t\tpreparedStatement.setInt(2, reserveTime.getDateID());\n\t\t\tpreparedStatement.setInt(3, reserveTime.getMiddayID().getValue());\n\t\t\tpreparedStatement.setObject(4, reserveTime.getStartTime());\n\t\t\tpreparedStatement.setInt(5, reserveTime.getDuration());\n\t\t\tpreparedStatement.setInt(6, reserveTime.getStatus().getValue());\n\t\t\tpreparedStatement.setInt(7, reserveTime.getClientID());\n\t\t\tpreparedStatement.setString(8, reserveTime.getResCodeID());\n\t\t\tpreparedStatement.setObject(9, reserveTime.getReserveTimeGRDateTime());\n\t\t}catch (SQLException e){\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "public interface PreparedStatement extends Statement \n {\n /**\n 59: * This method executes a prepared SQL query and returns its ResultSet.\n 60: *\n 61: * @return The ResultSet of the SQL statement.\n 62: * @exception SQLException If an error occurs.\n 63: */\n ResultSet executeQuery() throws SQLException;\n \n /**\n 67: * This method executes an SQL INSERT, UPDATE or DELETE statement. SQL\n 68: * statements that return nothing such as SQL DDL statements can be executed.\n 69: *\n 70: * @return The result is either the row count for INSERT, UPDATE or DELETE\n 71: * statements; or 0 for SQL statements that return nothing.\n 72: * @exception SQLException If an error occurs.\n 73: */\n int executeUpdate() throws SQLException;\n \n /**\n 7: * This method populates the specified parameter with a SQL NULL value\n 78: * for the specified type.\n 79: *\n 80: * @param index The index of the parameter to set.\n 81: * @param sqlType The SQL type identifier of the parameter from \n 82: * <code>Types</code>\n 83: *\n 84: * @exception SQLException If an error occurs.\n 85: */\n void setNull(int index, int sqlType) throws SQLException;\n \n /**\n : * This method sets the specified parameter from the given Java\n 90: * <code>boolean</code> value.\n 91: *\n 92: * @param index The index of the parameter value to set.\n 93: * @param value The value of the parameter.\n 94: * @exception SQLException If an error occurs.\n 95: */\n void setBoolean(int index, boolean value) throws SQLException;\n \n /**\n : * This method sets the specified parameter from the given Java\n 100: * <code>byte</code> value.\n 101: *\n 102: * @param index The index of the parameter value to set.\n 103: * @param value The value of the parameter.\n 104: * @exception SQLException If an error occurs.\n 105: */\n void setByte(int index, byte value) throws SQLException;\n \n /**\n 109: * This method sets the specified parameter from the given Java\n 110: * <code>short</code> value.\n 111: *\n 112: * @param index The index of the parameter value to set.\n 113: * @param value The value of the parameter.\n 114: * @exception SQLException If an error occurs.\n 115: */\n void setShort(int index, short value) throws SQLException;\n \n /**\n 119: * This method sets the specified parameter from the given Java\n 120: * <code>int</code> value.\n 121: *\n 122: * @param index The index of the parameter value to set.\n 123: * @param value The value of the parameter.\n 124: * @exception SQLException If an error occurs.\n 125: */\n void setInt(int index, int value) throws SQLException;\n \n /**\n 129: * This method sets the specified parameter from the given Java\n 130: * <code>long</code> value.\n 131: *\n 132: * @param index The index of the parameter value to set.\n 133: * @param value The value of the parameter.\n 134: * @exception SQLException If an error occurs.\n 135: */\n void setLong(int index, long value) throws SQLException;\n \n /**\n 139: * This method sets the specified parameter from the given Java\n 140: * <code>float</code> value.\n 141: *\n 142: * @param index The index of the parameter value to set.\n 143: * @param value The value of the parameter.\n 144: * @exception SQLException If an error occurs.\n 145: */\n void setFloat(int index, float value) throws SQLException;\n \n /**\n 149: * This method sets the specified parameter from the given Java\n 150: * <code>double</code> value.\n 151: *\n 152: * @param index The index of the parameter value to set.\n 153: * @param value The value of the parameter.\n 154: * @exception SQLException If an error occurs.\n 155: */\n void setDouble(int index, double value) throws SQLException;\n \n /**\n 159: * This method sets the specified parameter from the given Java\n 160: * <code>java.math.BigDecimal</code> value.\n 161: *\n 162: * @param index The index of the parameter value to set.\n 163: * @param value The value of the parameter.\n 164: * @exception SQLException If an error occurs.\n 165: */\n void setBigDecimal(int index, BigDecimal value) throws\n SQLException;\n \n /**\n 170: * This method sets the specified parameter from the given Java\n 171: * <code>String</code> value.\n 172: *\n 173: * @param index The index of the parameter value to set.\n 174: * @param value The value of the parameter.\n 175: * @exception SQLException If an error occurs.\n 176: */\n void setString(int index, String value) throws SQLException;\n \n /**\n 180: * This method sets the specified parameter from the given Java\n 181: * <code>byte</code> array value.\n 182: *\n 183: * @param index The index of the parameter value to set.\n 184: * @param value The value of the parameter.\n 185: * @exception SQLException If an error occurs.\n 186: */\n void setBytes(int index, byte[] value) throws SQLException;\n \n /**\n 190: * This method sets the specified parameter from the given Java\n 191: * <code>java.sql.Date</code> value.\n 192: *\n 193: * @param index The index of the parameter value to set.\n 194: * @param value The value of the parameter.\n 195: * @exception SQLException If an error occurs.\n 196: */\n void setDate(int index, Date value) throws SQLException;\n \n /**\n 200: * This method sets the specified parameter from the given Java\n 201: * <code>java.sql.Time</code> value.\n 202: *\n 203: * @param index The index of the parameter value to set.\n 204: * @param value The value of the parameter.\n 205: * @exception SQLException If an error occurs.\n 206: */\n void setTime(int index, Time value) throws SQLException;\n \n /**\n 210: * This method sets the specified parameter from the given Java\n 211: * <code>java.sql.Timestamp</code> value.\n 212: *\n 213: * @param index The index of the parameter value to set.\n 214: * @param value The value of the parameter.\n 215: * @exception SQLException If an error occurs.\n 216: */\n void setTimestamp(int index, Timestamp value)\n throws SQLException;\n \n /**\n 221: * This method sets the specified parameter from the given Java\n 222: * ASCII <code>InputStream</code> value.\n 223: *\n 224: * @param index The index of the parameter value to set.\n 225: * @param stream The stream from which the parameter value is read.\n 226: * @param count The number of bytes in the stream.\n 227: * @exception SQLException If an error occurs.\n 228: */\n void setAsciiStream(int index, InputStream stream, int count)\n throws SQLException;\n \n /**\n 233: * This method sets the specified parameter from the given Java\n 234: * Unicode UTF-8 <code>InputStream</code> value.\n 235: *\n 236: * @param index The index of the parameter value to set.\n 237: * @param stream The stream from which the parameter value is read.\n 238: * @param count The number of bytes in the stream.\n 239: * @exception SQLException If an error occurs.\n 240: * @deprecated\n 241: */\n void setUnicodeStream(int index, InputStream stream, int count)\n throws SQLException;\n \n /**\n 246: * This method sets the specified parameter from the given Java\n 247: * binary <code>InputStream</code> value.\n 248: *\n 249: * @param index The index of the parameter value to set.\n 250: * @param stream The stream from which the parameter value is read.\n 251: * @param count The number of bytes in the stream.\n 252: * @exception SQLException If an error occurs.\n 253: */\n void setBinaryStream(int index, InputStream stream, int count)\n throws SQLException;\n \n /**\n 258: * This method clears all of the input parameter that have been\n 259: * set on this statement.\n 260: *\n 261: * @exception SQLException If an error occurs.\n 262: */\n void clearParameters() throws SQLException;\n \n /**\n 266: * This method sets the specified parameter from the given Java\n 267: * <code>Object</code> value. The specified SQL object type will be used.\n 268: *\n 269: * @param index The index of the parameter value to set.\n 270: * @param value The value of the parameter.\n 271: * @param sqlType The SQL type to use for the parameter, from \n 272: * <code>Types</code>\n 273: * @param scale The scale of the value, for numeric values only.\n 274: * @exception SQLException If an error occurs.\n 275: * @see Types\n 276: */\n void setObject(int index, Object value, int sqlType, int scale)\n throws SQLException;\n \n /**\n 281: * This method sets the specified parameter from the given Java\n 282: * <code>Object</code> value. The specified SQL object type will be used.\n 283: *\n 284: * @param index The index of the parameter value to set.\n 285: * @param value The value of the parameter.\n 286: * @param sqlType The SQL type to use for the parameter, from \n 287: * <code>Types</code>\n 288: * @exception SQLException If an error occurs.\n 289: * @see Types\n 290: */\n void setObject(int index, Object value, int sqlType)\n throws SQLException;\n \n /**\n 295: * This method sets the specified parameter from the given Java\n 296: * <code>Object</code> value. The default object type to SQL type mapping\n 297: * will be used.\n 298: *\n 299: * @param index The index of the parameter value to set.\n 300: * @param value The value of the parameter.\n 301: * @exception SQLException If an error occurs.\n 302: */\n void setObject(int index, Object value) throws SQLException;\n \n /**\n 306: * This method executes a prepared SQL query.\n 307: * Some prepared statements return multiple results; the execute method\n 308: * handles these complex statements as well as the simpler form of\n 309: * statements handled by executeQuery and executeUpdate.\n 310: *\n 311: * @return The result of the SQL statement.\n 312: * @exception SQLException If an error occurs.\n 313: */\n boolean execute() throws SQLException;\n \n /**\n 317: * This method adds a set of parameters to the batch for JDBC 2.0.\n 318: * @exception SQLException If an error occurs.\n 319: */\n void addBatch() throws SQLException;\n /**\n 323: * This method sets the specified parameter from the given Java\n 324: * character <code>Reader</code> value.\n 325: *\n 326: * @param index The index of the parameter value to set.\n 327: * @param reader The reader from which the parameter value is read.\n 328: * @param count The number of characters in the stream.\n 329: * @exception SQLException If an error occurs.\n 330: */\n void setCharacterStream(int index, Reader reader, int count)\n throws SQLException;\n \n /**\n 335: * This method sets the specified parameter from the given Java\n 336: * <code>Ref</code> value. The default object type to SQL type mapping\n 337: * will be used.\n 338: *\n 339: * @param index The index of the parameter value to set.\n 340: * @param value The <code>Ref</code> used to set the value of the parameter.\n 341: * @exception SQLException If an error occurs.\n 342: */\n void setRef(int index, Ref value) throws SQLException;\n \n /**\n 346: * This method sets the specified parameter from the given Java\n 347: * <code>Blob</code> value. The default object type to SQL type mapping\n 348: * will be used.\n 349: *\n 350: * @param index The index of the parameter value to set.\n 351: * @param value The <code>Blob</code> used to set the \n 352: * value of the parameter.\n 353: * @exception SQLException If an error occurs.\n 354: */\n void setBlob(int index, Blob value) throws SQLException;\n \n /**\n 358: * This method sets the specified parameter from the given Java\n 359: * <code>Clob</code> value. The default object type to SQL type mapping\n 360: * will be used.\n 361: *\n 362: * @param index The index of the parameter value to set.\n 363: * @param value The <code>Clob</code> used to set the\n 364: * value of the parameter.\n 365: * @exception SQLException If an error occurs.\n 366: */\n void setClob(int index, Clob value) throws SQLException;\n \n /**\n 370: * This method sets the specified parameter from the given Java\n 371: * <code>Array</code> value. The default object type to SQL type mapping\n 372: * will be used.\n 373: *\n 374: * @param index The index of the parameter value to set.\n 375: * @param value The value of the parameter.\n 376: * @exception SQLException If an error occurs.\n 377: */\n void setArray(int index, Array value) throws SQLException;\n \n /**\n 381: * This method returns meta data for the result set from this statement.\n 382: *\n 383: * @return Meta data for the result set from this statement.\n 384: * @exception SQLException If an error occurs.\n 385: */\n ResultSetMetaData getMetaData() throws SQLException;\n \n /**\n 389: * This method sets the specified parameter from the given Java\n 390: * <code>java.sql.Date</code> value.\n 391: *\n 392: * @param index The index of the parameter value to set.\n 393: * @param value The value of the parameter.\n 394: * @param cal The <code>Calendar</code> to use for timezone and locale.\n 395: * @exception SQLException If an error occurs.\n 396: */\n void setDate(int index, Date value, Calendar cal)\n throws SQLException;\n \n /**\n 401: * This method sets the specified parameter from the given Java\n 402: * <code>java.sql.Time</code> value.\n 403: *\n 404: * @param index The index of the parameter value to set.\n 405: * @param value The value of the parameter.\n 406: * @param cal The <code>Calendar</code> to use for timezone and locale.\n 407: * @exception SQLException If an error occurs.\n 408: */\n void setTime(int index, Time value, Calendar cal)\n throws SQLException;\n \n /**\n 413: * This method sets the specified parameter from the given Java\n 414: * <code>java.sql.Timestamp</code> value.\n 415: *\n 416: * @param index The index of the parameter value to set.\n 417: * @param value The value of the parameter.\n 418: * @param cal The <code>Calendar</code> to use for timezone and locale.\n 419: * @exception SQLException If an error occurs.\n 420: */\n void setTimestamp(int index, Timestamp value, Calendar cal)\n throws SQLException;\n \n /**\n 425: * This method populates the specified parameter with a SQL NULL value\n 426: * for the specified type.\n 427: *\n 428: * @param index The index of the parameter to set.\n 429: * @param sqlType The SQL type identifier of the parameter from\n 430: * <code>Types</code>\n 431: * @param typeName The name of the data type, for user defined types.\n 432: * @exception SQLException If an error occurs.\n 433: */\n void setNull(int index, int sqlType, String typeName)\n throws SQLException;\n \n /**\n 438: * This method sets the specified parameter from the given Java\n 439: * <code>java.net.URL</code> value.\n 440: * \n 441: * @param index The index of the parameter to set.\n 442: * @param value The value of the parameter.\n 443: * @exception SQLException If an error occurs.\n 444: * @since 1.4\n 445: */\n void setURL(int index, URL value) throws SQLException;\n \n /**\n 449: * Returns information about the parameters set on this \n 450: * <code>PreparedStatement</code> (see {@link ParameterMetaData} for a\n 451: * detailed description of the provided information).\n 452: * \n 453: * @return Meta data for the parameters of this statement.\n 454: * @see ParameterMetaData\n 455: * @since 1.4\n 456: */\n ParameterMetaData getParameterMetaData() throws SQLException;\n }", "@Override\n protected PreparedStatement getObject() {\n try {\n return this.proxy.prepareStatement(\"SELECT * FROM country\");\n } catch (SQLException sex) {\n throw new UnsupportedOperationException(\"cannot provide object for testing\", sex);\n }\n }", "public void update(PaymentSummary object)\n throws SQLException {\n List params = fromObjectToBean(object).toList();\n params.add(object.getId());\n this.execute(new ParametricStatement[] {\n new ParametricStatement(updateSql, params)\n });\n }", "public void setInto(PreparedStatement ps, int position) throws SQLException, StandardException {\n\n ps.setBytes(position, getBytes());\n }", "void setBlob(PreparedStatement pstmt, Object value, int pos)\r\n throws Exception;", "private void setPreparedStatementParam(PreparedStatement statement,\r\n PropertyDescriptor prop,\r\n Object value,\r\n Field fieldDef,\r\n int index) throws DataLayerException {\r\n try {\r\n if (fieldDef == null)\r\n throw new DataLayerException(\r\n \"Error populating PreparedStatement attributes. FieldDefinition is null.\");\r\n\r\n // Statement param indexes start with 1, not 0.\r\n index++;\r\n\r\n String fieldName = null;\r\n if (prop == null) {\r\n fieldName = fieldDef.getName().toLowerCase();\r\n } else {\r\n fieldName = prop.getName().toLowerCase();\r\n }\r\n String fieldType = fieldDef.getType();\r\n\r\n if (fieldType.equals(\"key\") && value == null) {\r\n // statement.setString(index, \"\");\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType\r\n + \") = '' IGNORED. Should get next PK as part of insert statement.\");\r\n return;\r\n }\r\n\r\n if (value != null)\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = '\" + value.toString()\r\n + \"'\");\r\n else\r\n logCore.debug(\" \" + fieldName + \" (\" + fieldType + \") = null\");\r\n\r\n if (fieldType.equals(\"string\")) {\r\n // value is a String.\r\n if (value != null) {\r\n String temp = FormatUtils.parseString(value.toString(), fieldDef);\r\n\r\n statement.setString(index, temp);\r\n } else\r\n statement.setNull(index, java.sql.Types.VARCHAR);\r\n } else if (fieldType.equals(\"key\")) {\r\n // value is a primary key.\r\n // if (value != null)\r\n // statement.setString(index, value.toString());\r\n // else\r\n // statement.setString(index, \"\");\r\n } else if (fieldType.equals(\"date\")) {\r\n java.util.Date date = null;\r\n\r\n if (value != null) {\r\n if (prop != null) {\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n date = FormatUtils.parseDate(value.toString(), fieldDef);\r\n else if (java.util.Date.class.isAssignableFrom(prop.getPropertyType()))\r\n date = (java.util.Date) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Date or String.\");\r\n } else {\r\n date = FormatUtils.parseDate(value.toString(), fieldDef);\r\n }\r\n statement.setTimestamp(index, new Timestamp(date.getTime()));\r\n } else\r\n statement.setNull(index, java.sql.Types.TIMESTAMP);\r\n } else if (fieldType.equals(\"long\")) {\r\n Long num = null;\r\n\r\n if (value != null) {\r\n if (prop != null) {\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n num = FormatUtils.parseLong(value.toString());\r\n else if (Long.class.isAssignableFrom(prop.getPropertyType()))\r\n num = (Long) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Long or String.\");\r\n } else {\r\n num = FormatUtils.parseLong(value.toString());\r\n }\r\n statement.setLong(index, num.longValue());\r\n } else\r\n statement.setNull(index, java.sql.Types.NUMERIC);\r\n } else if (fieldType.equals(\"int\")) {\r\n Integer num = null;\r\n\r\n if (value != null) {\r\n if (prop != null) {\r\n if (String.class.isAssignableFrom(prop.getPropertyType())) {\r\n if (value.toString().trim().equals(\"\")) {\r\n statement.setNull(index, java.sql.Types.NUMERIC);\r\n } else {\r\n num = FormatUtils.parseInteger(value.toString());\r\n statement.setInt(index, num.intValue());\r\n }\r\n } else if (Integer.class.isAssignableFrom(prop.getPropertyType())) {\r\n num = (Integer) value;\r\n statement.setInt(index, num.intValue());\r\n } else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Integer or String.\");\r\n } else {\r\n if (value.toString().trim().equals(\"\")) {\r\n statement.setNull(index, java.sql.Types.NUMERIC);\r\n } else {\r\n num = FormatUtils.parseInteger(value.toString());\r\n statement.setInt(index, num.intValue());\r\n }\r\n }\r\n } else\r\n statement.setNull(index, java.sql.Types.NUMERIC);\r\n } else if (fieldType.equals(\"boolean\")) {\r\n if (value != null) {\r\n Boolean item = null;\r\n\r\n if (prop != null) {\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n item = FormatUtils.parseBoolean(value.toString(), fieldDef);\r\n else if (Boolean.class.isAssignableFrom(prop.getPropertyType()))\r\n item = (Boolean) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be Boolean or String.\");\r\n } else {\r\n item = FormatUtils.parseBoolean(value.toString(), fieldDef);\r\n }\r\n\r\n if (item.booleanValue())\r\n statement.setString(index, \"Y\");\r\n else\r\n statement.setString(index, \"N\");\r\n } else\r\n statement.setNull(index, java.sql.Types.CHAR);\r\n } else if (fieldType.equals(\"double\") || fieldType.equals(\"float\")) {\r\n if (value != null) {\r\n BigDecimal item = null;\r\n\r\n if (prop != null) {\r\n if (String.class.isAssignableFrom(prop.getPropertyType()))\r\n item = FormatUtils.parseBigDecimal(value.toString(), fieldDef);\r\n else if (BigDecimal.class.isAssignableFrom(prop.getPropertyType()))\r\n item = (BigDecimal) value;\r\n else\r\n throw new DataLayerException(\"Error parsing value for field \" + fieldName\r\n + \". Type expected to be BigDecimal or String.\");\r\n } else {\r\n item = FormatUtils.parseBigDecimal(value.toString(), fieldDef);\r\n }\r\n statement.setBigDecimal(index, item);\r\n } else\r\n statement.setNull(index, java.sql.Types.NUMERIC);\r\n } else {\r\n throw new DataLayerException(\r\n \"Error populating PreparedStatement attributes. Unrecognized data type (\"\r\n + value.getClass() + \") for field \" + fieldDef.getName() + \".\");\r\n }\r\n } catch (DataLayerException e) {\r\n throw e;\r\n } catch (java.lang.Exception e) {\r\n if (value == null)\r\n throw new DataLayerException(\"Error populating PreparedStatement attribute \"\r\n + fieldDef.getName() + \" with value null.\", e);\r\n else\r\n throw new DataLayerException(\"Error populating PreparedStatement attribute \"\r\n + fieldDef.getName() + \" with value \" + value.toString() + \".\", e);\r\n }\r\n }", "@Override\r\n\t\tpublic PreparedStatement prepareStatement(String sql)\r\n\t\t\t\tthrows SQLException {\n\t\t\treturn this.conn.prepareStatement(sql);\r\n\t\t}", "public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {\n currentPreparedStatement.setSQLXML(parameterIndex, xmlObject);\n\n }", "public PreparedStatement newPreparedStatement(String stmt) {\r\n PreparedStatement statement = null;\r\n try {\r\n statement = connection.prepareStatement(stmt);\r\n } catch (SQLException e) {\r\n log.warning(e.getMessage());\r\n }\r\n return statement;\r\n }", "public void prepareUpdateObject() {\n // Require modify row to prepare.\n if (getModifyRow() == null) {\n return;\n }\n\n if (hasMultipleStatements()) {\n for (Enumeration statementEnum = getSQLStatements().elements();\n statementEnum.hasMoreElements();) {\n ((SQLModifyStatement)statementEnum.nextElement()).setModifyRow(getModifyRow());\n }\n } else if (getSQLStatement() != null) {\n ((SQLModifyStatement)getSQLStatement()).setModifyRow(getModifyRow());\n }\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareUpdateObject();\n }", "public void setParameter(PreparedStatement preparedStatement,\n int i, ArrayList<LabelledURI> labelledURIs,\n JdbcType jdbcType) throws SQLException {\n Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation()\n .create();\n\n Type listType = new TypeToken<ArrayList<LabelledURI>>() {}.getType();\n String jsonString = \"\";\n jsonString = gson.toJson(labelledURIs, listType);\n preparedStatement.setString(i, jsonString);\n }", "public void insert(@NotNull T object) {\n Logger logger = getLogger();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getInsert())) {\n\n logger.info(\"Inserting into DB\");\n setStatement(preparedStatement, object);\n logger.info(\"Executing statement: \" + preparedStatement);\n preparedStatement.executeUpdate();\n\n } catch (SQLException | NotEnoughDataException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Insert: success\");\n }", "@Override\n\tpublic void setNonNullParameter(PreparedStatement ps, int i,\n\t Chromosome parameter, JdbcType jdbcType) throws SQLException\n\t{\n\t\tps.setInt(i, parameter.getChr());\n\t}", "public PreparedStatement prepareStatement(String query) {\n \tPreparedStatement ps = null;\n \ttry {\n\t\t\tps = con.prepareStatement(query);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n \treturn ps;\n }", "public PreparedStatement getPreparedStatement(String query) throws SQLException {\n return dbConnection.prepareStatement(query);\n }", "private void setCommonParameters(Product product, PreparedStatement stmt) throws SQLException {\n\t\t// setting the name, first parameter, second parameter and etc.\n\t\tstmt.setInt(1, product.getQuantity());\n\t\tstmt.setString(2, product.getName());\n\t\tstmt.setString(3, product.getDescription());\n\t\tstmt.setDouble(4, product.getPrice());\n\t\tstmt.setDate(5, Date.valueOf(product.getEntryDate()));\n\t\tstmt.setInt(6, product.getCategoryId());\n\t}", "void setClob(PreparedStatement pstmt, Object value, int pos)\r\n throws Exception;", "public T caseParamStatement(ParamStatement object) {\n\t\treturn null;\n\t}", "protected PreparedStatement prepareStmt() throws SQLException {\n if (stmt == null) {\n buildSQL();\n }\n\n return stmt;\n }", "@Override\r\n public void setObject(ExecutionContext ec, PreparedStatement ps, int[] exprIndex, Object value, DNStateManager ownerSM, int fieldNumber)\r\n {\r\n ApiAdapter api = ec.getApiAdapter();\r\n if (api.isPersistable(value))\r\n {\r\n // Assign a StateManager to the serialised object if none present\r\n DNStateManager embSM = ec.findStateManager(value);\r\n if (embSM == null || api.getExecutionContext(value) == null)\r\n {\r\n embSM = ec.getNucleusContext().getStateManagerFactory().newForEmbedded(ec, value, false, ownerSM, fieldNumber, PersistableObjectType.EMBEDDED_PC);\r\n }\r\n }\r\n\r\n DNStateManager sm = null;\r\n if (api.isPersistable(value))\r\n {\r\n // Find SM for serialised PC object\r\n sm = ec.findStateManager(value);\r\n }\r\n\r\n if (sm != null)\r\n {\r\n sm.setStoringPC();\r\n }\r\n getColumnMapping(0).setObject(ps, exprIndex[0], value);\r\n if (sm != null)\r\n {\r\n sm.unsetStoringPC();\r\n }\r\n }", "NetPreparedStatement(ClientPreparedStatement statement,\n NetAgent netAgent,\n NetConnection netConnection) {\n super(statement, netAgent, netConnection);\n initNetPreparedStatement(statement);\n }", "public static void setParameter(PreparedStatement p, int number, Column column, Object value)\n throws SQLException\n {\n byte[] b;\n InputStream stream;\n int type;\n\n type = column.getType();\n\n if (value == null)\n {\n p.setNull(number, type);\n return;\n }\n\n try\n {\n switch (type)\n {\n case Types.BIT:\n p.setBoolean(number, ((Boolean)value).booleanValue());\n break;\n\n case Types.TINYINT:\n p.setByte(number, ((Byte)value).byteValue());\n break;\n\n case Types.SMALLINT:\n p.setShort(number, ((Short)value).shortValue());\n break;\n\n case Types.INTEGER:\n p.setInt(number, ((Integer)value).intValue());\n break;\n\n case Types.BIGINT:\n p.setLong(number, ((Long)value).longValue());\n break;\n\n case Types.REAL:\n p.setFloat(number, ((Float)value).floatValue());\n break;\n\n case Types.FLOAT:\n case Types.DOUBLE:\n p.setDouble(number, ((Double)value).doubleValue());\n break;\n\n case Types.DECIMAL:\n case Types.NUMERIC:\n p.setBigDecimal(number, (BigDecimal)value);\n break;\n\n case Types.CHAR:\n case Types.VARCHAR:\n p.setString(number, (String)value);\n break;\n\n case Types.LONGVARCHAR:\n // First try to pass the value as Unicode. If this fails,\n // assume it is because setUnicodeStream() is not supported.\n // Next, try calling setAsciiStream(). If this also fails,\n // then return the exception.\n try\n {\n b = ((String)value).getBytes(\"UTF-16\");\n stream = new ByteArrayInputStream(b);\n p.setUnicodeStream(number, stream, b.length);\n }\n catch (Exception e)\n {\n try\n {\n b = ((String)value).getBytes(\"US-ASCII\");\n stream = new ByteArrayInputStream(b);\n p.setAsciiStream(number, stream, b.length);\n }\n catch (UnsupportedEncodingException u)\n {\n throw new SQLException(\"[XML-DBMS] \" + u.getMessage());\n }\n }\n break;\n\n case Types.BINARY:\n case Types.VARBINARY:\n b = ((ByteArray)value).getBytes();\n p.setBytes(number, b);\n break;\n\n case Types.LONGVARBINARY:\n b = ((ByteArray)value).getBytes();\n stream = new ByteArrayInputStream(b);\n p.setBinaryStream(number, stream, b.length);\n break;\n\n case Types.DATE:\n p.setDate(number, (java.sql.Date)value);\n break;\n\n case Types.TIME:\n p.setTime(number, (Time)value);\n break;\n\n case Types.TIMESTAMP:\n p.setTimestamp(number, (Timestamp)value);\n break;\n\n default:\n String name = JDBCTypes.getName(type);\n if (name == null)\n {\n name = Integer.toString(type);\n }\n throw new SQLException(\"Unsupported JDBC Type: \" + name);\n \n }\n }\n catch (ClassCastException c)\n {\n // If the value is not the expected type, then try to convert it to the\n // correct type. Note that convertAndSetParameter calls back into this\n // method. However, an infinite loop cannot occur because either (a)\n // convertAndSetParameter fails the conversion and an exception is thrown,\n // or (b) convertAndSetParameter succeeds in the conversion and this clause\n // is not reached again.\n\n convertAndSetParameter(p, number, column, value);\n }\n }", "final public static PreparedStatement createPstmtInsert(Connection conn, DotProjectObject obj)\n\t{\n\t\tClass<? extends DotProjectObject> clazz = obj.getClass();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tString table = null;\n\t\tField[] beanFields = null;\n\t\tString[] dbFields = null;\n\t\tObject[] dbValues = null;\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\ttable = AnnotationUtil.getAnnotationValue(clazz, DbAnnotations.TABLE_ANNOTATION);\n\t\tsb.append(\"INSERT INTO \");\n\t\tsb.append(table);\n\t\t\n\t\tbeanFields = AnnotationUtil.getAnnotatedFields(clazz, DbAnnotations.PROPERTY_ANNOTATION);\n\t\tdbFields = new String[beanFields.length];\n\t\tdbValues = new Object[beanFields.length];\n\t\tfor (int i = 0; i < beanFields.length; i++) {\n\t\t\t// Identificator fields are automatically set by the database.\n\t\t\tif (beanFields[i].isAnnotationPresent(DbAnnotations.IDENTIFICATOR_ANNOTATION)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdbFields[i] = AnnotationUtil.getAnnotationValue(beanFields[i], DbAnnotations.PROPERTY_ANNOTATION);\n\t\t\ttry {\n\t\t\t\tdbValues[i] = beanFields[i].get(obj);\n\t\t\t\tif (dbValues[i] == null) {\n\t\t\t\t\tdbFields[i] = null;\n\t\t\t\t\tdbValues[i] = null;\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (Exception iae) {\n\t\t\t\tdbFields[i] = null;\n\t\t\t\tdbValues[i] = null;\n\t\t\t}\n\t\t}\n\t\tdbFields = ArrayUtil.clean(dbFields);\n\t\tdbValues = ArrayUtil.clean(dbValues);\n\t\t\t\n\t\tsb.append(\" (\");\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tsb.append(\", \");\n\t\t\t}\n\t\t\tsb.append(dbFields[i]);\n\t\t}\n\t\t\n\t\tsb.append(\") values (\");\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tsb.append(\", \");\n\t\t\t}\n\t\t\tsb.append(\"?\");\n\t\t}\n\t\tsb.append(\")\");\n\n\t\ttry {\n\t\t\tstmt = conn.prepareStatement(sb.toString());\n\t\t\tfor (int i = 1; i <= dbValues.length; i++) {\n\t\t\t\tstmt.setObject(i, dbValues[i - 1]);\n\t\t\t}\n\t\t} catch (SQLException se) {\n\t\t\tstmt = null;\n\t\t}\n\t\t\n\t\treturn stmt;\n\t}", "void setParameter(String name, Object value);", "void setObjectValue(Object dataObject);", "private synchronized PreparedStatement createPreparedStatement(String query,Queue<Object> parameters) throws SQLException {\r\n\t\tPreparedStatement statement = DBConnection.prepareStatement(query);\r\n\r\n\t\tfor(int parameterNum = 1;!parameters.isEmpty();parameterNum++)\r\n\t\t{\r\n\t\t\tObject parameter = parameters.poll();\r\n\t\t\tif (parameter instanceof String) {\r\n\t\t\t\tstatement.setString(parameterNum,(String)parameter);\r\n\t\t\t}\r\n\t\t\telse if (parameter instanceof Integer) {\r\n\t\t\t\tstatement.setInt(parameterNum,((Integer)parameter).intValue());\r\n\t\t\t}\r\n\t\t\telse if (parameter instanceof Boolean){\r\n\t\t\t\tstatement.setBoolean(parameterNum, ((Boolean)parameter).booleanValue());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn statement;\r\n\t}", "public void setNull (JaqyPreparedStatement stmt, int column, ParameterInfo paramInfo) throws Exception;", "void setValue(Object object, Object value);", "public void setInt(int parameterIndex, int x) throws SQLException {\n currentPreparedStatement.setInt(parameterIndex, x);\n\n }", "public void setParameterFromObject(final Object o)\n throws ObjectFactoryException {\n super.setParameterFromObject(o);\n final DecimalFormat format = (DecimalFormat) o;\n setParameter(\"localizedPattern\", format.toLocalizedPattern());\n setParameter(\"pattern\", format.toPattern());\n }", "@Override\r\n public PreparedStatement prepareStatement(DatabaseQueryBuilder query) throws SQLException {\r\n final PreparedStatement ps = super.prepareStatement(query);\r\n ps.setQueryTimeout(OracleERPUtil.ORACLE_TIMEOUT);\r\n return ps;\r\n }", "public void setObject(ResponseConfigParamObject theObject) throws ExceptionObjectNotFound, ExceptionAccessDeny {\n\t\t\n\t\tsetObject(theObject.getName(), theObject.getValue());\n\t}", "public void setValue(PreparedStatement ps, int paramIndex) throws SQLException {\n Connection conn = ps.getConnection();\n switch (inputType) {\n case STRING:\n xmlValue = XMLType.createXML(conn, value);\n break;\n case STREAM:\n xmlValue = XMLType.createXML(conn, stream);\n break;\n case DOCUMENT:\n xmlValue = XMLType.createXML(conn, doc);\n break;\n }\n ps.setObject(paramIndex, xmlValue, OracleTypes.OPAQUE);\n }", "public void setValues(PreparedStatement ps, int i) throws SQLException {\n String id = items.get(i).getTransactionId();\n ps.setString(1, id);\n\t\t\t\t}", "public void bindParameter(Object o, int index){\n parameters.add(new Parameter(o, index));\n }", "protected void bind(PreparedStatement preparedStatement, ParameterBinding[] bindings)\n throws SQLException, Exception {\n // bind parameters\n if (bindings.length > 0) {\n int len = bindings.length;\n for (int i = 0; i < len; i++) {\n adapter.bindParameter(\n preparedStatement,\n bindings[i].getValue(),\n i + 1,\n bindings[i].getJdbcType(),\n bindings[i].getPrecision());\n }\n }\n }", "@Override\n\tpublic void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {\n\t\t\n\t}", "public PreparedStatement prepare (String sqlString, ArrayList<String> stringValues){\n connect();\n \n PreparedStatement ps = null;\n //ResultSet rs = null;\n \n try{\n ps = conn.prepareStatement(sqlString);\n \n System.out.println(\"Prepared statement before bind variables set: \\n\\t\" + ps.toString());\n \n for (int i=0; i<stringValues.size(); i++){\n ps.setString(i+1, stringValues.get(i));\n }\n \n System.out.println(\"Prepared statement after bind variables set: \\n\\t\" + ps.toString());\n\n //rs = ps.executeQuery();\n //ps.execute();\n }catch (SQLException sqle){\n System.out.println(\"Exception: \" + sqle);\n }\n \n return ps;\n }", "public void populatePreparedStatementValues(Object bean,\r\n PreparedStatement statement,\r\n String mappingFile) throws DataLayerException {\r\n try {\r\n OrderedMap mapping = driver.loadMapping(mappingFile);\r\n\r\n populatePreparedStatementValues(bean, statement, mapping);\r\n } catch (DataLayerException ex) {\r\n throw ex;\r\n } catch (java.lang.Exception e) {\r\n throw new DataLayerException(\"Error populating PreparedStatement attributes.\", e);\r\n }\r\n }", "public static PreparedStatement prepare(Connection conn, String statement)\n throws SQLException\n {\n return conn.prepareStatement(statement);\n }", "public void update(PreparedStatement preparedStatement) throws SQLException\n {\n preparedStatement.executeUpdate();\n }", "public void setObject(T object)\n\t{\n\t\tthis.object = object;\n\t}", "public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {\n currentPreparedStatement.setTimestamp(parameterIndex, x);\n }", "public void prepare() {\n if ((!hasMultipleStatements()) && (getSQLStatement() == null)) {\n throw QueryException.sqlStatementNotSetProperly(getQuery());\n }\n\n // Cannot call super yet as the call is not built.\n }", "public void insert(PaymentSummary object)\n throws SQLException {\n object.doSetId(this.getNextChelseaId());\n this.execute(new ParametricStatement[] {\n new ParametricStatement(insertSql, fromObjectToBean(object).toList())\n });\n }", "NetPreparedStatement(NetAgent netAgent,\n NetConnection netConnection,\n String sql,\n Section section,ClientPooledConnection cpc) \n throws SqlException {\n this(ClientAutoloadedDriver.getFactory().newPreparedStatement(netAgent,\n netConnection, sql, section,cpc),\n netAgent,\n netConnection);\n }", "public void setParameter(String paramName, Object value, Query query) {\r\n\t\tif (hasParameter(paramName)) {\r\n\t\t\tquery.setParameter(paramName, value);\r\n\t\t}\r\n\t}", "public PreparedStatement getPreparedStatement() {\r\n return this.pStmt;\r\n }", "protected void setParameter(Query query, String hqlParamName, Object parameterValue) throws Exception\r\n {\r\n //ClassLoader cl = MainFrame.getMainInstance().getReportClassLoader();\r\n \r\n if (parameterValue == null)\r\n {\r\n query.setParameter( getLiteral( hqlParamName ), parameterValue);\r\n return;\r\n }\r\n \r\n query.setParameter(hqlParamName, parameterValue);\r\n }", "public void setObject(Object aObject) {\r\n\t\tthis.object = aObject;\r\n\t}", "public PreparedStatement prepare(String str, Connection connection) throws SQLException {\n if (this.generatedResultReader == null) {\n return connection.prepareStatement(str, 2);\n }\n if (this.configuration.getPlatform().supportsGeneratedColumnsInPrepareStatement()) {\n return connection.prepareStatement(str, this.generatedResultReader.generatedColumns());\n }\n return connection.prepareStatement(str, 1);\n }", "@Override\n\tpublic void setValues(Factura factura, PreparedStatement ps) throws SQLException {\n\t\tps.setInt(1, factura.getNumero());\n\t\tps.setString(2, factura.getConcepto());\n\t\tps.setDouble(3, factura.getImporte());\n\t\t\n\t}", "public SQLPreparedStatement getPreparedSQLStatement(String SQLInnerClassName) throws Exception\r\n\t{\r\n\t\treturn(SQLPreparedStatement) getSQLClass(SQLInnerClassName);\r\n\t}", "public void setNull(PreparedStatement st, int index) throws HibernateException, SQLException {\n st.setCharacterStream(index, null, 0);\n }" ]
[ "0.7424171", "0.7045261", "0.6885201", "0.6832335", "0.6810908", "0.65914977", "0.65428853", "0.6529504", "0.64459115", "0.64341563", "0.6427276", "0.6336439", "0.632415", "0.62950057", "0.6265869", "0.6168813", "0.61371684", "0.6127193", "0.60981405", "0.60863376", "0.60614604", "0.60160935", "0.59197426", "0.5898132", "0.5854631", "0.5849576", "0.58425117", "0.5826554", "0.57834077", "0.57791466", "0.5766488", "0.5737578", "0.56739616", "0.56481606", "0.5634034", "0.5621297", "0.56074655", "0.56037515", "0.55959255", "0.55739987", "0.5485743", "0.54739803", "0.5440807", "0.543933", "0.54162186", "0.5395373", "0.53889185", "0.5382621", "0.5380135", "0.5375896", "0.5359113", "0.53538215", "0.53511614", "0.53348416", "0.53330064", "0.53287005", "0.5322039", "0.5302355", "0.530131", "0.52779275", "0.52715576", "0.52471507", "0.52443343", "0.522015", "0.5193818", "0.518897", "0.51835686", "0.5162297", "0.5159391", "0.51467305", "0.5126098", "0.51081634", "0.5074895", "0.5073349", "0.50630575", "0.50597036", "0.5055605", "0.5044617", "0.5040028", "0.5021458", "0.5018792", "0.5016152", "0.5015546", "0.50007254", "0.50003505", "0.49993482", "0.49988475", "0.49897298", "0.49708137", "0.49691132", "0.49638936", "0.4963777", "0.49635723", "0.49627116", "0.4956699", "0.49558848", "0.4953", "0.4951547", "0.49425474", "0.493768" ]
0.6251765
15
TODO Autogenerated method stub
@Override public void isMatched(Point p) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
FROM TRACKER (VIEW OBSERVER)
@Override public void notifyOnFrameChange(final int frame, final Vector2D derivative, final Vector2D path) { Platform.runLater(() -> { // When it's the first frame it reset the canvas. if (frame == 0) { this.clearCanvasAndChart(); } // fill the chart with data this.getxSeries().getData().add(new XYChart.Data<Number, Number>(frame, (int) derivative.getX())); this.getySeries().getData().add(new XYChart.Data<Number, Number>(frame, (int) derivative.getY())); // Draw oval on canvas this.getLiveContext().fillOval(-path.getX() + this.getLiveCanvas().getWidth() / 2, path.getY() + this.getLiveCanvas().getHeight() / 2, 10, 10); // Move the progress bar this.progressBar.setProgress(frame / (this.gestureLength.getFrameNumber() + 0.0)); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Track(){\n\t}", "void track();", "void startTracking();", "TrackInfo() {\n // no-op\n }", "private void showViewToursActivity() {\n//\t\tIntent intent = new intent(this, ActivityViewTours.class);\n System.out.println(\"Not Yet Implemented\");\n }", "public interface TrackingView extends BaseView{\n\n\n}", "public HTSViewInfo() {\n super(\"HTS View\", new AppVersion(15),\n \"Copyright (C) 2014-${year} Antony Holmes\",\n new HTSViewIcon(),\n \"View read track data at multiple resolutions.\");\n }", "@Override\n\tpublic trackerDTO view(String tracker_idx) throws Exception {\n\t\treturn sqlSession.selectOne(\"tracker.view_190916\",tracker_idx);\n\t}", "public void viewPerfHistory(View view) {\n \tPerformanceResults history = new PerformanceResults(PerfMeasure.imei);\n \talertbox(\"Performance History\", history.printList(history.getHistory()));\n }", "public int GetCurrentTrack();", "void track(String sender, String additionalInfo);", "public TrackDescriptor getTrackDescriptor();", "com.google.wireless.android.sdk.stats.FilterMetadata.View getActiveView();", "protected void viewLapTimes(View view) {\n //Checks if a lap exists for the current recording\n if (!mySession.getLaptimesAsString().equals(\"\")) {\n //Stops timer when stop session button is clicked\n t.stop();\n mGoogleApiClient.disconnect();\n //Adds the new session to the database\n addNewSession();\n cancelRecordingNotification();\n //takes user to laplist\n Context context = this;\n Class destinationClass = LapListActivity.class;\n Intent intentToStartDetailActivity = new Intent(context, destinationClass);\n startActivity(intentToStartDetailActivity);\n } else {\n //Brings user to sessionListActivity and returns a toast to say no laps were recorded\n //and nothing has been saved to the database\n returnToSessionList();\n cancelRecordingNotification();\n\n Toast toast = Toast.makeText(this, \"Session not saved - No laps recorded\", Toast.LENGTH_LONG);\n toast.show();\n }\n }", "@Override\n\tpublic void data() {\n\t\tSystem.out.println(\"browsing through vodaphone\");\n\t\t\n\t}", "private void viewEvents() {\n ReferenceFrame frame = selectFrame(\"What frame would you like to view the events from?\");\n List<Event> transformedEvents = new ArrayList<>();\n for (Event event: world.getEvents()) {\n transformedEvents.add(event.lorentzTransform(frame));\n }\n for (Event event: transformedEvents) {\n System.out.println(event.getName() + \" occurs at t = \" + event.getTime() + \" and x = \" + event.getX());\n }\n }", "Object getViewDetails();", "public HtShowDetailedLog() {\n\t}", "protected boolean trackable() {\n return Boolean.TRUE;\n }", "public void emitChangeView() {\n \n int view = getCurrentViewNumber();\n Object lpid = getLocalServerID();\n \n JDSUtility.debug(\"[emitChangeView()] s\" + lpid + \", at time \" + getClockValue() + \", is going to emit a change view message for (v + 1 = \" + (view + 1) + \")\");\n\n /* the replica makes sure that no timer is currently working. If the view change was trigged by a suspect of failure of the primary then probably it's \n been already true. */\n revokeSendBatch();\n revokeViewChange();\n\n /* an exponetial timeout has to be considered to guarantee liveness when the end-to-end delay is too long (it's prevent uncessary view-changes)*/\n PBFTTimeoutDetector ttask = (PBFTTimeoutDetector) getViewTimer().getTask();\n long timeout = (Long) ttask.get(\"TIMEOUT\");\n ttask.put(\"TIMEOUT\", 2 * timeout);\n\n /* the replica moves to the next view. After that, this replica isn't accepting any message from view v < v+1. */\n setCurrentViewNumber(view +1);\n \n /* clean-up the sets P (prepare set) and Q (pre-prepare set)*/\n preprepareset.clear();\n prepareset.clear();\n\n long lcwm = getLCWM();\n long hcwm = getHCWM();\n\n /* compute Q (pre-prepare set) and P (prepare set) */\n for(long seqn = lcwm + 1; seqn <=hcwm; seqn++){\n /*If I have a prepare then its digests will be added to pre-prepared and prepared sets */\n PBFTPrepare pr = getPrepareInfo().get(lpid, seqn);\n if(pr != null){\n PBFTPrePrepare pp = new PBFTPrePrepare(view, pr.getSequenceNumber(), null);\n pp.getDigests().addAll(pr.getDigests());\n preprepareset.add(pp);\n \n prepareset.add(new PBFTPrepare(pp, null));\n\n for(String digest: pp.getDigests()){\n getRequestInfo().assign(digest, RequestState.WAITING);\n getRequestInfo().assign(digest, (Long)null);\n }\n\n continue;\n }\n\n /*If I have a pre-prepare then its digests will be added to pre-prepared set*/\n PBFTPrePrepare ppr = getPrePrepareInfo().get(seqn);\n if(ppr != null){\n PBFTPrePrepare pp = new PBFTPrePrepare(view, ppr.getSequenceNumber(), null);\n pp.getDigests().addAll(ppr.getDigests());\n preprepareset.add(pp);\n \n for(String digest: pp.getDigests()){\n getRequestInfo().assign(digest, RequestState.WAITING);\n getRequestInfo().assign(digest, (Long)null);\n }\n } \n }\n\n \n try{\n doRollback();\n }catch(Exception e){\n e.printStackTrace();\n }\n\n /* update the controls for sequence number execution */\n getStateLog().setNextPrePrepareSEQ(lcwm + 1);\n getStateLog().setNextExecuteSEQ (lcwm + 1);\n\n PBFTChangeView cv = createChangeViewMessage();\n \n try {\n /* gets the root of the checkpoint partition tree */\n PartEntry centry = rStateManager.getPart(0, 0);\n\n /* adds the pair (last stable sequence number and state digest) to compose checkpoint set C */\n if(centry != null){\n cv.addCheckpoint(centry.getPartCheckpoint(), centry.getDigest());\n }else{\n cv.addCheckpoint(lcwm, \"\");\n }\n } catch (Exception ex) {\n Logger.getLogger(PBFTServer.class.getName()).log(Level.SEVERE, null, ex);\n cv.getCheckpointSet().clear();\n cv.addCheckpoint(lcwm, \"\");\n }\n\n /* add the pre-prepare set to current change-view message*/\n cv.getPrePrepareSet().clear();\n cv.getPrePrepareSet().addAll(preprepareset);\n\n /* add the prepare set to current change-view message*/\n cv.getPrepareSet().clear();\n cv.getPrepareSet().addAll(prepareset);\n\n /*emit the change view message to group of replicas */\n emit(cv, getLocalGroup().minus(getLocalProcess()));\n\n getChangeViewInfo().setMinimumViewNumber(view);\n getChangeViewInfo().put(cv);\n\n if(isPrimary()){\n getNewViewConstructor().addChangeView(cv);\n }else{\n finalizeNewViewConstructor();\n }\n\n getChangeViewInfo().gc(view);\n getChangeViewACKInfo().gc(view);\n getNewViewConstructor().gc(view);\n getNewViewInfo().gc(view);\n getPrePrepareInfo().gc(view);\n getPrepareInfo().gc(view);\n getPrePreparebackupInfo().gc(view);\n getCommitInfo().gc(view);\n\n\n emitChangeViewACK();\n\n\n uncertanty = true; \n }", "public String getTrackNumber (){\n return trackNumber;\n }", "public TrackResponse() {\n\t\tsuper();\n\t}", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,sound_cache);\r\n\t\t\t\t\t\t\t\t\t\t}", "@Override\n public void track() {\n tracker.update(\n driveEncoder.getCount(),\n getTurnAngle(turnEncoder.getCount())\n );\n }", "public Track(){\n\t\tthis.trk = trackGenerator();\n\n\t}", "private void actionViewSamplesON ()\r\n\t{\r\n\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\tif (tableSize != 0)\r\n\t\t{\r\n\t\t\tisDisplaySamples = true;\r\n\r\n\t\t\thelperDisplayDetectedSamples();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES_ON );\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_OFF);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View original image\");\r\n\t\t}\r\n\t}", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,gst.resultFile);\r\n\t\t\t\t\t\t\t\t\t\t}", "public String getTracking() {\n\t\t\treturn tracking;\n\t\t}", "private void viewPendingRequests() {\n\n\t}", "public String getTrackUrl() {\n return trackUrl;\n }", "public void startViewTripActivity() {\r\n\t\t\r\n\t\t// TODO - fill in here\r\n Intent intent = new Intent(this,TripHistoryActivity.class);\r\n startActivity(intent);\r\n\t}", "private TrackBehaviour() {}", "@Override\n\tpublic void view() {\n\t\t\n\t}", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }", "void playTrack(HttpServletRequest requestContext, LatLongDTO latLong, Long id);", "@Override\r\n\tpublic void onTrafficStatusUpdate() {\n\r\n\t}", "public void updateTrackDetails() {\n if (mTracks != null && !mTracks.isEmpty()) {\n Track track = mTracks.get(mPlayingIndex);\n if (track != null) {\n mArtistName.setText(track.getArtistName());\n mAlbumName.setText(track.getAlbumName());\n Picasso.with(getActivity()).load(track.getThumbnailImageUrl())\n .into(mAlbumArtWork);\n mTrackName.setText(track.getTrackName());\n mTrackDuration.setText(Utilities.getFormatedTime(30000));\n mNowPlaying = \"#NowPlaying \" + track.getTrackUrl();\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(createShareNowPlayingIntent());\n }\n }\n }\n }", "@Override\n public void onTrafficStatusUpdate() {\n\n }", "private static void ClientObserver() {\n NewsAgency agency = new NewsAgency();\n\n // il canale televisivo le osserva, rilancia\n agency.addObserver( new NewsChannel( \"rai1\") );\n agency.addObserver( new NewsChannel( \"rai2\") );\n\n agency.setNews( \"30 e lode a tutti\" );\n agency.setNews( \"Data test\" );\n }", "@Override\n\tpublic void listMostPlayed(View view) \n\t{\n\t\tIntent intent = new Intent(this, PlayerRatingPlayerListView.class);\n\t\tintent.putExtra(MainActivity.EXTRA_STATS_TYPE, new MostPlayedListViewAdapter() );\n\t\tthis.startActivity(intent);\n\t}", "@Override\r\n public void onTrackLimitationNotice(int arg0) {\n\r\n }", "public void viewLogs() {\n\t}", "public TrackCoach() {\n\n\t}", "public void mo68520e() {\n super.mo68520e();\n C26780aa.m87959a(this.itemView, mo75290r(), this.f77546j);\n C24942al.m81837c(mo75261ab(), this.f89221bo);\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"otherclick\").mo65283e(\"video\").mo65270a(mo75261ab());\n }", "public void tracking_Report()\n {\n\t boolean trackingpresent =trackingreport.size()>0;\n\t if(trackingpresent)\n\t {\n\t\t //System.out.println(\"Tracking report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Tracking report is not present\");\n\t }\n }", "public void sendAnalyze(View view) throws Exception {\n\n //Intent to the next view\n Intent submitAnalyze = new Intent(this, NotificationActivity.class);\n startActivity(submitAnalyze);\n\n }", "public String getPreViewUrl();", "private void getTradeDetail() {\n\t\t\tsendData(\"<get></get>\");\n\t}", "@Override\r\n //TODO add button for location control \r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState); \r\n \r\n //TODO still hav action VIEW instead of get_rtsp\r\n Log.i(TAG, getIntent().getAction());\r\n if (this.getIntent().getAction().equalsIgnoreCase(ACTION_GET_RTSP) ){\r\n \tLog.i(TAG, \"hav sku : d : ex \" +this.getIntent().getData() +\" \" +this.getIntent().getStringExtra(\"sku\"));\r\n }\r\n //TODO start the player 'audioTrack' to accept bytesBuffr on predicted codec\r\n \r\n RTSPDialog _dial = new RTSPDialog();\r\n\t\tRTSPClient client = new RTSPClient();\r\n\t\tclient.setTransport(new PlainTCP());\r\n\t\tclient.setClientListener(_dial);\r\n\t\ttry {\r\n\t\t\tclient.describe(new URI(_dial.TARGET_URI));\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 (URISyntaxException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\t_dial.resourceList = Collections.synchronizedList(new LinkedList<String>());\r\n\t\t// port is advertised in reply from setup?? why demand 2000\r\n\t\t//port = 2000;\r\n\t\t_dial.port = 49060;\r\n \r\n\r\n \r\n }", "public void startTripViewer() {\n\n\t\t// TODO - fill in here\n\t\tviewTripButton.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent viewTripIntent = new Intent(MainActivity.this,\n\t\t\t\t\t\tTripHistoryActivity.class);\n\t\t\t\tstartActivity(viewTripIntent);\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tprotected String getView() {\n\t\treturn SOTGView.CONTECT_VIEW;\n\t}", "void setTrack(String track) {\r\n this.track = track;\r\n }", "View getShowReportGraphView();", "public void Overview(View view){\n Intent intent=new Intent(this,Activity_Log.class);\n startActivity(intent);\n }", "fintech.HistoryResponse.Data getData();", "public interface Viewer {\n\n int getCurrentView();\n\n}", "public void showBreach();", "public Track getTrack() {\n\n return track;\n }", "@Override\n\tpublic void onTrafficStatusUpdate() {\n\n\t}", "public void autoDetails() {\n\t\t\r\n\t}", "@Override\n public void created(Bundle savedInstance) {\n activity = getActivity();\n //final File methodTracingFile = new File(activity.getExternalFilesDir(\"Caches\"), \"AppStart.trace\");\n //Log.d(TAG, \"methodTracingPath=\" + methodTracingFile.getPath());\n //Debug.startMethodTracing(methodTracingFile.getPath());\n PlayerApp.getRefWatcher(activity).watch(this);\n attachView = this.view;\n\n mMovieFragModel = new MovieFragModel();\n initListener();\n pagerHeader = (ViewPager) getActivity().findViewById(R.id.frag_pagerHeader);\n\n homepage_recommendview_title = (TextView) getActivity().findViewById(R.id.homepage_recommendview_title);\n ci = (CircleIndicator) getActivity().findViewById(R.id.frag_ci);\n initMovieView();\n\n\n\n }", "public LinkedList<Line> getTrack();", "public void trackReferral() {\n track(\"_referral\");\n }", "public boolean getIsTrack(){\n return isTrack;\n }", "private void inIt() {\n\t\t\t\t\t\n\t\t\t\t\tLV_MoView = (ListView)findViewById(R.id.LV_Movie);\n\t\t\t\t\tTV_All = (TextView)findViewById(R.id.TV_All);\n\t\t\t\t\tTV_Collect = (TextView)findViewById(R.id.TV_Collect);\n\t\t\t\t\tTV_History = (TextView)findViewById(R.id.TV_History);\t\n\t\t\t\t}", "public void onPlaybackInfoClicked(View view) {\n Intent playbackIntent = getIntent(this, PlaybackActivity.class);\n this.startActivity(playbackIntent);\n }", "public boolean isAutoTrackable() {\n return true;\n }", "private void getViewReferences() {\n now_playing_album_cover = findViewById(R.id.now_playing_album_cover);\n now_playing_progress_bar = findViewById(R.id.now_playing_progress_bar);\n now_playing_song_current_length = findViewById(R.id.now_playing_song_current_length);\n now_playing_song_total_length = findViewById(R.id.now_playing_song_total_length);\n now_playing_song_title = findViewById(R.id.now_playing_song_title);\n now_playing_artist_name = findViewById(R.id.now_playing_artist_name);\n now_playing_album_title = findViewById(R.id.now_playing_album_title);\n now_playing_previous_button = findViewById(R.id.now_playing_previous_button);\n now_playing_play_button = findViewById(R.id.now_playing_play_button);\n now_playing_next_button = findViewById(R.id.now_playing_next_button);\n }", "public float getTracking() {\n return tracking;\n }", "private void sendReports()\n {\n int modeState = 0;\n if(currentTentativetrack!=null){\n modeState = 3;\n }\n if(currentTrack!=null){\n modeState = 2;\n }\n if(autoPanningMode){\n modeState = 1;\n }\n\n\n double myTrackDistance = currentTrack!=null ? Spherical.getRhumbDistance(controllingCamera.getSensorPosition(), currentTrack.getPosition()) : 0;\n String trackId = currentTrack != null ? ((TrackDetection) currentTrack).getSimulatedTrackId() : \"0\";\n\n Reports.getInstance().sendAgentMode(simulationDuration, getObjectId(), modeState, trackId, myTrackDistance, controllingCamera.getLookingAtPoint());\n }", "public HashMap<String, String> getTracking() {\n return _tracking;\n }", "@Override\n\t\t\t\tpublic void show(LinphoneCore lc) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic void show(LinphoneCore lc) {\n\t\t\n\t}", "public abstract void mo2152a(View view);", "public String getViewText() {\n \t\treturn \"featured-partner-view_text_t\";\n \t}", "List<Player> getViewers();", "private void DisplayTrack(String sSouce, String dDestiny)\n {\n\n try {\n //when google map installed\n // intialize url\n Uri uri = Uri.parse(\"https://www.google.co.in/maps/dir/\" +sSouce + \"/\" +dDestiny);\n\n //Intialize intent with action view\n\n Intent intent = new Intent(Intent.ACTION_VIEW,uri);\n // set pkg\n intent.setPackage(\"com.google.android.apps.maps\");\n\n // set flag\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n }catch (ActivityNotFoundException e)\n {\n // when google map is not install\n // set uri\n Uri uri = Uri.parse(\"https://play.google.com/store/apps/details?id=com.google.android.apps.maps\");\n // intialize intent with action view\n Intent intent = new Intent(Intent.ACTION_VIEW,uri);\n // set flag\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // start acivity\n startActivity(intent);\n\n }\n\n\n }", "private void sendCurrentTrackingMessage(CommandEvent event) {\n long guildId = event.getGuild().getIdLong();\n long channelId = event.getChannel().getIdLong();\n List<TrackChannel> tracks = this.trackChannelRepository.findAllOf(guildId, channelId);\n if (tracks == null) {\n event.replyError(\"Something went wrong while retrieving data...\");\n return;\n }\n\n if (tracks.size() == 0) {\n event.reply(\"You do not seem to have any tracking enabled in this channel yet. \" +\n \"See help with `track help` for more.\");\n return;\n }\n\n List<String> ret = new ArrayList<>();\n CustomDateFormat customDateFormat = this.dateFormatRepository.getDateFormat(event);\n CustomTimeZone customTimeZone = this.timeZoneRepository.getTimeZone(event);\n DateFormat dateFormat = customDateFormat.getDateFormat().getSecondFormat();\n dateFormat.setTimeZone(customTimeZone.getTimeZoneInstance());\n\n ret.add(\"**List of enabled tracking for this channel**\");\n ret.add(String.format(\"You have %s tracking(s) enabled for this channel.\", tracks.size()));\n ret.add(\"\");\n\n for (TrackChannel track : tracks) {\n ret.add(String.format(\"`%s` : Expires at `%s` (%s)\",\n track.getDisplayName(),\n dateFormat.format(track.getExpiresAt()),\n customTimeZone.getFormattedTime()\n ));\n }\n\n event.reply(String.join(\"\\n\", ret));\n }", "public ObjectTracker(){\n NetworkTableInstance inst = NetworkTableInstance.getDefault(); \n monsterVision = inst.getTable(\"MonsterVison\");\t\n \n // monsterVision.addEntryListener(\n // \"ObjectTracker\",\n // (monsterVision, key, entry, value, flags) -> {\n // System.out.println(\"ObjectTracker changed value: \" + value.getValue());\n // }, \n // EntryListenerFlags.kNew | EntryListenerFlags.kUpdate);\n\n \n }", "@Override\n public void makeVisible(Player viewer) {\n \n }", "public void viewWaveDetails(){\n\t\ttry{\n\t\t\tdriver.switchTo().defaultContent();\n\t\t\tList<WebElement> listOfFrames = libManhattanCommonFunctions.getElementsByProperty(\"//iframe[contains(@id,'ext-gen')]\",\"XPATH\");\n\t\t\tdriver.switchTo().frame(listOfFrames.get(listOfFrames.size() - 1));\n\t\t\tThread.sleep(4000);\n\t\t\tWebElement wbWavesCheckbox = driver.findElement(By.id(\"checkAll_c0_dataForm:listView:dataTable\"));\n\t\t\twbWavesCheckbox.click();\n\t\t\tlibManhattanCommonFunctions.clickAnyElement(getPageElement(\"BtnView\"), \"ViewButton\");\n\t\t\tlibManhattanCommonFunctions.waitForElementClickable(\"//*[@name='statisticsTab']\", 12000);\n\t\t}catch(Exception e){\n\t\t\treport.updateTestLog(\"WavesPage Page\", \"Element Not Found\", Status.FAIL);\n\t\t} \n\t}", "@Override\r\n\tpublic List<String> downloadPendingTracking() {\n\t\treturn trackEventsRepository.fetchPendingArticleIDs();\r\n\t}", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public void visitRemoteOrderDisplay( DevCat devCat ) {}", "public void reestablecerInfo(){\n panelIngresoControlador.getPanelIngreso().reestablecerInfo();\n }", "public void botaohistory(View v) {\n startActivity(new Intent(this, com.example.appstore.history.class));\n }", "private void mo71772t() {\n this.f74253i.mo60157b(R.id.ebb, new VideoPostTimeWidget());\n }", "protected void mo5608a() {\n super.mo5608a();\n if (getVideoView() != null) {\n getVideoView().getEventBus().m5029a(this.f5897d, this.f5895b, this.f5896c);\n }\n }", "private void doGetSobotInfo() {\n showProgress(\"\");\n RetrofitApiFactory.createApi(MineApi.class)\n .doGetSobotInfo(0, null, null)\n .compose(RxSchedulers.compose())\n .compose((this).bindUntilEvent(ActivityEvent.DESTROY))\n .subscribe(new FastObserver<BaseData<SobotSystemEntity>>(this) {\n\n @Override\n public void onSuccess(BaseData<SobotSystemEntity> data) {\n SobotApiUtils.getInstance().toCustomServicePage(getContext(), UserInfoCache.get(), null, data.getData());\n }\n });\n }", "private void showShareView() {\n Timber.d(\"showShareView\");\n }", "public void trackNewSession() {\n if(isTelemetryEnabled()){\n new CreateDataTask(CreateDataTask.DataType.NEW_SESSION).execute();\n }\n }", "public static void viewAlarms(){\r\n\t\t\r\n\t}", "StableView view();", "@Override\r\n public void onSChanged(int l, int t, int oldl, int oldt) {\n float webcontent = webView_movie_detail.getContentHeight() * webView_movie_detail.getScale();//webview的高度\r\n float webnow = webView_movie_detail.getHeight() + webView_movie_detail.getScrollY();//当前webview的高度\r\n if (webView_movie_detail.getContentHeight() * webView_movie_detail.getScale() - (webView_movie_detail.getHeight() + webView_movie_detail.getScrollY()) <= 250) {\r\n\r\n //已经处于底端\r\n linear_movieDetail.setVisibility(View.VISIBLE);\r\n\r\n } else {\r\n linear_movieDetail.setVisibility(View.GONE);\r\n }\r\n//已经处于顶端\r\n Log.d(\"height\", \"=================>\" + webView_movie_detail.getScrollY());\r\n if (webView_movie_detail.getScrollY() <= 100) {\r\n linear_top_movieDetail.setVisibility(View.VISIBLE);\r\n } else {\r\n linear_top_movieDetail.setVisibility(View.GONE);\r\n }\r\n }", "@Override\r\n\tpublic void voar() {\n\t\t\r\n\t}", "public String getTrackingName() {\n return this.trackingName;\n }", "@Override\n\t\tpublic void viewAccepted(View joiner) {\n\t\t}", "@Override\n public void onResume() {\n super.onResume();\n\n mTracker.setScreenName(TAG);\n mTracker.send(new HitBuilders.ScreenViewBuilder().build());\n }", "@Override\n public void onArrivedWayPoint(int arg0) {\n\n }", "public Hamburg(){\n trackDepartureHolder = TrackHolder.getTrackHolder(8);\n trackArrivalHolder = TrackHolder.getTrackHolder(10);\n scratchTrack = new TrackList<>();\n }", "public void mo71540w() {\n boolean z;\n VideoItemParams requestId = VideoItemParams.newBuilder().setFragment(this.f73947d).setAweme(this.f73950g).setAwemeFromPage(this.f73953m).setEventType(this.f73944a).setMyProfile(this.f73946c).setPageType(this.f73954n).setEnterMethodValue(this.f74254j).setRequestId(this.f73952l);\n if (this.f74252h != null) {\n this.f74252h.mo60134a(\"video_params\", (Object) requestId);\n }\n mo71773u();\n User author = this.f73950g.getAuthor();\n if (author != null) {\n this.mTitleView.setText(this.f73949f.getString(R.string.b5s, new Object[]{author.getNickname()}));\n this.mTitleView.getPaint().setFakeBoldText(true);\n } else {\n this.mTitleView.setText(\"\");\n }\n if (this.f73950g == null || this.f73950g.isCanPlay()) {\n this.mTitleView.setVisibility(0);\n } else {\n this.mTitleView.setVisibility(4);\n }\n this.tagLayout.setEventType(this.f73944a);\n List videoLabels = this.f73950g.getVideoLabels();\n m91744a(videoLabels);\n if (!RelationLabelHelper.hasDuoShanLabel(this.f73950g)) {\n if (C6319n.m19594a(this.f73944a, \"homepage_hot\")) {\n this.tagLayout.mo61051c(this.f73950g, videoLabels, new C23440a(7, 20));\n } else {\n this.tagLayout.mo61050b(this.f73950g, videoLabels, new C23440a(7, 20));\n }\n }\n if (TextUtils.isEmpty(this.f73950g.getExtra()) || !C6399b.m19928c()) {\n this.mTxtExtra.setVisibility(8);\n } else {\n this.mTxtExtra.setText(this.f73950g.getExtra());\n this.mTxtExtra.setVisibility(0);\n }\n if (this.f73950g.getUserDigg() == 1) {\n z = true;\n } else {\n z = false;\n }\n mo71770a(z);\n if (this.f73953m == 1) {\n mo71533d(m91740N());\n }\n AwemeStatus status = this.f73950g.getStatus();\n if (status == null) {\n this.mAwemeInCheckLayout.setVisibility(8);\n } else if (status.isInReviewing()) {\n this.mAwemeInCheckLayout.setVisibility(0);\n } else {\n this.mAwemeInCheckLayout.setVisibility(8);\n }\n }" ]
[ "0.6613438", "0.6097393", "0.6003608", "0.599355", "0.59517086", "0.58270204", "0.5731493", "0.5666491", "0.56537485", "0.55834675", "0.5578059", "0.55293685", "0.55251616", "0.55229235", "0.5520946", "0.55028045", "0.5448235", "0.54470146", "0.5405564", "0.53991205", "0.5383661", "0.5381932", "0.5355598", "0.53527147", "0.5352186", "0.53482234", "0.5344898", "0.53354865", "0.5333075", "0.53223205", "0.5308768", "0.5299959", "0.52907825", "0.52751875", "0.52722776", "0.52618", "0.5251018", "0.52449846", "0.52254325", "0.52152854", "0.520083", "0.5184912", "0.5179663", "0.517182", "0.5171456", "0.51686597", "0.516443", "0.5163516", "0.51625395", "0.51460356", "0.51454115", "0.514115", "0.51388985", "0.51384133", "0.5131466", "0.5129957", "0.5128338", "0.5107773", "0.5105919", "0.51048094", "0.5102654", "0.5099102", "0.5086792", "0.5080001", "0.5076676", "0.5076335", "0.506482", "0.5060604", "0.50595266", "0.5049323", "0.5048959", "0.5046779", "0.504582", "0.50421864", "0.50349367", "0.50330013", "0.5032738", "0.50246036", "0.5023804", "0.50236666", "0.5015707", "0.5015428", "0.5014259", "0.5011178", "0.50096554", "0.5004064", "0.5003873", "0.50026166", "0.50018686", "0.49993825", "0.4997613", "0.49895394", "0.4988216", "0.49830312", "0.49803293", "0.49789312", "0.4978266", "0.49782643", "0.4976902", "0.49752954", "0.49723798" ]
0.0
-1
When a gesture is ready
@Override public void notifyOnFeatureVectorEvent() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean onGestureCompleted(int gestureId);", "boolean onGestureStarted();", "public void onCompletedGesture(SimpleOpenNI curContext,int gestureType, PVector pos)\n{\n println(\"onCompletedGesture - gestureType: \" + gestureType + \", pos: \" + pos);\n \n int handId = kinect.startTrackingHand(pos);\n println(\"hand stracked: \" + handId);\n}", "public void onGestureFinish() {\n this.mFsGestureDemoTitleView.notifyFinish();\n this.mDemoActivityView.setVisibility(8);\n finishGestureBack();\n }", "public void onMoveGestureStarted()\n\t{\n\t\tfireEvent(TiC.EVENT_MOVE_START, null);\n\t}", "public interface GestureListener {\n\t/**\n\t * Invoked when the {@link Gesture} has just started (i.e. it passed from state POSSIBLE_DETECTION to state IN_PROGRESS).\n\t * This callback is invoked only for live gestures.\n\t * @param gesture The data associated to the gesture\n\t */\n\tpublic void onGestureStarted(GestureData gesture);\n\t/**\n\t * Invoked on each frame while the {@link Gesture} is in state IN_PROGRESS.\n\t * This callback is invoked only for live gestures.\n\t * @param gesture The data associated to the gesture\n\t */\n\tpublic void onGestureInProgress(GestureData gesture);\n\t/**\n\t * Invoked when the {@link Gesture} has completed (i.e. it passed from state IN_PROGESS to state COMPLETED).\n\t * This callback is always invoked (i.e. both on live and non-live gestures).\n\t * @param gesture The data associated to the gesture\n\t */\n\tpublic void onGestureCompleted(GestureData gesture);\n}", "private void scrollerFinished()\n\t{\n\t\tif (!mFingerDown)\n\t\t{\n\t\t\treadjustScrollToMiddleItem();\n\t\t}\n\t\t\n\t}", "public void onLoadComplete(){\n\t\tif (listener != null){\n\t\t\thandler.post(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlistener.onLoadComplete();\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "void onActive(GestureMetaData metaData);", "@Override\n public void onChanged(SgestureHand.Info info) {\n handleGesture(info);\n }", "@Override\n\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\tgestures = new GestureDetector(new fakeGestureListener());\n\t\t}", "void onHandWaveGesture();", "private void onMovementComplete() {\n Callable<Boolean> movementCompleted;\n Consumer<Method> movementFailed;\n\n synchronized (_mutex) {\n movementCompleted = _movementCompleted;\n movementFailed = _movementFailed;\n\n _movementCompleted = null;\n _movementFailed = null;\n }\n\n boolean bMovementCompleted = false;\n if (movementCompleted != null) {\n try {\n bMovementCompleted = movementCompleted.call();\n } catch (Exception e) {\n _log.error(\"An error occurred while completing a movement.\", e);\n }\n }\n\n if (!bMovementCompleted && movementFailed != null) {\n movementFailed.accept(null);\n }\n }", "private void onSwipeRight() {\n\t\tcurrentGestureDetected = \"direita\";\r\n\t\t\r\n\t}", "void addGestureHandler(GestureEventListener listener);", "public void notifyFinish() {\n setBackground(getResources().getDrawable(R.drawable.fs_gesture_finish_bg, (Resources.Theme) null));\n this.mTitleView.setVisibility(4);\n this.mSummaryView.setTranslationY(this.mSummaryView.getTranslationX() - 15.0f);\n this.mSummaryView.setText(R.string.fs_gesture_finish);\n this.mSkipView.setVisibility(8);\n }", "@Override\n public void onGestureRecognized(final String gestureName) {\n Platform.runLater(() -> {\n ViewUtilities.showSnackBar((Pane) this.recorderPane.getCenter(), gestureName, Duration.MEDIUM,\n DimDialogs.MEDIUM, null);\n });\n }", "public void onMoveGestureEnded()\n\t{\n\t\tfireEvent(TiC.EVENT_MOVE_END, null);\n\t}", "public interface GestureHandler {\r\n /**\r\n * It will be called when a specific gesture triggered.\r\n * You can implement the handler logic in this method. Such as , launch a application.\r\n * @param metaData GestureMetaData\r\n */\r\n void onActive(GestureMetaData metaData);\r\n\r\n /**\r\n * It will be called when the user release the finger in HOVER mode.\r\n * In this function you can release resource. Wait for the next called.\r\n */\r\n void onExit();\r\n\r\n /**\r\n * Return the gestureType if onActive is triggered. Otherwise return -1;\r\n * @return gestureType\r\n */\r\n int isActive();\r\n\r\n /**\r\n * Settings\r\n * @return\r\n */\r\n List<GestureHandlerSetting> settings();\r\n\r\n String name();\r\n\r\n int icon();\r\n\r\n}", "public void finish() {\n/* 187 */ this.mTouchEventSubject.onComplete();\n/* */ }", "private void onFullyLoaded() {\n info(\"onFullyLoaded()\");\n cancelProgress();\n\n //Fully loaded, start detection.\n ZiapApplication.getInstance().startDetection();\n\n Intent intent = new Intent(LoadingActivity.this, MainActivity.class);\n if (getIntent().getStringExtra(\"testname\") != null)\n intent.putExtra(\"testname\", getIntent().getStringExtra(\"testname\"));\n startActivity(intent);\n finish();\n }", "private void handleAutomatonEnded() {\n Platform.runLater(() -> {\n canvas.scheduleUpdate();\n goEndState();\n alertAutomatonEnded();\n });\n }", "@Override\r\n\t\t\tpublic void recognizerStarted() {\n\r\n\t\t\t}", "@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 }", "void imReady();", "public void onDragEnded();", "public abstract void ready();", "@Override\r\n\t\t\tpublic void onReadyChange(boolean ready) {\n\r\n\t\t\t}", "public boolean ready() {\n diff = eventTime - System.currentTimeMillis(); //Step 4,5\n return System.currentTimeMillis() >= eventTime;\n }", "public void setReady() {\n this.isReady = true;\n }", "void onGestureFinished(PwdGestureView view, boolean right);", "public void onFingerDown(String idSensor) // evento que se genera al colocar un dedo en el lector\n{\n}", "@Override\n\tpublic void eventFinished() {\n\t\tstatus=EventCompleted;\n\t}", "@Override\n public void onSure() {\n\n }", "public void onScanViewReady() {\n\t\tupdateGuiState();\n\n\t\tif (!mInitialised) {\n\t\t\t// Broadcast receiver\n\t\t\tregisterReceiver(mReceiver, mFilter);\n\n\t\t\tif (mBtAdapter.isEnabled()) {\n\t\t\t\t// Start straight away\n\t\t\t\tstartBluetoothLeService();\n\t\t\t} else {\n\t\t\t\t// Request BT adapter to be turned on\n\t\t\t\tIntent enableIntent = new Intent(\n\t\t\t\t\t\tBluetoothAdapter.ACTION_REQUEST_ENABLE);\n\t\t\t\tstartActivityForResult(enableIntent, REQ_ENABLE_BT);\n\t\t\t}\n\t\t\tmInitialised = true;\n\t\t} else {\n\t\t\t// mScanView.notifyDataSetChanged();\n\t\t}\n\t}", "public void gameComplete() {\n if (soundToggle == true) {\n gameComplete.start();\n } // if\n }", "void onHoldPerformed();", "protected void onPress(){\n pressed = true;\n for(Runnable action : onPress) action.run();\n }", "public interface GestureRecorderListener {\n\n void onGestureRecorded(List<float[]> values);\n\n IBinder getBinder();\n\n void startClassification(String defaultGesture);\n}", "public interface HandWaveGestureListener {\n\n /**\n * Invoked when a hand wave gesture is detected.\n */\n void onHandWaveGesture();\n}", "@Override\n public void onReadyForSpeech(Bundle arg0) {\n Log.i(\"SRL\", \"onReadyForSpeech\");\n }", "public void respondToGesture(String gesture) {\n String gest = gesture.substring(1, gesture.length() - 1);\n sysMsgTextView.setText(\"Gesture:\" + gest);\n\n // load model\n float[] leftInit;\n float[] rightInit;\n float[] finalpos;\n if (gest.equals(\"Nodding\")){\n ModelRenderable.builder()\n .setSource(this, R.raw.export_71)\n .build()\n .thenAccept(renderable -> model = renderable)\n .exceptionally(\n throwable -> {\n Toast toast =\n Toast.makeText(this, \"Unable to load andy renderable\", Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n return null;\n });\n finalpos = new float[]{0, 0, -2f};\n leftInit = new float[]{-0.5f, 0, -2f};\n rightInit = new float[]{0.3f, 0, -2f};\n } else {\n ModelRenderable.builder()\n .setSource(this, R.raw.thumbsup)\n .build()\n .thenAccept(renderable -> model = renderable)\n .exceptionally(\n throwable -> {\n Toast toast =\n Toast.makeText(this, \"Unable to load andy renderable\", Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n return null;\n });\n finalpos = new float[]{0, 0, -6f};\n leftInit = new float[]{-1.5f, 0, -6f};\n rightInit = new float[]{1f, 0, -6f};\n }\n\n float[] rotation = {0, 0, 0, 0};\n\n // get current frame and translate the initial coordinate to the current frame\n session = fragment.getArSceneView().getSession();\n try {\n frame = session.update();\n } catch (CameraNotAvailableException e) {\n e.printStackTrace();\n }\n Pose pose = frame.getAndroidSensorPose();\n if(targetScreenArea == \"LEFT\"){\n finalpos = pose.rotateVector(leftInit);\n } else if(targetScreenArea == \"RIGHT\"){\n finalpos = pose.rotateVector(rightInit);\n } else {\n finalpos = pose.rotateVector(finalpos);\n }\n\n Anchor anchor = session.createAnchor(new Pose(finalpos, rotation));\n anchorNode = new AnchorNode(anchor);\n anchorNode.setParent(fragment.getArSceneView().getScene());\n TransformableNode transformableNode = new TransformableNode(fragment.getTransformationSystem());\n transformableNode.setParent(anchorNode);\n fragment.getArSceneView().getScene().addChild(anchorNode);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n transformableNode.setRenderable(model);\n transformableNode.select();\n }\n }, 1000);\n\n }", "public void onInitializeComplete() {\n }", "public boolean onDragStarted();", "void onGestureStarted(PwdGestureView view);", "public boolean ready();", "@Override\n public boolean isReady() {\n return true;\n }", "@Override\n public boolean isReady() {\n return true;\n }", "@Override\n public void onSure() {\n\n }", "@Override\r\n\tpublic void onScreenSlidingCompleted() {\n\r\n\t}", "void isReady();", "void isReady();", "public void onSwipeStarted(View v);", "@Override\r\n public boolean onGenericMotionEvent(MotionEvent event) {\r\n if(loading) {\r\n //open up the general menu\r\n setContentView(menuCards.get(0).getView());\r\n loading = false;\r\n return true;\r\n }\r\n else{\r\n if (mGestureDetector != null) {\r\n return mGestureDetector.onMotionEvent(event);\r\n }\r\n return false;\r\n }\r\n }", "public void onScreenUp() {\n faceUp = true;\n requestForValidationOfQibla();\n }", "@Override\n public boolean isReady() {\n return isFinished();\n }", "private void updateReady(List touchEvents) {\n\n if (touchEvents.size() > 0)\n state = GameState.Running;\n }", "@Override\n public void onFlingStarted() {\n Timber.d(\"A fling just started\");\n\n }", "public void beginPress();", "public void onLoadComplete() {\n\t\t\r\n\t}", "@Override\n public void onSequenceFinish() {\n // Yay\n mShowingTour = false;\n mPresenter.showCaseFinished();\n }", "@Override\n public void onArrivedWayPoint(int arg0) {\n\n }", "private void initListener() {\n initPieceListener();\n initButtonsListener();\n }", "@Override\r\n\tpublic void completeScene() {\n\t\t\r\n\t}", "void onListeningFinished();", "void onSystemReady();", "private void initListener() {\n }", "public void onFingerUp(String idSensor) // evento que se genera al levantar el dedo del lector\n{\n objpantprincipal.repintarp();\n if (conectado == true)\n identificarPersona();\n}", "private void initEvent() {\n\t\tmScrollView.setOnTouchListener(new OnTouchListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tswitch (event.getAction()) {\n\t\t\t\t/*case MotionEvent.ACTION_UP:\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MotionEvent.ACTION_DOWN:\n\n\t\t\t\t\tbreak;*/\n\t\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\t\t//判断是否滑动到底部\n\t\t\t\t\tif(mScrollView.getChildAt(0).getMeasuredHeight()<=mScrollView.getHeight()+mScrollView.getScrollY()){\n\t\t\t\t\t\tToast.makeText(getActivity(), \"已经到底部了,去留下你的足迹吧\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t}", "@Override\r\n\tpublic void onArrivedWayPoint(int arg0) {\n\r\n\t}", "public void mo42329d() {\n this.f36205a.onComplete();\n }", "@Override\n public final void onActivation() {\n eventManager.addListener(strokeConfigListener);\n eventBus.addSubscriber(regenerateShapeSubscriber);\n }", "public GestureClass getGestureClass(){\r\n return gestureClass;\r\n }", "@Override\n\t\tpublic boolean onResourceReady(GlideDrawable arg0, T arg1,\n\t\t\t\tTarget<GlideDrawable> arg2, boolean arg3, boolean arg4) {\n\t\t\treturn false;\n\t\t}", "void addCompletedEventListener(IGameStateListener listener);", "public void landFromLatch() {\n }", "@Override\n public boolean onDown(MotionEvent event) {\n boolean retValue = false;\n //Log.d(TAG, \"Action onDown \" + MotionEvent.actionToString(event.getActionMasked()) + \" PC \" + event.getPointerCount());\n\n // Reset thee previous scroll event.\n PickNavigateController.this.oPointCoordinate.set(event.getX(), event.getY());\n PickNavigateController.this.oPreviousScrollEventPosition = null;\n\n if(event.getPointerCount() == 1) {\n PickNavigateController.this.pick(event); // Pick the object(s) at the tap location\n } else {\n Log.e(TAG, \"This should NEVER happen Action onDown clear pick list\");\n PickNavigateController.this.oFeaturePickList.clear();\n PickNavigateController.this.isDragging = false;\n PickNavigateController.this.dragDownEvent = null;\n }\n\n return retValue; // By not consuming this event, we allow it to pass on to the navigation gesture handlers\n }", "public void onCompletion();", "private void initializeEvents() {\r\n\t}", "public void AfterPicking() {\r\n\t EventDispatcher.dispatchEvent(this, \"AfterPicking\");\r\n\t }", "void onSuccessfulStarted();", "public abstract void onInit();", "public void invokeCompletionListener() {\n if (completionListener == null) return;\n completionListener.onCompletion( player );\n }", "public interface SimpleGestureListener {\n void onSwipe(int direction);\n\n void onDoubleTap();\n}", "public interface SimpleGestureListener {\n\n void onSwipe(int direction);\n void onDoubleTap();\n}", "@Override\n\t\t\tpublic void loop() throws ConnectionLostException,\n\t\t\t\t\tInterruptedException {\n\t\t\t\t\n\t\t\t\tif (showChecked) {\n\t\t\t\t\trunDemo();\n\t\t\t\t\t// thread.sleep ?\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// initial position\n\t\t\t\t// high = true, low = false\n\t\t\t\t// read pedal position\n\t\t\t\tboolean pedalInHighPosition = pedalButton.read();\n\t\t\t\tif (lastKnownPedalPosition == pedalInHighPosition) {\n\t\t\t\t\t// no change from last time, wait a little, than continue\n\t\t\t\t\tThread.sleep(20);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// save current status of the pedal\n\t\t\t\tlastKnownPedalPosition = pedalInHighPosition;\n\t\t\t\t\n\t\t\t\tif (!pedalInHighPosition) {\n\t\t\t\t\tLOG.debug(\"Pedal is pressed\");\n\t\t\t\t\tif (preferences.getPedalMode() == RoboTarPreferences.PRESS_AND_RELEASE) {\n\t\t\t\t\t\t// no action\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// do action, PRESS_AND_HOLD\n\t\t\t\t\tsendChord2RoboTar();\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tLOG.debug(\"Pedal is released\");\n\t\t\t\t\t\n\t\t\t\t\t// turn off led\n\t\t\t\t\tstateLedOff = true;\n\t\t\t\t\tstateLED.write(stateLedOff);\n\t\t\t\t\t\n\t\t\t\t\t// reset servos - in both cases\n\t\t\t\t\tresetAll();\n\t\t\t\t\t\n\t\t\t\t\tif (preferences.getPedalMode() == RoboTarPreferences.PRESS_AND_RELEASE) {\n\t\t\t\t\t\t// do action\n\t\t\t\t\t\tsendChord2RoboTar();\n\t\t\t\t\t}\n\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}", "@Override\n public void onReady(ReadyEvent event) {\n\n }", "@Override\n\tpublic void onArrivedWayPoint(int arg0) {\n\n\t}", "public void onInitHandler() {\n }", "public void onFinished();", "public void onReadyButton(View view) {\n mUser.setState(User.UserState.DoneWithNight);\n\n // NOTE!!!!!!!!!!!!!!!!!!\n // When ever the User updates,\n // Because of our event up above,\n // A check goes to see if everyone is ready.\n // If everyone is ready, then it moves to the next Lobby!\n // I hope.\n mRoom.updateUser(mUser);\n Intent intent = new Intent(this, DayMain.class);\n intent.putExtra(\"Client_Data\", mUser);\n intent.putExtra(\"Room_Data\", mRoom);\n Log.v(TAG, \"Starting day for the Villager \");\n startActivity(intent);\n\n }", "public void finishCapturing() {\n //YOUR CODE HERE\n\t pieceCaptured = false;\n\t \n }", "public void onJokeLoaded(String joke) {\n Log.d(TAG, \"onJokeLoaded: The Joke loaded.\");\n this.mJoke = joke;\n if (mTimerFinished) findViewById(R.id.continue_button).setClickable(true);\n }", "@Override\n public void initialize() {\n System.out.print(\"shooter out starting\");\n isDone = false;\n shooter.shooterRaise();\n shooter.shooterMotorShootOut();\n hopper.hopperShootOut();\n }", "public void initListener() {\n }", "public void setReady() {\n\t\tfadein = fadeout = false;\n\t\tfadeValue = 1;\n\t\tloadingDone();\n\t}", "public void onLooperPrepared() {\n super.onLooperPrepared();\n FrameConsumer.this.f41223d = new Handler(getLooper(), FrameConsumer.this);\n if (!FrameConsumer.this.f41225f) {\n FrameConsumer.this.m57235e();\n }\n }", "private void onScrollerFinished(Scroller scroller) {\n\t\tif (scroller == mFlingScroller) {\n\t\t\tif (!ensureScrollWheelAdjusted()) {\n\t\t\t\tupdateInputTextView();\n\t\t\t}\n\t\t\t// onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);\n\t\t} else {\n\t\t\t// if (mScrollState != OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {\n\t\t\tupdateInputTextView();\n\t\t\t// }\n\t\t}\n\t}", "public int getNumberOfGestures();", "@Override\n\t\tpublic void onUnityAdsReady(String arg0) {\n\n\t\t}", "@Override\n public boolean onTouchEvent(MotionEvent event)\n {\n return gestureDetector.onTouchEvent(event);\n }" ]
[ "0.73510426", "0.7269433", "0.67152494", "0.6345927", "0.6073634", "0.5949043", "0.5895422", "0.5887777", "0.5868539", "0.5819206", "0.58137536", "0.57661724", "0.57410306", "0.57199526", "0.57018775", "0.56985986", "0.56901765", "0.56511277", "0.563107", "0.5623785", "0.55879164", "0.55662376", "0.55654544", "0.5556231", "0.55553085", "0.5540382", "0.5524452", "0.54920423", "0.5470722", "0.54536206", "0.5438775", "0.5437028", "0.54244435", "0.54151577", "0.5407954", "0.5393075", "0.53827435", "0.53805393", "0.53734654", "0.5373412", "0.5355516", "0.5349195", "0.53458405", "0.5337509", "0.5333833", "0.5332628", "0.532743", "0.5320142", "0.5316226", "0.5310889", "0.5310661", "0.5310661", "0.527263", "0.52687484", "0.5258763", "0.52531195", "0.5252402", "0.525046", "0.52428305", "0.5230888", "0.5227874", "0.5222567", "0.52223945", "0.5221249", "0.5212615", "0.5208473", "0.5206589", "0.52061194", "0.5198779", "0.51975477", "0.519021", "0.51888263", "0.5181904", "0.51759636", "0.5173672", "0.5167765", "0.51642746", "0.5156628", "0.5152413", "0.5144164", "0.51441437", "0.5135495", "0.513202", "0.51231533", "0.51142967", "0.510645", "0.51048464", "0.5104459", "0.51031494", "0.51012653", "0.50992435", "0.5095564", "0.5094118", "0.5088246", "0.5085059", "0.50821954", "0.5080089", "0.5079274", "0.5074634", "0.5073707", "0.5072907" ]
0.0
-1
FROM RECOGNIZER (RECOGNITION VIEW OBSERVER ) TAB 4
@Override public void updateSettings(final RecognitionSettingsImpl settings) { Platform.runLater(() -> { this.udpateRateCombo.getSelectionModel().select(settings.getUpdateRate()); this.sliderRadius.setValue(settings.getDtwRadius() * 10); this.sliderMinThreshold.setValue(settings.getMinDtwThreashold()); this.sliderMaxThreshold.setValue(settings.getMaxDTWThreashold()); this.sliderTimeSeparation.setValue(settings.getMinTimeSeparation()); this.sliderMatchNumber.setValue(settings.getMatchNumber()); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}", "public void view() {\r\n\t\tfor (int i = 0; i < this.getTableNumber(); i++) {\r\n\t\t\tthis.getTables(i).view();\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "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 }", "public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public /* synthetic */ void m125708d(View view) {\n if (mo69219k() != null) {\n for (TabContract.AbstractC25311a aVar : mo69219k()) {\n aVar.aE_();\n }\n }\n this.f88311i.setExpanded(true);\n }", "private void export4(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\tif (WICH_ONE.equals(\"E\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascNacionalidad\",\n\t\t\t\t\t\"ascJefeInmediato\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"F\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascNacionalidad\",\n\t\t\t\t\t\"ascJefeInmediato\", \"ascSalario\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"G\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascNacionalidad\",\n\t\t\t\t\t\"ascJefeInmediato\", \"ascSalario\");\n\t\t}\n\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tif (WICH_ONE.equals(\"E\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascNacionalidad\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahoYApor\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\t\treturn descAportaciones + descAhorros;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascJefeInmediato\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.presYSeg\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tCtaCasCuentaAsociadoDAO casDAO = new CtaCasCuentaAsociadoDAO(getSessionHibernate(request));\n\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descPrestamos + descSeguros;\n\t\t\t\t}\n\t\t\t});\n\n\t\t}\n\t\tif (WICH_ONE.equals(\"F\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascNacionalidad\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.aportaciones\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\t\treturn descAportaciones;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascJefeInmediato\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahorros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\t\treturn descAportaciones;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.presYSeg\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tCtaCasCuentaAsociadoDAO casDAO = new CtaCasCuentaAsociadoDAO(getSessionHibernate(request));\n\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descPrestamos + descSeguros;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (WICH_ONE.equals(\"G\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascNacionalidad\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahoYApor\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\t\treturn descAportaciones + descAhorros;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascJefeInmediato\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.prestamos\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\t\t\t\t\treturn descPrestamos;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.seguros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descSeguros;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\ttableFacade.render();\n\t}", "private void wordMultiTabEkle(XWPFRun r, int adet)\n {\n for (int i = 0; i < adet; i++)\n r.addTab();\n }", "void gen_table_names(Connection c, PreparedStatement pst ) throws ClassNotFoundException, SQLException\n\t{\n\t String lambda_term_query = \"select subgoal_names from view2subgoals where view = '\"+ name +\"'\";\n\n\t\t\n\t pst = c.prepareStatement(lambda_term_query);\n\t \n\t ResultSet rs = pst.executeQuery();\n\t \n\t if(!rs.wasNull())\n\t {\n\t \twhile(rs.next())\n\t\t {\n\t\t \t\t \t\n\t\t \ttable_names.add(rs.getString(1));\n\t\t }\n\t }\n\t \n\t else\n\t {\n\t \tlambda_term_query = \"select subgoal from web_view_table where renamed_view = '\"+ name +\"'\";\n\n\t\t\t\n\t\t pst = c.prepareStatement(lambda_term_query);\n\t\t \n\t\t ResultSet r = pst.executeQuery();\n\n\t\t while(r.next())\n\t\t {\n\t\t \t\t \t\n\t\t \ttable_names.add(r.getString(1));\n\t\t }\n\t }\n\t \n\t \n\t \n\n\t}", "private void srediTabelu() {\n\n mtu = (ModelTabeleUlica) jtblUlica.getModel();\n ArrayList<Ulica> ulice = kontrolor.Kontroler.getInstanca().vratiUlice();\n mtu.setLista(ulice);\n\n }", "protected void pretragaGledalac() {\n\t\tString Gledalac=tfPretraga.getText();\r\n\r\n\t\tObject[]redovi=new Object[9];\r\n\t\tdtm.setRowCount(0);\r\n\t\t\r\n\t\tfor(Rezervacije r:Kontroler.getInstanca().vratiRezervacije()) {\r\n\t\t\tif(r.getImePrezime().toLowerCase().contains(Gledalac.toLowerCase())) {\r\n\t\t\t\r\n\t\t\t\tredovi[0]=r.getID_Rez();\r\n\t\t\t\tredovi[1]=r.getImePrezime();\r\n\t\t\t\tredovi[2]=r.getImePozorista();\r\n\t\t\t\tredovi[3]=r.getNazivPredstave();\r\n\t\t\t\tredovi[4]=r.getDatumIzvodjenja();\r\n\t\t\t\tredovi[5]=r.getVremeIzvodjenja();\r\n\t\t\t\tredovi[6]=r.getScenaIzvodjenja();\r\n\t\t\t\tredovi[7]=r.getBrRezUl();\r\n\t\t\t\tredovi[8]=r.getCenaUlaznica();\r\n\t\t\t\tdtm.addRow(redovi);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void applyTab();", "@Override\n\tpublic String selectTableList(int top) {\n\t\treturn \"select sqltext,pointid,type from history_table_view where rownum <= \"+top+\" order by id desc\";\n\t}", "public Doublet[] doubleTabExtraction(){\n\t\tDoublet[] tab = doubleTab();\n\t\tDoublet[] tab2 = new Doublet[4];\n\t\ttab2[0] = tab[4];\n\t\ttab2[1] = tab[5];\n\t\ttab2[2] = tab[7];\n\t\ttab2[3] = tab[9];\n\t\treturn tab2;\n\t}", "private void pintarTabla() {\r\n ArrayList<Corredor> listCorredors = gestion.getCorredores();\r\n TableModelCorredores modelo = new TableModelCorredores(listCorredors);\r\n jTableCorredores.setModel(modelo);\r\n TableRowSorter<TableModel> elQueOrdena = new TableRowSorter<>(modelo);\r\n jTableCorredores.setRowSorter(elQueOrdena);\r\n\r\n }", "public JTable getTable() { return viewTable;}", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "public String mo10346a() {\n return \"Recs.View\";\n }", "public static String getCreateViewSQLString(){\n\t\treturn \" create view \"+VIEW_NAME_FAMILY_PLANING_RECORDS_DETAIL+\" as select \"\n\t\t\t\t+SERVICE_REC_ID+\", \"\n\t\t\t\t+ TABLE_NAME_FAMILY_PLANNING_RECORDS+ \".\"+ CommunityMembers.COMMUNITY_MEMBER_ID+\", \"\n\t\t\t\t+CommunityMembers.COMMUNITY_MEMBER_NAME+\", \"\n\t\t\t\t+ TABLE_NAME_FAMILY_PLANNING_RECORDS+ \".\"+FamilyPlanningServices.SERVICE_ID+\", \"\n\t\t\t\t+FamilyPlanningServices.SERVICE_NAME+\", \"\n\t\t\t\t+\"julianday(\" + SERVICE_DATE +\")-julianday(\" +CommunityMembers.BIRTHDATE+\") as \"+AGE_DAYS +\", \"\n\t\t\t\t+SERVICE_DATE+\"-\"+CommunityMembers.BIRTHDATE +\" as \"+AGE +\", \"\n\t\t\t\t+SERVICE_DATE+\", \"\n\t\t\t\t+SCHEDULE_DATE+\", \"\n\t\t\t\t+QUANTITY+\", \"\n\t\t\t\t+SERVICE_TYPE+\", \"\n\t\t\t\t+CommunityMembers.BIRTHDATE +\", \"\n\t\t\t\t+CommunityMembers.COMMUNITY_ID \n\t\t\t\t+\" from \"\n\t\t\t\t+TABLE_NAME_FAMILY_PLANNING_RECORDS + \" left join \" +CommunityMembers.TABLE_NAME_COMMUNITY_MEMBERS\n\t\t\t\t+\" on \"+ TABLE_NAME_FAMILY_PLANNING_RECORDS+ \".\"+ CommunityMembers.COMMUNITY_MEMBER_ID +\"=\"+\n\t\t\t\t\t\tCommunityMembers.TABLE_NAME_COMMUNITY_MEMBERS+\".\"+CommunityMembers.COMMUNITY_MEMBER_ID\n\t\t\t\t+\" left join \"+FamilyPlanningServices.TABLE_NAME_FAMILY_PLANNING_SERVICES \n\t\t\t\t+\" on \"+ TABLE_NAME_FAMILY_PLANNING_RECORDS+ \".\"+FamilyPlanningServices.SERVICE_ID +\"=\"\n\t\t\t\t\t\t+FamilyPlanningServices.TABLE_NAME_FAMILY_PLANNING_SERVICES +\".\" +FamilyPlanningServices.SERVICE_ID;\n\t}", "@Override\n\tpublic void RecevoireRequete(Requete requete) {\n\t\tSystem.out.println(\"from \" + requete.getExpediteur().getNom() + \" to \" + requete.getDestinataire());\n\t}", "public void action_call(ActionEvent actionEvent) {\n ViewObject searchVO=am.getPOCHeaderView1();\n ViewObject pocvo=am.getpocSearchVo1();\n String poc_id=null;\n int Buyer=0;\n int org=0;\n String orgname=null;\n try{\n poc_id=pocvo.getCurrentRow().getAttribute(\"PocId\").toString();\n }\n catch(Exception e) {\n poc_id=null;\n }\n \n int pram=1;\n am.getDBTransaction().commit();\n /***ViewObject oder=am.getOrderRecapSummary1();\n ViewObject oder=am.getorder_recap_new_view1();\n oder.setNamedWhereClauseParam(\"param\",pram);\n oder.setWhereClause(\"SEASON = '\"+season+\"' AND BUYER_ID = '\"+Buyer+\"' AND ORG_ID= '\"+org+\"'\");\n **/\n \n \n searchVO.setNamedWhereClauseParam(\"param\",pram);\n searchVO.setWhereClause(\"POC_ID = '\"+poc_id+\"'\");\n \n \n \n searchVO.executeQuery();\n \n \n AdfFacesContext.getCurrentInstance().addPartialTarget(pocTable); \n \n \n \n \n \n }", "public void leseViewAusModel() {\r\n Model model = Model.getInstanz();\r\n\r\n ATab aktuellerTab = model.getRoot();\r\n\r\n while (aktuellerTab.getNext() != null) {\r\n ArrayList<ATab> next = aktuellerTab.getNext();\r\n\r\n for (int j = 0; j < next.size(); j++) {\r\n if (next.get(j) instanceof Inhalt) {\r\n\r\n Inhalt tmpNext = (Inhalt) next.get(j);\r\n\r\n setInhalt(tmpNext.getName(), tmpNext.getInhalt());\r\n }\r\n }\r\n\r\n for (int j = 0; j < next.size(); j++) {\r\n\r\n if (next.get(j) instanceof Tab || next.get(j) instanceof Inhalt) {\r\n aktuellerTab = next.get(j);\r\n }\r\n }\r\n }\r\n }", "public DetalleTablaComplementario() {\r\n }", "private void selectedRowGuide(){\r\n xy log_guide_rel_inv = tb_guias.getSelectionModel().getSelectedItem(); \r\n loadTables(log_guide_rel_inv.getGuias());\r\n loadCarga(log_guide_rel_inv.getGuias());\r\n \r\n List<Fxp_Archguid_gfc> data = Ln.getList_log_Archguid_gfc(Ln.getInstance().find_Archguid_gfc(log_guide_rel_inv.getGuias()));\r\n\r\n tp_factura.setText(\r\n \"Relación de Guia / Facturas / Clientes \" + \r\n \" - \" + \r\n data.size() + \" / \" + \r\n data.get(0).getNumfact() + \" / \" + \r\n data.get(0).getNumclie());\r\n\r\n tp_factura.setExpanded(true);\r\n \r\n }", "public void consultPeriodExtract(View view) {\n showExtractOnListView();\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 static void FirstUmpieRevire() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "public abstract String getTab();", "public String[] getRecordOnPan() {\r\n String result[] = new String[6];\r\n result[0] = nameTf.getText();\r\n result[1] = locationTf.getText();\r\n result[2] = specialtiesTf.getText();\r\n result[3] = sizeTf.getText();\r\n result[4] = rateTf.getText();\r\n result[5] = ownerTf.getText();\r\n\r\n return result;\r\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,gst.resultFile);\r\n\t\t\t\t\t\t\t\t\t\t}", "public void run() {\r\n\r\n SQLRow rowPrefCompte = tablePrefCompte.getRow(2);\r\n this.rowPrefCompteVals.loadAbsolutelyAll(rowPrefCompte);\r\n // TVA Coll\r\n int idCompteTVACol = this.rowPrefCompteVals.getInt(\"ID_COMPTE_PCE_TVA_VENTE\");\r\n if (idCompteTVACol <= 1) {\r\n String compte;\r\n try {\r\n compte = ComptePCESQLElement.getComptePceDefault(\"TVACollectee\");\r\n idCompteTVACol = ComptePCESQLElement.getId(compte);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n SQLRow rowCompteTVACol = tableCompte.getRow(idCompteTVACol);\r\n\r\n // TVA Ded\r\n int idCompteTVADed = this.rowPrefCompteVals.getInt(\"ID_COMPTE_PCE_TVA_ACHAT\");\r\n if (idCompteTVADed <= 1) {\r\n try {\r\n String compte = ComptePCESQLElement.getComptePceDefault(\"TVADeductible\");\r\n idCompteTVADed = ComptePCESQLElement.getId(compte);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n SQLRow rowCompteTVADed = tableCompte.getRow(idCompteTVADed);\r\n\r\n // TVA intracomm\r\n int idCompteTVAIntra = this.rowPrefCompteVals.getInt(\"ID_COMPTE_PCE_TVA_INTRA\");\r\n if (idCompteTVAIntra <= 1) {\r\n try {\r\n String compte = ComptePCESQLElement.getComptePceDefault(\"TVAIntraComm\");\r\n idCompteTVAIntra = ComptePCESQLElement.getId(compte);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n SQLRow rowCompteTVAIntra = tableCompte.getRow(idCompteTVAIntra);\r\n\r\n // Achats intracomm\r\n int idCompteAchatsIntra = this.rowPrefCompteVals.getInt(\"ID_COMPTE_PCE_ACHAT_INTRA\");\r\n if (idCompteAchatsIntra <= 1) {\r\n try {\r\n String compte = ComptePCESQLElement.getComptePceDefault(\"AchatsIntra\");\r\n idCompteAchatsIntra = ComptePCESQLElement.getId(compte);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n SQLRow rowCompteAchatIntra = tableCompte.getRow(idCompteAchatsIntra);\r\n\r\n // TVA immo\r\n int idCompteTVAImmo = this.rowPrefCompteVals.getInt(\"ID_COMPTE_PCE_TVA_IMMO\");\r\n if (idCompteTVAImmo <= 1) {\r\n try {\r\n String compte = ComptePCESQLElement.getComptePceDefault(\"TVAImmo\");\r\n idCompteTVAImmo = ComptePCESQLElement.getId(compte);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n SQLRow rowCompteTVAImmo = tableCompte.getRow(idCompteTVAImmo);\r\n\r\n PdfGenerator_3310 p = new PdfGenerator_3310();\r\n this.m = new HashMap<String, Object>();\r\n\r\n long v010 = -this.sommeCompte.soldeCompte(70, 70, true, this.dateDebut, this.dateFin);\r\n this.m.put(\"A01\", GestionDevise.round(v010));\r\n\r\n // long vA02 = this.sommeCompte.soldeCompte(70, 70, true, this.dateDebut, this.dateFin);\r\n this.m.put(\"A02\", \"\");\r\n long tvaIntra = -this.sommeCompte.sommeCompteFils(rowCompteTVAIntra.getString(\"NUMERO\"), this.dateDebut, this.dateFin);\r\n long achatsIntra = this.sommeCompte.sommeCompteFils(rowCompteAchatIntra.getString(\"NUMERO\"), this.dateDebut, this.dateFin);\r\n this.m.put(\"A03\", GestionDevise.round(achatsIntra));\r\n this.m.put(\"A04\", \"\");\r\n this.m.put(\"A05\", \"\");\r\n this.m.put(\"A06\", \"\");\r\n this.m.put(\"A07\", \"\");\r\n\r\n long tvaCol = -this.sommeCompte.sommeCompteFils(rowCompteTVACol.getString(\"NUMERO\"), this.dateDebut, this.dateFin) + tvaIntra;\r\n this.m.put(\"B08\", GestionDevise.round(tvaCol));\r\n this.m.put(\"B08HT\", GestionDevise.round(Math.round(tvaCol / 0.196)));\r\n this.m.put(\"B09\", \"\");\r\n this.m.put(\"B09HT\", \"\");\r\n this.m.put(\"B09B\", \"\");\r\n this.m.put(\"B09BHT\", \"\");\r\n\r\n this.m.put(\"B10\", \"\");\r\n this.m.put(\"B10HT\", \"\");\r\n this.m.put(\"B11\", \"\");\r\n this.m.put(\"B11HT\", \"\");\r\n this.m.put(\"B12\", \"\");\r\n this.m.put(\"B12HT\", \"\");\r\n this.m.put(\"B13\", \"\");\r\n this.m.put(\"B13HT\", \"\");\r\n this.m.put(\"B14\", \"\");\r\n this.m.put(\"B14HT\", \"\");\r\n\r\n this.m.put(\"B15\", \"\");\r\n this.m.put(\"B16\", GestionDevise.round(tvaCol));\r\n this.m.put(\"B17\", GestionDevise.round(tvaIntra));\r\n this.m.put(\"B18\", \"\");\r\n final String numeroCptTVAImmo = rowCompteTVAImmo.getString(\"NUMERO\");\r\n long tvaImmo = this.sommeCompte.sommeCompteFils(numeroCptTVAImmo, this.dateDebut, this.dateFin);\r\n this.m.put(\"B19\", GestionDevise.round(tvaImmo));\r\n\r\n final String numeroCptTVADed = rowCompteTVADed.getString(\"NUMERO\");\r\n long tvaAutre = this.sommeCompte.sommeCompteFils(numeroCptTVADed, this.dateDebut, this.dateFin);\r\n\r\n // Déduction de la tva sur immo si elle fait partie des sous comptes\r\n if (numeroCptTVAImmo.startsWith(numeroCptTVADed)) {\r\n tvaAutre -= tvaImmo;\r\n }\r\n\r\n this.m.put(\"B20\", GestionDevise.round(tvaAutre));\r\n this.m.put(\"B21\", \"\");\r\n this.m.put(\"B22\", \"\");\r\n this.m.put(\"B23\", \"\");\r\n long tvaDed = tvaAutre + tvaImmo;\r\n this.m.put(\"B24\", GestionDevise.round(tvaDed));\r\n\r\n this.m.put(\"C25\", \"\");\r\n this.m.put(\"C26\", \"\");\r\n this.m.put(\"C27\", \"\");\r\n this.m.put(\"C28\", GestionDevise.round(tvaCol - tvaDed));\r\n this.m.put(\"C29\", \"\");\r\n this.m.put(\"C30\", \"\");\r\n this.m.put(\"C31\", \"\");\r\n this.m.put(\"C32\", GestionDevise.round(tvaCol - tvaDed));\r\n\r\n p.generateFrom(this.m);\r\n\r\n SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n Map3310.this.bar.setValue(95);\r\n }\r\n });\r\n\r\n SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n\r\n String file = TemplateNXProps.getInstance().getStringProperty(\"Location3310PDF\") + File.separator + String.valueOf(Calendar.getInstance().get(Calendar.YEAR)) + File.separator\r\n + \"result_3310_2.pdf\";\r\n System.err.println(file);\r\n File f = new File(file);\r\n Gestion.openPDF(f);\r\n Map3310.this.bar.setValue(100);\r\n }\r\n });\r\n\r\n }", "private void remplirPrestaraireData() {\n\t}", "private void srediTabelu() {\n ModelTabeleStavka mts = new ModelTabeleStavka();\n mts.setLista(n.getLista());\n tblStavka.setModel(mts);\n }", "public String getSourceTable();", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "static void recorreT(){\r\n\tStruct aux=lt;\r\n\twhile(aux!=null){\r\n\t\taux.view();\r\n\t\taux=aux.sig;\r\n\t}\r\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tint row = Integer.valueOf(e.getActionCommand());\r\n\t\t\t//LibriTableModel model = (LibriTableModel) table.getModel();\r\n\t\t\tModelMethods.aggiungiCarrello(row);\r\n\t\t\tVenditeView.aggiornaLabels();\r\n\t\t\tLibriJPanJTab.refresh();\r\n\t\t}", "static Extractor byTabs() {\n\t\t\treturn Splitter.TAB_EXTRACTOR;\n\t\t}", "public OtlSourcesRViewRowImpl() {\r\n }", "private void onShowTableDetail(ViewNodeJSO viewNode) { \n TableTools.createDataProvider(viewNode).addDataDisplay(cellTable);\n }", "private final Single<TabSource> m39398b() {\n Single<TabSource> d = RxJavaInteropExtKt.toV1Observable(this.f31574b.observe(), BackpressureStrategy.LATEST).c(1).a().d(new C13217b(this));\n C2668g.a(d, \"matchSubscreensTracker\\n …ubscreenToTabSource(it) }\");\n return d;\n }", "String getTabela();", "@Test\n public void testMultiLateralView() throws Exception {\n String sql = \"desc verbose select k1, e1, e2 from db1.tbl1 lateral view explode_split(k2, \\\",\\\") tmp1 as e1\"\n + \" lateral view explode_split(k2, \\\",\\\") tmp2 as e2;\";\n String explainString = UtFrameUtils.getSQLPlanOrErrorMsg(ctx, sql, true);\n Assert.assertTrue(explainString.contains(\"2:TABLE FUNCTION NODE\"));\n Assert.assertTrue(explainString.contains(\"table function: explode_split(`k2`, ',')\"));\n Assert.assertTrue(explainString.contains(\"tuple ids: 0 1 2\"));\n Assert.assertTrue(explainString.contains(\"1:TABLE FUNCTION NODE\"));\n Assert.assertTrue(explainString.contains(\"table function: explode_split(`k2`, ',')\"));\n Assert.assertTrue(explainString.contains(\"tuple ids: 0 1\"));\n // lateral view 2 tuple\n Assert.assertTrue(explainString.contains(\"TupleDescriptor{id=1, tbl=tmp2, byteSize=32, materialized=true}\"));\n Assert.assertTrue(explainString.contains(\"SlotDescriptor{id=1, col=e2, type=VARCHAR(*)}\"));\n // lateral view 1 tuple\n Assert.assertTrue(explainString.contains(\"TupleDescriptor{id=2, tbl=tmp1, byteSize=32, materialized=true}\"));\n Assert.assertTrue(explainString.contains(\"SlotDescriptor{id=2, col=e1, type=VARCHAR(*)}\"));\n }", "private void viewRankTables() {\r\n DivaClientService.getDefaultRank(new AsyncCallback<RankResult>() {\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Selection_Manager.connError();\r\n SelectionManager.Busy_Task(false, true);\r\n }\r\n\r\n @Override\r\n public void onSuccess(RankResult result) {\r\n rankResults = result;\r\n if (rankTables != null) {\r\n rankLayoutCanv.removeMember(rankTables.getMainRankLayout());\r\n rankTables.remove();\r\n }\r\n rankTables = new RankTablesComponent(DivaClientService, Selection_Manager, rankResults, datasetInfo.getColGroupsList());\r\n rankLayoutCanv.addMember(rankTables.getMainRankLayout());\r\n if (!init) {\r\n SelectionManager.Busy_Task(false, true);\r\n }\r\n if (init) {\r\n runSomClustering(2, 1, true);\r\n }\r\n }\r\n });\r\n\r\n }", "@ActionTrigger(action=\"QUERY_RECS\")\n\t\tpublic void spriden_QueryRecs()\n\t\t{\n\t\t\t\n\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)this.getFormModel().getSpriden().getRowAdapter(true);\n\t\t\t\tSgbstdnAdapter sgbstdnElement = (SgbstdnAdapter)this.getFormModel().getSgbstdn().getRowAdapter(true);\n\t\t\t\tSovlcurAdapter sovlcurElement = (SovlcurAdapter)this.getFormModel().getSovlcur().getRowAdapter(true);\n\n\t\t\t\tif(spridenElement!=null && sgbstdnElement!=null && sovlcurElement!=null){\n\n\t\t\t\ttry { \n\t\t\t\t\tMessageServices.setMessageLevel(OracleMessagesLevel.decodeMessageLevel(5));\n\t\t\t\t// \n\t\t\t\tnextBlock();\n\t\t\t\t// soundex\n\t\t\t\tnextBlock();\n\t\t\t\t// spraddr \n\t\t\t\texecuteQuery();\n\t\t\t\tnextBlock();\n\t\t\t\t// sgbstdn \n\t\t\t\texecuteQuery();\n\t\t\t\tnextBlock();\n\t\t\t\t// sfbetrm \n\t\t\t\texecuteQuery();\n\t\t\t\t// execute the query on sovlcur and sovlfos \n\t\t\t\tgetFormModel().getSCurriculaSummary().setSummaryPidm(spridenElement.getSpridenPidm());\n\t\t\t\tgetFormModel().getSCurriculaSummary().setSummaryCode(SbCurriculumStr.fLearner());\n\t\t\t\tgetFormModel().getSCurriculaSummary().setSummaryKeySeqno(toNumber(99));\n\t\t\t\tgetFormModel().getSCurriculaSummary().setSummaryTermCode(sgbstdnElement.getSgbstdnTermCodeEff());\n\t\t\t\tgetFormModel().getSCurriculaSummary().setSummaryEndTerm(SbLearner.fQueryEnd(spridenElement.getSpridenPidm(), sgbstdnElement.getSgbstdnTermCodeEff()));\n\t\t\t\tif ( !sgbstdnElement.getSgbstdnTermCodeEff().isNull() )\n\t\t\t\t{\n\t\t\t\t\t// Create SOTVCUR since this is a learner curriculum \n\t\t\t\t\tSoklcur.pCreateSotvcur(/*pPidm=>*/getFormModel().getSCurriculaSummary().getSummaryPidm(), /*pTermCode=>*/getFormModel().getSCurriculaSummary().getSummaryTermCode(), /*pLmodCode=>*/getFormModel().getSCurriculaSummary().getSummaryCode());\n\t\t\t\t\t// Now execute the query on summary blocks \n\t\t\t\t\tgoBlock(\"SOVLCUR\");\n\t\t\t\t\texecuteQuery();\n\t\t\t\t\tif ( !sovlcurElement.getSummaryRowid().isNull() )\n\t\t\t\t\t{\n\t\t\t\t\t\tgoBlock(\"SOVLFOS\");\n\t\t\t\t\t\texecuteQuery();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgoBlock(\"SOVLFOS\");\n\t\t\t\t\t\tclearBlock();\n\t\t\t\t\t}\n\t\t\t\t\tgoBlock(\"SFBETRM\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgoBlock(\"SOVLFOS\");\n\t\t\t\t\tclearBlock();\n\t\t\t\t\tgoBlock(\"SOVLCUR\");\n\t\t\t\t\tclearBlock();\n\t\t\t\t}\n\t\t\t\t// - sgbstdn term is not null \n\t\t\t\tgoBlock(\"SFBETRM\");\n\t\t\t\tpreviousBlock();\n\t\t\t\t// sgbstdn\n\t\t\t\tpreviousBlock();\n\t\t\t\t// spraddr\n\t\t\t\tpreviousBlock();\n\t\t\t\t// soundex \n\t\t\t\tpreviousBlock();\n\t\t\t\t// spriden \n\t\t\t\t// \n\t\t\t\t\n\t\t\t\t} finally {\n\t\t\t\t\t\t\t\n\t\t\t\t\tMessageServices.setMessageLevel(OracleMessagesLevel.decodeMessageLevel(0));\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}", "@Override\n public void mostrarMediosRecientesRv() {\n iPerfilFragmentView.inicializarAdaptadorRV(iPerfilFragmentView.crearAdaptador(mascotas));\n iPerfilFragmentView.generarGridLayout();// Luego se debe indicar que genere el GridLayout\n }", "private GenericTableView populateSeriesSamplesTableView(String viewName) {\n\t GenericTable table = assembler.createTable();\n GenericTableView tableView = new GenericTableView (viewName, 5, table);\n tableView.setRowsSelectable();\n\t\ttableView.addCollection(0, 0);\n tableView.setCollectionBottons(1);\n tableView.setDisplayTotals(false);\n //tableView.setColAlignment(2, 0);\n tableView.setColAlignment(5, 0);\n tableView.setColAlignment(6, 0);\n \n return tableView;\n }", "public void emitChangeView() {\n \n int view = getCurrentViewNumber();\n Object lpid = getLocalServerID();\n \n JDSUtility.debug(\"[emitChangeView()] s\" + lpid + \", at time \" + getClockValue() + \", is going to emit a change view message for (v + 1 = \" + (view + 1) + \")\");\n\n /* the replica makes sure that no timer is currently working. If the view change was trigged by a suspect of failure of the primary then probably it's \n been already true. */\n revokeSendBatch();\n revokeViewChange();\n\n /* an exponetial timeout has to be considered to guarantee liveness when the end-to-end delay is too long (it's prevent uncessary view-changes)*/\n PBFTTimeoutDetector ttask = (PBFTTimeoutDetector) getViewTimer().getTask();\n long timeout = (Long) ttask.get(\"TIMEOUT\");\n ttask.put(\"TIMEOUT\", 2 * timeout);\n\n /* the replica moves to the next view. After that, this replica isn't accepting any message from view v < v+1. */\n setCurrentViewNumber(view +1);\n \n /* clean-up the sets P (prepare set) and Q (pre-prepare set)*/\n preprepareset.clear();\n prepareset.clear();\n\n long lcwm = getLCWM();\n long hcwm = getHCWM();\n\n /* compute Q (pre-prepare set) and P (prepare set) */\n for(long seqn = lcwm + 1; seqn <=hcwm; seqn++){\n /*If I have a prepare then its digests will be added to pre-prepared and prepared sets */\n PBFTPrepare pr = getPrepareInfo().get(lpid, seqn);\n if(pr != null){\n PBFTPrePrepare pp = new PBFTPrePrepare(view, pr.getSequenceNumber(), null);\n pp.getDigests().addAll(pr.getDigests());\n preprepareset.add(pp);\n \n prepareset.add(new PBFTPrepare(pp, null));\n\n for(String digest: pp.getDigests()){\n getRequestInfo().assign(digest, RequestState.WAITING);\n getRequestInfo().assign(digest, (Long)null);\n }\n\n continue;\n }\n\n /*If I have a pre-prepare then its digests will be added to pre-prepared set*/\n PBFTPrePrepare ppr = getPrePrepareInfo().get(seqn);\n if(ppr != null){\n PBFTPrePrepare pp = new PBFTPrePrepare(view, ppr.getSequenceNumber(), null);\n pp.getDigests().addAll(ppr.getDigests());\n preprepareset.add(pp);\n \n for(String digest: pp.getDigests()){\n getRequestInfo().assign(digest, RequestState.WAITING);\n getRequestInfo().assign(digest, (Long)null);\n }\n } \n }\n\n \n try{\n doRollback();\n }catch(Exception e){\n e.printStackTrace();\n }\n\n /* update the controls for sequence number execution */\n getStateLog().setNextPrePrepareSEQ(lcwm + 1);\n getStateLog().setNextExecuteSEQ (lcwm + 1);\n\n PBFTChangeView cv = createChangeViewMessage();\n \n try {\n /* gets the root of the checkpoint partition tree */\n PartEntry centry = rStateManager.getPart(0, 0);\n\n /* adds the pair (last stable sequence number and state digest) to compose checkpoint set C */\n if(centry != null){\n cv.addCheckpoint(centry.getPartCheckpoint(), centry.getDigest());\n }else{\n cv.addCheckpoint(lcwm, \"\");\n }\n } catch (Exception ex) {\n Logger.getLogger(PBFTServer.class.getName()).log(Level.SEVERE, null, ex);\n cv.getCheckpointSet().clear();\n cv.addCheckpoint(lcwm, \"\");\n }\n\n /* add the pre-prepare set to current change-view message*/\n cv.getPrePrepareSet().clear();\n cv.getPrePrepareSet().addAll(preprepareset);\n\n /* add the prepare set to current change-view message*/\n cv.getPrepareSet().clear();\n cv.getPrepareSet().addAll(prepareset);\n\n /*emit the change view message to group of replicas */\n emit(cv, getLocalGroup().minus(getLocalProcess()));\n\n getChangeViewInfo().setMinimumViewNumber(view);\n getChangeViewInfo().put(cv);\n\n if(isPrimary()){\n getNewViewConstructor().addChangeView(cv);\n }else{\n finalizeNewViewConstructor();\n }\n\n getChangeViewInfo().gc(view);\n getChangeViewACKInfo().gc(view);\n getNewViewConstructor().gc(view);\n getNewViewInfo().gc(view);\n getPrePrepareInfo().gc(view);\n getPrepareInfo().gc(view);\n getPrePreparebackupInfo().gc(view);\n getCommitInfo().gc(view);\n\n\n emitChangeViewACK();\n\n\n uncertanty = true; \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 void showrecordthroughmodel()\n {\n if(treatmentRequestModel != null)\n {\n tv_right_hand_dia.setText(\"\" + treatmentRequestModel.getSYSBeforeRight());\n tv_right_hand_sys.setText(\"\" + treatmentRequestModel.getDIABeforeRight());\n tv_right_hand_pulse.setText(\"\" + treatmentRequestModel.getPulseBeforeRight());\n\n tv_left_hand_dia.setText(\"\" + treatmentRequestModel.getDIABeforeLeft());\n tv_left_hand_sys.setText(\"\" + treatmentRequestModel.getSYSBeforeLeft());\n tv_left_hand_pulse.setText(\"\" + treatmentRequestModel.getPulseBeforeLeft());\n }\n\n }", "public String editRequiredElements(){\r\n \tthis.getLog().info(\"+ nextView: editM_Tabpage\");\r\n \treturn \"editM_Tabpage\";\r\n }", "@Override\n\tpublic void tipoMovimento() {\n\t\tSystem.out.println(super.getNome() + \" anda com 4 patas.\");\n\t}", "private Tab getRouleauTab() {\n /*\n * Creates a new ArrayList, where the TextFields can be stored in.\n */\n rouleauFields = new ArrayList<TextField>();\n /*\n * Creates a new ArrayList, where the Labels can be stored in.\n */\n rouleauLabels = new ArrayList<Label>();\n /*\n * Creates a GridPane to display all Nodes for this Tab.\n */\n GridPane grid = new GridPane();\n grid.setAlignment(Pos.CENTER);\n grid.setHgap(10);\n grid.setVgap(10);\n grid.setPadding(new Insets(10, 10, 10, 10));\n \n /*\n * Adds Columns to the GridPane, so they can be configured.\n */\n for (int i = 0; i <= 5; i++) {\n grid.getColumnConstraints().add(new ColumnConstraints());\n grid.getColumnConstraints().get(i).setHalignment(HPos.CENTER);\n }\n /*\n * Configures the Width for all columns, so they match the wanted design.\n */\n grid.getColumnConstraints().get(0).setMinWidth(60);\n grid.getColumnConstraints().get(1).setMaxWidth(60);\n grid.getColumnConstraints().get(2).setMinWidth(50);\n grid.getColumnConstraints().get(2).setMaxWidth(50);\n grid.getColumnConstraints().get(3).setMinWidth(50);\n grid.getColumnConstraints().get(3).setMaxWidth(50);\n grid.getColumnConstraints().get(4).setMinWidth(70);\n grid.getColumnConstraints().get(4).setMaxWidth(70);\n grid.getColumnConstraints().get(4).setHalignment(HPos.RIGHT);\n grid.getColumnConstraints().get(5).setMinWidth(50);\n grid.getColumnConstraints().get(5).setHalignment(HPos.LEFT);\n \n /*\n * The Values for the Cells with given Content. This makes the creation easier.\n */\n String[] rouleauBase = {\"0,10€\", \"0,20€\", \"0,50€\", \"1€\", \"2€\"};\n String[] rouleauCoinAmount = {\"(40x)\", \"(40x)\", \"(40x)\", \"(25x)\", \"(25x)\"};\n String[] rouleauSum = {\"(= 4€)\", \"(= 8€)\", \"(= 20€)\", \"(= 25€)\", \"(= 50€)\"};\n \n /*\n * Creates the first Row, where basic Information is displayed.\n */\n Label lbChange = new Label(\"Wechselgeld:\");\n grid.add(lbChange, 0, 0);\n \n Label lbRoleau = new Label(\"Rollen:\");\n grid.add(lbRoleau, 1, 0);\n \n Label lbAmount = new Label(\"Anzahl:\");\n grid.add(lbAmount, 3, 0);\n \n /*\n * Creates the Area, where the User can enter the amount of each rouleau,\n */\n for (int i = 0; i <= 4; i++) {\n Label lbCoinAmount = new Label(rouleauCoinAmount[i]);\n grid.add(lbCoinAmount, 0, i + 1);\n \n Label lbRouleauBase = new Label(rouleauBase[i]);\n grid.add(lbRouleauBase, 1, i + 1);\n \n Label lbRouleauSum = new Label(rouleauSum[i]);\n grid.add(lbRouleauSum, 2, i + 1);\n \n TextField tfAmount = new TextField(\"0\");\n tfAmount.setAlignment(Pos.CENTER);\n tfAmount.focusedProperty().addListener(new TextFieldFocusChangedListener(tfAmount, this));\n tfAmount.textProperty().addListener(new TextFieldTextChangedListener(this));\n tfAmount.setTooltip(new Tooltip(\"Geben Sie hier die Anzahl der \\\"\" + rouleauBase[i] \n + \"\\\"-Geldrollen ein.\"));\n grid.add(tfAmount, 3, i + 1);\n rouleauFields.add(tfAmount);\n \n Label lbSum = new Label(\"Summe:\");\n grid.add(lbSum, 4, i + 1);\n \n Label lbSumDisplay = new Label(\"0,00€\");\n grid.add(lbSumDisplay, 5, i + 1);\n rouleauLabels.add(lbSumDisplay);\n }\n \n /*\n * Creates a new Tab to store the GridPane and returns it.\n */\n Tab rouleauTab = new Tab();\n rouleauTab.setText(\"Geldrollen\");\n rouleauTab.setContent(grid);\n return rouleauTab;\n }", "void mo6505cu(View view);", "void mo6501a(C41531v c41531v, View view, Object obj, int i);", "public void view()\n {\n FieldActorDescriptor actor = getHighlightedActors()[0];\n\n FieldTableDescriptor table = new FieldTableDescriptor();\n table.namespace = actor.namespace;\n table.sections.add(actor.coordinates.clone());\n SectionDescriptor[] properties = actor.getProperties();\n for(int i=0; i<properties.length; i++)\n {\n table.sections.add(properties[i].clone());\n }\n\n TableViewer viewer = new TableViewer(table);\n }", "public interface RtcSpeexWbTablesExperiment {\n}", "@Test\n public void selectChainedView() throws Exception {\n final Properties connectionProps = new Properties();\n connectionProps.setProperty(USER, TestInboundImpersonation.PROXY_NAME);\n connectionProps.setProperty(PASSWORD, TestInboundImpersonation.PROXY_PASSWORD);\n connectionProps.setProperty(IMPERSONATION_TARGET, TestInboundImpersonation.TARGET_NAME);\n BaseTestQuery.updateClient(connectionProps);\n BaseTestQuery.testBuilder().sqlQuery(\"SELECT * FROM %s.u0_lineitem ORDER BY l_orderkey LIMIT 1\", BaseTestImpersonation.getWSSchema(TestInboundImpersonation.OWNER)).ordered().baselineColumns(\"l_orderkey\", \"l_partkey\").baselineValues(1, 1552).go();\n }", "private void initTablesViews()\n {\n // Tokens\n tc_token_id.setCellValueFactory(new PropertyValueFactory<>(\"token\"));\n tc_tipo_token_id.setCellValueFactory(new PropertyValueFactory<>(\"tipoToken\"));\n tc_linea_token_id.setCellValueFactory(new PropertyValueFactory<>(\"linea\"));\n tv_tokens_encontrados_id.setItems(info_tabla_tokens);\n\n // Errores\n tc_error_id.setCellValueFactory(new PropertyValueFactory<>(\"error\"));\n tc_tipo_error_id.setCellValueFactory(new PropertyValueFactory<>(\"tipoError\"));\n tc_linea_error_id.setCellValueFactory(new PropertyValueFactory<>(\"linea_error\"));\n tv_errores_lexicos_id.setItems(info_tabla_errores);\n }", "private void tabelaFevereiroMouseClicked(java.awt.event.MouseEvent evt) {\n \n Compromisso.setText(this.indexesToString());\n \n }", "private void reloadPlanTable() {\n\t\t\r\n\t}", "@Override\n\tpublic String getInformeVendedor() {\n\t\treturn \"Informe trimestre 3\";\n\t}", "private void export3(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\tif (WICH_ONE.equals(\"A\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascIngresoCoope\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"B\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascRetiroCoope\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"C\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascProfesion\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"D\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascSalario\");\n\t\t}\n\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tif (WICH_ONE.equals(\"A\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascIngresoCoope\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.aportaciones\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\t\treturn descAportaciones;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\tif (WICH_ONE.equals(\"B\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascRetiroCoope\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahorros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAhorros,request);\n\t\t\t\t\treturn descAhorros;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\tif (WICH_ONE.equals(\"C\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascProfesion\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.prestamos\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\t\t\t\t\treturn descPrestamos;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\tif (WICH_ONE.equals(\"D\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.seguros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descSeguros;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\n\t\ttableFacade.render();\n\t}", "public void tabSelected();", "public String navigator(){\n\t System.out.println(10/0);\n\t return \"anonymousView\";\n\t }", "Tablero consultarTablero();", "private String extractTableName() {\n\t\treturn fromElement.getQueryable().getTableName();\n\t}", "public int getTabindex();", "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 String getTabTitle() {\r\n\t return \"SubspaceClusterer\";\r\n\t }", "public abstract String getRegexTableMarker();", "@Override\r\n\tpublic void setDocTitleStatus(Object view) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(this.ds.getValue()==0)\r\n\t\t{\r\n\t\t\thql=\"select isnull(max(docNum),0) from Ordr\";\r\n\t\t\tInteger Ndoce= (Integer) appMain.lt.clob(hql, 0, 1)[0][0]+1;\r\n\t\t\r\n\t\t\t((OrdrView)view).getTxt_docn().setText(Ndoce.toString());\t\r\n\t\t\t\r\n\t\t\t((JTextField)((OrdrView)view).getTxt_cus().getEditor().getEditorComponent()).setText(\"\");\r\n\t\t ((JTextField)((OrdrView)view).getTxt_cuslxr().getEditor().getEditorComponent()).setText(\"\");\r\n\t\t ((OrdrView)view).getTxt_date().setDate(new Date());\r\n\t\t ((OrdrView)view).getTxt_delidate().setDate(new Date());\r\n\t\t ((OrdrView)view).getTxt_duedate().setDate(new Date());\r\n\t\t ((OrdrView)view).getJta_memo().setText(\"\");\r\n\t\t ((OrdrView)view).getTxt_ter().setText(\"\");\r\n\t\t ((OrdrView)view).getTxt_cusn().setText(\"\");\r\n\t\t\t((OrdrView)view).getTxt_cus().setEditable(true);\r\n\t\t\t((OrdrView)view).getTxt_cuslxr().setEditable(true);\r\n\t\t\t((OrdrView)view).getTxt_date().setEditorable(true);\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEditorable(true);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEditorable(true);\r\n\t\t\t\r\n\t\t\t((OrdrView)view).getTxt_cus().setEnabled(true);\r\n\t\t\t((OrdrView)view).getTxt_cuslxr().setEnabled(true);\r\n\t\t\t((OrdrView)view).getTxt_date().setEnabled(true);\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEnabled(true);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEnabled(true);\r\n\t\t\t((OrdrView)view).getCom_sales().setEnabled(false);\r\n\t\t\t((OrdrView)view).getCom_sales().setEditable(false);\r\n\t\t\t((OrdrView)view).getCom_sales1().setEnabled(false);\t\r\n\t\t\t((OrdrView)view).getCom_sales1().setEditable(false);\r\n\t\t}\r\n\t\telse if(this.ds.getValue()==1)\r\n\t\t{\r\n\t\t\t((OrdrView)view).getTxt_cus().setEditable(false);\r\n\t\t\t((OrdrView)view).getTxt_cuslxr().setEditable(false);\r\n\t\t\t((OrdrView)view).getTxt_date().setEditorable(true);\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEditorable(true);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEditorable(true);\r\n\t\t\t((OrdrView)view).getCom_sales().setEnabled(false);\r\n\t\t\t((OrdrView)view).getCom_sales().setEditable(false);\r\n\t\t\t((OrdrView)view).getCom_sales1().setEnabled(false);\t\r\n\t\t\t((OrdrView)view).getCom_sales1().setEditable(false);\r\n\t\t\t((OrdrView)view).getTxt_cus().setEnabled(false);\r\n\t\t\t((OrdrView)view).getTxt_cuslxr().setEnabled(false);\r\n\t\t\t((OrdrView)view).getTxt_date().setEnabled(true);\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEnabled(true);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEnabled(true);\r\n\t\t\r\n\t\t}\r\n\t\telse if(this.ds.getValue()==2)\r\n\t\t{\r\n\t\t\t((OrdrView)view).getTxt_cus().setEditable(true);\r\n\t\t\t((OrdrView)view).getTxt_cuslxr().setEditable(true);\r\n\t\t\t((OrdrView)view).getTxt_date().setEditorable(true);\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEditorable(true);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEditorable(true);\r\n\t\t\t((OrdrView)view).getCom_sales().setEnabled(false);\r\n\t\t\t((OrdrView)view).getCom_sales().setEditable(false);\r\n\t\t\t((OrdrView)view).getCom_sales1().setEnabled(false);\t\r\n\t\t\t((OrdrView)view).getCom_sales1().setEditable(false);\r\n\t\t\t((OrdrView)view).getTxt_cus().setEnabled(true);\r\n\t\t\t((OrdrView)view).getTxt_cuslxr().setEnabled(true);\r\n\t\t\t((OrdrView)view).getTxt_date().setEnabled(true);\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEnabled(true);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEnabled(true);\r\n\t\t\r\n\t\t}\r\n\t\telse if(this.ds.getValue()==3)\r\n\t\t{\r\n\t\t\t((OrdrView)view).getTxt_cus().setEditable(false);\r\n\t\t\t((OrdrView)view).getTxt_cuslxr().setEditable(false);\r\n\t\t\t((OrdrView)view).getTxt_date().setEditorable(false);\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEditorable(false);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEditorable(false);\r\n\t\t\t((OrdrView)view).getCom_sales().setEnabled(false);\r\n\t\t\t((OrdrView)view).getCom_sales().setEditable(false);\r\n\t\t\t((OrdrView)view).getCom_sales1().setEnabled(false);\r\n\t\t\t((OrdrView)view).getCom_sales1().setEditable(false);\r\n\t\t\r\n\t\t\t((OrdrView)view).getTxt_cus().setEnabled(false);\r\n\t\t\t((OrdrView)view).getTxt_cuslxr().setEnabled(false);\r\n\t\t\t((OrdrView)view).getTxt_date().setEnabled(false);\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEnabled(false);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEnabled(false);\r\n\t\t}\r\n\t\telse if(this.ds.getValue()==4)\r\n\t\t{\r\n\t\t\t((OrdrView)view).getTxt_cus().setEditable(false);\r\n\t\t\t((OrdrView)view).getTxt_cuslxr().setEditable(false);\r\n\t\t\t((OrdrView)view).getTxt_date().setEditorable(false);\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEditorable(false);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEditorable(false);\r\n\t\t\t\r\n\t\t\t((OrdrView)view).getTxt_cus().setEnabled(false);\r\n\t\t\t((OrdrView)view).getTxt_cuslxr().setEnabled(false);\r\n\t\t\t((OrdrView)view).getTxt_date().setEnabled(false);\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEnabled(false);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEnabled(false);\r\n\t\t\t\r\n\t\t\t((OrdrView)view).getTxt_delidate().setEditorable(false);\r\n\t\t\t((OrdrView)view).getTxt_duedate().setEditorable(false);\r\n\t\t\t\r\n\t\t\t((OrdrView)view).getCom_sales().setEnabled(false);\r\n\t\t\t((OrdrView)view).getCom_sales().setEditable(false);\r\n\t\t\t((OrdrView)view).getCom_sales1().setEnabled(false);\r\n\t\t\t((OrdrView)view).getCom_sales1().setEditable(false);\r\n\t\t}\r\n\t\telse\r\n\t\t{\t\r\n\t\t\t\r\n\t\t}\r\n\t}", "public TViewsUsedTablesExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "private void mostrarTablero() {\n Jugada objJugada = null;\n if (! this.objJuegoTresEnRaya.getMovimientos().estaVacia())\n objJugada = this.objJuegoTresEnRaya.getMovimientos().ultimo();\n\n if (objJugada == null) {\n tab0x0.setEnabled(true);\n tab0x1.setEnabled(true);\n tab0x2.setEnabled(true);\n \n tab1x0.setEnabled(true);\n tab1x1.setEnabled(true);\n tab1x2.setEnabled(true);\n \n tab2x0.setEnabled(true);\n tab2x1.setEnabled(true);\n tab2x2.setEnabled(true);\n \n tab0x0.setText(\"\");\n tab0x1.setText(\"\");\n tab0x2.setText(\"\");\n \n tab1x0.setText(\"\");\n tab1x1.setText(\"\");\n tab1x2.setText(\"\");\n \n tab2x0.setText(\"\");\n tab2x1.setText(\"\");\n tab2x2.setText(\"\");\n return;\n }\n \n if (objJugada.getTablero(0, 0) > 0) {\n tab0x0.setEnabled(false);\n tab0x0.setText(getTexto(objJugada.getTablero(0, 0)));\n }\n if (objJugada.getTablero(0, 1) > 0) {\n tab0x1.setEnabled(false);\n tab0x1.setText(getTexto(objJugada.getTablero(0, 1)));\n }\n if (objJugada.getTablero(0, 2) > 0) {\n tab0x2.setEnabled(false);\n tab0x2.setText(getTexto(objJugada.getTablero(0, 2)));\n }\n\n if (objJugada.getTablero(1, 0) > 0) {\n tab1x0.setEnabled(false);\n tab1x0.setText(getTexto(objJugada.getTablero(1, 0)));\n }\n if (objJugada.getTablero(1, 1) > 0) {\n tab1x1.setEnabled(false);\n tab1x1.setText(getTexto(objJugada.getTablero(1, 1)));\n }\n if (objJugada.getTablero(1, 2) > 0) {\n tab1x2.setEnabled(false);\n tab1x2.setText(getTexto(objJugada.getTablero(1, 2)));\n }\n\n if (objJugada.getTablero(2, 0) > 0) {\n tab2x0.setEnabled(false);\n tab2x0.setText(getTexto(objJugada.getTablero(2, 0)));\n }\n if (objJugada.getTablero(2, 1) > 0) {\n tab2x1.setEnabled(false);\n tab2x1.setText(getTexto(objJugada.getTablero(2, 1)));\n }\n if (objJugada.getTablero(2, 2) > 0) {\n tab2x2.setEnabled(false);\n tab2x2.setText(getTexto(objJugada.getTablero(2, 2)));\n }\n \n this.numNodosResultLabel.setText(\"\" + objJuegoTresEnRaya.getNumeroNodosUltima());\n \n if (objJuegoTresEnRaya.estaTerminado()) {\n tab0x0.setEnabled(false);\n tab0x1.setEnabled(false);\n tab0x2.setEnabled(false);\n \n tab1x0.setEnabled(false);\n tab1x1.setEnabled(false);\n tab1x2.setEnabled(false);\n \n tab2x0.setEnabled(false);\n tab2x1.setEnabled(false);\n tab2x2.setEnabled(false);\n \n this.quienGanoResultLabel.setText(getTexto(objJuegoTresEnRaya.getQuienGano()));\n }\n }", "public abstract View mo2155b();", "public AbstrJoueurModel retourneAbstrJoueurModel(){ return ajm;}", "@Test\n public void testComputeViews() throws URISyntaxException {\n HashMap<Participant,Set<BasicFragment>> v = new HashMap<>();\n \n // * View\n BasicFragment frag = new BasicFragment();\n HashSet<BasicFragment> setfrag = new HashSet<>();\n setfrag.add(frag);\n v.put(source,setfrag);\n part.setViews(v);\n\n part.computeViews();\n\n assertEquals( part.countTriples(),\n source.countTriples());\n\n part.reset();\n\n // View with an object\n setfrag.clear();\n frag= new BasicFragment();\n frag.setObject(\"<http://dbpedia.org/resource/Venezuela>\");\n setfrag.add(frag);\n v.put(source,setfrag);\n part.setViews(v);\n\n part.computeViews();\n\n // One triple only in the MiniBase\n //TODO: Count triples based on fragment\n assertEquals( part.countTriples(),\n 1);\n\n part.reset();\n // View with a subject\n setfrag.clear();\n frag= new BasicFragment();\n frag.setSubject(\"<http://dbpedia.org/resource/Aeropostal_Alas_de_Venezuela>\");\n setfrag.add(frag);\n v.put(source,setfrag);\n part.setViews(v);\n\n part.computeViews();\n\n // I know that all triples of the test dataset match this pattern\n assertEquals( part.countTriples(),1);\n }", "public interface VwSupplierMoves extends ViewObject {\n void addSelectedRowsObj(String kassaId);\n}", "@Override\n public void changed(ObservableValue observableValue, Object oldValue, Object newValue) {\n if(table_progressive.getSelectionModel().getSelectedItem() != null) \n { \n TableViewSelectionModel selectionModel = table_progressive.getSelectionModel();\n ObservableList selectedCells = selectionModel.getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0); \n String[] liste_value=newValue.toString().split(\",\");\n selected_row_table_progressive=tablePosition.getRow()+1; \n selected_row_table_progressive_nom=liste_value[1].trim();\n selected_row_table_progressive_prenom=liste_value[2].trim();\n // Object val = tablePosition.getTableColumn().getCellData(newValue); \n }\n }", "@Override\n public void changed(ObservableValue observableValue, Object oldValue, Object newValue) {\n if(table_progressive.getSelectionModel().getSelectedItem() != null) \n { \n TableViewSelectionModel selectionModel = table_progressive.getSelectionModel();\n ObservableList selectedCells = selectionModel.getSelectedCells();\n TablePosition tablePosition = (TablePosition) selectedCells.get(0); \n String[] liste_value=newValue.toString().split(\",\");\n selected_row_table_progressive=tablePosition.getRow()+1; \n selected_row_table_progressive_nom=liste_value[1].trim();\n selected_row_table_progressive_prenom=liste_value[2].trim();\n // Object val = tablePosition.getTableColumn().getCellData(newValue); \n }\n }", "public VehicleViewRecord() {\n super(VehicleView.VEHICLE_VIEW);\n }", "public void viewOriginalWithExternalViewer()\n\t{\n\t\tif (CheckFileOperationEnable()) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//Bug Id 67336, end\n\n\t\ttransferToEdmMacro(\"ORIGINAL\",\"VIEWWITHEXTVIEWER\");\n\t}", "String downsampledPVTableName();", "public void setSource (AbstractRelationalDataView v) { \n\t\t\n\t\tdv = v; \n\t\t\n\t\t// obtain number of records in training set\n\t\tmembers = dv.GetCount();\n\t}", "public void mo21793R() {\n }", "public void dvAdded()\r\n/* 76: */ {\r\n/* 77:160 */ this.numDVRecords += 1;\r\n/* 78: */ }", "@VTID(13)\n int getCount();", "public interface M00 extends TabModel {\n}", "public void readTable() {\n DefaultTableModel modelo = (DefaultTableModel) jTable1.getModel();\n modelo.setRowCount(0);\n\n }", "@Test\n public void testCreateView() {\n System.out.println(\"createView\");\n int i =1;\n AfinadorModelo modeloTest = new AfinadorModelo();\n AfinadorControlador controladorTest = new AfinadorControlador(modeloTest,i);\n String test = controladorTest.vista1.bpmOutputLabel.getText();\n if( test != \"APAGADO \")\n fail(\"The test case is a prototype.\");\n }", "private void export2(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascIngresoCoope\",\n\t\t\t\t\"ascAsociadoPadre\");\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascIngresoCoope\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.empresa\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString empresa = \"\";\n\t\t\t\tif (asociado.getAscDirTrabajo() == null\n\t\t\t\t\t\t|| asociado.getAscDirTrabajo().equals(\"\")) {\n\t\t\t\t\tCtaDptDepartamentoTrabajo departamentoTrabajo = asociado\n\t\t\t\t\t\t\t.getCtaDptDepartamentoTrabajo();\n\t\t\t\t\tCtaEtrEmpresaTrabajoDAO empresaTrabajoDAO = new CtaEtrEmpresaTrabajoDAO(getSessionHibernate(request));\n\t\t\t\t\tCtaEtrEmpresaTrabajo empresaTrabajo = empresaTrabajoDAO\n\t\t\t\t\t\t\t.findById(departamentoTrabajo\n\t\t\t\t\t\t\t\t\t.getCtaEtrEmpresaTrabajo().getEtrId());\n\t\t\t\t\tempresa = empresaTrabajo.getEtrNombre();\n\t\t\t\t} else {\n\t\t\t\t\tempresa = asociado.getAscDirTrabajo();\n\t\t\t\t}\n\t\t\t\treturn empresa;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascAsociadoPadre\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.total\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\", descSeguros,request);\n\n\t\t\t\treturn descAportaciones + descAhorros + descPrestamos\n\t\t\t\t\t\t+ descSeguros;\n\t\t\t}\n\t\t});\n\n\t\ttableFacade.render();\n\t}", "public void mo1637a(View view) {\n }", "public String getNomTable();", "public abstract void mo2152a(View view);", "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 mo3376r() {\n }", "public DBViewAllPilot() {\n\t\ttry {\n\t\tstatement = connection.createStatement(); \n\t\tviewAll(); //call the viewAll function; \n\t\t\n\t}catch(SQLException ex) {\n\t\tSystem.out.println(\"Database connection failed DBViewAllAircraft\"); \n\t}\n}", "@VTID(11)\n int getCount();", "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 }", "private TableViewer createTableViewer(Composite parent) {\r\n\t\tfinal TableViewer viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);\r\n\t\tviewer.setContentProvider(new HandlerContentProvider());\r\n\t\tviewer.setLabelProvider(new PrebookingViewLabelProvider());\r\n\t\tviewer.setInput(transportHandler);\r\n\t\tviewer.getTable().setLinesVisible(true);\r\n\t\tviewer.getTable().addMouseListener(new MouseAdapter() {\r\n\r\n\t\t\tpublic void mouseDown(MouseEvent e) {\r\n\t\t\t\tif (viewer.getTable().getItem(new Point(e.x, e.y)) == null) {\r\n\t\t\t\t\tviewer.setSelection(new StructuredSelection());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tfinal Table table = viewer.getTable();\r\n\t\ttable.setLinesVisible(true);\r\n\t\ttable.setHeaderVisible(true);\r\n\r\n\t\tfinal TableColumn blockColumn = new TableColumn(table, SWT.NONE);\r\n\t\tblockColumn.setToolTipText(\"Eintrag wird gerade bearbeitet\");\r\n\t\tblockColumn.setWidth(24);\r\n\t\tblockColumn.setText(\"L\");\r\n\r\n\t\tfinal TableColumn bTableColumnOrtsstelle = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnOrtsstelle.setWidth(30);\r\n\t\tbTableColumnOrtsstelle.setText(\"OS\");\r\n\r\n\t\tfinal TableColumn bTableColumnAbfahrt = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnAbfahrt.setToolTipText(\"Geplante Abfahrt an der Ortsstelle\");\r\n\t\tbTableColumnAbfahrt.setWidth(43);\r\n\t\tbTableColumnAbfahrt.setText(\"Abf\");\r\n\r\n\t\tfinal TableColumn bTableColumnAnkunft = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnAnkunft.setToolTipText(\"Geplante Ankunft beim Patienten\");\r\n\t\tbTableColumnAnkunft.setWidth(43);\r\n\t\tbTableColumnAnkunft.setText(\"Ank\");\r\n\r\n\t\tfinal TableColumn bTableColumnTermin = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnTermin.setToolTipText(\"Termin am Zielort\");\r\n\t\tbTableColumnTermin.setWidth(43);\r\n\t\tbTableColumnTermin.setText(\"Termin\");\r\n\r\n\t\tfinal TableColumn bTableColumnTransportVon = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnTransportVon.setWidth(188);\r\n\t\tbTableColumnTransportVon.setText(\"Transport von\");\r\n\r\n\t\tfinal TableColumn bTtableColumnPatient = new TableColumn(table, SWT.NONE);\r\n\t\tbTtableColumnPatient.setWidth(160);\r\n\t\tbTtableColumnPatient.setText(\"Patient\");\r\n\r\n\t\tfinal TableColumn bTableColumnTransportNach = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnTransportNach.setWidth(188);\r\n\t\tbTableColumnTransportNach.setText(\"Transport nach\");\r\n\r\n\t\tfinal TableColumn bTableColumnTA = new TableColumn(table, SWT.NONE);\r\n\t\tbTableColumnTA.setToolTipText(\"Transportart\");\r\n\t\tbTableColumnTA.setWidth(23);\r\n\t\tbTableColumnTA.setText(\"T\");\r\n\r\n\t\tfinal TableColumn anmerkungTransporte = new TableColumn(table, SWT.NONE);\r\n\t\tanmerkungTransporte.setWidth(66);\r\n\t\tanmerkungTransporte.setText(\"Anmerkung\");\r\n\r\n\t\tListener sortListener = new Listener() {\r\n\r\n\t\t\tpublic void handleEvent(Event e) {\r\n\t\t\t\t// determine new sort column and direction\r\n\t\t\t\tTableColumn sortColumn = viewer.getTable().getSortColumn();\r\n\t\t\t\tTableColumn currentColumn = (TableColumn) e.widget;\r\n\t\t\t\tint dir = viewer.getTable().getSortDirection();\r\n\t\t\t\t// revert the sort order if the column is the same\r\n\t\t\t\tif (sortColumn == currentColumn) {\r\n\t\t\t\t\tif (dir == SWT.UP) {\r\n\t\t\t\t\t\tdir = SWT.DOWN;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tdir = SWT.UP;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tviewer.getTable().setSortColumn(currentColumn);\r\n\t\t\t\t\tdir = SWT.UP;\r\n\t\t\t\t}\r\n\t\t\t\t// sort the data based on column and direction\r\n\t\t\t\tString sortIdentifier = null;\r\n\t\t\t\tif (currentColumn == bTableColumnOrtsstelle) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.RESP_STATION_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnAbfahrt) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.ABF_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnAnkunft) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.AT_PATIENT_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnTermin) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.TERM_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnTransportVon) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.TRANSPORT_FROM_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTtableColumnPatient) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.PATIENT_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnTransportNach) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.TRANSPORT_TO_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == bTableColumnTA) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.TA_SORTER;\r\n\t\t\t\t}\r\n\t\t\t\tif (currentColumn == anmerkungTransporte) {\r\n\t\t\t\t\tsortIdentifier = TransportSorter.NOTES_SORTER;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// apply the filter\r\n\t\t\t\tviewer.getTable().setSortDirection(dir);\r\n\t\t\t\tviewer.setSorter(new TransportSorter(sortIdentifier, dir));\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// attach the listener\r\n\t\tbTableColumnOrtsstelle.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnAbfahrt.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnAnkunft.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnTermin.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnTransportVon.addListener(SWT.Selection, sortListener);\r\n\t\tbTtableColumnPatient.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnTransportNach.addListener(SWT.Selection, sortListener);\r\n\t\tbTableColumnTA.addListener(SWT.Selection, sortListener);\r\n\t\tanmerkungTransporte.addListener(SWT.Selection, sortListener);\r\n\r\n\t\treturn viewer;\r\n\t}", "private void remplirTabNewMess(){\n\t\tCalendar date = Calendar.getInstance();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);\n\n\t\tString passage[]= new String[7];\n\n\t\tpassage[0]=tab[2]; //sender\n\t\tpassage[1]=tab[1]; //recep\n\t\tpassage[2]=tab[4]; //obj\n\t\tpassage[3]=tab[3]; //txt\n\t\tpassage[4]=\"0\"; //importance\n\t\tpassage[5]=sdf.format(date.getTime()); //date\n\t\tpassage[6]=\"1\"; //non lu\n\n\t\tmessages.add((String[])passage);\n\t\tthis.send(messages);\n\t\tmessagerie.Server.con.closeSocket();\n\n\t}", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n String[] stringArray0 = new String[19];\n String string0 = SQLUtil.renderColumnListWithTableName(\"alter materialized viewderby.language.usestatistics\", stringArray0);\n Character character0 = Character.valueOf('~');\n String string1 = SQLUtil.substituteMarkers(string0, string0, character0);\n assertEquals(\"'~'\", string1);\n }" ]
[ "0.55031025", "0.5330575", "0.51595175", "0.5110468", "0.50040174", "0.49895075", "0.4986932", "0.4985955", "0.49742088", "0.49740013", "0.49638265", "0.49411547", "0.49045867", "0.4875764", "0.48726833", "0.48719892", "0.4865785", "0.48588043", "0.48519576", "0.48455238", "0.48254997", "0.4787509", "0.4782813", "0.47776824", "0.47768593", "0.4774689", "0.47691512", "0.47589532", "0.47441778", "0.47321132", "0.47249752", "0.47236764", "0.47202212", "0.47115293", "0.47095218", "0.47053245", "0.47029966", "0.4691887", "0.46882752", "0.46868473", "0.46794695", "0.46769345", "0.46768996", "0.46726233", "0.46715248", "0.46713623", "0.46708676", "0.46678832", "0.46661258", "0.46660092", "0.46615374", "0.46581656", "0.46579367", "0.4656927", "0.46547398", "0.4654404", "0.4652043", "0.465191", "0.46494427", "0.46439365", "0.46368113", "0.46352693", "0.46323827", "0.46264982", "0.46211278", "0.46150306", "0.46100605", "0.46075645", "0.46073174", "0.46048975", "0.4604759", "0.46022207", "0.45996633", "0.4599363", "0.4596508", "0.4596046", "0.45919156", "0.45916155", "0.45916155", "0.45913172", "0.45897883", "0.45839694", "0.45823798", "0.45822093", "0.4582101", "0.456833", "0.4561498", "0.4559283", "0.45587116", "0.45558172", "0.45506233", "0.4547789", "0.454673", "0.4545475", "0.4542713", "0.45425755", "0.4542121", "0.45417207", "0.4541172", "0.45400408", "0.45399243" ]
0.0
-1
Snack bar with the gesture name
@Override public void onGestureRecognized(final String gestureName) { Platform.runLater(() -> { ViewUtilities.showSnackBar((Pane) this.recorderPane.getCenter(), gestureName, Duration.MEDIUM, DimDialogs.MEDIUM, null); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showSnackBar(String message) {\n }", "void onSnackBarActionClicked(int uniqueId, View view);", "private void snackBar(String msg) {\n MySnackBar.createSnackBar(Objects.requireNonNull(getContext()), Objects.requireNonNull(getView()), msg);\n }", "public String getSnackBarText() {\n return snackBar.getText();\n }", "public void DisplaySnackBarAboveBar(String message, Boolean setAction) {\n int marginSide = 0;\n int marginBottom = 150;\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout,\n message,\n Snackbar.LENGTH_LONG\n );\n\n if (setAction) {\n snackbar.setAction(\"Share Now\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, \"please visit https://www.noobsplanet.com\");\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, \"Send to \"));\n }\n });\n }\n\n View snackbarView = snackbar.getView();\n CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) snackbarView.getLayoutParams();\n params.setMargins(\n params.leftMargin + marginSide,\n params.topMargin,\n params.rightMargin + marginSide,\n params.bottomMargin + marginBottom + 100\n );\n\n snackbarView.setLayoutParams(params);\n snackbar.show();\n }", "public void showHelp() {\n final Snackbar snackBar = Snackbar.make(findViewById(R.id.mapscontainer),\n \"Select a location by clicking the map. Press go to search your categories.\",\n Snackbar.LENGTH_INDEFINITE);\n\n snackBar.setAction(\"Got it!\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackBar.dismiss();\n }\n })\n .setActionTextColor(Color.WHITE);\n snackBar.show();\n }", "private void createSnack() {\n }", "public interface OnSnackBarActionListener {\n /**\n * On snack bar action clicked.\n *\n * @param uniqueId the unique id\n * @param view the mView\n */\n void onSnackBarActionClicked(int uniqueId, View view);\n}", "public void SnackBarB() {\n Snackbar.make(getWindow().getDecorView().getRootView(),\n \"Cálculos sobre cinemática de rotación.\", Snackbar.LENGTH_LONG).show();\n }", "public void showToast(String text)\n {\n Text icon = GlyphsDude.createIcon(FontAwesomeIconName.CHECK_CIRCLE,\"1.5em\");\n icon.setFill(Color.WHITE);\n Label l = new Label(text) ;\n l.setTextFill(Color.WHITE);\n l.setGraphic(icon);\n snackbar = new JFXSnackbar(PrinciplePane);\n snackbar.enqueue( new JFXSnackbar.SnackbarEvent(l));\n }", "public String toString(){\r\n //TODO: change implementation of this method?\r\n return gestureClass.getName();\r\n }", "String getActionName();", "private void showSnackBar(String message) {\n if(getActivity()!=null) {\n Snackbar snackbar = Snackbar.make(getActivity().findViewById(android.R.id.content),\n message, Snackbar.LENGTH_SHORT);\n View sbView = snackbar.getView();\n TextView textView = sbView\n .findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(ContextCompat.getColor(getActivity(), R.color.white));\n snackbar.show();\n }\n }", "private void showUndoSnackbar() {\n View view = ((Activity) this.context).findViewById(R.id.paletteActivity);\n\n Snackbar snackbar = Snackbar.make(view, R.string.undoColorShift,\n Snackbar.LENGTH_LONG);\n\n snackbar.setAction(\"UNDO\", v -> undoChange());\n snackbar.show();\n }", "private void makeSnack() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\t\t\n\t\tsnack = new Sprite(3, 3, 22, 25, new Image(\"file:./res/images/snack.png\"), 1, 1000);\n\t\tsnack.setLayoutX(150);\n\t\tsnack.setLayoutY(150);\n\t\tsnack.setScaleX(0.3);\n\t\tsnack.setScaleY(0.3);\n\t\tgrid.getChildren().addAll(snack);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(1500));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(snack);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().eatSnack();\n//\t\t\tif(!model.isHealthy()){\n//\t\t\t\tsetSickImg();\n//\t\t\t}\n\t\t});\n\t\tpause.play();\n\t\t\n\t}", "public void showBuddyUpDetails() {\n\n String tutorialText = getResources().getString(R.string.tutorial_buddy_up);\n if (SharedPref.getInstance().getBooleanValue(getActivity(), isbussiness)) {\n tutorialText = getResources().getString(R.string.tutorial_buddy_up_business);\n }\n ShowcaseView mShowcaseView = new ShowcaseView.Builder(getActivity())\n .setTarget(new ViewTarget(btn_buddyup))\n .hideOnTouchOutside()\n .setContentText(tutorialText)\n .setContentTextPaint(Utility.getTextPaint(getActivity()))\n .singleShot(AppConstants.TUTORIAL_BUDDY_UP_ID)\n .setStyle(R.style.CustomShowcaseTheme2)\n .build();\n mShowcaseView.setButtonText(getActivity().getString(R.string.tutorial_got_it));\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String message = String.valueOf(guardiansName.get(position));\n clickedGuardian = new String[]\n {String.valueOf(guardiansPhone.get(position)),\n String.valueOf(guardiansName.get(position)),};\n snackbar = Snackbar.make(getActivity().findViewById(R.id.myCoordinatorLayout), message, Snackbar.LENGTH_LONG);\n snackbar.setAction(R.string.Update, new UpdateGuardian());\n snackbar.show();\n }", "java.lang.String getThumbsDownLabel();", "java.lang.String getThumbsUpLabel();", "void onMessageToast(String string);", "boolean isShowLabelBackdrop();", "public void helpPressed() {\n Stage mainStage = (Stage)pane.getScene().getWindow();\n PresentationCtrl.getInstance().showNotification(\"Information\", \"Information\", null,\n \"- Click <Clear> button to clear the history\\n\\n- Click <Refresh> button to refresh the history\" +\n \"\\n\\n- Double clicks on a row to see the detailed information\", mainStage);\n }", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\tstr.add(\"tap\");\n\t\ttext1.setText(str.toString());\n\t\treturn true;\n\t}", "public String toString(){\n return String.format(\"[MessageBarHandler w/ msg:\\\"%s\\\"]\", getMsg());\n }", "protected void showTopSnackBar(String message, int bColor) {\n\n Snackbar snack = Snackbar.make(getWindow().getDecorView().findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n View snackbarView = snack.getView();\n snackbarView.setBackgroundColor(bColor);\n// TextView textView = (TextView) snackbarView.findViewById(com.androidadvance.topsnackbar.R.id.snackbar_text);\n// textView.setTextColor(Color.WHITE);\n// textView.setGravity(Gravity.CENTER_HORIZONTAL);\n// FrameLayout.LayoutParams params =(FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n// params.gravity = Gravity.TOP;\n// snackbarView.setLayoutParams(params);\n snack.show();\n }", "@Override\n public String getTitle() {\n return string(\"sd-l-toolbar\");\n }", "public interface GestureHandler {\r\n /**\r\n * It will be called when a specific gesture triggered.\r\n * You can implement the handler logic in this method. Such as , launch a application.\r\n * @param metaData GestureMetaData\r\n */\r\n void onActive(GestureMetaData metaData);\r\n\r\n /**\r\n * It will be called when the user release the finger in HOVER mode.\r\n * In this function you can release resource. Wait for the next called.\r\n */\r\n void onExit();\r\n\r\n /**\r\n * Return the gestureType if onActive is triggered. Otherwise return -1;\r\n * @return gestureType\r\n */\r\n int isActive();\r\n\r\n /**\r\n * Settings\r\n * @return\r\n */\r\n List<GestureHandlerSetting> settings();\r\n\r\n String name();\r\n\r\n int icon();\r\n\r\n}", "void setAvatarClickText(String title);", "private void SnackShowTop(String message, View view) {\n Snackbar snack = Snackbar.make(view, message, Snackbar.LENGTH_LONG);\n View view_layout = snack.getView();\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) view_layout.getLayoutParams();\n params.gravity = Gravity.TOP;\n view_layout.setLayoutParams(params);\n snack.show();\n }", "public static void showSnackBar(Context context, LinearLayout mainLayout, String msg, String btnText, int length){\n Resources resources = context.getResources();\n\n Snackbar snackbar = Snackbar\n .make(mainLayout, msg, length )\n .setAction(resources.getText(R.string.ok), new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n\n // Changing message text color\n snackbar.setActionTextColor(ContextCompat.getColor(context, R.color.home_yellow));\n\n // Changing action button text color\n View sbView = snackbar.getView();\n sbView.setBackgroundColor(ContextCompat.getColor(context, R.color.background_edittext));\n\n TextView textView = (TextView) sbView.findViewById(com.google.android.material.R.id.snackbar_text);\n textView.setTextColor(ContextCompat.getColor(context, R.color.edittext_text));\n textView.setMaxLines(5);\n snackbar.show();\n }", "private void showPermissionSnackbar() {\n Snackbar.make(\n findViewById(R.id.container), R.string.permission_explanation, Snackbar.LENGTH_LONG)\n .setAction(R.string.permission_explanation_action, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n requestFineLocationPermission();\n }\n })\n .show();\n }", "void onTopQDMPasteClicked();", "@Override\n public void onClick(DialogInterface dialog, int which) {\n mGestureLibrary.addGesture(edit_name.getText().toString(), gesture);\n mGestureLibrary.save();\n }", "private TreeItem<String> makeTemplateBranch(final String gestureName, final TreeItem<String> parent) {\n final TreeItem<String> item = new TreeItem<>(gestureName);\n item.setGraphic(ViewUtilities.iconSetter(Material.SHOW_CHART, IconDim.SMALL));\n parent.getChildren().add(item);\n return item;\n }", "String getAction();", "String getAction();", "private void createSnackbar(String message) {\n Snackbar.make(mLayout, message, Snackbar.LENGTH_LONG).show();\n }", "@Override\n public void onShowPress(MotionEvent e) {\n\n }", "@Override\n public void onShowPress(MotionEvent e) {\n\n }", "@Override\n\tprotected void onConfigrationTitleBar() {\n\t\tsetTitleBarTitleText(R.string.shujuxiazai);\n setTitleBarLeftImageButtonImageResource(R.drawable.title_back);\n\t}", "@Override\r\n\tpublic String getName() {\n\t\treturn \"PushToSwitch\";\r\n\t}", "void onAvatarLongClick(String username);", "@Override\n\t\t\t\tpublic void onShowPress(MotionEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void showLorenzoActionPopUp(String string) {\n\n }", "public static void showSnackBar(Context context, String msg) {\n\n Snackbar.make(((Activity) context).findViewById(android.R.id.content), \"\" + msg, Snackbar.LENGTH_LONG).show();\n }", "public void onTrackingStarted() {\n this.mFalsingManager.onTrackingStarted(!this.mKeyguardStateController.canDismissLockScreen());\n super.onTrackingStarted();\n if (this.mQsFullyExpanded) {\n this.mQsExpandImmediate = true;\n this.mNotificationStackScroller.setShouldShowShelfOnly(true);\n }\n int i = this.mBarState;\n if (i == 1 || i == 2) {\n this.mAffordanceHelper.animateHideLeftRightIcon();\n }\n this.mNotificationStackScroller.onPanelTrackingStarted();\n }", "@Override\n\t\tpublic void onShowPress(MotionEvent e) {\n\t\t\t\n\t\t}", "public void onSwipeTop() {\n if (moodNumber < Constants.tabSmiley.length - 1) {\n moodNumber++;\n swipeDisplay();\n }\n }", "public void setToolbarTitle() {\n Log.i(tag, \"set toolbar title\");\n this.toolbarGroupIcon.animate().alpha(0.0f).setDuration(150).setListener(null);\n this.toolbarTitle.animate().alpha(0.0f).setDuration(150).setListener(new AnimatorListener() {\n public void onAnimationStart(Animator animator) {\n }\n\n public void onAnimationEnd(Animator animator) {\n if (MainActivity.this.broadcastingToGroup) {\n MainActivity.this.toolbarTitle.setText(MainActivity.this.currentLight.getGroupName());\n } else {\n MainActivity.this.toolbarTitle.setText(MainActivity.this.currentLight.getName());\n }\n if (MainActivity.this.toolbarTitle.getLineCount() == 1) {\n MainActivity.this.toolbarTitle.setTextSize(MainActivity.this.toolbarTitleSize);\n } else if (MainActivity.this.toolbarTitle.getLineCount() > 1) {\n MainActivity.this.toolbarTitle.setTextSize(MainActivity.this.toolbarTitleSize - 6.0f);\n }\n MainActivity.this.toolbarTitle.animate().alpha(1.0f).setDuration(150).setListener(null);\n if (MainActivity.this.broadcastingToGroup) {\n MainActivity.this.toolbarGroupIcon.setVisibility(0);\n MainActivity.this.toolbarGroupIcon.animate().alpha(1.0f).setDuration(150).setListener(null);\n return;\n }\n MainActivity.this.toolbarGroupIcon.setVisibility(8);\n }\n\n public void onAnimationCancel(Animator animator) {\n }\n\n public void onAnimationRepeat(Animator animator) {\n }\n });\n }", "public abstract String getBarTitle();", "private String getLabel(MouseEvent e) {\n \n final JFrame parent = new JFrame();\n JButton button = new JButton();\n\n button.setText(\"Click me to show dialog!\");\n parent.add(button);\n //button.doClick();\n parent.pack();\n parent.setVisible(true);\n //String name;\n //button.doClick();\n //button.doClick();\n button.addActionListener(new java.awt.event.ActionListener() {\n @Override\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n label = JOptionPane.showInputDialog(parent,\n \"Set label for this segment\", null); \n \n getLabels().add(label);\n parent.dispose();\n //System.exit(0);\n //setLabel(name);\n //System.out.println(\"rectangle sizes = \"+startDrag.x+\",\"+ startDrag.y+\",\"+ e.getX()+\",\"+ e.getY()+\" = \"+label);\n }\n \n });\n button.doClick();\n \n \n return label;\n }", "@Override\n public void onClick(View v) {\n if(handler!=null){\n Message msg = new Message();\n Bundle bundle = new Bundle();\n bundle.putInt(\"data\", loc);\n msg.what = CHOICE_CONTROL_HEAD;\n msg.setData(bundle);\n handler.sendMessage(msg);\n }\n }", "private void showSnackbarMessage(String message){\n if(view != null){\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).show();\n }\n }", "Message buidMessage(CommandEvent event);", "@Override\n public void onClick(View view, int pos) {\n String tag = (String) view.getTag();\n Toast.makeText(XCArcMenuViewDemo.this, tag, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void help(CommandSender sender) {\n \n }", "void setupToolBar(String title) {\n setupToolBar(title, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n onBackPressed();\n }\n });\n }", "@Override\n\t\t\tpublic void onShowPress(MotionEvent arg0)\n\t\t\t{\n\t\t\t\t\n\t\t\t}", "private void popupRemoveTrap() {\n\n new AlertDialog.Builder(this)\n .setTitle(\"Remove \" + trap.getName())\n .setMessage(\"Do you really want to remove \" + trap.getName() + \"?\")\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int whichButton) {\n dialog.dismiss();\n\n Auth.getInstance().removeDeviceTopics(trap.getId(), new Runnable() {\n @Override\n public void run() {\n MqttClient.getInstance().connect();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n remove = true;\n finish();\n }\n });\n }\n });\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n }).show();\n }", "@Override // androidx.lifecycle.Observer\n public void onChanged(String str) {\n String str2 = str;\n if (str2 != null) {\n Views.showSnackBar$default(this.a.d, str2, 0, (String) null, 0, (Function0) null, (Function0) null, 0, 126, (Object) null);\n }\n }", "public void showSnackBar(final View view, final String message) {\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).show();\n }", "@Override\r\n public void onShowPress(MotionEvent e)\r\n {\n }", "@Override\n\tpublic void onShowPress(MotionEvent arg0) {\n\n\t}", "public void hintMessage1(View view) {\n makeAToast(R.string.question_1_hint);\n }", "@Override\n public void onShowPress(MotionEvent e) {\n\n }", "@Override\n\t\tpublic void onShowPress(MotionEvent e) {\n\n\t\t}", "public void shortPress();", "@Override\r\n\tpublic void onShowPress(MotionEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\t\t\n\t}", "private TreeItem<String> makeGestureBranch(final String gestureName, final TreeItem<String> parent) {\n final TreeItem<String> item = new TreeItem<>(gestureName);\n item.setGraphic(ViewUtilities.iconSetter(Material.GESTURE, IconDim.SMALL));\n // RICORSIVA CREO TUTTO L'ALBERO\n final List<List<Vector2D>> gestureDataset = this.recognizer.getGestureDataset(gestureName);\n for (int i = 0; i < gestureDataset.size(); i++) {\n this.makeTemplateBranch(\"Template: \" + (i + 1), item);\n }\n parent.getChildren().add(item);\n return item;\n }", "@Override\r\n\tpublic void onShowPress(MotionEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onShowPress(MotionEvent e) {\n\t\t\r\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent e) {\n\n\t}", "public String getInfobarMessage(){\r\n\t\treturn driver.findElement(By.xpath(\"//div[contains(@class,'x-gadget')]//div[contains(@class,'infobar bg-success')]\")).getText();\r\n\r\n\t}", "void onBottomQDMPasteClicked();", "public void onShutter() {\n }", "@Override\n\tpublic void showMessage(String hintMessage) {\n\t\tsuper.showMessage(hintMessage);\n\t}", "public abstract BossBar show();", "@Override\n\tpublic void onShowPress(MotionEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onShowPress(MotionEvent arg0) {\n\t\t\n\t}", "void showToast(String message);", "void showToast(String message);", "@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn \"展示\";\n\t\t\t}", "private void displaySnoozedInfo() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // Simply show current time and \"Snoozed Alarm\" as title\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"hh:mm aa\",\n Locale.getDefault());\n String formattedTime = sdf.format(System.currentTimeMillis());\n tvAlarmTime.setText(formattedTime);\n\n tvAlarmTitle.setText(R.string.snoozed_alarm);\n }\n });\n }", "public GestureSample(String name, Note gesture) {\r\n super();\r\n setName(name);\r\n setGesture(gesture);\r\n }", "public void setTitlePopup(String t) {\n/* 147 */ getCOSObject().setString(COSName.T, t);\n/* */ }", "@Override\n public void onShowPress(MotionEvent e) {\n super.onShowPress(e);\n\n }", "public StatusBar() {\n super();\n super.setPreferredSize(new Dimension(100, 16));\n setMessage(\"Ready\");\n }", "public void addScreenMessage(String msg);" ]
[ "0.65111494", "0.62998503", "0.62373686", "0.6100654", "0.59752285", "0.5923145", "0.58906233", "0.57881147", "0.5634411", "0.5619671", "0.5535776", "0.550068", "0.5495256", "0.5435931", "0.5427051", "0.52832806", "0.52818257", "0.5224643", "0.52015424", "0.5183922", "0.5155865", "0.5129287", "0.5117853", "0.51148355", "0.51057506", "0.5101153", "0.50891966", "0.5084591", "0.5074057", "0.50497884", "0.5027661", "0.5025714", "0.5023857", "0.50166476", "0.5014889", "0.5014889", "0.50131613", "0.5012236", "0.5008023", "0.50056887", "0.50054616", "0.49964622", "0.4995671", "0.499167", "0.49866277", "0.49735445", "0.4966249", "0.4963481", "0.49609804", "0.4959978", "0.495802", "0.49512517", "0.4947019", "0.49457234", "0.49392164", "0.49383342", "0.49350026", "0.49329606", "0.49307263", "0.49304634", "0.4927428", "0.49196297", "0.49192286", "0.49180347", "0.49158794", "0.49157083", "0.4913458", "0.49112043", "0.49104282", "0.49104282", "0.49104282", "0.49104282", "0.49104282", "0.49071038", "0.49055493", "0.49055493", "0.49014002", "0.49014002", "0.49014002", "0.49014002", "0.49014002", "0.49014002", "0.49014002", "0.49011683", "0.4900892", "0.48975387", "0.48970762", "0.48965636", "0.48965564", "0.48965564", "0.48965564", "0.48952094", "0.48952094", "0.48951465", "0.488153", "0.4876972", "0.4876442", "0.48753983", "0.48707438", "0.48682138" ]
0.69398075
0
Set the label with the gesture length
@Override public void setGestureLengthLabel(final GestureLength length) { this.labelGestureLength.setText("Gesture length: " + length.getFrameNumber()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changedisplayLengthLabel() {\n\t\taffectiveGraphPlot.changedisplayLengthLabel();\n\t}", "public void handleIncreaseLengthPowerup(){\n myRectangle.setWidth(myRectangle.getWidth()*increaseLengthPowerupSizeFactor);\n myLength=(int)(myLength*increaseLengthPowerupSizeFactor);\n }", "public void setLength(double length)\r\n {\r\n this.length = length;\r\n }", "public void setLength(double length){this.length=length;}", "public void setTextLength(short field_6_textLength)\n {\n this.field_6_textLength = field_6_textLength;\n }", "public void setLength(double length) {\r\n this.length = length;\r\n }", "public void setLength(long length);", "public void setLength(long length);", "public void setLength(double length) {\n this.length = length;\n }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "public void setLength(int length) {\r\n this.length = length;\r\n }", "void setLength(int length);", "public void setLength(int length)\n {\n this.length = length;\n }", "public void setLabelSize(int labelSize)\n {\n myLabelSize = labelSize;\n }", "public void setLength(long length) { \n this.length = length; \n }", "public void setLength(int length) {\r\n\t\tthis.length = length;\r\n\t}", "public void setLength(double length) {\n\t\tthis.length = length;\n\t}", "@Override\n\tpublic void setLength(int length) {\n\t\t\n\t}", "void setLength( long length );", "public void setLength(float length) { // l = 2.3\r\n\t\tthis.length = length; // length = 2.3\r\n\t\t\r\n\t}", "@Override\n public void setVisibleLength(int length) {}", "public void updateOutputLabels(Integer charCount){\r\n\t\tview.lblOutputLengthValue.setText(charCount.toString());\r\n\t}", "private void setTextAreaLenght(int len) {\n // check for logical error\n if(len <= 0) {\n // error ..\n eHandler.newError(ErrorType.INVALID_ARGUMENT, \"setTextAreaLenght\", \"Zero or negative lenght\");\n\n // set to default\n textAreaLenght = DEFAULT_TEXT_AREA_LENGHT;\n\n // exit from method\n return;\n } // end of if statement\n\n // set the textAreaLenght\n textAreaLenght = len;\n\n }", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public void setLength(int length) {\n\t\tthis.length = length;\n\t}", "public int getLabelTextSize(){\n return labelTextSize;\n }", "private void setupLabelUI(Label l, String ff, double f, double w, Pos p, double x, double y) {\n\t\tl.setFont(Font.font(ff, f));\n\t\tl.setMinWidth(w);\n\t\tl.setAlignment(p);\n\t\tl.setLayoutX(x);\n\t\tl.setLayoutY(y);\n\t}", "public void setLength(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), LENGTH, value);\r\n\t}", "public void setLength(long length) {\r\n\t\tthis.length = length;\r\n\t}", "default void setLength(double t) {\r\n scaleDirection(t / getLength());\r\n }", "public void setLength(double newLength) {\n length = newLength;\n }", "public void setLblWidth(int width) {\n lblWidth = width;\n }", "public ModernAutoSizeLabel(String text, int width) {\r\n super(text, width);\r\n }", "synchronized void setLength(int length) {\n this.length = length;\n }", "public void addLength(java.lang.String value) {\r\n\t\tBase.add(this.model, this.getResource(), LENGTH, value);\r\n\t}", "private void setBarLenght(int len) {\n // check for logical error\n if(len <= 0) {\n // error ..\n eHandler.newError(ErrorType.INVALID_ARGUMENT, \"setBarLenght\", \"Zero or negative bar lenght\");\n\n // set to default\n barLenght =DEFAULT_BAR_LENGH;\n\n // exit from method\n return;\n } // end of if statement\n\n // set the barLenght\n barLenght = len;\n\n }", "public int getLabelSize()\n {\n return myLabelSize;\n }", "public void setLength(int duration){\n\t\tlength = duration;\n\t}", "String updateSliderLabel() {\n if (this.direction.equals(\"H\"))\n return \"Percentage of Width : \";\n if (this.direction.equals(\"V\"))\n return \"Percentage of Height : \";\n return \"/!\\\\ Direction issue! Please relaunch the App /!\\\\\";\n }", "void setLabelString() {\n int pad = 5; // fudge to make up for variable width fonts\n float maxVal = Math.max(Math.abs(min), Math.abs(max));\n intDigits = Math.round((float) (Math.log(maxVal) / Math.log(10))) + pad;\n if (min < 0) {\n intDigits++; // add one for the '-'\n }\n // fractDigits is num digits of resolution for fraction. Use base 10 log\n // of scale, rounded up, + 2.\n fractDigits = (int) Math.ceil((Math.log(scale) / Math.log(10)));\n nf.setMinimumFractionDigits(fractDigits);\n nf.setMaximumFractionDigits(fractDigits);\n String value = nf.format(current);\n while (value.length() < (intDigits + fractDigits)) {\n value = value + \" \";\n }\n valueLabel.setText(value);\n }", "public void setLength(Double newlength)\n {\n length = newlength;\n }", "public void setCurrentLength(long currentLength) { \n this.currentLength = currentLength; \n }", "private void updateLabelText() {\n /*\n r18 = this;\n android.view.View r13 = r18.getNativeView()\n android.widget.TextView r13 = (android.widget.TextView) r13\n if (r13 != 0) goto L_0x0009\n L_0x0008:\n return\n L_0x0009:\n boolean r7 = r18.isSingleLine()\n r0 = r18\n float r0 = r0.minimumFontSizeInPixels\n r16 = r0\n r17 = 1036831949(0x3dcccccd, float:0.1)\n int r16 = (r16 > r17 ? 1 : (r16 == r17 ? 0 : -1))\n if (r16 < 0) goto L_0x00f6\n r3 = 1\n L_0x001b:\n r8 = r3\n r13.setSingleLine(r7)\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x00f9\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n r13.setLines(r0)\n L_0x0032:\n if (r7 == 0) goto L_0x0102\n r16 = 1\n r0 = r16\n r13.setMaxLines(r0)\n L_0x003b:\n r0 = r18\n java.lang.CharSequence r11 = r0.originalText\n if (r11 != 0) goto L_0x0135\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n java.lang.String r16 = \"\"\n r0 = r16\n r11.<init>(r0)\n r12 = r11\n L_0x004b:\n if (r8 == 0) goto L_0x0132\n int r16 = r12.length()\n if (r16 <= 0) goto L_0x0132\n r2 = 0\n L_0x0054:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x006c\n char r10 = r12.charAt(r2)\n r16 = 13\n r0 = r16\n if (r10 == r0) goto L_0x006c\n r16 = 10\n r0 = r16\n if (r10 != r0) goto L_0x012b\n L_0x006c:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x0132\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n r16 = 0\n r0 = r16\n r11.<init>(r12, r0, r2)\n L_0x007d:\n boolean r0 = r11 instanceof android.text.Spannable\n r16 = r0\n if (r16 != 0) goto L_0x0089\n android.text.SpannableStringBuilder r12 = new android.text.SpannableStringBuilder\n r12.<init>(r11)\n r11 = r12\n L_0x0089:\n r1 = 0\n r0 = r18\n int r0 = r0.autoLinkFlags\n r16 = r0\n if (r16 == 0) goto L_0x00a0\n r16 = r11\n android.text.Spannable r16 = (android.text.Spannable) r16\n r0 = r18\n int r0 = r0.autoLinkFlags\n r17 = r0\n boolean r1 = android.text.util.Linkify.addLinks(r16, r17)\n L_0x00a0:\n if (r1 == 0) goto L_0x012f\n android.text.method.MovementMethod r9 = android.text.method.LinkMovementMethod.getInstance()\n L_0x00a6:\n android.text.method.MovementMethod r16 = r13.getMovementMethod()\n r0 = r16\n if (r9 == r0) goto L_0x00c6\n boolean r5 = r13.isFocusable()\n boolean r4 = r13.isClickable()\n boolean r6 = r13.isLongClickable()\n r13.setMovementMethod(r9)\n r13.setFocusable(r5)\n r13.setClickable(r4)\n r13.setLongClickable(r6)\n L_0x00c6:\n r0 = r18\n android.text.TextUtils$TruncateAt r14 = r0.ellipsize\n if (r9 == 0) goto L_0x00da\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.START\n r0 = r16\n if (r14 == r0) goto L_0x00d8\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MIDDLE\n r0 = r16\n if (r14 != r0) goto L_0x00da\n L_0x00d8:\n android.text.TextUtils$TruncateAt r14 = android.text.TextUtils.TruncateAt.END\n L_0x00da:\n r13.setEllipsize(r14)\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MARQUEE\n r0 = r16\n if (r14 != r0) goto L_0x00ea\n r16 = 1\n r0 = r16\n r13.setSelected(r0)\n L_0x00ea:\n android.widget.TextView$BufferType r16 = android.widget.TextView.BufferType.NORMAL\n r0 = r16\n r13.setText(r11, r0)\n r13.requestLayout()\n goto L_0x0008\n L_0x00f6:\n r3 = 0\n goto L_0x001b\n L_0x00f9:\n r16 = 0\n r0 = r16\n r13.setMinLines(r0)\n goto L_0x0032\n L_0x0102:\n r0 = r18\n int r0 = r0.maxLines\n r16 = r0\n if (r16 <= 0) goto L_0x0129\n r0 = r18\n int r15 = r0.maxLines\n L_0x010e:\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x0124\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n if (r15 <= r0) goto L_0x0124\n r0 = r18\n int r15 = r0.viewHeightInLines\n L_0x0124:\n r13.setMaxLines(r15)\n goto L_0x003b\n L_0x0129:\n r15 = 1\n goto L_0x010e\n L_0x012b:\n int r2 = r2 + 1\n goto L_0x0054\n L_0x012f:\n r9 = 0\n goto L_0x00a6\n L_0x0132:\n r11 = r12\n goto L_0x007d\n L_0x0135:\n r12 = r11\n goto L_0x004b\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p006ti.modules.titanium.p007ui.widget.TiUILabel.updateLabelText():void\");\n }", "public void\nsetNewLabel(Font font, double nucLineLength)\nthrows Exception\n{\n\tthis.setNewLabel(font,\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(),\n\t\tnucLineLength, Color.black, this.getID());\n}", "double width () {\n Text text = new Text(event.name);\n text.setStyle(this.getStyle());\n return text.getBoundsInLocal().getWidth() * 1.5;\n }", "private void setupSpellHereLabel(){\n\t\tJLabel spell_here_text = new JLabel(\"SPELL HERE\");\n\t\tspell_here_text.setFont(new Font(\"Arial\", Font.BOLD, 45));\n\t\tspell_here_text.setForeground(new Color(254, 157, 79));\n\t\tadd(spell_here_text);\n\t\tspell_here_text.setBounds(32, 484, 332, 74);\n\t\tspell_here_text.setOpaque(false);\n\t}", "@FXML\r\n private void updateNumDotsLabel() {\r\n numDotsLabel.setText(\"Number of Dots: \" + picture.getNumDots());\r\n }", "public void\nsetNewLabel()\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(\n\t\tnew Font(\"Helvetica\", Font.PLAIN, 12),\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(),\n\t\tlineLength, Color.black, this.getID());\n}", "public void setLabel()\r\n {\r\n int i = Converter(Input);\r\n \r\n if(j<i && label.getText().equals(\"Player 1\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n \r\n }else if(j<i && label.getText().equals(\"Player 2\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j<i && label.getText().equals(\"Player 3\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j==i && label.getText().equals(\"Player \"+j))\r\n {\r\n j=1;\r\n label.setText(\"Player \"+j);\r\n }\r\n \r\n \r\n }", "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 void setNewickLength(Double newnewicklength)\n {\n newicklength = newnewicklength; \n }", "public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }", "public void setSizeLabel(String value) {\n setAttributeInternal(SIZELABEL, value);\n }", "public void setLength(int length) {\n\t\tloadProgress.setLength(length);\n\t}", "public void setFrequencyLabel() {\n float freq = getFrequency();\n if (harmonic.isSelected()) {\n frequency.setText(\n decimalFormat.format(freq) +\n \"(/\" +\n decimalFormat.format(freq*2f) +\n \") Hz\" );\n } else {\n frequency.setText( decimalFormat.format(freq) + \" Hz\" );\n }\n }", "public void set_length(short value) {\n setUIntElement(offsetBits_length(), 8, value);\n }", "public void dynamicQuantityLabelSetUp(ListView<Ingredient> lv, Label label){\n lv.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Ingredient>() {\n //use the changeListener to determine when a new ingredient has been selected\n @Override\n public void changed(ObservableValue<? extends Ingredient> observableValue, Ingredient ingredient, Ingredient t1) {\n if (t1 != null){\n //if the new ingredient selected is not null then\n //get the Quantity name from the selected ingredient in the listView\n Ingredient selectedIngredient = lv.getSelectionModel().getSelectedItem();\n String quantityName = selectedIngredient.getQuantityName();\n label.setText(quantityName);\n }\n }\n });\n }", "public int getLblWidth() {\n return lblWidth;\n }", "public boolean setLength(double Length);", "public void setLabelTextSize(float labelTextSizeSp) {\n chassisView.setLabelTextSize(labelTextSizeSp);\n }", "public void setlblMoveText(String text){\n \t moveTimer = new Timer(45, new ActionListener() {\n\t\t\t\tint charIndex = 0;\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t String labelText = lblMoveText.getText();\n\t\t labelText += text.charAt(charIndex);\n\t\t lblMoveText.setText(labelText);\n\t\t charIndex++;\n\t\t if (charIndex >= text.length()) {\n\t\t moveTimer.stop();\n\t\t }\t\n\t\t\t\t} \n });\n moveTimer.start();\n\t}", "@Override\n\tpublic void onLongPress(MotionEvent e) {\n\t\tstr.add(\"longpress\");\n\t\ttext1.setText(str.toString());\n\t\tLog.d(\"long\",\"longpress\");\n\t}", "private void setTweetTextListener() {\n mTvTweetLength.setTextColor(Color.BLACK);\n mEtTweet.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n long length = 0;\n if (s.length() > 140) {\n mTvTweetLength.setTextColor(Color.RED);\n length = 140 - s.length();\n mBtnTweet.setEnabled(false);\n } else {\n mTvTweetLength.setTextColor(Color.BLACK);\n length = s.length();\n mBtnTweet.setEnabled(true);\n }\n\n mTvTweetLength.setText(Long.toString(length));\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n }", "public void setLength(){\n this.length = 0;\n for (Music track : this.tracks){\n this.length += track.getLength();\n }\n }", "@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\t\n\t\tif(now_X == 'X' && now_Y == 'X') {\n\t\t\tselected_Label.setLocation(e.getXOnScreen()-now_x, e.getYOnScreen()-now_y);\n\t\t} else {\n\t\t\tif(now_X == 'R') {\n\t\t\t\tselected_Label.setSize(now_w-now_x+e.getXOnScreen() - selected_Label.getX(), selected_Label.getHeight());;\n\t\t\t} else if(now_X == 'L') {\n\t\t\t\tselected_Label.setBounds(e.getXOnScreen()-now_x, selected_Label.getY(), now_L - e.getXOnScreen() + now_x, selected_Label.getHeight());\n\t\t\t}\n\t\t\t\n\t\t\tif(now_Y == 'D') {\n\t\t\t\tselected_Label.setSize(selected_Label.getWidth(), now_h-now_y+e.getYOnScreen() - selected_Label.getY());;\n\t\t\t} else if(now_Y == 'U') {\n\t\t\t\tselected_Label.setBounds(selected_Label.getX(), e.getYOnScreen()-now_y, selected_Label.getWidth(), now_D - e.getYOnScreen() + now_y);\n\t\t\t}\n\t\t}\n\t\t\n\t\tText_Set();\n\t\t\n\t\tLine_set();\n\t\t\n\t\trepaint();\n\t}", "ReadOnlyStringProperty labelMaximumProperty();", "public Builder setLength(int value) {\n \n length_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic void shorter() {\n\t\tsuper.shorter();\r\n\t\twordSize = (int) Math.max((Math.abs(x2 - x1) + Math.abs(y2 - y1)) / 3, 2);\r\n\t}", "public void setLength(Point e) {\r\n int Dx = Math.abs(this.origin.getX() - e.getX());\r\n int Dy = Math.abs(this.origin.getY() - e.getY());\r\n if (Dx > Dy) {\r\n this.length = Dx;\r\n } else { this.length = Dy; }\r\n }", "public void setMarkerLength(int length) {\n\t\tm_nMarkerLength = length;\n\t}", "public void setLength(double len) throws IllegalArgumentException\n {\n if (len<0) throw new IllegalArgumentException (\"Length cannot be negative\" + len);\n else length = len;\n }", "public void setLength(int length){\n\t\tif(length > 0){\n\t\t\tthis.length = length; //this.length is the length were in right now. and = length is the length the object is given\n\t\t}\n\t\t\n\t\t\n\t}", "public int getTextLength();", "int getTextLength();", "public void setLabel(double label) {\n\t\tthis.label = label;\n\t}", "public ModernAutoSizeLabel(String text) {\r\n super(text, TEXT_COLOR);\r\n }", "public void setLength( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), LENGTH, value);\r\n\t}", "private void rescaleLabels() {\n // TJJ Nov 2018 - make sure labels scale correct on any changes\n // to the ring display\n ViewManager vm = getViewManager();\n rangeRings.setLabelSize(vm.getMaster().getDisplayScale());\n }", "protected void setupVolumeLabel() {\n\t\tlabelPanel.add(getItemCombo(), \"growx, span 4, wrap\");\n\t\t//labelPanel.add(new JXLabel(UIUtils.unitsVolume), \"wrap\");\n\t\t\n\t\tvolumeLabel = new JXLabel(\"V = \");\n\t\t\n\t\tlabelPanel.add(volumeLabel);\n\t\tlabelPanel.add(getVolumeValueLabel(), \"width 60::60\");\n\t\tlabelPanel.add(new JXLabel(UIUtils.unitsVolume), \"wrap\");\n\t}", "public void setDataLength(int length) {\n // should be below 255, check!\n m_DataLength = length + 2;\n }", "public void setWidth(final String value)\n {\n width = value;\n }", "void setAxisLength(CalibratedAxis axis, long length);", "private void setPrefSizeForText()\n {\n double prefW = getSuggestedPrefWidth();\n double prefH = _textArea.getPrefHeight();\n setPrefSize(prefW, prefH);\n }", "@Override\n\tpublic void SetLength(long value)\n\t{\n\t\tthrow new UnsupportedOperationException(\"TarInputStream SetLength not supported\");\n\t}", "private void setUpNutritionLabel(Label l1, String color, String text){\n l1.setText(text);\n l1.setTextFill(Paint.valueOf(color));\n l1.setFont(InterfaceStyling.systemFont);\n }", "@Override\n public void mouseDragged(MouseEvent e){\n newLabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }", "public void updateText()\r\n\t{\r\n\t\tdouble smallest = Math.min(menu.getController().getWidth(), menu.getController().getHeight());\r\n\t\tdouble equivalent12 = smallest/55;//Equivalent of 12 point font on base dimensions\r\n\t\t\r\n\t\ttextRenderer = new TextRenderer(new Font(fontName, Font.PLAIN, (int)(equivalent12*size)), true, true);\r\n\t}", "public void zoomToLength(int length) {\n zoomToLength(length, (getRangeEnd()+ 1 + getRangeStart()) / 2); // + 1 because ranges are inclusive\n }", "public void setXLength(int length) {\n this.xLength = length;\n }", "public ExtractedSummarySentence setLength(int length) {\n this.length = length;\n return this;\n }", "public void setNodeLabelMaxChar(Integer value) {\n nodeLabelMaxChar = value;\n shortenNodeLabels();\n }", "public void setLabel( String label )\n { \n this.label = label;\n show_text();\n }", "public void setLabelText(String text);", "@Override\r\n\tpublic void keyReleased(KeyEvent e) {\n\t\tString text = area.getText();\r\n\t\tString words[]= text.split(\"\\\\s\");\r\n\t\tl.setText(\"Words:\"+words.length+\"Characters:\"+text.length());\r\n\t}", "public ModernAutoSizeLabel(String text, Dimension size) {\r\n super(text, size);\r\n }", "public void setLength(int length) {\n\t\tif (length <= 0)\n\t\t\tthrow new IllegalArgumentException(\"length must be > 0\");\n\n\t\tthis.length = length;\n\t}", "@Override\n @SimpleProperty()\n public void Width(int width) {\n if (width == LENGTH_PREFERRED) {\n width = LENGTH_FILL_PARENT;\n }\n super.Width(width);\n }", "void setText(int offset, int length, String newText)\n\t{\n\t}", "ReadOnlyStringProperty labelMinimumProperty();" ]
[ "0.6700771", "0.60444385", "0.59759825", "0.5973929", "0.5961187", "0.5958354", "0.59106666", "0.59106666", "0.59076816", "0.58757675", "0.58757675", "0.58624953", "0.585553", "0.5830538", "0.5818392", "0.57755643", "0.57692623", "0.5758101", "0.5699112", "0.56948715", "0.568575", "0.5667942", "0.56614053", "0.56586206", "0.56586206", "0.56586206", "0.5652381", "0.56426924", "0.56408453", "0.56359315", "0.56243163", "0.5590047", "0.55727595", "0.5552961", "0.55018014", "0.54836094", "0.5454554", "0.54541504", "0.54383785", "0.5420368", "0.54061717", "0.54041064", "0.5393398", "0.5373839", "0.53378725", "0.5337648", "0.5295421", "0.5294899", "0.5287956", "0.5282659", "0.52775514", "0.52736586", "0.52649504", "0.5258469", "0.5222679", "0.5221378", "0.52210855", "0.52197826", "0.5206302", "0.5199454", "0.51968926", "0.5196445", "0.51830024", "0.5178294", "0.517631", "0.51745677", "0.51698095", "0.5147772", "0.51432586", "0.51389986", "0.51170635", "0.51086456", "0.5096197", "0.50959", "0.5091467", "0.5082856", "0.50690866", "0.5057766", "0.5048423", "0.50479585", "0.5035051", "0.5034971", "0.50316924", "0.5027732", "0.5025511", "0.50254476", "0.5022642", "0.50201154", "0.5019107", "0.50190157", "0.501894", "0.5010121", "0.50093925", "0.49993345", "0.49914896", "0.49797118", "0.4978707", "0.4969663", "0.49693358", "0.49681818" ]
0.8306216
0
TO RECOGNIZER (RECOGNITION VIEW)
@Override public void loadUserProfile(final String name) { try { // Load the actual user this.recognizer.loadUserProfile(name); } catch (final IOException e1) { ViewUtilities.showNotificationPopup("User Dataset not found", "Regenerating it", Duration.MEDIUM, // NOPMD NotificationType.ERROR, t -> e1.printStackTrace()); } catch (final JsonSyntaxException e2) { ViewUtilities.showNotificationPopup("Json file changed by human!", "Please click to se exception", Duration.MEDIUM, // NOPMD NotificationType.ERROR, t -> e2.printStackTrace()); } // Set User name in scroll bar ((Label) this.userScrollPane.getBottomBar().getChildren().get(0)).setText(name); // Load user gestures ViewUtilities.showSnackBar((Pane) this.recorderPane.getCenter(), "Database loaded and Gesture updated!", Duration.MEDIUM, DimDialogs.SMALL, null); // Create the gesture tree representation. this.createGestureTreeView(this.recognizer.getUserName()); // Initialize the gesture length. this.gestureLength = this.recognizer.getUserGestureLength(); // Initialize Charts this.setChart(this.gestureLength.getFrameNumber(), this.gestureLength.getFrameNumber()); this.startButton.setDisable(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void toRent() {\n }", "@Override\n public void onRecognition(Transaction transaction, Recognition recognition) {\n }", "private void recognize() {\n //Setup our Reco transaction options.\n Transaction.Options options = new Transaction.Options();\n options.setDetection(resourceIDToDetectionType(R.id.long_endpoint));\n options.setLanguage(new Language(\"eng-USA\"));\n options.setEarcons(startEarcon, stopEarcon, errorEarcon, null);\n\n //Add properties to appServerData for use with custom service. Leave empty for use with NLU.\n JSONObject appServerData = new JSONObject();\n //Start listening\n recoTransaction = speechSession.recognizeWithService(\"M10253_A3221\", appServerData, options, recoListener);\n }", "@Override\n\tpublic void rotiereNachRechts() {\n\n\t}", "public void setupRevive(GameView gameView)\n {\n for(ReviveObserver ro : reviveObservers)\n {\n ro.update(gameView);\n }\n //gameView.getPlayerInstance().revive();\n //gameView.resume();\n\n gameView.resume();\n\n\n\n\n\n }", "@Override\n\t\tpublic void viewAccepted(View joiner) {\n\t\t}", "public interface ITraineView {\n}", "@Override\r\n\tpublic void voar() {\n\t\t\r\n\t}", "public void takeTurn(IViewRequestor requestor);", "@Override\n\tpublic void afficherRendezvous(Rendezvous rv) {\n\t\tSystem.out.println(\"client à un nom: \" + rv.getNom());//affiche le nom du client\n\t\tSystem.out.println(\"l'heure du rendezvous est de ...a : \" + rv.getHeure());//affiche lheure du rendez vous du client\n\t\tSystem.out.println(\"le rendezvous aura lieu de .. a: \" + rv.getDate());//affiche la date du rendez vous\n\t\tSystem.out.println(\"le telephone du client du client est: \" + rv.getTelephone());//affiche le telephone du client\n\t\tSystem.out.println(\"le type de soin du client: \"+ rv.getSoins()); //affiche le type de soin du client\n\t\t// TODO Auto-generated method stub\n\n\t}", "public void emitChangeView() {\n \n int view = getCurrentViewNumber();\n Object lpid = getLocalServerID();\n \n JDSUtility.debug(\"[emitChangeView()] s\" + lpid + \", at time \" + getClockValue() + \", is going to emit a change view message for (v + 1 = \" + (view + 1) + \")\");\n\n /* the replica makes sure that no timer is currently working. If the view change was trigged by a suspect of failure of the primary then probably it's \n been already true. */\n revokeSendBatch();\n revokeViewChange();\n\n /* an exponetial timeout has to be considered to guarantee liveness when the end-to-end delay is too long (it's prevent uncessary view-changes)*/\n PBFTTimeoutDetector ttask = (PBFTTimeoutDetector) getViewTimer().getTask();\n long timeout = (Long) ttask.get(\"TIMEOUT\");\n ttask.put(\"TIMEOUT\", 2 * timeout);\n\n /* the replica moves to the next view. After that, this replica isn't accepting any message from view v < v+1. */\n setCurrentViewNumber(view +1);\n \n /* clean-up the sets P (prepare set) and Q (pre-prepare set)*/\n preprepareset.clear();\n prepareset.clear();\n\n long lcwm = getLCWM();\n long hcwm = getHCWM();\n\n /* compute Q (pre-prepare set) and P (prepare set) */\n for(long seqn = lcwm + 1; seqn <=hcwm; seqn++){\n /*If I have a prepare then its digests will be added to pre-prepared and prepared sets */\n PBFTPrepare pr = getPrepareInfo().get(lpid, seqn);\n if(pr != null){\n PBFTPrePrepare pp = new PBFTPrePrepare(view, pr.getSequenceNumber(), null);\n pp.getDigests().addAll(pr.getDigests());\n preprepareset.add(pp);\n \n prepareset.add(new PBFTPrepare(pp, null));\n\n for(String digest: pp.getDigests()){\n getRequestInfo().assign(digest, RequestState.WAITING);\n getRequestInfo().assign(digest, (Long)null);\n }\n\n continue;\n }\n\n /*If I have a pre-prepare then its digests will be added to pre-prepared set*/\n PBFTPrePrepare ppr = getPrePrepareInfo().get(seqn);\n if(ppr != null){\n PBFTPrePrepare pp = new PBFTPrePrepare(view, ppr.getSequenceNumber(), null);\n pp.getDigests().addAll(ppr.getDigests());\n preprepareset.add(pp);\n \n for(String digest: pp.getDigests()){\n getRequestInfo().assign(digest, RequestState.WAITING);\n getRequestInfo().assign(digest, (Long)null);\n }\n } \n }\n\n \n try{\n doRollback();\n }catch(Exception e){\n e.printStackTrace();\n }\n\n /* update the controls for sequence number execution */\n getStateLog().setNextPrePrepareSEQ(lcwm + 1);\n getStateLog().setNextExecuteSEQ (lcwm + 1);\n\n PBFTChangeView cv = createChangeViewMessage();\n \n try {\n /* gets the root of the checkpoint partition tree */\n PartEntry centry = rStateManager.getPart(0, 0);\n\n /* adds the pair (last stable sequence number and state digest) to compose checkpoint set C */\n if(centry != null){\n cv.addCheckpoint(centry.getPartCheckpoint(), centry.getDigest());\n }else{\n cv.addCheckpoint(lcwm, \"\");\n }\n } catch (Exception ex) {\n Logger.getLogger(PBFTServer.class.getName()).log(Level.SEVERE, null, ex);\n cv.getCheckpointSet().clear();\n cv.addCheckpoint(lcwm, \"\");\n }\n\n /* add the pre-prepare set to current change-view message*/\n cv.getPrePrepareSet().clear();\n cv.getPrePrepareSet().addAll(preprepareset);\n\n /* add the prepare set to current change-view message*/\n cv.getPrepareSet().clear();\n cv.getPrepareSet().addAll(prepareset);\n\n /*emit the change view message to group of replicas */\n emit(cv, getLocalGroup().minus(getLocalProcess()));\n\n getChangeViewInfo().setMinimumViewNumber(view);\n getChangeViewInfo().put(cv);\n\n if(isPrimary()){\n getNewViewConstructor().addChangeView(cv);\n }else{\n finalizeNewViewConstructor();\n }\n\n getChangeViewInfo().gc(view);\n getChangeViewACKInfo().gc(view);\n getNewViewConstructor().gc(view);\n getNewViewInfo().gc(view);\n getPrePrepareInfo().gc(view);\n getPrepareInfo().gc(view);\n getPrePreparebackupInfo().gc(view);\n getCommitInfo().gc(view);\n\n\n emitChangeViewACK();\n\n\n uncertanty = true; \n }", "@Override\n\tpublic void RecevoireRequete(Requete requete) {\n\t\tSystem.out.println(\"from \" + requete.getExpediteur().getNom() + \" to \" + requete.getDestinataire());\n\t}", "public void viewAccepted(View new_view) {\n this.view=new_view;\n log.trace(\"[Relayer \" + channel.getAddress() + \"] view: \" + new_view);\n\n Map<String,List<Address>> tmp=extract(new_view);\n Set<String> down=new HashSet<>(routes.keySet());\n Set<String> up=new HashSet<>();\n\n down.removeAll(tmp.keySet());\n\n routes.keySet().retainAll(tmp.keySet()); // remove all sites which are not in the view\n\n for(Map.Entry<String,List<Address>> entry: tmp.entrySet()) {\n String key=entry.getKey();\n List<Address> val=entry.getValue();\n\n List<Route> newRoutes;\n if(routes.containsKey(key))\n newRoutes=new ArrayList<>(routes.get(key));\n else {\n newRoutes=new ArrayList<>();\n if(up != null)\n up.add(key);\n }\n\n // Remove routes not in the view anymore:\n newRoutes.removeIf(route -> !val.contains(route.siteMaster()));\n\n // Add routes that aren't yet in the routing table:\n val.stream().filter(addr -> !contains(newRoutes, addr))\n .forEach(addr -> newRoutes.add(new Route(addr, channel, relay, log).stats(stats)));\n\n if(newRoutes.isEmpty()) {\n routes.remove(key);\n down.add(key);\n up.remove(key);\n }\n else\n routes.put(key, Collections.unmodifiableList(newRoutes));\n }\n if(!down.isEmpty())\n relay.sitesChange(true, down.toArray(new String[0]));\n if(!up.isEmpty())\n relay.sitesChange(false, up.toArray(new String[0]));\n }", "public String soumettreRv(){\n\t\t// Traitement ici ...\n\t\t// Un exemple d'utilisation du service\n\t\tserviceRv.ajouterRendezVous(this.getRv());\n\t\treturn REDIRECT;\n\t}", "@Override\n public void onGetResult(VoiceRecognizerResult result) {\n mResultTv.setText(\"(\" + result.text + \")\");\n\n if (result.isEnd) {\n mRecoState = 0;\n updateBtn(mRecoState);\n }\n }", "com.google.wireless.android.sdk.stats.FilterMetadata.View getActiveView();", "ReferenceRealization createReferenceRealization();", "@Override\n\tvoid addRedBroder() {\n\t\t\n\t}", "@Override\n\tpublic VType getTarget() {\n\t\t// TODO: Add your code here\n\t\treturn super.to;\n\t}", "public interface View {\n\t\n\tpublic DifferenceOperators getOperator();\n\tpublic double getUtility(DistanceMetric distanceMetric);\n\tpublic double getUtility(DistanceMetric distanceMetric,\n\t\t\tboolean normalizeDistributions);\n //Added by Himos\n public double getUtilitywithfunc(DistanceMetric distanceMetric, Constants.AggregateFunctions AGF,\n\t\t\tboolean normalizeDistributions);\n\tpublic List<View> constituentViews();\n \n // public String getHighFunction(); \n\t//public View getTopDifferent();\n\n}", "public void receiveResultrayTraceSubView(\n RayTracerStub.RayTraceSubViewResponse result\n ) {\n }", "java.lang.String getRecognizerId();", "private void doChangeSceneMode(CameraExtension.SceneRecognitionResult sceneRecognitionResult) {\n RecognizedScene recognizedScene = RecognizedScene.create(sceneRecognitionResult.sceneMode);\n int n = recognizedScene.getIconId();\n int n2 = recognizedScene.getTextId();\n if (n <= 0 || n2 <= 0) {\n if (!sceneRecognitionResult.isMacroRange) {\n this.mSceneIndicatorIcon.setVisibility(4);\n this.mSceneIndicatorText.setVisibility(4);\n this.mSceneIndicatorIcon.setImageDrawable(null);\n this.mSceneIndicatorText.setText(null);\n return;\n }\n n = 2130837635;\n n2 = 2131361835;\n }\n this.mSceneIndicatorIcon.setImageResource(n);\n Animation animation = AnimationUtils.loadAnimation((Context)this.mActivity, (int)2130968586);\n this.mSceneIndicatorIcon.startAnimation(animation);\n this.mSceneIndicatorIcon.setRotation(RotationUtil.getAngle(this.getOrientationForUiNotRotateInRecording()));\n this.mSceneIndicatorIcon.setVisibility(0);\n if (this.getOrientationForUiNotRotateInRecording() != 2) {\n this.mSceneIndicatorText.setText(null);\n this.mSceneIndicatorText.setVisibility(4);\n return;\n }\n this.mSceneIndicatorText.setText(n2);\n this.mSceneIndicatorText.setVisibility(0);\n AlphaAnimation alphaAnimation = (AlphaAnimation)AnimationUtils.loadAnimation((Context)this.mActivity, (int)2130968584);\n if (this.mSceneIndicatorTextRunnable == null) {\n this.mSceneIndicatorTextRunnable = new Runnable(){\n\n public void run() {\n if (FastViewFinder.this.mSceneIndicatorText != null) {\n FastViewFinder.this.mSceneIndicatorText.setVisibility(4);\n }\n }\n };\n }\n this.mSceneIndicatorText.removeCallbacks(this.mSceneIndicatorTextRunnable);\n this.mSceneIndicatorText.postDelayed(this.mSceneIndicatorTextRunnable, alphaAnimation.getStartOffset() + alphaAnimation.getDuration());\n this.mSceneIndicatorText.setVisibility(0);\n }", "void mo6505cu(View view);", "@Override\r\n\tpublic void onReCalculateRouteForTrafficJam() {\n\r\n\t}", "public self tog() {\n\t\tfor (X vaporView : members)\n\t\t\tvaporView.tog();\n\t\treturn (self) this;\n\n\t}", "TypeAssociation getEstRapporteeParRapport();", "@Override\r\n\t\t\tpublic void recognizerStarted() {\n\r\n\t\t\t}", "@Override\n\tprotected void initView() {\n\t\tsuper.initView();\n\t\t// 不显示暂停原因\n\t\t/*\n\t\t * rsnET.setFocusable(true); rsnTV.setText(\"取消原因:\");\n\t\t */\n\t\trsnET.setVisibility(View.GONE);\n\t\trsnTV.setVisibility(View.GONE);\n\t}", "public RXR getRXR(int rep) { \r\n return getTyped(\"RXR\", rep, RXR.class);\r\n }", "@Override\n\tpublic void recreo() {\n\n\t}", "@Override\n\tpublic void view() {\n\t\t\n\t}", "@Override\n\tprotected String getView() {\n\t\treturn SOTGView.CONTECT_VIEW;\n\t}", "public void viewOriginalWithExternalViewer()\n\t{\n\t\tif (CheckFileOperationEnable()) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//Bug Id 67336, end\n\n\t\ttransferToEdmMacro(\"ORIGINAL\",\"VIEWWITHEXTVIEWER\");\n\t}", "public abstract View mo2155b();", "public interface A9T {\n void willDispatchViewUpdates(A3o a3o);\n}", "@Override\r\n\tpublic void vehicleType() {\n\r\n\t}", "StableView view();", "void onModelChanged(MatchSnapshot matchSnapshot);", "public abstract boolean teReproduces();", "void recreated(TwoWayEvent.Recreated<DM, UMD, DMD> evt);", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void toRL() {\n if (rlFragment == null) {\n rlFragment = new RLFragment();\n fragmenttransaction.add(R.id.frame_content, rlFragment);\n } else {\n fragmenttransaction.show(rlFragment);\n }\n }", "@Override\r\n\tpublic void getROI() {\n\t\t\r\n\t}", "public String getText(Object object)\n {\n ReverseRelationFieldEntity rf = (ReverseRelationFieldEntity) object;\n String label = ((RelationFieldEntity) object).getName();\n String cardinality = (rf.getCardinality() == 1) ? \" 1\" : \" n\";\n String targetEntity = (rf.getEntity() == null) ? \" NOT DEFINED\" : \" \" + rf.getEntity().getName();\n // RelationFieldEntity opposite = rf.getOppositeRelationField();\n String result = null;\n if (label == null || label.length() == 0)\n result = getString(\"_UI_ReverseRelationFieldEntity_type\");\n else\n {\n // on retourne : Car.Drivers : Association *,1 to Driver (<- parentCar)\n result = getParentName(rf) + \".\" + label + \" (Reverse) : \" + \n rf.getType().getLiteral() + \n cardinality + \" to \" + targetEntity;\n }\n \n return result;\n \n }", "public void reestablecerInfo(){\n panelIngresoControlador.getPanelIngreso().reestablecerInfo();\n }", "@Override\r\n\tpublic Relation accept(Visitor v)\t\t{ return v.visit(this);\t\t\t\t\t\t\t}", "void msgViewableChanged() {\n resetViewport(start);\n }", "public HashMap<String, String> get_toRmv() {\n return _toRmv;\n }", "void onRecommendationChanged();", "public void ovr() {\n\n\t}", "public void setRenovated(int value) {\n this.renovated = value;\n }", "public void recordMessage2(String result, String number) {\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"en-US\");\n\n startActivityForResult(intent, 2);\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (requestCode == VOICE_RECOGNITION_REQUEST_CODE\n\t\t\t\t&& resultCode == RESULT_OK) {\n\t\t\t// Fill the list view with the strings the recognizer thought it\n\t\t\t// could have heard\n\t\t}\n\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public void updateConicalView();", "private void display() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n// Start the activity, the intent will be populated with the speech text\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n }", "public Integer getViewThroughConversions() {\r\n return viewThroughConversions;\r\n }", "public Vertex<VV> getTo()\r\n { return to; }", "@Override\n public String toString() {\n return \"CapteurVitesse(\"+sonRail+\",PositionSurRail:\"+positionSurRail+\")\";\n }", "public void respondToGesture(String gesture) {\n String gest = gesture.substring(1, gesture.length() - 1);\n sysMsgTextView.setText(\"Gesture:\" + gest);\n\n // load model\n float[] leftInit;\n float[] rightInit;\n float[] finalpos;\n if (gest.equals(\"Nodding\")){\n ModelRenderable.builder()\n .setSource(this, R.raw.export_71)\n .build()\n .thenAccept(renderable -> model = renderable)\n .exceptionally(\n throwable -> {\n Toast toast =\n Toast.makeText(this, \"Unable to load andy renderable\", Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n return null;\n });\n finalpos = new float[]{0, 0, -2f};\n leftInit = new float[]{-0.5f, 0, -2f};\n rightInit = new float[]{0.3f, 0, -2f};\n } else {\n ModelRenderable.builder()\n .setSource(this, R.raw.thumbsup)\n .build()\n .thenAccept(renderable -> model = renderable)\n .exceptionally(\n throwable -> {\n Toast toast =\n Toast.makeText(this, \"Unable to load andy renderable\", Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n return null;\n });\n finalpos = new float[]{0, 0, -6f};\n leftInit = new float[]{-1.5f, 0, -6f};\n rightInit = new float[]{1f, 0, -6f};\n }\n\n float[] rotation = {0, 0, 0, 0};\n\n // get current frame and translate the initial coordinate to the current frame\n session = fragment.getArSceneView().getSession();\n try {\n frame = session.update();\n } catch (CameraNotAvailableException e) {\n e.printStackTrace();\n }\n Pose pose = frame.getAndroidSensorPose();\n if(targetScreenArea == \"LEFT\"){\n finalpos = pose.rotateVector(leftInit);\n } else if(targetScreenArea == \"RIGHT\"){\n finalpos = pose.rotateVector(rightInit);\n } else {\n finalpos = pose.rotateVector(finalpos);\n }\n\n Anchor anchor = session.createAnchor(new Pose(finalpos, rotation));\n anchorNode = new AnchorNode(anchor);\n anchorNode.setParent(fragment.getArSceneView().getScene());\n TransformableNode transformableNode = new TransformableNode(fragment.getTransformationSystem());\n transformableNode.setParent(anchorNode);\n fragment.getArSceneView().getScene().addChild(anchorNode);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n transformableNode.setRenderable(model);\n transformableNode.select();\n }\n }, 1000);\n\n }", "public String rmvIprt(){\n return \"RMV IPRT:SRN=\"+iprt.getSrn()+\n \",SN=\"+iprt.getSn()+\n \",DSTIP=\\\"\"+iprt.getDstip()+\"\\\"\"+\n \",DSTMASK=\\\"\"+iprt.getDstmask()+\"\\\"\"+\n \",NEXTHOP=\\\"\"+iprt.getNexthop()+\"\\\"\"+\n \",FORCEEXECUTE=YES; {\"+rncName+\"}\"; \n }", "boolean getRedact();", "boolean getRedact();", "com.google.cloud.speech.v2.Recognizer getRecognizer();", "@Override\n \tpublic void roiDragged(ROIEvent evt) {\n \t\t\n \t}", "public String getViewText() {\n \t\treturn \"featured-partner-view_text_t\";\n \t}", "public void onderbreek(){\n \n }", "@Override\r\n\tpublic Collection<TVA> obtenirTousTVA() {\n\t\treturn null;\r\n\t}", "public void recallPaint() { advw.showResearchersPanel();}", "public BaseSubscriber() {//(IView view) {\n // this.view = view;\n }", "private void displaySpeechRecognizer() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n // Start the activity, the intent will be populated with the speech text\n startActivityForResult(intent, Constants.SPEECH_REQUEST_CODE);\n }", "public /* synthetic */ void m67164a(View view, View view2) {\n if (((BaseSubscribe) this.f61354g).isColumn()) {\n KMRouterUtils.m57713a(mo84913v(), ((BaseSubscribe) this.f61354g).f40445id);\n } else if (((BaseSubscribe) this.f61354g).isMagazine()) {\n KMRouterUtils.m57718b(mo84913v(), ((BaseSubscribe) this.f61354g).f40445id);\n } else if (((BaseSubscribe) this.f61354g).isTraining()) {\n KmRouterUtils.m57487e(view.getContext(), ((BaseSubscribe) this.f61354g).skuId);\n } else {\n KMRouterUtils.m57721c(mo84913v(), ((BaseSubscribe) this.f61354g).f40445id);\n }\n }", "private void viewRcmButtonHandler() {\n\t\t\n\t\tTitledBorder border = new TitledBorder(\" VIEW RCM\");\n\t\tborder.setTitleFont(new Font(\"TimesNewRoman\", Font.BOLD, 12));\n\t\tdisplayPanel.setBorder(border);\n\t\t\n\t\tdisplayPanel.removeAll();\n\t\tdisplayPanel.add(new ViewRcmPanel(rmos));\n\t\tdisplayPanel.revalidate();\n\t\tdisplayPanel.repaint();\n\t}", "public String annulerRv(){\n\t\t// Traitement ici ... \n\t\treturn AFFICHER;\n\t}", "protected void tourne() {\n\t\tint direction = ev3.getDirection();\n\t\twhile (seenColor != ev3.SUIVRE) {\n\t\t\tev3.tourne(direction);\n\t\t\tev3.setCourbe(ev3.getCourbe() + 1);\n\t\t\tseenColor = find.whatColor(ev3.lireColor());\n\t\t\tif (ev3.getCourbe() % 10 == 0) {\n\t\t\t\tgeorges = 0;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void enterRealTimeRecognitionMode(View view) {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "public SrvINFONEGOCIO(AgregarInfoNegocio view) {//C.P.M Tendremos un constructor con la vista de agregar informacion de negocio\r\n this.vista = view;//C.P.M Se la agregamos a la variable para tener acceso a la vista \r\n }", "public interface WalkthroughViewListener {\n}", "private static void OnQueryStatusCorrectionList(Object target, CanExecuteRoutedEventArgs args) \r\n {\r\n TextEditor This = TextEditor._GetTextEditor(target); \r\n\r\n if (This == null)\r\n {\r\n return; \r\n }\r\n\r\n if (This.TextStore != null) \r\n {\r\n // Don't do actual reconversion, it just checks if the current selection is reconvertable. \r\n args.CanExecute = This.TextStore.QueryRangeOrReconvertSelection( /*fDoReconvert:*/ false);\r\n }\r\n else\r\n { \r\n // If there is no textstore, this command is not enabled.\r\n args.CanExecute = false; \r\n } \r\n }", "public void Neurologist(View view) {\n Intent intent = new Intent(ActivityMain.this, ActivityDoctorListBySp.class);\n intent.putExtra(\"TAG\", \"Neurologist\");\n startActivity(intent);\n }", "public Rectangle modelToView(JTextComponent t, int pos)\n/* */ throws BadLocationException\n/* */ {\n/* 331 */ return modelToView(t, pos, Position.Bias.Forward);\n/* */ }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(\n\t\t\t\t\t\tRecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\n\t\t\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"en-US\");\n\n\t\t\t\ttry {\n\t\t\t\t\tstartActivityForResult(intent, RESULT_SPEECH);\n\t\t\t\t\tet1.setText(\"\");\n\t\t\t\t} catch (ActivityNotFoundException a) {\n\t\t\t\t\tToast t = Toast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\"Opps! Your device doesn't support Speech to Text\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t\t\t\tt.show();\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}", "private static void FirstUmpieRevire() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "public void onClickImgBtnHablar_(View v) {\n Intent intentActionRecognizeSpeech = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\n // Establece el idioma, predeterminado Ingles Ussa\n intentActionRecognizeSpeech.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"us-US\");\n\n // Inicia la actividad de reconocimiento de voz\n try {\n startActivityForResult(intentActionRecognizeSpeech, RECOGNIZE_SPEECH_ACTIVITY);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(), \"¡Opps! Su dispositivo no es compatible con el reconocimiento de voz.\", Toast.LENGTH_SHORT).show();\n }\n }", "List<IViewRelation> getViewRelations();", "private void onValider() {\n recuperation​(Reponse.getText());\r\n\r\n }", "@Override\r\n\tpublic void increaseViewcnt(int r_idx) {\n\r\n\t}", "private SpeechletResponse handleViewInsuranceIntent(Session session) {\n\t\treturn null;\n\t}", "public void mo7052b(View view) {\n super.mo7052b(view);\n C7707a.m18760a(\"controls:onAttach\");\n this.f15635Q = (C6272z1) mo23947l();\n int childCount = this.f15644Z.getChildCount();\n C7707a.m18761b(\"viewport:subscribe\");\n this.f15657m0.add(C3896a1.m11470r().mo10518h().mo36428a((C12286f) this.f15634P.getMainThread()).mo36476d((Consumer<? super T>) new C6225m<Object>(this)));\n C7707a.m18759a();\n C7707a.m18761b(\"bestfriend:subscribe\");\n this.f15657m0.add(((FriendStore) this.f15663s0.get()).bestFriends().mo36501i(C6219k.f15599e).mo36428a((C12286f) this.f15634P.getMainThread()).mo36412a((Consumer<? super T>) new C6207g<Object>(this, childCount, view), (Consumer<? super Throwable>) C6204f.f15580e));\n C7707a.m18759a();\n C7707a.m18761b(\"userme:subscribe\");\n this.f15657m0.add(C5448c.m15478a().userMeStream().mo36428a((C12286f) this.f15634P.getMainThread()).mo36412a(this.f15665u0, this.f15666v0));\n C7707a.m18759a();\n this.f15657m0.add(((DescendantsPrefs) this.f15661q0.get()).observeAllPreferences().mo36477d().mo36428a((C12286f) this.f15667w0.getMainThread()).mo36476d((Consumer<? super T>) new C6222l<Object>(this)));\n this.f15657m0.add(((FriendshipFactsPrefs) this.f15662r0.get()).observeState().mo36428a((C12286f) this.f15667w0.getMainThread()).mo36476d((Consumer<? super T>) new C6201e<Object>(this)));\n this.f15657m0.add(this.f15658n0.mo13870c().mo36428a((C12286f) this.f15667w0.getMainThread()).mo36476d((Consumer<? super T>) new C6213i<Object>(this)));\n C7707a.m18759a();\n this.f15664t0.onAttach(this.f15635Q, mo9304A());\n }", "public abstract void mo2152a(View view);", "@Override\n\tpublic void setRepertoire(String r) {\n\t\t\n\t}", "public void subscribe(p019io.reactivex.Observer<? super T> r6) {\n /*\n r5 = this;\n L_0x0000:\n java.util.concurrent.atomic.AtomicReference<io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver<T>> r0 = r5.curr\n java.lang.Object r0 = r0.get()\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver r0 = (p019io.reactivex.internal.operators.observable.ObservableReplay.ReplayObserver) r0\n if (r0 != 0) goto L_0x0020\n io.reactivex.internal.operators.observable.ObservableReplay$BufferSupplier<T> r1 = r5.bufferFactory\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayBuffer r1 = r1.call()\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver r2 = new io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver\n r2.<init>(r1)\n java.util.concurrent.atomic.AtomicReference<io.reactivex.internal.operators.observable.ObservableReplay$ReplayObserver<T>> r3 = r5.curr\n r4 = 0\n boolean r3 = r3.compareAndSet(r4, r2)\n if (r3 != 0) goto L_0x001f\n goto L_0x0000\n L_0x001f:\n r0 = r2\n L_0x0020:\n io.reactivex.internal.operators.observable.ObservableReplay$InnerDisposable r1 = new io.reactivex.internal.operators.observable.ObservableReplay$InnerDisposable\n r1.<init>(r0, r6)\n r6.onSubscribe(r1)\n r0.add(r1)\n boolean r2 = r1.isDisposed()\n if (r2 == 0) goto L_0x0035\n r0.remove(r1)\n return\n L_0x0035:\n io.reactivex.internal.operators.observable.ObservableReplay$ReplayBuffer<T> r2 = r0.buffer\n r2.replay(r1)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p019io.reactivex.internal.operators.observable.ObservableReplay.ReplaySource.subscribe(io.reactivex.Observer):void\");\n }", "private static void etapa2Urna() {\n\t\t\n\t\tint opcaoNumero = 0;\n\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tSystem.out.println(\"Votação\");\n\t\t\tSystem.out.println(\"1 - Votar\");\n\t\t\tSystem.out.println(\"2 - Justificar ausencia\");\n\t\t\tSystem.out.println(\"Digite o número da etapa ou -1 para sair: \");\n\t\t\t\n\t\t\ttry {\n\t\t\n\t\t\t\topcaoNumero = Integer.parseInt(br.readLine());\n\t\t\n\t\t\t\tswitch( opcaoNumero ) {\n\t\t\n\t\t\t\tcase 1: \n\t\t\t\t\t// Abrir Etapa 1: Configurar Urna\n\t\t\t\t\tlimparConsole();\n\t\t\t\t\trealizarVotacao();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 2: \n\t\t\t\t\t// Abrir Etapa 2: Realizar Votacao na Urna\n\t\t\t\t\tlimparConsole();\n\t\t\t\t\tSystem.out.println(\"Insira o numero do seu titulo de eleitor\");\n\t\t\t\t\tint tituloEleitor = Integer.parseInt(br.readLine());\n\t\t\t\t\turna.justificarVoto(tituloEleitor);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\n\t\t\t} catch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\n\t\t}while(opcaoNumero != -1);\n\t}", "public NEATTranscriberBain() {\n\t}", "@Override\n\tpublic String getInformeVendedor() {\n\t\treturn \"Informe trimestre 3\";\n\t}", "public RXR getRXR() { \r\n return getTyped(\"RXR\", RXR.class);\r\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,gst.resultFile);\r\n\t\t\t\t\t\t\t\t\t\t}", "public void chooseFortifyReceivers(String fortifyGiver){\n gameState = GameState.FORTIFYRECEIVER;\n Territory territory = currentPlayer.getTerritory(fortifyGiver);\n currentTerritoriesOfInterest = Player.getTerritoryStringArray(currentPlayer.getFortifiableTerritories(territory));\n notifyObservers();\n }", "public ConversorVelocidad() {\n //setTemperaturaConvertida(0);\n }" ]
[ "0.55632424", "0.51524717", "0.515063", "0.5064473", "0.499886", "0.49691978", "0.49539775", "0.4947819", "0.49230048", "0.48991328", "0.4897175", "0.4875913", "0.48722756", "0.48211008", "0.48209184", "0.4788571", "0.47884935", "0.47798544", "0.47795215", "0.47354928", "0.4719621", "0.47149786", "0.47120354", "0.470941", "0.47021157", "0.46763504", "0.46728468", "0.4671463", "0.4634975", "0.46270618", "0.4619686", "0.46195334", "0.4592342", "0.4584955", "0.45748013", "0.4573775", "0.4561234", "0.45477828", "0.45473638", "0.45424795", "0.4542403", "0.45411518", "0.4535583", "0.45248342", "0.45153004", "0.45136184", "0.45116514", "0.45085934", "0.45063475", "0.45061678", "0.45060956", "0.45019478", "0.44980365", "0.44970232", "0.44969708", "0.44952714", "0.44951227", "0.44933677", "0.44847894", "0.44811663", "0.44797897", "0.44791606", "0.44777343", "0.44777343", "0.4476285", "0.44756925", "0.44693255", "0.44676027", "0.4466809", "0.44587114", "0.4456957", "0.44533262", "0.44532567", "0.44493228", "0.44479987", "0.44439822", "0.44435325", "0.4441209", "0.4435737", "0.44352236", "0.4432559", "0.4431493", "0.44273633", "0.44258165", "0.44227782", "0.44179878", "0.44167855", "0.4413876", "0.44129854", "0.44117135", "0.44105273", "0.4406829", "0.44056502", "0.43994892", "0.43982342", "0.4394454", "0.43937027", "0.43927953", "0.4392277", "0.43898797", "0.43880162" ]
0.0
-1
TREE VIEW CANVAS GESTURE
@Override public void drawSavedGestureOnCanvas(final TreeItem<String> gestureItem, final int templateIndex) { // Get the specific gesture from dataset (list of 2D points) final List<Vector2D> template = this.recognizer.getGestureDataset(gestureItem.getValue()).get(templateIndex); // Reset the canvas this.getUserCanvasContext().clearRect(0, 0, this.getLiveCanvas().getWidth(), this.getLiveCanvas().getHeight()); // Redraw oval for every point. Now it's a derivative representation for (final Vector2D path : template) { this.getUserCanvasContext().fillOval(-path.getX() + this.getLiveCanvas().getWidth() / 2, path.getY() + this.getLiveCanvas().getHeight() / 2, 10, 10); } // Show the Canvas in a pop up this.getCnavasPopup().show(this.recorderPane); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void display() {\n\t\ttree.resize(30,50);\n\t\tfor(int i = 650; i > 0; i -= 100) {\t\n\t\t\tt.image(tree,25,i);\n\t\t}\n\t\tfor(int i = 650; i > 0; i -= 100) {\t\n\t\t\tt.image(tree, 575, i);\n\t\t}\n\t}", "private void loadTree(){ \n PBarHelper.show();\n DataProvider.getTreeHierarchy(mScreenId, new DataProvider.AsyncCallback<ViewNodeJSO>() {\n @Override\n public void onError(Request r, Throwable t) {\n PBarHelper.hide();\n Window.alert(t.getMessage());\n }\n\n @Override\n public void onDownloaded(ViewNodeJSO result) {\n mRoot = result; \n CellTree.Resources res = GWT.create(CustomTreeResources.class);\n //create tree model\n mTreeViewModel = new ViewHierarchyTreeViewModel(result);\n //add selection handler to select view on canvas\n mTreeViewModel.setOnSelectionChangedListener(new OnSelectionChangedListener() { \n @Override\n public void onSelectionChanged(ViewNodeJSO viewNode, boolean selected) { \n ScreenPreviewPage.this.onViewTreeNodeSelectionChanged(viewNode, selected);\n }\n });\n //add hover listener just to highlight view\n mTreeViewModel.setOnViewNodeMouseOverListener(new OnViewNodeMouseOverListener() {\n @Override\n public void onMouseOver(ViewNodeJSO viewNode) {\n if (mTreeViewModel.getSelectedNode() == null) {\n clearCanvas();\n drawRectForView(viewNode);\n }\n }\n });\n //remove old tree if necessary, currently there is no reload support (reload page only)\n if (mCellTree != null) {\n mCellTree.removeFromParent();\n }\n mCellTree = new CellTree(mTreeViewModel, null, res); \n mCellTree.setDefaultNodeSize(1000);//no show more button\n centerPanel.add(mCellTree); \n CellTreeTools.expandAll(mCellTree.getRootTreeNode());\n mCellTree.setAnimationEnabled(true);\n PBarHelper.hide();\n } \n });\n }", "@Override\n\tpublic void createPartControl(Composite parent) {\n\t\tTree tree = new Tree(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); //create a tree \n\t\ttree.setHeaderVisible(true);//show header in interface\n\t\ttree.setLinesVisible(true); //show lines in interface\n\t\tviewer = new TreeViewer(tree);\n\n\t\t//first column\n\t\tTreeColumn column1 = new TreeColumn(tree, SWT.LEFT);\n\t\tcolumn1.setText(\"Project\");\n\t\tcolumn1.setWidth(500);\n\n\t\t//second column\n\t\tTreeColumn column2 = new TreeColumn(tree, SWT.LEFT);\n\t\tcolumn2.setText(\"DUAs Coverage\");\n\t\tcolumn2.setWidth(200);\n\n\t\tlong start = System.currentTimeMillis();\n\t\t\n\t\tviewer.setContentProvider(new CoverageContentProvider());\n\t\tviewer.setLabelProvider(new CoverageLabelProvider());\n\t\tviewer.setInput(new CoverageInput());\t\t// provide the input to the ContentProvider\n\t\tlogger.info(\"Time to show view: \" + (System.currentTimeMillis() - start) / 1000.0);\n\t\t\n\t\t//change selection event\n\t\tviewer.addSelectionChangedListener(new ISelectionChangedListener() {\n\n\t\t\t@Override\n\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\n\t\t\t\tIStructuredSelection thisSelection = (IStructuredSelection) event.getSelection();\n\t\t\t\tObject selectedNode = thisSelection.getFirstElement();\n\t\t\t\t\n\t\t\t\tif(selectedNode instanceof TreeDua){\n\t\t\t\t\tfinal ICompilationUnit cu = ((TreeDua) selectedNode).getCompilationUnit();\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//remove old markers\n\t\t\t\t\t\tCodeMarkerFactory.removeMarkers(CodeMarkerFactory.findMarkers(cu.getUnderlyingResource()));\n\t\t\t\t\t\t//get the first and last char of definition line to draw\n\t\t\t\t\t\tint[] defOffset = parserLine(cu.getSource(),((TreeDua) selectedNode).getDef());\n\t\t\t\t\t\t//get the first and last char of c-use line to draw\n\t\t\t\t\t\tint[] useOffset = parserLine(cu.getSource(), ((TreeDua) selectedNode).getUse());\n\t\t\t\t\t\t//get the first and last char of target line to draw\n\t\t\t\t\t\tint[] targetOffset = null;\n\t\t\t\t\t\tif(((TreeDua) selectedNode).getTarget() != 1){\n\t\t\t\t\t\t\ttargetOffset = parserLine(cu.getSource(),((TreeDua) selectedNode).getTarget());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//create new markers based on selected DUA\n\t\t\t\t\t\tfinal TreeDua dua = (TreeDua) selectedNode;\n\t\t\t\t\t\tfinal String covered = dua.isCovered()? \"true\" : \"false\";\n\t\t\t\t\t\tCodeMarkerFactory.mark(cu.getUnderlyingResource(), defOffset, useOffset, targetOffset, covered);\n\t\t\t\t\t\tsetFocus();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\t//double click event to expand state\n\t\tviewer.addDoubleClickListener(new IDoubleClickListener() {\n\t\t\t@Override\n\t\t\tpublic void doubleClick(DoubleClickEvent event) {\n\t\t\t\tTreeViewer viewer = (TreeViewer) event.getViewer();\n\t\t\t\tIStructuredSelection thisSelection = (IStructuredSelection) event\n\t\t\t\t\t\t.getSelection();\n\t\t\t\tObject selectedNode = thisSelection.getFirstElement();\n\n\t\t\t\tif(selectedNode instanceof TreeMethod \n\t\t\t\t\t\t|| selectedNode instanceof TreeClass \n\t\t\t\t\t\t|| selectedNode instanceof TreePackage \n//\t\t\t\t\t\t|| selectedNode instanceof TreeFolder \n\t\t\t\t\t\t|| selectedNode instanceof TreeProject){\n\n\t\t\t\t\tviewer.setExpandedState(selectedNode,\n\t\t\t\t\t\t\t!viewer.getExpandedState(selectedNode));\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\t\n\t\t//Listener to closing view in workbench shutdown\n\t\tPlatformUI.getWorkbench().addWorkbenchListener(new IWorkbenchListener() {\n\t\t\t@Override\n\t\t\tpublic boolean preShutdown(IWorkbench workbench, boolean forced) {\n\t\t\t\tcloseViews();\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void postShutdown(IWorkbench workbench) {\n\t\t\t}\n\t\t});\n\n\t}", "public void paint() {\n int L = 150; // Local convenience var\n\n // Declare three lines (left, middle, and right)\n Line left = new Line(L, L, L, getHeight() - L);\n Line middle = new Line(L, getHeight() / 2, getWidth() - L, getHeight() / 2);\n Line right = new Line(getWidth() - L, L, getWidth() - L, getHeight() - L);\n\n getChildren().clear(); // Clear the pane before redisplay\n\n displayHTree(order, left, middle, right); // Call the recursive method\n }", "private JTree makeCatalogTree() {\n\t\t\n\t\ttree_root = new DefaultMutableTreeNode(\"all photos\");\n\t\ttree_root.setUserObject(root);\n\t\t\n\t\tfinal JTree tree = new JTree(tree_root);\n\t\ttree.setMinimumSize(new Dimension(200,400));\n\n\t\ttree.setToggleClickCount(3); // so that we can use double-clicks for previewing instead of expanding/collapsing\n\n\t\tDefaultTreeSelectionModel selectionModel = new DefaultTreeSelectionModel();\n\t\tselectionModel.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);\n\t\ttree.setSelectionModel(selectionModel);\n\t\t\n\t\ttree.addMouseListener(new MouseInputAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t// if left-double-click @@@changed =2 to ==1\n\t\t\t\tif (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {\n\t\t\t\t\tDefaultMutableTreeNode tempNode = getSelectedTreeNode();\n\t\t\t\t\tAlbum chosenAlbum =(Album) tempNode.getUserObject();\n\t\t\t\t\t\n\t\t\t\t\tpreviewPane.display(chosenAlbum);\n\t\t\t\t\t\n\t\t\t\t\t// YOUR CODE HERE\n\t\t\t\t\tSystem.out.println(\"show the photos for album \" + getSelectedTreeNode());\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\n\t\t\n\t\treturn tree;\n\t}", "@Override\r\n\tprotected Object createLowerView(Composite parent) {\n\t\tfTree = new Tree(parent, SWT.BORDER );\r\n\t\tfTree.addSelectionListener(new SelectionAdapter() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t// https://jira.jboss.org/browse/JBIDE-7107\r\n\t\t\t\t// update \"OK\" button enablement\r\n\t\t\t\tupdateOkState();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t \r\n\t\tfTreeViewer = new TreeViewer(fTree);\r\n\t\tfTreeViewer.setContentProvider( treeContentProvider );\r\n\t\tfTreeViewer.setLabelProvider(new ModelTreeLabelProvider());\r\n\t\tfTreeViewer.setInput ( null );\r\n\t\tfTreeViewer.setAutoExpandLevel( getAutoExpandLevel() );\r\n\t\t// end tree viewer for variable structure\r\n\t\tGridData data = new GridData(); \r\n\t data.grabExcessVerticalSpace = true;\r\n\t data.grabExcessHorizontalSpace = true;\r\n\t data.horizontalAlignment = GridData.FILL;\r\n\t data.verticalAlignment = GridData.FILL;\r\n\t data.minimumHeight = 200;\r\n\t fTree.setLayoutData(data);\r\n\t \r\n\t\treturn fTree;\r\n\t}", "private void createTree() {\n\n // custom brown color\n Color brown = new Color(149, 99, 57);\n\n // trunk\n NscComponent trunk = new NscRectangle(49, 164, 13, 51);\n createShape(trunk, brown, true);\n\n // branches\n drawLine(50, 125, 50, 165, 10, brown);\n drawLine(25, 125, 50, 165, 10, brown);\n drawLine(75, 125, 50, 165, 10, brown);\n\n // branch outlines\n drawLine(49, 125, 49, 150, 1, Color.black);\n drawLine(60, 125, 60, 150, 1, Color.black);\n drawLine(24, 125, 49, 165, 1, Color.black);\n drawLine(35, 125, 50, 150, 1, Color.black);\n drawLine(85, 125, 60, 165, 1, Color.black);\n drawLine(74, 125, 60, 150, 1, Color.black);\n\n // leafs\n NscEllipse leafs2 = new NscEllipse(0, 5, 60, 122);\n NscEllipse leafs3 = new NscEllipse(50, 5, 60, 122);\n NscEllipse leafs = new NscEllipse(25, 0, 60, 127);\n NscEllipse leafs4 = new NscEllipse(25, 1, 60, 124);\n createShape(leafs2, treeColor, true);\n createShape(leafs3, treeColor, true);\n createShape(leafs, treeColor, true);\n createShape(leafs4, treeColor, false);\n\n repaint();\n }", "ZHDraweeView mo91981h();", "public TreeScenery() {\r\n\t\tstopped = false;\r\n\t\tthis.position = new Vector2(0, 400);\r\n boundingRectangle = new Rectangle();\r\n treeAnimation = AssetLoader.treeAnimation;\r\n\t}", "private Tree<NodeView> generateRectangleTree(final float centerX, final float topY, final Tree<?> tree, int level, final Paint paint, final ExportOptions options) {\n\n //Calculate text bounds\n final String text = tree.getValue().toString();\n paint.setStyle(Paint.Style.FILL);\n paint.setTextSize(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, options.itemTextSize, getResources().getDisplayMetrics()));\n final Rect bounds = getStringBounds(text, paint);\n\n final float left = bounds.left;\n final float bottom = bounds.bottom;\n\n bounds.offset(((int) centerX - (bounds.width() / 2)), ((int) (topY - bounds.top + 1 + paddingTop)));\n\n final int height = bounds.height();\n final float stringHeight = getStringHeight(paint);\n\n final float textX = bounds.left - left;\n final float textY = bounds.bottom - bottom + 1 + ((stringHeight - height) / 2);\n\n final Tree<NodeView> itemTree = new Tree<>(new NodeView(text, bounds, textX, textY));\n\n //Apply padding\n bounds.left -= paddingLeft;\n bounds.top -= paddingTop;\n bounds.right += paddingRight;\n bounds.bottom += paddingBottom + (stringHeight - height);\n\n if (tree.getChildren().size() > 0) {\n float totalWidth = 0;\n float[] sizes = new float[tree.getChildren().size()];\n for (int i = 0; i < tree.getChildren().size(); i++) {\n sizes[i] = getStringWidth(tree.getChildren().get(i).getValue().toString(), paint);\n totalWidth += sizes[i];\n }\n final float totalSpacing = tree.getChildren().size() > 0 ? (tree.getChildren().size() - 1) * horizontalSpacing[level + 1] : 0;\n\n float previousOffset = 0;\n for (int i = 0; i < tree.getChildren().size(); i++) {\n final float offset = previousOffset + (sizes[i] / 2);\n itemTree.addNode(generateRectangleTree(centerX - ((totalWidth + totalSpacing) / 2) + offset, topY + bounds.height()/*+ getStringHeight(paint)*/ /*+ paddingTop + paddingBottom*/ + options.verticalSpacing, tree.getChildren().get(i), level + 1, paint, options));\n previousOffset = offset + (sizes[i] / 2) + horizontalSpacing[level + 1];\n }\n }\n\n return itemTree;\n }", "public static void graphTree(CommonTree tree){\n\t\tDOTTreeGenerator gen = new DOTTreeGenerator(); \n\t\tStringTemplate st = gen.toDOT(tree); \n\n\t\tString type = \"jpg\";\n\t\tGraphViz gv = new GraphViz();\n\t\tgv.addln(st.toString());\n\n\t\tSystem.out.println(\"Before\");\n\n\t\tImageIcon img = new ImageIcon(gv.getGraph(gv.getDotSource(), type));\n\n\t\tSystem.out.println(\"After\");\n\n\t\tint newHeight = 775, newWidth = 1255; \n\t\t/* This is for writing the image to disk*/\n\t\tFile out = new File(\"graph.\" + type); // Linux\n\t\tgv.writeGraphToFile( gv.getGraph( gv.getDotSource(), type ), out );\n\t\t//\t\tif (iw > newWidth){\n\t\t//\t\t\tnewHeight = newWidth * ih/iw ;\n\t\t//\t\t\tBufferedImage resizedImg = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);\n\t\t//\t\t\tGraphics2D g2 = resizedImg.createGraphics();\n\t\t//\t\t\t\n\t\t//\t\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\t//\t\t\tg2.drawImage(img.getImage(), 0, 0, newWidth, newHeight, null);\n\t\t//\t\t\tg2.dispose();\n\t\t//\t\t\timg = new ImageIcon(resizedImg);\n\t\t//\t\t}\n\n\t\tJFrame jf = new JFrame(\"Abstract Syntax Tree\");\n\t\tjf.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n\t\tJLabel photographLabel = new JLabel();\n\t\tphotographLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t//private Image getScaledImage(Image srcImg, int w, int h){\n\n\n\t\tphotographLabel.setIcon(img);\n\t\tJScrollPane scrollPane = new JScrollPane(photographLabel);\n\t\tjf.add(scrollPane, BorderLayout.CENTER);\n\t\tjf.pack();\n\t\tjf.setSize(newWidth+50, newHeight+50);\n\t\tjf.setResizable(true);\n\t\tjf.setVisible(true);\n\t\t/*end graphical display*/\n\t}", "public TreePainting() {\n\t\t// Add a mouse listener for its own events\n\t\taddMouseListener(this);\n\t}", "@Override\r\n\tpublic void createContents(Composite viewArea, Map<String, Image> imageMap) {\n\t\tgraph = new Graph(viewArea, SWT.None);\r\n\t\tnodes = new LinkedList<GraphNode>();\r\n\t\tconnections = new LinkedList<GraphConnection>();\r\n\r\n\t\tString[] name = { \"Core\", \"Outline\", \"Package Explorer\", \"JUnit\",\r\n\t\t\t\t\"JavaDoc\", \"Debug\" };\r\n\t\tfor (int i = 0; i < name.length; i++) {\r\n\t\t\tnodes.add(new GraphNode(graph, SWT.None, name[i]));\r\n\t\t}\r\n\r\n\t\tconnections.add(CreateConnection(\"Core\", \"Outline\"));\r\n\t\tgraph.setLayoutAlgorithm(new SpringLayoutAlgorithm(\r\n\t\t\t\tLayoutStyles.NO_LAYOUT_NODE_RESIZING), true);\r\n\t\tgraph.addSelectionListener(new SelectionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\tSystem.out.println(arg0);\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public void displayTree(String key, Color color){\r\n // first clear the screen\r\n this.getChildren().clear();\r\n double treeHeight = tree.height();\r\n // make space for more nodes\r\n if (treeHeight == 3){\r\n this.setPrefSize(3500,1500);\r\n }\r\n else if (treeHeight == 4){\r\n this.setPrefSize(7500,1500);\r\n }\r\n else if(treeHeight > 4){\r\n this.setPrefSize(Math.pow(3,treeHeight-2)*1500,1500);\r\n }\r\n // display tree if root is not null\r\n if (tree.getRoot() != null){\r\n displayTree(tree.getRoot(),getWidth()/2,5,getWidth()/3, 150,treeHeight+1, key, color);\r\n }\r\n }", "public void createTreeViewerComposite(Composite parent) {\n\t\tparent.setLayout(new GridLayout(1, false));\n\t\ttreeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\ttreeViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));\n\t\ttreeViewer.setContentProvider(new TxDbContentProvider());\n\t\ttreeViewer.setLabelProvider(new TxDbLabelProvider());\n\t\ttreeViewer.setUseHashlookup(true);\n\t\ttreeViewer.setAutoExpandLevel(2);\n\t\ttreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\n\t\t\t\tISelection selection=event.getSelection();\n\t\t\t\tif( selection instanceof IStructuredSelection) {\n\t\t\t\t\tObject object= ((IStructuredSelection)selection).getFirstElement();\t\t\t\n\t\t\t\t\tif(object instanceof IHierNode&& ((IHierNode)object).getChildNodes().size()!=0){\n\t\t\t\t\t\ttxTableViewer.setInput(object);\n\t\t\t\t\t\tupdateButtons();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void draw() \r\n\t{\r\n\t\tdraw(root, new RectHV(0,0,1,1) );\r\n\t}", "private void draw() {\n model.tick();\n\n List<Entity> entities = model.getCurrentLevel().getEntities();\n\n for (EntityView entityView: entityViews) {\n entityView.markForDelete();\n }\n\n double heroXPos = model.getCurrentLevel().getHeroX();\n heroXPos -= xViewportOffset;\n\n if (heroXPos < VIEWPORT_MARGIN) {\n if (xViewportOffset >= 0) {\n xViewportOffset -= VIEWPORT_MARGIN - heroXPos;\n if (xViewportOffset < 0) {\n xViewportOffset = 0;\n }\n }\n } else if (heroXPos > width - VIEWPORT_MARGIN) {\n xViewportOffset += heroXPos - (width - VIEWPORT_MARGIN);\n }\n\n backgroundDrawer.update(xViewportOffset);\n\n for (Entity entity: entities) {\n boolean notFound = true;\n for (EntityView view: entityViews) {\n if (view.matchesEntity(entity)) {\n notFound = false;\n view.update(xViewportOffset);\n break;\n }\n }\n if (notFound) {\n EntityView entityView = new EntityViewImpl(entity);\n entityViews.add(entityView);\n pane.getChildren().add(entityView.getNode());\n }\n }\n\n for (EntityView entityView: entityViews) {\n if (entityView.isMarkedForDelete()) {\n pane.getChildren().remove(entityView.getNode());\n }\n }\n entityViews.removeIf(EntityView::isMarkedForDelete);\n\n if (model.heroDead()) {\n try {\n java.util.concurrent.TimeUnit.SECONDS.sleep(1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n model.restartLevel();\n }\n if (model.finish()) {\n Text finished = new Text(\"F I N I S H E D !\");\n finished.setFont(new Font(50));\n finished.setX(model.getCurrentLevel().getWidth()/2-150);\n finished.setY(model.getCurrentLevel().getHeight()/2);\n pane.getChildren().add(finished);\n } else if (model.gameOver()) {\n Text finished = new Text(\"G A M E O V E R !\");\n finished.setFont(new Font(50));\n finished.setX(model.getCurrentLevel().getWidth()/2-200);\n finished.setY(model.getCurrentLevel().getHeight()/2);\n pane.getChildren().add(finished);\n\n lives.setText(\"Lives: \" + model.getLives());\n lives.setFont(new Font(20));\n lives.setX(width-100);\n lives.setY(30);\n\n } else {\n elapsedTime = (new Date()).getTime() - model.getStartTime();\n elapsedTime = elapsedTime/1000;\n time.setText(\"Time: \" + elapsedTime);\n time.setFont(new Font(20));\n time.setX(30);\n time.setY(30);\n lives.setText(\"Lives: \" + model.getLives());\n lives.setFont(new Font(20));\n lives.setX(width-100);\n lives.setY(30);\n }\n\n\n\n\n\n }", "@FXML\n private void renderTree() {\n unmountTree();\n buildTree(inputN, treePane.getWidth() / 2, treePane.getHeight(), Math.toRadians(inputTrunkAngle), inputBranchLength);\n mountTree();\n }", "protected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\t\n\t\tpaint.setAntiAlias(true);\t//设置画笔为无锯齿\n\t\tpaint.setColor(Color.RED);\t//设置画笔颜色\n\t\tcanvas.drawColor(Color.DKGRAY);\t\t\t\t//白色背景\n\t\tpaint.setStrokeWidth((float) 4.0);\t\t\t\t//线宽\n\t\tpaint.setStyle(Style.STROKE);\n\t\tPath path = new Path();\t\t\t\t\t\t//Path对象\n\t\t\n\t\t\n\t\t/*\n\t\t * LP-HP-descision tree方法\n\t\t */\n\t\ttry\n\t\t{\n\t\t//\tqrs=new QRS(graphicsData.data);\n\t\t // graphicsData.data=qrs.filter(); \n\t\t} catch (Exception e)\n\t\t{\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n //数据读入\t\t\n\t\tint max=(int) findmax(graphicsData.data, graphicsData.rate);\n\t\t//path.moveTo(0, (float) graphicsData.data[0]);\t\t\t\t\t\t//起始点\n\t\tfor(int i=0; i<1000; i++)\n\t\t{\n\t\t\tfloat y = (float) (plotwidth-plotwidth*(graphicsData.data[i]/max));\n\t\t\tpath.lineTo(i, y);\n\t\t}\n\t\t canvas.drawPath(path, paint);\t\t\t\t\t//绘制任意多边形\n\t\t \n\t\t //绘制纵向珊格\n\t\t paint.setAntiAlias(true);\t//设置画笔为无锯齿\n\t\t\tpaint.setColor(Color.BLACK);\t//设置画笔颜色 \n\t\t\tpaint.setStrokeWidth((float) 1.0);\t\t\t\t//线宽\n\t\t\tpaint.setStyle(Style.STROKE);\n\t\t\tPath gridpath = new Path();\t\t\t\t\t\t//Path对象\n\t\t\t//数据读入\n\t\t\t//绘制纵向坐标\n\t\t\tfor(int i=0; i<10; i++)\n\t\t\t{\n\t\t\t\tgridpath.moveTo(i*50, 0);\t\n\t\t\t\tgridpath.lineTo(i*50, 500);\n\t\t\t\tcanvas.drawText(\"\"+i*50, i*50, 300, paint);\n\t\t\t}\n\t\t\t canvas.drawPath(gridpath, paint);\t\t\t\t\t//绘制任意多边形 \n\t\t\t \n\t\t\t //绘制横向珊格\n\t\t\t paint.setAntiAlias(true);\t//设置画笔为无锯齿\n\t\t\t\tpaint.setColor(Color.BLACK);\t//设置画笔颜色 \n\t\t\t\tpaint.setStrokeWidth((float) 1.0);\t\t\t\t//线宽\n\t\t\t\tpaint.setStyle(Style.STROKE);\n\t\t\t\tPath gridpath2 = new Path();\t\t\t\t\t\t//Path对象\n\t\t\t\t//数据读入\n\t\t\t\t//绘制纵向坐标\n\t\t\t\tfor(int i=0; i<10; i++)\n\t\t\t\t{\n\t\t\t\t\tgridpath2.moveTo(0,i*50 );\t\n\t\t\t\t\tgridpath2.lineTo(500, i*50);\n\t\t\t\t\tcanvas.drawText(\"\"+(300-i*50), 0, i*50, paint);\n\t\t\t\t}\n\t\t\t\t canvas.drawPath(gridpath2, paint);\t\t\t\t\t//绘制任意多边形 \n\t\t \n\t}", "public GenerateJTree1() {\n UIManager.put(\"Tree.rendererFillBackground\", false);\n initComponents();\n BasicInternalFrameUI bifui = (BasicInternalFrameUI) this.getUI();\n bifui.setNorthPane(null);\n bifui.setSouthPane(null);\n\n// UIDefaults d = new UIDefaults();\n// d.put(\"Tree.selectionBackground\", Color.GREEN);\n// jTree1.putClientProperty(\"Nimbus.Overrides\", d);\n// jTree1.putClientProperty(\"Nimbus.Overrides.InheritDefaults\", false);\n cellColour();\n try {\n loadTree();\n } catch (NotBoundException | MalformedURLException | RemoteException | ClassNotFoundException | SQLException | InterruptedException ex) {\n Logger.getLogger(GenerateJTree1.class.getName()).log(Level.SEVERE, null, ex);\n }\n ToolTipManager.sharedInstance().registerComponent(jTree1);\n }", "public void draw() {\n drawSubtree(root);\n }", "private void miniatureDraw(Graphics g, TreeGUI tree[], int ntree){\n\t\tint x = 5;\n\t\tint y = 5;\n\t\tint h = 200;\n\t\tint w = 200;\n\t\tint terrainWidth = TerrainGUI.height;\n\t\tint terrainHeight = TerrainGUI.width;\n\t\t\n\t\tint treeX;\n\t\tint treeY;\n\t\t\n\t\tdouble Xr = (w/(double)terrainWidth );\n\t\tdouble Yr = (h/(double)terrainHeight);\n\t\tint treeXs;\n\t\tint treeYs;\n\t\t\n\t\tdouble angle;\n\t\t\n\t\tg.setColor(Color.black);\n\t\tg.fillRect(x-2, y-2, w+4, h+4);\n\t\tg.setColor(Color.white);\n\t\tg.fillRect(x-1, y-1, w+2, h+2);\n\t\t\n\t\tfor(int i=0;i<ntree;i++){\n\t\t\ttreeX = (int) ( x+( tree[i].x)*Xr+w/2);\n\t\t\ttreeY = (int) ( y+(-tree[i].y)*Yr+h/2);\n\t\t\ttreeXs = (int) ((Xr)*(tree[i].currentwindPower)*5 +1);\n\t\t\ttreeYs = (int) ((Yr)*(tree[i].currentwindPower)*5 +1);\n\t\t\t\n\t\t\tangle = tree[i].windRotation*Math.PI;\n\t\t\tg.setColor(tree[i].getCrownColor());\t\t\t\n\t\t\tdrawBoldLine(g,\n\t\t\t\t\ttreeX,treeY,\n\t\t\t\t\ttreeX+(int)(treeXs*Math.sin(angle)),\n\t\t\t\t\ttreeY+(int)(treeYs*Math.cos(angle)));\n\t\t}\n\t}", "public void nodeDemo() {\n final PLayer layer = getCanvas().getLayer();\n final PNode aNode = PPath.createRectangle(0, 0, 100, 80);\n\n // A node needs to be a descendent of the root to be displayed on the\n // screen.\n layer.addChild(aNode);\n\n // The default color for a node is blue, but you can change that with\n // the setPaint method.\n aNode.setPaint(Color.red);\n\n // A node can have children nodes added to it.\n aNode.addChild(PPath.createRectangle(0, 0, 100, 80));\n\n // The base bounds of a node is easy to change. Note that changing the\n // base\n // bounds of a node will not change it's children.\n aNode.setBounds(-10, -10, 200, 110);\n\n // Each node has a transform that can be used to transform the node, and\n // all its children on the screen.\n aNode.translate(100, 100);\n aNode.scale(1.5);\n aNode.rotate(45);\n\n // The transparency of any node can be set, this transparency will be\n // applied to any of the nodes children as well.\n aNode.setTransparency(0.75f);\n\n // Its easy to copy nodes.\n final PNode aCopy = (PNode) aNode.clone();\n\n // Make is so that the copies children are not pickable. For this\n // example\n // that means you will not be able to grab the child and remove it from\n // its parent.\n aNode.setChildrenPickable(false);\n\n // Change the look of the copy\n aNode.setPaint(Color.GREEN);\n aNode.setTransparency(1.0f);\n\n // Let's add the copy to the root, and translate it so that it does not\n // cover the original node.\n layer.addChild(aCopy);\n aCopy.setOffset(0, 0);\n aCopy.rotate(-45);\n }", "private void initComponents() {//GEN-BEGIN:initComponents\n scrollPanel = new javax.swing.JScrollPane();\n hierarchy = new JTree(treeModel);\n setLayout(new java.awt.BorderLayout());\n \n \n hierarchy.setPreferredSize(new java.awt.Dimension(300, 500));\n hierarchy.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n hierarchyMouseClicked(evt);\n }\n }\n );\n scrollPanel.setViewportView(hierarchy);\n \n \n add(scrollPanel, java.awt.BorderLayout.CENTER);\n \n }", "public View() {\n this.view = new ViewPanel();\n //this.view.setGraph(this.graph);\n initComponents();\n this.m_algoritmos.setEnabled(false);\n this.mi_maze.setEnabled(false);\n this.mi_salvarImagem.setEnabled(false);\n }", "@Override\n\tpublic void createPartControl(final Composite parent) {\n\t\t\n\t\tComposite canvas = new Composite(parent, SWT.NONE);\n\t\tGridData gridData;\n\t\t\n\t\tGridLayout gridLayout = new GridLayout();\n\t\tgridLayout.numColumns = 2;\n\t\tcanvas.setLayout(gridLayout);\n\t\t\n\t\t//Sets up the ability for this view to get selection events from all views\n\t\tgetSite().getPage().addSelectionListener(this);\n\t\t\n\t\t//GalleryTreeViewer\n\n\t\tgallery = new GalleryViewer(canvas, SWT.V_SCROLL | SWT.VIRTUAL);\n\t\tgridData = new GridData(SWT.FILL, SWT.FILL, true, true);\n\t\tgridData.horizontalSpan = 2;\n\t\tgallery.setLayoutData(gridData);\n\t\t\n\t\tAbstractGridGroupRenderer gr = new NoGroupRenderer();//DefaultGalleryGroupRenderer();\n\t\t//gr.setMinMargin(2);\n\t\tgr.setItemHeight(64);\n\t\tgr.setItemWidth(84);\n\t\t//gr.setAutoMargin(true);\n\t\tgallery.setGroupRenderer(gr);\n\t\tgallery.setAntialias(SWT.OFF);\n\t\t//gallery.setLowQualityOnUserAction(true);\n\t\t//gallery.setHigherQualityDelay(500);\n\t\tgallery.setInterpolation(SWT.NONE);\n\t\t\n\t\tDefaultGalleryItemRenderer ir = new CustomItemRenderer();//DefaultGalleryItemRenderer();\n\t\tir.setShowLabels(true);\n\t\tir.setDropShadows(true);\n\t\tir.setDropShadowsSize(2);\n\t\tgallery.setItemRenderer(ir);\n\t\t\n\t\t//gallery.setDefaultRenderers();\n\n\t\t// SetData is called when Gallery creates an item.\n\t\tgallery.addListener(SWT.SetData, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tGalleryItem item = (GalleryItem) event.item;\n\t\t\t\tif (item.getParentItem() == null) {\n\t\t\t\t\t// It's a group\n\t\t\t\t\tint index = gallery.indexOf(item);\n\t\t\t\t\tif (index >= 0 && index < ResourceTypes.TYPES.length) {\n\t\t\t\t\t\t// This is group 1\n\t\t\t\t\t\titem.setText(ResourceTypes.TYPES[index]);\n\t\t\t\t\t\titem.setItemCount(pakManager.getFileCount(ResourceTypes.TYPES[index]));\n\t\t\t\t\t\titem.setExpanded(true);\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\t// Should never be used\n\t\t\t\t\t\titem.setItemCount(0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// It's an item\n\t\t\t\t\tGalleryItem parentItem = item.getParentItem();\n\n\t\t\t\t\t// Get item index\n\t\t\t\t\tint index = parentItem.indexOf(item);\n\t\t\t\t\t\n\t\t\t\t\tFile resourceFile = pakManager.getFilesByType(parentItem.getText(), index);\n\t\t\t\t\t\n\t\t\t\t\tResource resource = CacheManager.getInstance().getResource(resourceFile);\n\t\t\t\t\t\n\t\t\t\t\titem.setText(resource.getResourceName());\n\n\t\t\t\t\tImage img = map.get(resource.getFile().getAbsolutePath());\n\t\t\t\t\tif(img == null){\n\t\t\t\t\t\timg = new Image(parent.getDisplay(), resource.getImageData());\n\t\t\t\t\t\tmap.put(resource.getFile().getAbsolutePath(), img);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\titem.setImage(img);\n\t\t\t\t\titem.setData(resourceFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tfinal Scale scale = new Scale(canvas, SWT.NONE);\n\t\tscale.setMinimum(2);\n\t\tscale.setMaximum(9);\n\t\tscale.setIncrement(1);\n\t\tgridData = new GridData(SWT.FILL, SWT.CENTER, true, false);\n\t\tscale.setLayoutData(gridData);\n\t\tscale.addSelectionListener(new SelectionListener(){\n\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tAbstractGridGroupRenderer gr = (AbstractGridGroupRenderer) gallery.getGroupRenderer();\n\t\t\t\tgr.setItemSize(32 * scale.getSelection()+ 10, 32 * scale.getSelection());\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tscale.setSelection(9);\n\t\tgr.setItemSize(32 * scale.getSelection()+ 10, 32 * scale.getSelection());\n\t}", "@Override\n public boolean onPreDraw() {\n if (!hasMeasured) {\n\n screenHeight = content.getMeasuredHeight();//获取ViewTree的高度\n hasMeasured = true;//设置为true,使其不再被测量。\n\n }\n return true;//如果返回false,界面将为空。\n\n }", "public void tree(Graphics bbg, int n, int length, int x, int y, double angle){\n double r1 = angle + Math.toRadians(-30);\n double r2 = angle + Math.toRadians(30);\n double r3 = angle + Math.toRadians(0);\n\n //length modifications of the different branches\n double l1 = length/1.3 + (l1I*5);\n double l2 = length/1.3 + (l2I*5);\n double l3 = length/1.3 + (l3I*5);\n\n //x and y points of the end of the different branches\n int ax = (int)(x - Math.sin(r1)*l1)+(int)(l1I);\n int ay = (int)(y - Math.cos(r1)*l1)+(int)(l1I);\n int bx = (int)(x - Math.sin(r2)*l2)+(int)(l2I);\n int by = (int)(y - Math.cos(r2)*l2)+(int)(l2I);\n int cx = (int)(x - Math.sin(r3)*l3)+(int)(l3I);\n int cy = (int)(y - Math.cos(r3)*l3)+(int)(l3I);\n\n if(n == 0){\n return;\n }\n\n\n increment();\n Color fluidC = new Color(colorR,colorG,colorB);\n //bbg.setColor(new Color((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random()*255)));\n bbg.setColor(fluidC);\n\n\n //draw different branches\n bbg.drawLine(x,y,ax,ay);\n bbg.drawLine(x,y,bx,by);\n bbg.drawLine(x,y,cx,cy);\n\n //call recursively to draw fractal\n tree(bbg,n-1,(int)l1, ax,ay,r1);\n tree(bbg, n - 1, (int)l2, bx,by,r2);\n tree(bbg, n - 1, (int)l3, cx,cy,r3);\n\n\n }", "@Override\n public void simpleInitApp() {\n setDisplayStatView(false);\n setDisplayFps(false);\n\n // just a blue box\n Box mesh = new Box(1, 1, 1);\n Geometry geom = new Geometry(\"Box\", mesh);\n Material mat = new Material(assetManager,\n \"Common/MatDefs/Misc/Unshaded.j3md\");\n mat.setColor(\"Color\", ColorRGBA.Blue);\n geom.setMaterial(mat);\n rootNode.attachChild(geom);\n\n // Display a line of text in the default font on depth layer 0\n guiFont = assetManager.loadFont(\"Interface/Fonts/Default.fnt\");\n distanceText = new BitmapText(guiFont);\n distanceText.setSize(guiFont.getCharSet().getRenderedSize());\n distanceText.move( // x/y coordinates and z = depth layer 0\n settings.getWidth() / 2 + 50,\n distanceText.getLineHeight() + 20,\n 0);\n guiNode.attachChild(distanceText);\n\n // Display a 2D image or icon on depth layer -2\n Picture frame = new Picture(\"User interface frame\");\n frame.setImage(assetManager, \"Interface/frame.png\", false);\n frame.move(settings.getWidth() / 2 - 265, 0, -2);\n frame.setWidth(530);\n frame.setHeight(10);\n guiNode.attachChild(frame);\n\n // Display a 2D image or icon on depth layer -1\n Picture logo = new Picture(\"logo\");\n logo.setImage(assetManager, \"Interface/Monkey.png\", true);\n logo.move(settings.getWidth() / 2 - 47, 2, -1);\n logo.setWidth(95);\n logo.setHeight(75);\n guiNode.attachChild(logo);\n }", "public void previewOglRender();", "private void displayTree(Node<Integer> n, double xCord, double yCord, double horizontalGap, double verticalGap,double treeHeight, String key, Color color){\r\n // base condition \r\n if(n == null)\r\n return;\r\n // recursive call to left sub-tree\r\n displayTree(n.getLeftNode(),xCord-horizontalGap,yCord+verticalGap, horizontalGap/3, verticalGap+1*treeHeight,treeHeight, key, color);\r\n // recursive call to middle sub-tree\r\n if(n.getRightElement() != null)\r\n displayTree(n.getMidNode(),xCord+25,yCord+verticalGap, horizontalGap/3, verticalGap+1*treeHeight,treeHeight, key, color);\r\n else\r\n displayTree(n.getMidNode(),xCord+horizontalGap,yCord+verticalGap, horizontalGap/3,verticalGap+1*treeHeight,treeHeight, key, color);\r\n // recursive call to right sub-tree\r\n displayTree(n.getRightNode(),xCord+horizontalGap,yCord+verticalGap, horizontalGap/3,verticalGap+1*treeHeight,treeHeight, key, color);\r\n // draw single square node\r\n if(n.is2Node()){\r\n if(n.getLeftElement() != null)\r\n draw2Node(n.getLeftElement().toString(),xCord,yCord,n.isLeaf(), horizontalGap, verticalGap, key, color);\r\n }\r\n // draw double square node\r\n if(n.is3Node()){\r\n draw3Node(n.getLeftElement().toString(),n.getRightElement().toString(),xCord,yCord,n.isLeaf(),horizontalGap,verticalGap, key, color);\r\n }\r\n }", "public void paintViews(Rect aRect)\n {\n _pntr.setTransform(1,0,0,1,0,0); // I don't know why I need this!\n ViewUpdater updater = _rootView.getUpdater();\n updater.paintViews(_pntr, aRect);\n }", "public void showTree(IGPProgram a_prog, String a_filename)\n throws InvalidConfigurationException {\n if (a_prog == null) {\n return;\n }\n TreeNode myTree = createTree(a_prog);\n if (myTree == null) {\n return;\n }\n TreeVisualizer tv = new TreeVisualizer();\n tv.setTreeBranchRenderer(new JGAPTreeBranchRenderer());\n tv.setTreeNodeRenderer(new JGAPTreeNodeRenderer());\n tv.setBranchStartWidth(18.0);\n tv.setArenaColor(Color.black);\n tv.setBkgndColor(Color.black);\n tv.setRenderNodes(true);\n tv.setSide(1024);\n tv.setCircleDiminishFactor(0.5);\n tv.writeImageFile(tv.renderTree(myTree), new File(a_filename));\n }", "protected void onViewTreeNodeSelectionChanged(ViewNodeJSO viewNode, boolean selected){\n clearCanvas();\n mSelectedView = selected;\n if (selected) { \n onShowTableDetail(viewNode);\n drawRectForView(viewNode);\n } \n }", "private void drawRectForView(ViewNodeJSO view) {\n clearCanvas();\n drawRectForView(view, mCanvas, mScale, HTMLColors.RED, HTMLColors.YELLOW);\n }", "private Node generateView() {\n Text text = new Text(\"Click to\\nextinguish!\");\n text.setFont(Font.font(Font.getDefault().getFamily(), FontWeight.BOLD, Font.getDefault().getSize()));\n text.setTextAlignment(TextAlignment.CENTER);\n text.setPickOnBounds(false);\n text.setMouseTransparent(true);\n\n VBox box = new VBox(5.0);\n\n AnimationChannel animChannel = new AnimationChannel(FXGL.image(\"flames.png\"), 4, 20, 20,\n Duration.seconds(ANIM_TIME), 0, 3);\n AnimatedTexture texture = new AnimatedTexture(animChannel).loop();\n texture.setFitWidth(SIZE);\n texture.setFitHeight(SIZE);\n texture.setSmooth(false);\n texture.setPickOnBounds(true);\n texture.setOnMousePressed(pEvt -> {\n FXGL.play(\"sizzle.wav\");\n FXGL.removeUINode(box);\n mCount--;\n if (mCount <= 0) {\n onCompleted();\n }\n pEvt.consume();\n });\n\n // Wrap in entity so animation plays\n mEntity = FXGL.entityBuilder().view(texture).buildAndAttach();\n\n box.getChildren().addAll(text, texture);\n box.setAlignment(Pos.CENTER);\n box.setPickOnBounds(false);\n\n // Fix width for accurate location generation\n box.setMinWidth(SIZE * 2.0);\n box.setMaxWidth(SIZE * 2.0);\n box.setPrefWidth(SIZE * 2.0);\n\n return box;\n }", "private void flushElements() {\n if (elements != null) {\n TopItemList smallModel = new TopItemList();\n smallModel.addAll(elements);\n\n SimpleViewBuilder builder = new SimpleViewBuilder();\n\n // scale Compute\n double scale = (double) lineHeight\n / drawingSpecifications.getMaxCadratHeight();\n\n MDCView view = builder.buildView(smallModel,\n drawingSpecifications);\n\n if (view.getWidth() == 0 || view.getHeight() == 0) {\n return;\n }\n ViewDrawer drawer = new ViewDrawer();\n\n BufferedImage image = new BufferedImage((int) Math.ceil(view\n .getWidth()\n * scale + 1), (int) Math.ceil(view.getHeight() * scale\n + 2 * pictureMargin + 1), BufferedImage.TYPE_INT_ARGB);\n\n Graphics2D g = image.createGraphics();\n GraphicsUtils.antialias(g);\n\n g.setColor(backgroundColor);\n g.fillRect(0, 0, image.getWidth(), image.getHeight());\n g.setColor(drawingSpecifications.getBlackColor());\n g.translate(1, 1 + pictureMargin);\n\n g.scale(scale, scale);\n drawer.draw(g, view, drawingSpecifications);\n g.dispose();\n\n File fic = getImageFile(imageNumber);\n try {\n ImageIO.write(image, \"png\", fic); //$NON-NLS-1$\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n String center = \"\"; //$NON-NLS-1$\n\n if (centerPictures) {\n center = \" align='center' \"; //$NON-NLS-1$\n }\n if (pictureScale != 100) {\n write(\"<img \" + center + \" src='\" + fic.getName() //$NON-NLS-1$ //$NON-NLS-2$\n + \"' width='\" + pictureScale + \"%' height='\" //$NON-NLS-1$ //$NON-NLS-2$\n + pictureScale + \"%'>\"); //$NON-NLS-1$\n\n } else if (generatePictureSize) {\n write(\"<img \" + center + \" src='\" + fic.getName() //$NON-NLS-1$ //$NON-NLS-2$\n + \"' width='\" + image.getWidth() + \"' height='\" //$NON-NLS-1$ //$NON-NLS-2$\n + image.getHeight() + \"'>\"); //$NON-NLS-1$\n } else {\n write(\"<img \" + center + \"src='\" + fic.getName() + \"'>\"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n }\n imageNumber++;\n image.flush();\n elements = null;\n }\n }", "public void draw() {\n draw(root, true);\n }", "public void createPartControl(Composite parent) {\n//\t\tviewer = new TreeViewer(parent, SWT.VIRTUAL | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tviewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\n\n\t\tdrillDownAdapter = new DrillDownAdapter(viewer);\n\t\tviewer.setContentProvider(new ViewContentProvider());\n\t\tviewer.setLabelProvider(new ViewLabelProvider());\n\t\tviewer.setSorter(new NameSorter()); // sorts the tree names alphabetically\n\t\tviewer.setInput(getViewSite());\n\t\t\n\t\tViewerFilter[] filters = {showAllFilter};\n\t\tviewer.setFilters(filters);\n\n\t\tshell = parent.getShell();\n\n\t\t// Create the help context id for the viewer's control\n\t\tPlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(), \"org.openmodelica.modelicaml.view.componentstree\");\n\t\tmakeActions();\n\t\thookContextMenu();\n//\t\thookDoubleClickAction();\n\t\thookSelectionChangedAction();\n\t\tcontributeToActionBars();\n\n//\t\tgetSite().getWorkbenchWindow().getSelectionService().addSelectionListener(listener);\n\t\t\n\t\t// add a selection provider.\n\t\tgetSite().setSelectionProvider(viewer); \n\t\t\n\t\t// double click for opening/closing the sub tree\n\t\tviewer.addOpenListener(new IOpenListener() {\n\t\t\tpublic void open(final OpenEvent event) {\n\t\t\t\tObject firstElement = ((IStructuredSelection)\n\t\t\t\tevent.getSelection()).getFirstElement();\n\t\t\t\t\tif (viewer.getExpandedState(firstElement)) {\n\t\t\t\t\t\tviewer.collapseToLevel(firstElement, AbstractTreeViewer.ALL_LEVELS);\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tviewer.expandToLevel(firstElement, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\n\t\t// add drag support\n\t\tint operations = DND.DROP_MOVE;\n\t\tTransfer[] transferTypes = new Transfer[]{ LocalSelectionTransfer.getTransfer()};\n\t\tviewer.addDragSupport(operations, transferTypes, new DragListener(viewer));\n\n\t}", "public interface View {\n\n public void Update();\n public void Clear(String scopeName);\n\n public ViewScope getMainView();\n public ViewScope getCanvasView();\n public ViewScope getToolbarView();\n public ViewScope getTopMenuView();\n\n public void drawRectangle(String viewName, Rectangle rectangle, int pos_x, int pos_y, double scale);\n public void drawRectangle(String viewName, Rectangle rectangle, int pos_x, int pos_y);\n public void drawRectangle(String viewName, Rectangle rectangle, double scale);\n public void drawRectangle(String viewName, Rectangle rectangle);\n public void drawPolygon(String viewName, Polygon polygon, int pos_x, int pos_y, double scale);\n public void drawImage(String viewName, String path, int pos_x, int pos_y, int width, int height);\n public void drawText(String viewName, String text, int x, int y, int size);\n\n}", "private void L2RTreeLayout(JFrame jf) {\n\t graph = new DelegateForest<String,Integer>();\n\n\t createTree();\n\t \n\t treeLayout = new TreeLayout<String,Integer>(graph);\n\t radialLayout = new RadialTreeLayout<String,Integer>(graph);\n\t radialLayout.setSize(new Dimension(600,600));\n\t vv2 = new VisualizationViewer<String,Integer>(treeLayout, new Dimension(600,600));\n\t vv2.setBackground(Color.white);\n\t vv2.getRenderContext().setEdgeShapeTransformer(EdgeShape.quadCurve(graph));\n\t vv2.getRenderContext().setVertexLabelTransformer(new ToStringLabeller());\n\t // add a listener for ToolTips\n\t vv2.setVertexToolTipTransformer(new ToStringLabeller());\n\t vv2.getRenderContext().setArrowFillPaintTransformer(Functions.<Paint>constant(Color.lightGray));\n\t rings = new Rings();\n\t \n\t setLtoR(vv2);\n\t \tjf.setTitle(\"Changeable Spring - FRLayout\");\n\t\t\tjf.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\n\t Container content = jf.getContentPane();\n\t final GraphZoomScrollPane panel = new GraphZoomScrollPane(vv2);\n\t content.add(panel);\n\t \n\t final DefaultModalGraphMouse<String, Integer> graphMouse\n\t \t= new DefaultModalGraphMouse<String, Integer>();\n\n\t vv.setGraphMouse(graphMouse);\n\t \n\t JComboBox<Mode> modeBox = graphMouse.getModeComboBox();\n\t modeBox.addItemListener(graphMouse.getModeListener());\n\t graphMouse.setMode(ModalGraphMouse.Mode.TRANSFORMING);\n\n\t final ScalingControl scaler = new CrossoverScalingControl();\n\n\t JButton plus = new JButton(\"+\");\n\t plus.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t scaler.scale(vv2, 1.1f, vv2.getCenter());\n\t }\n\t });\n\t JButton minus = new JButton(\"-\");\n\t minus.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t scaler.scale(vv2, 1/1.1f, vv2.getCenter());\n\t }\n\t });\n\t \n\t JToggleButton radial = new JToggleButton(\"Radial\");\n\t radial.addItemListener(new ItemListener() {\n\n\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tLayoutTransition<String,Integer> lt =\n\t\t\t\t\t\t\tnew LayoutTransition<String,Integer>(vv2, treeLayout, radialLayout);\n\t\t\t\t\t\tAnimator animator = new Animator(lt);\n\t\t\t\t\t\tanimator.start();\n\t\t\t\t\t\tvv.getRenderContext().getMultiLayerTransformer().setToIdentity();\n\t\t\t\t\t\tvv.addPreRenderPaintable(rings);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLayoutTransition<String,Integer> lt =\n\t\t\t\t\t\t\tnew LayoutTransition<String,Integer>(vv2, radialLayout, treeLayout);\n\t\t\t\t\t\tAnimator animator = new Animator(lt);\n\t\t\t\t\t\tanimator.start();\n\t\t\t\t\t\tvv2.getRenderContext().getMultiLayerTransformer().setToIdentity();\n\t\t\t\t\t\tsetLtoR(vv2);\n\t\t\t\t\t\tvv2.removePreRenderPaintable(rings);\n\t\t\t\t\t}\n\n\t\t\t\t\tvv2.repaint();\n\t\t\t\t}});\n\n\t JPanel scaleGrid = new JPanel(new GridLayout(1,0));\n\t scaleGrid.setBorder(BorderFactory.createTitledBorder(\"Zoom\"));\n\n\t JPanel controls = new JPanel();\n\t scaleGrid.add(plus);\n\t scaleGrid.add(minus);\n\t controls.add(radial);\n\t controls.add(scaleGrid);\n\t controls.add(modeBox);\n\n\t content.add(controls, BorderLayout.SOUTH);\n\t \tjf.pack();\n\t\t\tjf.setVisible(true);\n\t}", "protected Object createCraphicalViewInternal() {\n\t\tDesignViewDiagram aviewDiagram = null;\n\t\t\t\n\t\tif (selectedViewType.equalsIgnoreCase(ViewLayout.DECOMPOSITION_VIEW)){\n//\t\t\tSystem.out.println(System.currentTimeMillis());\n\t\t\t\n\t\t\tSparseTree archTree = null;\n//\t\t\tarchTree = ArcheModel.GetInstance().getFullDecompositionArcheModel(\"Architecture1\", rootFactId, bRootMarked); \t\t\t\n\t\t\tarchTree = ArcheModel.GetInstance().getFullDecompositionArcheModel(versionName, rootFactId, bRootMarked); \t\t\t\n\t\t\tif(archTree == null){\n//\t\t\t\tarchTree = ArcheModel.GetInstance().getFullDecompositionArcheModel(versionName, rootFactId, bRootMarked); \t\t\t\t\t\t\t\n//\t\t\t\tif(archTree == null){\n//\t\t\t\t\tSystem.out.println(\"Architecture might not exist in the ArchE database\");\n\t\t\t\t\treturn null;\n//\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tSystem.out.println(System.currentTimeMillis());\n\t\n\t\t\tDecompositionViewLayout\tlayout = new DecompositionViewLayout();\n\t\t\taviewDiagram = layout.generateTreeLayout(archTree);\n\t\t}\n\t\telse if (selectedViewType.equalsIgnoreCase(ViewLayout.DEPENDENCY_VIEW)){\n//\t\t\tSystem.out.println(System.currentTimeMillis());\n\t\t\tSparseGraph archGraph = null;\n//\t\t\tarchGraph = model.getFullDependencyArcheModel(\"Architecture1\", rootFactId, bRootMarked, rootFactType); \t\n\t\t\tarchGraph = model.getFullDependencyArcheModel(versionName, rootFactId, bRootMarked, rootFactType); \t\n\t\t\tif(archGraph == null){\n//\t\t\t\tarchGraph = model.getFullDependencyArcheModel(versionName, rootFactId, bRootMarked, rootFactType); \t\n//\t\t\t\tif(archGraph == null){\n//\t\t\t\t\tSystem.out.println(\"Architecture might not exist in the ArchE database\");\n\t\t\t\t\treturn null;\n//\t\t\t\t}\n\t\t\t}\n//\t\t\tSystem.out.println(System.currentTimeMillis());\n\t\t\t\t\t\t\n\t\t\tDependencyViewLayout\tlayout = new DependencyViewLayout();\n\t\t\tif(selectedLayoutType.equals(DependencyViewLayout.FR_LAYOUT)) {\t\n\t\t\t\taviewDiagram = layout.generateFRLayout(archGraph);\n\t\t\t}\n\t\t\telse if (selectedLayoutType.equals(DependencyViewLayout.KK_LAYOUT)) {\n\t\t\t\taviewDiagram = layout.generateKKLayout(archGraph);\n\t\t\t}\n\t\t\telse if (selectedLayoutType.equals(DependencyViewLayout.CIRCLE_LAYOUT)) {\n\t\t\t\taviewDiagram = layout.generateCircleLayout(archGraph);\t\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\telse if (selectedViewType.equalsIgnoreCase(ViewLayout.CONCURRENCY_VIEW)){\n\t\t\t// TODO: [Extension Point] for concurrency view \n\t\t}\n\t\t// TODO: [Extension Point] for additional views \n\t\t\n\t\tif(aviewDiagram != null){\n\t\t\taviewDiagram.setVersionName(versionName);\n\t\t\taviewDiagram.setVersionID(versionID);\n\t\t\taviewDiagram.setRootNodeFactId(rootFactId);\n\t\t\taviewDiagram.setRootNodeFactType(rootFactType);\n\t\t\taviewDiagram.setSelectedViewType(selectedViewType);\n\t\t\taviewDiagram.setSelectedLayoutType(selectedLayoutType);\t\t\t\n\t\t}\n\t\t\n\t\treturn aviewDiagram;\n\t}", "@Override\n public void draw(INode root, Stack<Matrix4f> modelView) {\n GL3 gl = glContext.getGL().getGL3();\n gl.glEnable(GL.GL_TEXTURE_2D);\n gl.glActiveTexture(GL.GL_TEXTURE0);\n int loc = -1;\n loc = shaderLocations.getLocation(\"image\");\n if (loc >= 0) {\n gl.glUniform1i(loc, 0);\n }\n root.draw(this, modelView);\n }", "public void draw(Pane canvas, ContextMenu contextMenu) {\n\t\tcanvas.getChildren().clear();\n\t\tcanvas.getChildren().add(createVlanNode());//creates router and its height\n\n\t\tint tempPosX = 250;\n\t\tint tempPosY = 50;\n\n\n\t\tfor (HubNode hubNode : NodeController.getNodeController().getHubNodes()) {\n\n\t\t\tString currentHubName = hubNode.getName();\n\t\t\thubNode.setPosx(tempPosX);\n\t\t\thubNode.setPosy(tempPosY);\n\t\t\tcanvas.getChildren().add(hubInsertNode(hubNode, canvas, contextMenu));\n\n\t\t\tboolean haveConnections = !hubNode.getVmInterfaceNames().isEmpty();\n\n\t\t\tif (haveConnections) {\n\t\t\t\tcreateLine(canvas, tempPosX + 100, tempPosY + 50, tempPosX + 150, tempPosY + 50);\n\t\t\t}\n\n\n\t\t\ttempPosX += 200;\n\t\t\tfor (VM vmNode: NodeController.getNodeController().getCurrentVms()) {\n\t\t\t\tString currentVMName = vmNode.getName();\n\t\t\t\tVM currentVM = vmNode;\n\t\t\t\tfor (VMinterface vmInterface: vmNode.getIntrfces()) {\n\t\t\t\t\tString vmIntrfcPair = currentVM.getName() + \".\" + vmInterface.getIntrfcLabel();\n\t\t\t\t\tif (hubNode.containsInterfaceName(vmIntrfcPair)) {\n\t\t\t\t\t\tcurrentVM.setPosx(tempPosX);\n\t\t\t\t\t\tcurrentVM.setPosy(tempPosY);\n\t\t\t\t\t\tcanvas.getChildren().add(vmInsertNode(currentVM, canvas, contextMenu));\n\n\t\t\t\t\t\tif (haveConnections) {\n\t\t\t\t\t\t\tcreateLine(canvas, tempPosX, tempPosY + 50, tempPosX - 50, tempPosY + 50);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttempPosY += 150;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (!haveConnections){\n\t\t\t\ttempPosY +=150;\n\t\t\t}\n\n\n\t\t\tif (haveConnections) {\n\t\t\t\tcreateLine(canvas, tempPosX - 50, hubNode.getPosy() + 50, tempPosX - 50, tempPosY - 100);\n\t\t\t}\n\n\t\t\tcreateLine(canvas, /* vlanstartPosX = */ 50 + 100, hubNode.getPosy() + 50, hubNode.getPosx(),\n\t\t\t\t\thubNode.getPosy() + 50);\n\t\t\ttempPosX += 200;\n\n\t\t}\n\t}", "public void placeTreeNodes() {\n int width;\n float rad;\n\n // Stores width and rad for convenience.\n width = MainActivity.getCanvas().getWidth();\n rad = AnimationParameters.NODE_RADIUS;\n\n // Places the Nodes.\n placeTreeNodes((int) (width / 2 + rad * 1.5), (int) (rad * 2),\n (int) (width - rad * 5), (int) AnimationParameters.depthLen);\n\n }", "void leftView() \n\t\t{ \n\t\t\tleftViewUtil(root, 1); \n\t\t}", "public void interactiveTreeEditingRToL() {\r\n JTree tree = new JTree(); \r\n TreeCellRenderer renderer = new DynamicIconRenderer();\r\n tree.setCellRenderer(renderer);\r\n tree.setEditable(true);\r\n JXTree xTree = new JXTree();\r\n xTree.setCellRenderer(renderer);\r\n xTree.setEditable(true);\r\n final JXFrame frame = wrapWithScrollingInFrame(tree, xTree, \"standard Editing: compare tree and xtree\");\r\n Action toggleComponentOrientation = new AbstractAction(\"toggle orientation\") {\r\n\r\n public void actionPerformed(ActionEvent e) {\r\n ComponentOrientation current = frame.getComponentOrientation();\r\n if (current == ComponentOrientation.LEFT_TO_RIGHT) {\r\n frame.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n } else {\r\n frame.applyComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\r\n\r\n }\r\n\r\n }\r\n\r\n };\r\n addAction(frame, toggleComponentOrientation);\r\n frame.setVisible(true);\r\n \r\n }", "public void render() {\r\n Color geneColor=null;\r\n\r\n if(isChanged) {\r\n this.removeChild(predRect);\r\n predRect = new PPath();\r\n\r\n if(type == SegmentInfo.TYPE_AUTO) predRect.setPathTo(new RoundRectangle2D.Double(startx,0.0,endx - startx,(double)this.PREDICTION_RECT_HEIGHT, 10, 10));\r\n else if(type == SegmentInfo.TYPE_MANUAL) predRect.setPathTo(new RoundRectangle2D.Double(startx,0.0,endx - startx,(double)this.PREDICTION_RECT_HEIGHT, 0, 0));\r\n\r\n if(this.isSelected()) {\r\n if(this.sign < 0) geneColor = this.SELECTED_DOWN_COLOR;\r\n else geneColor = this.SELECTED_UP_COLOR;\r\n }\r\n else {\r\n if(this.sign < 0) geneColor = this.DOWN_COLOR;\r\n else geneColor = this.UP_COLOR;\r\n }\r\n\r\n predRect.setPaint(geneColor);\r\n this.addChild(predRect);\r\n isChanged=false;\r\n }\r\n }", "public void renderTileManager()\n {\n background(background);\n tiles[activeTile].drawGrid();\n tiles[activeTile].drawCellHover();\n createPreview(tiles[activeTile]);\n drawPreviewHover();\n drawPreviews();\n }", "public void draw() {\n draw(this.root, new RectHV(0.0, 0.0, 1.0, 1.0));\n }", "public MainFrame() { \n \n \n initComponents();\n java.net.URL imgURL = getClass().getResource(\"/pkg4seqgui/images/dna.png\");\n ImageIcon image = new ImageIcon(imgURL);\n \n DefaultTreeCellRenderer renderer =(DefaultTreeCellRenderer) AnalysisTree.getCellRenderer();\n renderer.setLeafIcon(image);\n imgURL = getClass().getResource(\"/pkg4seqgui/images/dna1.png\");\n ImageIcon image2 = new ImageIcon(imgURL);\n renderer.setOpenIcon(image2);\n expandAllNodes(AnalysisTree, 0, AnalysisTree.getRowCount());\n \n\n //JTREE MULTIPLEFILE\n \n\n //adding here all the textarea that must be maneged with right button mouse\n \n //vRNAPanel\n contextMenu.add(vThreadText);\n contextMenu.add(vAdapter5Text);\n contextMenu.add(vAdapter3Text);\n contextMenu.add(vMinLengthText);\n contextMenu.add(vOrganismText);\n //indexingSTARPanel\n contextMenu.add(iThreadText);\n contextMenu.add(iGenomeURLText);\n contextMenu.add(iGTFURLText);\n //miRNAPanel\n contextMenu.add(mmiRBaseText);\n //PCA\n contextMenu.add(pComponent1Text);\n contextMenu.add(pComponent2Text); \n //DES\n contextMenu.add(dLog2fcText);\n contextMenu.add(dFDRText); \n //indexingBW\n contextMenu.add(iThreadBText);\n contextMenu.add(iGenomeURLBText);\n //indexingSalmonPanel\n contextMenu.add(iThreadSText);\n contextMenu.add(iGenomeURLSText);\n contextMenu.add(iGTFURLSText);\n //countingSalmon\n contextMenu.add(cThreadText);\n contextMenu.add(cAdapter5Text);\n contextMenu.add(cAdapter3Text);\n contextMenu.add(cMinLengthText);\n //filterCount\n contextMenu.add(fFPKMfileText);\n contextMenu.add(fOutputFolderText);\n \n FPKMFileTable.getColumn(\"Folder\").setPreferredWidth(1000);\n\n \n \n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n \n String HorSplPan = getPreferences().get(\"4SeqGUI_HorizontalSplitPanel\", null);\n if (HorSplPan!=null){\n HorizontalSplitPanel.setDividerLocation(Integer.valueOf(HorSplPan)); \n }\n else{\n HorizontalSplitPanel.setDividerLocation(screenSize.height*3/10); \n }\n \n String VerSplPan = getPreferences().get(\"4SeqGUI_VerticalSplitPanel\", null);\n if (VerSplPan!=null){\n VerticalSplitPanel.setDividerLocation(Integer.valueOf(VerSplPan));\n }\n else {\n VerticalSplitPanel.setDividerLocation(screenSize.height*7/10);\n }\n \n String WindowWidth= getPreferences().get(\"4SeqGUI_WindowWidth\", null);\n String WindowHeight= getPreferences().get(\"4SeqGUI_WindowHeight\", null); \n if ((WindowWidth!=null)&&(WindowHeight!=null)){\n setSize(Integer.valueOf(WindowWidth),Integer.valueOf(WindowHeight)); \n }\n else{\n setSize(screenSize.width*95/100,screenSize.height*95/100);\n }\n\n //OUTPUT FRAME\n int OutputframeWidth= Integer.valueOf(getPreferences().get(\"4SeqGUI_WindowOutputWidth\", \"0\"));\n int OutputframeHeight= Integer.valueOf(getPreferences().get(\"4SeqGUI_WindowOutputHeight\", \"0\"));\n \n if ((OutputframeWidth==0)||(OutputframeHeight==0)){\n OutputframeWidth=screenSize.width*4/100;\n OutputframeHeight=screenSize.height*5/100;\n }\n\n OutputFrame.setSize(OutputframeWidth,OutputframeHeight);\n \n \n int DownloadframeWidth= Integer.valueOf(getPreferences().get(\"4SeqGUI_WindowDownloadWidth\", \"0\"));\n int DownloadframeHeight= Integer.valueOf(getPreferences().get(\"4SeqGUI_WindowDownloadHeight\", \"0\")); \n if ((DownloadframeWidth==0)||(DownloadframeHeight==0)){\n DownloadframeWidth=screenSize.width*4/100;\n DownloadframeHeight=screenSize.height*5/100;\n }\n\n DownloadFrame.setSize(DownloadframeWidth,DownloadframeHeight);\n \n String WidthGroup = getPreferences().get(\"4SeqGUI_GroupCellWidth\", null);\n String WidthBatch = getPreferences().get(\"4SeqGUI_BatchCellWidth\", null);\n String WidthFolder = getPreferences().get(\"4SeqGUI_FolderCellWidth\", null);\n if ((WidthGroup!=null)&&(WidthBatch!=null)&&(WidthFolder!=null)){\n FPKMFileTable.getColumnModel().getColumn(1).setPreferredWidth(Integer.valueOf(WidthGroup));\n FPKMFileTable.getColumnModel().getColumn(2).setPreferredWidth(Integer.valueOf(WidthBatch));\n FPKMFileTable.getColumnModel().getColumn(0).setPreferredWidth(Integer.valueOf(WidthFolder));\n } \n else\n FPKMFileTable.getColumnModel().getColumn(1).setPreferredWidth(FPKMFileTable.getWidth()*10/100);\n \n \n \n String WidthGroup1 = getPreferences().get(\"4SeqGUI_Group1CellWidth\", null);\n String WidthBatch1 = getPreferences().get(\"4SeqGUI_Batch1CellWidth\", null);\n String WidthHeader = getPreferences().get(\"4SeqGUI_HeaderCellWidth\", null);\n if ((WidthGroup1!=null)&&(WidthBatch1!=null)&&(WidthHeader!=null)){\n CCountHeaderTable.getColumnModel().getColumn(1).setPreferredWidth(Integer.valueOf(WidthGroup1));\n CCountHeaderTable.getColumnModel().getColumn(2).setPreferredWidth(Integer.valueOf(WidthBatch1));\n CCountHeaderTable.getColumnModel().getColumn(0).setPreferredWidth(Integer.valueOf(WidthHeader));\n } \n else\n CCountHeaderTable.getColumnModel().getColumn(1).setPreferredWidth(CCountHeaderTable.getWidth()*10/100);\n \n \n\n\n setLocationRelativeTo(null);\n invalidate();\n doLayout();\n \n }", "protected void addCentroidViews(DefaultMutableTreeNode root) {\r\n DefaultMutableTreeNode centroidNode = new DefaultMutableTreeNode(\"Centroid Graphs\");\r\n DefaultMutableTreeNode expressionNode = new DefaultMutableTreeNode(\"Expression Graphs\");\r\n GLOBANCCentroidViewer centroidViewer = new GLOBANCCentroidViewer(this.experiment, geneLists, null, null, null, null, null, null, null, null, null);\r\n centroidViewer.setMeans(this.means.A);\r\n centroidViewer.setVariances(this.variances.A);\r\n for (int i=0; i<this.geneLists.length; i++) {\r\n if (i == 0) {\r\n centroidNode.add(new DefaultMutableTreeNode(new LeafInfo(\"Significant Genes \", centroidViewer, new CentroidUserObject(i, CentroidUserObject.VARIANCES_MODE))));\r\n expressionNode.add(new DefaultMutableTreeNode(new LeafInfo(\"Significant Genes \", centroidViewer, new CentroidUserObject(i, CentroidUserObject.VALUES_MODE))));\r\n } else if (i == 1) {\r\n centroidNode.add(new DefaultMutableTreeNode(new LeafInfo(\"Non-significant Genes \", centroidViewer, new CentroidUserObject(i, CentroidUserObject.VARIANCES_MODE))));\r\n expressionNode.add(new DefaultMutableTreeNode(new LeafInfo(\"Non-significant Genes \", centroidViewer, new CentroidUserObject(i, CentroidUserObject.VALUES_MODE))));\r\n }\r\n }\r\n \r\n GLOBANCCentroidsViewer centroidsViewer = new GLOBANCCentroidsViewer(this.experiment, geneLists, geneGroupMeans, geneGroupSDs, null, null, null, null, null, null, null);\r\n\r\n centroidsViewer.setMeans(this.means.A);\r\n centroidsViewer.setVariances(this.variances.A);\r\n \r\n centroidNode.add(new DefaultMutableTreeNode(new LeafInfo(\"All Genes\", centroidsViewer, new Integer(CentroidUserObject.VARIANCES_MODE))));\r\n expressionNode.add(new DefaultMutableTreeNode(new LeafInfo(\"All Genes\", centroidsViewer, new Integer(CentroidUserObject.VALUES_MODE))));\r\n root.add(centroidNode);\r\n root.add(expressionNode);\r\n }", "private Node getDistanceView() {\n\n\n Node base = new Node();\n\n base.setRenderable(distanceLayoutRenderable);\n\n Context c = this;\n // Add listeners etc here\n View eView = distanceLayoutRenderable.getView();\n eView.setOnTouchListener((v, event) -> {\n Toast.makeText(\n c, \"這應該是你想去的地方吧\", Toast.LENGTH_LONG)\n .show();\n return false;\n });\n\n return base;\n }", "public TreeViewer getTreeView() {\n\t\t// on CM CubridNavigatorView navigatorView =\n\t\t// CubridNavigatorView.getNavigatorView(\"com.cubrid.cubridmanager.host.navigator\");\n\t\t// CubridNavigatorView navigatorView =\n\t\t// CubridNavigatorView.getNavigatorView(CubridQueryNavigatorView.ID);\n\t\t// return navigatorView.getViewer();\n\t\treturn null;\n\t}", "public void showTree(IGPProgram a_prog, String a_filename,\n TreeBranchRenderer a_treeBranchRenderer,\n TreeNodeRenderer a_treeNodeRenderer)\n throws InvalidConfigurationException {\n TreeNode myTree = createTree(a_prog);\n if (myTree == null) {\n return;\n }\n TreeVisualizer tv = new TreeVisualizer();\n tv.setTreeBranchRenderer(a_treeBranchRenderer);\n tv.setTreeNodeRenderer(a_treeNodeRenderer);\n tv.setBranchStartWidth(18.0);\n tv.setArenaColor(Color.black);\n tv.setBkgndColor(Color.black);\n tv.setRenderNodes(true);\n tv.setSide(1024);\n tv.setCircleDiminishFactor(0.5);\n tv.writeImageFile(tv.renderTree(myTree), new File(a_filename));\n }", "@AutoGenerated\r\n\tprivate Panel buildTreePanel()\r\n\t{\n\t\ttreePanel = new Panel();\r\n\t\ttreePanel.setImmediate(false);\r\n\t\ttreePanel.setWidth(\"100.0%\");\r\n\t\ttreePanel.setHeight(\"100.0%\");\r\n\t\t\r\n\t\t// panelVerticalLayout\r\n\t\tpanelVerticalLayout = buildPanelVerticalLayout();\r\n\t\ttreePanel.setContent(panelVerticalLayout);\r\n\t\t\r\n\t\treturn treePanel;\r\n\t}", "ImageViewer(){\n\t\tJFrame frame = new JFrame();\n\t\tJPanel north = new JPanel(); //host two buttons\n\t\topen = new JButton(\"Open\");\n\t\tclose = new JButton(\"Close\");\n\t\tnorth.add(open);\n\t\tnorth.add(close);\n\t\t\n\t\t//register event handler to the buttons\n\t\tClickHandler handler = new ClickHandler();\n\t\topen.addActionListener(handler);\n\t\tclose.addActionListener(handler);\n\t\t\n\t\t//make our viewr canvas\n\t\tcanvas = new MyCanvas();\n\t\tframe.add(canvas, BorderLayout.CENTER);\n\t\t\n\t\t//populate the bottom panel\n\t\tJPanel south = new JPanel();\n\t\tgreeting = new JTextField(20);\n\t\tapply = new JButton(\"Apply\");\n\t\tsouth.add(greeting);\n\t\tsouth.add(apply);\n\t\tframe.add(south, BorderLayout.SOUTH);\n\t\tapply.addActionListener(handler);\n\t\t\n\t\tframe.add(north, BorderLayout.NORTH);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setSize(400,400);\n\t\tframe.setVisible(true);\n\t}", "StableView view();", "ViewGroup mo106367i();", "public void mouseClicked(MouseEvent ev)\n\t{\n\t if (timer!=null || manim==null || manim.snoopGeneration()!=null) return;\n\n\t Node n = manim.getNodeCloseToBottom(ev.getX(),ev.getY());\n\t if (n!=null) {\n\t\tunhilitNode();\n\t\tchangeColorDirection(true,n);\n\t\trenderPath(n);\t \n\t\thilitNode(n,Color.red);\n\t\treturn;\n\t }\n\n\t n = manim.getNodeCloseToTop(ev.getX(),ev.getY());\n\t if (n!=null) {\n\t\tunhilitNode();\n\t\tchangeColorDirection(false,n);\n\t\trenderDownPaths(n);\n\t\thilitNode(n,Color.blue);\n\t\treturn;\n\t }\n\t}", "@Override\n public void run() {\n\n GLMouseListener mouse = viewer.getMouseHandler();\n if (mouse instanceof GLMouseAdapter) {\n ((GLMouseAdapter)mouse).setLaptopConfig();\n }\n \n viewer.addSelectionListener(new SimpleSelectionHandler(renderables));\n\n // Create a animator that drives canvas' display() at the specified FPS.\n final FPSAnimator animator;\n final FPSMonitor fpsMonitor;\n \n if (MultiViewer.doFPS) {\n animator = new FPSAnimator(viewer.getCanvas().getDrawable(), FPS, true);\n animator.setUpdateFPSFrames(3, null);\n animator.start();\n fpsMonitor = new FPSMonitor(title + \" FPS: \", animator);\n new Thread(fpsMonitor).start();\n } else {\n animator = null;\n fpsMonitor = null;\n }\n \n // Create the top-level container\n frame = new JFrame(); // Swing's JFrame or AWT's Frame\n frame.add(viewer.getCanvas().getComponent());\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // Use a dedicate thread to run the stop() to ensure that the\n // animator stops before program exits.\n new Thread() {\n @Override\n public void run() {\n \n if (animator != null && animator.isStarted()) {\n animator.stop();\n }\n if (fpsMonitor != null) { \n fpsMonitor.stop();\n }\n \n try {\n SwingUtilities.invokeAndWait (new Runnable() {\n @Override\n public void run () {\n viewer.dispose ();\n }\n });\n }\n catch (InvocationTargetException e) {\n }\n catch (InterruptedException e) {\n }\n \n closed = true;\n }\n }.start();\n }\n });\n frame.setTitle(title);\n // frame.pack();\n frame.setVisible(true);\n // animator.start(); // start the animation loop\n }", "public FleuryDisplayPanel(int[][] e, int[][][] t){\r\n\t\r\n\tedges = e;\r\n\ttreeEdges = t;\r\n\tcurrentEdge = -1;\r\n\tcurrentStartVertex = 0;\r\n\t\r\n\tif(t[0][0][0] == -1) {\r\n\t hasEulerCircuit = false;\r\n\t}\r\n\telse {\r\n\t hasEulerCircuit = true;\r\n\t}\r\n\r\n\tint maxVertex = 0;\r\n\tfor (int i=0; i < edges.length; i++){\r\n\t int j = edges[i][0];\r\n\t int k = edges[i][1];\r\n\t \r\n\t if (j > k){\r\n\t\tif (j > maxVertex) {\r\n\t\t maxVertex = j;\r\n\t\t}\r\n\t } else {\r\n\t\tif (k > maxVertex) {\r\n\t\t maxVertex = k;\r\n\t\t}\r\n\t }\r\n\t}\r\n\tbadEdgeIncurred = false;\r\n\tnumVertices = maxVertex+1;\r\n\r\n\tthis.XCENTER = 85;\r\n\tthis.YCENTER = 110;\r\n\tthis.RADIUS = 60;\r\n\t\r\n }", "public ViewerComponent() {\n int images = layout_threads.size();\n int comp_w = 4*w, comp_h = (h*images)/4; if ((images%4) != 0) comp_h += h;\n Dimension dimension = new Dimension(comp_w, comp_h); setPreferredSize(dimension); setMinimumSize(dimension);\n addMouseListener(this); addMouseMotionListener(this);\n }", "@Override\n public void draw(INode root, Stack<Matrix4f> modelView) {\n root.draw(this, modelView);\n }", "public TwentyQuestionsView() {\n\t\tsuper(new BorderLayout());\n\t\t// brings in image 20Q.jpg\n//\t\timage = new Image(\"20Q.jpg\");\n\t\t// makes a new instace of the controller\n\t\tcontroller = new TwentyQuestionsController();\n\t\t// starts at the root of the treee\n\t\tcurrent = controller.tree.getRoot();\n\t\t// calls the method which initializes the GUI\n\t\tinitGUI();\n\n\t}", "ViewGroup mo1504k();", "public JVDraw() {\r\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\t\tsetLocation(250, 250);\r\n\t\tsetSize(500, 500);\r\n\t\tsetTitle(\"JVDraw\");\r\n\r\n\t\tsetLayout(new BorderLayout());\r\n\r\n\t\tJPanel toolbar = new JPanel(new FlowLayout(FlowLayout.LEFT));\r\n\r\n\t\tJColorArea jca = new JColorArea(Color.BLACK);\r\n\t\tJColorArea jca2 = new JColorArea(Color.WHITE);\r\n\r\n\t\ttoolbar.add(jca);\r\n\t\ttoolbar.add(jca2);\r\n\t\tShapeButtons sbg = new ShapeButtons(Shape.LINE);\r\n\t\ttoolbar.add(sbg);\r\n\t\tadd(toolbar, BorderLayout.NORTH);\r\n\r\n\t\tdrawingModel = new DrawingModelImpl();\r\n\t\tdrawingCanvas = new JDrawingCanvas(drawingModel);\r\n\r\n\t\tadd(drawingCanvas, BorderLayout.CENTER);\r\n\r\n\t\tdrawingModel.addDrawingModelListener(drawingCanvas);\r\n\t\tmouseCreator = new MouseCreator(drawingModel, jca, jca2, sbg);\r\n\t\tdrawingCanvas.addMouseListener(mouseCreator);\r\n\t\tdrawingCanvas.addMouseMotionListener(mouseCreator);\r\n\r\n\t\tlistModel = new DrawingObjectListModel(drawingModel);\r\n\t\tdrawingModel.addDrawingModelListener(listModel);\r\n\r\n\t\tadd(new DrawingObjectList(listModel), BorderLayout.EAST);\r\n\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tsetJMenuBar(menuBar);\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tmenuBar.add(fileMenu);\r\n\t\tfileMenu.add(new OpenAction(this));\r\n\t\tfileMenu.add(new SaveAction(this));\r\n\t\tfileMenu.add(new SaveAsAction(this));\r\n\t\tfileMenu.add(new ExportAction(this));\r\n\t\tfileMenu.add(new ExitAction(this));\r\n\r\n\t\tdrawingModel.addDrawingModelListener(new DrawingModelListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void objectsRemoved(DrawingModel source, int index0, int index1) {\r\n\t\t\t\tmodified = true;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void objectsChanged(DrawingModel source, int index0, int index1) {\r\n\t\t\t\tmodified = true;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void objectsAdded(DrawingModel source, int index0, int index1) {\r\n\t\t\t\tmodified = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tadd(new StatusBar(jca, jca2), BorderLayout.SOUTH);\r\n\t}", "public TreeObject(int x, int y, ImageView tree_fig, AnchorPane tree_pane) {\n this.pane = tree_pane;\n this.x = x;\n this.y = y;\n\n tree_fig.setLayoutX(x);\n tree_fig.setLayoutY(y);\n }", "public void setCurrentSceneGraphTree(Node root) {\n \t\ttreeModel = new JMonkeyTreeModel(root);\n \t\tfinal PopUpTree tree = new PopUpTree(treeModel);\n \t\t// final JTree tree = new JTree(new DefaultMutableTreeNode());\n \t\ttree.setEditable(true);\n \t\ttree.getSelectionModel().setSelectionMode(\n \t\t\t\tTreeSelectionModel.SINGLE_TREE_SELECTION);\n \t\ttree.setShowsRootHandles(true);\n \t\tJMenuItem addTerrain = new JMenuItem(\"Add Enitity\");\n \t\ttree.addToPopup(addTerrain);\n \t\taddTerrain.addActionListener(new ActionListener() {\n \n \t\t\tpublic void actionPerformed(ActionEvent e) {\n \t\t\t\tdoAddEntity(tree.getSelectionPath());\n \t\t\t}\n \t\t});\n \n \t\tJMenuItem delete = new JMenuItem(\"Remove Entity\");\n \t\tdelete.addActionListener(new ActionListener() {\n \n \t\t\tpublic void actionPerformed(ActionEvent e) {\n \t\t\t\tdeleteNode(tree.getSelectionPath());\n \t\t\t}\n \t\t});\n \t\ttree.addToPopup(delete);\n \t\ttree.setOpaque(true);\n \n \t\ttreeScrollPane.removeAll();\n \t\ttreeScrollPane.add(new JScrollPane(tree), BorderLayout.CENTER);\n \t\trepaint();\n \t}", "public void updateConicalView();", "private void viewConfiguration(String table) {\n if (view != null) {\n frame.getContentPane().remove(view);\n }\n if (scrollPane != null) {\n frame.getContentPane().remove(scrollPane);\n }\n\n int imageWidth, imageHeight;\n\n // render image\n if (config.useBlankImage()) {\n imageWidth = config.getImageWidth();\n imageHeight = config.getImageHeight();\n canvas = new ZImageCanvas(imageWidth, imageHeight);\n }\n else {\n ImageIcon icon = new ImageIcon(config.getImageName(), config.getImageName());\n Image base = icon.getImage();\n imageHeight = base.getHeight(null);\n imageWidth = base.getWidth(null);\n canvas = new ZImageCanvas(base);\n }\n\n // render surrounding rectangle\n ZLayerGroup layer = canvas.getLayer();\n ZLine line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMinimumPixelY());\n ZVisualLeaf leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMinimumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMaximumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMaximumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n\n // render the static motes\n for (Enumeration e=motes.elements(); e.hasMoreElements(); ) {\n leaf = new ZVisualLeaf((Mote)e.nextElement());\n layer.addChild(leaf);\n }\n\n JPanel main = new JPanel(new BorderLayout());\n\n // add scroll pane\n int x=0, y = 0;\n if (imageWidth > SCROLL_WIDTH) {\n x = SCROLL_WIDTH;\n }\n else {\n x = imageWidth;\n }\n\n if (imageHeight > SCROLL_HEIGHT) {\n y = SCROLL_HEIGHT;\n }\n else {\n y = imageHeight;\n }\n\n scrollPane = new ZScrollPane(canvas);\n\n scrollPane.setPreferredSize(new Dimension(x+20, y+20));\n frame.getContentPane().add(scrollPane, BorderLayout.CENTER);\n\n view = new JPanel(new GridLayout(0,3));\n view.add(new JLabel(\" X Position \"));\n view.add(new JLabel(\" Y Position \"));\n view.add(new JLabel(\" Mote ID \"));\n xpos = new JLabel (\" 0.0 \");\n ypos = new JLabel (\" 0.0 \");\n moteId = new JLabel(\" ID \");\n view.add(xpos);\n view.add(ypos);\n view.add(moteId);\n frame.getContentPane().add(view, BorderLayout.EAST);\n\n frame.pack();\n\n formatter = new DecimalFormat(\"###.##\");\n\n // create all the event handlers\n panEventHandler = new ZPanEventHandler(canvas.getCameraNode());\n zoomEventHandler = new ZoomEventHandler(canvas.getCameraNode());\n addEventHandler = new AddEventHandler(canvas, this, this, imageWidth, imageHeight, motes, frame);\n moveEventHandler = new MoveEventHandler(canvas, this, imageWidth, imageHeight, true);\n removeEventHandler = new RemoveEventHandler(canvas, canvas.getLayer(), motes, this);\n autoEventHandler = new AutoEventHandler(canvas, motes, imageWidth, imageHeight);\n \n // set the zoom and move event handlers to active\n zoomEventHandler.setActive(true);\n moveEventHandler.setActive(true);\n\n setMode(ADD_MODE);\n/*\n imageWithGrid = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);\n Graphics g = imageWithGrid.createGraphics();\n g.drawImage(base, 0, 0, null);\n g.setColor(Color.black);\n \n double xdist = Math.abs(config.getMaximumRealX() - config.getMinimumRealX());\n double pxdist = (double)Math.abs((config.getMaximumPixelX() - config.getMinimumPixelX()));\n double xRatio = pxdist/xdist;\n double minX = (double)Math.min(config.getMinimumPixelX(), config.getMaximumPixelX());\n double maxX = (double)Math.max(config.getMinimumPixelX(), config.getMaximumPixelX());\n for (double i=minX; i<=maxX; i+=(xRatio*GRID_DISTANCE)) {\n g.drawLine((int)i,config.getMinimumPixelY(),(int)i,config.getMaximumPixelY());\n }\n g.drawLine(config.getMaximumPixelX(), config.getMinimumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n\n double ydist = Math.abs(config.getMaximumRealY() - config.getMinimumRealY());\n double pydist = (double)Math.abs((config.getMaximumPixelY() - config.getMinimumPixelY()));\n double yRatio = pydist/ydist;\n double minY = (double)Math.min(config.getMinimumPixelY(), config.getMaximumPixelY());\n double maxY = (double)Math.max(config.getMinimumPixelY(), config.getMaximumPixelY());\n for (double i=minY; i<=maxY; i+=(yRatio*GRID_DISTANCE)) {\n g.drawLine(config.getMinimumPixelX(),(int)i,config.getMaximumPixelX(),(int)i);\n }\n g.drawLine(config.getMinimumPixelX(), config.getMaximumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n*/\n }", "private void setTreePresenter() {\n this.tree.setIconProvider(new ModelIconProvider<GPBeanTreeModel>() {\n \n @Override\n public AbstractImagePrototype getIcon(GPBeanTreeModel model) {\n return model.getIcon();\n }\n });\n \n this.tree.setLabelProvider(new ModelStringProvider<GPBeanTreeModel>() {\n \n @Override\n public String getStringValue(GPBeanTreeModel model, String property) {\n return model.getLabel();\n }\n });\n \n this.tree.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);\n \n this.tree.getSelectionModel().addSelectionChangedListener(new SelectionChangedListener<GPBeanTreeModel>() {\n \n @Override\n public void selectionChanged(\n SelectionChangedEvent<GPBeanTreeModel> se) {\n if (se.getSelectedItem() != null) {\n MediatorToolbarTreeAction.getInstance().elementChanged(se.getSelectedItem());\n } else {\n MediatorToolbarTreeAction.getInstance().disableAllActions();\n }\n \n }\n });\n this.setCheckable(true);\n this.setCheckStyle(CheckCascade.NONE);\n this.tree.setAutoHeight(true);\n }", "@Test\n public void visualiseTree()\n {\n System.out.println(avlTree.toString());\n }", "public void draw()\n {\n inorder(root);\n }", "private void createDrawingView() {\r\n mDrawingView = new DrawingView(mContext);\r\n LinearLayout mDrawingPad = (LinearLayout) findViewById(R.id.drawing_pad);\r\n mDrawingPad.addView(mDrawingView);\r\n }", "private static void draw() {\n\t\tinitField();\n\t\tview = new View(field);\n\t\tview.setSize(viewWidth, viewHeight);\n\t\tframe = new JFrame();\n\t\tframe.setSize(fwidth, fheight);\n\t\tframe.setTitle(\"Land Mine\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.add(view);\n\t\tframe.setVisible(true);\n\t}", "public static void main(String[] args) {\n KdTree tree = new KdTree();\n String filename = args[0];\n In in = new In(filename);\n while (!in.isEmpty()) {\n double x = in.readDouble();\n double y = in.readDouble();\n Point2D p = new Point2D(x, y);\n tree.insert(p);\n }\n tree.draw();\n // tree.info();\n // RectHV rect = new RectHV(0.793893, 0.345492, 1.0, 0.654508);\n // rect.draw();\n // Point2D point = new Point2D(0.5, 0.5);\n // point.draw();\n // StdDraw.show();\n // StdDraw.pause(40);\n // StdDraw.text(0.5, 0.5, \"ksdjlfjasdlfkjsadkflasdjfdaslkjfas\");\n // StdDraw.show();\n // while (true) {\n // System.out.println(StdDraw.mouseX());\n // StdDraw.show();\n // }\n // // Point2D point = new Point2D(0.5, 0.5);\n // // Point2D point2 = new Point2D(0.25, 0.25);\n // // Point2D point3 = new Point2D(0.75, 0.75);\n // // RectHV rect = new RectHV(0.0, 0.0, 0.3, 0.3);\n // // RectHV rect2 = new RectHV(0.0, 0.0, 0.3, 0.3);\n // tree.insert(new Point2D(0.5, 0.5));\n // tree.insert(new Point2D(0.0, 0.0));\n // tree.insert(new Point2D(0.75, 1.0));\n // tree.insert(new Point2D(0.75, 0.0));\n // tree.insert(new Point2D(1.0, 1.0));\n // tree.insert(new Point2D(0.25, 1.0));\n // tree.insert(new Point2D(0.75, 0.75));\n // tree.insert(new Point2D(1.0, 0.5));\n // tree.insert(new Point2D(1.0, 0.0));\n // tree.insert(new Point2D(1.0, 0.75));\n // // tree.insert(new Point2D(0.375, 1.0));\n // // Point2D point = new Point2D(0.375, 1.0);\n // // System.out.println(tree.get(point));\n // // A 0.5 0.5\n // // B 0.0 0.0\n // // C 0.75 1.0\n // // D 0.75 0.0\n // // E 1.0 1.0\n // // F 0.25 1.0\n // // G 0.75 0.75\n // // H 1.0 0.5\n // // I 1.0 0.0\n // // J 1.0 0.75\n // // System.out.println(tree.isEmpty());\n // // tree.insert(point);\n // // tree.insert(point2);\n // // tree.insert(point3);\n // // tree.insert(point);\n // // tree.insert(point);\n // // tree.insert(point);\n // // System.out.println(tree.isEmpty());\n // System.out.println(tree.size());\n // // System.out.println(tree.get(new Point2D(0.375, 1.0)));\n // System.out.println(tree.contains(new Point2D(1.0, 0.0)));\n // // System.out.println(tree.contains(new Point2D(0.5, 0.5)));\n // // tree.draw();\n // // for (Point2D points : tree.range(rect)) System.out.println(points);\n // // System.out.println();\n // // for (Point2D points : tree.range(rect2)) System.out.println(points);\n }", "public void refreshTree(){\n\r\n\t\ttestCaseVector = db.getTestCases();\r\n\t\tFolderVector = db.getFolders();\r\n\t\trootNode_TC = new DefaultMutableTreeNode(\"Test Cases\");\r\n\t\ts = new MyTreeNode [testCaseVector.size()+FolderVector.size() +2];\r\n\t\tFolder1 = new DefaultMutableTreeNode [testCaseVector.size()+FolderVector.size() +2];\r\n\r\n\r\n\r\n\t\tint x = 1 ; \r\n\t\tfor(Folder f: FolderVector){\r\n\t\t\ts[x] = new MyTreeNode(f.getName(),'f', x, f.getFolderID());\r\n\r\n\t\t\tExpandedID[x] = f.getFolderID();\r\n\t\t\tFolder1[x] = new DefaultMutableTreeNode(s[x]);\r\n\r\n\t\t\tif (f.getParentID() == 0)\r\n\t\t\t{\r\n\t\t\t\trootNode_TC.add(Folder1[x]);\r\n\t\t\t\tx++;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\telse {\r\n\r\n\t\t\t\tfor (int u = 1 ; u < s.length; u++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif(s[u]!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(s[u].getType() == 'f')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(s[u].getID() == f.getParentID())\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tFolder1[u].add(Folder1[x]);\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tint l = x-1;\r\n\t\t\tfor(TestCase tc : testCaseVector)\r\n\t\t\t{\r\n\r\n\t\t\t\tif (tc.getFolderID() == f.getFolderID())\r\n\t\t\t\t{\r\n\t\t\t\t\ts[x] =new MyTreeNode(tc.getName(), 't', x, tc.getId());\r\n\r\n\t\t\t\t\tFolder1[l].add(new DefaultMutableTreeNode(s[x]));\r\n\t\t\t\t\tx++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tint y = FolderVector.size()+1;\r\n\t\tfor(TestCase tc : testCaseVector)\r\n\t\t{\r\n\t\t\tif(tc.getFolderID() == 0){\r\n\r\n\r\n\t\t\t\tMyTreeNode s=new MyTreeNode(tc.getName(), 't', y, tc.getId());\r\n\t\t\t\trootNode_TC.add(new DefaultMutableTreeNode(s));\r\n\t\t\t\ty++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tDefaultTreeModel Tree1 = new DefaultTreeModel(rootNode_TC);\r\n\t\toverviewTree.setModel(Tree1);\r\n\t\toverviewTree.setCellRenderer(new TreeRenderer(isExpanded, ExpandedID));\r\n\t\tfor(Folder f: FolderVector)\r\n\t\t{\r\n\t\t\tif(isExpanded[f.getFolderID()]){ // To expand the already expanded folders\r\n\t\t\t\tfor (int u = 1 ; u < s.length; u++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif(s[u]!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(s[u].getType() == 'f')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(s[u].getID() == f.getFolderID())\r\n\t\t\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\t\t\tEnumeration<DefaultMutableTreeNode> e = rootNode_TC.depthFirstEnumeration();\r\n\t\t\t\t\t\t\t\twhile (e.hasMoreElements()) {\r\n\t\t\t\t\t\t\t\t\tDefaultMutableTreeNode node = e.nextElement();\r\n\t\t\t\t\t\t\t\t\tif (node != overviewTree.getModel().getRoot() )\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tMyTreeNode nodeInfo = null ;\r\n\t\t\t\t\t\t\t\t\t\tnodeInfo = (MyTreeNode) node.getUserObject();\r\n\t\t\t\t\t\t\t\t\t\tif (nodeInfo.getName().equalsIgnoreCase(s[u].getName())) \r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tTreePath p = new TreePath(node.getPath());\r\n\t\t\t\t\t\t\t\t\t\t\toverviewTree.expandRow(overviewTree.getRowForPath(p));\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "public void drawEdges(){\n for (Edge edge : primsAlg.getEdges()){\n //DRAW VIEW\n drawView = new DrawView(this);\n drawView.setVertex1(edge.getVertex1());\n drawView.setVertex2(edge.getVertex2());\n primsLayout.addView(drawView);\n\n addEdge(drawView);\n\n showWeight(edge);\n\n }\n }", "public Tree(PApplet t, PImage tree) {\n\t\tthis.t = t;\n\t\tthis.tree = tree;\n\t}", "void updateView () {\n updateScore();\n board.clearTemp();\n drawGhostToBoard();\n drawCurrentToTemp();\n view.setBlocks(board.getCombined());\n view.repaint();\n }", "public static void main(String[] args) {\n BinarySearchTree tree = new BinarySearchTree();\r\n JFrame f = new JFrame(\"Binary Tree\"); \r\n JPanel p1 = new JPanel();\r\n JPanel p3 = new JPanel();\r\n p1.setLayout(new GridLayout(1, 6));\r\n p1.setBounds(0, 0,1000, 50);\r\n f.setBackground(Color.black);\r\n JPanel p2 = new JPanel();\r\n f.getContentPane().add(new TheWindow(tree));\r\n inordertf.setForeground(Color.blue);\r\n insert.setBackground(Color.orange);\r\n delete.setBackground(Color.orange);\r\n find.setBackground(Color.orange);\r\n print.setBackground(Color.yellow);\r\n ver.setBackground(Color.orange);\r\n print.setBorder(new LineBorder(Color.black,4));\r\n \r\n inordertf.setBorder(new LineBorder(Color.orange));\r\n p1.setBorder(new LineBorder(Color.orange,5));\r\n p2.setBorder(new LineBorder(Color.orange,5));\r\n\r\n p1.add(inserttf);\r\n p1.add(insert);\r\n p1.add(deletetf);\r\n p1.add(delete);\r\n p1.add(findtf);\r\n p1.add(find);\r\n p1.add(print);\r\n p1.add(vertices);\r\n // p1.setLayout(new GridLayout(8,1));\r\n //inordertf.setBounds(100,600,800,30);\r\n \r\n //=================================\r\n \r\n p2.setLayout(new GridLayout(1, 5));\r\n p2.setBounds(100, 500, 800, 100);\r\n p2.add(ver);\r\n p2.add(vertices);\r\n p2.add(ht);\r\n p2.add(height);\r\n p2.add(inordertf);\r\n \r\n //================================= \r\n p3.add(p2);\r\n p3.add(inordertf);\r\n p3.setLayout(new GridLayout(2,1));\r\n f.add(p1,BorderLayout.NORTH);\r\n// p3.setLayout(new GridLayout(2,1));\r\n f.add(p3,BorderLayout.SOUTH);\r\n \r\n f.setResizable(false);//function to prevent resizing\r\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n f.setSize(1000, 800);\r\n f.setVisible(true); \r\n // f.setBounds(50, 50, 700, 700);\r\n //f.setVisible(true);\r\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n }", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n if (flag) {\n //进行一些初始化的操作\n/* if ((mOvalHeight == -1) || (mOvalWidth == -1)) {\n if (mWidth > mHeight) {\n mOvalHeight = (mHeight - 100) / 2;\n mOvalWidth = mOvalHeight + 100;\n } else {\n mOvalWidth = (mWidth - 100) / 2;\n mOvalHeight = mOvalWidth + 100;\n }\n }else {\n mOvalWidth /= 2;\n mOvalHeight /= 2;\n }*/\n\n if (mOvalHeightMargin != -1) {\n mOvalHeight = (mHeight - mOvalHeightMargin * 2) / 2;\n } else if (mOvalHeight == -1) {\n mOvalHeight = mHeight / 2;\n }\n if (mOvalWidthMargin != -1) {\n mOvalWidth = (mWidth - mOvalWidthMargin * 2) / 2;\n } else if (mOvalWidth == -1) {\n mOvalWidth = mWidth / 2;\n }\n\n\n if ((mChildWidth == -1) && (mChildHeight == -1)) {\n mChildWidth = 50;\n mChildHeight = 50;\n }\n\n //下面是获取所有的子view,给子view分配初始位置,默认第一个是270度,相当于y轴负半轴。\n mChildCount = getChildCount();\n mChildrenView = new View[mChildCount];\n mAngles = new double[mChildCount];\n mAngles[0] = 270;\n double j = 360 / mChildCount;\n for (int i = 0; i < mChildCount; i++) {\n mChildrenView[i] = getChildAt(i);\n final int finalI = i;\n mChildrenView[i].setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n if (itemClickListener == null)\n Log.e(TAG, \"你点击了的position = \" + finalI + \",但是itemClickListener == null\");\n else {\n itemClickListener.onItemClick(v, finalI, true);\n }\n }\n });\n if (i > 0) {\n if ((mAngles[i] + j) <= 360) {\n mAngles[i] = mAngles[i - 1] + j;\n } else {\n mAngles[i] = mAngles[i - 1] + j - 360;\n }\n }\n int x = (int) (mOvalWidth * Math.cos(mAngles[i] * Math.PI / 180));\n int y = (int) (mOvalHeight * Math.sin(mAngles[i] * Math.PI / 180));\n mChildrenView[i].layout(mWidth / 2 - x - mChildWidth / 2, mHeight / 2 - y - mChildHeight / 2, mWidth / 2 - x + mChildWidth / 2, mHeight / 2 - y + mChildHeight / 2);\n }\n flag = false;\n }\n }", "private void TopView(NodeTopView root) { \n\t\t\tclass QueueObj { \n\t\t\t\tNodeTopView NodeTopView; \n\t\t\t\tint hd; \n\n\t\t\t\tQueueObj(NodeTopView NodeTopView, int hd) { \n\t\t\t\t\tthis.NodeTopView = NodeTopView; \n\t\t\t\t\tthis.hd = hd; \n\t\t\t\t} \n\t\t\t} \n\t\t\tQueue<QueueObj> q = new LinkedList<QueueObj>(); \n\t\t\tMap<Integer, NodeTopView> topViewMap = new TreeMap<Integer, NodeTopView>(); \n\n\t\t\tif (root == null) { \n\t\t\t\treturn; \n\t\t\t} else { \n\t\t\t\tq.add(new QueueObj(root, 0)); \n\t\t\t} \n\n\t\t\tSystem.out.println(\"The top view of the tree is : \"); \n\t\t\t\n\t\t\t// count function returns 1 if the container \n\t\t\t// contains an element whose key is equivalent \n\t\t\t// to hd, or returns zero otherwise. \n\t\t\twhile (!q.isEmpty()) { \n\t\t\t\tQueueObj tmpNodeTopView = q.poll(); \n\t\t\t\tif (!topViewMap.containsKey(tmpNodeTopView.hd)) { \n\t\t\t\t\ttopViewMap.put(tmpNodeTopView.hd, tmpNodeTopView.NodeTopView); \n\t\t\t\t} \n\n\t\t\t\tif (tmpNodeTopView.NodeTopView.left != null) { \n\t\t\t\t\tq.add(new QueueObj(tmpNodeTopView.NodeTopView.left, tmpNodeTopView.hd - 1)); \n\t\t\t\t} \n\t\t\t\tif (tmpNodeTopView.NodeTopView.right != null) { \n\t\t\t\t\tq.add(new QueueObj(tmpNodeTopView.NodeTopView.right, tmpNodeTopView.hd + 1)); \n\t\t\t\t} \n\n\t\t\t} \n\t\t\tfor (Entry<Integer, NodeTopView> entry : topViewMap.entrySet()) { \n\t\t\t\tSystem.out.print(entry.getValue().data + \" \"); \n\t\t\t} \n\t\t}", "public void interactiveTreeXXEditingRToL() {\r\n JTree tree = new JTree(); \r\n tree.setEditable(true);\r\n DefaultTreeCellRenderer renderer = new DynamicIconRenderer();\r\n tree.setCellRenderer(renderer);\r\n DefaultTreeEditor treeCellEditor = new DefaultTreeEditor();\r\n tree.setCellEditor(treeCellEditor);\r\n JXTree xTree = new JXTree();\r\n xTree.setCellRenderer(renderer);\r\n xTree.setEditable(true);\r\n xTree.setCellEditor(new DefaultTreeEditor());\r\n\r\n final JXFrame frame = wrapWithScrollingInFrame(tree, xTree, \"XXEditing: compare tree and xtree\");\r\n Action toggleComponentOrientation = new AbstractAction(\"toggle orientation\") {\r\n\r\n public void actionPerformed(ActionEvent e) {\r\n ComponentOrientation current = frame.getComponentOrientation();\r\n if (current == ComponentOrientation.LEFT_TO_RIGHT) {\r\n frame.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n } else {\r\n frame.applyComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\r\n\r\n }\r\n\r\n }\r\n\r\n };\r\n addAction(frame, toggleComponentOrientation);\r\n frame.setVisible(true);\r\n \r\n }", "public void draw() {\n draw(root, false);\n }", "@Override\n public void render(Canvas canvas) {\n\n // Makes the entire Canvas White.\n canvas.drawRGB(AnimationParameters.BACK_R,\n AnimationParameters.BACK_G, AnimationParameters.BACK_B);\n\n // Draws the Tree over the Canvas.\n drawTreeRecursive(root, canvas);\n\n // Draws the nodeList over the Canvas.\n nodeList.render(canvas);\n\n // Renders this frame to the Canvas.\n super.render(canvas);\n\n }", "private void drawView(Canvas canvas){\n //long start = System.currentTimeMillis();\n\n getCursor().updateCache(getFirstVisibleLine());\n\n ColorScheme color = mColors;\n drawColor(canvas, color.getColor(ColorScheme.WHOLE_BACKGROUND), mViewRect);\n\n float lineNumberWidth = measureLineNumber();\n float offsetX = - getOffsetX();\n\n drawLineNumberBackground(canvas, offsetX, lineNumberWidth + mDividerMargin, color.getColor(ColorScheme.LINE_NUMBER_BACKGROUND));\n\n drawCurrentLineBackground(canvas, color.getColor(ColorScheme.CURRENT_LINE));\n drawCurrentCodeBlockLabelBg(canvas);\n\n drawDivider(canvas, offsetX + lineNumberWidth + mDividerMargin, color.getColor(ColorScheme.LINE_DIVIDER));\n\n drawLineNumbers(canvas, offsetX, lineNumberWidth, color.getColor(ColorScheme.LINE_NUMBER));\n offsetX += lineNumberWidth + mDividerMargin * 2 + mDividerWidth;\n\n if(mCursor.isSelected()){\n drawSelectedTextBackground(canvas,offsetX, color.getColor(ColorScheme.SELECTED_TEXT_BACKGROUND));\n }\n\n drawText(canvas, offsetX, color.getColor(ColorScheme.TEXT_NORMAL));\n drawComposingTextUnderline(canvas,offsetX, color.getColor(ColorScheme.UNDERLINE));\n\n if(!mCursor.isSelected()){\n drawSelectionInsert(canvas, offsetX, color.getColor(ColorScheme.SELECTION_INSERT));\n if(mEventHandler.shouldDrawInsertHandle()) {\n drawHandle(canvas,mCursor.getLeftLine(),mCursor.getLeftColumn(),mInsertHandle);\n }\n }else if(!mTextActionPanel.isShowing()){\n drawHandle(canvas,mCursor.getLeftLine(),mCursor.getLeftColumn(),mLeftHandle);\n drawHandle(canvas,mCursor.getRightLine(),mCursor.getRightColumn(),mRightHandle);\n }else{\n mLeftHandle.setEmpty();\n mRightHandle.setEmpty();\n }\n\n drawBlockLines(canvas,offsetX);\n drawScrollBars(canvas);\n\n //These are for debug\n //long end = System.currentTimeMillis();\n //canvas.drawText(\"Draw:\" + (end - start) + \"ms\" + \"Last highlight:\" + m + \"ms\", 0, getLineBaseLine(11), mPaint);\n }", "public QuadTree(PointView<Point> view, int transitionSize) {\n super(view);\n _transitionSize = transitionSize;\n _nodeOrigin = new double[2];\n _elements = new ArrayList<Point>();\n _subdivided = false;\n _elementsSize = 0;\n _treeSize = 0;\n }", "protected StandardDrawingView createDrawingView() {\n return new StandardDrawingView(this, 410, 370);\n }", "public View getGraphic()\n{\n // Get image for file\n //Image img = _type==FileType.PACKAGE_DIR? Package : ViewUtils.getFileIconImage(_file);\n Image img = ViewUtils.getFileIconImage(_file);\n View grf = new ImageView(img); grf.setPrefSize(18,18);\n \n // If error/warning add Error/Warning badge as composite icon\n /*BuildIssue.Kind status = _proj!=null? _proj.getRootProject().getBuildIssues().getBuildStatus(_file) : null;\n if(status!=null) {\n Image badge = status==BuildIssue.Kind.Error? ErrorBadge : WarningBadge;\n ImageView bview = new ImageView(badge); bview.setLean(Pos.BOTTOM_LEFT);\n StackView spane = new StackView(); spane.setChildren(grf, bview); grf = spane;\n }*/\n \n // Return node\n return grf;\n}", "public TreeView(Context context) \n \t{\n \t\tsuper(context);\n \t\tSetup();\n \t}", "private void initializeTreePane() {\n Rectangle clipRect = new Rectangle(treePane.getWidth(), treePane.getHeight());\n clipRect.heightProperty().bind(treePane.heightProperty());\n clipRect.widthProperty().bind(treePane.widthProperty());\n treePane.setClip(clipRect);\n }", "public void exportLeftBranch(final TreeDrawerNode node,\n\t\t\tfinal boolean isSelected,final int xIndent,final int yIndent,\n\t\t\tfinal int size,final double minCorr,final double maxCorr,\n\t\t\tfinal int startIndex,final int endIndex,\n\t\t\tfinal boolean showSelections) {\n\n\t\t\tif (node == null) {\n\t\t\t\tLogBuffer.println(\"node in drawSingle in InvertedTreeDrawer \"\n\t\t\t\t\t\t+ \"was null.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfinal TreeDrawerNode left = node.getLeft();\n\n\t\t\tif (left == null) {\n\t\t\t\tLogBuffer.println(\"left in drawSingle in InvertedTreeDrawer \"\n\t\t\t\t\t\t+ \"was null.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tint leftChildXCoord = 0;\n\t\t\tint leftChildYCoord = 0;\n\t\t\tint parentXCoord = 0;\n\t\t\tint parentYCoord = 0;\n\n\t\t\tint pointerBaseOffset = (left.isLeaf() ? 2 : 1);\n\t\t\tint minCoord = 0;\n\t\t\tint maxCoord = 0;\n\t\t\tboolean shoulderOnly = false;\n\n\t\t\t// GTRView\n\t\t\tif (isLeft) {\n\t\t\t\tleftChildXCoord = (int) Math.round((left.getCorr() - minCorr) /\n\t\t\t\t\t(maxCorr - minCorr) * (xIndent - 1));\n\t\t\t\tparentXCoord = (int) Math.round((node.getCorr() - minCorr) /\n\t\t\t\t\t(maxCorr - minCorr) * (xIndent - 1));\n\n\t\t\t\tleftChildYCoord =\n\t\t\t\t\tyIndent + (int) Math.round(left.getIndex() * size +\n\t\t\t\t\t(size / 2)) - startIndex * size;\n\t\t\t\tparentYCoord =\n\t\t\t\t\tyIndent + (int) Math.round(node.getIndex() * size +\n\t\t\t\t\t(size / 2)) - startIndex * size;\n\n\t\t\t\t//These values define the \"horizontal\" drawing area\n\t\t\t\tminCoord = yIndent;// + startIndex * size;\n\t\t\t\tmaxCoord = yIndent + endIndex * size - startIndex * size + size;\n\n\t\t\t\t//This conditional adjusts coordinates to not overrun the min/\n\t\t\t\t//max boundaries and either sets a boolean that prevents\n\t\t\t\t//\"vertical\" lines which are completely outside the drawing area\n\t\t\t\t//from drawing or returns if both lines to be drawn are outside\n\t\t\t\t//the drawing area\n\t\t\t\tif((leftChildYCoord < minCoord && parentYCoord < minCoord) ||\n\t\t\t\t\t(leftChildYCoord > maxCoord && parentYCoord > maxCoord)) {\n\n\t\t\t\t\treturn;\n\t\t\t\t} else if(leftChildYCoord >= minCoord &&\n\t\t\t\t\tparentYCoord >= minCoord &&\n\t\t\t\t\tleftChildYCoord <= maxCoord && parentYCoord <= maxCoord) {\n\n\t\t\t\t\t//Do nothing\n\t\t\t\t} else if(leftChildYCoord < minCoord &&\n\t\t\t\t\tparentYCoord > maxCoord) {\n\n\t\t\t\t\tshoulderOnly = true;\n\t\t\t\t\tparentYCoord = maxCoord;\n\t\t\t\t\tleftChildYCoord = minCoord;\n\t\t\t\t} else if(leftChildYCoord < minCoord) {\n\t\t\t\t\tshoulderOnly = true;\n\t\t\t\t\tleftChildYCoord = minCoord;\n\t\t\t\t} else if(parentYCoord > maxCoord) {\n\t\t\t\t\tparentYCoord = maxCoord;\n\t\t\t\t}\n\n\t\t\t\tif(Math.abs(leftChildXCoord - parentXCoord) < 3) {\n\t\t\t\t\tpointerBaseOffset = 0;\n\t\t\t\t}\n\t\t\t// ATRView\n\t\t\t} else {\n\t\t\t\tleftChildYCoord = (int) Math.round((left.getCorr() - minCorr) /\n\t\t\t\t\t(maxCorr - minCorr) * (yIndent - 1));\n\t\t\t\tparentYCoord = (int) Math.round((node.getCorr() - minCorr) /\n\t\t\t\t\t(maxCorr - minCorr) * (yIndent - 1));\n\t\n\t\t\t\tleftChildXCoord =\n\t\t\t\t\txIndent + (int) Math.round(left.getIndex() * size +\n\t\t\t\t\t(size / 2)) - startIndex * size;\n\t\t\t\tparentXCoord =\n\t\t\t\t\txIndent + (int) Math.round(node.getIndex() * size +\n\t\t\t\t\t(size / 2)) - startIndex * size;\n\n\t\t\t\t//These values define the \"horizontal\" drawing area\n\t\t\t\tminCoord = xIndent;// + startIndex * size;\n\t\t\t\tmaxCoord = xIndent + endIndex * size - startIndex * size + size;\n\n\t\t\t\t//This conditional adjusts coordinates to not overrun the min/\n\t\t\t\t//max boundaries and either sets a boolean that prevents\n\t\t\t\t//\"vertical\" lines which are completely outside the drawing area\n\t\t\t\t//from drawing or returns if both lines to be drawn are outside\n\t\t\t\t//the drawing area\n\t\t\t\tif((leftChildXCoord < minCoord && parentXCoord < minCoord) ||\n\t\t\t\t\t(leftChildXCoord > maxCoord && parentXCoord > maxCoord)) {\n\n\t\t\t\t\treturn;\n\t\t\t\t} else if(leftChildXCoord >= minCoord &&\n\t\t\t\t\tparentXCoord >= minCoord &&\n\t\t\t\t\tleftChildXCoord <= maxCoord && parentXCoord <= maxCoord) {\n\n\t\t\t\t\t//Do nothing\n\t\t\t\t} else if(leftChildXCoord < minCoord &&\n\t\t\t\t\tparentXCoord > maxCoord) {\n\n\t\t\t\t\tshoulderOnly = true;\n\t\t\t\t\tparentXCoord = maxCoord;\n\t\t\t\t\tleftChildXCoord = minCoord;\n\t\t\t\t} else if(leftChildXCoord < minCoord) {\n\t\t\t\t\tshoulderOnly = true;\n\t\t\t\t\tleftChildXCoord = minCoord;\n\t\t\t\t} else if(parentXCoord > maxCoord) {\n\t\t\t\t\tparentXCoord = maxCoord;\n\t\t\t\t}\n\n\t\t\t\tif(Math.abs(leftChildYCoord - parentYCoord) < 3) {\n\t\t\t\t\tpointerBaseOffset = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// draw our (flipped) polyline...\n\t\t\tif(isLeft) {\n\t\t\t\t//The VectorGraphics2D library messes up the drawPolyline call\n\t\t\t\t//sometimes and skips the center point, so drawing two-\n\t\t\t\t//separate lines (while less attractively drawn) is more\n\t\t\t\t//reliable\n\t\t\t\tgraphics.drawLine(parentXCoord,parentYCoord,\n\t\t\t\t\tparentXCoord,leftChildYCoord);\n\t\t\t\tif(!shoulderOnly) {\n\t\t\t\t\tgraphics.drawLine(parentXCoord,leftChildYCoord,\n\t\t\t\t\t\tleftChildXCoord,leftChildYCoord);\n\t\t\t\t}\n\n\t\t\t\t//Draw an outline around the line to highlight a selected branch\n\t\t\t\tif(showSelections && isSelected) {\n\t\t\t\t\tgraphics.setColor(new Color(249,238,160));//yellow\n\t\t\t\t\tgraphics.drawPolyline(\n\t\t\t\t\t\tnew int[] {\n\t\t\t\t\t\t\tparentXCoord + 1,\n\t\t\t\t\t\t\tparentXCoord + 1,\n\t\t\t\t\t\t\tleftChildXCoord - pointerBaseOffset\n\t\t\t\t\t\t},\n\t\t\t\t\t\tnew int[] {\n\t\t\t\t\t\t\tparentYCoord,\n\t\t\t\t\t\t\tleftChildYCoord + 1,\n\t\t\t\t\t\t\tleftChildYCoord + 1\n\t\t\t\t\t\t},\n\t\t\t\t\t\t3);\n\t\t\t\t\tgraphics.drawPolyline(\n\t\t\t\t\t\tnew int[] {\n\t\t\t\t\t\t\tparentXCoord - 1,\n\t\t\t\t\t\t\tparentXCoord - 1,\n\t\t\t\t\t\t\tleftChildXCoord - pointerBaseOffset\n\t\t\t\t\t\t},\n\t\t\t\t\t\tnew int[] {\n\t\t\t\t\t\t\tparentYCoord,\n\t\t\t\t\t\t\tleftChildYCoord - 1,\n\t\t\t\t\t\t\tleftChildYCoord - 1\n\t\t\t\t\t\t},\n\t\t\t\t\t\t3);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//The VectorGraphics2D library messes up the drawPolyline call\n\t\t\t\t//sometimes and skips the center point, so drawing two-\n\t\t\t\t//separate lines (while less attractively drawn) is more\n\t\t\t\t//reliable\n\t\t\t\tgraphics.drawLine(parentXCoord,parentYCoord,\n\t\t\t\t\tleftChildXCoord,parentYCoord);\n\t\t\t\tif(!shoulderOnly) {\n\t\t\t\t\tgraphics.drawLine(leftChildXCoord,parentYCoord,\n\t\t\t\t\t\tleftChildXCoord,leftChildYCoord);\n\t\t\t\t}\n\n\t\t\t\t//Draw an outline around the line to highlight a selected branch\n\t\t\t\tif(showSelections && isSelected) {\n\t\t\t\t\tgraphics.setColor(new Color(249,238,160));//yellow\n\t\t\t\t\tgraphics.drawPolyline(\n\t\t\t\t\t\tnew int[] {\n\t\t\t\t\t\t\tparentXCoord,\n\t\t\t\t\t\t\tleftChildXCoord + 1,\n\t\t\t\t\t\t\tleftChildXCoord + 1\n\t\t\t\t\t\t},\n\t\t\t\t\t\tnew int[] {\n\t\t\t\t\t\t\tparentYCoord + 1,\n\t\t\t\t\t\t\tparentYCoord + 1,\n\t\t\t\t\t\t\tleftChildYCoord - pointerBaseOffset\n\t\t\t\t\t\t},\n\t\t\t\t\t\t3);\n\t\t\t\t\tgraphics.drawPolyline(\n\t\t\t\t\t\tnew int[] {\n\t\t\t\t\t\t\tparentXCoord,\n\t\t\t\t\t\t\tleftChildXCoord - 1,\n\t\t\t\t\t\t\tleftChildXCoord - 1\n\t\t\t\t\t\t},\n\t\t\t\t\t\tnew int[] {\n\t\t\t\t\t\t\t//Vertical coordinates\n\t\t\t\t\t\t\tparentYCoord - 1,\n\t\t\t\t\t\t\tparentYCoord - 1,\n\t\t\t\t\t\t\tleftChildYCoord - pointerBaseOffset\n\t\t\t\t\t\t},\n\t\t\t\t\t\t3);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public TreeViewer getTreeViewer() {\n return viewer;\n }", "private void initDrawView() {\n\n Draw4Shader view = new Draw4Shader(this);\n\n // Draw5Animator view = new Draw5Animator(this);\n\n // Draw5AnimatorFrame view = new Draw5AnimatorFrame(this);\n\n setContentView(view);\n }", "public void draw() \n\t {\n\t\t draw(root,0,0,1,1,true);\n\t }", "private void actionViewBoundingBox ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tint imagIndex = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t\t//---- Get the image with colored cells, convert it to buffered image instead of opencv Mat.\r\n\t\t\t\tBufferedImage imageCC = OpencvConverter.convertMatToBImage(ImageDraw.drawImageBoundingBox(DataController.getTable().getElement(imagIndex)));\r\n\r\n\t\t\t\t//---- Display image at the image viewer panel\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(imageCC);\r\n\r\n\t\t\t\t//---- Change button icon\r\n\t\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_CELL_IMAGE);\r\n\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setIcon(iconButton);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setActionCommand(FormMainHandlerCommands.AC_VIEW_IMAGE);\r\n\t\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewImage().setToolTipText(\"View cells\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}", "@Override\n protected void onDraw(Canvas canvas) {\n // Draw the components\n Arrange();\n box.draw(canvas);\n for (Node node : nodes) {\n node.draw(canvas);\n }\n line.draw(canvas);\n invalidate(); // Force a re-draw\n }", "public void drawGraph()\n\t{\n\t\tMatrixStack transformStack = new MatrixStack();\n\t\ttransformStack.getTop().mul(getWorldTransform());\n\t\tdrawSelfAndChildren(transformStack);\n\t}", "private void drawRectForView(ViewNodeJSO view, Canvas canvas, float scale, String stroke, String fill) {\n if (view == null) {\n return;\n } \n hoveredViewID.setText(\"ID:\" + view.getID() + \" Name:\" + view.getIDName());\n CanvasTools.drawRectForView(view, canvas, scale, stroke, fill);\n }" ]
[ "0.64164746", "0.62796193", "0.6178241", "0.60253745", "0.59894127", "0.59867346", "0.5957302", "0.5917186", "0.5832758", "0.5826955", "0.5803876", "0.579654", "0.5777855", "0.5725623", "0.5677136", "0.5657889", "0.5627617", "0.5622856", "0.5611726", "0.5606456", "0.55859005", "0.55699646", "0.5568152", "0.5561498", "0.5546048", "0.55364853", "0.5532809", "0.5519497", "0.55148894", "0.5513988", "0.5511219", "0.550358", "0.5500456", "0.5498995", "0.54889953", "0.5487156", "0.5468569", "0.5467962", "0.5461196", "0.5451405", "0.544443", "0.54405195", "0.5436743", "0.5435177", "0.54096985", "0.5407933", "0.54031307", "0.54015225", "0.539838", "0.53935635", "0.5391929", "0.5388721", "0.53871185", "0.53858244", "0.53816164", "0.53578365", "0.5353699", "0.53408116", "0.53394544", "0.53362775", "0.5330365", "0.53294766", "0.5322642", "0.53209555", "0.5319348", "0.5314493", "0.53075075", "0.53017634", "0.52974683", "0.5296407", "0.5288692", "0.5285168", "0.5273298", "0.52698976", "0.52697194", "0.5260146", "0.52598286", "0.5248206", "0.5241464", "0.5240695", "0.5239845", "0.52389085", "0.522003", "0.5219879", "0.52192646", "0.5218222", "0.5214373", "0.52137464", "0.5213721", "0.5210948", "0.52097446", "0.5207956", "0.5193556", "0.5190797", "0.51849306", "0.5183964", "0.51779974", "0.51723474", "0.5168534", "0.5160317", "0.5156754" ]
0.0
-1
TAB 4 INSTANCE METHODS 2 THREAD, UI AND KINECT
private synchronized void clearCanvasAndChart() { this.getLiveContext().clearRect(0, 0, this.getLiveCanvas().getWidth(), this.getLiveCanvas().getHeight()); this.getxSeries().getData().clear(); this.getySeries().getData().clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initTab()\n {\n \n }", "public Main() {\r\n\t\ttry {\r\n\t\t\tcreateFolders();\r\n\t\t\trestaurar();\r\n\t\t\tMaterialLookAndFeel materialTheme = new MaterialLookAndFeel(\r\n\t\t\t\t\t(MaterialTheme) Utils.getInstance().getCurrentTheme());\r\n\r\n\t\t\tUIManager.setLookAndFeel(materialTheme);\r\n\t\t\tUIManager.getLookAndFeelDefaults().put(\"TabbedPane[tab].height\", 5);\r\n\t\t\tUIManager.getLookAndFeelDefaults().put(\"OptionPane.minimumSize\",new Dimension(800,100));\r\n\t\t\tSplash screen = new Splash();\r\n\t\t\tEventQueue.invokeLater(new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tscreen.setVisible(true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tThread t1 = new Thread(new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tcreateTables();\r\n\t\t\t\t\tTableModelMembro.getInstance().uploadDataBase();\r\n\t\t\t\t\tTableModelFuncionario.getInstance().uploadDataBase();\r\n\t\t\t\t\tTableModelFinancas.getInstance().uploadDataBase();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tt1.start();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(500);\r\n\t\t\t\tfor (int i = 0; i <= 100; i++) {\r\n\t\t\t\t\tThread.sleep(35);\r\n\t\t\t\t\tEventQueue.invokeLater(new Incrementar(i, screen));\r\n\t\t\t\t}\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\tString message = \"Ocorreu um erro ao abrir o programa. Tenta novamente!\\n\" + e.getMessage();\r\n\t\t\t\tJOptionPane.showMessageDialog(null, message, \"Erro\", JOptionPane.ERROR_MESSAGE,\r\n\t\t\t\t\t\tnew ImageIcon(getClass().getResource(\"/FC_SS.jpg\")));\r\n\t\t\t\tLog.getInstance().printLog(message);\r\n\t\t\t}\r\n\r\n\t\t\tt1.join();\r\n\r\n\t\t\tEventQueue.invokeLater(new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tscreen.setVisible(false);\r\n\t\t\t\t\tLogin.getInstance().open();\r\n\t\t\t\t\tinicialTime = System.currentTimeMillis();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tLog.getInstance().printLog(\"O programa iniciou\");\r\n\r\n\t\t} catch (Exception e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t\tString message = \"Ocorreu um erro ao abrir o programa. Tenta novamente!\\n\" + e1.getMessage();\r\n\t\t\tJOptionPane.showMessageDialog(null, message, \"Erro\", JOptionPane.ERROR_MESSAGE,\r\n\t\t\t\t\tnew ImageIcon(getClass().getResource(\"/FC_SS.jpg\")));\r\n\t\t\tLog.getInstance().printLog(message);\r\n\t\t\tSystem.exit(1);\r\n\r\n\t\t}\r\n\t}", "private void cargarTablaBienesInventario() throws Exception{\r\n \r\n AppContext app =(AppContext) AppContext.getApplicationContext();\r\n final JFrame desktop= (JFrame)app.getMainFrame();\r\n final TaskMonitorDialog progressDialog= new TaskMonitorDialog(desktop, null);\r\n progressDialog.setTitle(\"TaskMonitorDialog.Wait\");\r\n progressDialog.addComponentListener(new ComponentAdapter()\r\n {\r\n public void componentShown(ComponentEvent e) \r\n {\r\n new Thread(new Runnable()\r\n {\r\n public void run() //throws Exception\r\n {\r\n try{\r\n progressDialog.report(aplicacion.getI18nString(\"inventario.app.tag3\"));\r\n\r\n Collection c= null;\r\n boolean b= true;\r\n \r\n bienesJPanel.clearTable();\r\n\r\n if (patron.equals(Const.PATRON_INMUEBLES_URBANOS) ||\r\n \t\tpatron.equals(Const.PATRON_INMUEBLES_RUSTICOS)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_INMUEBLES, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_MUEBLES_HISTORICOART) ||\r\n \t\tpatron.equals(Const.PATRON_BIENES_MUEBLES)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_MUEBLES, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_DERECHOS_REALES)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_DERECHOS_REALES, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_VALOR_MOBILIARIO)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_VALORES_MOBILIARIOS, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_CREDITOS_DERECHOS_PERSONALES)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_CREDITOS_DERECHOS, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_SEMOVIENTES)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_SEMOVIENTES, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_VIAS_PUBLICAS_URBANAS) ||\r\n \t\tpatron.equals(Const.PATRON_VIAS_PUBLICAS_RUSTICAS)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_VIAS, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else if (patron.equals(Const.PATRON_VEHICULOS)){\r\n \tc= inventarioClient.getBienesInventario(Const.ACTION_GET_VEHICULOS, Const.SUPERPATRON_BIENES, patron, null, filtro, null,null);\r\n }else{\r\n \t/** No es ningun tipo reconocido. */\r\n \tb= false;\r\n }\r\n\r\n /** Cargamos la coleccion */\r\n bienesJPanel.loadListaBienes(c);\r\n \r\n }\r\n catch(Exception e){\r\n \tErrorDialog.show(aplicacion.getMainFrame(), aplicacion.getI18nString(\"inventario.SQLError.Titulo\"),\r\n \t\t\taplicacion.getI18nString(\"inventario.SQLError.Aviso\"), StringUtil.stackTrace(e));\r\n }\r\n finally\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tprogressDialog.setVisible(false);\r\n \t\t\t\t\t}\r\n }\r\n }).start();\r\n }\r\n });\r\n GUIUtil.centreOnWindow(progressDialog);\r\n progressDialog.setVisible(true);\r\n\r\n \r\n }", "public static void main(String[] args) {\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (Exception e) {\n }\n\n transferITThreadFactory = new TransferITThreadFactory();\n transferITModel = new TransferITModel();\n initSettings(transferITModel);\n\n transferITController = new TransferITController(transferITModel);\n\n SwingUtilities.invokeLater(new Runnable() {\n\n public void run() {\n gUIView = new GUIView(transferITModel, transferITController);\n }\n });\n\n /*gUIView.appendToLog(\"Thread count \" + Thread.activeCount());\n gUIView.appendToLog(\"wid \" + gUIView.getTransferToServer().getBounds().getWidth());*/\n }", "private CoinTracker() {\n api = new CryptoCompare();\n new SymbolThread().start();\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n e = new Elements(api);\n e.frames.mainFrame.setTitle(TITLE + \" : \" + api.HOME);\n e.frames.mainFrame.setVisible(true);\n new HttpThread().start();\n new HistThread().start();\n }\n });\n }", "@WorkerThread\n public abstract void zzaso();", "public JTabbedPane createPanel()\r\n {\r\n\r\n /** LoadTabPaneData Thread - Inner class that will load the historic data on the AWT\r\n * Thread as to not muck up things on the GUI thread\r\n * The Thread will die after it loads everything.\r\n */\r\n class LoadTabPaneDataTask extends TimerTask\r\n {\r\n // Handle to main outer class\r\n WatchListTableModule watchListTableModule = null;\r\n\r\n /** \r\n * LoadTabPaneDataTask constructor\r\n */\r\n public LoadTabPaneDataTask(WatchListTableModule watchListTableModule)\r\n {\r\n this.watchListTableModule = watchListTableModule;\r\n }\r\n\r\n /** \r\n * LoadTabPaneDataTask::run() this method simply invokes. \r\n * WatchListTableModule::loadPersistantWatchLists() method.\r\n * The method will populate all watchlists to be loaded on\r\n * the JTabbedPane then it dies off\r\n */\r\n public void run()\r\n {\r\n debug(\"LoadTabPaneDataTask::run() - calling watchListTableModule.loadPersistantWatchLists()\");\r\n watchListTableModule.loadPersistantWatchLists();\r\n this.cancel();\r\n }\r\n }\r\n\r\n // Create an Application Properties instance\r\n appProps = new AppProperties(getString(\"WatchListTableModule.application_ini_filename\"));\r\n // Setup our Time Delays\r\n standardDelay = ONE_SECOND * ParseData.parseNum(getString(\"WatchListTableModule.standard_time_delay\"), ONE_MINUTE);\r\n extendedDelay = ONE_SECOND * ParseData.parseNum(getString(\"WatchListTableModule.extended_time_delay\"), ONE_HOUR);\r\n\r\n // Create our Basic Tabbed Pane and Listener ( inner class )\r\n tabPane = new JTabbedPane();\r\n tabPane.addChangeListener(new TabPaneListener());\r\n\r\n // Load the Tab Pane Data on the Util Event Thread as \r\n // to get our screen up and going as fast as possible\r\n // So we can get out of here - This Inner class thread\r\n // invokes method\r\n // loadPersistantWatchLists();\r\n TimerTask tabPaneTask = new LoadTabPaneDataTask(this);\r\n Timer timer = new Timer(true); // Deamon\r\n timer.schedule(tabPaneTask, ONE_SECOND);\r\n\r\n return tabPane;\r\n }", "public static void main(String[] args) {\n \n ProgressBar pb = new ProgressBar();\n pb.setVisible(true);\n for(int i=0;i<=100;i++){\n try {\n pb.getProgressBar().setValue(i);\n Thread.sleep(50);\n } catch (InterruptedException ex) {\n Logger.getLogger(ProgressBar.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n pb.dispose();\n /* try {\n UIManager.setLookAndFeel(new AcrylLookAndFeel());\n } catch (UnsupportedLookAndFeelException ex) {\n Logger.getLogger(Menu.class.getName()).log(Level.SEVERE, null,ex);\n }*/\n \n \n // Registry registry = LocateRegistry.getRegistry(\"192.168.100.5\",6789);\n // registry.lookup(\"service\");\n \n // final UserService Usservice = (UserService) registry.lookup(\"service\");\n // final Tahap1Service service1 = (Tahap1Service) registry.lookup(\"service\");\n // final Tahap2Service service2 = (Tahap2Service) registry.lookup(\"service\");\n \n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n try {\n UIManager.setLookAndFeel(\n new com.jtattoo.plaf.mcwin.McWinLookAndFeel());\n \n Login tampilan = new Login();\n Dimension screen=Toolkit.getDefaultToolkit().getScreenSize();\n int lebar=(screen.width-tampilan.getSize().width)/2;\n int tinggi=(screen.height-tampilan.getSize().height)/2;\n // tampilan.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n tampilan.setLocation(lebar,tinggi);\n tampilan.setResizable(false);\n\n tampilan.setVisible(true);\n \n } catch (UnsupportedLookAndFeelException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n \n \n }\n });\n \n \n\n \n\n }", "private UI_Layer() {\n System.out.println(\"UI_Layer Const\");\n renewGameThread(\"10\", \"140\");\n }", "public void run() {\r\n\r\n SQLRow rowPrefCompte = tablePrefCompte.getRow(2);\r\n this.rowPrefCompteVals.loadAbsolutelyAll(rowPrefCompte);\r\n // TVA Coll\r\n int idCompteTVACol = this.rowPrefCompteVals.getInt(\"ID_COMPTE_PCE_TVA_VENTE\");\r\n if (idCompteTVACol <= 1) {\r\n String compte;\r\n try {\r\n compte = ComptePCESQLElement.getComptePceDefault(\"TVACollectee\");\r\n idCompteTVACol = ComptePCESQLElement.getId(compte);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n SQLRow rowCompteTVACol = tableCompte.getRow(idCompteTVACol);\r\n\r\n // TVA Ded\r\n int idCompteTVADed = this.rowPrefCompteVals.getInt(\"ID_COMPTE_PCE_TVA_ACHAT\");\r\n if (idCompteTVADed <= 1) {\r\n try {\r\n String compte = ComptePCESQLElement.getComptePceDefault(\"TVADeductible\");\r\n idCompteTVADed = ComptePCESQLElement.getId(compte);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n SQLRow rowCompteTVADed = tableCompte.getRow(idCompteTVADed);\r\n\r\n // TVA intracomm\r\n int idCompteTVAIntra = this.rowPrefCompteVals.getInt(\"ID_COMPTE_PCE_TVA_INTRA\");\r\n if (idCompteTVAIntra <= 1) {\r\n try {\r\n String compte = ComptePCESQLElement.getComptePceDefault(\"TVAIntraComm\");\r\n idCompteTVAIntra = ComptePCESQLElement.getId(compte);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n SQLRow rowCompteTVAIntra = tableCompte.getRow(idCompteTVAIntra);\r\n\r\n // Achats intracomm\r\n int idCompteAchatsIntra = this.rowPrefCompteVals.getInt(\"ID_COMPTE_PCE_ACHAT_INTRA\");\r\n if (idCompteAchatsIntra <= 1) {\r\n try {\r\n String compte = ComptePCESQLElement.getComptePceDefault(\"AchatsIntra\");\r\n idCompteAchatsIntra = ComptePCESQLElement.getId(compte);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n SQLRow rowCompteAchatIntra = tableCompte.getRow(idCompteAchatsIntra);\r\n\r\n // TVA immo\r\n int idCompteTVAImmo = this.rowPrefCompteVals.getInt(\"ID_COMPTE_PCE_TVA_IMMO\");\r\n if (idCompteTVAImmo <= 1) {\r\n try {\r\n String compte = ComptePCESQLElement.getComptePceDefault(\"TVAImmo\");\r\n idCompteTVAImmo = ComptePCESQLElement.getId(compte);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n SQLRow rowCompteTVAImmo = tableCompte.getRow(idCompteTVAImmo);\r\n\r\n PdfGenerator_3310 p = new PdfGenerator_3310();\r\n this.m = new HashMap<String, Object>();\r\n\r\n long v010 = -this.sommeCompte.soldeCompte(70, 70, true, this.dateDebut, this.dateFin);\r\n this.m.put(\"A01\", GestionDevise.round(v010));\r\n\r\n // long vA02 = this.sommeCompte.soldeCompte(70, 70, true, this.dateDebut, this.dateFin);\r\n this.m.put(\"A02\", \"\");\r\n long tvaIntra = -this.sommeCompte.sommeCompteFils(rowCompteTVAIntra.getString(\"NUMERO\"), this.dateDebut, this.dateFin);\r\n long achatsIntra = this.sommeCompte.sommeCompteFils(rowCompteAchatIntra.getString(\"NUMERO\"), this.dateDebut, this.dateFin);\r\n this.m.put(\"A03\", GestionDevise.round(achatsIntra));\r\n this.m.put(\"A04\", \"\");\r\n this.m.put(\"A05\", \"\");\r\n this.m.put(\"A06\", \"\");\r\n this.m.put(\"A07\", \"\");\r\n\r\n long tvaCol = -this.sommeCompte.sommeCompteFils(rowCompteTVACol.getString(\"NUMERO\"), this.dateDebut, this.dateFin) + tvaIntra;\r\n this.m.put(\"B08\", GestionDevise.round(tvaCol));\r\n this.m.put(\"B08HT\", GestionDevise.round(Math.round(tvaCol / 0.196)));\r\n this.m.put(\"B09\", \"\");\r\n this.m.put(\"B09HT\", \"\");\r\n this.m.put(\"B09B\", \"\");\r\n this.m.put(\"B09BHT\", \"\");\r\n\r\n this.m.put(\"B10\", \"\");\r\n this.m.put(\"B10HT\", \"\");\r\n this.m.put(\"B11\", \"\");\r\n this.m.put(\"B11HT\", \"\");\r\n this.m.put(\"B12\", \"\");\r\n this.m.put(\"B12HT\", \"\");\r\n this.m.put(\"B13\", \"\");\r\n this.m.put(\"B13HT\", \"\");\r\n this.m.put(\"B14\", \"\");\r\n this.m.put(\"B14HT\", \"\");\r\n\r\n this.m.put(\"B15\", \"\");\r\n this.m.put(\"B16\", GestionDevise.round(tvaCol));\r\n this.m.put(\"B17\", GestionDevise.round(tvaIntra));\r\n this.m.put(\"B18\", \"\");\r\n final String numeroCptTVAImmo = rowCompteTVAImmo.getString(\"NUMERO\");\r\n long tvaImmo = this.sommeCompte.sommeCompteFils(numeroCptTVAImmo, this.dateDebut, this.dateFin);\r\n this.m.put(\"B19\", GestionDevise.round(tvaImmo));\r\n\r\n final String numeroCptTVADed = rowCompteTVADed.getString(\"NUMERO\");\r\n long tvaAutre = this.sommeCompte.sommeCompteFils(numeroCptTVADed, this.dateDebut, this.dateFin);\r\n\r\n // Déduction de la tva sur immo si elle fait partie des sous comptes\r\n if (numeroCptTVAImmo.startsWith(numeroCptTVADed)) {\r\n tvaAutre -= tvaImmo;\r\n }\r\n\r\n this.m.put(\"B20\", GestionDevise.round(tvaAutre));\r\n this.m.put(\"B21\", \"\");\r\n this.m.put(\"B22\", \"\");\r\n this.m.put(\"B23\", \"\");\r\n long tvaDed = tvaAutre + tvaImmo;\r\n this.m.put(\"B24\", GestionDevise.round(tvaDed));\r\n\r\n this.m.put(\"C25\", \"\");\r\n this.m.put(\"C26\", \"\");\r\n this.m.put(\"C27\", \"\");\r\n this.m.put(\"C28\", GestionDevise.round(tvaCol - tvaDed));\r\n this.m.put(\"C29\", \"\");\r\n this.m.put(\"C30\", \"\");\r\n this.m.put(\"C31\", \"\");\r\n this.m.put(\"C32\", GestionDevise.round(tvaCol - tvaDed));\r\n\r\n p.generateFrom(this.m);\r\n\r\n SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n Map3310.this.bar.setValue(95);\r\n }\r\n });\r\n\r\n SwingUtilities.invokeLater(new Runnable() {\r\n public void run() {\r\n\r\n String file = TemplateNXProps.getInstance().getStringProperty(\"Location3310PDF\") + File.separator + String.valueOf(Calendar.getInstance().get(Calendar.YEAR)) + File.separator\r\n + \"result_3310_2.pdf\";\r\n System.err.println(file);\r\n File f = new File(file);\r\n Gestion.openPDF(f);\r\n Map3310.this.bar.setValue(100);\r\n }\r\n });\r\n\r\n }", "private void tour() {\r\n\t\tnew Thread(() -> {\r\n\t\t\ttry {\r\n\t\t\t\tPlatform.runLater(() -> {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\taffTourJoueur(iAllumettes.nomJoueurTour(this.idPartie));\r\n\t\t\t\t\t} catch (RemoteException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t//action du serveur\r\n\t\t\t\tif ( iAllumettes.getTour(idPartie)%2 == 1 && iAllumettes.getMode(idPartie).equals(\"solo\")) {\r\n\t\t\t\t\t//Action du serveur\r\n\t\t\t\t\taffichageAttente(true);\r\n\t\t\t\t\r\n\t\t\t\t\tThread.sleep(800);\r\n\r\n\t\t\t\t\tthis.nbAllChoisies = iAllumettes.coupIA(this.idPartie);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Selection des allumettes disponibles par le serveur\r\n\t\t\t\t\ttourIA(this.nbAllChoisies);\r\n\t\t\t\t\t\r\n\t\t\t\t\taffichageAttente(false);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Comme nous sommes dans un nouveau thread, il nous faut utiliser runLater pour executer une fonction qui est dans l'autre thread\r\n\t\t\t\t\tPlatform.runLater(() -> {\r\n\t\t\t\t\t\tvalider();\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\telse if (iAllumettes.getMode(idPartie).equals(\"duo\")) {\r\n\t\t\t\t\taffichageAttente(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Attendre que l'adversaire ait joue\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\twhile (this.numJoueur != iAllumettes.getTour(idPartie)%2) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tThread.sleep(500);\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//On efface les allumettes selectionnees par le joueur precedent\r\n\t\t\t\t\t\tfor (Node node : boxAllumettes.getChildren().filtered(t->t.isVisible())) {\r\n\t\t\t\t\t\t\tif (iAllumettes.getAllRetiree(idPartie).contains(node.getId()))\r\n\t\t\t\t\t\t\t\tnode.setVisible(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Comme nous sommes dans un nouveau thread, il nous faut utiliser runLater pour executer une fonction qui est dans l'autre thread\r\n\t\t\t\t\t\tPlatform.runLater(() -> {\r\n\t\t\t\t\t\t\t//Actualisation du tableau des scores\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\taffTourJoueur(iAllumettes.nomJoueurTour(idPartie));\r\n\t\t\t\t\t\t\t\taffTabScore(iAllumettes.getTabScore(idPartie));\r\n\t\t\t\t\t\t\t} catch (RemoteException e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\taffichageAttente(false);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (NullPointerException npe) {\r\n\t\t\t\t\t\tThread.currentThread().interrupt();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (RemoteException | InterruptedException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}).start();\r\n\t}", "@Override\r\n public void run() {\r\n Fecha f = new Fecha();\r\n fecha=f;\r\n Thread ct = Thread.currentThread();\r\n while(ct==h1){\r\n this.JL_Fecha.setText(fecha.getFecha());\r\n this.JL_Hora.setText(fecha.getHora());\r\n\r\n this.JL_Fecha_Admin.setText(fecha.getFecha());\r\n this.JL_Hora_Admin.setText(fecha.getHora());\r\n\r\n this.JL_Fecha_Admin1.setText(fecha.getFecha());\r\n this.JL_Hora_Admin1.setText(fecha.getHora());\r\n }\r\n }", "public GUIView() {\n initComponents();\n setMaxThreads();\n setCountOfElements(1);\n setCountOfThreads(1);\n this.isReadyForCalculation = false;\n }", "private void getBaseDatos() {\r\n java.awt.EventQueue.invokeLater(new Runnable() {\r\n @Override\r\n public void run() {\r\n new IngresoBaseDeDatos(isAdministrador()).setVisible(true);\r\n }\r\n });\r\n }", "@Override\r\n public void run() {\n \r\n if(mCenterPanelWrapper == null) {\r\n mCenterPanelWrapper = UiCompat.createPersonaBackgroundPanel();\r\n mCenterWrapper = new PluginCenterPanelWrapper() {\r\n \r\n @Override\r\n public PluginCenterPanel[] getCenterPanels() {\r\n return new PluginCenterPanel[] {new PluginCenterPanelImpl()};\r\n }\r\n \r\n @Override\r\n public void scrolledToChannel(Channel channel) {\r\n if(mListPanel != null) {\r\n mListPanel.showChannel(channel);\r\n }\r\n }\r\n \r\n @Override\r\n public void filterSelected(ProgramFilter filter) {\r\n if(mListPanel != null) {\r\n mListPanel.showForFilter(filter);\r\n }\r\n }\r\n \r\n @Override\r\n public void scrolledToDate(Date date) {\r\n if(mListPanel != null) {\r\n mListPanel.showForDate(date, -1);\r\n }\r\n }\r\n \r\n @Override\r\n public void scrolledToNow() {\r\n if(mListPanel != null) {\r\n mListPanel.showForNow();\r\n }\r\n }\r\n \r\n @Override\r\n public void scrolledToTime(int time) {\r\n if(mListPanel != null) {\r\n mListPanel.showForTimeButton(time);\r\n }\r\n }\r\n \r\n @Override\r\n public void timeEvent() {\r\n if(mListPanel != null) {\r\n mListPanel.refreshView();\r\n }\r\n }\r\n };\r\n \r\n new Thread() {\r\n public void run() {\r\n while(!mTvBrowserStarted) {\r\n try {\r\n sleep(200);\r\n } catch (InterruptedException e) {}\r\n }\r\n \r\n addPanel();\r\n }\r\n }.start();\r\n }\r\n }", "public void startProcessTablaAmortiDetalle(Boolean conSplash) throws Exception {\n\t\t\r\n\t\tfinal JTabbedPane jTabbedPaneBusquedasTablaAmortiDetalle=this.jTabbedPaneBusquedasTablaAmortiDetalle; \r\n\t\t\r\n\t\tfinal JPanel jPanelParametrosReportesTablaAmortiDetalle=this.jPanelParametrosReportesTablaAmortiDetalle;\r\n\t\t//final JScrollPane jScrollPanelDatosTablaAmortiDetalle=this.jScrollPanelDatosTablaAmortiDetalle;\r\n\t\tfinal JTable jTableDatosTablaAmortiDetalle=this.jTableDatosTablaAmortiDetalle;\t\t\r\n\t\tfinal JPanel jPanelPaginacionTablaAmortiDetalle=this.jPanelPaginacionTablaAmortiDetalle;\r\n\t\t//final JScrollPane jScrollPanelDatosEdicionTablaAmortiDetalle=this.jScrollPanelDatosEdicionTablaAmortiDetalle;\r\n\t\tfinal JPanel jPanelAccionesTablaAmortiDetalle=this.jPanelAccionesTablaAmortiDetalle;\r\n\t\t\r\n\t\tJPanel jPanelCamposAuxiliarTablaAmortiDetalle=new JPanelMe();\r\n\t\tJPanel jPanelAccionesFormularioAuxiliarTablaAmortiDetalle=new JPanelMe();\r\n\t\t\r\n\t\tif(this.jInternalFrameDetalleFormTablaAmortiDetalle!=null) {\r\n\t\t\tjPanelCamposAuxiliarTablaAmortiDetalle=this.jInternalFrameDetalleFormTablaAmortiDetalle.jPanelCamposTablaAmortiDetalle;\r\n\t\t\tjPanelAccionesFormularioAuxiliarTablaAmortiDetalle=this.jInternalFrameDetalleFormTablaAmortiDetalle.jPanelAccionesFormularioTablaAmortiDetalle;\r\n\t\t}\r\n\t\t\r\n\t\tfinal JPanel jPanelCamposTablaAmortiDetalle=jPanelCamposAuxiliarTablaAmortiDetalle;\r\n\t\tfinal JPanel jPanelAccionesFormularioTablaAmortiDetalle=jPanelAccionesFormularioAuxiliarTablaAmortiDetalle;\r\n\t\t\r\n\t\t\r\n\t\tfinal JMenuBar jmenuBarTablaAmortiDetalle=this.jmenuBarTablaAmortiDetalle;\r\n\t\tfinal JToolBar jTtoolBarTablaAmortiDetalle=this.jTtoolBarTablaAmortiDetalle;\t\t\r\n\t\t\r\n\t\t\r\n\t\tJMenuBar jmenuBarDetalleAuxiliarTablaAmortiDetalle=new JMenuBar();\r\n\t\tJToolBar jTtoolBarDetalleAuxiliarTablaAmortiDetalle=new JToolBar();\t\t\r\n\t\t\r\n\t\tif(this.jInternalFrameDetalleFormTablaAmortiDetalle!=null) {\r\n\t\t\tjmenuBarDetalleAuxiliarTablaAmortiDetalle=this.jInternalFrameDetalleFormTablaAmortiDetalle.jmenuBarDetalleTablaAmortiDetalle;\r\n\t\t\tjTtoolBarDetalleAuxiliarTablaAmortiDetalle=this.jInternalFrameDetalleFormTablaAmortiDetalle.jTtoolBarDetalleTablaAmortiDetalle;\r\n\t\t}\r\n\t\t\r\n\t\tfinal JMenuBar jmenuBarDetalleTablaAmortiDetalle=jmenuBarDetalleAuxiliarTablaAmortiDetalle;\r\n\t\tfinal JToolBar jTtoolBarDetalleTablaAmortiDetalle=jTtoolBarDetalleAuxiliarTablaAmortiDetalle;\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif(Constantes2.CON_PROCESO_HILO) {\r\n\t\t\tThread threadRunnableProcess;\r\n\t\t\tProcessRunnable processRunnable;\r\n\t\t\t\r\n\t\t\tprocessRunnable=new ProcessRunnable();\r\n\t\t\t\r\n\t\t\tprocessRunnable.setsTipo(\"START\");\r\n\t\t\tprocessRunnable.setDesktop(jDesktopPane);\r\n\t\t\tprocessRunnable.setModuloActual(moduloActual);\r\n\t\t\tprocessRunnable.setModuloUsuarioSeleccionado(moduloActual);\r\n\t\t\tprocessRunnable.setOpcionActual(opcionActual);\r\n\t\t\tprocessRunnable.setParametroGeneralSg(parametroGeneralSg);\r\n\t\t\tprocessRunnable.setParametroGeneralUsuario(parametroGeneralUsuario);\r\n\t\t\tprocessRunnable.setResumenUsuarioActual(resumenUsuarioActual);\r\n\t\t\tprocessRunnable.setUsuarioActual(usuarioActual);\r\n\t\t\t\r\n\t\t\tprocessRunnable.jTabbedPaneBusquedas=jTabbedPaneBusquedasTablaAmortiDetalle;\r\n\t\t\tprocessRunnable.jPanelParametrosReportes=jPanelParametrosReportesTablaAmortiDetalle;\r\n\t\t\tprocessRunnable.jTableDatos=jTableDatosTablaAmortiDetalle;\r\n\t\t\tprocessRunnable.jPanelCampos=jPanelCamposTablaAmortiDetalle;\r\n\t\t\tprocessRunnable.jPanelPaginacion=jPanelPaginacionTablaAmortiDetalle;\r\n\t\t\tprocessRunnable.jPanelAcciones=jPanelAccionesTablaAmortiDetalle;\r\n\t\t\tprocessRunnable.jPanelAccionesFormulario=jPanelAccionesFormularioTablaAmortiDetalle;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprocessRunnable.jmenuBar=jmenuBarTablaAmortiDetalle;\r\n\t\t\tprocessRunnable.jmenuBarDetalle=jmenuBarDetalleTablaAmortiDetalle;\r\n\t\t\tprocessRunnable.jTtoolBar=jTtoolBarTablaAmortiDetalle;\r\n\t\t\tprocessRunnable.jTtoolBarDetalle=jTtoolBarDetalleTablaAmortiDetalle;\r\n\t\t\tprocessRunnable.jInternalFrameBase=this;\r\n\t\t\t\r\n\t\t\t//processRunnable.CargarObjetosRendimientoCriticoModuloInventario();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthreadRunnableProcess=new Thread(processRunnable);//.start();\r\n\t\t\t\t\t\r\n\t\t\tthreadRunnableProcess.start();\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tFuncionesSwing.enableDisablePanels(false,jTabbedPaneBusquedasTablaAmortiDetalle ,jPanelParametrosReportesTablaAmortiDetalle,jTableDatosTablaAmortiDetalle, /*jScrollPanelDatosTablaAmortiDetalle,*/jPanelCamposTablaAmortiDetalle,jPanelPaginacionTablaAmortiDetalle, /*jScrollPanelDatosEdicionTablaAmortiDetalle,*/ jPanelAccionesTablaAmortiDetalle,jPanelAccionesFormularioTablaAmortiDetalle,jmenuBarTablaAmortiDetalle,jmenuBarDetalleTablaAmortiDetalle,jTtoolBarTablaAmortiDetalle,jTtoolBarDetalleTablaAmortiDetalle);\r\n\t\t\r\n\t\t\tstartProcess();//this.\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\t/*\r\n\t\tif(conSplash) {\r\n\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t public void run() {\r\n\t\t\t \t try {\r\n\t\t\t\t\t\t\tFuncionesSwing.enableDisablePanels(false,jTabbedPaneBusquedasTablaAmortiDetalle ,jPanelParametrosReportesTablaAmortiDetalle, jScrollPanelDatosTablaAmortiDetalle,jPanelPaginacionTablaAmortiDetalle, jScrollPanelDatosEdicionTablaAmortiDetalle, jPanelAccionesTablaAmortiDetalle,jPanelAccionesFormularioTablaAmortiDetalle,jmenuBarTablaAmortiDetalle,jmenuBarDetalleTablaAmortiDetalle,jTtoolBarTablaAmortiDetalle,jTtoolBarDetalleTablaAmortiDetalle);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tstartProcess();//this.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t});\r\n\t\t}\r\n\t\t*/\r\n\t}", "public JanelaThread() {\n initComponents();\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n Platform.runLater( new Runnable() {\r\n @Override\r\n public void run() {\r\n TabManager tm = TabManager.getInstance();\r\n tm.criar( Telas.Apresentacao );\r\n }\r\n });\r\n \r\n tvListaGerar();\r\n }", "public static String _globals() throws Exception{\nmostCurrent._pnloverlay = new anywheresoftware.b4a.objects.PanelWrapper();\n //BA.debugLineNum = 21;BA.debugLine=\"Private txtval As EditText\";\nmostCurrent._txtval = new anywheresoftware.b4a.objects.EditTextWrapper();\n //BA.debugLineNum = 22;BA.debugLine=\"Private btnlogin As Button\";\nmostCurrent._btnlogin = new anywheresoftware.b4a.objects.ButtonWrapper();\n //BA.debugLineNum = 23;BA.debugLine=\"Private btndelete As Button\";\nmostCurrent._btndelete = new anywheresoftware.b4a.objects.ButtonWrapper();\n //BA.debugLineNum = 24;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "private Thread createThread() {\n return new Thread(this::_loadCatalog, \"CDS Hooks Catalog Retrieval\"\n );\n }", "public MainDemo() {\n initComponents(); // Init Components from de Matisse form's design\n initBaseIcons(); // Init base icons\n initBusyIcons(); // Init busy icons\n\n /** Complete specific initialization of each tabs\n */\n initJBusyComponentTab();\n initBusyIconTab();\n initHubTab();\n initWorkerTab();\n\n updateBusyIconModel();\n }", "private void init() {\n// LoginHelper.USER = new NguoiDungDAO().selectById(\"ND002\");\n putClientProperty(\"JInternalFrame.isPalette\", Boolean.TRUE);\n getRootPane().setWindowDecorationStyle(JRootPane.NONE);\n ((BasicInternalFrameUI) this.getUI()).setNorthPane(null);\n this.setBorder(null);\n\n if (LoginHelper.quyenQuanTri()) {\n mand = \"\";\n } else {\n mand = LoginHelper.USER.getMaND();\n }\n\n tbl_dangdat0.setModel(tblModel0);\n tbl_henngay1.setModel(tblModel1);\n tbl_23.setModel(tblModel23);\n tbl_4.setModel(tblModel4);\n\n loadTable0();\n loadTable1();\n// Thread th = new Thread(this);\n// th.start();\n loadTable23();\n loadTable4();\n }", "Out (FoilBoard target) { \n app = target;\n\n // layout = new CardLayout();\n // setLayout(layout);\n\n probe = new Probe(app);\n geometry = new Geometry(app);\n data = new Data(app);\n \n // TODO: regen this on update (if active)\n // perfweb = new PerfWeb(app);\n addTab(\"Summary\", null, perfweb, \"Shape and Performance Summary\");\n addTab(\"Geometry\", null, geometry, \"Hydrofoil components geometry,\\nfoil/profile geometry tables or links\");\n addTab(\"Data\", null, data, \"Hydrofoil components data,\\nincluding size, shape etc\");\n addTab(\"Probe\", null, probe, \"Fluid Flow Probe Display\");\n // old: addTab(\"Plot\", null, pp, \"Show Plot\");\n\n\n // phazing out this.... (still works). instead, copy&past \"summary\" tab into\n // html tool such as https://html-online.com/editor/ and done!\n //\n // perfwebsrc = new PerfWebSrc(app);\n // addTab(\"<h1>Summary...\", null, perfwebsrc, \"Shape and Performance Summary,\\n html codes for embedding\");\n\n //setSelectedComponent(perfweb);\n\n // adding actions to tabs: following \"whoa\" ideas from stackoverflow work but I use\n // overloaded paint() instead, seem simple.\n\n // JLabel label = new JLabel(\"XXX\");\n // label.addMouseListener(new java.awt.event.MouseAdapter() {\n // public void mouseClicked(MouseEvent e) {\n // System.out.println(\"woah! \");\n // setSelectedIndex(0);\n // }});\n // \n // setTabComponentAt(0, label);\n\n //setModel(new javax.swing.DefaultSingleSelectionModel() {\n //\n // @Override\n // public void setSelectedIndex(int index) {\n // System.out.println(\"woah! \" + index);\n // setSelectedIndex(index);\n // }\n // });\n\n // can be used to attach aux logic here..\n this.addChangeListener(new javax.swing.event.ChangeListener() {\n @Override\n public void stateChanged(javax.swing.event.ChangeEvent e) {\n // e.getSource();\n // System.out.println(\"-- e: \" + e);\n //System.out.println(\"Selected paneNo : \" + .getSelectedIndex());\n } });\n }", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "public void lancerPartie()\r\n {\n for(int i=0; i<tabEntite.length; i++)\r\n {\r\n tabEntite[i].setActif(true);\r\n }\r\n // Lance les threads et les ajoute au tableau\r\n for(int i=0; i<tabEntite.length; i++)\r\n {\r\n tabThreadEntite.add(new Thread(tabEntite[i]));\r\n tabThreadEntite.get(i).start();\r\n \r\n }\r\n }", "void tempInRegionUI();", "@FXML\r\n\tpublic void clsTeacherMain() {\r\n\t\tMyThread a = new MyThread(RequestType.LOGOUT, IndexList.LOGOUT,\r\n\t\t\t\tMsgFromServer.getDataListByIndex(IndexList.LOGIN));\r\n\t\ta.start();\r\n\t\ttry {\r\n\t\t\ta.join();\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tconnectionmain.showLogin();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private ThreadUtil() {\n throw new UnsupportedOperationException(\"This class is non-instantiable\"); //$NON-NLS-1$\n }", "public void ativaThread() {\n\t\t\n\t\tmDialog = ProgressDialog.show(this, \"Buslocation\",\n\t\t\t\t\"Buscando coordenadas...\", false, false);\n\t\tmHandler = new Handler();\n\t\tmThread = new MinhaThread(1);\n\t\tmThread.start();\n\t}", "public static void main(String[] args) {\r\n // SwingUtilities.invokeLater(new Runnable() {\r\n // public void run() {\r\n // RegexReplacer inst = new RegexReplacer();\r\n // inst.setLocationRelativeTo(null);\r\n // gtu.swing.util.JFrameUtil.setVisible(true, inst);\r\n // }\r\n // });\r\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\r\n System.out.println(\"=====\" + info.getClassName());\r\n // javax.swing.UIManager.setLookAndFeel(info.getClassName());\r\n }\r\n final SwingTabTemplateUI tabUI = SwingTabTemplateUI.newInstance(null, \"cheater.ico\", RegexReplacer.class, true, new SwingTabTemplateUI_Callback() {\r\n\r\n @Override\r\n public void beforeInit(SwingTabTemplateUI self) {\r\n }\r\n\r\n @Override\r\n public void afterInit(final SwingTabTemplateUI self) {\r\n self.getJframe().addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent paramWindowEvent) {\r\n try {\r\n RegexReplacer ui = (RegexReplacer) self.getJframeKeeperLst().get(self.getSelectTabIndex());\r\n ui.configHandler.saveProp();\r\n } catch (Exception e) {\r\n JCommonUtil.handleException(\"properties store error!\", e);\r\n }\r\n self.getJframe().setVisible(false);\r\n self.getJframe().dispose();\r\n }\r\n });\r\n }\r\n });\r\n\r\n tabUI.setEventAfterChangeTab(new ChangeTabHandlerGtu001() {\r\n public void afterChangeTab(int tabIndex, List<JFrame> jframeKeeperLst) {\r\n if (jframeKeeperLst != null && !jframeKeeperLst.isEmpty()) {\r\n RegexReplacer regex = ((RegexReplacer) jframeKeeperLst.get(tabIndex));\r\n regex.jTabbedPane1.setSelectedIndex(0);\r\n }\r\n }\r\n });\r\n tabUI.setEventOnFocus(new FocusTabHandlerGtu001() {\r\n public void focusOnWin(List<JFrame> jframeKeeperLst) {\r\n for (JFrame f : jframeKeeperLst) {\r\n RegexReplacer regex = ((RegexReplacer) f);\r\n\r\n // 還在進行\r\n if (System.currentTimeMillis() - regex.keyEventExecuteHandler.getExecuteStartTime() < 1000) {\r\n continue;\r\n }\r\n\r\n regex.jTabbedPane1.setSelectedIndex(0);\r\n }\r\n }\r\n });\r\n\r\n MASTER_UI.set(tabUI);\r\n\r\n tabUI.setSize(700, 550);\r\n tabUI.startUI();\r\n }", "@Override\n public void run() {\n jlblimagencarga.setVisible(true);\n jlblletracarga.setVisible(true);\n jtfbuscarnombrerazon.setEnabled(false);\n jtfbuscarrut.setEnabled(false);\n listprove=daoproveedor.mostrarproveedor(jtablaproveedor);\n jlblimagencarga.setVisible(false);\n jlblletracarga.setVisible(false);\n jtfbuscarnombrerazon.setEnabled(true);\n jtfbuscarrut.setEnabled(true);\n }", "private void setupTabs() {\n }", "public static String _showloading(String _msg) throws Exception{\nanywheresoftware.b4a.keywords.Common.ProgressDialogShow2(mostCurrent.activityBA,BA.ObjectToCharSequence(_msg),anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 66;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public static void main(String[] args) {\r\n\t\tjava.awt.EventQueue.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t VentanaPrincipal = new CInterfazGrafica();\r\n\t\t\t\tVentanaPrincipal.setVisible(true);\r\n\t\t //ColaEntrada Cola1 = new ColaEntrada();\r\n\t\t //ColaSalida Cola2 = new ColaSalida(); \t\r\n\t\t //InterfazHWVer3 Maurix = new InterfazHWVer3(Cola1, Cola2, VentanaPrincipal);\r\n\t\t\t}\r\n\t });\r\n\t}", "@Override\n public void co() {\n Object object;\n int n;\n object = this.mw;\n // MONITORENTER : object\n this.tV = gi.submit(this.tU);\n // MONITOREXIT : object\n try {\n object = this.tV.get(60000, TimeUnit.MILLISECONDS);\n n = -2;\n }\n catch (TimeoutException var2_2) {\n gs.W(\"Timed out waiting for native ad.\");\n n = 2;\n object = null;\n }\n catch (ExecutionException var2_3) {\n n = 0;\n object = null;\n }\n catch (InterruptedException var2_4) {\n object = null;\n n = -1;\n }\n catch (CancellationException var2_5) {\n object = null;\n n = -1;\n }\n if (object == null) {\n object = this.r(n);\n }\n gr.wC.post(new Runnable((fz)object){\n final /* synthetic */ fz ts;\n\n @Override\n public void run() {\n fn.this.tm.a(this.ts);\n }\n });\n }", "@Override\n public void run() {\n new ImpresionTicketAsync(entity,printerBluetooth,null,getActivity()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }", "static /* synthetic */ void m89651a(NewChattingTabUI newChattingTabUI, Intent intent, boolean z) {\n boolean z2;\n AppMethodBeat.m2504i(29823);\n long currentTimeMillis = System.currentTimeMillis();\n if (newChattingTabUI.ypn == null) {\n newChattingTabUI.ypn = new ChattingUIFragment();\n newChattingTabUI.mChattingUIProxy = new C36230y(newChattingTabUI.iWA, newChattingTabUI.ypn);\n z2 = true;\n } else {\n z2 = false;\n }\n final int[] iArr;\n View dyW;\n final ViewGroup viewGroup;\n int statusBarHeight;\n if (newChattingTabUI.ypg == null) {\n if (newChattingTabUI.ypn.isSupportCustomActionBar()) {\n iArr = new int[2];\n newChattingTabUI.iWA.getSupportActionBar().getCustomView().getLocationInWindow(iArr);\n TestTimeForChatting testTimeForChatting = new TestTimeForChatting(newChattingTabUI.iWA);\n LayoutParams layoutParams = new LayoutParams(-1, -1);\n testTimeForChatting.setId(2131820582);\n newChattingTabUI.yph = testTimeForChatting.getId();\n testTimeForChatting.setOrientation(1);\n testTimeForChatting.setLayoutParams(layoutParams);\n final FitSystemWindowLayoutView fitSystemWindowLayoutView = new FitSystemWindowLayoutView(newChattingTabUI.iWA);\n fitSystemWindowLayoutView.setLayoutParams(new LayoutParams(-1, -1));\n dyW = newChattingTabUI.dyW();\n if (dyW == null) {\n C4990ab.m7420w(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"abRoot == null! try get child(0)\");\n dyW = ((ViewGroup) newChattingTabUI.iWA.getWindow().getDecorView()).getChildAt(0);\n }\n ImageView imageView = new ImageView(newChattingTabUI.iWA);\n imageView.setId(2131820648);\n imageView.setLayoutParams(layoutParams);\n imageView.setVisibility(8);\n C4990ab.m7416i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"[createChattingView] prepareView GONE\");\n viewGroup = (ViewGroup) dyW;\n ((ViewGroup) newChattingTabUI.iWA.getWindow().getDecorView()).removeView(dyW);\n dyW.setId(2131820633);\n fitSystemWindowLayoutView.addView(dyW);\n fitSystemWindowLayoutView.addView(imageView);\n fitSystemWindowLayoutView.addView(testTimeForChatting);\n ((ViewGroup) newChattingTabUI.iWA.getWindow().getDecorView()).addView(fitSystemWindowLayoutView);\n newChattingTabUI.iWA.getWindow().getDecorView().requestFitSystemWindows();\n statusBarHeight = C5230ak.getStatusBarHeight(newChattingTabUI.iWA);\n C4990ab.m7417i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"ashu::fitSystemWindows. statusBarHeight:%d\", Integer.valueOf(statusBarHeight));\n if (statusBarHeight > 0) {\n newChattingTabUI.ype.mo56794a(fitSystemWindowLayoutView, new Rect(0, statusBarHeight, 0, 0), viewGroup);\n } else {\n newChattingTabUI.iWA.getSupportActionBar().getCustomView().post(new Runnable() {\n\n /* renamed from: com.tencent.mm.ui.NewChattingTabUI$3$1 */\n class C235601 implements OnApplyWindowInsetsListener {\n C235601() {\n }\n\n @TargetApi(20)\n public final WindowInsets onApplyWindowInsets(View view, WindowInsets windowInsets) {\n AppMethodBeat.m2504i(29794);\n if (windowInsets == null) {\n AppMethodBeat.m2505o(29794);\n } else {\n C4990ab.m7417i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"OnApplyWindowInsetsListener %s\", windowInsets);\n windowInsets.consumeSystemWindowInsets();\n C36032b e = NewChattingTabUI.this.ype;\n FitSystemWindowLayoutView fitSystemWindowLayoutView = fitSystemWindowLayoutView;\n windowInsets.getSystemWindowInsetTop();\n e.mo56794a(fitSystemWindowLayoutView, new Rect(windowInsets.getSystemWindowInsetLeft(), windowInsets.getSystemWindowInsetTop(), windowInsets.getSystemWindowInsetRight(), windowInsets.getSystemWindowInsetBottom()), viewGroup);\n AppMethodBeat.m2505o(29794);\n }\n return windowInsets;\n }\n }\n\n public final void run() {\n AppMethodBeat.m2504i(29795);\n NewChattingTabUI.this.iWA.getSupportActionBar().getCustomView().getLocationInWindow(iArr);\n int statusBarHeight = C5230ak.getStatusBarHeight(NewChattingTabUI.this.iWA);\n if (statusBarHeight > 0) {\n NewChattingTabUI.this.ype.mo56794a(fitSystemWindowLayoutView, new Rect(0, statusBarHeight, 0, 0), viewGroup);\n AppMethodBeat.m2505o(29795);\n return;\n }\n if (C1443d.m3068iW(20)) {\n fitSystemWindowLayoutView.setOnApplyWindowInsetsListener(new C235601());\n }\n AppMethodBeat.m2505o(29795);\n }\n });\n }\n newChattingTabUI.ypg = (TestTimeForChatting) newChattingTabUI.iWA.findViewById(newChattingTabUI.yph);\n C4990ab.m7417i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"ashu::prepareChattingFragment init chattingView, top %s\", Integer.valueOf(statusBarHeight));\n } else {\n C4990ab.m7421w(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"[createChattingView] is not SupportCustomActionBar %s\", Boolean.valueOf(C1436b.m3061Ml()));\n newChattingTabUI.ypg = (TestTimeForChatting) newChattingTabUI.iWA.findViewById(2131821893);\n newChattingTabUI.yph = newChattingTabUI.ypg.getId();\n }\n } else if (newChattingTabUI.ypn.isSupportCustomActionBar()) {\n iArr = new int[2];\n newChattingTabUI.ypg.getLocationInWindow(iArr);\n if (iArr[1] == 0) {\n viewGroup = (ViewGroup) newChattingTabUI.iWA.getWindow().getDecorView();\n statusBarHeight = 0;\n while (true) {\n int i = statusBarHeight;\n if (i >= viewGroup.getChildCount()) {\n break;\n }\n dyW = ((ViewGroup) newChattingTabUI.iWA.getWindow().getDecorView()).getChildAt(i);\n if (dyW instanceof FitSystemWindowLayoutView) {\n newChattingTabUI.iWA.getSupportActionBar().getCustomView().getLocationInWindow(iArr);\n FitSystemWindowLayoutView fitSystemWindowLayoutView2 = (FitSystemWindowLayoutView) dyW;\n ViewGroup viewGroup2 = (ViewGroup) newChattingTabUI.iWA.findViewById(2131820633);\n i = viewGroup2.getPaddingTop();\n int statusBarHeight2 = C5230ak.getStatusBarHeight(newChattingTabUI.iWA);\n Rect rect = new Rect();\n Window window = newChattingTabUI.iWA.getWindow();\n window.getDecorView().getWindowVisibleDisplayFrame(rect);\n int height = window.getDecorView().getHeight();\n C4990ab.m7417i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"rootLayout2 fitSystemWindows detect: ActionBar's CustomView location[1]:%d, paddingTop:%d getStatusBarHeight():%d, heightFromSysR:%d, rectangle.top:%d, rectangle.height:%d, DecorHeight:%d, cacheInsetsTop:%d\", Integer.valueOf(iArr[1]), Integer.valueOf(i), Integer.valueOf(C5222ae.m7947hA(newChattingTabUI.iWA)), Integer.valueOf(statusBarHeight2), Integer.valueOf(rect.top), Integer.valueOf(rect.height()), Integer.valueOf(height), Integer.valueOf(fitSystemWindowLayoutView2.getCacheInsetsTop()));\n fitSystemWindowLayoutView2.fitSystemWindows(new Rect(0, fitSystemWindowLayoutView2.getCacheInsetsTop(), 0, 0));\n ImageView imageView2 = (ImageView) fitSystemWindowLayoutView2.findViewById(2131820648);\n imageView2.setTag(viewGroup2);\n ViewGroup.LayoutParams layoutParams2 = viewGroup2.getLayoutParams();\n if (layoutParams2 == null || (layoutParams2 instanceof LayoutParams)) {\n imageView2.setLayoutParams(layoutParams2);\n } else {\n C4990ab.m7421w(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"FIX LayoutParams:%s %s\", layoutParams2.toString(), viewGroup2);\n imageView2.setLayoutParams(new LayoutParams(layoutParams2));\n }\n Bitmap magicDrawingCache = newChattingTabUI.getMagicDrawingCache(viewGroup2);\n if (magicDrawingCache != null) {\n imageView2.setImageBitmap(magicDrawingCache);\n viewGroup2.setVisibility(8);\n imageView2.setVisibility(0);\n C4990ab.m7416i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"[prepareChattingFragment] prepareView VISIBLE\");\n } else {\n viewGroup2.setVisibility(0);\n imageView2.setVisibility(8);\n imageView2.setImageDrawable(null);\n C4990ab.m7416i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"[prepareChattingFragment] prepareView GONE\");\n }\n } else {\n boolean z3;\n ImageView imageView3 = (ImageView) dyW.findViewById(2131820648);\n if (imageView3 != null) {\n imageView3.setImageDrawable(null);\n }\n String str = \"MicroMsg.LauncherUI.NewChattingTabUI\";\n String str2 = \"on position %d, rootLayout not found! prepareView is null?%s\";\n Object[] objArr = new Object[2];\n objArr[0] = Integer.valueOf(i);\n if (imageView3 == null) {\n z3 = true;\n } else {\n z3 = false;\n }\n objArr[1] = Boolean.valueOf(z3);\n C4990ab.m7413e(str, str2, objArr);\n statusBarHeight = i + 1;\n }\n }\n }\n C4990ab.m7417i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"ashu::prepareChattingFragment has chattingView, top %s\", Integer.valueOf(iArr[1]));\n }\n if (intent != null) {\n newChattingTabUI.ypn.getArguments().putAll(C5068w.m7684aM(intent));\n }\n if (z2) {\n newChattingTabUI.mChattingUIProxy.onInit(newChattingTabUI.yph, z);\n newChattingTabUI.ypj = (OnLayoutChangedLinearLayout) newChattingTabUI.ypn.getView().findViewById(2131821521);\n } else {\n newChattingTabUI.mChattingUIProxy.onEnterBegin();\n }\n if (newChattingTabUI.ypn.isSupportNavigationSwipeBack()) {\n newChattingTabUI.ypn.getSwipeBackLayout().setNeedRequestActivityTranslucent(false);\n }\n C4990ab.m7417i(\"MicroMsg.LauncherUI.NewChattingTabUI\", \"ashu::prepareChattingFragment use %dms, needInit %B, Intent %s\", Long.valueOf(System.currentTimeMillis() - currentTimeMillis), Boolean.valueOf(z2), intent);\n AppMethodBeat.m2505o(29823);\n }", "abstract void run(TaskList tasks, MainWindow ui, Storage storage);", "public anywheresoftware.b4a.objects.PanelWrapper _asview() throws Exception{\nif (true) return _wholescreen;\n //BA.debugLineNum = 37;BA.debugLine=\"End Sub\";\nreturn null;\n}", "private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}", "public void componentShown(ComponentEvent e)\r\n\t\t\t{\n\t\t\t\tnew Thread(new Runnable()\r\n\t\t\t\t{\r\n\t\t\t\t\tpublic void run()\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(geopistaEditor==null)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tgeopistaEditor = new GeopistaEditor();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tblackboard.put(\"capaParcelasInfoReferencia\", null);\r\n\t\t\t\t\t\t\tblackboard.put(\"geopistaEditorInfoReferencia\", geopistaEditor);\r\n\t\t\t\t\t\t\tcontext = geopistaEditor.getContext();\r\n\t\t\t\t\t\t\tscpErrores.setBounds(new Rectangle(135, 320, 595, 215));\r\n\r\n\t\t\t\t\t\t\tbtnAbrirUrbana.setIcon(IconLoader.icon(\"abrir.gif\"));\r\n\t\t\t\t\t\t\tbtnAbrirRustica.setIcon(IconLoader.icon(\"abrir.gif\"));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlblImagen.setIcon(IconLoader.icon(\"catastro.png\"));\r\n\t\t\t\t\t\t\tlblImagen.setBounds(new Rectangle(15, 20, 110, 490));\r\n\t\t\t\t\t\t\tlblImagen.setBorder(BorderFactory.createLineBorder(\r\n\t\t\t\t\t\t\t\t\tColor.black, 1));\r\n\r\n\t\t\t\t\t\t\tlblFicheroRustica.setText(I18N.get(\"ImportadorParcelas\",\"importar.informacion.referencia.fichero.rustica\"));\r\n\t\t\t\t\t\t\tlblFicheroRustica.setBounds(new Rectangle(135, 210, 180, 20));\r\n\r\n\t\t\t\t\t\t\ttxtFicheroRustica.setBounds(new Rectangle(330, 210, 365, 20));\r\n\t\t\t\t\t\t\ttxtFicheroRustica.setEditable(false);\r\n\t\t\t\t\t\t\ttxtFicheroRustica.addPropertyChangeListener(new PropertyChangeListener()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tpublic void propertyChange(\r\n\t\t\t\t\t\t\t\t\t\tPropertyChangeEvent e)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\ttxtFichero_propertyChange(e);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tbtnAbrirRustica.setBounds(new Rectangle(700, 205, 25, 25));\r\n\t\t\t\t\t\t\tbtnAbrirRustica.addActionListener(new ActionListener()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tbtnAbrirRustica_actionPerformed(e);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbtnAbrirUrbana.setBounds(new Rectangle(700, 180, 25, 25));\r\n\t\t\t\t\t\t\tbtnAbrirUrbana.addActionListener(new ActionListener()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tbtnAbrirUrbana_actionPerformed(e);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tlblErrores.setText(aplicacion.getI18nString(\"importar.informacion.referencia.errores.validacion\"));\r\n\t\t\t\t\t\t\tlblErrores.setBounds(new Rectangle(135, 295, 250, 20));\r\n\r\n\t\t\t\t\t\t\tlblFicheroUrbana.setText(I18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.fichero.urbana\"));\r\n\t\t\t\t\t\t\tlblFicheroUrbana.setBounds(new Rectangle(135, 180, 180, 20));\r\n\r\n\t\t\t\t\t\t\ttxtFicheroUrbana.setBounds(new Rectangle(330, 180, 365, 20));\r\n\t\t\t\t\t\t\ttxtFicheroUrbana.setEditable(false);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tediError.setText(\"jEditorPane1\");\r\n\t\t\t\t\t\t\tediError.setContentType(\"text/html\");\r\n\t\t\t\t\t\t\tediError.setEditable(false);\r\n\t\t\t\t\t\t\tlblFuente.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.Fuente\"));\r\n\t\t\t\t\t\t\tlblFuente.setBounds(new Rectangle(135, 25, 95, 20));\r\n\t\t\t\t\t\t\ttxtFuente.setBounds(new Rectangle(240, 25, 490, 20));\r\n\t\t\t\t\t\t\tlblOrganismo.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.Organismo\"));\r\n\t\t\t\t\t\t\tlblOrganismo.setBounds(new Rectangle(135, 55, 90, 20));\r\n\t\t\t\t\t\t\ttxtOrganismo.setBounds(new Rectangle(240, 55, 490, 20));\r\n\t\t\t\t\t\t\tlblPersona.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.Persona\"));\r\n\t\t\t\t\t\t\tlblPersona.setBounds(new Rectangle(135, 80, 85, 20));\r\n\t\t\t\t\t\t\ttxtPersona.setBounds(new Rectangle(240, 80, 490, 20));\r\n\t\t\t\t\t\t\tlblFecha.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.Fecha\"));\r\n\t\t\t\t\t\t\tlblFecha.setBounds(new Rectangle(135, 110, 75, 25));\r\n\t\t\t\t\t\t\ttxtFecha.setBounds(new Rectangle(240, 110, 75, 20));\r\n\t\t\t\t\t\t\ttxtFecha.setEditable(false);\r\n\t\t\t\t\t\t\tlblTipo.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.Tipo\"));\r\n\t\t\t\t\t\t\tlblTipo.setBounds(new Rectangle(320, 110, 135, 20));\r\n\t\t\t\t\t\t\tjSeparator1.setBounds(new Rectangle(135, 140, 600, 5));\r\n\r\n\t\t\t\t\t\t\tDateFormat formatter = new SimpleDateFormat(\"dd-MMM-yy\");\r\n\t\t\t\t\t\t\tString date = (String) formatter.format(new Date());\r\n\t\t\t\t\t\t\tjSeparator4.setBounds(new Rectangle(135, 20, 595, 5));\r\n\t\t\t\t\t\t\tjSeparator2.setBounds(new Rectangle(135, 295, 605, 2));\r\n\t\t\t\t\t\t\tjComboBox1.setBounds(new Rectangle(355, 110, 100, 20));\r\n\t\t\t\t\t\t\tlbldesc.setText(aplicacion.getI18nString(\"importar.asistente.descripcion.parcelas\"));\r\n\t\t\t\t\t\t\tlbldesc.setBounds(new Rectangle(135, 150, 600, 20));\r\n\t\t\t\t\t\t\ttxtFecha.setText(date);\r\n\r\n\t\t\t\t\t\t\t// Paso los textos etiquetas\r\n\r\n\t\t\t\t\t\t\tlblFuente.setText(aplicacion.getI18nString(\"fuente.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\tlblPersona.setText(aplicacion.getI18nString(\"persona.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\tlblOrganismo.setText(aplicacion.getI18nString(\"organismo.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\tlblFecha.setText(aplicacion.getI18nString(\"fecha.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\tlblTipo.setText(aplicacion.getI18nString(\"tipo.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlblTipo.setText(aplicacion.getI18nString(\"tipo.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//EPSG\r\n\t\t\t\t\t\t\tlblEPSG.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.SistemaCoordenadas\"));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlblEPSG.setBounds(new java.awt.Rectangle(460, 110, 135, 20));\r\n\t\t\t\t\t\t\tjComboEPSG.setBounds(new java.awt.Rectangle(600, 110, 135, 20));\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//lblEPSG.setBounds(new java.awt.Rectangle(135, 240, 135, 20));\r\n\t\t\t\t\t\t\t//jComboEPSG.setBounds(new java.awt.Rectangle(335, 240, 135, 20));\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tjComboEPSG.setModel(new DefaultComboBoxModel(\r\n\t\t\t\t\t new Vector(CoordinateSystemRegistry.instance(blackboard).getCoordinateSystems())));\r\n\r\n\r\n\t\t\t\t\t\t\t// cmbTipoInfo.setBounds(283, 22, 290, 20);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchkDelete.setText(I18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.borrar.texto\"));\r\n\t\t\t\t\t\t\tchkDelete.setBounds(new java.awt.Rectangle(135, 270, 500, 20));\r\n\t\t\t\t\t\t\tchkDelete.setSelected(false);\r\n\r\n\t\t\t\t\t\t\tsetSize(750, 550);\r\n\t\t\t\t\t\t\tadd(lbldesc, null);\r\n\t\t\t\t\t\t\tadd(jComboBox1, null);\r\n\t\t\t\t\t\t\tadd(jSeparator2, null);\r\n\t\t\t\t\t\t\tadd(jSeparator4, null);\r\n\t\t\t\t\t\t\tadd(jSeparator1, null);\r\n\t\t\t\t\t\t\tadd(lblTipo, null);\r\n\t\t\t\t\t\t\tadd(txtFecha, null);\r\n\t\t\t\t\t\t\tadd(lblFecha, null);\r\n\t\t\t\t\t\t\tadd(txtPersona, null);\r\n\t\t\t\t\t\t\tadd(lblPersona, null);\r\n\t\t\t\t\t\t\tadd(txtOrganismo, null);\r\n\t\t\t\t\t\t\tadd(lblOrganismo, null);\r\n\t\t\t\t\t\t\tadd(txtFuente, null);\r\n\t\t\t\t\t\t\tadd(lblFuente, null);\r\n\t\t\t\t\t\t\tadd(txtFicheroUrbana, null);\r\n\t\t\t\t\t\t\tadd(lblFicheroUrbana, null);\r\n\t\t\t\t\t\t\tadd(lblErrores, null);\r\n\t\t\t\t\t\t\tadd(btnAbrirRustica, null);\r\n\t\t\t\t\t\t\tadd(btnAbrirUrbana, null);\r\n\t\t\t\t\t\t\tadd(txtFicheroRustica, null);\r\n\t\t\t\t\t\t\tadd(lblFicheroRustica, null);\r\n\t\t\t\t\t\t\tadd(lblImagen, null);\r\n\t\t\t\t\t\t\tadd(chkDelete, null);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//EPSG\r\n\t\t\t\t\t\t\tadd(lblEPSG,null);\r\n\t\t\t\t\t\t\tadd(jComboEPSG,null);\r\n\r\n\t\t\t\t\t\t\tscpErrores.getViewport().add(ediError, null);\r\n\t\t\t\t\t\t\tadd(scpErrores, null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch (Exception e)\r\n\t\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\tfinally\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tprogressDialog.setVisible(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}).start();\r\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent arg) {\n\n String buttonName = arg.getActionCommand();\n final String device_IP = generalSet.getDevice_IP();\n final String host_IP = generalSet.getLocal_IP();\n\n if(\"重新选择测试设备\".equals(buttonName)){\n System.out.println(\"配侧设备IP:\"+generalSet.getAccompany_IP());\n MainJFrame.getInstance().switchWindow();\n }else if (\"一键测试\".equals(buttonName)) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n // TODO Auto-generated method stub\n //generalSet 在构造方法中初始化\n allTest(generalSet.getQrCode_Info());\n }\n }).start();\n } else {\n for (int i = 0; i < buttonTitle.length; i++) {\n if (buttonTitle[i].equals(buttonName)) {\n final int lastIndex = buttonTitle.length - 1;\n switch (i) {\n case 0: {// 信息设置\n new Thread(new Runnable() {\n @Override\n public void run() { // 启动线程执行后续操作\n powerLine.info_set(generalSet.getQrCode_Info());\n }\n }).start();\n break;\n }\n case 1: { //WAN和LAN口测试\n new Thread(new Runnable() {\n @Override\n public void run() { // 启动线程执行后续操作\n// setGatewayInfo(gateway_IP, host_IP);\n powerLine.wan_Lan_test();\n }\n }).start();\n break;\n }\n case 2: { //载波测试\n new Thread(new Runnable() {\n @Override\n public void run() {\n// carrier_Test(gateway_IP, buttonTitle[3]);\n powerLine.carrier_test();\n }\n }).start();\n break;\n }\n case 3: { //wifi测试\n new Thread(new Runnable() {\n @Override\n public void run() {\n //MainJFrame.showMssageln(buttonTitle[2]);\n// wifi_Test(gateway_IP, host_IP);\n powerLine.wifi_test();\n }\n }).start();\n break;\n }\n\n }\n break;\n }\n }\n }\n }", "private UIManager() {\n tableUI = new TableUI();\n snifferUI = new SnifferUI();\n }", "private void eric_function()\n\t{\n \ttabHost = (TabHost) findViewById(R.id.mytab1);\n \ttabHost.setup();\n \t \n \t//tabHost.setBackgroundColor(Color.argb(150, 20, 80, 150));\n \ttabHost.setBackgroundResource(R.drawable.ic_launcher);\n \t\n \t\n \t//\n \tTabSpec tabSpec;\n \t// 1\n \ttabSpec = tabHost.newTabSpec(tab_list[0]);\n \ttabSpec.setIndicator(\"a.1\");\n \ttabSpec.setContent(R.id.widget_layout_blue2);\n \ttabHost.addTab(tabSpec);\n \t// 2\n \ttabSpec = tabHost.newTabSpec(tab_list[1]);\n \ttabSpec.setIndicator(\"a2\");\n \ttabSpec.setContent(R.id.widget_layout_green2);\n \ttabHost.addTab(tabSpec); \t\n \t// 3\n \ttabSpec = tabHost.newTabSpec(tab_list[2]);\n \ttabSpec.setIndicator(\"a3\");\n \ttabSpec.setContent(R.id.widget_layout_red2);\n \ttabHost.addTab(tabSpec); \t\n \t//\n\t\ttabHost.setOnTabChangedListener(listener1);\n \t//\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "BackgroundWorker (String page, int id, Context context) {this.page=page; this.id=id; this.context=context; flag=3;}", "private ThreadUtil() {\n \n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\ti=4;\n\t\t\t\thandler = new Admin2Handler();\n\n\t\t\t\tdialog = ProgressDialog.show(Admin2Home.this, \"加载中\",\n\t\t\t\t\t\t\"加载中,请稍后..\");\n\n\t\t\t\tThread workThread = new Admin2HomeThread();\n\t\t\t\tworkThread.start();\n\n\t\t\t}", "public testGUI() {\n this.currBuff = new Buffer(currentTab,\"\");\n initComponents();\n }", "public void mo5114a() {\n new Thread(new C0370c(this)).start();\n }", "Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }", "public static String _globals() throws Exception{\nmostCurrent._bdmain = new flm.b4a.betterdialogs.BetterDialogs();\n //BA.debugLineNum = 17;BA.debugLine=\"Private svUtama \t\tAs ScrollView\";\nmostCurrent._svutama = new anywheresoftware.b4a.objects.ScrollViewWrapper();\n //BA.debugLineNum = 18;BA.debugLine=\"Private iTampil \t\tAs Int=0\";\n_itampil = (int) (0);\n //BA.debugLineNum = 19;BA.debugLine=\"Private pSemua \t\t\tAs Panel\";\nmostCurrent._psemua = new anywheresoftware.b4a.objects.PanelWrapper();\n //BA.debugLineNum = 20;BA.debugLine=\"Private ivMenu \t\t\tAs ImageView\";\nmostCurrent._ivmenu = new anywheresoftware.b4a.objects.ImageViewWrapper();\n //BA.debugLineNum = 21;BA.debugLine=\"Private ivSearch\t \tAs ImageView\";\nmostCurrent._ivsearch = new anywheresoftware.b4a.objects.ImageViewWrapper();\n //BA.debugLineNum = 22;BA.debugLine=\"Private ivClose \t\tAs ImageView\";\nmostCurrent._ivclose = new anywheresoftware.b4a.objects.ImageViewWrapper();\n //BA.debugLineNum = 23;BA.debugLine=\"Private ivSetting \t\tAs ImageView\";\nmostCurrent._ivsetting = new anywheresoftware.b4a.objects.ImageViewWrapper();\n //BA.debugLineNum = 24;BA.debugLine=\"Private lblBrowse \t\tAs Label\";\nmostCurrent._lblbrowse = new anywheresoftware.b4a.objects.LabelWrapper();\n //BA.debugLineNum = 25;BA.debugLine=\"Private lvBrowse \t\tAs ListView\";\nmostCurrent._lvbrowse = new anywheresoftware.b4a.objects.ListViewWrapper();\n //BA.debugLineNum = 26;BA.debugLine=\"Private svList \t\t\tAs ScrollView\";\nmostCurrent._svlist = new anywheresoftware.b4a.objects.ScrollViewWrapper();\n //BA.debugLineNum = 27;BA.debugLine=\"Private lvVideo \t\tAs ListView\";\nmostCurrent._lvvideo = new anywheresoftware.b4a.objects.ListViewWrapper();\n //BA.debugLineNum = 28;BA.debugLine=\"Private lvCate \t\t\tAs ListView\";\nmostCurrent._lvcate = new anywheresoftware.b4a.objects.ListViewWrapper();\n //BA.debugLineNum = 29;BA.debugLine=\"Private lvManage \t\tAs ListView\";\nmostCurrent._lvmanage = new anywheresoftware.b4a.objects.ListViewWrapper();\n //BA.debugLineNum = 30;BA.debugLine=\"Private MB \t\t\t\tAs MediaBrowser\";\nmostCurrent._mb = new flm.media.browser.MediaBrowser();\n //BA.debugLineNum = 31;BA.debugLine=\"Private picMusic\t\tAs Bitmap\";\nmostCurrent._picmusic = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();\n //BA.debugLineNum = 32;BA.debugLine=\"Private mapCover\t\tAs Map\";\nmostCurrent._mapcover = new anywheresoftware.b4a.objects.collections.Map();\n //BA.debugLineNum = 33;BA.debugLine=\"Private container \t\tAs AHPageContainer\";\nmostCurrent._container = new de.amberhome.viewpager.AHPageContainer();\n //BA.debugLineNum = 34;BA.debugLine=\"Private pager \t\t\tAs AHViewPager\";\nmostCurrent._pager = new de.amberhome.viewpager.AHViewPager();\n //BA.debugLineNum = 35;BA.debugLine=\"Private pCoverFlow \t\tAs Panel\";\nmostCurrent._pcoverflow = new anywheresoftware.b4a.objects.PanelWrapper();\n //BA.debugLineNum = 36;BA.debugLine=\"Private tCover\t\t\tAs Timer\";\nmostCurrent._tcover = new anywheresoftware.b4a.objects.Timer();\n //BA.debugLineNum = 37;BA.debugLine=\"Private picMusic\t\tAs Bitmap\";\nmostCurrent._picmusic = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();\n //BA.debugLineNum = 38;BA.debugLine=\"Private picVideo\t\tAs Bitmap\";\nmostCurrent._picvideo = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();\n //BA.debugLineNum = 39;BA.debugLine=\"Private picLain\t\t\tAs Bitmap\";\nmostCurrent._piclain = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();\n //BA.debugLineNum = 40;BA.debugLine=\"Private lstFilter \t\tAs List\";\nmostCurrent._lstfilter = new anywheresoftware.b4a.objects.collections.List();\n //BA.debugLineNum = 41;BA.debugLine=\"Private CurrPage \t\tAs Int = 0\";\n_currpage = (int) (0);\n //BA.debugLineNum = 42;BA.debugLine=\"Private arah\t\t\tAs Int = 0\";\n_arah = (int) (0);\n //BA.debugLineNum = 44;BA.debugLine=\"Private lblMost \t\tAs Label\";\nmostCurrent._lblmost = new anywheresoftware.b4a.objects.LabelWrapper();\n //BA.debugLineNum = 45;BA.debugLine=\"Private ivGaris \t\tAs ImageView\";\nmostCurrent._ivgaris = new anywheresoftware.b4a.objects.ImageViewWrapper();\n //BA.debugLineNum = 46;BA.debugLine=\"Private ivGambar1 \t\tAs ImageView\";\nmostCurrent._ivgambar1 = new anywheresoftware.b4a.objects.ImageViewWrapper();\n //BA.debugLineNum = 47;BA.debugLine=\"Private ivGambar4 \t\tAs ImageView\";\nmostCurrent._ivgambar4 = new anywheresoftware.b4a.objects.ImageViewWrapper();\n //BA.debugLineNum = 48;BA.debugLine=\"Private ivMore \t\t\tAs ImageView\";\nmostCurrent._ivmore = new anywheresoftware.b4a.objects.ImageViewWrapper();\n //BA.debugLineNum = 49;BA.debugLine=\"Private iTampil1 \t\tAs Int=0\";\n_itampil1 = (int) (0);\n //BA.debugLineNum = 50;BA.debugLine=\"Private iTampil2 \t\tAs Int=0\";\n_itampil2 = (int) (0);\n //BA.debugLineNum = 51;BA.debugLine=\"Private pTop \t\t\tAs Panel\";\nmostCurrent._ptop = new anywheresoftware.b4a.objects.PanelWrapper();\n //BA.debugLineNum = 52;BA.debugLine=\"Private etSearch \t\tAs EditText\";\nmostCurrent._etsearch = new anywheresoftware.b4a.objects.EditTextWrapper();\n //BA.debugLineNum = 53;BA.debugLine=\"Private lblJudul1 \t\tAs Label\";\nmostCurrent._lbljudul1 = new anywheresoftware.b4a.objects.LabelWrapper();\n //BA.debugLineNum = 54;BA.debugLine=\"Private lblLogin \t\tAs Label\";\nmostCurrent._lbllogin = new anywheresoftware.b4a.objects.LabelWrapper();\n //BA.debugLineNum = 56;BA.debugLine=\"Dim coverflow \t\tAs PhotoFlow\";\nmostCurrent._coverflow = new it.giuseppe.salvi.PhotoFlowActivity();\n //BA.debugLineNum = 57;BA.debugLine=\"Private bLogin \t\tAs Button\";\nmostCurrent._blogin = new anywheresoftware.b4a.objects.ButtonWrapper();\n //BA.debugLineNum = 58;BA.debugLine=\"Private bMore \t\tAs Button\";\nmostCurrent._bmore = new anywheresoftware.b4a.objects.ButtonWrapper();\n //BA.debugLineNum = 59;BA.debugLine=\"Dim pos_cflow \t\tAs Int\";\n_pos_cflow = 0;\n //BA.debugLineNum = 60;BA.debugLine=\"Dim panel1 \t\t\tAs Panel\";\nmostCurrent._panel1 = new anywheresoftware.b4a.objects.PanelWrapper();\n //BA.debugLineNum = 61;BA.debugLine=\"Dim timer_cflow\t\tAs Timer\";\nmostCurrent._timer_cflow = new anywheresoftware.b4a.objects.Timer();\n //BA.debugLineNum = 62;BA.debugLine=\"Dim a, b\t\t\tAs Int\";\n_a = 0;\n_b = 0;\n //BA.debugLineNum = 63;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "@SuppressWarnings(\"empty-statement\")\n public JFrame_Accueil(int numTab) throws Exception {\n initComponents();\n // On centre la fenetre\n this.setLocationRelativeTo(null);\n // Lors du retour sur la page d accueil l onglet correspondant au formulaire\n // qui vient d etre ferme sera visible\n this.tab = numTab;\n jTabPane_Accueil.setSelectedIndex(tab);\n // Initialisation des tables Client et Prospect\n tableClient();\n tableProspect();\n // Au lancement de l application le compteur d instance = 0 \n if(JFrame_Accueil.comptInstance == 0){\n // Donc initialisation du compteur de numero d identification pour la \n // creation d un prospect\n Prospect.dernierIdCreer();\n }\n // On increment le compteur a chaque instanciation\n JFrame_Accueil.comptInstance++;\n // Appelle de la methode pour cacher les boutons si table vide\n hideButton();\n // Methode pour rendre inaccessible des options du menu si certaines conditions\n // ne sont pas remplies\n showMenuListClient();\n showMenuListProspect();\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\tlatch = new CountDownLatch(2);\r\n\t\tnew InitApp();\r\n\t\ttry {\r\n\t\t\tlatch.await();\r\n\t\t} catch (InterruptedException e2) {\r\n\t\t\te2.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tlatch = new CountDownLatch(1);\r\n\t\tm = new MainWindow();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tlatch.await();\r\n\t\t} catch (InterruptedException e3) {\r\n\t\t\te3.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tm.setVisible(true);\r\n\t\t// Abrimos la ventana principal\r\n\r\n\t\t\r\n\r\n\t\tlatch = new CountDownLatch(1);\r\n\t\tif (Main.numTaules == 0)\r\n\t\t\tnew ConfigTablesDialog(latch).setVisible(true);\r\n\t\telse\r\n\t\t\tlatch.countDown();\r\n\t\t\r\n\t\tlatch = new CountDownLatch(1);\r\n\t\tm.loadTickets();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tlatch.await();\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tm.resetUIForUpdates();\r\n\t\tm.getTablesFrame().onTableNumChangeCreateButtons();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// Abrimos el server\r\n\t\ttry {\r\n\t\t\tMainServer mS = new MainServer(m);\r\n\t\t} catch (ClassNotFoundException | IOException | SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public MainUiPanel() {\n initComponents();\n// initializeTable();\n ArrayList<Client> loc = LocationAction.getLocationList();\n for(Client cl: loc){\n// column.add(cl.getClientName());\n// }\n \n jTabbedPane1.addTab(\"OrderList for \"+cl.getClientName(), new OrderNotificationUi(cl.getClientId()));\n// jTabbedPane1.addTab(\"OrderList for \"+cl.getClientName(), new OrderNotificationUi());\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\ti=10;\n\t\t\t\thandler = new Admin2Handler();\n\n\t\t\t\tdialog = ProgressDialog.show(Admin2Home.this, \"加载中\",\n\t\t\t\t\t\t\"加载中,请稍后..\");\n\n\t\t\t\tThread workThread = new Admin2HomeThread();\n\t\t\t\tworkThread.start();\n\n\t\t\t}", "public void setLaunchPage() {\n resetLaunchPageStatus();\n\n // set recognised ssid\n ssidLabel.setVisible(true);\n Color backColor = rootPanel.getBackground();\n int backRed = backColor.getRed();\n int backGreen = backColor.getGreen();\n int backBlue = backColor.getBlue();\n new Thread(() -> {\n try {\n int j=backGreen,k=backBlue;\n for(int i=backRed;i>0&&retStatus==-1;i-=3){\n j-=3;k-=3;\n if(j < 0) j=0;\n if(k < 0) k=0;\n ssidLabel.setForeground(new Color(i,j,k));\n sleep(100);\n }\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n }).start();\n\n // set break connection button to visible\n breakConnBtn.setVisible(true);\n registerBtn.setVisible(false);\n\n // set launch status based on login info\n new Thread(() -> {\n try {\n // store img status icon thread to local\n connStatusImgThread = Thread.currentThread();\n // set wifi icons\n int wifiIconIndex = 0;\n int wifiIconLen = wifiLaunchIcons.length;\n ImageIcon connStatusIcon = connectingIcon;\n String connStr = \"正在连接\";\n connectStatusL.setVisible(true);\n connectStatusL.setText(connStr);\n while(retStatus == -1) {\n connectStatusL.setIcon(connStatusIcon);\n wifiIconLabel.setIcon(wifiLaunchIcons[wifiIconIndex]);\n connStatusIcon = (connStatusIcon == connectingIcon ? connectedOpaqueIcon : connectingIcon);\n sleep(600);\n wifiIconIndex = (++wifiIconIndex) % wifiIconLen;\n }\n ssidLabel.setForeground(Color.black);\n if(retStatus == 0) {\n setBreakdownStatus();\n } else if(retStatus == 64) {\n wifiIconLabel.setIcon(wifiLaunchIcons[3]);\n connectStatusL.setIcon(connectedIcon);\n connectStatusL.setText(\"已连接 \");\n // set wallet left value\n setLoginStatus(1);\n //========== do deduction ==========//\n File file = new File(configSetting.getWpaCmdPath().concat(\"/testLeftToken\"));\n BufferedReader leftCoinReader = new BufferedReader(new FileReader(file));\n String leftCoinStr = leftCoinReader.readLine();\n if(! leftCoinStr.contains(\"registerReward\")) {\n //====== read balance from blockchain =====//\n if(Utils.getTestChain()) {\n BufferedReader tokenReader = new BufferedReader(new FileReader(rootPath.concat(\"/wpa_setup/testLeftToken\")));\n BufferedReader coinReader = new BufferedReader(new FileReader(rootPath.concat(\"/wpa_setup/testLeftCoin\")));\n leftToken = Double.valueOf(tokenReader.readLine());\n leftCoin = Double.valueOf(coinReader.readLine());\n// currency.put(\"leftToken\",Double.valueOf(tokenReader.readLine()));\n// currency.put(\"leftCoin\",Double.valueOf(coinReader.readLine()));\n tokenReader.close();\n coinReader.close();\n } else {\n try {\n ProcessBuilder pb = new ProcessBuilder(\n \"node\",\n rootPath.concat(\"/js_contact_chain/get_value.js\")\n );\n pb.redirectErrorStream(true);\n Process process = pb.start();\n BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String line;\n System.out.println(\"========== get reward from blockchain ==========\");\n // tricky getting coin and token\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n if (Pattern.matches(\"Token:[0-9]*\",line)) {\n leftToken = Double.valueOf(line.split(\":\")[1]);\n// currency.put(\"leftToken\",Double.valueOf(line.split(\":\")[1]));\n }\n if (Pattern.matches(\"Coin:[0-9]*\",line)) {\n leftCoin = Double.valueOf(line.split(\":\")[1]);\n// currency.put(\"leftCoin\",Double.valueOf(line.split(\":\")[1]));\n }\n System.out.println(\"<reward>\" + line + \"<reward>\");\n }\n process.waitFor();\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n // deduct 10 coin in backend\n new Thread(() -> {\n int tryout = 3;\n while(tryout > 0) {\n try {\n ArrayList<String> cmd = new ArrayList<>();\n cmd.add(\"node\");\n cmd.add(rootPath.concat(\"/js_contact_chain/client.js\"));\n cmd.add(\"DeductionToken\");\n cmd.add(\"0x01c96e4d9be1f4aef473dc5dcf13d8bd1d4133cd\");\n cmd.add(\"e16a1130062b37f038b9df02f134d7ddd9009c54c62bd92d4ed42c0dba1189a8\");\n cmd.add(\"0xf439bf68fc695b4a62f9e3322c75229ba5a0ff33\");\n ProcessBuilder pb = new ProcessBuilder(cmd);\n Process process = pb.start();\n BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n String line;\n // tricky getting data\n boolean isSuccess = false;\n while ((line = reader.readLine()) != null) {\n System.out.println(line);\n if (line.contains(\"status\")) {\n String[] tmpArry = line.split(\":\");\n String status = tmpArry[1];\n status = status.substring(1, status.length() - 1);\n isSuccess = Boolean.valueOf(status);\n }\n }\n if(isSuccess) {\n break;\n }\n System.out.println(\"[ERROR] Transaction failed! Deduct token failed!\");\n process.waitFor();\n } catch (IOException|InterruptedException e) {\n System.out.println(e.getMessage());\n }\n tryout--;\n }\n }).start();\n }\n leftToken = Arith.sub(leftToken,10);\n // record item\n writeRecord(\"-10: 登陆\",tokenHistoryFP);\n } else {\n String[] tmpStr = leftCoinStr.split(\":\");\n leftToken = Double.valueOf(tmpStr[1]);\n leftCoin = 0;\n// currency.put(\"leftToken\",Double.valueOf(tmpStr[1]));\n// currency.put(\"leftCoin\",0.0);\n writeRecord(\"+\"+leftToken+\": 注册\",tokenHistoryFP);\n }\n sleep(200);\n String historyStr = readRecord(historyReadlineNum,tokenHistoryFP);\n tokenHistoryLabel.setText(historyStr);\n } else {\n wifiIconLabel.setIcon(unLaunchIcon);\n connectStatusL.setIcon(unconnectedIcon);\n connectStatusL.setText(\"未连接 \");\n }\n setPageStatus();\n // set login page advertisement\n new Thread(() -> {\n try {\n int adsIndex = 0;\n int adsLen = loginAdsIcons.length;\n while (loginStatus == 1) {\n launchAdsLabel.setIcon(loginAdsIcons[adsIndex]);\n sleep(2500);\n adsIndex = ++adsIndex % adsLen;\n }\n } catch (InterruptedException e) {\n System.out.println(e.getMessage());\n }\n }).start();\n } catch (InterruptedException|IOException ex) {\n System.out.println(ex.getMessage());\n }\n }).start();\n }", "@Override\n\tpublic void runMBA() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void run() {\n criaGUI();\n \n }", "@Override\n public void run() {\n //cria a tela de espera e mostra ela\n JDialogLoading jd = new JDialogLoading(null, false);\n jd.setVisible(true);\n\n try {\n t1.join();//fica esperando a primeira thread acabar\n } catch (InterruptedException ex) {\n Logger.getLogger(JFrameSale_1.class.getName()).log(Level.SEVERE, null, ex);\n }\n // quando acabar fecha a janela de espera, podes fazer outras coisas aqui\n jd.dispose();\n\n }", "@Override\r\n public void run() {\n ax.browserPane.setTitleAt(0,ax.browser.getTitle());\r\n String stringToken1 = null; \r\n try {\r\n stringToken1 = (\"<Navigate Home>::\" + getHome());\r\n } catch (IOException ex) {\r\n Logger.getLogger(AxBrowser.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n ax.consoleTextArea.setText(stringToken1);\r\n //Put the current html address in the addressbar\r\n ax.addressBar.setText(ax.browser.getCurrentLocation());\r\n \r\n }", "protected void onPreExecute(){\n\t Utils.logThreadSignature(this.tag);\n\t pd = newPDinstance(0);\n\t pd.show();\n }", "BackgroundWorker (String page, String name, String type, Context context) {this.page=page; this.name=name; this.type=type; this.context=context; flag=2;}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void applyTab();", "public void startProcessTipoDetalleMovimientoInventario(Boolean conSplash) throws Exception {\n\t\t\r\n\t\tfinal JTabbedPane jTabbedPaneBusquedasTipoDetalleMovimientoInventario=null; \r\n\t\t\r\n\t\tfinal JPanel jPanelParametrosReportesTipoDetalleMovimientoInventario=this.jPanelParametrosReportesTipoDetalleMovimientoInventario;\r\n\t\t//final JScrollPane jScrollPanelDatosTipoDetalleMovimientoInventario=this.jScrollPanelDatosTipoDetalleMovimientoInventario;\r\n\t\tfinal JTable jTableDatosTipoDetalleMovimientoInventario=this.jTableDatosTipoDetalleMovimientoInventario;\t\t\r\n\t\tfinal JPanel jPanelPaginacionTipoDetalleMovimientoInventario=this.jPanelPaginacionTipoDetalleMovimientoInventario;\r\n\t\t//final JScrollPane jScrollPanelDatosEdicionTipoDetalleMovimientoInventario=this.jScrollPanelDatosEdicionTipoDetalleMovimientoInventario;\r\n\t\tfinal JPanel jPanelAccionesTipoDetalleMovimientoInventario=this.jPanelAccionesTipoDetalleMovimientoInventario;\r\n\t\t\r\n\t\tJPanel jPanelCamposAuxiliarTipoDetalleMovimientoInventario=new JPanelMe();\r\n\t\tJPanel jPanelAccionesFormularioAuxiliarTipoDetalleMovimientoInventario=new JPanelMe();\r\n\t\t\r\n\t\tif(this.jInternalFrameDetalleFormTipoDetalleMovimientoInventario!=null) {\r\n\t\t\tjPanelCamposAuxiliarTipoDetalleMovimientoInventario=this.jInternalFrameDetalleFormTipoDetalleMovimientoInventario.jPanelCamposTipoDetalleMovimientoInventario;\r\n\t\t\tjPanelAccionesFormularioAuxiliarTipoDetalleMovimientoInventario=this.jInternalFrameDetalleFormTipoDetalleMovimientoInventario.jPanelAccionesFormularioTipoDetalleMovimientoInventario;\r\n\t\t}\r\n\t\t\r\n\t\tfinal JPanel jPanelCamposTipoDetalleMovimientoInventario=jPanelCamposAuxiliarTipoDetalleMovimientoInventario;\r\n\t\tfinal JPanel jPanelAccionesFormularioTipoDetalleMovimientoInventario=jPanelAccionesFormularioAuxiliarTipoDetalleMovimientoInventario;\r\n\t\t\r\n\t\t\r\n\t\tfinal JMenuBar jmenuBarTipoDetalleMovimientoInventario=this.jmenuBarTipoDetalleMovimientoInventario;\r\n\t\tfinal JToolBar jTtoolBarTipoDetalleMovimientoInventario=this.jTtoolBarTipoDetalleMovimientoInventario;\t\t\r\n\t\t\r\n\t\t\r\n\t\tJMenuBar jmenuBarDetalleAuxiliarTipoDetalleMovimientoInventario=new JMenuBar();\r\n\t\tJToolBar jTtoolBarDetalleAuxiliarTipoDetalleMovimientoInventario=new JToolBar();\t\t\r\n\t\t\r\n\t\tif(this.jInternalFrameDetalleFormTipoDetalleMovimientoInventario!=null) {\r\n\t\t\tjmenuBarDetalleAuxiliarTipoDetalleMovimientoInventario=this.jInternalFrameDetalleFormTipoDetalleMovimientoInventario.jmenuBarDetalleTipoDetalleMovimientoInventario;\r\n\t\t\tjTtoolBarDetalleAuxiliarTipoDetalleMovimientoInventario=this.jInternalFrameDetalleFormTipoDetalleMovimientoInventario.jTtoolBarDetalleTipoDetalleMovimientoInventario;\r\n\t\t}\r\n\t\t\r\n\t\tfinal JMenuBar jmenuBarDetalleTipoDetalleMovimientoInventario=jmenuBarDetalleAuxiliarTipoDetalleMovimientoInventario;\r\n\t\tfinal JToolBar jTtoolBarDetalleTipoDetalleMovimientoInventario=jTtoolBarDetalleAuxiliarTipoDetalleMovimientoInventario;\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif(Constantes2.CON_PROCESO_HILO) {\r\n\t\t\tThread threadRunnableProcess;\r\n\t\t\tProcessRunnable processRunnable;\r\n\t\t\t\r\n\t\t\tprocessRunnable=new ProcessRunnable();\r\n\t\t\t\r\n\t\t\tprocessRunnable.setsTipo(\"START\");\r\n\t\t\tprocessRunnable.setDesktop(jDesktopPane);\r\n\t\t\tprocessRunnable.setModuloActual(moduloActual);\r\n\t\t\tprocessRunnable.setModuloUsuarioSeleccionado(moduloActual);\r\n\t\t\tprocessRunnable.setOpcionActual(opcionActual);\r\n\t\t\tprocessRunnable.setParametroGeneralSg(parametroGeneralSg);\r\n\t\t\tprocessRunnable.setParametroGeneralUsuario(parametroGeneralUsuario);\r\n\t\t\tprocessRunnable.setResumenUsuarioActual(resumenUsuarioActual);\r\n\t\t\tprocessRunnable.setUsuarioActual(usuarioActual);\r\n\t\t\t\r\n\t\t\tprocessRunnable.jTabbedPaneBusquedas=jTabbedPaneBusquedasTipoDetalleMovimientoInventario;\r\n\t\t\tprocessRunnable.jPanelParametrosReportes=jPanelParametrosReportesTipoDetalleMovimientoInventario;\r\n\t\t\tprocessRunnable.jTableDatos=jTableDatosTipoDetalleMovimientoInventario;\r\n\t\t\tprocessRunnable.jPanelCampos=jPanelCamposTipoDetalleMovimientoInventario;\r\n\t\t\tprocessRunnable.jPanelPaginacion=jPanelPaginacionTipoDetalleMovimientoInventario;\r\n\t\t\tprocessRunnable.jPanelAcciones=jPanelAccionesTipoDetalleMovimientoInventario;\r\n\t\t\tprocessRunnable.jPanelAccionesFormulario=jPanelAccionesFormularioTipoDetalleMovimientoInventario;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprocessRunnable.jmenuBar=jmenuBarTipoDetalleMovimientoInventario;\r\n\t\t\tprocessRunnable.jmenuBarDetalle=jmenuBarDetalleTipoDetalleMovimientoInventario;\r\n\t\t\tprocessRunnable.jTtoolBar=jTtoolBarTipoDetalleMovimientoInventario;\r\n\t\t\tprocessRunnable.jTtoolBarDetalle=jTtoolBarDetalleTipoDetalleMovimientoInventario;\r\n\t\t\tprocessRunnable.jInternalFrameBase=this;\r\n\t\t\t\r\n\t\t\t//processRunnable.CargarObjetosRendimientoCriticoModuloInventario();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthreadRunnableProcess=new Thread(processRunnable);//.start();\r\n\t\t\t\t\t\r\n\t\t\tthreadRunnableProcess.start();\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tFuncionesSwing.enableDisablePanels(false,jTabbedPaneBusquedasTipoDetalleMovimientoInventario ,jPanelParametrosReportesTipoDetalleMovimientoInventario,jTableDatosTipoDetalleMovimientoInventario, /*jScrollPanelDatosTipoDetalleMovimientoInventario,*/jPanelCamposTipoDetalleMovimientoInventario,jPanelPaginacionTipoDetalleMovimientoInventario, /*jScrollPanelDatosEdicionTipoDetalleMovimientoInventario,*/ jPanelAccionesTipoDetalleMovimientoInventario,jPanelAccionesFormularioTipoDetalleMovimientoInventario,jmenuBarTipoDetalleMovimientoInventario,jmenuBarDetalleTipoDetalleMovimientoInventario,jTtoolBarTipoDetalleMovimientoInventario,jTtoolBarDetalleTipoDetalleMovimientoInventario);\r\n\t\t\r\n\t\t\tstartProcess();//this.\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\t/*\r\n\t\tif(conSplash) {\r\n\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t public void run() {\r\n\t\t\t \t try {\r\n\t\t\t\t\t\t\tFuncionesSwing.enableDisablePanels(false,null ,jPanelParametrosReportesTipoDetalleMovimientoInventario, jScrollPanelDatosTipoDetalleMovimientoInventario,jPanelPaginacionTipoDetalleMovimientoInventario, jScrollPanelDatosEdicionTipoDetalleMovimientoInventario, jPanelAccionesTipoDetalleMovimientoInventario,jPanelAccionesFormularioTipoDetalleMovimientoInventario,jmenuBarTipoDetalleMovimientoInventario,jmenuBarDetalleTipoDetalleMovimientoInventario,jTtoolBarTipoDetalleMovimientoInventario,jTtoolBarDetalleTipoDetalleMovimientoInventario);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tstartProcess();//this.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t});\r\n\t\t}\r\n\t\t*/\r\n\t}", "protected abstract void updateTabState();", "private void getIBMToneThreadList(final List<PageExtract> pl) {\n\t\ttry {\n\t\t\tfinal DbConnector db = new DbConnector();\n\n\t\t\tnew Thread() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tfor (PageExtract p : pl) {\n\t\t\t\t\t\tString content = p.getContent();\n\t\t\t\t\t\tif (!content.equals(\"\")) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tToneAnalysis a = ToneAnalyzerUtil.getInstance().getTone(content);\n\n\t\t\t\t\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_IBM_TONE_UPDATE,\n\t\t\t\t\t\t\t\t\t\tArrays.asList(a.toString(), String.valueOf(p.getPageId())));\n\t\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}.start();\n\t\t} catch (ClassNotFoundException | SQLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\ti=9;\n\t\t\t\thandler = new Admin2Handler();\n\n\t\t\t\tdialog = ProgressDialog.show(Admin2Home.this, \"加载中\",\n\t\t\t\t\t\t\"加载中,请稍后..\");\n\n\t\t\t\tThread workThread = new Admin2HomeThread();\n\t\t\t\tworkThread.start();\n\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public void run() {\n\t\t\t\tVerticalPanel panelCompteRendu = new VerticalPanel();\r\n\t\t\t\thtmlCompteRendu = new HTML();\r\n\t\t\t\tpanelCompteRendu.add(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"compteRendu\").add(panelCompteRendu);\r\n\t\t\t\t\r\n\t\t\t\tVerticalPanel panelLegende = new VerticalPanel();\r\n\t\t\t\thtmlLegende = new HTML();\r\n\t\t\t\tpanelLegende.add(htmlLegende);\r\n\t\t\t\tRootPanel.get(\"legende\").add(htmlLegende);\r\n\t\t\t\t\r\n\t\t\t\t// temps d'intˇgration restant\r\n\t\t\t\tLabel tempsDIntegrationRestant = new Label();\r\n\t\t\t\tRootPanel.get(\"tempsDIntegrationRestant\").add(tempsDIntegrationRestant);\r\n\t\t\t\t\r\n\t\t\t\t// ajout de la carte\r\n\t\t\t\twMap = new MapFaWidget2(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"carte\").add(wMap);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// ajout du bouton reset\r\n\t\t\t\tButton boutonReset = new Button(\"Nettoyer la carte\");\r\n\t\t\t\tboutonReset.addClickHandler(actionBoutonReset());\r\n\t\t\t\tRootPanel.get(\"boutonReset\").add(boutonReset);\r\n\r\n\t\t\t\t// ajout du formulaire d'intˇgration\r\n\t\t\t\tnew FileUploadView(wMap,htmlLegende, htmlCompteRendu,tempsDIntegrationRestant);\r\n\r\n\t\t\t}", "public static void main(String[] args) throws Exception {\n\n EventQueue.invokeLater(new Runnable(){\n @Override\n public void run() {\n try{\n VistaRequerimientosReto4 frame = new\n VistaRequerimientosReto4();\n frame.setVisible(true);\n } catch(Exception e){\n e.printStackTrace();\n }\n }\n });\n \n }", "private static void returnBook() {\n\t\tnew ReturnBookUI(new returnBookControl()).run();\t// method name change ReturnBookControl() to returnBookControl(),RuN to run()\r\n\t}", "@Override\n public void run() {\n SharedPreferences preferences = getSharedPreferences(\"waitInfo\",MODE_PRIVATE);\n //从共享首选项里取出要显示的数据\n int waitTime = preferences.getInt(\"waitTime\",-1);\n int peopleCount = preferences.getInt(\"peopleCount\", -1);\n int queueNumber = preferences.getInt(\"queueNumber\", -1);\n String doctor = preferences.getString(\"doctor\", \"\");\n\n tab4Fragment.waitTime.setText(\"预计排队时间\\n\\n\"+waitTime+\"分钟\");\n tab4Fragment.peopleNumber.setText(\"\"+peopleCount);\n tab4Fragment.queueNumber.setText(\"你的排队号码\\n\\n\"+queueNumber);\n tab4Fragment.reservationType.setText(\"你的挂号类型\\n\\n\"+doctor);\n }", "BackgroundWorker (String page, int id, int ivmin, int ivmax, String attack, String ulti, String name, String username, Context context) {this.context=context; this.page=page; this.id=id; this.ivmin=ivmin; this.ivmax=ivmax; this.attack=attack; this.ulti=ulti; this.name=name; this.username=username; flag=4;}", "public static void main(String[] args) {\n \n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n \npublic void run() {\n \n createAndShowGUI(); \n \n}\n \n });\n }", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tupdateUI();\n\t\t\t\t\t\t}", "public MainThread()\n {\n super();\n setPriority(1);\n setId(0x55); \n }", "public void startProcessLibroContable(Boolean conSplash) throws Exception {\n\t\t\r\n\t\tfinal JTabbedPane jTabbedPaneBusquedasLibroContable=this.jTabbedPaneBusquedasLibroContable; \r\n\t\t\r\n\t\tfinal JPanel jPanelParametrosReportesLibroContable=this.jPanelParametrosReportesLibroContable;\r\n\t\t//final JScrollPane jScrollPanelDatosLibroContable=this.jScrollPanelDatosLibroContable;\r\n\t\tfinal JTable jTableDatosLibroContable=this.jTableDatosLibroContable;\t\t\r\n\t\tfinal JPanel jPanelPaginacionLibroContable=this.jPanelPaginacionLibroContable;\r\n\t\t//final JScrollPane jScrollPanelDatosEdicionLibroContable=this.jScrollPanelDatosEdicionLibroContable;\r\n\t\tfinal JPanel jPanelAccionesLibroContable=this.jPanelAccionesLibroContable;\r\n\t\t\r\n\t\tJPanel jPanelCamposAuxiliarLibroContable=new JPanelMe();\r\n\t\tJPanel jPanelAccionesFormularioAuxiliarLibroContable=new JPanelMe();\r\n\t\t\r\n\t\tif(this.jInternalFrameDetalleFormLibroContable!=null) {\r\n\t\t\tjPanelCamposAuxiliarLibroContable=this.jInternalFrameDetalleFormLibroContable.jPanelCamposLibroContable;\r\n\t\t\tjPanelAccionesFormularioAuxiliarLibroContable=this.jInternalFrameDetalleFormLibroContable.jPanelAccionesFormularioLibroContable;\r\n\t\t}\r\n\t\t\r\n\t\tfinal JPanel jPanelCamposLibroContable=jPanelCamposAuxiliarLibroContable;\r\n\t\tfinal JPanel jPanelAccionesFormularioLibroContable=jPanelAccionesFormularioAuxiliarLibroContable;\r\n\t\t\r\n\t\t\r\n\t\tfinal JMenuBar jmenuBarLibroContable=this.jmenuBarLibroContable;\r\n\t\tfinal JToolBar jTtoolBarLibroContable=this.jTtoolBarLibroContable;\t\t\r\n\t\t\r\n\t\t\r\n\t\tJMenuBar jmenuBarDetalleAuxiliarLibroContable=new JMenuBar();\r\n\t\tJToolBar jTtoolBarDetalleAuxiliarLibroContable=new JToolBar();\t\t\r\n\t\t\r\n\t\tif(this.jInternalFrameDetalleFormLibroContable!=null) {\r\n\t\t\tjmenuBarDetalleAuxiliarLibroContable=this.jInternalFrameDetalleFormLibroContable.jmenuBarDetalleLibroContable;\r\n\t\t\tjTtoolBarDetalleAuxiliarLibroContable=this.jInternalFrameDetalleFormLibroContable.jTtoolBarDetalleLibroContable;\r\n\t\t}\r\n\t\t\r\n\t\tfinal JMenuBar jmenuBarDetalleLibroContable=jmenuBarDetalleAuxiliarLibroContable;\r\n\t\tfinal JToolBar jTtoolBarDetalleLibroContable=jTtoolBarDetalleAuxiliarLibroContable;\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif(Constantes2.CON_PROCESO_HILO) {\r\n\t\t\tThread threadRunnableProcess;\r\n\t\t\tProcessRunnable processRunnable;\r\n\t\t\t\r\n\t\t\tprocessRunnable=new ProcessRunnable();\r\n\t\t\t\r\n\t\t\tprocessRunnable.setsTipo(\"START\");\r\n\t\t\tprocessRunnable.setDesktop(jDesktopPane);\r\n\t\t\tprocessRunnable.setModuloActual(moduloActual);\r\n\t\t\tprocessRunnable.setModuloUsuarioSeleccionado(moduloActual);\r\n\t\t\tprocessRunnable.setOpcionActual(opcionActual);\r\n\t\t\tprocessRunnable.setParametroGeneralSg(parametroGeneralSg);\r\n\t\t\tprocessRunnable.setParametroGeneralUsuario(parametroGeneralUsuario);\r\n\t\t\tprocessRunnable.setResumenUsuarioActual(resumenUsuarioActual);\r\n\t\t\tprocessRunnable.setUsuarioActual(usuarioActual);\r\n\t\t\t\r\n\t\t\tprocessRunnable.jTabbedPaneBusquedas=jTabbedPaneBusquedasLibroContable;\r\n\t\t\tprocessRunnable.jPanelParametrosReportes=jPanelParametrosReportesLibroContable;\r\n\t\t\tprocessRunnable.jTableDatos=jTableDatosLibroContable;\r\n\t\t\tprocessRunnable.jPanelCampos=jPanelCamposLibroContable;\r\n\t\t\tprocessRunnable.jPanelPaginacion=jPanelPaginacionLibroContable;\r\n\t\t\tprocessRunnable.jPanelAcciones=jPanelAccionesLibroContable;\r\n\t\t\tprocessRunnable.jPanelAccionesFormulario=jPanelAccionesFormularioLibroContable;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tprocessRunnable.jmenuBar=jmenuBarLibroContable;\r\n\t\t\tprocessRunnable.jmenuBarDetalle=jmenuBarDetalleLibroContable;\r\n\t\t\tprocessRunnable.jTtoolBar=jTtoolBarLibroContable;\r\n\t\t\tprocessRunnable.jTtoolBarDetalle=jTtoolBarDetalleLibroContable;\r\n\t\t\tprocessRunnable.jInternalFrameBase=this;\r\n\t\t\t\r\n\t\t\t//processRunnable.CargarObjetosRendimientoCriticoModuloInventario();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthreadRunnableProcess=new Thread(processRunnable);//.start();\r\n\t\t\t\t\t\r\n\t\t\tthreadRunnableProcess.start();\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tFuncionesSwing.enableDisablePanels(false,jTabbedPaneBusquedasLibroContable ,jPanelParametrosReportesLibroContable,jTableDatosLibroContable, /*jScrollPanelDatosLibroContable,*/jPanelCamposLibroContable,jPanelPaginacionLibroContable, /*jScrollPanelDatosEdicionLibroContable,*/ jPanelAccionesLibroContable,jPanelAccionesFormularioLibroContable,jmenuBarLibroContable,jmenuBarDetalleLibroContable,jTtoolBarLibroContable,jTtoolBarDetalleLibroContable);\r\n\t\t\r\n\t\t\tstartProcess();//this.\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\t/*\r\n\t\tif(conSplash) {\r\n\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t public void run() {\r\n\t\t\t \t try {\r\n\t\t\t\t\t\t\tFuncionesSwing.enableDisablePanels(false,jTabbedPaneBusquedasLibroContable ,jPanelParametrosReportesLibroContable, jScrollPanelDatosLibroContable,jPanelPaginacionLibroContable, jScrollPanelDatosEdicionLibroContable, jPanelAccionesLibroContable,jPanelAccionesFormularioLibroContable,jmenuBarLibroContable,jmenuBarDetalleLibroContable,jTtoolBarLibroContable,jTtoolBarDetalleLibroContable);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tstartProcess();//this.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t }\r\n\t\t\t});\r\n\t\t}\r\n\t\t*/\r\n\t}", "private Frame3() {\n\t}", "private GuiTest() {\n // Load custom resources (fonts, etc.)\n ResourceLoader.loadResources();\n\n // Load the user accounts into the system\n UserController.getInstance().loadUsers();\n\n // Set up GuiController and the main window.\n GuiController.instantiate(1280, 720, \"FPTS\");\n\n char[] password = {'p', 'a', 's', 's', 'w', 'o', 'r', 'd'};\n UserController.getInstance().login(\"rhochmuth\", password);\n\n // Show the screen/window\n PortfolioController.getInstance().showAddHoldingView();\n GuiController.getInstance().showWindow();\n\n // Load the market information and update it every 2 minutes\n MarketController.getInstance().StartTimer();\n }", "public static String _butpaso1_click() throws Exception{\nif (mostCurrent._imgmosquito.getVisible()==anywheresoftware.b4a.keywords.Common.True) { \n //BA.debugLineNum = 134;BA.debugLine=\"lblPaso4.Visible = False\";\nmostCurrent._lblpaso4.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 135;BA.debugLine=\"TimerAnimacion.Initialize(\\\"TimerAnimacion\\\", 10)\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5.Initialize(processBA,\"TimerAnimacion\",(long) (10));\n //BA.debugLineNum = 136;BA.debugLine=\"TimerAnimacion.Enabled = True\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv5.setEnabled(anywheresoftware.b4a.keywords.Common.True);\n }else {\n //BA.debugLineNum = 138;BA.debugLine=\"imgMosquito1.Left = -60dip\";\nmostCurrent._imgmosquito1.setLeft((int) (-anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (60))));\n //BA.debugLineNum = 139;BA.debugLine=\"imgMosquito1.Top = 50dip\";\nmostCurrent._imgmosquito1.setTop(anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (50)));\n //BA.debugLineNum = 140;BA.debugLine=\"imgMosquito1.Visible = True\";\nmostCurrent._imgmosquito1.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 141;BA.debugLine=\"TimerAnimacionEntrada.Initialize(\\\"TimerAnimacion\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.Initialize(processBA,\"TimerAnimacion_Entrada\",(long) (10));\n //BA.debugLineNum = 142;BA.debugLine=\"TimerAnimacionEntrada.Enabled = True\";\n_vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv6.setEnabled(anywheresoftware.b4a.keywords.Common.True);\n };\n //BA.debugLineNum = 149;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public MultiThreadedTabuSearch() {}", "public void run() {\n /*\n r18 = this;\n r3 = 0;\n r10 = 0;\n r0 = r18;\n r13 = com.actionbarsherlock.widget.ActivityChooserModel.this;\n r14 = r13.mInstanceLock;\n monitor-enter(r14);\n r11 = new java.util.ArrayList;\t Catch:{ all -> 0x005c }\n r0 = r18;\n r13 = com.actionbarsherlock.widget.ActivityChooserModel.this;\t Catch:{ all -> 0x005c }\n r13 = r13.mHistoricalRecords;\t Catch:{ all -> 0x005c }\n r11.<init>(r13);\t Catch:{ all -> 0x005c }\n monitor-exit(r14);\t Catch:{ all -> 0x0142 }\n r0 = r18;\n r13 = com.actionbarsherlock.widget.ActivityChooserModel.this;\t Catch:{ FileNotFoundException -> 0x005f }\n r13 = r13.mContext;\t Catch:{ FileNotFoundException -> 0x005f }\n r0 = r18;\n r14 = com.actionbarsherlock.widget.ActivityChooserModel.this;\t Catch:{ FileNotFoundException -> 0x005f }\n r14 = r14.mHistoryFileName;\t Catch:{ FileNotFoundException -> 0x005f }\n r15 = 0;\n r3 = r13.openFileOutput(r14, r15);\t Catch:{ FileNotFoundException -> 0x005f }\n r12 = android.util.Xml.newSerializer();\n r13 = 0;\n r12.setOutput(r3, r13);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r13 = \"UTF-8\";\n r14 = 1;\n r14 = java.lang.Boolean.valueOf(r14);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r12.startDocument(r13, r14);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r13 = 0;\n r14 = \"historical-records\";\n r12.startTag(r13, r14);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r9 = r11.size();\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r4 = 0;\n L_0x004b:\n if (r4 < r9) goto L_0x007f;\n L_0x004d:\n r13 = 0;\n r14 = \"historical-records\";\n r12.endTag(r13, r14);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r12.endDocument();\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n if (r3 == 0) goto L_0x005b;\n L_0x0058:\n r3.close();\t Catch:{ IOException -> 0x013f }\n L_0x005b:\n return;\n L_0x005c:\n r13 = move-exception;\n L_0x005d:\n monitor-exit(r14);\t Catch:{ all -> 0x005c }\n throw r13;\n L_0x005f:\n r2 = move-exception;\n r13 = com.actionbarsherlock.widget.ActivityChooserModel.LOG_TAG;\n r14 = new java.lang.StringBuilder;\n r15 = \"Error writing historical recrod file: \";\n r14.<init>(r15);\n r0 = r18;\n r15 = com.actionbarsherlock.widget.ActivityChooserModel.this;\n r15 = r15.mHistoryFileName;\n r14 = r14.append(r15);\n r14 = r14.toString();\n android.util.Log.e(r13, r14, r2);\n goto L_0x005b;\n L_0x007f:\n r13 = 0;\n r8 = r11.remove(r13);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r8 = (com.actionbarsherlock.widget.ActivityChooserModel.HistoricalRecord) r8;\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r13 = 0;\n r14 = \"historical-record\";\n r12.startTag(r13, r14);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r13 = 0;\n r14 = \"activity\";\n r15 = r8.activity;\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r15 = r15.flattenToString();\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r12.attribute(r13, r14, r15);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r13 = 0;\n r14 = \"time\";\n r0 = r8.time;\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r16 = r0;\n r15 = java.lang.String.valueOf(r16);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r12.attribute(r13, r14, r15);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r13 = 0;\n r14 = \"weight\";\n r15 = r8.weight;\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r15 = java.lang.String.valueOf(r15);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r12.attribute(r13, r14, r15);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r13 = 0;\n r14 = \"historical-record\";\n r12.endTag(r13, r14);\t Catch:{ IllegalArgumentException -> 0x00bb, IllegalStateException -> 0x00e4, IOException -> 0x010d }\n r4 = r4 + 1;\n goto L_0x004b;\n L_0x00bb:\n r5 = move-exception;\n r13 = com.actionbarsherlock.widget.ActivityChooserModel.LOG_TAG;\t Catch:{ all -> 0x0136 }\n r14 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0136 }\n r15 = \"Error writing historical recrod file: \";\n r14.<init>(r15);\t Catch:{ all -> 0x0136 }\n r0 = r18;\n r15 = com.actionbarsherlock.widget.ActivityChooserModel.this;\t Catch:{ all -> 0x0136 }\n r15 = r15.mHistoryFileName;\t Catch:{ all -> 0x0136 }\n r14 = r14.append(r15);\t Catch:{ all -> 0x0136 }\n r14 = r14.toString();\t Catch:{ all -> 0x0136 }\n android.util.Log.e(r13, r14, r5);\t Catch:{ all -> 0x0136 }\n if (r3 == 0) goto L_0x005b;\n L_0x00dc:\n r3.close();\t Catch:{ IOException -> 0x00e1 }\n goto L_0x005b;\n L_0x00e1:\n r13 = move-exception;\n goto L_0x005b;\n L_0x00e4:\n r7 = move-exception;\n r13 = com.actionbarsherlock.widget.ActivityChooserModel.LOG_TAG;\t Catch:{ all -> 0x0136 }\n r14 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0136 }\n r15 = \"Error writing historical recrod file: \";\n r14.<init>(r15);\t Catch:{ all -> 0x0136 }\n r0 = r18;\n r15 = com.actionbarsherlock.widget.ActivityChooserModel.this;\t Catch:{ all -> 0x0136 }\n r15 = r15.mHistoryFileName;\t Catch:{ all -> 0x0136 }\n r14 = r14.append(r15);\t Catch:{ all -> 0x0136 }\n r14 = r14.toString();\t Catch:{ all -> 0x0136 }\n android.util.Log.e(r13, r14, r7);\t Catch:{ all -> 0x0136 }\n if (r3 == 0) goto L_0x005b;\n L_0x0105:\n r3.close();\t Catch:{ IOException -> 0x010a }\n goto L_0x005b;\n L_0x010a:\n r13 = move-exception;\n goto L_0x005b;\n L_0x010d:\n r6 = move-exception;\n r13 = com.actionbarsherlock.widget.ActivityChooserModel.LOG_TAG;\t Catch:{ all -> 0x0136 }\n r14 = new java.lang.StringBuilder;\t Catch:{ all -> 0x0136 }\n r15 = \"Error writing historical recrod file: \";\n r14.<init>(r15);\t Catch:{ all -> 0x0136 }\n r0 = r18;\n r15 = com.actionbarsherlock.widget.ActivityChooserModel.this;\t Catch:{ all -> 0x0136 }\n r15 = r15.mHistoryFileName;\t Catch:{ all -> 0x0136 }\n r14 = r14.append(r15);\t Catch:{ all -> 0x0136 }\n r14 = r14.toString();\t Catch:{ all -> 0x0136 }\n android.util.Log.e(r13, r14, r6);\t Catch:{ all -> 0x0136 }\n if (r3 == 0) goto L_0x005b;\n L_0x012e:\n r3.close();\t Catch:{ IOException -> 0x0133 }\n goto L_0x005b;\n L_0x0133:\n r13 = move-exception;\n goto L_0x005b;\n L_0x0136:\n r13 = move-exception;\n if (r3 == 0) goto L_0x013c;\n L_0x0139:\n r3.close();\t Catch:{ IOException -> 0x013d }\n L_0x013c:\n throw r13;\n L_0x013d:\n r14 = move-exception;\n goto L_0x013c;\n L_0x013f:\n r13 = move-exception;\n goto L_0x005b;\n L_0x0142:\n r13 = move-exception;\n r10 = r11;\n goto L_0x005d;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.actionbarsherlock.widget.ActivityChooserModel.HistoryPersister.run():void\");\n }", "static /* synthetic */ void m89668q(NewChattingTabUI newChattingTabUI) {\n AppMethodBeat.m2504i(29825);\n newChattingTabUI.mo76179kT(3);\n AppMethodBeat.m2505o(29825);\n }", "public void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "public static String _butpaso4_click() throws Exception{\nmostCurrent._butpaso1.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 189;BA.debugLine=\"butPaso2.Visible = False\";\nmostCurrent._butpaso2.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 190;BA.debugLine=\"butPaso3.Visible = False\";\nmostCurrent._butpaso3.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 191;BA.debugLine=\"butPaso4.Visible = False\";\nmostCurrent._butpaso4.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 192;BA.debugLine=\"lblLabelPaso1.Visible = False\";\nmostCurrent._lbllabelpaso1.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 193;BA.debugLine=\"lblPaso2a.Visible = False\";\nmostCurrent._lblpaso2a.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 194;BA.debugLine=\"lblPaso2b.Visible = False\";\nmostCurrent._lblpaso2b.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 195;BA.debugLine=\"lblPaso3.Visible = False\";\nmostCurrent._lblpaso3.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 196;BA.debugLine=\"lblPaso3a.Visible = False\";\nmostCurrent._lblpaso3a.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 197;BA.debugLine=\"lblPaso4.Visible = True\";\nmostCurrent._lblpaso4.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 198;BA.debugLine=\"imgPupas.Visible = False\";\nmostCurrent._imgpupas.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 199;BA.debugLine=\"imgLarvas.Visible = False\";\nmostCurrent._imglarvas.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 200;BA.debugLine=\"imgMosquito.Visible = True\";\nmostCurrent._imgmosquito.setVisible(anywheresoftware.b4a.keywords.Common.True);\n //BA.debugLineNum = 201;BA.debugLine=\"imgMosquito.Top = 170dip\";\nmostCurrent._imgmosquito.setTop(anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (170)));\n //BA.debugLineNum = 202;BA.debugLine=\"imgMosquito.Left = 30dip\";\nmostCurrent._imgmosquito.setLeft(anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (30)));\n //BA.debugLineNum = 203;BA.debugLine=\"imgMosquito1.Visible = False\";\nmostCurrent._imgmosquito1.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 204;BA.debugLine=\"imgHuevos.Visible = False\";\nmostCurrent._imghuevos.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 205;BA.debugLine=\"lblEstadio.Text = \\\"Mosquito\\\"\";\nmostCurrent._lblestadio.setText(BA.ObjectToCharSequence(\"Mosquito\"));\n //BA.debugLineNum = 206;BA.debugLine=\"utilidades.CreateHaloEffect(Activity, butPaso1, C\";\nmostCurrent._vvvvvvvvvvvvvvvvvvvvv7._vvvvvvvvv3 /*void*/ (mostCurrent.activityBA,(anywheresoftware.b4a.objects.B4XViewWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.B4XViewWrapper(), (java.lang.Object)(mostCurrent._activity.getObject())),mostCurrent._butpaso1,anywheresoftware.b4a.keywords.Common.Colors.Red);\n //BA.debugLineNum = 207;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "@Override\r\n\t\t\tpublic void run() {\n\r\n\t\t\t\tif (i < 4)\r\n\t\t\t\t\ti++;\r\n\t\t\t\telse\r\n\t\t\t\t\ti = 0;\r\n\t\t\t\t\r\n\t\t\t\t//jestsmy poza EDT, a chcemy zmienic GUI (wyglad etykiety)\r\n\t\t\t\t//wiec musimy wywolac invokeLater zeby zmiane przerzucic do EDT\r\n\t\t\t\tSwingUtilities.invokeLater(new Runnable(){\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tetykieta.setIcon(obrazki[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\r\n\t\t\t}", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }" ]
[ "0.6082701", "0.59691066", "0.59101725", "0.5907595", "0.58767176", "0.57840925", "0.57620966", "0.57176644", "0.5711264", "0.5705687", "0.568361", "0.56773835", "0.566607", "0.5629365", "0.55977154", "0.55934846", "0.5589637", "0.5581445", "0.55810344", "0.5548048", "0.5545094", "0.55423766", "0.551985", "0.5510485", "0.5508392", "0.5507433", "0.54904485", "0.54874516", "0.5485562", "0.54790014", "0.5472892", "0.5472409", "0.54550797", "0.54540926", "0.5450788", "0.544673", "0.5434425", "0.5433088", "0.54250735", "0.54150414", "0.54085594", "0.5407001", "0.54049206", "0.54048264", "0.5399878", "0.53989196", "0.53989017", "0.53987515", "0.53936714", "0.53885037", "0.53881025", "0.538676", "0.5381738", "0.5380712", "0.5379594", "0.5373781", "0.5362284", "0.5355693", "0.5355693", "0.5355555", "0.5352669", "0.5352357", "0.5351492", "0.5351085", "0.5348347", "0.5340881", "0.53310233", "0.533059", "0.53220594", "0.53161347", "0.531092", "0.5309575", "0.5309575", "0.530796", "0.53044903", "0.53040606", "0.5299765", "0.5291403", "0.5290025", "0.5288815", "0.52836967", "0.52820057", "0.52772737", "0.5275397", "0.5274993", "0.5273053", "0.5270916", "0.5269426", "0.52686524", "0.5263116", "0.5263084", "0.5263084", "0.5263084", "0.5263084", "0.5263084", "0.5263084", "0.5263084", "0.5261132", "0.52585864", "0.52577096", "0.52577096" ]
0.0
-1
Create the treeview in a recursive way
private void createGestureTreeView(final String root) { this.root = new TreeItem<String>(root); this.root.setExpanded(true); this.treeView.setRoot(this.root); final List<String> userGestures = this.recognizer.getAllUserGesture(); for (int i = 0; i < userGestures.size(); i++) { this.makeGestureBranch(userGestures.get(i), this.root); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode111());\n structure.getNode11().branchList.add(structure.getNode112());\n structure.getNode11().branchList.add(structure.getNode113());\n\n structure.getNode13().branchList.add(structure.getNode131());\n\n structure.getNode112().branchList.add(structure.getNode1121());\n\n }", "public void createTree() {\n\t\taddNodeToParent(nodeMap);\n\t}", "@Override\r\n\tpublic void buildTree() {\r\n\t\t\r\n\t\t// root level \r\n\t\trootNode = new TreeNode<String>(\"\");\r\n\t\t\r\n\t\t//first level\r\n\t\tinsert(\".\", \"e\");\r\n\t\tinsert(\"-\", \"t\");\r\n\t\t\r\n\t\t//second level\r\n\t\t\r\n\t\tinsert(\". .\", \"i\");\r\n\t\tinsert(\".-\", \"a\");\r\n\t\tinsert(\"-.\", \"n\"); \r\n\t\tinsert(\"--\", \"m\");\r\n\t\t\r\n\t\t//third level\r\n\t\tinsert(\"...\", \"s\");\r\n\t\tinsert(\"..-\", \"u\");\r\n\t\tinsert(\".-.\", \"r\");\r\n\t\tinsert(\".--\", \"w\");\r\n\t\tinsert(\"-..\", \"d\");\r\n\t\tinsert(\"-.-\", \"k\");\r\n\t\tinsert(\"--.\", \"g\");\r\n\t\tinsert(\"---\", \"o\");\r\n\t\t\r\n\t\t//fourth level\r\n\t\tinsert(\"....\", \"h\");\r\n\t\tinsert(\"...-\", \"v\");\r\n\t\tinsert(\"..-.\", \"f\");\r\n\t\tinsert(\".-..\", \"l\");\r\n\t\tinsert(\".--.\", \"p\");\r\n\t\tinsert(\".---\", \"j\");\r\n\t\tinsert(\"-...\", \"b\");\r\n\t\tinsert(\"-..-\", \"x\");\r\n\t\tinsert(\"-.-.\", \"c\");\r\n\t\tinsert(\"-.--\", \"y\");\r\n\t\tinsert(\"--..\", \"z\");\r\n\t\tinsert(\"--.-\", \"q\");\r\n\t\t\r\n\t}", "private void CreateJTree(List<MainCategoryDTO> allTree) {\n \n \n DefaultMutableTreeNode root = new DefaultMutableTreeNode(\"Listem\");\n for (int i = 0; i < allTree.size(); i++) {\n MainCategoryDTO mainCategory = allTree.get(i);\n DefaultMutableTreeNode mainCategoryTree = new DefaultMutableTreeNode(mainCategory.getName());\n CreatSubCategory(mainCategory.getList(),mainCategoryTree);\n root.add(mainCategoryTree);\n } \n \n \n DefaultTreeModel model = new DefaultTreeModel(root); \n jTree1.setModel(model); \n jTree1.setRootVisible(false);\n jTree1.addTreeSelectionListener((javax.swing.event.TreeSelectionEvent evt) -> {\n JTree1ValueChanged(evt);\n });\n \n }", "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "public void createTree() {\n Node<String> nodeB = new Node<String>(\"B\", null, null);\n Node<String> nodeC = new Node<String>(\"C\", null, null);\n Node<String> nodeD = new Node<String>(\"D\", null, null);\n Node<String> nodeE = new Node<String>(\"E\", null, null);\n Node<String> nodeF = new Node<String>(\"F\", null, null);\n Node<String> nodeG = new Node<String>(\"G\", null, null);\n root.leftChild = nodeB;\n root.rightChild = nodeC;\n nodeB.leftChild = nodeD;\n nodeB.rightChild = nodeE;\n nodeC.leftChild = nodeF;\n nodeC.rightChild = nodeG;\n\n }", "void createTree() throws IOException {\n\n // create root\n rootTreeItem = createTreeRoot();\n\n // create tree structure recursively\n createTree(rootTreeItem);\n\n // sort tree structure by name\n rootTreeItem.getChildren()\n .sort(Comparator.comparing(new Function<TreeItem<FilePath>, String>() {\n @Override\n public String apply(TreeItem<FilePath> t) {\n return t.getValue().toString().toLowerCase();\n }\n }));\n\n }", "private void recursiveOefosTreeviewBuild(DefaultMutableTreeNode nodes, TreeMap<Object, Taxon> taxons, String sequence, String panelname) throws Exception {\r\n try {\r\n for (Map.Entry<Object, Taxon> kv : taxons.entrySet()) {\r\n ClassNode iNode = new ClassNode(\"\" + kv.getKey(), kv.getValue().upstream_identifier + \": \" + kv.getValue().description);\r\n \r\n ClassMutableNode inner = new ClassMutableNode(iNode);\r\n nodes.add(inner);\r\n String oefosname = panelname+\"----\"+sequence;\r\n if (this.oefos_path.get(oefosname) != null) {\r\n if (this.oefos_path.get(oefosname).containsValue(kv.getValue().TID)) {\r\n selected = inner;\r\n }\r\n }\r\n\r\n recursiveOefosTreeviewBuild(inner, kv.getValue().subtaxons, sequence, panelname);\r\n }\r\n\r\n // Utility.sortTreeChildren(nodes);\r\n } catch (Exception ex) {\r\n throw new Exception(\"Exception in recursiveOefosTreeviewBuild: \" + ex.getStackTrace() + \"\\n\");\r\n }\r\n }", "public static TreeNode getTree() {\n\t\tTreeNode a = new TreeNode(\"a\", 314);\n\t\tTreeNode b = new TreeNode(\"b\", 6);\n\t\tTreeNode c = new TreeNode(\"c\", 271);\n\t\tTreeNode d = new TreeNode(\"d\", 28);\n\t\tTreeNode e = new TreeNode(\"e\", 0);\n\t\tTreeNode f = new TreeNode(\"f\", 561);\n\t\tTreeNode g = new TreeNode(\"g\", 3);\n\t\tTreeNode h = new TreeNode(\"h\", 17);\n\t\tTreeNode i = new TreeNode(\"i\", 6);\n\t\tTreeNode j = new TreeNode(\"j\", 2);\n\t\tTreeNode k = new TreeNode(\"k\", 1);\n\t\tTreeNode l = new TreeNode(\"l\", 401);\n\t\tTreeNode m = new TreeNode(\"m\", 641);\n\t\tTreeNode n = new TreeNode(\"n\", 257);\n\t\tTreeNode o = new TreeNode(\"o\", 271);\n\t\tTreeNode p = new TreeNode(\"p\", 28);\n\t\t\n\t\ta.left = b; b.parent = a;\n\t\tb.left = c; c.parent = b;\n\t\tc.left = d;\t d.parent = c;\n\t\tc.right = e; e.parent = c;\n\t\tb.right = f; f.parent = b;\n\t\tf.right = g; g.parent = f;\n\t\tg.left = h; h.parent = g;\n\t\ta.right = i; i.parent = a;\n\t\ti.left = j; j.parent = i;\n\t\ti.right = o; o.parent = i;\n\t\tj.right = k; k.parent = j;\n\t\to.right = p; p.parent = o;\n\t\tk.right = n; n.parent = k;\n\t\tk.left = l; l.parent = k;\n\t\tl.right = m; m.parent = l;\n\t\t\n\t\td.childrenCount = 0;\n\t\te.childrenCount = 0;\n\t\tc.childrenCount = 2;\n\t\tb.childrenCount = 6;\n\t\tf.childrenCount = 2;\n\t\tg.childrenCount = 1;\n\t\th.childrenCount = 0;\n\t\tl.childrenCount = 1;\n\t\tm.childrenCount = 0;\n\t\tn.childrenCount = 0;\n\t\tk.childrenCount = 3;\n\t\tj.childrenCount = 4;\n\t\to.childrenCount = 1;\n\t\tp.childrenCount = 0;\n\t\ti.childrenCount = 7;\n\t\ta.childrenCount = 15;\n\t\t\n\t\treturn a;\n\t}", "public String makeTree() {\r\n // Create a stack to store the files/directories in the tree\r\n Stack<DirectoryTreeNode> itemStack = new Stack<>();\r\n // Initialize a string variable to store the tree diagram\r\n String tree = \"\";\r\n // Push the root directory into the stack\r\n itemStack.push(this.rootDir);\r\n\r\n // Loop through the items in the Stack until all the items have been\r\n // traversed (this is similar to the pre-order traversal of the tree)\r\n while (!itemStack.isEmpty()) {\r\n // Get the item on the top of the stack and store it in current\r\n DirectoryTreeNode current = (DirectoryTreeNode) itemStack.pop();\r\n // Get the number of tabs required in the output for this item\r\n int numTabs = this.getNumberOfAncestors((E) current);\r\n // Get the string of tabs needed to put before current's name\r\n String tabs = this.getNumberOfTabs(numTabs);\r\n // Add the required number of tabs, the current item's of name and a\r\n // newline\r\n tree += tabs + current.getName() + \"\\n\";\r\n\r\n // Check if current is a Directory (in which case it may have\r\n // sub directories and files)\r\n if (current instanceof Directory) {\r\n // Get the list of files and directories of current directory\r\n ArrayList<DirectoryTreeNode> contents =\r\n ((Directory) current).getContents();\r\n // Loop through the contents of current and add them to the stack\r\n for (int i = contents.size() - 1; i >= 0; i--) {\r\n itemStack.add(contents.get(i));\r\n }\r\n }\r\n }\r\n // Return the generated tree diagram\r\n return tree;\r\n }", "public void refreshTree(){\n\r\n\t\ttestCaseVector = db.getTestCases();\r\n\t\tFolderVector = db.getFolders();\r\n\t\trootNode_TC = new DefaultMutableTreeNode(\"Test Cases\");\r\n\t\ts = new MyTreeNode [testCaseVector.size()+FolderVector.size() +2];\r\n\t\tFolder1 = new DefaultMutableTreeNode [testCaseVector.size()+FolderVector.size() +2];\r\n\r\n\r\n\r\n\t\tint x = 1 ; \r\n\t\tfor(Folder f: FolderVector){\r\n\t\t\ts[x] = new MyTreeNode(f.getName(),'f', x, f.getFolderID());\r\n\r\n\t\t\tExpandedID[x] = f.getFolderID();\r\n\t\t\tFolder1[x] = new DefaultMutableTreeNode(s[x]);\r\n\r\n\t\t\tif (f.getParentID() == 0)\r\n\t\t\t{\r\n\t\t\t\trootNode_TC.add(Folder1[x]);\r\n\t\t\t\tx++;\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\telse {\r\n\r\n\t\t\t\tfor (int u = 1 ; u < s.length; u++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif(s[u]!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(s[u].getType() == 'f')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(s[u].getID() == f.getParentID())\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tFolder1[u].add(Folder1[x]);\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tint l = x-1;\r\n\t\t\tfor(TestCase tc : testCaseVector)\r\n\t\t\t{\r\n\r\n\t\t\t\tif (tc.getFolderID() == f.getFolderID())\r\n\t\t\t\t{\r\n\t\t\t\t\ts[x] =new MyTreeNode(tc.getName(), 't', x, tc.getId());\r\n\r\n\t\t\t\t\tFolder1[l].add(new DefaultMutableTreeNode(s[x]));\r\n\t\t\t\t\tx++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tint y = FolderVector.size()+1;\r\n\t\tfor(TestCase tc : testCaseVector)\r\n\t\t{\r\n\t\t\tif(tc.getFolderID() == 0){\r\n\r\n\r\n\t\t\t\tMyTreeNode s=new MyTreeNode(tc.getName(), 't', y, tc.getId());\r\n\t\t\t\trootNode_TC.add(new DefaultMutableTreeNode(s));\r\n\t\t\t\ty++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tDefaultTreeModel Tree1 = new DefaultTreeModel(rootNode_TC);\r\n\t\toverviewTree.setModel(Tree1);\r\n\t\toverviewTree.setCellRenderer(new TreeRenderer(isExpanded, ExpandedID));\r\n\t\tfor(Folder f: FolderVector)\r\n\t\t{\r\n\t\t\tif(isExpanded[f.getFolderID()]){ // To expand the already expanded folders\r\n\t\t\t\tfor (int u = 1 ; u < s.length; u++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif(s[u]!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(s[u].getType() == 'f')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(s[u].getID() == f.getFolderID())\r\n\t\t\t\t\t\t\t{\r\n\r\n\t\t\t\t\t\t\t\tEnumeration<DefaultMutableTreeNode> e = rootNode_TC.depthFirstEnumeration();\r\n\t\t\t\t\t\t\t\twhile (e.hasMoreElements()) {\r\n\t\t\t\t\t\t\t\t\tDefaultMutableTreeNode node = e.nextElement();\r\n\t\t\t\t\t\t\t\t\tif (node != overviewTree.getModel().getRoot() )\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tMyTreeNode nodeInfo = null ;\r\n\t\t\t\t\t\t\t\t\t\tnodeInfo = (MyTreeNode) node.getUserObject();\r\n\t\t\t\t\t\t\t\t\t\tif (nodeInfo.getName().equalsIgnoreCase(s[u].getName())) \r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tTreePath p = new TreePath(node.getPath());\r\n\t\t\t\t\t\t\t\t\t\t\toverviewTree.expandRow(overviewTree.getRowForPath(p));\r\n\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "private void createTree() {\n DefaultMutableTreeNode topNode = new DefaultMutableTreeNode(\"The World\");\n myTree = new JTree(topNode);\n\n DefaultMutableTreeNode mainPortNode = new DefaultMutableTreeNode(\"Sea Ports\");\n topNode.add(mainPortNode);\n\n for(SeaPort mySeaPort : world.getPorts()) {\n DefaultMutableTreeNode individualPortNode = new DefaultMutableTreeNode(mySeaPort.getName());\n mainPortNode.add(individualPortNode);\n\n DefaultMutableTreeNode peopleNode = new DefaultMutableTreeNode(\"People\");\n individualPortNode.add(peopleNode);\n for(Person myPerson : mySeaPort.getPersons()) {\n DefaultMutableTreeNode individualPeopleNode = new DefaultMutableTreeNode(myPerson.getName());\n peopleNode.add(individualPeopleNode);\n }\n\n DefaultMutableTreeNode dockNode = new DefaultMutableTreeNode(\"Docks\");\n individualPortNode.add(dockNode);\n for(Dock myDock : mySeaPort.getDocks()) {\n DefaultMutableTreeNode individualDockNode = new DefaultMutableTreeNode(myDock.getName());\n dockNode.add(individualDockNode);\n if(myDock.getShip() != null) {\n DefaultMutableTreeNode dockedShip = new DefaultMutableTreeNode(myDock.getShip().getName());\n individualDockNode.add(dockedShip);\n for(Job myJob : myDock.getShip().getJobs()) {\n DefaultMutableTreeNode dockedShipJob = new DefaultMutableTreeNode(myJob.getName());\n dockedShip.add(dockedShipJob);\n }\n }\n }\n\n DefaultMutableTreeNode portQueNode = new DefaultMutableTreeNode(\"Ship Queue\");\n individualPortNode.add(portQueNode);\n for(Ship myShip : mySeaPort.getQue()) {\n DefaultMutableTreeNode quedShip = new DefaultMutableTreeNode(myShip.getName());\n portQueNode.add(quedShip);\n for(Job myJob : myShip.getJobs()) {\n DefaultMutableTreeNode quedShipJob = new DefaultMutableTreeNode(myJob.getName());\n quedShip.add(quedShipJob);\n }\n }\n\n } //end of initial for loop inside createTree() method\n\n /*This method call is added in case a user reads a new data file after they\n have already read one or more data files.\n */\n myTreePanel.removeAll();\n\n //Add everything to the myTreePanel\n JScrollPane myTreeScroll = new JScrollPane(myTree);\n myTreePanel.add(myTreeScroll, BorderLayout.CENTER);\n validate();\n }", "private void createTree() {\n\n // custom brown color\n Color brown = new Color(149, 99, 57);\n\n // trunk\n NscComponent trunk = new NscRectangle(49, 164, 13, 51);\n createShape(trunk, brown, true);\n\n // branches\n drawLine(50, 125, 50, 165, 10, brown);\n drawLine(25, 125, 50, 165, 10, brown);\n drawLine(75, 125, 50, 165, 10, brown);\n\n // branch outlines\n drawLine(49, 125, 49, 150, 1, Color.black);\n drawLine(60, 125, 60, 150, 1, Color.black);\n drawLine(24, 125, 49, 165, 1, Color.black);\n drawLine(35, 125, 50, 150, 1, Color.black);\n drawLine(85, 125, 60, 165, 1, Color.black);\n drawLine(74, 125, 60, 150, 1, Color.black);\n\n // leafs\n NscEllipse leafs2 = new NscEllipse(0, 5, 60, 122);\n NscEllipse leafs3 = new NscEllipse(50, 5, 60, 122);\n NscEllipse leafs = new NscEllipse(25, 0, 60, 127);\n NscEllipse leafs4 = new NscEllipse(25, 1, 60, 124);\n createShape(leafs2, treeColor, true);\n createShape(leafs3, treeColor, true);\n createShape(leafs, treeColor, true);\n createShape(leafs4, treeColor, false);\n\n repaint();\n }", "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}", "private void createNodes( DefaultMutableTreeNode top ) {\n DefaultMutableTreeNode leaf = null;\n \n leaf = new DefaultMutableTreeNode( new treeInfo(\"Insert Transaction\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Item\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Report\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Employee\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Suplier\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Salesman\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Customer\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Commisioner\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Edit Transaction\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Producer\"));\n top.add(leaf);\n }", "private void fillTreeView() {\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy\");\n Start.setText(format.format(start));\n End.setText(format.format(end));\n if (makeCalendarByDays()) {\n TreeItem<String> rootItem = new TreeItem<>(\"Root\",null);\n rootItem.setExpanded(true);\n for (Date date: calendarByDays.keySet()) {\n TreeItem<String> day = new TreeItem<>(format.format(date));\n for (Date dateTime : calendar.keySet()) {\n if (date.getTime() <= dateTime.getTime()\n && dateTime.getTime() < (date.getTime() + 3600000 * 24)) {\n for (String task : calendar.get(dateTime)) {\n String taskToPut = task.substring(0, task.indexOf(\", a\"));\n TreeItem<String> taskItem = new TreeItem<>(taskToPut);\n day.getChildren().add(taskItem);\n }\n }\n }\n if (day.getChildren().size() != 0)\n rootItem.getChildren().add(day);\n }\n calendarTreeView.setRoot(rootItem);\n calendarTreeView.setShowRoot(false);\n calendarTreeView.refresh();\n }\n }", "public void createChild (GenericTreeNode<String> daddy)\r\n\t{\r\n\t\t\tList < GenericTreeNode<String> > child= daddy.getChildren();\r\n\t\t\r\n\t\tif (daddy.getData().equalsIgnoreCase(\"next.CommonProfile.Dashboard_SI\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Admin.Admin_Principal\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Client.Client_Principal\"));\t\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Member.Member_Principal\"));\t\r\n\t\t}\r\n\t\telse if (daddy.getData().equalsIgnoreCase(\"next.CommonProfile.Dashboard_SU\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\t//child.add(new GenericTreeNode<String>(\"next.CommonProfile.DashboardPrincipal\"));\t\r\n\t\t}\r\n\t\telse if (daddy.getData().equalsIgnoreCase(\"next.Admin.Admin_Principal\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.CommonProfile.PersonalInfo\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.CommonProfile.Products\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Admin.Business_Rules\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.view.support.CustomList\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t}\r\n\t\telse if (daddy.getData().equalsIgnoreCase(\"next.view.support.CustomList\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.MapsFunctionality\"));\r\n\t\t\t\r\n\t\t}else if (daddy.getData().equalsIgnoreCase(\"next.SupportFunctionality.MapsFunctionality\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tdaddy.setChildren(child);\r\n\t\t for (GenericTreeNode<String> node : daddy.getChildren()) {\r\n\t\t\t createChild (node);\r\n\t }\r\n\t}", "public void populateTreeTable() {\n root = new DefaultTreeNode(\"root\", null);\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n String sqlMenu = \"SELECT o from Tblobjeto o WHERE o.tipoObjeto LIKE 'menu' ORDER BY o.idObjeto\";\n menus = session.createQuery(sqlMenu).list();\n\n for (Tblobjeto mnu : menus) {\n TreeNode nodeMenu = new DefaultTreeNode(mnu, root);\n nodes.add(nodeMenu);\n\n Criteria cMenu = session.createCriteria(Tblobjeto.class);\n cMenu.add(Restrictions.eq(\"tblobjeto\", mnu));\n subMenus = (List<Tblobjeto>) cMenu.list();\n\n for (Tblobjeto smnu : subMenus) {\n TreeNode nodeSubMenu = new DefaultTreeNode(smnu, nodeMenu);\n nodes.add(nodeSubMenu);\n\n Criteria cSubMenu = session.createCriteria(Tblobjeto.class);\n cSubMenu.add(Restrictions.eq(\"tblobjeto\", smnu));\n acciones = (List<Tblobjeto>) cSubMenu.list();\n\n for (Tblobjeto ac : acciones) {\n nodes.add(new DefaultTreeNode(ac, nodeSubMenu));\n }\n }\n }\n } catch (HibernateException e) {\n logger.throwing(getClass().getName(), \"ObjetosBean\", e);\n } finally {\n session.close();\n }\n }", "protected void createTree() {\n\n\t\tint nextPlayer = opponent;\n\n\t\tQueue<Node> treeQueue = new LinkedList<Node>();\n\t\tWinChecker winCheck = new WinChecker();\n\n\t\ttreeQueue.add(parent);\n\n\t\twhile (!treeQueue.isEmpty()) {\n\t\t\tNode currentNode = treeQueue.poll();\n\n\t\t\tif (currentNode.getMove().Row != -1\n\t\t\t\t\t&& currentNode.getMove().Col != -1) {\n\t\t\t\tgb.updateBoard(currentNode.getMove());\n\n\t\t\t\tif (winCheck.getWin(gb) >= 0) {\n\t\t\t\t\tgb.revertBoard(currentNode.getMove());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tgb.revertBoard(currentNode.getMove());\n\t\t\t}\n\n\t\t\t// Restricting the depth to which we will create the tree\n\t\t\tif (currentNode.getPly() > 2) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor (List<Hexagon> tempList : this.gb.getBoard()) {\n\t\t\t\tfor (Hexagon tempHex : tempList) {\n\n\t\t\t\t\tif (tempHex == null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tempHex.getValue() == EMPTY) {\n\n\t\t\t\t\t\tif (currentNode.getPly() % 2 == 0) {\n\t\t\t\t\t\t\tnextPlayer = opponent;\n\t\t\t\t\t\t} else if (currentNode.getPly() % 2 == 1) {\n\t\t\t\t\t\t\tnextPlayer = player;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tMove nextMove = new Move(nextPlayer, false,\n\t\t\t\t\t\t\t\ttempHex.getRow(), tempHex.getColumn());\n\n\t\t\t\t\t\tNode newNode = new Node(currentNode.getPly() + 1,\n\t\t\t\t\t\t\t\tnextMove);\n\t\t\t\t\t\tnewNode.setParent(currentNode);\n\n\t\t\t\t\t\tcurrentNode.children.add(newNode);\n\n\t\t\t\t\t\ttreeQueue.add(newNode);\n\t\t\t\t\t\ttempHex.setValue(EMPTY);\n\t\t\t\t\t}// End of if statement\n\n\t\t\t\t}// End of inner ForLoop\n\t\t\t}// End of outer ForLoop\n\n\t\t\t// currentNode.printChildren();\n\n\t\t}// End of While Loop\n\n\t}", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "private TreeNode createTree() {\n // Map<String, String> map = new HashMap<>();\n // map.put(\"dd\", \"qq\");\n // 叶子节点\n TreeNode G = new TreeNode(\"G\");\n TreeNode D = new TreeNode(\"D\");\n TreeNode E = new TreeNode(\"E\", G, null);\n TreeNode B = new TreeNode(\"B\", D, E);\n TreeNode H = new TreeNode(\"H\");\n TreeNode I = new TreeNode(\"I\");\n TreeNode F = new TreeNode(\"F\", H, I);\n TreeNode C = new TreeNode(\"C\", null, F);\n // 构造根节点\n TreeNode root = new TreeNode(\"A\", B, C);\n return root;\n }", "private CategoryView buildComplicatedExpectedTree() {\n\n CategoryView root = new CategoryView(\"ROOT\");\n CategoryView a = new CategoryView(\"a\");\n CategoryView b = new CategoryView(\"b\");\n CategoryView c = new CategoryView(\"c\");\n CategoryView d = new CategoryView(\"d\");\n CategoryView e = new CategoryView(\"e\");\n\n root.addChild(a);\n root.addChild(e);\n root.addChild(new CategoryView(\"f\"));\n root.addChild(new CategoryView(\"g\"));\n root.addChild(new CategoryView(\"z\"));\n a.addChild(b);\n b.addChild(c);\n a.addChild(c);\n c.addChild(d);\n d.addChild(e);\n c.addChild(e);\n\n root.addChild(new CategoryView(\"1\") {{\n addChild(new CategoryView(\"2\") {{\n addChild(new CategoryView(\"3\"));\n }});\n }});\n root.addChild(new CategoryView(\"x\") {{\n addChild(new CategoryView(\"y\"));\n }});\n\n return root;\n }", "private static void createTree(TreeItem<FilePath> rootItem) throws IOException {\n\n try (DirectoryStream<Path> directoryStream = Files\n .newDirectoryStream(rootItem.getValue().getPath())) {\n\n for (Path path : directoryStream) {\n TreeItem<FilePath> newItem = new TreeItem<FilePath>(new FilePath(path));\n newItem.setExpanded(true);\n\n rootItem.getChildren().add(newItem);\n\n if (Files.isDirectory(path)) {\n createTree(newItem);\n }\n }\n } catch (AccessDeniedException ignored) {\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "protected static DefaultMutableTreeNode getDefaultTreeModel()\n {\n // New root node\n DefaultMutableTreeNode root =\n new DefaultMutableTreeNode(\"Root\");\n \n // First level\n for (int i = 1; i <= 5; i++)\n {\n // New node\n DefaultMutableTreeNode folder =\n new DefaultMutableTreeNode(\"Folder-\" + i);\n \n // Add node to root\n root.add(folder);\n \n // Second level\n for (int j = 1; j <= 3; j++)\n {\n // New node\n DefaultMutableTreeNode subfolder =\n new DefaultMutableTreeNode(\"Subfolder-\" + j);\n \n // Add node to parent node\n folder.add(subfolder);\n \n // Third level\n for (int k = 1; k <= 3; k++)\n {\n // New anchor\n A a = new A(\"http://jakarta.apache.org\");\n a.setTarget(\"target\").addElement(\"Document-\" + k);\n \n // New node (leaf)\n DefaultMutableTreeNode document =\n new DefaultMutableTreeNode(a.toString());\n \n // Add node to parent node\n subfolder.add(document);\n }\n }\n }\n \n // Return root node\n return root;\n }", "protected void buildTree(JSONArray level, TreeNode relativeRoot){\n\t\tint elements = level.size();\n\t\tJSONObject split;\n\t\tJSONArray sub_trees;\n\t\tfor(int node = 0; node < elements; node++){\n\t\t\tTreeNode create = new TreeNode();\n\t\t\tsplit = (JSONObject)(level.get(node));\n\t\t\tcreate.type = (String)split.get(\"type\");\n\t\t\tcreate.attribute = (String)split.get(\"attribute\");\n\t\t\tcreate.operator = (String)split.get(\"operator\");\n\t\t\tif(create.type.compareTo(\"node\") == 0){\n\t\t\t\tcreate.nom_value = (String)split.get(\"value\");\n\t\t\t\tcreate.children = null;\n\t\t\t\trelativeRoot.children.add(create);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(create.type.compareTo(\"nominal\") == 0)\n\t\t\t\tcreate.nom_value = (String)split.get(\"value\");\n\t\t\telse if(create.type.compareTo(\"numerical\") == 0)\n\t\t\t\tcreate.num_value = Double.parseDouble((String)split.get(\"value\"));\n\t\t\t\n\t\t\tsub_trees = (JSONArray)split.get(\"subtree\");\n\t\t\tbuildTree(sub_trees,create);\n\t\t\trelativeRoot.children.add(create);\n\t\t}\n\t}", "private Pane createSubTree(int level, File directory) {\n\t\tVBox dirNameBox = new VBox();\n\t\t\n\t\tdouble maxPaneHeight = 0;\n\t\tdouble totalArea = 0;\n\t\tdouble totalPanesHeight = 0;\n\t\tdouble totalPanesWidth = 0;\n\n\t\tArrayList<Pane> panes = new ArrayList<Pane>();\n\t\t\n\t\t// Add label\n\t\tLabel newLabel = new Label(directory.getName());\n\t\tnewLabel.setFont(Font.font(\"System\", FontWeight.BOLD, 8.0f));\n\t\t//newLabel.setBackground(new Background(new BackgroundFill(Color.CORNFLOWERBLUE, CornerRadii.EMPTY, Insets.EMPTY)));\n\n\t\t//nodes.add(newLabel);\t\t\n\t\tdirNameBox.getChildren().add(newLabel);\n\t\t\n\t\t\n\t\tPane dirPane;\n\t\tif (level % 2 == 0) {\n\t\t\tdirPane = new VBox();\n\t\t\t// Setting the spacing between the nodes\n\t\t\t((VBox)dirPane).setSpacing(gap);\n\t\t\t((VBox)dirPane).setAlignment(Pos.TOP_LEFT); \t\t\n\t\t} else {\n\t\t\tdirPane = new HBox();\n\t\t\t// Setting the spacing between the nodes\n\t\t\t((HBox)dirPane).setSpacing(gap);\n\t\t\t((HBox)dirPane).setAlignment(Pos.TOP_LEFT); \t\t\n\t\t}\n\t\tdirNameBox.getChildren().add(dirPane);\n\t\t\n\t\t\t\t\n\t\tint numSubDirs = 0;\n\t\tString[] subFilesAndDirectories = directory.list(new FilenameFilter() {\n\t\t public boolean accept(File dir, String name) {\n\t\t \tif (fileExtensionFilter == null || fileExtensionFilter.length == 0 ) {\n\t\t \t\t// No Filter defined\n\t\t \t\treturn true;\n\t\t \t} else {\n\t\t\t \t// check if file extension is in the list of allowed extensions\n\t\t\t return Arrays.stream(fileExtensionFilter).anyMatch(FilenameUtils.getExtension(name.toLowerCase())::equals);\n\t\t \t}\n\t\t };\n\t\t});\t\n\n\t\tfor (String fileOrDirectoryName : subFilesAndDirectories) {\n\t\t\t\n\t\t\tFile fileOrDirectory = new File(directory, fileOrDirectoryName);\n\t\t\t\n\t\t\tif (fileOrDirectory.isDirectory()) {\n\t\t\t\tpanes.add(createSubTree(level++, fileOrDirectory));\n\t\t\t\tnumSubDirs++;\n\t\t\t} else {\n\t\t\t\tif (showFiles) {\n\t\t\t\t\tpanes.add(createFilePane(fileOrDirectory));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tdirNameBox.setSpacing(0);\n\t\t\n\t\tif (usePadding) {dirPane.setPadding(new Insets(gap,gap,gap,gap));}\n\t\t\n\t\tdirNameBox.setPadding(new Insets(1,1,1,1));\n\n\t\t//flowPane.autosize();\n\t\t\n\t\t// Alignments\n\t\tdirNameBox.setAlignment(Pos.TOP_LEFT); \n\n\t\tif (showRandomDirectoryBackgroundColor) {\n\t\t\tdirNameBox.setStyle(\"-fx-background-color: rgba(\" + (randomizer.nextInt(155) + 100) +\n\t\t\t\t\t\", \" + (randomizer.nextInt(155) + 100) + \", \" + (randomizer.nextInt(155) + 100) + \", \" +\n\t\t\t\t\t1 + \"); -fx-background-radius: 10;\");\n\t\t} else {\n//\t\t\tvBox.setStyle(\"-fx-background-color: rgba(\" + 255 + \", \" + 255 + \", \" + 255 + \", \" + 0\n//\t\t\t\t\t+ \"); -fx-background-radius: 10; \" + (showBorder ? \"-fx-border-color: gray\" : \"\")\n//\t\t\t);\n\t\t\tdirNameBox.setStyle(\"-fx-background-color: rgba(\" + 240 + \", \" + 240 + \", \" + 240 + \", \" + 1\n\t\t\t\t\t+ \"); -fx-background-radius: 10; \" + (showBorder ? \"-fx-border-color: gray\" : \"\")\n\t\t\t);\n\n\t\t}\n\n\t\tdirPane.setStyle(\"-fx-background-color: rgba(\" + 255 + \", \" + 255 + \", \" + 255 + \", \" + 0.5f\n\t\t\t\t+ \"); -fx-background-radius: 10; \" // + (showBorder ? \"-fx-border-color: blue; -fx-border-style: dotted;\" : \"\")\n\t\t);\n\n\t\t\n\t\t// Retrieving the childrens list of the parent pane\n\t\tObservableList<Node> list = dirPane.getChildren();\n\t\t\n\t\t// Adding all the nodes to the parent pane\n\t\tfor (Pane pane : panes) {\n\n\t\t\tlist.add(pane);\n\t\t\t\n\t\t\tdouble currentHeight = \n\t\t\t\t\t(pane instanceof VBox ? ((VBox)pane).getPrefHeight() + \n\t\t\t\t\t\t\t\t\t\t\t\t(showBorder ? 2 : 0) /*top + bottom border*/ + \n\t\t\t\t\t\t\t\t\t\t\t\t(usePadding ? 2 * gap : 0) /*padding*/ \n\t\t\t\t\t: (pane instanceof Pane ? ((Pane)pane).getPrefHeight() : 12 /*label*/)\n\t\t\t);\n\t\t\tdouble currentWidth = \n\t\t\t\t\t(pane instanceof HBox ? ((HBox)pane).getPrefHeight() + \n\t\t\t\t\t\t\t\t\t\t\t\t(showBorder ? 2 : 0) /*top + bottom border*/ + \n\t\t\t\t\t\t\t\t\t\t\t\t(usePadding ? 2 * gap : 0) /*padding*/ \n\t\t\t\t\t: (pane instanceof Pane ? ((Pane)pane).getPrefWidth() : 12 /*label*/)\n\t\t\t);\n\t\t\tmaxPaneHeight = Math.max(maxPaneHeight, currentHeight);\n\t\t\ttotalPanesHeight += currentHeight;\n\t\t\ttotalPanesWidth += currentWidth;\n\t\t\ttotalArea += pane.getPrefHeight() * pane.getPrefWidth();\n//\t\t\tSystem.out.println((p instanceof FlowPane ? \"Folder\" : \"File\") + \": \" + ((Label)p.getChildren().get(0)).getText() + \n//\t\t\t\t\t\" p.PrefHeight: \" + p.getPrefHeight() + \" p.PrefWidth: \" + p.getPrefWidth() + \n//\t\t\t\t\t\" p.Height: \" + p.getHeight() + \" p.Width: \" + p.getWidth() +\n//\t\t\t\t\t(p instanceof FlowPane ? \" p.PrefWrap: \" + ((FlowPane)p).getPrefWrapLength() : \"\") +\n//\t\t\t\t\t\" totalHeight: \" + totalPanesHeight);\n\t\t}\n\t\t\t\n\t\t// height of squared total area\n\t\tdouble areaHeight = Math.sqrt(totalArea) * transformFactor;\n\t\tdouble prefHeight = Math.max(areaHeight, maxPaneHeight);\n\t\t\n\t\tprefHeight = Math.min(totalPanesHeight, areaHeight);\n\t\t\n//\t\t// Setting preferred heights\n//\t\t((VBox)dirPane).setPrefHeight(\n//\t\t\t\ttotalPanesHeight\n//\t\t\t\t+ (panes.size() - 1) * gap /*gaps*/\n//\t\t\t\t// + 2 /*border*/\n//\t\t); \t\n\t\t\n//\t\tvBox.setPrefWrapLength(flowPane.getPrefWrapLength() + \n//\t\t\t\t12 /*label height*/ + \n//\t\t\t\t(showBorder ? 2 : 0) /*border around childFlowPane*/ +\n//\t\t\t\t(usePadding ? 2 * gap : 0) /*padding*/\n//\t\t\t\t);\n\n\t\t\t\n\t\tbindTooltip(dirNameBox, tooltip);\n\t\tbindTooltip(dirPane,tooltip);\n\t\tbindTooltip(newLabel, tooltip);\n\n\t\treturn dirNameBox;\n\t}", "public static void builtTree\n ( ArrayList<DefaultMutableTreeNode> treeArray , \n int recursion , DefaultMutableTreeNode selected , \n boolean enableDirs , boolean enableFiles )\n {\n int m;\n if (recursion<0) { m = DEFAULT_RECURSION_LIMIT; }\n else { m = recursion; }\n for ( int k=0; k<m; k++ )\n {\n boolean request = false;\n // Start cycle for entries\n int n = treeArray.size();\n for ( int i=0; i<n; i++ )\n {\n DefaultMutableTreeNode x1 = treeArray.get(i);\n // Support selective mode, skip if not selected\n if ( (selected != null) & ( selected != x1 ) ) continue;\n // Analyse current entry, skip if already handled\n ListEntry x2 = (ListEntry)x1.getUserObject();\n if ( x2.handled == true ) continue;\n request = true;\n x2.failed = false;\n // Start handling current entry\n String x3 = x2.path;\n File file1 = new File( x3 );\n boolean exists1 = file1.exists();\n boolean directory1=false;\n if (exists1) { directory1 = file1.isDirectory(); }\n // Handling directory: make list of childs directories/files\n if ( exists1 & directory1 )\n {\n String[] list = file1.list();\n int count=0;\n if ( list != null ) count = list.length;\n for ( int j=0; j<count; j++ )\n {\n String s1 = list[j];\n String s2 = x3+\"/\"+s1;\n File file2 = new File(s2);\n boolean dir = file2.isDirectory();\n if ( ( enableDirs & dir ) | ( enableFiles & !dir ) )\n {\n ListEntry y1 = \n new ListEntry ( s1, \"\", s2, false, false );\n DefaultMutableTreeNode y2 = \n new DefaultMutableTreeNode( y1 );\n treeArray.add( y2 );\n x1.add( y2 );\n x1.setAllowsChildren( true ); // this entry is DIRECTORY\n }\n }\n }\n // Handling file: read content\n if ( exists1 & !directory1 )\n {\n int readSize = 0;\n //\n StringBuilder data = new StringBuilder(\"\");\n FileInputStream fis;\n byte[] array = new byte[BUFFER_SIZE];\n try \n { \n fis = new FileInputStream(file1);\n readSize = fis.read(array); \n fis.close();\n }\n catch ( Exception e ) \n // { data = \"N/A : \" + e; x2.failed=true; }\n { data.append( \"N/A : \" + e ); x2.failed = true; }\n char c1;\n for (int j=0; j<readSize; j++)\n { \n c1 = (char)array[j];\n // if ( (c1=='\\n') | (c1=='\\r') ) { data = data + \" \"; }\n if ( ( c1 == '\\n' ) | (c1 == '\\r' ) ) { data.append( \" \" ); }\n else \n { \n if ( ( c1 < ' ' )|( c1 > 'z' ) ) { c1 = '_'; }\n // data = data + c1;\n data.append( c1 );\n }\n }\n x2.name2 = data.toString();\n x2.leaf = true;\n x1.setAllowsChildren( false ); // this entry is FILE\n }\n // End cycle for entries\n x2.handled = true;\n }\n // End cycle for recursion\n if (request==false) break;\n }\n }", "@AutoGenerated\r\n\tprivate Panel buildTreePanel()\r\n\t{\n\t\ttreePanel = new Panel();\r\n\t\ttreePanel.setImmediate(false);\r\n\t\ttreePanel.setWidth(\"100.0%\");\r\n\t\ttreePanel.setHeight(\"100.0%\");\r\n\t\t\r\n\t\t// panelVerticalLayout\r\n\t\tpanelVerticalLayout = buildPanelVerticalLayout();\r\n\t\ttreePanel.setContent(panelVerticalLayout);\r\n\t\t\r\n\t\treturn treePanel;\r\n\t}", "private ObservableList<TreeItem<Path>> buildChildren() {\r\n if (Files.isDirectory(getValue())) {\r\n try {\r\n\r\n return Files.list(getValue())\r\n .map(FileTreeItem::new)\r\n .collect(Collectors.toCollection(() -> FXCollections.observableArrayList()));\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return FXCollections.emptyObservableList();\r\n } \r\n }\r\n\r\n return FXCollections.emptyObservableList();\r\n }", "private TreeItem<File> buildTree(model.Node node, TreeItem<File> parent) throws IOException {\n // set the root of the tree\n TreeItem<File> root = new TreeItem<>(node.getDir().getFile());\n // show all subdirectories and photos by default\n root.setExpanded(true);\n // set all photos under the directory as the child TreeItem of this directory\n for (model.Photo photo : node.getDir().getPhotos()) {\n root.getChildren().add(new TreeItem<>(photo.getFile()));\n if (!model.PhotoManager.getPhotos().contains(photo)) {\n model.PhotoManager.addPhoto(photo);\n }\n }\n // set all subdirectories of this directory as the child TreeItem\n for (Object child : node.getChildren()) {\n model.Node subDir = (model.Node) child;\n buildTree(subDir, root);\n }\n if (parent == null) {\n return root;\n } else {\n parent.getChildren().add(root);\n }\n return null;\n }", "public void createNode()\r\n\t{\r\n\t\tTreeNode first=new TreeNode(1);\r\n\t\tTreeNode second=new TreeNode(2);\r\n\t\tTreeNode third=new TreeNode(3);\r\n\t\tTreeNode fourth=new TreeNode(4);\r\n\t\tTreeNode fifth=new TreeNode(5);\r\n\t\tTreeNode sixth=new TreeNode(6);\r\n\t\tTreeNode seventh=new TreeNode(7);\r\n\t\tTreeNode eight=new TreeNode(8);\r\n\t\tTreeNode nine=new TreeNode(9);\r\n\t\troot=first;\r\n\t\tfirst.left=second;\r\n\t\tfirst.right=third;\r\n\t\tsecond.left=fourth;\r\n\t\tthird.left=fifth;\r\n\t\tthird.right=sixth;\r\n\t\tfifth.left=seventh;\r\n\t\tseventh.right=eight;\r\n\t\teight.left=nine;\r\n\t\t\r\n\t}", "public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic void initTreeView(int index){\n\t treeView.setCellFactory(new Callback<TreeView<JTable>, TreeCell<JTable>>() {\r\n\r\n\t @Override\r\n\t public TreeCell<JTable> call(TreeView<JTable> jt) {\r\n\r\n\t \treturn new TreeCell<JTable>(){\r\n\r\n\t @Override\r\n\t protected void updateItem(JTable f, boolean empty) {\r\n\t \tsuper.updateItem(f, empty);\r\n\t \tif(empty){\r\n\t setText(null);\r\n\t setGraphic(null);\r\n\t }else{\r\n\t setText(f.getName());\r\n\t setGraphic(null);\r\n\t setOnMouseClicked((MouseEvent t) -> {\r\n\t \t//当前节点是子节点的时候,生成表格stage\r\n\r\n\t \tif(getChildren().size() == 1){\r\n\t \t\tif (t.getClickCount() == 1) {\r\n//\t\t \t\t \tDialogs.create()\r\n//\t\t \t\t .owner(Main.stage)\r\n//\t\t \t\t .title(\"提示\")\r\n//\t\t \t\t .masthead(\"提示\")\r\n//\t\t \t\t .message(\"弹出表格信息窗口\")\r\n\t//\r\n//\t\t \t\t .showInformation();\r\n\t\t \t\t//跳转至表格页面\r\n\t\t \t\tStage stage = new Stage();\r\n\t\t \t\t//stage.setTitle(f.getName());\r\n\t\t \t\t\tAnchorPane root = null;\r\n\t\t \t\t\tSpringFxmlLoader loader = new SpringFxmlLoader();\r\n\t\t\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\t\t\troot = (AnchorPane) loader.springLoad(\"view/tableView.fxml\", Main.class);\r\n\r\n\r\n\t\t\t TableController controller = loader.getController();\r\n\t\t\t controller.setStage(stage);\r\n\t\t\t controller.setTableName(f.getNameEn());\r\n\t\t\t controller.setChildFlag(false);\r\n\t\t\t controller.selectTable(\" where 1=1 \");\r\n\r\n\t\t\t Scene scene = new Scene(root);\r\n\t\t\t stage.setScene(scene);\r\n\t\t\t log.info(\"--弹出表\" + f.getName() + \"--\");\r\n\t\t\t stage.show();\r\n\t\t\t Integer total = tableService.getTotal(f.getNameEn(), \" where 1 =1 \");\r\n\t\t\t String title = f.getName() + \"[\" + f.getNameEn() + \"]\" + \"[\" + total + \"]\";\r\n\r\n\t\t\t //如果是几个汉化表的编辑,添加说明\r\n\t\t\t if(StaticData.translate_col_name.equalsIgnoreCase(f.getNameEn()) ||\r\n\t\t\t \t\tStaticData.translate_content_name.equalsIgnoreCase(f.getNameEn()) ||\r\n\t\t\t \t\tStaticData.translate_table_name.equalsIgnoreCase(f.getNameEn())){\r\n\t\t\t \tString tips = \"(*系统默认10分钟刷新一次汉化信息,若使汉化编辑立即生效,可点击刷新汉化按钮)\";\r\n\t\t\t \ttitle += tips;\r\n\t\t\t }\r\n\r\n\t\t\t stage.setTitle(title);\r\n\t\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\t\t\tlog.error(e.getStackTrace());\r\n\t\t\t\t\t\t\t\t\t\t\t\tlog.error(e.getMessage());\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogTools.error(\"错误\", \"出错了!\", \"查询表单数据出错!\");\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t \t\t }\r\n\t \t}\r\n\r\n\t } );\r\n\r\n\t }\r\n\t }\r\n\r\n\t };\r\n\t }\r\n\t });\r\n\r\n\t treeView.setRoot(StaticData.treeItemMap.get(index));\r\n\r\n\t }", "private TreeModel getTreeValues(){\r\n \r\n DefaultMutableTreeNode parent;\r\n DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(\"Components\");\r\n String[] nodes = null;\r\n \r\n parent = rootNode;\r\n \r\n for(Netlist nl: netlists){\r\n for(String s: nl.keySet()){\r\n nodes = s.split(\"\\\\.\");\r\n parent = rootNode;\r\n \r\n // Due to structure of keys, the tree is produced depth-first\r\n for(int i=0; i<nodes.length; i++){\r\n // Create a new node for this sub category\r\n DefaultMutableTreeNode mtn = new DefaultMutableTreeNode(nodes[i]);\r\n \r\n // Create the child nodes\r\n Enumeration children = parent.children();\r\n Boolean exists = false;\r\n while(children.hasMoreElements()){\r\n DefaultMutableTreeNode next = (DefaultMutableTreeNode) children.nextElement();\r\n \r\n // Check whether the next tree node already exists\r\n if(next.getUserObject().equals(mtn.getUserObject())){ \r\n exists = true;\r\n mtn = next;\r\n break;\r\n }\r\n }\r\n if(!exists){\r\n parent.add(mtn); \r\n }\r\n \r\n // We already have this node, move to the child\r\n parent = mtn; \r\n } \r\n } \r\n }\r\n return new DefaultTreeModel(rootNode);\r\n }", "public void fillTree(final Tree tree) {\r\n tree.setRedraw(true);\r\n List<Category> categories = ExampleManager.get().getCategories();\r\n List<Category> notPlacedCategories = new ArrayList<Category>();\r\n for (Category category : categories) {\r\n if (category.getParentId() == null) {\r\n TreeItem item = new TreeItem(tree, SWT.NONE);\r\n item.setText(category.getTitle());\r\n item.setData(category);\r\n } else {\r\n notPlacedCategories.add(category);\r\n }\r\n }\r\n\r\n for (Category cat : creatableCategories) {\r\n if (cat.getParentId() == null) {\r\n TreeItem item = new TreeItem(tree, SWT.NONE);\r\n item.setText(cat.getTitle());\r\n item.setData(cat);\r\n } else {\r\n notPlacedCategories.add(cat);\r\n }\r\n }\r\n\r\n // enable drawing\r\n tree.setRedraw(true);\r\n // subcategories.\r\n if (notPlacedCategories.size() > 0) {\r\n addCategory(Arrays.asList(tree.getItems()), tree.getItemCount(), notPlacedCategories,\r\n categories);\r\n }\r\n }", "@Override\r\n\tprotected Object createLowerView(Composite parent) {\n\t\tfTree = new Tree(parent, SWT.BORDER );\r\n\t\tfTree.addSelectionListener(new SelectionAdapter() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t// https://jira.jboss.org/browse/JBIDE-7107\r\n\t\t\t\t// update \"OK\" button enablement\r\n\t\t\t\tupdateOkState();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t \r\n\t\tfTreeViewer = new TreeViewer(fTree);\r\n\t\tfTreeViewer.setContentProvider( treeContentProvider );\r\n\t\tfTreeViewer.setLabelProvider(new ModelTreeLabelProvider());\r\n\t\tfTreeViewer.setInput ( null );\r\n\t\tfTreeViewer.setAutoExpandLevel( getAutoExpandLevel() );\r\n\t\t// end tree viewer for variable structure\r\n\t\tGridData data = new GridData(); \r\n\t data.grabExcessVerticalSpace = true;\r\n\t data.grabExcessHorizontalSpace = true;\r\n\t data.horizontalAlignment = GridData.FILL;\r\n\t data.verticalAlignment = GridData.FILL;\r\n\t data.minimumHeight = 200;\r\n\t fTree.setLayoutData(data);\r\n\t \r\n\t\treturn fTree;\r\n\t}", "public void initTreeModel() {\n\t\t\n\t}", "public void initTreeModel() {\n\t\t\n\t}", "private void crearTree(){\n tree= new Tree(\"PROGRAMAS\");\r\n tree.setImmediate(true);\r\n\r\n // Set tree to show the 'name' property as caption for items\r\n tree.setItemCaptionPropertyId(\"nombre\");\r\n \r\n tree.addValueChangeListener(e -> Notification.show(\"Value changed:\",String.valueOf(e.getProperty().getValue()),Type.TRAY_NOTIFICATION));\r\n\t}", "protected void buildHirarchyTree() {\r\n\t\tfor(SupplyZone s : supplyZoneLines){\r\n\t\t\tZoneNode currentZone = zoneNodeMap.get(s.getZoneName());\r\n\t\t\tZoneNode parentZone = zoneNodeMap.get(s.getParentZoneName());\r\n\t\t\tif(parentZone == null){\r\n\t\t\t\tzonesTreeRoot = currentZone;\r\n\t\t\t}\r\n\t\t\tcurrentZone.setParent(parentZone);\r\n\t\t\tif (parentZone != null) parentZone.addChild(currentZone); \r\n\t\t}\r\n\r\n\t}", "private JTree createTurnRundownTree(\n final LogDataHolder logData) {\n final DefaultMutableTreeNode root = new DefaultMutableTreeNode(logData.getLogName());\n\n for (final TurnInterval ti : logData.getTurnIntervalsSpent()) {\n final DefaultMutableTreeNode tiRoot = new DefaultMutableTreeNode(new TurnIntervalContainer(ti));\n for (final SingleTurn st : ti.getTurns()) {\n final DefaultMutableTreeNode stRoot = new DefaultMutableTreeNode(new SingleEncounterContainer(st));\n for (final Encounter e : st.getEncounters())\n stRoot.add(new DefaultMutableTreeNode(new SingleEncounterContainer(e)));\n\n tiRoot.add(stRoot);\n }\n\n root.add(tiRoot);\n }\n\n final JTree tree = new JTree(root);\n tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);\n tree.addTreeSelectionListener(new TreeSelectionListener() {\n public void valueChanged(\n final TreeSelectionEvent e) {\n final DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();\n\n if (node != null) {\n final Object nodeContents = node.getUserObject();\n if (nodeContents instanceof TurnContainer)\n dataPane.displayTurnEntityInfo(((TurnContainer) nodeContents).getTurnObject());\n else\n dataPane.setText(htmlLog);\n dataPane.setCaretPosition(0);\n }\n }\n });\n tree.setSelectionInterval(0, 0);\n\n return tree;\n }", "private DefaultTreeModel createTreeModel() {\n\t\t// create the root USA\n\t\tDefaultMutableTreeNode root = new DefaultMutableTreeNode(\"USA\");\n\n\t\t// First child is IOWA!\n\t\troot.add(new DefaultMutableTreeNode(\"Iowa\"));\n\n\t\t// other way to create a DefaultMutableTreeNode:\n\t\t// create an empty node and then add the user object\n\t\tDefaultMutableTreeNode newNode = new DefaultMutableTreeNode();\n\t\tnewNode.setUserObject(\"California\");\n\n\t\t// add a child to newNode\n\t\tnewNode.add(new DefaultMutableTreeNode(\"Sacramento\"));\n\n\t\t// add a sibling to Iowa (i.e. California)\n\t\troot.add(newNode);\n\n\t\t// create the model using the root of the tree\n\t\tDefaultTreeModel treeModel = new DefaultTreeModel(root);\n\n\t\t// ADD MODEL LISTENERS (changes/insertion/deletion of nodes)\n\t\ttreeModel.addTreeModelListener(createTreeModelListener());\n\t\treturn treeModel;\n\n\t}", "List<UmsMenuNode> treeList();", "private JScrollPane createTreeScrollPanel() {\n for (Map.Entry<VirtualFile, VcsRoot> entry : files.entrySet()) {\n createDirectoryNodes(entry.getKey(), entry.getValue());\n }\n\n final FileTreeRenderer renderer = new FileTreeRenderer();\n\n tree = new CheckboxTree(renderer, root);\n tree.setCellRenderer(renderer);\n tree.setRootVisible(true);\n tree.setShowsRootHandles(false);\n UIUtil.setLineStyleAngled(tree);\n TreeUtil.installActions(tree);\n\n final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(tree);\n scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n TreeUtil.expandAll(tree);\n\n tree.getModel().addTreeModelListener(treeModelListener);\n treeExpander = new DefaultTreeExpander(tree);\n\n return scrollPane;\n }", "private JTree makeCatalogTree() {\n\t\t\n\t\ttree_root = new DefaultMutableTreeNode(\"all photos\");\n\t\ttree_root.setUserObject(root);\n\t\t\n\t\tfinal JTree tree = new JTree(tree_root);\n\t\ttree.setMinimumSize(new Dimension(200,400));\n\n\t\ttree.setToggleClickCount(3); // so that we can use double-clicks for previewing instead of expanding/collapsing\n\n\t\tDefaultTreeSelectionModel selectionModel = new DefaultTreeSelectionModel();\n\t\tselectionModel.setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);\n\t\ttree.setSelectionModel(selectionModel);\n\t\t\n\t\ttree.addMouseListener(new MouseInputAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t// if left-double-click @@@changed =2 to ==1\n\t\t\t\tif (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {\n\t\t\t\t\tDefaultMutableTreeNode tempNode = getSelectedTreeNode();\n\t\t\t\t\tAlbum chosenAlbum =(Album) tempNode.getUserObject();\n\t\t\t\t\t\n\t\t\t\t\tpreviewPane.display(chosenAlbum);\n\t\t\t\t\t\n\t\t\t\t\t// YOUR CODE HERE\n\t\t\t\t\tSystem.out.println(\"show the photos for album \" + getSelectedTreeNode());\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\n\t\t\n\t\treturn tree;\n\t}", "public void placeTreeNodes() {\n int width;\n float rad;\n\n // Stores width and rad for convenience.\n width = MainActivity.getCanvas().getWidth();\n rad = AnimationParameters.NODE_RADIUS;\n\n // Places the Nodes.\n placeTreeNodes((int) (width / 2 + rad * 1.5), (int) (rad * 2),\n (int) (width - rad * 5), (int) AnimationParameters.depthLen);\n\n }", "protected DefaultMutableTreeNode createTreeNode( Node root, boolean showDetails )\n {\n DefaultMutableTreeNode dmtNode = null;\n\n String type = getNodeType(root);\n String name = root.getNodeName();\n String value = root.getNodeValue();\n\n if( showDetails )\n {\n dmtNode = new DefaultMutableTreeNode(\"[\"+type+\"] --> \"+name+\" = \"+value);\n }\n else\n {\n // Special case for TEXT_NODE, others are similar but not catered for here.\n dmtNode = new DefaultMutableTreeNode(\n root.getNodeType() == Node.TEXT_NODE ? value : name );\n }\n\n // Display the attributes if there are any\n NamedNodeMap attribs = root.getAttributes();\n if(attribs != null && showDetails )\n {\n for( int i = 0; i < attribs.getLength(); i++ )\n {\n Node attNode = attribs.item(i);\n String attName = attNode.getNodeName().trim();\n String attValue = attNode.getNodeValue().trim();\n\n if(attValue != null)\n {\n if (attValue.length() > 0)\n {\n dmtNode.add(new DefaultMutableTreeNode(\n \"[Attribute] --> \"+attName+\"=\\\"\"+attValue+\"\\\"\") );\n }\n }\n }\n }\n\n // If there are any children and they are non-null then recurse...\n if(root.hasChildNodes())\n {\n NodeList childNodes = root.getChildNodes();\n if(childNodes != null)\n {\n for (int k=0; k<childNodes.getLength(); k++)\n {\n Node nd = childNodes.item(k);\n if( nd != null )\n {\n // A special case could be made for each Node type.\n if( nd.getNodeType() == Node.ELEMENT_NODE )\n {\n dmtNode.add(createTreeNode(nd, showDetails));\n }\n\n // This is the default\n String data = nd.getNodeValue();\n if(data != null)\n {\n data = data.trim();\n if(!data.equals(\"\\n\") && !data.equals(\"\\r\\n\") &&\n data.length() > 0)\n {\n dmtNode.add(createTreeNode(nd, showDetails));\n }\n }\n }\n }\n }\n }\n return dmtNode;\n }", "private void recursiveCreateChildren(IFolder parentFolder, int depth) throws CoreException {\n \t\t//create TREE_WIDTH files\n \t\tfor (int i = 0; i < TREE_WIDTH; i++) {\n \t\t\tIFile file = parentFolder.getFile(createString(10));\n \t\t\tfile.create(new ByteArrayInputStream(createBytes(5000)), IResource.NONE, getMonitor());\n \t\t}\n \t\tif (depth <= 0)\n \t\t\treturn;\n \t\t//create TREE_WIDTH folders\n \t\tfor (int i = 0; i < TREE_WIDTH; i++) {\n \t\t\tIFolder folder = parentFolder.getFolder(createString(6));\n \t\t\tfolder.create(IResource.NONE, true, getMonitor());\n \t\t\trecursiveCreateChildren(folder, depth - 1);\n \t\t}\n \t}", "public void recomputeTree() {\n\t\tsuperRoot = factory.createTreeNode(null, this);\n\t\tlayoutToTree.put(null, superRoot);\n\t\tcreateTrees(context.getNodes());\n\t}", "List<TreeNodeDTO> genTree(boolean addNodeSize, boolean addRootNode, List<Long> disabledKeys);", "private void createTree (Object userObj, boolean showUserPrefs/*\n * , Object\n * systemObj,\n * boolean\n * showSystemPrefs\n */)\n {\n DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode (\"Preferences\");\n /*\n * if (showSystemPrefs) { rootNode.add(createSystemRootNode(systemObj));\n * //rootNode.add(createSystemNodeForPackage(systemObj)); }\n */\n if (showUserPrefs)\n {\n rootNode.add (createUserRootNode (userObj));\n // rootNode.add(createUserNodeForPackage(userObj));\n }\n DefaultTreeModel model = new DefaultTreeModel (rootNode);\n jTreePreferences = new JTree (model);\n TreeNode openmarkov = rootNode.getChildAt (0);\n // not shown color preferences in tree\n ((PreferenceTreeNode) openmarkov).removeChildAt (0);\n jTreePreferences.addTreeSelectionListener (new PrefTreeSelectionListener ());\n }", "private AlertTreeNode createTree() \n throws AlertException {\n\n AlertTreeNode res = null;\n\n AlertComponent.AlertProperty prop = null;\n AlertComponent compRoot = null;\n AlertComponent compNode = null;\n AlertTreeNode node = null;\n AlertTreeNode prevNode = null;\n\n //\n // 'root' node\n //\n prop = new AlertComponent.AlertProperty(\"root\", AlertType.COMPOSITE);\n compRoot = new AlertRoot(prop);\n res = new AlertTreeNode(compRoot, null);\n\n //\n // 'node' Node.\n // \n for (int i = 0; i < compRoot.getNbChildren(); i++) {\n \n prop = compRoot.getPropertyChild(i);\n compNode = compRoot.getPropertyValueComponent(prop.getName());\n node = new AlertTreeNode(compNode, res);\n if (prevNode == null) {\n res.setChild(node);\n } else {\n prevNode.setSibling(node);\n }\n prevNode = node;\n }\n return res;\n }", "public static TreeNode buildTree() {\n\t\t\n\t\tTreeNode root = new TreeNode(1);\n\t\t\n\t\tTreeNode left = new TreeNode(2);\n\t\tleft.left = new TreeNode(4);\n\t\tleft.right = new TreeNode(5);\n\t\tleft.right.right = new TreeNode(8);\n\t\t\n\t\tTreeNode right = new TreeNode(3);\n\t\tright.left = new TreeNode(6);\n\t\tright.right = new TreeNode(7);\n\t\tright.right.left = new TreeNode(9);\n\t\t\n\t\troot.left = left;\n\t\troot.right = right;\n\t\t\n\t\treturn root;\n\t}", "public void testBuildTreeDeepStructure() {\n TreeNode root = buildRootNodeFromFile(\"testWihManyLevels.js\");\n\n // Ensure the hierarchy is correct.\n assertEquals(\"suite1\", root.getNodeValue().getTestText());\n assertEquals(4, root.getChildCount());\n }", "@Override\r\n\tpublic JTree getJTree() {\r\n\t\tif (jTree == null) {\r\n\t\t\tjTree = new JLagerTree();\r\n\t\t\tjTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION );\r\n\t\t\tGenericNode root = new GenericNode(null);\r\n\t\t\tjTree.setModel(getTreeModel(root));\r\n\t\t\tjTree.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\r\n//\t\t\tjTree.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {\r\n//\t\t\t\tpublic void valueChanged(javax.swing.event.TreeSelectionEvent e) {\r\n//\t\t\t\t\ttreeValueChanged(e,BaugruppeTreePaneView.this.getJTree());\r\n////\t\t\t\t\tSystem.out.println(\"valueChanged()\"); // TODO Auto-generated Event stub valueChanged()\r\n//\t\t\t\t}\r\n//\t\t\t});\r\n//\t\t\tjTree.addTreeSelectionListener(getTreeSelectionListner());\r\n\t\t\t//Aussehen von JTree\r\n\t\t\tjTree.setCellRenderer(new AnfoderungTreeRenderer());\r\n\t\t\tjTree.setToolTipText(\"\");\r\n\t\t\t\r\n\t\t}\r\n\t\treturn jTree;\r\n\t}", "public Hierarchy() {\n treeModel = new DefaultTreeModel(topNode);\n treeModel.addTreeModelListener(new MyTreeModelListener());\n initComponents ();\n }", "private void expandTree() {\n for (int i=0; i<tree.getRowCount(); i++) {\n tree.expandRow(i);\n }\n }", "public TreeNode buildTree(ArrayList<TreeNode> nodes){\n // if empty arraylist\n if (nodes.size() == 0){\n return null;\n }\n // else\n TreeNode root = nodes.get(0);\n // Structure the tree\n for (int i = 0; i < nodes.size(); i++){\n if ((2*i+1) < nodes.size()){\n nodes.get(i).left = nodes.get(2*i+1);\n } else {\n nodes.get(i).left = null;\n }\n if ((2*i+2) < nodes.size()){\n nodes.get(i).right = nodes.get(2*i+2);\n } else {\n nodes.get(i).right = null;\n }\n }\n \n return root;\n }", "private void buildeAccessoryTree() {\n\t DefaultKingdeeTreeNode root = new DefaultKingdeeTreeNode(\"版模类型\");\r\n\t DefaultKingdeeTreeNode parentrNode = root;\r\n\t DefaultKingdeeTreeNode currentNode = null;\r\n\t \r\n//\t for(AccessoryTypeEnum s : AccessoryTypeEnum.getEnumList()){\r\n//\t\t\r\n//\t }\r\n\t List accessorylist =AccessoryTypeEnum.getEnumList();\r\n\t Class clz = AccessoryTypeEnum.class;\r\n\t for (int i=0;i<accessorylist.size();i++) {\r\n\t\tSystem.out.println(accessorylist.get(i));\r\n\t\tcurrentNode = new DefaultKingdeeTreeNode(accessorylist.get(i));\r\n\t\tcurrentNode.setUserObject(accessorylist.get(i));\r\n\r\n\t\tparentrNode.add(currentNode);\r\n\t }\r\n\t kDTree1.setModel(new KingdeeTreeModel(root));\r\n\t kDTree1.setSelectionNode(root);\r\n\t \r\n\t}", "private void loadInitialTree() {\n navTreeWidget.addItem( \"Please wait...\" );\n DeferredCommand.addCommand(new Command() {\n\t\t\tpublic void execute() {\n\t\t service.loadChildCategories( \"/\",\n\t\t new GenericCallback() {\n\n\n\t\t public void onSuccess(Object result) {\n\t\t selectedPath = null;\n\t\t navTreeWidget.removeItems();\n\n\t\t TreeItem root = new TreeItem();\n\t\t root.setHTML(\"<img src=\\\"images/desc.gif\\\"/>\");\n\t\t navTreeWidget.addItem(root);\n\n\t\t String[] categories = (String[]) result;\n\n\t\t if (categories.length == 0) {\n\t\t showEmptyTree();\n\t\t } else {\n\t\t hideEmptyTree();\n\t\t }\n\t\t for ( int i = 0; i < categories.length; i++ ) {\n\t\t TreeItem it = new TreeItem();\n\t\t it.setHTML( \"<img src=\\\"images/category_small.gif\\\"/>\" + categories[i] );\n\t\t it.setUserObject( categories[i] );\n\t\t it.addItem( new PendingItem() );\n\t\t root.addItem( it );\n\t\t }\n\n\t\t root.setState(true);\n\t\t }\n\n\n\n\t\t } );\n\t\t\t}}\n );\n\n }", "public GenerateJTree1() {\n UIManager.put(\"Tree.rendererFillBackground\", false);\n initComponents();\n BasicInternalFrameUI bifui = (BasicInternalFrameUI) this.getUI();\n bifui.setNorthPane(null);\n bifui.setSouthPane(null);\n\n// UIDefaults d = new UIDefaults();\n// d.put(\"Tree.selectionBackground\", Color.GREEN);\n// jTree1.putClientProperty(\"Nimbus.Overrides\", d);\n// jTree1.putClientProperty(\"Nimbus.Overrides.InheritDefaults\", false);\n cellColour();\n try {\n loadTree();\n } catch (NotBoundException | MalformedURLException | RemoteException | ClassNotFoundException | SQLException | InterruptedException ex) {\n Logger.getLogger(GenerateJTree1.class.getName()).log(Level.SEVERE, null, ex);\n }\n ToolTipManager.sharedInstance().registerComponent(jTree1);\n }", "public static void createTreeFromTraversals() {\n int[] preorder = {9, 2, 1, 0, 5, 3, 4, 6, 7, 8};\n int[] inorder = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n Tree tree = new Tree();\n tree.head = recur(preorder, inorder, 0, 0, inorder.length-1);\n tree.printPreOrder();\n System.out.println();\n tree.printInOrder();\n System.out.println();\n }", "public static void createTree(SuccessorGenerator generator, GameState initialState)\n {\n LinkedList<GameState> currentLevel = new LinkedList<GameState>();\n currentLevel.add(initialState);\n Player currentPlayer = Player.PLAYER_MAX;\n \n int level = 0;\n while(true)\n {\n LinkedList<GameState> nextLevel = new LinkedList<GameState>();\n \n /*Gerando todas as ações possíveis para o nível atual.*/\n for(GameState state : currentLevel)\n {\n generator.generateSuccessors(state, currentPlayer);\n \n for(int i = 0; i < state.getChildren().size(); i++)\n {\n GameState successorState = state.getChildren().get(i);\n nextLevel.add(successorState);\n }\n }\n System.out.println(\"Expandindo nível \"+(level++)+\" com \"+nextLevel.size()+\" estados.\");\n \n /*Alternando jogadores*/\n currentPlayer = (currentPlayer == Player.PLAYER_MAX)?\n Player.PLAYER_MIN:\n Player.PLAYER_MAX; \n \n /*Busca termina quando todos os estados foram explorados*/\n if(nextLevel.isEmpty()) break;\n \n currentLevel.clear();\n currentLevel.addAll(nextLevel);\n }\n \n }", "private void initModel() {\t\n \t\t// build default tree structure\n \t\tif(treeMode == MODE_DEPENDENCY) {\n \t\t\t// don't re-init anything\n \t\t\tif(rootDependency == null) {\n \t\t\t\trootDependency = new DefaultMutableTreeNode();\n \t\t\t\tdepNode = new DefaultMutableTreeNode(); // dependent objects\n \t\t\t\tindNode = new DefaultMutableTreeNode();\n \t\t\t\tauxiliaryNode = new DefaultMutableTreeNode();\n \t\t\t\t\n \t\t\t\t// independent objects \n \t\t\t\trootDependency.add(indNode);\n \t\t\t\trootDependency.add(depNode);\n \t\t\t}\n \t\t\t\n \t\t\t// set the root\n \t\t\tmodel.setRoot(rootDependency);\n \n \t\t\t// add auxiliary node if neccessary\n \t\t\tif(showAuxiliaryObjects) {\n \t\t\t\tif(!auxiliaryNode.isNodeChild(rootDependency)) {\n \t\t\t\t\tmodel.insertNodeInto(auxiliaryNode, rootDependency, rootDependency.getChildCount());\n \t\t\t\t}\n \t\t\t}\n \t\t} else {\n \t\t\t// don't re-init anything\n \t\t\tif(rootType == null) {\n \t\t\t\trootType = new DefaultMutableTreeNode();\n \t\t\t\ttypeNodesMap = new HashMap<String, DefaultMutableTreeNode>(5);\n \t\t\t}\n \t\t\t\n \t\t\t// always try to remove the auxiliary node\n \t\t\tif(showAuxiliaryObjects && auxiliaryNode != null) {\n \t\t\t\tmodel.removeNodeFromParent(auxiliaryNode);\n \t\t\t}\n \n \t\t\t// set the root\n \t\t\tmodel.setRoot(rootType);\n \t\t}\n \t}", "private void setTree() throws IOException {\n TreeItem<File> root = new TreeItem<>();\n dirFolders.setRoot(buildTree(model.DirectoryManager.getTree(), root));\n dirFolders.setRoot(root.getChildren().get(0));\n\n // format cellFactory\n // we want to show file name in UI although treeView stores File object\n // Add directory logo if the file is a directory\n // Add photo thumbnail if the file is a photo\n dirFolders.setCellFactory(\n new Callback<TreeView<File>, TreeCell<File>>() {\n @Override\n public TreeCell<File> call(TreeView<File> param) {\n return new TreeCell<File>() {\n @Override\n protected void updateItem(File item, boolean empty) {\n super.updateItem(item, empty);\n if (item != null) {\n if (item.isDirectory()) {\n setGraphic(\n new ImageView(\n new Image(getClass().getResourceAsStream(\"/views/folder.png\"))));\n setDisclosureNode(null);\n File[] fileList = item.listFiles();\n if (fileList != null) {\n if (fileList.length == 0) {\n setDisable(true);\n }\n }\n } else {\n ImageView image = new ImageView(\"File:\" + item.getPath());\n image.setFitHeight(32);\n image.setFitWidth(36);\n setGraphic(image);\n }\n setText(item.getName());\n }\n }\n };\n }\n });\n\n // handle onClickAction\n dirFolders\n .getSelectionModel()\n .selectedItemProperty()\n .addListener(\n (observable, oldValue, newValue) -> {\n if (!dirFolders.getSelectionModel().getSelectedItem().getValue().isDirectory()) {\n model.User.setPhoto(\n model.PhotoManager.getPhoto(\n dirFolders.getSelectionModel().getSelectedItem().getValue().getPath()));\n try {\n loadNextScene(rootPane, \"/views/focusPhotoPane.fxml\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n Stage curStage = (Stage) rootPane.getScene().getWindow();\n File selectedDirectory =\n dirFolders.getSelectionModel().getSelectedItem().getValue();\n if (selectedDirectory != null) {\n Directory dir =\n DirectoryManager.getCurrentDirectory(selectedDirectory.getPath());\n if (dir != null) {\n model.User.setGalleryPhotos(dir.getPhotos());\n fadeOutEvent();\n }\n } else {\n curStage.show();\n }\n }\n });\n }", "@Test\n public void whenAddNodesOnDifferentLevelsThenResultThreeNodeFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 2, 1]\"));\n }", "private Node constructParsedTree(Node[] nodes) {\n int rootIndex = 0;\n for (int i = 0; i < nodes.length; i++) {\n if (nodes[i].getFather() > 0)\n nodes[nodes[i].getFather() - 1].addChild(nodes[i]);\n else\n rootIndex = i;\n }\n return nodes[rootIndex];\n }", "public static void generateTree(Node root){\n\n // If we hit the winning position or a draw, stop generating (Exit condition)\n if(defaultEvaluator.evaluate(root.getBoard()) != 0 || root.getBoard().getTurnNumber() == 9)\n return;\n\n // Else, keep generating recursively\n\n // Step0-Determine the turn player.\n GamePiece turnPlayer;\n if (root.getBoard().isXTurn()) {\n turnPlayer = GamePiece.X;\n }\n else {\n turnPlayer = GamePiece.O;\n }\n\n // Step1-generate a new board for every child of root\n int parentalBranches = root.getChildren().length;\n int childrenBranches = parentalBranches - 1;\n for(int i=0; i<parentalBranches; ++i){\n\n root.getChildren()[i] = new Node(childrenBranches);\n root.getChildren()[i].setBoard((Board)(root.getBoard().clone()));\n\n }\n\n // Step2-Place the pieces\n int childIndex=0;\n int placement = 0;\n while(childIndex<parentalBranches){\n\n try{\n\n root.getChildren()[childIndex].getBoard().set(placement %3, placement /3, turnPlayer);\n childIndex++;\n\n }catch(GridAlreadyChosenException ex){}\n placement++;\n\n }\n\n // Step3-Let the recursive madness begin. Call generateTree() on each child\n for (int i=0; i<parentalBranches; ++i)\n generateTree(root.getChildren()[i]);\n\n\n }", "private void loadTree(){ \n PBarHelper.show();\n DataProvider.getTreeHierarchy(mScreenId, new DataProvider.AsyncCallback<ViewNodeJSO>() {\n @Override\n public void onError(Request r, Throwable t) {\n PBarHelper.hide();\n Window.alert(t.getMessage());\n }\n\n @Override\n public void onDownloaded(ViewNodeJSO result) {\n mRoot = result; \n CellTree.Resources res = GWT.create(CustomTreeResources.class);\n //create tree model\n mTreeViewModel = new ViewHierarchyTreeViewModel(result);\n //add selection handler to select view on canvas\n mTreeViewModel.setOnSelectionChangedListener(new OnSelectionChangedListener() { \n @Override\n public void onSelectionChanged(ViewNodeJSO viewNode, boolean selected) { \n ScreenPreviewPage.this.onViewTreeNodeSelectionChanged(viewNode, selected);\n }\n });\n //add hover listener just to highlight view\n mTreeViewModel.setOnViewNodeMouseOverListener(new OnViewNodeMouseOverListener() {\n @Override\n public void onMouseOver(ViewNodeJSO viewNode) {\n if (mTreeViewModel.getSelectedNode() == null) {\n clearCanvas();\n drawRectForView(viewNode);\n }\n }\n });\n //remove old tree if necessary, currently there is no reload support (reload page only)\n if (mCellTree != null) {\n mCellTree.removeFromParent();\n }\n mCellTree = new CellTree(mTreeViewModel, null, res); \n mCellTree.setDefaultNodeSize(1000);//no show more button\n centerPanel.add(mCellTree); \n CellTreeTools.expandAll(mCellTree.getRootTreeNode());\n mCellTree.setAnimationEnabled(true);\n PBarHelper.hide();\n } \n });\n }", "public void newFolderButtonClicked() {\n TreePath[] paths = _fileSystemTree.getSelectionPaths();\r\n List selection = getSelectedFolders(paths);\r\n if (selection.size() > 1 || selection.size() == 0)\r\n return; // should never happen\r\n \r\n File parent = (File) selection.get(0);\r\n \r\n final ResourceBundle resourceBundle = FolderChooserResource.getResourceBundle(Locale.getDefault());\r\n String folderName = JOptionPane.showInputDialog(_folderChooser, resourceBundle.getString(\"FolderChooser.new.folderName\"),\r\n resourceBundle.getString(\"FolderChooser.new.title\"), JOptionPane.OK_CANCEL_OPTION | JOptionPane.QUESTION_MESSAGE);\r\n \r\n if (folderName != null) {\r\n File newFolder = new File(parent, folderName);\r\n boolean success = newFolder.mkdir();\r\n \r\n TreePath parentPath = paths[0];\r\n boolean isExpanded = _fileSystemTree.isExpanded(parentPath);\r\n if (!isExpanded) { // expand it first\r\n _fileSystemTree.expandPath(parentPath);\r\n }\r\n \r\n LazyMutableTreeNode parentTreeNode = (LazyMutableTreeNode) parentPath.getLastPathComponent();\r\n BasicFileSystemTreeNode child = BasicFileSystemTreeNode.createFileSystemTreeNode(newFolder, _folderChooser);\r\n // child.setParent(parentTreeNode);\r\n if (success) {\r\n parentTreeNode.clear();\r\n int insertIndex = _fileSystemTree.getModel().getIndexOfChild(parentTreeNode, child);\r\n if (insertIndex != -1) {\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).insertNodeInto(child, parentTreeNode, insertIndex);\r\n ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).nodeStructureChanged(parentTreeNode);\r\n // ((BasicFileSystemTreeModel) _fileSystemTree.getModel()).addPath(parentPath, insertIndex, child);\r\n }\r\n }\r\n TreePath newPath = parentPath.pathByAddingChild(child);\r\n _fileSystemTree.setSelectionPath(newPath);\r\n _fileSystemTree.scrollPathToVisible(newPath);\r\n }\r\n }", "protected FVResourceNode createVFsTree(IProgressObserver observer) {\n if (observer == null) {\n observer = new ObserverAdapter();\n }\n\n TreeManagementModel model =\n mgrModels.get(TreeTypeEnum.VIRTUAL_FABRICS_TREE);\n if (model.isValid()) {\n observer.onFinish();\n return model.getTree();\n }\n\n IProgressObserver[] subObsevers = observer.createSubObservers(2);\n\n FVResourceNode vfTree =\n new FVResourceNode(subnet.getName(), TreeNodeType.ALL,\n TreeNodeType.ALL.ordinal());\n FVResourceNode subnetTree = createDeviceTypesTree(subObsevers[0]);\n subObsevers[0].onFinish();\n VirtualFabricsTreeSynchronizer treeUpdater =\n new VirtualFabricsTreeSynchronizer(mPerformanceApi, subnetTree);\n treeUpdater.updateTree(vfTree, null, subObsevers[1]);\n subObsevers[1].onFinish();\n model.setTree(vfTree);\n return vfTree;\n }", "public TreeNode() { \n this.name = \"\"; \n this.rule = new ArrayList<String>(); \n this.child = new ArrayList<TreeNode>(); \n this.datas = null; \n this.candAttr = null; \n }", "protected abstract void createNestedWidgets();", "private Node makeTree(Node currentNode, DataNode dataNode,\r\n\t\t\tint featureSubsetSize, int height) {\n\r\n\t\tif (dataNode.labels.size() < this.traineeDataSize / 25 || height > 7) {\r\n\t\t\treturn new Node(majority(dataNode));\r\n\t\t}\r\n\t\telse{\r\n\r\n\t\t\tEntropyCalculation e1 = new EntropyCalculation();\r\n\r\n\t\t\tNode n = e1.maxGainedElement(dataNode.features, dataNode.labels, featureSubsetSize); //new\r\n\r\n\r\n\t\t\tif(e1.zeroEntropy){\r\n\r\n\t\t\t\tcurrentNode = new Node(dataNode.labels.get(0));\r\n\r\n\t\t\t\t/*currentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.labels.get(0);*/\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\tcurrentNode = new Node();\r\n\r\n\t\t\t\tcurrentNode.featureIndexColumn = n.featureIndexColumn;\r\n\t\t\t\tcurrentNode.featureIndexRow = n.featureIndexRow;\r\n\r\n\t\t\t\tcurrentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.features.get(currentNode.featureIndexRow).get(currentNode.featureIndexColumn);\r\n\r\n\t\t\t\tcurrentNode.leftChild = new Node();\r\n\t\t\t\tcurrentNode.rightChild = new Node();\r\n\r\n\t\t\t\tDataNode leftNode = new DataNode();\r\n\t\t\t\tDataNode rightNode = new DataNode();\r\n\r\n\t\t\t\tfor (int i = 0; i < dataNode.features.size(); i++) {\r\n\r\n\t\t\t\t\tif(currentNode.nodeValue >= dataNode.features.get(i).get(currentNode.featureIndexColumn)) {\r\n\r\n\t\t\t\t\t\tleftNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\tleftNode.labels.add(dataNode.labels.get(i));\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\trightNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\trightNode.labels.add(dataNode.labels.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif((leftNode.labels.isEmpty() || rightNode.labels.isEmpty()) && height == 0){\r\n\t\t\t\t\tSystem.out.println(\"Ghapla\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentNode.leftChild = makeTree(currentNode.leftChild, leftNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\tcurrentNode.rightChild = makeTree(currentNode.rightChild, rightNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void initTrees() {\n // My machine tree init code\n myMachineTree = new FileTree(fileDomainModel);\n myMachineScrollPane.add(myMachineTree);\n // Connected machine tree init code\n connectedMachineTree = new FileTree(fileDomainModel);\n connectedMachineScrollPane.add(connectedMachineTree);\n }", "private void createTree(String Name) {\n DecisionTree tree = new DecisionTree(treeID, Name, mainPanel.getSize(), font);\n mainPanel.addTab(Name + \" *\", tree);\n trees.add(tree);\n }", "private void createRestaurantTrees() {\r\n while (!restaurantArray.isEmpty()) {\r\n Restaurant element = restaurantArray.dequeue();\r\n ratingTree.add(element);\r\n deliveryTree.add(element);\r\n }\r\n }", "public void run(){\n\n File fileRoot = new File(path);\n root = new DefaultMutableTreeNode(new fileNode(fileRoot));\n treemodel = new DefaultTreeModel(root);\n\n tree = new JTree(treemodel);\n tree.setShowsRootHandles(true);\n JScrollPane scrollPane = new JScrollPane(tree);\n this.panel.add(scrollPane);\n //frame.setLocationByPlatform(true);\n this.panel.setSize(1000, 1000);\n this.panel.setVisible(true);\n /*\n this.panel.add(scrollPane);\n //frame.setLocationByPlatform(true);\n this.panel.setSize(1000, 1000);\n this.panel.setVisible(true);\n */\n\n createChildren cc = new createChildren(fileRoot, root);\n new Thread(cc).start();\n\n\n }", "public List<TreeNode> generateTrees(int n) {\n return helper(1, n);\n }", "private void split(){\n // Slice horizontaly to get sub nodes width\n float subWidth = this.getBounds().width / 2;\n // Slice vertically to get sub nodes height\n float subHeight = this.getBounds().height / 2;\n float x = this.getBounds().x;\n float y = this.getBounds().y;\n int newLevel = this.level + 1;\n\n // Create the 4 nodes\n this.getNodes().add(0, new QuadTree(newLevel, new Rectangle(x + subWidth, y, subWidth, subHeight)));\n this.getNodes().add(1, new QuadTree(newLevel, new Rectangle(x, y, subWidth, subHeight)));\n this.getNodes().add(2, new QuadTree(newLevel, new Rectangle(x, y + subHeight, subWidth, subHeight)));\n this.getNodes().add(3, new QuadTree(newLevel, new Rectangle(x + subWidth, y + subHeight, subWidth, subHeight)));\n\n }", "@FXML\n private void renderTree() {\n unmountTree();\n buildTree(inputN, treePane.getWidth() / 2, treePane.getHeight(), Math.toRadians(inputTrunkAngle), inputBranchLength);\n mountTree();\n }", "private void buildTree() {\n\t\tfinal TreeSet<Tree> treeSet = new TreeSet<Tree>();\n\t\tfor (char i = 0; i < 256; i++) {\n\t\t\tif (characterCount[i] > 0) {\n\t\t\t\ttreeSet.add(new Tree(i, characterCount[i]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge the trees to one Tree\n\t\tTree left;\n\t\tTree right;\n\t\twhile (treeSet.size() > 1) {\n\t\t\tleft = treeSet.pollFirst();\n\t\t\tright = treeSet.pollFirst();\n\t\t\ttreeSet.add(new Tree(left, right));\n\t\t}\n\n\t\t// There is only our final tree left\n\t\thuffmanTree = treeSet.pollFirst();\n\t}", "private void NewTree(HttpServletRequest request, HttpServletResponse response) throws ParserConfigurationException, IOException {\n XMLTree tree;\n tree = XMLTree.getInstance();\n //_response.getWriter().write(tree.newTree());\n String answer = tree.newTree();\n returnResponse(response, answer);\n }", "private void buildTree() {\n if (treeBuilt) {\n return;\n }\n\n Vector gItems = protocol.getGroupItems();\n int gCount = gItems.size();\n for (int i = 0; i < gCount; ++i) {\n Group gItem = (Group)gItems.elementAt(i);\n gItem.updateContacts();\n gItem.updateGroupData();\n }\n\n TreeNode currentNode = getCurrentNode();\n TreeBranch root = getRoot();\n clear();\n root.setExpandFlag(false);\n boolean showOffline = !Options.getBoolean(Options.OPTION_CL_HIDE_OFFLINE);\n for (int groupIndex = 0; groupIndex < gCount; ++groupIndex) {\n Group group = (Group)gItems.elementAt(groupIndex);\n boolean isExpanded = group.isExpanded();\n group.setExpandFlag(false);\n cleanNode(group);\n Vector contacts = group.getContacts();\n int contactCount = contacts.size();\n for (int contactIndex = 0; contactIndex < contactCount; ++contactIndex) {\n Contact cItem = (Contact)contacts.elementAt(contactIndex);\n if (cItem.isVisibleInContactList()) {\n addNode(group, cItem);\n }\n }\n group.setExpandFlag(isExpanded);\n if (showOffline || (0 < group.getSubnodesCount())) {\n addNode(root, group);\n }\n }\n Vector cItems = getContactItems();\n int cCount = cItems.size();\n for (int contactIndex = 0; contactIndex < cCount; ++contactIndex) {\n Contact cItem = (Contact)cItems.elementAt(contactIndex);\n if ((Group.NOT_IN_GROUP == cItem.getGroupId()) && cItem.isVisibleInContactList()) {\n addNode(root, cItem);\n }\n }\n\n setCurrentNode(currentNode);\n root.setExpandFlag(true);\n updateMetrics();\n treeBuilt = true;\n }", "public static void loadTree() throws NotBoundException, MalformedURLException, RemoteException, ClassNotFoundException, SQLException, InterruptedException {\n\n List<Object> ob1 = new ArrayList<>();\n ob1.add(1);\n ob1.add(1);\n//db Access1 \n List<List<Object>> sspFindMultyResult1 = ServerConnection.getServerConnector().searchMultipleResults(ob1, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n DefaultTreeModel model = (DefaultTreeModel) jTree1.getModel();\n\n DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot();\n\n for (List<Object> sspFindMultyResults1 : sspFindMultyResult1) {\n DefaultMutableTreeNode dmtn1 = new DefaultMutableTreeNode(sspFindMultyResults1.get(1) + \"-\" + sspFindMultyResults1.get(3));\n root.add(dmtn1);\n\n List<Object> ob2 = new ArrayList<>();\n ob2.add(2);\n ob2.add(sspFindMultyResults1.get(0));\n//db Access2\n List<List<Object>> sspFindMultyResult2 = ServerConnection.getServerConnector().searchMultipleResults(ob2, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults2 : sspFindMultyResult2) {\n DefaultMutableTreeNode dmtn2 = new DefaultMutableTreeNode(sspFindMultyResults2.get(1) + \"-\" + sspFindMultyResults2.get(3));\n dmtn1.add(dmtn2);\n dmtn1.getLevel();\n\n List<Object> ob3 = new ArrayList<>();\n ob3.add(3);\n ob3.add(sspFindMultyResults2.get(0));\n//db Access3\n List<List<Object>> sspFindMultyResult3 = ServerConnection.getServerConnector().searchMultipleResults(ob3, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults3 : sspFindMultyResult3) {\n DefaultMutableTreeNode dmtn3 = new DefaultMutableTreeNode(sspFindMultyResults3.get(1) + \"-\" + sspFindMultyResults3.get(3));\n dmtn2.add(dmtn3);\n\n List<Object> ob4 = new ArrayList<>();\n ob4.add(4);\n ob4.add(sspFindMultyResults3.get(0));\n//db Access4\n List<List<Object>> sspFindMultyResult4 = ServerConnection.getServerConnector().searchMultipleResults(ob4, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults4 : sspFindMultyResult4) {\n DefaultMutableTreeNode dmtn4 = new DefaultMutableTreeNode(sspFindMultyResults4.get(1) + \"-\" + sspFindMultyResults4.get(3));\n dmtn3.add(dmtn4);\n\n List<Object> ob5 = new ArrayList<>();\n ob5.add(5);\n ob5.add(sspFindMultyResults4.get(0));\n//db Access5 \n List<List<Object>> sspFindMultyResult5 = ServerConnection.getServerConnector().searchMultipleResults(ob5, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults5 : sspFindMultyResult5) {\n DefaultMutableTreeNode dmtn5 = new DefaultMutableTreeNode(sspFindMultyResults5.get(1) + \"-\" + sspFindMultyResults5.get(3));\n dmtn4.add(dmtn5);\n\n }\n }\n }\n }\n }\n model.reload(root);\n }", "public void refresh()\n\t{\n\t\tNode master = new Node(\"Tyler\");\n\t\t//master.add(new Node(\"Test\"));\n\t\tmaster.addParent(new Node(\"Clinton\"));\n\t\tmaster.addParent(new Node(\"Terry\"));\n\t\t\n\t\tmaster.add(\"Justin\", \"Terry\"); \n\t\tmaster.add(\"Justin\", \"Clinton\"); \n\t\t//this adds directly under Terry\n\t\t//maybe do this differently...\n\t\t\n\t\t\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"Diana\"));\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"George\"));\n\t\t\n\t\tmaster.add(new Node(\"Tyler 2.0\"));\n\t\tmaster.add(new Node(\"Tyler 3.0\"));\n\t\tmaster.add(new Node(\"Tyler Jr\"));\n\t\t\n\n\t\tmaster.add(\"Tyler Jr Jr\", \"Tyler 2.0\");\n\t\t\n\t\tmaster.add(\"Tyler 3.0\", \"Tyler Jr 2.0\");\n\t\t\n\t\tmaster.findNode(\"Clinton\").addParent(new Node(\"Eric\"));\n\t\tmaster.findNode(\"Eric\").addParent(new Node(\"Eric's Dad\"));\n\t\t\n\t\t\n\t\tmaster.findNode(\"Tyler Jr Jr\", 6).add(new Node(\"Mini Tyler\"));\n\t\t//master.findNode(\"Clinton\", 2).add(new Node(\"Justin\"));\n\t\t\n\t\t\n\t\tmaster.getParent().get(0).findNode(\"Justin\", 3).add(new Node(\"Mini Justin\"));\n\t\t\n\t\tmaster.add(new Node(\"Laptop\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Keyboard\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Mouse\"));\n\t\t\n\t\tmaster.add(\"Touchpad\", \"Laptop\");\n\t\t//master.add(\"Justin\", \"Eric\");\n\t\t\n\t\tmaster.add(\"Hunger\", \"Tyler\");\n\t\t\n\t\tselectedNode = master;\n\t\tselect(selectedNode);\n\t}", "void buildTree(){\n while(second.hasNext()){\n String s = second.next();\n String[] arr = s.split(SPLIT);\n //descending sort according to num\n Arrays.sort(arr, (String s1, String s2)->{\n int a = this.keyToNum.getOrDefault(s1, 0);\n int b = this.keyToNum.getOrDefault(s2, 0);\n if (a <= b)\n return 1;\n else\n return -1;\n });\n\n //current node\n TreeNode curr = root;\n for (String item: arr){\n if (!keyToNum.containsKey(item))\n continue;\n if(!curr.containChild(item)){\n TreeNode node = curr.addChild(item);\n //change the current node\n curr = node;\n //add new node in table\n TableEntry e = table.get(keyToIdx.get(item));\n e.addNode(node);\n }else{\n curr = curr.getChild(item);\n curr.setNum(curr.getNum()+1);\n }\n }\n }\n /*\n this.root.print();\n for(TableEntry e: table){\n Iterator<TreeNode> it = e.getIterator();\n while(it.hasNext()){\n System.out.print(it.next().getItem()+\" \");\n }\n System.out.println();\n }\n */\n }", "public static Node createLargeTree() {\n final int dcCount = 2;\n final int rackCount = 6;\n final int snCount = 6;\n final int hdCount = 12;\n\n int id = 0;\n // root\n Node root = new Node();\n root.setName(\"root\");\n root.setId(id++);\n root.setType(Types.ROOT);\n root.setSelection(Selection.STRAW);\n // DC\n List<Node> dcs = new ArrayList<Node>();\n for (int i = 1; i <= dcCount; i++) {\n Node dc = new Node();\n dcs.add(dc);\n dc.setName(\"dc\" + i);\n dc.setId(id++);\n dc.setType(Types.DATA_CENTER);\n dc.setSelection(Selection.STRAW);\n dc.setParent(root);\n // racks\n List<Node> racks = new ArrayList<Node>();\n for (int j = 1; j <= rackCount; j++) {\n Node rack = new Node();\n racks.add(rack);\n rack.setName(dc.getName() + \"rack\" + j);\n rack.setId(id++);\n rack.setType(StorageSystemTypes.RACK);\n rack.setSelection(Selection.STRAW);\n rack.setParent(dc);\n // storage nodes\n List<Node> sns = new ArrayList<Node>();\n for (int k = 1; k <= snCount; k++) {\n Node sn = new Node();\n sns.add(sn);\n sn.setName(rack.getName() + \"sn\" + k);\n sn.setId(id++);\n sn.setType(StorageSystemTypes.STORAGE_NODE);\n sn.setSelection(Selection.STRAW);\n sn.setParent(rack);\n // hds\n List<Node> hds = new ArrayList<Node>();\n for (int l = 1; l <= hdCount; l++) {\n Node hd = new Node();\n hds.add(hd);\n hd.setName(sn.getName() + \"hd\" + l);\n hd.setId(id++);\n hd.setType(StorageSystemTypes.DISK);\n hd.setWeight(100);\n hd.setParent(sn);\n }\n sn.setChildren(hds);\n }\n rack.setChildren(sns);\n }\n dc.setChildren(racks);\n }\n root.setChildren(dcs);\n return root;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n lblTitle = new javax.swing.JLabel();\n lblPath = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTree1 = new javax.swing.JTree();\n btnDelete = new javax.swing.JButton();\n btnInsert = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n lblTitle.setText(\"Tree 예제\");\n\n lblPath.setText(\"Path : \");\n\n jTree1.addTreeExpansionListener(new javax.swing.event.TreeExpansionListener() {\n public void treeCollapsed(javax.swing.event.TreeExpansionEvent evt) {\n jTree1TreeCollapsed(evt);\n }\n public void treeExpanded(javax.swing.event.TreeExpansionEvent evt) {\n jTree1TreeExpanded(evt);\n }\n });\n jTree1.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {\n public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {\n jTree1ValueChanged(evt);\n }\n });\n jScrollPane1.setViewportView(jTree1);\n\n btnDelete.setText(\"삭제\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n btnInsert.setText(\"추가\");\n btnInsert.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnInsertActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(165, 165, 165)\n .addComponent(lblTitle))\n .addGroup(layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(lblPath, javax.swing.GroupLayout.PREFERRED_SIZE, 367, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnInsert, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))))))\n .addContainerGap(8, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(lblTitle)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(lblPath, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnInsert)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnDelete)))\n .addContainerGap())\n );\n\n pack();\n }", "private void initTree()\n {\n String currSpell;\n Node tempNode;\n String currString;\n Gestures currGest;\n for(int spellInd = 0; spellInd < SpellLibrary.spellList.length; spellInd++)\n {\n //Start casting a new spell from the root node\n tempNode = root;\n currSpell = SpellLibrary.spellList[spellInd];\n for(int currCharInd =0; currCharInd < currSpell.length(); currCharInd++)\n {\n currString = currSpell.substring(0,currCharInd+1);\n currGest = Gestures.getGestureByChar(currString.charAt(currString.length()-1));\n if(tempNode.getChild(currGest) == null) //Need to add a new node!\n {\n tempNode.addChild(currGest,new Node(currString));\n debug_node_number++;\n }\n //Walk into the existing node\n tempNode = tempNode.getChild(currGest);\n }\n\n }\n }", "private static TreeNode<Character> buildTree () {\n // build left half\n TreeNode<Character> s = new TreeNode<Character>('S', \n new TreeNode<Character>('H'),\n new TreeNode<Character>('V'));\n\n TreeNode<Character> u = new TreeNode<Character>('U', \n new TreeNode<Character>('F'),\n null);\n \n TreeNode<Character> i = new TreeNode<Character>('I', s, u);\n\n TreeNode<Character> r = new TreeNode<Character>('R', \n new TreeNode<Character>('L'), \n null);\n\n TreeNode<Character> w = new TreeNode<Character>('W', \n new TreeNode<Character>('P'),\n new TreeNode<Character>('J'));\n\n TreeNode<Character> a = new TreeNode<Character>('A', r, w);\n\n TreeNode<Character> e = new TreeNode<Character>('E', i, a);\n\n // build right half\n TreeNode<Character> d = new TreeNode<Character>('D', \n new TreeNode<Character>('B'),\n new TreeNode<Character>('X'));\n\n TreeNode<Character> k = new TreeNode<Character>('K', \n new TreeNode<Character>('C'),\n new TreeNode<Character>('Y'));\n\n TreeNode<Character> n = new TreeNode<Character>('N', d, k);\n\n\n TreeNode<Character> g = new TreeNode<Character>('G', \n new TreeNode<Character>('Z'),\n new TreeNode<Character>('Q'));\n\n TreeNode<Character> o = new TreeNode<Character>('O');\n\n TreeNode<Character> m = new TreeNode<Character>('M', g, o);\n\n TreeNode<Character> t = new TreeNode<Character>('T', n, m);\n\n // build the root\n TreeNode<Character> root = new TreeNode<Character>(null, e, t);\n return root;\n }", "@Test\n public void whenAddNineNodesOnDifferentLevelsThenResultNineNodesFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(new TreeNode(), \"1\");\n tree.addChild(new TreeNode(), \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 3, 3, 2, 2, 2, 1, 1, 1]\"));\n }", "private static Node getTree()\r\n {\r\n Node node1 = new Node( 1 );\r\n Node node2 = new Node( 2 );\r\n Node node3 = new Node( 3 );\r\n Node node4 = new Node( 4 );\r\n Node node5 = new Node( 5 );\r\n Node node6 = new Node( 6 );\r\n Node node7 = new Node( 7 );\r\n\r\n node1.left = node2;\r\n node1.right = node3;\r\n\r\n node2.left = node4;\r\n node2.right = node5;\r\n\r\n node3.left = node6;\r\n node3.right = node7;\r\n return node1;\r\n }", "@Test\n\tpublic void testBuildTree() {\n\t\tTree<Integer> tree = new Tree<Integer> ();\n\t\t//add first level children, 1\n\t\tNode<Integer> root = tree.getRoot();\n\t\troot.addChild(new Node<Integer>());\n\t\tNode<Integer> c1 = root.getFirstChild();\n\t\tassertTrue(c1.getData() == null);\n\t\t//add second level children, 3\n\t\tc1.addChild(new Node<Integer> ());\n\t\tc1.addChild(new Node<Integer> ());\n\t\tc1.addChild(new Node<Integer> ());\n\t\tassertTrue(c1.countChildren() == 3);\n\t\t//add third level children, 3 * 3\n\t\tint[][] leafData = {\n\t\t\t\t{8,7,2},\n\t\t\t\t{9,1,6},\n\t\t\t\t{2,4,1}\n\t\t};\n\t\tNode<Integer> c2 = c1.getFirstChild();\n\t\tint i = 0;\n\t\twhile (c2 != null) {\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][0]));\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][1]));\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][2]));\n\t\t\tc2 = c2.next();\n\t\t\ti++;\n\t\t}\n\t\tassertTrue(tree.countDepth() == 3);\n\t\tNode<Integer> leaf = root;\n\t\twhile (leaf.countChildren() > 0) {\n\t\t\tleaf = leaf.getFirstChild();\n\t\t}\n\t\tassertTrue(leaf.getData() == 8);\t\t\t\n\t}", "private void getStatementTreeViewHelper(final StatementInfo statementInfo, final StatementTreeViewInfo statementTreeViewInfo,\n \t\tfinal String nlUsageTypeKey, final String language)\n \tthrows DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {\n if (statementInfo == null) return;\n\n statementAssembler.copyValues(statementTreeViewInfo, statementInfo);\n statementTreeViewInfo.setReqComponents(getReqComponentInfos(statementInfo, nlUsageTypeKey, language));\n // get statements recursively and convert them into statementTreeViewInfo\n if (statementInfo.getStatementIds() != null) {\n for (String statementId : statementInfo.getStatementIds()) {\n StatementInfo subStatement = getStatement(statementId);\n\n List<StatementTreeViewInfo> statements =\n (statementTreeViewInfo.getStatements() == null) ? new ArrayList<StatementTreeViewInfo>() : statementTreeViewInfo.getStatements();\n StatementTreeViewInfo subStatementTreeViewInfo = new StatementTreeViewInfo();\n\n // recursive call to get subStatementTreeViewInfo\n getStatementTreeViewHelper(subStatement, subStatementTreeViewInfo, nlUsageTypeKey, language);\n statements.add(subStatementTreeViewInfo);\n statementTreeViewInfo.setStatements(statements);\n }\n }\n }", "private void initComponents() {//GEN-BEGIN:initComponents\n scrollPanel = new javax.swing.JScrollPane();\n hierarchy = new JTree(treeModel);\n setLayout(new java.awt.BorderLayout());\n \n \n hierarchy.setPreferredSize(new java.awt.Dimension(300, 500));\n hierarchy.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n hierarchyMouseClicked(evt);\n }\n }\n );\n scrollPanel.setViewportView(hierarchy);\n \n \n add(scrollPanel, java.awt.BorderLayout.CENTER);\n \n }", "public static Node[] initTree(int[] arr){\n int i;\n Node[] tree = new Node[n];\n Node node;\n for(i = 0; i < n; i++){\n node = new Node();\n node.data = arr[i];\n tree[i] = node;\n }\n tree[0].data = arr[0];\n tree[1].data = arr[1];\n tree[2].data = arr[2];\n tree[3].data = arr[3];\n tree[4].data = arr[4];\n tree[5].data = arr[5];\n tree[6].data = arr[6];\n\n tree[0].parent = null;\n tree[0].left = tree[1];\n tree[0].right = tree[2];\n\n tree[1].parent = tree[0];\n tree[1].left = null;\n tree[1].right = tree[3];\n\n tree[2].parent = tree[0];\n tree[2].left = tree[4];\n tree[2].right = null;\n \n tree[3].parent = tree[1];\n tree[3].left = null;\n tree[3].right = null;\n\n tree[4].parent = tree[2];\n tree[4].left = tree[5];\n tree[4].right = tree[6];\n\n tree[5].parent = tree[4];\n tree[5].left = null;\n tree[5].right = null;\n\n tree[6].parent = tree[4];\n tree[6].left = null;\n tree[6].right = null;\n\n root = tree[0];\n return tree; \n }", "public static void buildStage2 ()\r\n {\r\n \r\n lgt.findParent(); //4\r\n lgt.findChild(0); //6\r\n lgt.insert(12);\r\n lgt.findParent();\r\n lgt.insert(13);\r\n lgt.findParent();\r\n lgt.insert(14);\r\n \r\n lgt.findRoot();\r\n lgt.findChild(0);//2\r\n lgt.findChild(0);//5\r\n lgt.insert(8);\r\n lgt.findParent();\r\n lgt.insert(9);\r\n lgt.findParent();\r\n lgt.insert(10);\r\n lgt.findParent();\r\n lgt.insert(11);\r\n \r\n }", "public TtreeNode() {\n\t numberOfNodes++;\n\t }", "public void tree(Graphics bbg, int n, int length, int x, int y, double angle){\n double r1 = angle + Math.toRadians(-30);\n double r2 = angle + Math.toRadians(30);\n double r3 = angle + Math.toRadians(0);\n\n //length modifications of the different branches\n double l1 = length/1.3 + (l1I*5);\n double l2 = length/1.3 + (l2I*5);\n double l3 = length/1.3 + (l3I*5);\n\n //x and y points of the end of the different branches\n int ax = (int)(x - Math.sin(r1)*l1)+(int)(l1I);\n int ay = (int)(y - Math.cos(r1)*l1)+(int)(l1I);\n int bx = (int)(x - Math.sin(r2)*l2)+(int)(l2I);\n int by = (int)(y - Math.cos(r2)*l2)+(int)(l2I);\n int cx = (int)(x - Math.sin(r3)*l3)+(int)(l3I);\n int cy = (int)(y - Math.cos(r3)*l3)+(int)(l3I);\n\n if(n == 0){\n return;\n }\n\n\n increment();\n Color fluidC = new Color(colorR,colorG,colorB);\n //bbg.setColor(new Color((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random()*255)));\n bbg.setColor(fluidC);\n\n\n //draw different branches\n bbg.drawLine(x,y,ax,ay);\n bbg.drawLine(x,y,bx,by);\n bbg.drawLine(x,y,cx,cy);\n\n //call recursively to draw fractal\n tree(bbg,n-1,(int)l1, ax,ay,r1);\n tree(bbg, n - 1, (int)l2, bx,by,r2);\n tree(bbg, n - 1, (int)l3, cx,cy,r3);\n\n\n }" ]
[ "0.7412554", "0.7151319", "0.7108875", "0.70798385", "0.70751876", "0.7014905", "0.68557173", "0.68252605", "0.6802484", "0.67577946", "0.6742119", "0.67369276", "0.6668915", "0.66626173", "0.6638206", "0.66334915", "0.66158366", "0.6522842", "0.6520118", "0.6486204", "0.6464066", "0.64349896", "0.63853794", "0.6333622", "0.63301855", "0.63138735", "0.63113034", "0.62873495", "0.6286386", "0.6269807", "0.6256299", "0.62533617", "0.62371826", "0.62273514", "0.62004125", "0.6197899", "0.61934745", "0.61934745", "0.61887825", "0.6183103", "0.61780477", "0.6167761", "0.6145943", "0.6102078", "0.60965616", "0.6075079", "0.60727304", "0.6063137", "0.60320354", "0.6028557", "0.6024177", "0.60224897", "0.60191405", "0.60175914", "0.6011018", "0.59976274", "0.5996472", "0.5979767", "0.5972271", "0.5971006", "0.5960808", "0.5959368", "0.5942282", "0.5941463", "0.5938182", "0.59380084", "0.59318334", "0.59161127", "0.59134406", "0.59054863", "0.59018105", "0.5873051", "0.5869908", "0.5864389", "0.58617806", "0.5860397", "0.5846654", "0.58434045", "0.5842365", "0.58328176", "0.5829717", "0.58215076", "0.58207744", "0.5817678", "0.58174336", "0.58173054", "0.5811392", "0.5804641", "0.58009845", "0.57999265", "0.57986903", "0.5792918", "0.5791771", "0.5790602", "0.5783678", "0.57836026", "0.57780683", "0.5775946", "0.57752645", "0.57743675" ]
0.6127003
43
CREO UN TREEELEM PER OGNI GESTURE
private TreeItem<String> makeGestureBranch(final String gestureName, final TreeItem<String> parent) { final TreeItem<String> item = new TreeItem<>(gestureName); item.setGraphic(ViewUtilities.iconSetter(Material.GESTURE, IconDim.SMALL)); // RICORSIVA CREO TUTTO L'ALBERO final List<List<Vector2D>> gestureDataset = this.recognizer.getGestureDataset(gestureName); for (int i = 0; i < gestureDataset.size(); i++) { this.makeTemplateBranch("Template: " + (i + 1), item); } parent.getChildren().add(item); return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "SintagmaPreposicional createSintagmaPreposicional();", "Vaisseau_ordonneeLaPlusHaute createVaisseau_ordonneeLaPlusHaute();", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "public boolean tieneRepresentacionGrafica();", "Vaisseau_ordonneeLaPlusBasse createVaisseau_ordonneeLaPlusBasse();", "public Gioco(String titolo, int larghezza, int altezza)\n {\n //Inizializzazione degli attributi\n this.larghezza = larghezza;\n this.altezza = altezza;\n this.titolo = titolo;\n gestoreTasti = new GestoreTasti();\n gestoreMouse = new GestoreMouse();\n }", "Vaisseau_longueur createVaisseau_longueur();", "public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }", "public Torretta1(int danno, int x, int y, ArrayList<Proiettile> proiettili) {\r\n super();\r\n velocitàAttacco = 5000;\r\n attacco = danno;\r\n this.proiettili = proiettili;\r\n this.x = x * 40;\r\n this.y = y * 40 - 40;\r\n range = new Ellipse2D.Double();\r\n range.setFrame(this.x - 40, this.y - 40, 119, 119);\r\n temposparo = 200;\r\n finestrasparo = 0;\r\n costoAcquisto = 10;\r\n tipo='a';\r\n }", "private IOferta buildOfertaEjemplo7() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoEnSegundoProducto(\"11-111-1111\", \"11-111-1112\", 50);\n\t\treturn new OfertaDinero(\"50% en Sprite, comprando 1 Coca\", condicion,\tdescuento);\n\t}", "private TipoAtaque generateTipoAtaque() {\n\t\treturn null;\r\n\t}", "Gtr createGtr();", "private void InicializaGrafo() {\n\t\t\n\t\tnumeroVertices = ruas.length + 1;\n\t\tgrafo = new Grafo(numeroVertices);\n\t\t\n\t\tfor (int i = 0; i < numeroVertices - 1; i++) {\n\t\t\t\n\t\t\tint u = ruas[i];\n\t\t\tint v = (i + 1);\n\t\t\t\n\t\t\tgrafo.AdicionaAresta(u, v);\n\t\t\t\n\t\t} // Fim for int i = 0\n\t\t\n\t}", "@Override\n public String toString(){\n return \"G(\"+this.getVidas()+\")\";\n }", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "Dimension_hauteur createDimension_hauteur();", "Vaisseau_abscisseLaPlusAGauche createVaisseau_abscisseLaPlusAGauche();", "public void generete() {\n int minQuantFig = 1,\r\n maxQuantFig = 10,\r\n minNum = 1,\r\n maxNum = 100,\r\n minColor = 0,\r\n maxColor = (int)colors.length - 1,\r\n\r\n // Initialize figures property for random calculations\r\n randomColor = 0,\r\n randomFigure = 0,\r\n\r\n // Squere property\r\n randomSideLength = 0,\r\n\r\n // Circle property\r\n randomRadius = 0,\r\n \r\n // IsoscelesRightTriangle property \r\n randomHypotenus = 0,\r\n \r\n // Trapizoid properties\r\n randomBaseA = 0,\r\n randomBaseB = 0,\r\n randomAltitude = 0;\r\n\r\n // Generate random number to set figueres's quantaty\r\n setFigureQuantaty( generateWholoeNumInRange(minQuantFig, maxQuantFig) );\r\n\r\n for( int i = 0; i < getFigureQuantaty(); i++ ) {\r\n\r\n // Convert double random value to int and close it in range from 1 to number of elements in array\r\n randomFigure = (int)( Math.random() * figures.length );\r\n \r\n randomColor = generateWholoeNumInRange( minColor, maxColor ); // Get random color's index from colors array\r\n\r\n // Create new figure depending on randomFigure \r\n switch (figures[randomFigure]) {\r\n\r\n case \"Circle\":\r\n\r\n randomRadius = generateWholoeNumInRange( minNum, maxNum ); // Get random value of circle's radius;\r\n\r\n Circle newCircle = new Circle( colors[randomColor], randomRadius ); // Initialize Circle with random parameters\r\n\r\n newCircle.drawFigure();\r\n \r\n break;\r\n\r\n case \"Squere\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n Squere newSquere = new Squere( colors[randomColor], randomSideLength ); // Initialize Circle with random parameters\r\n\r\n newSquere.drawFigure();\r\n\r\n break;\r\n\r\n case \"Triangle\":\r\n\r\n randomSideLength = generateWholoeNumInRange( minNum, maxNum ); // Get random value of side length;\r\n\r\n randomHypotenus = generateWholoeNumInRange( minNum, maxNum ); // Get random value of hypotenus;\r\n\r\n IsoscelesRightTriangle newTriangle = new IsoscelesRightTriangle( colors[randomColor], randomSideLength, randomHypotenus ); // Initialize Circle with random parameters\r\n\r\n newTriangle.drawFigure();\r\n\r\n break;\r\n\r\n case \"Trapezoid\":\r\n\r\n randomBaseA = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side A;\r\n\r\n randomBaseB = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's side B;\r\n\r\n randomAltitude = generateWholoeNumInRange( minNum, maxNum ); // Get random value of trapizoid's altitude;\r\n\r\n Trapezoid newTrapezoid = new Trapezoid( colors[randomColor], randomBaseA, randomBaseB, randomAltitude ); // Create new Trapezoid with random parameters\r\n\r\n newTrapezoid.drawFigure();\r\n\r\n break;\r\n\r\n };\r\n };\r\n }", "private IOferta buildOfertaEjemplo2() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tnew PredicadoDiaSemana(Calendar.THURSDAY),\n\t\t\t\tnew ExtraerFechaCreacion());\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoPorcentual(10.0f), \n\t\t\t\tnew ExtraerTotalBrutoProductos(new PredicadoRubro(\"11\")));\n\t\treturn new OfertaDinero(\"10% descuento comida los jueves\", condicion,\n\t\t\t\tdescuento);\n\t}", "public abstract Anuncio creaAnuncioTematico();", "public Tigre(String pCouleur, int pPoids) {\n this.couleur = pCouleur;\n this.poids = pPoids;\n }", "@Override\n public void crearReloj() {\n Manecilla seg;\n seg = new Manecilla(40,60,0,1,null);\n cronometro = new Reloj(seg);\n }", "public Tura() {\n\t\tLicznikTur = 0;\n\t}", "SpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauAvance_DeplacerVaisseauVersLaGauche();", "public String generarEstadisticasGenerales(){\n \n String estadisticaGeneral = \"En general en la universidad del valle: \\n\";\n estadisticaGeneral += \"se encuentran: \" + EmpleadosPrioridadAlta.size() + \" empleados en prioridad alta\\n\"\n + empleadosPorPrioridad(EmpleadosPrioridadAlta)\n + \"se encuentran: \" + EmpleadosPrioridadMediaAlta.size() + \" empleados en prioridad media alta\\n\"\n + empleadosPorPrioridad(EmpleadosPrioridadMediaAlta)\n + \"se encuentran: \" + EmpleadosPrioridadMedia.size() + \" empleados en prioridad media\\n\"\n + empleadosPorPrioridad(EmpleadosPrioridadMedia)\n + \"se encuentran: \" + EmpleadosPrioridadBaja.size() + \" empleados en prioridad baja\\n\"\n + empleadosPorPrioridad(EmpleadosPrioridadBaja);\n return estadisticaGeneral;\n }", "public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}", "TGGRule createTGGRule();", "Vaisseau createVaisseau();", "public Tigre() {\r\n }", "TGG createTGG();", "public abstract Anuncio creaAnuncioGeneral();", "public VistaGraficaQytetet() {\n ArrayList <String> nombres = obtenerNombreJugadores();\n modelo = Qytetet.getInstance();\n controlador = ControladorQytetet.getInstance(nombres);\n initComponents();\n creaMenuOperacion();\n creaMenuCasilla();\n update();\n }", "SpaceInvaderTest_VaisseauImmobile_DeplacerVaisseauVersLaGauche createSpaceInvaderTest_VaisseauImmobile_DeplacerVaisseauVersLaGauche();", "private IOferta buildOfertaEjemplo4() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoLlevaXPagaY(\"11-111-1111\", 3, 2);\n\t\treturn new OfertaDinero(\"Lleva 3 paga 2 en Coca-Cola\", condicion,\n\t\t\t\tdescuento);\n\t}", "Vaisseau_estOrdonneeCouverte createVaisseau_estOrdonneeCouverte();", "public Fogon (String cocineroActual){\n Cocinero = cocineroActual;\n grados = 0; \n }", "@Override\n public ArrayList<String> Crear(){\n setVida(3500);\n Creado.add(0, Integer.toString(getVida()));\n Creado.add(1,\"150\");\n Creado.add(2,\"100\");\n Creado.add(3,\"70\");\n return Creado;\n }", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "private IOferta buildOfertaEjemplo3() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tnew PredicadoDiaSemana(Calendar.SATURDAY),\n\t\t\t\tnew ExtraerFechaCreacion());\n\t\tFunction<Compra, Float> descuento = new DescuentoFijo<>(10.0f);\n\t\treturn new OfertaDinero(\"10$ descuento sabados\", condicion,\n\t\t\t\tdescuento);\n\t}", "public Transportadora() {\r\n super();\r\n this.nif = \"\";\r\n this.raio = 0;\r\n this.precoKm = 0;\r\n this.classificacao = new Classificacao();\r\n this.estaLivre = true;\r\n this.velocidadeMed = 0;\r\n this.kmsTotal = 0;\r\n this.capacidade = 0;\r\n }", "@Test\n\tpublic void ricercaSinteticaClassificatoreGSAFigli() {\n\n\t}", "@Override\n\tpublic void generarFactura() {\n\t\t\n\t}", "public Girasol(int x,int y){\n super(x,y);\n this.setComportamiento(\"Crea 20 soles cada 2 turnos\");\n this.setVidas(1);\n this.impresion=\"G(\"+this.getVidas()+\")\";\n this.setDaño(0);\n this.setFrecuencia(2);\n }", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "public void agregarFruta(){\n\t\tcontenidos[14][17] = new Fruta();\n\t}", "private void createObstacole()\n {\n //Create Obstacole\n Obstacole topObstacole = new Obstacole(\"top\");\n Obstacole botObstacole = new Obstacole(\"bottom\");\n Obstacole midObstacole = new Obstacole(\"mid\");\n //amount of space between obstacole\n int ObstacoleSpacing = 150;\n \n //get object image\n GreenfootImage image = botObstacole.getImage();\n \n //random number to vary\n int numOfObstacoles = Greenfoot.getRandomNumber(40) + 15;\n \n //counter increment to 50\n ObstacoleCounter++;\n if (ObstacoleCounter == 50)\n {\n if (getObjects(Obstacole.class).size() < numOfObstacoles)\n {\n addObject(botObstacole, getWidth(), getHeight() / 2 + image.getHeight() - Greenfoot.getRandomNumber(100) - 10);\n addObject(topObstacole, getWidth(), botObstacole.getY() - image.getHeight() - ObstacoleSpacing);\n addObject(midObstacole, getWidth(), botObstacole.getY() + image.getHeight() / 3 + ObstacoleSpacing);\n }\n ObstacoleCounter = 0;\n }\n }", "public Gigamesh(int vel, int daño,String derecha, String izquierda,String arriba, String abajo, String ataca,String ataca2,String interact,String salta,int intervaloAtaque)\n {\n super(\"giga\",9,6,vel,daño,derecha,izquierda,arriba,abajo,ataca,ataca2,interact,salta,intervaloAtaque); \n \n }", "public static Grafo criarGrafo() {/* Este método tem função de criar um grafo. */\r\n\t\tGrafo grafo = new Grafo();/* Aqui um grafo é criado */\r\n\t\t/*\r\n\t\t * Aqui são criados nós e em seguida adcionados a lista de nós do grafo\r\n\t\t * criado\r\n\t\t */\r\n\t\tgrafo.addNo(new No(\"n1\"));\r\n\t\tgrafo.addNo(new No(\"n2\"));\r\n\t\tgrafo.addNo(new No(\"n3\"));\r\n\t\tgrafo.addNo(new No(\"n4\"));\r\n\t\tgrafo.addNo(new No(\"n5\"));\r\n\r\n\t\t/*\r\n\t\t * Aqui as arestas são criadas e seus parâmetros para o método\r\n\t\t * construtor são passados. Os vértices que compõe cada aresta são\r\n\t\t * retiradas diretamente da lista de aresta do grafo.\r\n\t\t */\r\n\t\tAresta a1 = new Aresta(\"a1\", grafo.getNos().get(0), grafo.getNos().get(4), 1);\r\n\t\tAresta a2 = new Aresta(\"a2\",grafo.getNos().get(0), grafo.getNos().get(2), 2);\r\n\t\tAresta a3 = new Aresta(\"a3\",grafo.getNos().get(1), grafo.getNos().get(3), 4);\r\n\t\tAresta a4 = new Aresta(\"a4\",grafo.getNos().get(1), grafo.getNos().get(4), 4);\r\n\t\tAresta a5 = new Aresta(\"a5\",grafo.getNos().get(2), grafo.getNos().get(3), 3);\r\n\t\tAresta a6 = new Aresta(\"a6\",grafo.getNos().get(3), grafo.getNos().get(4), 1);\r\n\r\n\t\t/* As arestas são adcionadas a lista de arestas do grafo. */\r\n\t\tgrafo.addAresta(a1);\r\n\t\tgrafo.addAresta(a2);\r\n\t\tgrafo.addAresta(a3);\r\n\t\tgrafo.addAresta(a4);\r\n\t\tgrafo.addAresta(a5);\r\n\t\tgrafo.addAresta(a6);\r\n\r\n\t\treturn grafo;/* O grafo criado é retornado */\r\n\r\n\t}", "public void creationPlateau() {\n for (int i = 0; i < 10; i++) {\n int X = rand.nextInt(14);\n int Y = rand.nextInt(14);\n if (plateau[X][Y] == null && espacementMonstre(X,Y,plateau)) {\n int monstreAleatoire = 1 + (int)(Math.random() * ((3 - 1) + 1));\n switch (monstreAleatoire) {\n case 1:\n Personnage monstreD = new Dragonnet(X,Y);\n plateau[X][Y] = monstreD;\n this.monstre.add(monstreD);\n System.out.println(\"Dragonnet ajouté en position : \"+X+\" \"+Y);\n break;\n case 2:\n Personnage monstreL = new Loup(X,Y);\n plateau[X][Y] = monstreL;\n this.monstre.add(monstreL);\n System.out.println(\"Loup ajouté en position : \"+X+\" \"+Y);\n\n break;\n case 3:\n Personnage monstreO = new Orque(X,Y);\n plateau[X][Y] = monstreO;\n this.monstre.add(monstreO);\n System.out.println(\"Orque ajouté en position : \"+X+\" \"+Y);\n break;\n }\n } else {\n i --;\n }\n }\n }", "@Override\n protected String elaboraBody() {\n String text = CostBio.VUOTO;\n int numCognomi = mappaCognomi.size();\n int numVoci = Bio.count();\n int taglioVoci = Pref.getInt(CostBio.TAGLIO_NOMI_ELENCO);\n\n text += A_CAPO;\n text += \"==Cognomi==\";\n text += A_CAPO;\n text += \"Elenco dei \";\n text += LibWiki.setBold(LibNum.format(numCognomi));\n text += \" cognomi '''differenti''' utilizzati nelle \";\n text += LibWiki.setBold(LibNum.format(numVoci));\n text += \" voci biografiche con occorrenze maggiori di \";\n text += LibWiki.setBold(taglioVoci);\n text += A_CAPO;\n text += creaElenco();\n text += A_CAPO;\n\n return text;\n }", "public void generTirarDados() {\n\r\n\t}", "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "@Transactional\n\tprivate void generateGodSet() {\n\t\tMinionCard ex1 = createMinionCard(\"Chatton transcendent\", -2, 1 , 1 , -1, \"Utilise mon energie\",\"img/cardImg/godSet/glow.jpg\");\n\t\tMinionCard ex2 = createMinionCard(\"Reda EX\", -7, 1,1, -2, \"Oh la la.\",\"img/cardImg/godSet/Reda.png\");\n\t\tMinionCard ex3 = createMinionCard(\"François EX\", -12, 1, 1, -3, \"Aujourd'hui On a Oncle Bob\",\"img/cardImg/godSet/Francois.png\");\n\t\t\n\t\tcardRepository.save(ex1);\n\t\tcardRepository.save(ex2);\n\t\tcardRepository.save(ex3);\n\t\t\n\t}", "private IOferta buildOfertaEjemplo1() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tPredicates.equalTo(MedioPago.EFECTIVO),\n\t\t\t\tnew ExtraerMedioPago());\n\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoPorcentual(5.0f),\n\t\t\t\tnew ExtraerTotalBruto());\n\n\t\treturn new OfertaDinero(\"5% descuento pago en efectivo\", condicion, descuento);\n\t}", "protected String elaboraTemplateAvviso() {\n String testo = VUOTA;\n String dataCorrente = date.get();\n String personeTxt = \"\";\n personeTxt = text.format(numVoci);\n\n if (usaHeadTemplateAvviso) {\n testo += tagHeadTemplateAvviso;\n testo += \"|bio=\";\n testo += personeTxt;\n testo += \"|data=\";\n testo += dataCorrente.trim();\n testo += \"|progetto=\";\n testo += tagHeadTemplateProgetto;\n testo = LibWiki.setGraffe(testo);\n }// end of if cycle\n\n return testo;\n }", "SpaceInvaderTest_test_unNouveauVaisseauEstCorrectementPositionneDansEspaceJeu createSpaceInvaderTest_test_unNouveauVaisseauEstCorrectementPositionneDansEspaceJeu();", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public Image getEtat() {\n final BufferedImage image = new BufferedImage(GUIModel.SCREEN_SIZE.width / 4, GUIModel.SCREEN_SIZE.height / 6, BufferedImage.TYPE_INT_ARGB);\n final Graphics2D g = image.createGraphics();\n g.setColor(Color.black);\n //g.drawRect(0, 0, image.getWidth(), image.getHeight());\n g.drawString(\"Age : \" + tamagoStats.getAge(), 0, 10);\n g.drawString(\"Faim : \" + tamagoStats.getFaim() + \"/\" + TamagoStats.FAIM_MAX, 0, 30);\n g.drawString(\"Fatigue : \" + tamagoStats.getFatigue() + \"/\" + TamagoStats.FATIGUE_MAX, 0, 50);\n g.drawString(\"Humeur : \" + tamagoStats.getHumeur() + \"/\" + TamagoStats.HUMEUR_MAX, 100, 10);\n g.drawString(\"Poids : \" + tamagoStats.getPoids() + \"/\" + TamagoStats.HUMEUR_MAX, 100, 30);\n g.drawString(\"Saleté : \" + tamagoStats.getSale() + \"/\" + TamagoStats.SALE_MAX, 100, 50);\n g.drawString(\"*Retour*\", 50, 70);\n g.dispose();\n return image;\n }", "@Override\n\tpublic void createGerant(Gerant g) {\n\t\t\n\t}", "public void eisagwgiGiatrou() {\n\t\t// Elegxw o arithmos twn iatrwn na mhn ypervei ton megisto dynato\n\t\tif(numOfDoctors < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tdoctor[numOfDoctors] = new Iatros();\n\t\t\tdoctor[numOfDoctors].setFname(sir.readString(\"DWSTE TO ONOMA TOU GIATROU: \")); // Pairnei apo ton xristi to onoma tou giatrou\n\t\t\tdoctor[numOfDoctors].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \")); // Pairnei apo ton xristi to epitheto tou giatrou\n\t\t\tdoctor[numOfDoctors].setAM(rnd.nextInt(1000000)); // To sistima dinei automata ton am tou giatrou\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t// Elegxos monadikotitas tou am tou giatrou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tif(doctor[i].getAM() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfDoctors++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS GIATROUS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "public void generarCuestionario() {\n setLayout(null);\n \n setTitle(\"Cuestionario de Fin de Curso\"); \n \n //Con el modelo construido debemos representar uestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n \n Opcion op1 = new Opcion();\n op1.setTitulo(\"Londres\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"Roma\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Paris\");\n op3.setCorrecta(true);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Oslo\");\n op4.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Cual es la capital de Francia\");\n p1.setOpciones(opciones);\n \n //Opiciones de la pregumta Numero 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Atlantico\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Indico\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Artico\");\n op23.setCorrecta(false);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Pacifico\");\n op24.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Cual es el oceano más grande del mundo?\");\n p2.setOpciones(opciones2);\n \n //Opiciones de la pregumta Numero 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"Cristobal Colon\");\n op31.setCorrecta(true);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Cristobal Nodal\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Cuahutemoc blanco\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Cuahutemoc\");\n op34.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien descubrio América?\");\n p3.setOpciones(opciones3);\n \n //Opiciones de la pregumta Numero 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"Fernanflo\");\n op41.setCorrecta(false);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Polinesios\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"Eh vegeta\");\n op43.setCorrecta(true);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Willyrex\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Quien es el mejor youtuber?\");\n p4.setOpciones(opciones4);\n \n //Opiciones de la pregumta Numero 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Amarillo patito\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Verde Sherec\");\n op52.setCorrecta(false);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Rojo me faltas tú\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Azul\");\n op54.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5 = {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿De que color es el cielo?\");\n p5.setOpciones(opciones5);\n \n //Opiciones de la pregumta Numero 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"200\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"100\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"45\");\n op63.setCorrecta(true);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"13\");\n op64.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿De cuantas localidades se compone una memoria de 8x5?\");\n p6.setOpciones(opciones6);\n \n //Opiciones de la pregumta Numero 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Try - Catch\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"IF\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Switch - Case\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"For anidado\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que estructura condicional se recomienda usar menos en una interfaz de usuario?\");\n p7.setOpciones(opciones7);\n \n //Opiciones de la pregumta Numero 8\n Opcion op81 = new Opcion();\n op81.setTitulo(\"Access\");\n op81.setCorrecta(false);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Oracle\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"MySQL\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Mongo DB\");\n op84.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Es una base de datos no relacional de uso moderno?\");\n p8.setOpciones(opciones8);\n \n //Opiciones de la pregumta Numero 9\n Opcion op91 = new Opcion();\n op91.setTitulo(\"GitHub\");\n op91.setCorrecta(true);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"MIcrosoft teams\");\n op22.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Zoom\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"Collaborate\");\n op94.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿Es una plataforma para trabajo en línea?\");\n p9.setOpciones(opciones9);\n\n //Opiciones de la pregumta Numero 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Prog. a nivel maquina\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Prog. orientada a objetos\");\n op102.setCorrecta(true);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"MySQL\");\n op103.setCorrecta(false);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"C++\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que aprendi en este curso?\");\n p10.setOpciones(opciones10);\n\n\n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n\n //Se agrega a este list la unica prgunta que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n c.setPreguntas(preguntas);\n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la preunta\n mostrarPregunta(preguntaActual);\n \n Salir.setVisible(false);\n siguiente.setEnabled(false);\n \n }", "private void crearElementos() {\n\n\t\tRotonda rotonda1 = new Rotonda(new Posicion(400, 120), \"5 de octubre\");\n\t\tthis.getListaPuntos().add(rotonda1);\n\n\t\tCiudad esquel = new Ciudad(new Posicion(90, 180), \"Esquel\");\n\t\tthis.getListaPuntos().add(esquel);\n\n\t\tCiudad trelew = new Ciudad(new Posicion(450, 200), \"Trelew\");\n\t\tthis.getListaPuntos().add(trelew);\n\n\t\tCiudad comodoro = new Ciudad(new Posicion(550, 400), \"Comodoro\");\n\t\tthis.getListaPuntos().add(comodoro);\n\n\t\tCiudad rioMayo = new Ciudad(new Posicion(350, 430), \"Rio Mayo\");\n\t\tthis.getListaPuntos().add(rioMayo);\n\n\t\t// --------------------------------------------------------\n\n\t\tRutaDeRipio rutaRipio = new RutaDeRipio(230, 230, rotonda1, esquel);\n\t\tthis.getListaRuta().add(rutaRipio);\n\n\t\tRutaPavimentada rutaPavimentada1 = new RutaPavimentada(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada1);\n\n\t\tRutaPavimentada rutaPavimentada2 = new RutaPavimentada(800, 120, esquel, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada2);\n\n\t\tRutaDeRipio rutaripio3 = new RutaDeRipio(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaripio3);\n\n\t\tRutaEnConstruccion rutaConst1 = new RutaEnConstruccion(180, 70, rioMayo, comodoro);\n\t\tthis.getListaRuta().add(rutaConst1);\n\n\t\tRutaPavimentada rutaPavimentada3 = new RutaPavimentada(600, 110, rioMayo, esquel);\n\t\tthis.getListaRuta().add(rutaPavimentada3);\n\t}", "public Tetraedro(double base, double altura){\n c = new Triangulo(base, altura);\n }", "public void creationSable(){\n\t\tfor(int x=2;x<=this.taille-3;x++) {\n\t\tfor(int y=2;y<=this.taille-3;y++) {\n\t\tif( grille.get(x).get(y).getTypeOccupation()==0 &&\n\t\t\t\tgrille.get(x+2).get(y).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x+2).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y+2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x-2).get(y-2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x).get(y-2).getTypeOccupation()!=3 &&\n\t\t\t\tgrille.get(x+2).get(y-2).getTypeOccupation()!=3 ) {\n\t\t\t\n\t\t\tint[] coord = new int[2];\n\t\t\tcoord[0]=x;\n\t\t\tcoord[1]=y;\n\t\t\tSable sable = new Sable(coord);\n\t\t\tgrille.get(x).set(y, sable);\n\t\t}\n\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "@Override\n\tpublic void createCpteEpargne(CompteEpargne cpt) {\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 }", "private void utvidtabellen() {\n\t\tCD[] hjelpeTab;\n\t\tif (cdTabell.length == 0) {\n\t\t\thjelpeTab = new CD[1];\n\t\t\tmaksAntall = 1;\n\t\t} else {\n\t\t\thjelpeTab = new CD[(int) Math.ceil(cdTabell.length * 1.1)];\n\t\t\tmaksAntall = hjelpeTab.length;\n\t\t}\n\t\tfor (int i = 0; i < cdTabell.length; i++) {\n\t\t\thjelpeTab[i] = cdTabell[i];\n\t\t}\n\t\tcdTabell = hjelpeTab;\n\t}", "public void primerPunto() {\n\t\tp = new PuntoAltaPrecision(this.xCoord, this.yCoord);\n\t\t// Indicamos la trayectoria por la que va la pelota\n\t\tt = new TrayectoriaRecta(1.7f, p, false);\n\t}", "public int initialiser()\n\t{\n\n\t\tint nombreE;\n\t\tint k = 0;\n\t\t//int max = randInt(2,10);\n\t\ttableauPeres_ = new Case[longueur_][longueur_];\n\t\tint i, j = 0;\n\t\tfor(i=0; i<longueur_; ++i)\n\t\t{\n\t\t\tfor(j=0; j<longueur_; ++j)\n\t\t\t{\n\t\t\t\ttableauPeres_[i][j] = new Case(i, j, 0);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Combien d'étoiles souhaitez vous pour chaque joueur ?\");\n\t\tnombreE = clavier.nextInt();\n\t\twhile (k < nombreE)\n\t\t{\n\t\t\taddEtoile(\"bleu\");\n\t\t\taddEtoile(\"rouge\");\n\t\t\t++k;\n\t\t}\n\t\treturn nombreE;\n\t}", "PlateauGauffre(int largeur, int hauteur)\n {\n this(new Boolean[largeur][hauteur]);\n for (int x = 0; x < getLargeur(); x++)\n {\n for (int y = 0; y < getHauteur(); y++)\n {\n setAt(x, y, true);\n }\n }\n }", "public Tarea(String descripcionTarea)\n {\n //Añade la descripción de la tarea\n descripcion = descripcionTarea;\n tareaCompletada = false;\n //Por defecto, las tareas tienen prioridad 0\n prioridad = 0;\n //Las nuevas tareas no tienen fecha de vencimiento\n fechaVencimiento = null;\n }", "public Espacio() {\n dib=new Dibujo(\"Simulacion de satelites\", 800,800);\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta();\n }", "private RicercaSinteticaCapitoloEPrev creaUtilityRicercaSinteticaCapitoloEPrev() {\n\t\tRicercaSinteticaCapitoloEPrev utility = new RicercaSinteticaCapitoloEPrev();\n\t\t\n\t\tutility.setAnnoEsercizio(getAnnoEsercizioInt());\n\t\tutility.setAnnoCapitolo(getAnnoCapitoloDaConsultare());\n\t\tutility.setNumeroCapitolo(getNumeroCapitoloDaConsultare());\n\t\tutility.setNumeroArticolo(getNumeroArticoloDaConsultare());\n\t\t\n\t\treturn utility;\n\t}", "public void crearGloboVerde(int tiempo){ \n GloboVerde globov = new GloboVerde();\n globoslista.add(globov);\n double posicionx = generarPosicionX();\n globov.fijarPosicion(posicionx);\n \n gpane.getChildren().addAll(globov);\n MoverGlobo mv = new MoverGlobo(globov,tiempo);\n mov= new Thread(mv);\n mov.start(); \n }", "private void setUpFrom(){\n\t\tEPVentanaTemporal ven = new EPVentanaTemporal();\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\t//setemamos la ventana.\n\t\tven.setNombre(\"time_batch\");\n\t\tven.setValor(\"10\");\n\t\tven.setUnidadTemporal(\"seconds\");\n\t\tven.setPseudonombre(\"a1\");\n\t\tpro.setNombre(\"p4\");\n\t\tpro.setPseudonombre(\"\");\n\t\tpro.setVentana(ven);\n\t\texpresionesFrom.add(pro);\n\t}", "Vaisseau_seDeplacerVersLaGauche createVaisseau_seDeplacerVersLaGauche();", "public TipoPrestamo() {\n\t\tsuper();\n\t}", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "public void CrearGrafico() {\r\n String ret = \"\";\r\n String NombreClase = this.generic.getClass().getSimpleName();\r\n ret += \"public \" + NombreClase + \" Crear\" + NombreClase + \"(int Serie) {\\n\";\r\n System.out.println(\"public static \" + NombreClase + \" Crear\" + NombreClase + \"(int Serie) {\");\r\n Field[] declaredFields = this.DeclaredFields;\r\n int NumVariables = this.DeclaredFields.length;\r\n for (int i = 0; i < NumVariables; i++) {\r\n boolean notParseable = false;\r\n String Tipo = declaredFields[i].getType().getSimpleName();\r\n String Dato = declaredFields[i].getName();\r\n switch (Tipo) {\r\n case \"int\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"(int) \" + this.SpinnerName + this.NumSpinners + \".getValue();\");\r\n NumSpinners++;\r\n break;\r\n case \"double\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"Double.parseDouble(\" + this.getDoubleTextFieldName() + \".getText()\" + \")\");\r\n break;\r\n case \"String\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(this.StrTextFieldName + \".getText();\");\r\n break;\r\n case \"boolean\":\r\n notParseable = false;\r\n System.out.print(\"int op = \");\r\n System.out.println(\"JOptionPane.showConfirmDialog(null, \\\"\" + Dato + \"?\\\");\");\r\n System.out.println(Tipo + \" \" + Dato + \" = \" + \"(op==0);\");\r\n break;\r\n case \"Date\":\r\n notParseable = false;\r\n System.out.println(Tipo + \" \" + Dato + \" = new Date();\");\r\n break;\r\n default:\r\n notParseable = false;\r\n break;\r\n }\r\n // char 34 es ( \" ), tuve que usar char porque no se como poner comillas en los souts...\r\n if (notParseable) {\r\n System.out.print((char) 34);\r\n System.out.print(Dato + \": \");\r\n System.out.print((char) 34);\r\n System.out.println(\"));\");\r\n }\r\n }\r\n NumVariables = this.SuperDeclaredFields.length;\r\n for (int i = 0; i < NumVariables; i++) {\r\n boolean notParseable = false;\r\n String Tipo = this.SuperDeclaredFields[i].getType().getSimpleName();\r\n String Dato = this.SuperDeclaredFields[i].getName();\r\n switch (Tipo) {\r\n case \"int\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"(int) \" + this.SpinnerName + this.NumSpinners + \".getValue();\");\r\n NumSpinners++;\r\n break;\r\n case \"double\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(\"Double.parseDouble(\" + this.getDoubleTextFieldName() + \".getText()\" + \");\");\r\n break;\r\n case \"String\":\r\n System.out.print(Tipo + \" \" + Dato + \" = \");\r\n System.out.println(this.StrTextFieldName + \".getText();\");\r\n break;\r\n case \"boolean\":\r\n notParseable = false;\r\n System.out.print(\"int op = \");\r\n System.out.println(\"JOptionPane.showConfirmDialog(null, \\\"\" + Dato + \"?\\\");\");\r\n System.out.println(Tipo + \" \" + Dato + \" = \" + \"(op==0);\");\r\n break;\r\n case \"Date\":\r\n notParseable = false;\r\n System.out.println(Tipo + \" \" + Dato + \" = new Date();\");\r\n break;\r\n default:\r\n notParseable = false;\r\n break;\r\n }\r\n // char 34 es ( \" ), tuve que usar char porque no se como poner comillas en los souts...\r\n if (notParseable) {\r\n System.out.print((char) 34);\r\n System.out.print(Dato + \": \");\r\n System.out.print((char) 34);\r\n System.out.println(\"));\");\r\n }\r\n }\r\n\r\n System.out.print(NombreClase + \" c = new \" + NombreClase + \"(\");\r\n /*\r\n -------------OJO----------------------\r\n Aqui no pude hacer que tirara los valores que queria en el orden que es, si alguien quiere Arreglarlo, digame.\r\n En la parte que es: \r\n \r\n NombreClase c = new NombreClase();\r\n \r\n Poner Ctrl+Space y enter en medio de los parentesis y Netbeans Automaticamente hace el que tiene mas sentido\r\n --------------------------------------\r\n */\r\n System.out.println(\");\");\r\n System.out.println(\"return c;\");\r\n System.out.println(\"}\");\r\n System.out.println(\"\");\r\n }", "public Personnage attaqueSurPersonnage() {\n\t\tdouble rand = Math.random();\n\t\t\tif (rand >= 0.85){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce() * 2;\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'C';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse if ((rand < 0.85) && (rand >= 0.15)){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce();\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'N';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tetatAttaque = 'F';\n\t\t\t\tfrappeMonstre = 0;\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t}", "public Curso() {\n\t\tthis.alumnos = new ArrayList<Alumno>();\n\t\tcupo = 0;\n\t\tcreditos = 0;\n\t}", "public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}", "Elevage createElevage();", "public Nodo_Bodega ultimaAgregada(){\n return Nodo_bodega_final;\n }", "public void makeTea(){\n size();\n temp();\n type();\n additives();\n }", "public abstract Anuncio creaAnuncioIndividualizado();", "private IOferta buildOfertaEjemplo6() {\n\t\tPredicate<Compra> condicion = new PredicadoCupon(\"11111\");\n\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoFijo<>(10.0f),\n\t\t\t\tnew ExtraerTotalBruto());\n\n\t\treturn new OfertaDinero(\"$10 cupon\", condicion, descuento);\n\t}", "public void crearGloboRojo(int tiempo){ \n GloboRojo globor = new GloboRojo();\n double posicionx = generarPosicionX();\n globor.fijarPosicion(posicionx);\n globoslista.add(globor);\n gpane.getChildren().addAll(globor); \n MoverGlobo mv = new MoverGlobo(globor,tiempo);\n mov= new Thread(mv);\n mov.start(); \n }", "protected void generar() {\n generar(1, 1);\n }", "private String tulostuksenApu(){\r\n String apu = \"Rivitiedosto: \";\r\n for(int i = 0; i<rivitiedot.length; i++){\r\n apu = apu + i+\": \";\r\n for(int k = 1; k <= rivitiedot[i].getKoko(); k++){\r\n apu = apu + \" \"+rivitiedot[i].get(k);\r\n }\r\n apu = apu + \" \";\r\n }\r\n\r\n return apu;\r\n }", "SpaceInvaderTest_test_unNouveauVaisseauAvecDimensionEstCorrectementPositionneDansEspaceJeu createSpaceInvaderTest_test_unNouveauVaisseauAvecDimensionEstCorrectementPositionneDansEspaceJeu();", "Vaisseau_positionner createVaisseau_positionner();", "public SiacTRecapitoSoggetto() {\n\t}", "public void genererchemin() {\r\n\t\tRandom hauteur1 = new Random();\r\n\t\tRandom longueur2 = new Random();\r\n\t\tRandom choix = new Random();\r\n\t\tArrayList chemin = new ArrayList();\r\n\t\tSystem.out.println(this.getHauteur());\r\n\t\tSystem.out.println(this.getLargeur());\r\n\t\tint milieu = getLargeur() / 2;\r\n\t\t//System.out.println(milieu);\r\n\t\tCoordonnees c = new Coordonnees(milieu, hauteur1.nextInt(\r\n\t\t\t\tgetLargeur()));\r\n\t\tchemin.add(c);\r\n\t\tchemin.add(new Coordonnees(0, 0));\r\n\t\tchemin.add(new Coordonnees(getLargeur() - 1, getHauteur() - 1));\r\n\t\tCoordonnees droite = new Coordonnees(milieu + 1, c.getHauteur());\r\n\t\tchemin.add(droite);\r\n\t\tCoordonnees gauche = new Coordonnees(milieu - 1, c.getHauteur());\r\n\t\tchemin.add(gauche);\r\n\t\tCoordonnees base1 = new Coordonnees(0, 0);\r\n\t\tCoordonnees base2 =new Coordonnees(getLargeur() - 1, getHauteur() - 1);\r\n\r\n\t\twhile (!gauche.equals(base1)) {\r\n\t\t\tif (gauche.getLargeur() == 0) {\r\n\t\t\t\tgauche = new Coordonnees(0, gauche.getHauteur() - 1);\r\n\t\t\t\tchemin.add(gauche);\r\n\t\t\t} else if (gauche.getHauteur() == 0) {\r\n\t\t\t\tgauche = new Coordonnees(gauche.getLargeur() - 1, 0);\r\n\t\t\t\tchemin.add(gauche);\r\n\t\t\t}\r\n\t\t\telse if (choix.nextInt(2) == 0) {\r\n\t\t\t\tgauche = new Coordonnees(gauche.getLargeur() - 1, \r\n\t\t\t\t\t\tgauche.getHauteur());\r\n\t\t\t\tchemin.add(gauche);\r\n\t\t\t} else {\r\n\t\t\t\tgauche = new Coordonnees(gauche.getLargeur(), \r\n\t\t\t\t\t\tgauche.getHauteur() - 1);\r\n\t\t\t\tchemin.add(gauche);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\twhile (!droite.equals(base2)) {\r\n\t\t\tif (droite.getLargeur() == (this.largeur -1)) {\r\n\t\t\t\tdroite = new Coordonnees(droite.getLargeur(), \r\n\t\t\t\t\t\tdroite.getHauteur() + 1);\r\n\t\t\t\tchemin.add(droite);\r\n\r\n\t\t\t} else if (droite.getHauteur() == (this.hauteur -1)) {\r\n\t\t\t\tdroite = new Coordonnees(droite.getLargeur() + 1, \r\n\t\t\t\t\t\tdroite.getHauteur());\r\n\t\t\t\tchemin.add(droite);\r\n\t\t\t\t//System.out.println(\"fais chier\");\r\n\t\t\t}\r\n\t\t\telse if (choix.nextInt(2) == 0) {\r\n\t\t\t\tdroite = new Coordonnees(droite.getLargeur() + 1, \r\n\t\t\t\t\t\tdroite.getHauteur());\r\n\t\t\t\tchemin.add(droite);\r\n\t\t\t} else {\r\n\t\t\t\tdroite = new Coordonnees(droite.getLargeur(), \r\n\t\t\t\t\t\tdroite.getHauteur() + 1);\r\n\t\t\t\tchemin.add(droite);\r\n\t\t\t}\r\n\t\t}\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Quel est le pourcentage d'obstacle souhaite :\");\r\n\t\tint pourcentage = sc.nextInt();\r\n\t\tint ctp = getHauteur() * getLargeur() * pourcentage / 100;\r\n\t\twhile(ctp >0){\r\n\t\t\tCoordonnees obstacle = new Coordonnees(longueur2.nextInt(getLargeur()), \r\n\t\t\t\t\thauteur1.nextInt(getHauteur()));\r\n\t\t\t//System.out.println(!chemin.contains(obstacle));\r\n\t\t\tif (!chemin.contains(obstacle)) {\r\n\t\t\t\tthis.plateau[obstacle.getHauteur()][obstacle.getLargeur()] = new Obstacle(\r\n\t\t\t\t\t\tobstacle.getHauteur(), obstacle.getLargeur());\r\n\t\t\t\tctp--;\r\n\t\t\t} else {\r\n\t\t\t\t//System.out.println(obstacle + \"est sur le chemin\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Plateau(int largeur, int hauteur) {\r\n\t\tplateau = new Cellule[hauteur][largeur];\r\n\t\tint equipe = 1;\r\n\t\tfor (int i=0; i<hauteur; i++) {\r\n\t\t\tfor (int j=0; j<largeur; j++) {\r\n\t\t\t\tif ((i == 0 && j == 0) || (i == hauteur-1 && j == largeur -1))\r\n\t\t\t\t\tplateau[i][j] = new Base(j,i,equipe++);\r\n\t\t\t\telse\r\n\t\t\t\t\tplateau[i][j] = new Case(j,i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.hauteur = hauteur;\r\n\t\tthis.largeur = largeur;\r\n\t}", "public static void main(String[] args) { \n /* Grafo grafo = new Grafo();\n \n No no;\n no = new No(\"1\");//0\n grafo.addNo(no);\n no = new No(\"2\");//1\n grafo.addNo(no);\n no = new No(\"3\");//2\n grafo.addNo(no);\n no = new No(\"4\");//3\n grafo.addNo(no);\n no = new No(\"5\");//4\n grafo.addNo(no);\n no = new No(\"6\");//5\n grafo.addNo(no);\n no = new No(\"7\");//6\n grafo.addNo(no);\n \n //Cria as arestas do nó\n \n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(1), 2);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(2), 5);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(3), 4);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(2), 2);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(4), 7);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(3), 1);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(4), 4);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(5), 3);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(5), 4);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(5), 1);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(6), 5);\n Aresta.inserirAresta(grafo.getNo(5), grafo.getNo(6), 7);\n \n No no;\n no = new No(\"SF\");//0\n grafo.addNo(no);\n no = new No(\"LA\");//1\n grafo.addNo(no);\n no = new No(\"D\");//2\n grafo.addNo(no);\n no = new No(\"C\");//3\n grafo.addNo(no);\n no = new No(\"A\");//4\n grafo.addNo(no);\n no = new No(\"B\");//5\n grafo.addNo(no);\n no = new No(\"NY\");//6\n grafo.addNo(no);\n no = new No(\"M\");//7\n grafo.addNo(no);\n \n \n //Cria as arestas do nó\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(1), 39);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(2), 89);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(3), 120);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(6), 210);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(2), 50);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(6), 170);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(3), 65);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(5), 79);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(6), 59);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(4), 99);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(6), 80);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(7), 70);\n Aresta.inserirAresta(grafo.getNo(5), grafo.getNo(6), 20);\n Aresta.inserirAresta(grafo.getNo(6), grafo.getNo(7), 66);*/\n \n Grafo grafo = GrafoAleatorioKruskal.gerar(1000, 10, 10, 100);\n //Gera a arvore geradora com custo minimo\n grafo.kruskal();\n \n //TESTE\n int teste = grafo.getNo(0).getConjunto();\n boolean answer = true;\n for(No n : grafo.getNos()){\n if (teste!= n.getConjunto()){\n answer = false;\n }\n }\n if(answer){\n System.out.println(\"Todos os nós pertecem ao mesmo conjunto\");\n }\n else{\n System.out.println(\"Deu erro\");\n }\n }", "Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }", "public Cerchio(double raggio){\n this.raggio = raggio;\n }" ]
[ "0.6555631", "0.61688924", "0.6153913", "0.61501", "0.61405605", "0.606594", "0.60649484", "0.5909096", "0.5902805", "0.5862171", "0.5860329", "0.5848256", "0.57986385", "0.5781966", "0.57756466", "0.57604784", "0.5758899", "0.5745077", "0.5738786", "0.5719443", "0.5718238", "0.5714806", "0.5714433", "0.5713957", "0.57097065", "0.5676008", "0.566775", "0.5662031", "0.56538147", "0.56505793", "0.564724", "0.56269735", "0.56182003", "0.56156534", "0.5604054", "0.56000215", "0.5589303", "0.5586967", "0.5585352", "0.5581674", "0.5569563", "0.5568998", "0.55663484", "0.55641633", "0.5563027", "0.5559801", "0.55496025", "0.5538988", "0.55374485", "0.5536362", "0.55305254", "0.55288386", "0.5527315", "0.5526141", "0.552055", "0.55148846", "0.5507936", "0.55073756", "0.54995775", "0.5498259", "0.5497753", "0.54798985", "0.5479564", "0.54751146", "0.5472655", "0.5466642", "0.5465546", "0.54605925", "0.54577464", "0.54555374", "0.54441124", "0.5441197", "0.54347533", "0.5422631", "0.5422337", "0.5421641", "0.5420133", "0.5418349", "0.5415705", "0.54043", "0.5402218", "0.5401816", "0.5400756", "0.5400676", "0.5400151", "0.539893", "0.53975", "0.53946096", "0.5388592", "0.5386997", "0.5382898", "0.5381261", "0.53697234", "0.5362793", "0.5359459", "0.53580636", "0.5348497", "0.53414917", "0.53351825", "0.5331943", "0.5328811" ]
0.0
-1
CREO UN TREEELEM PER OGNI TEMPLATE
private TreeItem<String> makeTemplateBranch(final String gestureName, final TreeItem<String> parent) { final TreeItem<String> item = new TreeItem<>(gestureName); item.setGraphic(ViewUtilities.iconSetter(Material.SHOW_CHART, IconDim.SMALL)); parent.getChildren().add(item); return item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "private Template makeTemplate() {\n return new Template(\"spamHardGenerated\", \"SPAM HARD\\n$$template_EOO\\n\" + sendedWorld.getText() + \"\\n$$template_EOF\\n$$var_name osef\\n$$var_surname osef\");\n }", "protected String elaboraTemplateAvviso() {\n String testo = VUOTA;\n String dataCorrente = date.get();\n String personeTxt = \"\";\n personeTxt = text.format(numVoci);\n\n if (usaHeadTemplateAvviso) {\n testo += tagHeadTemplateAvviso;\n testo += \"|bio=\";\n testo += personeTxt;\n testo += \"|data=\";\n testo += dataCorrente.trim();\n testo += \"|progetto=\";\n testo += tagHeadTemplateProgetto;\n testo = LibWiki.setGraffe(testo);\n }// end of if cycle\n\n return testo;\n }", "private native String getTemplate()/*-{\r\n\t\t\t\treturn ['<tpl for=\".\">', \r\n\t\t\t '<div class=\"x-customer-item\">', \r\n\t\t\t\t '<div class=\"name\">{name}</div>', \r\n\t\t\t\t '<div class=\"email\">E-mail:{email}</div>', \r\n\t\t\t\t '<div class=\"purchases\">Purchases:{purchases}</div>', \r\n\t\t\t '</div>', \r\n\t\t\t '</tpl>', \r\n\t\t\t ''].join(\"\");\r\n\t\t\t}-*/;", "@Override\n\tpublic void createCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}", "protected void createContents() {\n\n\t}", "private Template() {\r\n\r\n }", "Compleja createCompleja();", "public void generTirarDados() {\n\r\n\t}", "public void createTemp(String TemplateType){\r\n ts.create(TemplateType);\r\n }", "public void generarContrato() {\r\n\t\ttry {\r\n\t\t\tString nombre = Contrato.generarContrato(estudiante, periodo, reserva.getArrSitioPeriodo().getSitNombre());\r\n\t\t\tnombre = \"Contrato_\" + estudiante.getId().getPerDni() + \".zip\";\r\n\t\t\tthis.zip(estudiante.getId().getPerDni(), periodo.getPrdId());\r\n\t\t\tFunciones.descargarZip(url_contrato+ nombre);\r\n\t\t\t// MODIFICAR NOMBRE CONTRATO\r\n\t\t\tmngRes.agregarContratoReserva(estudiante, periodo.getPrdId());\r\n\t\t} catch (Exception e) {\r\n\t\t\tFunciones.descargarPdf(url_contrato + \"error.pdf\");\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t}", "public static String generaTemp(){\n return \"t$\"+temp++;\n }", "public static String generaTemp(){\n return \"t$\"+temp++;\n }", "public static String generaTemp(){\n return \"t$\"+temp++;\n }", "public static String generaTemp(){\n return \"t$\"+temp++;\n }", "private HTMLElement newtd(String contenido) {\n/* 375 */ HTMLElement td = (HTMLElement)this.pagHTML.createElement(\"td\");\n/* 376 */ td.appendChild(this.pagHTML.createTextNode(contenido));\n/* 377 */ td.setAttributeNode(newAttr(\"class\", \"ctd\"));\n/* 378 */ return td;\n/* */ }", "@Override\r\n\tpublic void creerTVA(TVA t) {\n\t\t\r\n\t}", "Compuesta createCompuesta();", "public void createCompte(Compte compte);", "java.lang.String getTemplateId();", "public void creatTemplate(Sheet sheet, String title) {\n\n String label1 = \"TẬP ĐOÀN VIỄN THÔNG QUÂN ĐỘI\";\n String label2 = \"TỔNG CÔNG TY VIỄN THÔNG VIETTEL\";\n String label3 = \"CỘNG HOÀ XÃ HỘI CHỦ NGHĨA VIỆT NAM\";\n String label4 = \"Độc Lập - Tự Do - Hạnh Phúc\";\n\n createCellObject(sheet, 0, 0, label1, getCsSubTitle());\n createCellObject(sheet, 0, 1, label2, getCsCenterNoboderBoldweight());\n createCellObject(sheet, 5, 0, label3, getCsSubTitle());\n createCellObject(sheet, 5, 1, label4, getCsCenterNoboderBoldweight());\n createCellObject(sheet, 1, 4, title, getCsTitle());\n\n ExcelWriterUtils.mergeCells(sheet, 0, 0, 0, 2);\n ExcelWriterUtils.mergeCells(sheet, 1, 1, 0, 2);\n ExcelWriterUtils.mergeCells(sheet, 0, 0, 5, 8);\n ExcelWriterUtils.mergeCells(sheet, 1, 1, 5, 8);\n ExcelWriterUtils.mergeCells(sheet, 4, 4, 1, 6);\n\n setRowHeight(sheet, 4, 630);\n }", "String getTemplate();", "protected String elaboraTemplate(String testoIn) {\n return testoIn;\n }", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "public abstract Anuncio creaAnuncioTematico();", "public void crear(Tarea t) {\n t.saveIt();\n }", "private String getTemplate(){ \r\n\t\t\t StringBuilder sb = new StringBuilder();\r\n\t\t\t sb.append(\"<tpl for=\\\".\\\">\");\r\n\t\t\t\tsb.append(\"<div class=\\\"x-combo-list-item\\\" >\");\r\n\t\t\t\tsb.append(\"<span><b>{name}</b></span>\"); \t\t\t \t\r\n\t\t\t\tsb.append(\"</div>\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t return sb.toString();\r\n\t\t\t}", "public void setTemplate(Template template)\n/* */ {\n/* 62 */ this.template = template;\n/* */ }", "public TemplateHelper() {\r\t\tsuper();\r\t}", "TT createTT();", "protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void addToTemplates() {\n mTemplateId = mPreferenceManager.getTemplateId();\n if (isConverted) {\n if (mPreferenceManager.getTemplateId().equals(ConstantsManager.CONVERTER_TEMPLATE_ID_DEFAULT)) {\n mTemplateId = mDatabaseManager.getTemplateNewId();\n mPreferenceManager.setTemplateId(mTemplateId);\n saveTemplate(mToastCreated);\n } else {\n showDialog();\n }\n } else {\n mBaseActivity.showToast(mToastFailure);\n }\n }", "private TipoAtaque generateTipoAtaque() {\n\t\treturn null;\r\n\t}", "Atributo createAtributo();", "public void generar() throws Exception {\n\t\tAnalizador_Sintactico.salida.generar(\".DATA\", \"genero los datos estaticos para la clase \"+this.nombre);\r\n\t\tAnalizador_Sintactico.salida.generar(\"VT_\"+nombre+\":\",\" \");\r\n\t\t\r\n\t\tboolean esDinamico=false;\r\n\t\t\r\n\t\t//para cada metodo, genero la etiqueta dw al codigo\r\n\t\tfor (EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\tAnalizador_Sintactico.salida.gen_DW(\"DW \"+m.getEtiqueta(),\"offset: \"+m.getOffsetMetodo(),m.getOffsetMetodo());\r\n\t\t\t\tesDinamico=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tAnalizador_Sintactico.salida.agregar_DW();\r\n\t\t\r\n\t\t//si NO hay ningun metodo dinamico -> VT con NOP\r\n\t\tif (! esDinamico)\r\n\t\t\tAnalizador_Sintactico.salida.generar(\"NOP\",\"no hago nada\");\r\n\t\t\r\n\t\t//genero codigo para todos los metodos\r\n\t\tAnalizador_Sintactico.salida.generar(\".CODE\",\"seccion codigo de la clase \"+this.nombre);\r\n\t\t\r\n\t\tList<EntradaPar> listaParams;\r\n\t\tfor(EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(m);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= m.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\t\r\n\t\t\t\t//si es dinamico m -> offset desde 3\r\n\t\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\t\tp.setOffset((listaParams.size() +4) - p.getUbicacion());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t//si es estatico m -> offset desde 2\r\n\t\t\t\t\tp.setOffset((listaParams.size() +3) - p.getUbicacion());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//genero el codigo del cuerpo de ese metodo\r\n\t\t\tm.generar();\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//genero codigo para todos los constructores\r\n\t\tfor(EntradaCtor c: entradaCtor.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(c);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= c.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\tp.setOffset(listaParams.size() +4 - p.getUbicacion());\t// +4 porque el ctor tiene this\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t//genero el codigo de ese metodo\r\n\t\t\tc.generar();\r\n\t\t}\t\r\n\t}", "public String altaGenero(){\n int id = coleccionGenero.size() + 1;\n Genero gen = new Genero(id, generoSeleccionado);\n //graba en bd\n GeneroService serv = new GeneroService();\n //refrescar otra vez la lista\n return \"lista-genero\";\n }", "TR createTR();", "@Override\n\tpublic boolean create(NPC_tmpl obj) {\n\t\treturn false;\n\t}", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "@Test\n public void fieldTemplate() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // We can set a template name using by the fields. This property is used when the \"doc.AttachedTemplate\" is empty.\n // If this property is empty the default template file name \"Normal.dotm\" is used.\n doc.getFieldOptions().setTemplateName(\"\");\n\n FieldTemplate field = (FieldTemplate) builder.insertField(FieldType.FIELD_TEMPLATE, false);\n Assert.assertEquals(field.getFieldCode(), \" TEMPLATE \");\n\n builder.writeln();\n field = (FieldTemplate) builder.insertField(FieldType.FIELD_TEMPLATE, false);\n field.setIncludeFullPath(true);\n\n Assert.assertEquals(field.getFieldCode(), \" TEMPLATE \\\\p\");\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.TEMPLATE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.TEMPLATE.docx\");\n\n field = (FieldTemplate) doc.getRange().getFields().get(0);\n Assert.assertEquals(\" TEMPLATE \", field.getFieldCode());\n Assert.assertEquals(\"Normal.dotm\", field.getResult());\n\n field = (FieldTemplate) doc.getRange().getFields().get(1);\n Assert.assertEquals(\" TEMPLATE \\\\p\", field.getFieldCode());\n Assert.assertEquals(\"Normal.dotm\", field.getResult());\n }", "public ArrayList setImageTemplate() {\n imageTemplate = new ArrayList();\n imageTemplate.add(0,\"template\");//Integer : จำนวนเทมเพลต\n imageTemplate.add(1,\"marge_one_stroke\");//Float : marge one stroke in purcent\n imageTemplate.add(2,\"marge_one_color\");//String : color in hex\n imageTemplate.add(3,\"marge_two_stroke\");//Float : marge two stroke in purcent\n imageTemplate.add(4,\"marge_two_color\");//String : color in hex\n imageTemplate.add(5,\"top_value\");//Float : position of value top for the line\n imageTemplate.add(6,\"bottom_value\");//Float : position of value bottom for the line\n imageTemplate.add(7,\"right_value\");//Float : position of value right for the line\n imageTemplate.add(8,\"left_value\");//Float : position of value left for the line\n imageTemplate.add(9,\"center_x\");//Float : position of value x for the line\n imageTemplate.add(10,\"center_y\");//Float : position of value y for the line\n return (imageTemplate);\n }", "@Override\n protected String elaboraBody() {\n String text = CostBio.VUOTO;\n int numCognomi = mappaCognomi.size();\n int numVoci = Bio.count();\n int taglioVoci = Pref.getInt(CostBio.TAGLIO_NOMI_ELENCO);\n\n text += A_CAPO;\n text += \"==Cognomi==\";\n text += A_CAPO;\n text += \"Elenco dei \";\n text += LibWiki.setBold(LibNum.format(numCognomi));\n text += \" cognomi '''differenti''' utilizzati nelle \";\n text += LibWiki.setBold(LibNum.format(numVoci));\n text += \" voci biografiche con occorrenze maggiori di \";\n text += LibWiki.setBold(taglioVoci);\n text += A_CAPO;\n text += creaElenco();\n text += A_CAPO;\n\n return text;\n }", "public interface VistaListacomprasnoclienteModel extends TemplateModel {\n // Add setters and getters for template properties here.\n }", "private void createContents() throws SQLException {\n\t\tshell = new Shell(getParent(), SWT.SHELL_TRIM);\n\t\tshell.setImage(user.getIcondata().BaoduongIcon);\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\tsetText(\"Tạo Công việc (Đợt Bảo dưỡng)\");\n\t\tshell.setSize(777, 480);\n\t\tnew FormTemplate().setCenterScreen(shell);\n\n\t\tFill_ItemData fi = new Fill_ItemData();\n\n\t\tSashForm sashForm = new SashForm(shell, SWT.NONE);\n\t\tsashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));\n\n\t\tSashForm sashForm_3 = new SashForm(sashForm, SWT.VERTICAL);\n\n\t\tSashForm sashForm_2 = new SashForm(sashForm_3, SWT.NONE);\n\t\tComposite composite = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setText(\"Tên đợt Bảo dưỡng*:\");\n\n\t\ttext_Tendot_Baoduong = new Text(composite, SWT.BORDER);\n\t\ttext_Tendot_Baoduong.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\n\t\tLabel label_3 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_3 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_3.verticalIndent = 3;\n\t\tlabel_3.setLayoutData(gd_label_3);\n\t\tlabel_3.setText(\"Loại phương tiện:\");\n\n\t\tcombo_Loaiphuongtien = new Combo(composite, SWT.READ_ONLY);\n\t\tcombo_Loaiphuongtien.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\tFill_ItemData f = new Fill_ItemData();\n\t\t\t\t\tif ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Xemay()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Xemay());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t} else if ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Oto()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Oto());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcombo_Loaiphuongtien.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));\n\t\tfi.setComboBox_LOAIPHUONGTIEN_Phuongtien_Giaothong(combo_Loaiphuongtien, 0);\n\n\t\tLabel label_4 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_4 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_4.verticalIndent = 3;\n\t\tlabel_4.setLayoutData(gd_label_4);\n\t\tlabel_4.setText(\"Mô tả:\");\n\n\t\ttext_Mota = new Text(composite, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\n\t\ttext_Mota.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1));\n\t\tnew Label(composite, SWT.NONE);\n\n\t\tbtnNgunSaCha = new Button(composite, SWT.NONE);\n\t\tGridData gd_btnNgunSaCha = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnNgunSaCha.widthHint = 85;\n\t\tbtnNgunSaCha.setLayoutData(gd_btnNgunSaCha);\n\t\tbtnNgunSaCha.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tChonNguonSuachua_Baoduong cnsb = new ChonNguonSuachua_Baoduong(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\tcnsb.open();\n\t\t\t\t\tnsb = cnsb.getResult();\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null) {\n\t\t\t\t\t\tfillNguonSuachuaBaoduong(nsb);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (nsb == null) {\n\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CLOSE);\n\t\t\t\t\t\tm.setText(\"Xóa dữ liệu cũ?\");\n\t\t\t\t\t\tm.setMessage(\"Bạn muốn xóa dữ liệu cũ?\");\n\t\t\t\t\t\tint rc = m.open();\n\t\t\t\t\t\tswitch (rc) {\n\t\t\t\t\t\tcase SWT.CANCEL:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.YES:\n\t\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(-1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.NO:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t}\n\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG(ViewAndEdit_MODE_dsb);\n\t\t\t\t\tfillNguonSuachuaBaoduong(ViewAndEdit_MODE_dsb);\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnNgunSaCha.setText(\"Liên hệ\");\n\t\tbtnNgunSaCha.setImage(user.getIcondata().PhoneIcon);\n\n\t\tComposite composite_1 = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite_1.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblSXut = new Label(composite_1, SWT.NONE);\n\t\tlblSXut.setText(\"Số đề xuất: \");\n\n\t\ttext_Sodexuat = new Text(composite_1, SWT.NONE);\n\t\ttext_Sodexuat.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Sodexuat.setEditable(false);\n\t\ttext_Sodexuat.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyThng = new Label(composite_1, SWT.NONE);\n\t\tlblNgyThng.setText(\"Ngày tháng: \");\n\n\t\ttext_NgaythangVanban = new Text(composite_1, SWT.NONE);\n\t\ttext_NgaythangVanban.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_NgaythangVanban.setEditable(false);\n\t\ttext_NgaythangVanban.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblnV = new Label(composite_1, SWT.NONE);\n\t\tlblnV.setText(\"Đơn vị: \");\n\n\t\ttext_Donvi = new Text(composite_1, SWT.NONE);\n\t\ttext_Donvi.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Donvi.setEditable(false);\n\t\ttext_Donvi.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyXL = new Label(composite_1, SWT.NONE);\n\t\tlblNgyXL.setText(\"Ngày xử lý:\");\n\n\t\ttext_Ngaytiepnhan = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaytiepnhan.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaytiepnhan.setEditable(false);\n\t\ttext_Ngaytiepnhan.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyGiao = new Label(composite_1, SWT.NONE);\n\t\tlblNgyGiao.setText(\"Ngày giao:\");\n\n\t\ttext_Ngaygiao = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaygiao.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaygiao.setEditable(false);\n\t\ttext_Ngaygiao.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblTrchYu = new Label(composite_1, SWT.NONE);\n\t\tGridData gd_lblTrchYu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblTrchYu.verticalIndent = 3;\n\t\tlblTrchYu.setLayoutData(gd_lblTrchYu);\n\t\tlblTrchYu.setText(\"Ghi chú: \");\n\n\t\ttext_Trichyeu = new Text(composite_1, SWT.NONE);\n\t\ttext_Trichyeu.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Trichyeu.setEditable(false);\n\t\tGridData gd_text_Trichyeu = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n\t\tgd_text_Trichyeu.heightHint = 27;\n\t\ttext_Trichyeu.setLayoutData(gd_text_Trichyeu);\n\t\tnew Label(composite_1, SWT.NONE);\n\n\t\tbtnThemDexuat = new Button(composite_1, SWT.NONE);\n\t\tbtnThemDexuat.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tInsert_dx = null;\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null\n\t\t\t\t\t\t\t&& ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() > 0) {\n\t\t\t\t\t\tInsert_dx = controler.getControl_DEXUAT().get_DEXUAT(ViewAndEdit_MODE_dsb);\n\t\t\t\t\t}\n\t\t\t\t\tif (Insert_dx != null) {\n\t\t\t\t\t\tTAPHOSO ths = controler.getControl_TAPHOSO().get_TAP_HO_SO(Insert_dx.getMA_TAPHOSO());\n\t\t\t\t\t\tTaphoso_View thsv = new Taphoso_View(shell, SWT.DIALOG_TRIM, user, ths, false);\n\t\t\t\t\t\tthsv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tNhapDeXuat ndx = new NhapDeXuat(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\t\tndx.open();\n\t\t\t\t\t\tInsert_dx = ndx.result;\n\t\t\t\t\t\tif (Insert_dx == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tboolean ict = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(\n\t\t\t\t\t\t\t\t\t\tViewAndEdit_MODE_dsb, Ma_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tif (ict) {\n\t\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_WORKING);\n\t\t\t\t\t\t\tm.setText(\"Hoàn tất\");\n\t\t\t\t\t\t\tm.setMessage(\"Thêm Đề xuất Hoàn tất\");\n\t\t\t\t\t\t\tm.open();\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (NullPointerException | SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnThemDexuat.setImage(user.getIcondata().DexuatIcon);\n\t\tbtnThemDexuat.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));\n\t\tbtnThemDexuat.setText(\"Thêm Hồ sơ\");\n\t\tsashForm_2.setWeights(new int[] { 1000, 618 });\n\n\t\tSashForm sashForm_1 = new SashForm(sashForm_3, SWT.NONE);\n\t\ttree_PTTS = new Tree(sashForm_1, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);\n\t\ttree_PTTS.setLinesVisible(true);\n\t\ttree_PTTS.setHeaderVisible(true);\n\t\ttree_PTTS.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event arg0) {\n\t\t\t\tTreeItem[] til = tree_PTTS.getSelection();\n\t\t\t\tif (til.length > 0) {\n\t\t\t\t\tRow_PTTSthamgia_Baoduong pttg = (Row_PTTSthamgia_Baoduong) til[0].getData();\n\t\t\t\t\tsetHinhthuc_Baoduong(pttg.getHtbd());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttree_PTTS.addListener(SWT.SetData, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tif (tree_PTTS.getItems().length > 0) {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tTreeColumn trclmnStt = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnStt.setWidth(50);\n\t\ttrclmnStt.setText(\"Stt\");\n\n\t\tTreeColumn trclmnTnMT = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnTnMT.setWidth(100);\n\t\ttrclmnTnMT.setText(\"Tên, mô tả\");\n\n\t\tTreeColumn trclmnHngSnXut = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnHngSnXut.setWidth(100);\n\t\ttrclmnHngSnXut.setText(\"Hãng sản xuất\");\n\n\t\tTreeColumn trclmnDngXe = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnDngXe.setWidth(100);\n\t\ttrclmnDngXe.setText(\"Dòng xe\");\n\n\t\tTreeColumn trclmnBinS = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBinS.setWidth(100);\n\t\ttrclmnBinS.setText(\"Biển số\");\n\n\t\tTreeColumn trclmnNgySDng = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnNgySDng.setWidth(100);\n\t\ttrclmnNgySDng.setText(\"Ngày sử dụng\");\n\n\t\tTreeColumn trclmnMPhngTin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnMPhngTin.setWidth(90);\n\t\ttrclmnMPhngTin.setText(\"Mã PTTS\");\n\n\t\tMenu menu = new Menu(tree_PTTS);\n\t\ttree_PTTS.setMenu(menu);\n\n\t\tMenuItem mntmThmPhngTin = new MenuItem(menu, SWT.NONE);\n\t\tmntmThmPhngTin.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tThem_PTGT();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmntmThmPhngTin.setText(\"Thêm phương tiện tài sản\");\n\n\t\tMenuItem mntmXoa = new MenuItem(menu, SWT.NONE);\n\t\tmntmXoa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tdelete();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tmntmXoa.setText(\"Xóa\");\n\n\t\tTreeColumn trclmnThayNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayNht.setWidth(70);\n\t\ttrclmnThayNht.setText(\"Thay nhớt\");\n\n\t\tTreeColumn trclmnThayLcNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNht.setWidth(100);\n\t\ttrclmnThayLcNht.setText(\"Thay lọc nhớt\");\n\n\t\tTreeColumn trclmnThayLcGi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcGi.setWidth(100);\n\t\ttrclmnThayLcGi.setText(\"Thay lọc gió\");\n\n\t\tTreeColumn trclmnThayLcNhin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNhin.setWidth(100);\n\t\ttrclmnThayLcNhin.setText(\"Thay lọc nhiên liệu\");\n\n\t\tTreeColumn trclmnThayDuPhanh = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuPhanh.setWidth(100);\n\t\ttrclmnThayDuPhanh.setText(\"Thay Dầu phanh - ly hợp\");\n\n\t\tTreeColumn trclmnThayDuHp = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuHp.setWidth(100);\n\t\ttrclmnThayDuHp.setText(\"Thay Dầu hộp số\");\n\n\t\tTreeColumn trclmnThayDuVi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuVi.setWidth(100);\n\t\ttrclmnThayDuVi.setText(\"Thay Dầu vi sai\");\n\n\t\tTreeColumn trclmnLcGiGin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnLcGiGin.setWidth(100);\n\t\ttrclmnLcGiGin.setText(\"Lọc gió giàn lạnh\");\n\n\t\tTreeColumn trclmnThayDuTr = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuTr.setWidth(100);\n\t\ttrclmnThayDuTr.setText(\"Thay dầu trợ lực lái\");\n\n\t\tTreeColumn trclmnBoDngKhcs = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBoDngKhcs.setWidth(100);\n\t\ttrclmnBoDngKhcs.setText(\"Bảo dưỡng khác\");\n\n\t\tExpandBar expandBar = new ExpandBar(sashForm_1, SWT.V_SCROLL);\n\t\texpandBar.setForeground(SWTResourceManager.getColor(SWT.COLOR_LIST_FOREGROUND));\n\n\t\tExpandItem xpndtmLoiHnhBo = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setText(\"Loại hình bảo dưỡng\");\n\n\t\tComposite grpHnhThcBo = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setControl(grpHnhThcBo);\n\t\tgrpHnhThcBo.setLayout(new GridLayout(1, false));\n\n\t\tbtnDaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDaudongco.setText(\"Dầu động cơ\");\n\n\t\tbtnLocdaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocdaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocdaudongco.setText(\"Lọc dầu động cơ\");\n\n\t\tbtnLocgio = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgio.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgio.setText(\"Lọc gió\");\n\n\t\tbtnLocnhienlieu = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocnhienlieu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocnhienlieu.setText(\"Lọc nhiên liệu\");\n\n\t\tbtnDauphanh_lyhop = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauphanh_lyhop.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauphanh_lyhop.setText(\"Dầu phanh và dầu ly hợp\");\n\n\t\tbtnDauhopso = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauhopso.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauhopso.setText(\"Dầu hộp số\");\n\n\t\tbtnDauvisai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauvisai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauvisai.setText(\"Dầu vi sai\");\n\n\t\tbtnLocgiogianlanh = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgiogianlanh.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgiogianlanh.setText(\"Lọc gió giàn lạnh\");\n\n\t\tbtnDautroluclai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDautroluclai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDautroluclai.setText(\"Dầu trợ lực lái\");\n\n\t\tbtnBaoduongkhac = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnBaoduongkhac.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBaoduongkhac.setText(\"Bảo dưỡng khác\");\n\t\txpndtmLoiHnhBo.setHeight(xpndtmLoiHnhBo.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);\n\n\t\tExpandItem xpndtmLinH = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLinH.setText(\"Liên hệ\");\n\n\t\tComposite composite_2 = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLinH.setControl(composite_2);\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblTnLinH = new Label(composite_2, SWT.NONE);\n\t\tlblTnLinH.setText(\"Tên liên hệ: \");\n\n\t\ttext_Tenlienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Tenlienhe.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblGiiThiu = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblGiiThiu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblGiiThiu.verticalIndent = 3;\n\t\tlblGiiThiu.setLayoutData(gd_lblGiiThiu);\n\t\tlblGiiThiu.setText(\"Giới thiệu: \");\n\n\t\ttext_Gioithieu = new Text(composite_2, SWT.BORDER);\n\t\ttext_Gioithieu.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\n\t\tLabel lblLinH = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblLinH = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblLinH.verticalIndent = 3;\n\t\tlblLinH.setLayoutData(gd_lblLinH);\n\t\tlblLinH.setText(\"Liên hệ: \");\n\n\t\ttext_Lienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Lienhe.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\txpndtmLinH.setHeight(120);\n\t\tsashForm_1.setWeights(new int[] { 543, 205 });\n\t\tsashForm_3.setWeights(new int[] { 170, 228 });\n\t\tsashForm.setWeights(new int[] { 1000 });\n\n\t\tbtnLuu = new Button(shell, SWT.NONE);\n\t\tbtnLuu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (dataCreate != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tTaoMoi_DotSuachua_Baoduong();\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate void TaoMoi_DotSuachua_Baoduong() throws SQLException {\n\t\t\t\tif (checkTextNotNULL()) {\n\t\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = getDOT_SUACHUA_BAODUONG();\n\t\t\t\t\tint key = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.InsertDOT_THUCHIEN_SUACHUA_BAODUONG(dsb, null, null);\n\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\tif (key >= 0) {\n\t\t\t\t\t\tif (nsb != null)\n\t\t\t\t\t\t\tdsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG().update_DOT_THUCHIEN_SUACHUA_BAODUONG(dsb);\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien > 0)\n\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(dsb,\n\t\t\t\t\t\t\t\t\t\t\tMa_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tTreeItem[] til = tree_PTTS.getItems();\n\t\t\t\t\t\tif (til.length > 0) {\n\t\t\t\t\t\t\tfor (TreeItem ti : til) {\n\t\t\t\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\t\t\t\tRow_PTTSthamgia_Baoduong rp = (Row_PTTSthamgia_Baoduong) ti.getData();\n\t\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG_TAISAN()\n\t\t\t\t\t\t\t\t\t\t.set_DOT_THUCHIEN_SUACHUA_TAISAN(dsb, rp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tshowMessage_Succes();\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tGiaoViec gv = new GiaoViec(user);\n\t\t\t\t\t\tgv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowMessage_Fail();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tshowMessage_FillText();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate DOT_THUCHIEN_SUACHUA_BAODUONG getDOT_SUACHUA_BAODUONG() {\n\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = new DOT_THUCHIEN_SUACHUA_BAODUONG();\n\t\t\t\tdsb.setTEN_DOT_THUCHIEN_SUACHUA_BAODUONG(text_Tendot_Baoduong.getText());\n\t\t\t\tdsb.setLOAI_PHUONG_TIEN(\n\t\t\t\t\t\tInteger.valueOf((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText())));\n\t\t\t\tdsb.setSUACHUA_BAODUONG(fi.getInt_Baoduong());\n\t\t\t\tdsb.setMO_TA(text_Mota.getText());\n\t\t\t\treturn dsb;\n\t\t\t}\n\n\t\t});\n\t\tGridData gd_btnLu = new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1);\n\t\tgd_btnLu.widthHint = 75;\n\t\tbtnLuu.setLayoutData(gd_btnLu);\n\t\tbtnLuu.setText(\"Xong\");\n\n\t\tbtnDong = new Button(shell, SWT.NONE);\n\t\tbtnDong.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if (Insert_dx != null)\n\t\t\t\t\t\t// controler.getControl_DEXUAT().delete_DEXUAT(Insert_dx);\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tGridData gd_btnDong = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnDong.widthHint = 75;\n\t\tbtnDong.setLayoutData(gd_btnDong);\n\t\tbtnDong.setText(\"Đóng\");\n\t\tinit_loadMODE();\n\t\tinit_CreateMode();\n\t}", "Vaisseau_longueur createVaisseau_longueur();", "private void crearElementos() {\n\n\t\tRotonda rotonda1 = new Rotonda(new Posicion(400, 120), \"5 de octubre\");\n\t\tthis.getListaPuntos().add(rotonda1);\n\n\t\tCiudad esquel = new Ciudad(new Posicion(90, 180), \"Esquel\");\n\t\tthis.getListaPuntos().add(esquel);\n\n\t\tCiudad trelew = new Ciudad(new Posicion(450, 200), \"Trelew\");\n\t\tthis.getListaPuntos().add(trelew);\n\n\t\tCiudad comodoro = new Ciudad(new Posicion(550, 400), \"Comodoro\");\n\t\tthis.getListaPuntos().add(comodoro);\n\n\t\tCiudad rioMayo = new Ciudad(new Posicion(350, 430), \"Rio Mayo\");\n\t\tthis.getListaPuntos().add(rioMayo);\n\n\t\t// --------------------------------------------------------\n\n\t\tRutaDeRipio rutaRipio = new RutaDeRipio(230, 230, rotonda1, esquel);\n\t\tthis.getListaRuta().add(rutaRipio);\n\n\t\tRutaPavimentada rutaPavimentada1 = new RutaPavimentada(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada1);\n\n\t\tRutaPavimentada rutaPavimentada2 = new RutaPavimentada(800, 120, esquel, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada2);\n\n\t\tRutaDeRipio rutaripio3 = new RutaDeRipio(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaripio3);\n\n\t\tRutaEnConstruccion rutaConst1 = new RutaEnConstruccion(180, 70, rioMayo, comodoro);\n\t\tthis.getListaRuta().add(rutaConst1);\n\n\t\tRutaPavimentada rutaPavimentada3 = new RutaPavimentada(600, 110, rioMayo, esquel);\n\t\tthis.getListaRuta().add(rutaPavimentada3);\n\t}", "public void crearTemaGenerico (String nombre) {\n\n controladorDeDominio.crearTema(nombre);\n System.out.println(\"Se ha creado el tema: \"+nombre);\n }", "public void crearReaTrans(){\n\t // could have been factorized with the precedent view\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t \n\t\tp1 = new JPanel();\n\t p2 = new JPanel();\n\t \n\t String[] a = {\"Regresar\",\"Continuar\"}, c = {\"Cuenta de origen\",\"Monto\",\"Cuenta de destino\"};\n\t \n\t p1.setLayout(new GridLayout(1,2));\n\t p2.setLayout(new GridLayout(1,3));\n\t \n\t for (int x=0; x<2; x++) {\n\t b = new JButton(a[x]);\n\t botones.add(b);\n\t }\n\t for (JButton x:botones) {\n\t x.setPreferredSize(new Dimension(110,110));\n\t p1.add(x);\n\t }\n // Add buttons panel \n\t add(p1, BorderLayout.SOUTH);\n\t \n\t for (int x=0; x<3; x++){\n\t tf=new JTextField(c[x]);\n\t tf.setPreferredSize(new Dimension(10,100));\n textos.add(tf);\n\t p2.add(tf);\n\t }\n // Add textfields panel\n\t add(p2, BorderLayout.NORTH);\n\t}", "private String getAdvTemplate(){ \r\n\t\t\t StringBuilder sb = new StringBuilder();\r\n\t\t\t sb.append(\"<tpl for=\\\".\\\">\");\r\n\t\t\t\tsb.append(\"<div class=\\\"x-combo-list-item\\\" >\");\r\n\t\t\t\tsb.append(\"<span class=\\\"tpl-lft {gender}\\\"></span>\");\r\n\t\t\t\tsb.append(\"<span class=\\\"tpl-lft\\\">{name}</span>\");\r\n\t\t\t\tsb.append(\"<span class=\\\"tpl-rgt\\\">{age} Yrs</span>\");\r\n\t\t\t\tsb.append(\"</div>\");\r\n\t\t\t\tsb.append(\"</tpl>\");\r\n\t\t\t return sb.toString();\r\n\t\t\t}", "Para createPara();", "String template();", "@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 }", "@Override\n\tpublic void createGerant(Gerant g) {\n\t\t\n\t}", "public com.walgreens.rxit.ch.cda.II addNewTemplateId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.II target = null;\n target = (com.walgreens.rxit.ch.cda.II)get_store().add_element_user(TEMPLATEID$4);\n return target;\n }\n }", "@Test\n\tpublic void test04_CreateNewPageUsingExistingTemplate() {\n\t\tinfo(\"Test 4: Create new page using existing template\");\n\t\tString template1 = wTempData.getWikiTemplate(0);\n\t\tString title1 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template1);\n\t\tString template2 = wTempData.getWikiTemplate(1);\n\t\tString title2 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template2);\n\t\tString template3 = wTempData.getWikiTemplate(2);\n\t\tString title3 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template3);\n\t\tString template4 = wTempData.getWikiTemplate(3);\n\t\tString title4 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template4);\n\t\tString template5 = wTempData.getWikiTemplate(4);\n\t\tString title5 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template5);\n\t\t\n\t\t/*Step Number: 1\n\t\t*Step Name: Step 1: Open form to create new page\n\t\t*Step Description: \n\t\t\t- Choose path to add new page\n\t\t\t- Click [Add Page] --> [From Template...]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\t- By default, the [Create Wiki page] is displayed in the [Rich Text] mode */\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t \n\t /*Step Number: 2\n\t\t*Step Name: Step 2: Create new page with Two Column layout\n\t\t*Step Description: \n\t\t\t- Choose template [Two Column layout] in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with two column layout*/\n\t\twikiMg.addSimpleWikiPageByTemplate(template1,title1);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title1);\n\t\tarrayPage.add(title1);\n\t \n\t\t /*Step Number: 3\n\t\t*Step Name: Step 3: Create new page with Three Column layout\n\t\t*Step Description: \n\t\t\t- Choose template [Three Column layout] in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like.\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with three column layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template2,title2);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title2);\n\t\tarrayPage.add(title2);\n\t\t\n\t\t /*Step Number: 4\n\t\t*Step Name: Step 4: Create new page with Status Meeting layout\n\t\t*Step Description: \n\t\t\t- Choose template \"Status Meeting\" in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like.\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with Status Meeting layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template3,title3);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title3);\n\t\tarrayPage.add(title3);\n\t\t\n\t\t /*Step Number: 5\n\t\t*Step Name: Step 5: Create new page with HOW-TO Guide layout\n\t\t*Step Description: \n\t\t\t- Choose template [HOW-TO Guide] layout in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with HOW-TO Guide layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template4,title4);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title4);\n\t\tarrayPage.add(title4);\n\t\t\n\t\t/*Step Number: 6\n\t\t*Step Name: Step 6: Create new page with Leave Planning layout\n\t\t*Step Description: \n\t\t\t- Choose template [Leave Planning] layout in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with Leave Planning layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template5,title5);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title5);\n\t\tarrayPage.add(title5);\n \t}", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "public interface VistaDetallemensajeModel extends TemplateModel {\n // Add setters and getters for template properties here.\n }", "public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}", "public static void creaHidatoManualment(int tamany)\n {\n\n taulerCreacio = new Tauler(tamany);\n VistaCrearHidatoManual ct = new VistaCrearHidatoManual(taulerCreacio,callbackImplementor);\n ct.mostra(true);\n }", "public Content createContent();", "private void saveTemplate()\r\n {\r\n\t String template = keyField.getText();\r\n\r\n\t int lenI = values.length, lenJ, lenK;\r\n\t String[][][] newValues = new String[lenI][][];\r\n\t for (int i=0; i<lenI; i++)\r\n\t {\r\n\t\t lenJ = values[i].length;\r\n\t\t newValues[i] = new String[lenJ][];\r\n\t\t for (int j=0; j<lenJ; j++)\r\n\t\t {\r\n\t\t\t lenK = values[i][j].length;\r\n\t\t\t newValues[i][j] = new String[lenK];\r\n\t\t\t for (int k=0; k<lenK; k++)\r\n\t\t\t\t values[i][j][k] = values[i][j][k];\r\n\t\t }\r\n\t }\r\n\t \r\n\t if (template.length()==0)\r\n\t {\r\n\t\t label.setText(\"Please enter a valid template name\");\r\n\t\t return;\r\n\t }\r\n\t \r\n\t // Update or store to the list of templates.\r\n for (int i=0; i<newValues.length; i++)\r\n \t for (int j=0; j<newValues[i].length; j++)\r\n\t\t\t newValues[i][j] = getComponentArray(components[i][j]);\r\n \r\n \t if (!definitionBox.isSelected())\r\n \t {\r\n \t\t newValues[FormatData.t.D_HDR.ordinal()] \r\n \t\t\t\t = newValues[FormatData.t.D_FLD.ordinal()] \r\n \t\t\t\t\t\t = new String[0][0];\r\n \t }\r\n \t if (!categoryBox.isSelected())\r\n \t {\r\n \t\t newValues[FormatData.t.C_HDR.ordinal()] \r\n \t\t\t\t = newValues[FormatData.t.C_FLD.ordinal()] \r\n \t\t\t\t\t\t = new String[0][0];\r\n \t }\r\n \t if (!exampleBox.isSelected())\r\n \t {\r\n \t\t newValues[FormatData.t.E_HDR.ordinal()] \r\n \t\t\t\t = newValues[FormatData.t.E_FLD.ordinal()] \r\n \t\t\t\t\t\t = new String[0][0];\r\n \t }\r\n\r\n templates.setTemplate(template, newValues);\r\n\r\n if (!model.contains(template))\r\n\t {\r\n\t int size = templateKeys.length;\r\n\t String[] newTemplates = new String[templateKeys.length + 1];\r\n\t if (templateKeys.length != 0)\r\n\t \t System.arraycopy(templateKeys, 0, newTemplates, 0, size);\r\n\t \r\n\t newTemplates[size] = template;\r\n\t templateKeys = newTemplates;\r\n\t model.add(size, templateKeys[size]);\r\n\t list.setSelectedIndex(size);\r\n\t }\r\n label.setText(\"Display format \" + template + \" saved\");\r\n }", "public void crearAtracciones(){\n \n //Añado atracciones tipo A\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new A();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo B\n for (int i = 0; i < 6 ; i++){\n Atraccion atraccion = new B();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo C\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new C();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo D\n for (int i = 0; i < 3 ; i++){\n Atraccion atraccion = new D();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo E\n for (int i = 0; i < 7 ; i++){\n Atraccion atraccion = new E();\n atracciones.add(atraccion);\n }\n \n }", "void create(Trubriques trubriques);", "protected void generar() {\n generar(1, 1);\n }", "Traditional createTraditional();", "public interface VistaListadeproductosModel extends TemplateModel {\n // Add setters and getters for template properties here.\n }", "public Tarea(String descripcionTarea)\n {\n //Añade la descripción de la tarea\n descripcion = descripcionTarea;\n tareaCompletada = false;\n //Por defecto, las tareas tienen prioridad 0\n prioridad = 0;\n //Las nuevas tareas no tienen fecha de vencimiento\n fechaVencimiento = null;\n }", "Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }", "public void creationPlateau() {\n for (int i = 0; i < 10; i++) {\n int X = rand.nextInt(14);\n int Y = rand.nextInt(14);\n if (plateau[X][Y] == null && espacementMonstre(X,Y,plateau)) {\n int monstreAleatoire = 1 + (int)(Math.random() * ((3 - 1) + 1));\n switch (monstreAleatoire) {\n case 1:\n Personnage monstreD = new Dragonnet(X,Y);\n plateau[X][Y] = monstreD;\n this.monstre.add(monstreD);\n System.out.println(\"Dragonnet ajouté en position : \"+X+\" \"+Y);\n break;\n case 2:\n Personnage monstreL = new Loup(X,Y);\n plateau[X][Y] = monstreL;\n this.monstre.add(monstreL);\n System.out.println(\"Loup ajouté en position : \"+X+\" \"+Y);\n\n break;\n case 3:\n Personnage monstreO = new Orque(X,Y);\n plateau[X][Y] = monstreO;\n this.monstre.add(monstreO);\n System.out.println(\"Orque ajouté en position : \"+X+\" \"+Y);\n break;\n }\n } else {\n i --;\n }\n }\n }", "Vaisseau_estOrdonneeCouverte createVaisseau_estOrdonneeCouverte();", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }", "public void generarCuestionario() {\n setLayout(null);\n \n setTitle(\"Cuestionario de Fin de Curso\"); \n \n //Con el modelo construido debemos representar uestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n \n Opcion op1 = new Opcion();\n op1.setTitulo(\"Londres\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"Roma\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Paris\");\n op3.setCorrecta(true);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Oslo\");\n op4.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Cual es la capital de Francia\");\n p1.setOpciones(opciones);\n \n //Opiciones de la pregumta Numero 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Atlantico\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Indico\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Artico\");\n op23.setCorrecta(false);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Pacifico\");\n op24.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Cual es el oceano más grande del mundo?\");\n p2.setOpciones(opciones2);\n \n //Opiciones de la pregumta Numero 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"Cristobal Colon\");\n op31.setCorrecta(true);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Cristobal Nodal\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Cuahutemoc blanco\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Cuahutemoc\");\n op34.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien descubrio América?\");\n p3.setOpciones(opciones3);\n \n //Opiciones de la pregumta Numero 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"Fernanflo\");\n op41.setCorrecta(false);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Polinesios\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"Eh vegeta\");\n op43.setCorrecta(true);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Willyrex\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Quien es el mejor youtuber?\");\n p4.setOpciones(opciones4);\n \n //Opiciones de la pregumta Numero 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Amarillo patito\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Verde Sherec\");\n op52.setCorrecta(false);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Rojo me faltas tú\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Azul\");\n op54.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5 = {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿De que color es el cielo?\");\n p5.setOpciones(opciones5);\n \n //Opiciones de la pregumta Numero 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"200\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"100\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"45\");\n op63.setCorrecta(true);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"13\");\n op64.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿De cuantas localidades se compone una memoria de 8x5?\");\n p6.setOpciones(opciones6);\n \n //Opiciones de la pregumta Numero 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Try - Catch\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"IF\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Switch - Case\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"For anidado\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que estructura condicional se recomienda usar menos en una interfaz de usuario?\");\n p7.setOpciones(opciones7);\n \n //Opiciones de la pregumta Numero 8\n Opcion op81 = new Opcion();\n op81.setTitulo(\"Access\");\n op81.setCorrecta(false);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Oracle\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"MySQL\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Mongo DB\");\n op84.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Es una base de datos no relacional de uso moderno?\");\n p8.setOpciones(opciones8);\n \n //Opiciones de la pregumta Numero 9\n Opcion op91 = new Opcion();\n op91.setTitulo(\"GitHub\");\n op91.setCorrecta(true);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"MIcrosoft teams\");\n op22.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Zoom\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"Collaborate\");\n op94.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿Es una plataforma para trabajo en línea?\");\n p9.setOpciones(opciones9);\n\n //Opiciones de la pregumta Numero 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Prog. a nivel maquina\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Prog. orientada a objetos\");\n op102.setCorrecta(true);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"MySQL\");\n op103.setCorrecta(false);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"C++\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que aprendi en este curso?\");\n p10.setOpciones(opciones10);\n\n\n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n\n //Se agrega a este list la unica prgunta que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n c.setPreguntas(preguntas);\n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la preunta\n mostrarPregunta(preguntaActual);\n \n Salir.setVisible(false);\n siguiente.setEnabled(false);\n \n }", "public void setTemplateButtons() {\r\n\t\tbtnSetBirth.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == btnSetBirth) {\r\n\t\t\t\t\tlblTemplateBirthday.setText(\"Using Template: \" + comboEmails.getSelectedItem());\r\n\t\t\t\t\ttemplateBirthday = (String) comboEmails.getSelectedItem();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSetAnniv.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == btnSetAnniv) {\r\n\t\t\t\t\tlblTemplateAnniv.setText(\"Using Template: \" + comboEmails.getSelectedItem());\r\n\t\t\t\t\ttemplateAnniv = (String) comboEmails.getSelectedItem();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSetPromo.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == btnSetPromo) {\r\n\t\t\t\t\tlblPromoTemplate.setText(\"Using Template: \" + comboEmails.getSelectedItem());\r\n\t\t\t\t\ttemplatePromo = (String) comboEmails.getSelectedItem();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\r\n\t}", "BODY createBODY();", "public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }", "Juego(){\r\n\r\n GridLayout layout = new GridLayout(1,2);\r\n\tsetLayout(layout);\r\n\t\t\r\n\t// Creacion del tablero del contrincante (computadora)\t\r\n\t\r\n t_contrincante = new Tablero(false);\r\n\tadd(t_contrincante);\r\n\t\t\t\t\r\n\t// Creacion del tablero del jugador\r\n\t\t\t\t\r\n t_jugador = new Tablero(true);\r\n\tadd(t_jugador);\r\n }", "Vaisseau_ordonneeLaPlusBasse createVaisseau_ordonneeLaPlusBasse();", "public void testBlogEntryTemplateAccessible() throws Exception {\n assertEquals(0, rootBlog.getBlogEntryTemplates().size());\n BlogEntry draft = rootBlog.getBlogForToday().createBlogEntry();\n draft.setType(BlogEntry.TEMPLATE);\n draft.store();\n assertEquals(1, rootBlog.getBlogEntryTemplates().size());\n assertEquals(draft, rootBlog.getBlogEntryTemplate(draft.getId()));\n }", "Node getTemplateTextNode();", "Vaisseau_positionner createVaisseau_positionner();", "void mo25968e(TemplateInfo templateInfo);", "@Override\n public void crearReloj() {\n Manecilla seg;\n seg = new Manecilla(40,60,0,1,null);\n cronometro = new Reloj(seg);\n }", "@Override\n\tpublic String getTareas() {\n\t\treturn \"TAREA COMERCIAL 3: VENDE MUCHO TODOS LOS DÍAS\";\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(\"Hallo 2021!\");\r\n\t\t\r\n\t\tSystem.out.println(\"Schnell gemacht\");\r\n\t\t\r\n\t\tSystem.out.println(\"template vervollständigen mit syso und STRG+SPACE\");\r\n\t\t\r\n\t\t// Variablen\r\n\t\t// Zahlen-Variable - Ganzzahlen\r\n\t\t// int - Variable\r\n\t\tint zahl1 = 5;\r\n\t\tint zahl2 = 10;\r\n\t\t\r\n\t\tSystem.out.print(\"zahl1: \");\r\n\t\tSystem.out.println(zahl1);\r\n\t\tSystem.out.print(\"zahl2: \");\r\n\t\tSystem.out.println(zahl2);\r\n\t\t//\r\n\t\tint ergebnis_a;\r\n\t\tergebnis_a = zahl1 + zahl2;\r\n\t\tSystem.out.print(\"Ergebnis von \" + zahl1 + \" addiert mit \" + zahl2 + \" ist:\");\r\n\t\tSystem.out.println(ergebnis_a);\r\n\t\t//\r\n\t\t\r\n\t\t// schleife - for-schleife\r\n\t\t//\r\n\t\t/*\r\n\t\tSystem.out.println(1);\r\n\t\tSystem.out.println(2);\r\n\t\tSystem.out.println(3);\r\n\t\tSystem.out.println(4);\r\n\t\tSystem.out.println(5);\r\n\t\tSystem.out.println(6);\r\n\t\tSystem.out.println(7);\r\n\t\tSystem.out.println(8);\r\n\t\tSystem.out.println(9);\r\n\t\tSystem.out.println(10);\r\n\t\t*/\r\n\t\t//\r\n\t\tfor (int zaehler = 1; zaehler <= 10; zaehler = zaehler + 1) {\r\n\t\t\tSystem.out.println(zaehler);\r\n\t\t}\r\n\t\t//\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}", "StringTemplate createStringTemplate();", "Position_ordonnee createPosition_ordonnee();", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public abstract Anuncio creaAnuncioGeneral();", "Vaisseau createVaisseau();", "HTML createHTML();", "private void IsiTabel(String text) {\n IsiTabel = new TextView(getActivity());\n IsiTabel.setText(text);\n IsiTabel.setTextColor(getResources().getColor(R.color.fontTabel));\n IsiTabel.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT));\n IsiTabel.setBackground(getResources().getDrawable(R.drawable.background_tabel));\n TR.addView(IsiTabel);\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 static void generModeloDePrueba() {\n\t\tCSharpArchIdPackageImpl.init();\n // Retrieve the default factory singleton\n\t\tCSharpArchIdFactory factory = CSharpArchIdFactory.eINSTANCE;\n // create an instance of myWeb\n\t\tModel modelo = factory.createModel();\n\t\tmodelo.setName(\"Prueba\"); \n // create a page\n\t\tCompileUnit cu = factory.createCompileUnit();\n\t\tcu.setName(\"archivo.cs\");\n\t\tClassDeclaration clase = factory.createClassDeclaration();\n\t\t//clase.setName(\"Sumar\");\n\t\t//cu.getTypeDeclaration().add(clase);\n modelo.getCompileUnits().add(cu);\n \n Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;\n Map<String, Object> m = reg.getExtensionToFactoryMap();\n m.put(\"model\", new XMIResourceFactoryImpl());\n\n // Obtain a new resource set\n ResourceSet resSet = new ResourceSetImpl();\n\n // create a resource\n Resource resource = resSet.createResource(URI\n .createURI(\"CSharpArchId.model\"));\n // Get the first model element and cast it to the right type, in my\n // example everything is hierarchical included in this first node\n resource.getContents().add(modelo);\n\n // now save the content.\n try {\n resource.save(Collections.EMPTY_MAP);\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\t\t\n // and so on, and so on\n // as you can see the EMF model can be (more or less) used as standard Java\n\t}", "public abstract Anuncio creaAnuncioIndividualizado();", "TH createTH();", "public TrexTemplateBuilder template() {\r\n\t\treturn new TrexTemplateBuilder(new TrexConfiguration(interpreter, parser, additionalModifications));\r\n\t}", "public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }", "public static void main(String[] args) {\r\n \r\n Generico <String,Integer,String,Double> c=new Generico<>(\"Eduardo\",25,\"Dani\",25.0);\r\n c.mostrar();\r\n List<Generico<String,Integer,String,String>>lista = new ArrayList<>();\r\n lista.add(new Generico<String,Integer,String,String> (\"Eduardo\",25,\"Dani\",\"Hello World\"));\r\n for (Generico<String,Integer,String,String> gn: lista) {\r\n gn.mostrar();\r\n }\r\n }", "String getTemplateContent(){\r\n \t\tStringBuffer templateBuffer = new StringBuffer();\r\n \t\tfor(String templatePart:templateParts){\r\n \t\t\ttemplateBuffer.append(templatePart);\r\n \t\t}\r\n \t\treturn templateBuffer.toString();\r\n \t}" ]
[ "0.6299146", "0.62917244", "0.62753296", "0.61566144", "0.61561775", "0.5977734", "0.59578085", "0.59367514", "0.5931331", "0.59305096", "0.58835584", "0.58727914", "0.5850055", "0.5850055", "0.5850055", "0.5850055", "0.5835759", "0.5826542", "0.5810378", "0.5789081", "0.5775435", "0.5775274", "0.576439", "0.57586056", "0.5748792", "0.5707019", "0.56997335", "0.5695683", "0.56800234", "0.56688124", "0.56666535", "0.5660475", "0.5651177", "0.5646168", "0.56406", "0.56149757", "0.5600307", "0.55862355", "0.5577759", "0.5575826", "0.5563712", "0.5560721", "0.55519277", "0.55453163", "0.55424285", "0.55324364", "0.5513861", "0.5512466", "0.5496578", "0.5494946", "0.548982", "0.5460573", "0.544934", "0.5440077", "0.5426594", "0.54256326", "0.54062957", "0.54018146", "0.53806305", "0.5379329", "0.53766406", "0.5371147", "0.5364329", "0.53560406", "0.5349669", "0.5341059", "0.5340577", "0.53390694", "0.53376377", "0.53310674", "0.53247714", "0.5319448", "0.5318782", "0.5317848", "0.5304775", "0.53033507", "0.53029376", "0.5299454", "0.5298207", "0.5297221", "0.5291752", "0.5291346", "0.5289282", "0.52890134", "0.5276778", "0.5266192", "0.52637374", "0.5262114", "0.5261856", "0.5258502", "0.525443", "0.5251122", "0.5244112", "0.5241706", "0.52411985", "0.52315116", "0.521604", "0.5207647", "0.5203655", "0.5203422", "0.5196839" ]
0.0
-1
TODO Autogenerated method stub
private static void generateSequence() throws FileNotFoundException { Scanner s = new Scanner(new BufferedReader(new FileReader(inputPath + filename))); lrcSeq = new ArrayList<Integer>(); meloSeq = new ArrayList<Integer>(); durSeq = new ArrayList<Integer>(); String line = null; int wordStress; int pitch; int melStress; int stress; int duration; while(s.hasNextLine()) { line = s.nextLine(); String[] temp = line.split(","); wordStress = Integer.parseInt(temp[1]); pitch = Integer.parseInt(temp[2]); melStress = Integer.parseInt(temp[3]); duration = Integer.parseInt(temp[4]); //combine word level stress and sentence level stress stress = wordStress * 3 + melStress; /*if(stress < 0 || stress > 9) { System.out.println("Stress range error"); }*/ lrcSeq.add(stress); meloSeq.add(pitch); durSeq.add(duration); } //calculate relative value for(int i = 0;i < lrcSeq.size() -1;++i) { lrcSeq.set(i, lrcSeq.get(i+1)-lrcSeq.get(i)); meloSeq.set(i, meloSeq.get(i+1) - meloSeq.get(i)); if(durSeq.get(i+1) / durSeq.get(i)>=1) durSeq.set(i, durSeq.get(i+1) / durSeq.get(i)); else durSeq.set(i,durSeq.get(i) / durSeq.get(i+1) * (-1)); } lrcSeq.remove(lrcSeq.size()-1); meloSeq.remove(meloSeq.size()-1); durSeq.remove(durSeq.size()-1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
private static void LogOverall() throws IOException { BufferedWriter out; Iterator entries = allPatternOne.entrySet().iterator(); out = new BufferedWriter(new FileWriter(singlePatternPath+"allPatternOne.txt")); int count1 = 0; entries = allPatternOne.entrySet().iterator(); while (entries.hasNext()) { Map.Entry entry = (Map.Entry) entries.next(); Integer value = (Integer)entry.getKey(); HashSet<SequencePair> set = (HashSet<SequencePair>) entry.getValue(); count1+=set.size(); out.write("!size " + value + " " + set.size() + "\n"); Iterator itr = set.iterator(); while(itr.hasNext()) { SequencePair current = (SequencePair) itr.next(); //System.out.println("[" + current.firstSeq +":"+current.secondSeq +"]"); out.write("[" + current.firstSeq +":"+current.secondSeq +"]"+"\n"); } } out.write("! total " + count1); //System.out.println(count2); if(out!=null) out.close(); out = new BufferedWriter(new FileWriter(newSinglePatternPath+"allPatternTwo.txt")); int count2 = 0; entries = allPatternTwo.entrySet().iterator(); while (entries.hasNext()) { Map.Entry entry = (Map.Entry) entries.next(); Integer value = (Integer)entry.getKey(); HashSet<SequencePair> set = (HashSet<SequencePair>) entry.getValue(); count2+=set.size(); out.write("!size " + value + " " + set.size() + "\n"); Iterator itr = set.iterator(); while(itr.hasNext()) { SequencePair current = (SequencePair) itr.next(); out.write("[" + current.firstSeq +":"+current.secondSeq +"]"+"\n"); } } out.write("! total " + count2); //System.out.println(count2); if(out!=null) out.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
private static void generateForSingleFile() throws IOException { BufferedWriter out = new BufferedWriter(new FileWriter(singlePatternPath+ filename)); Iterator iter = countOne.entrySet().iterator(); while(iter.hasNext()) { Map.Entry entry = (Entry) iter.next(); Integer value = (Integer) entry.getValue(); SequencePair key = (SequencePair) entry.getKey();//System.out.println("current" + "[" + key.firstSeq +":"+key.secondSeq +"]" + " ; "+ value); out.write("[" + key.firstSeq + ":" + key.secondSeq + "]" +":" +value + "\n"); } if(out!=null) out.close(); BufferedWriter out1 = new BufferedWriter(new FileWriter(newSinglePatternPath+filename)); iter = countTwo.entrySet().iterator(); while(iter.hasNext()) { Map.Entry entry = (Entry) iter.next(); Integer value = (Integer) entry.getValue(); SequencePair key = (SequencePair) entry.getKey();//System.out.println("current" + "[" + key.firstSeq +":"+key.secondSeq +"]" + " ; "+ value); out1.write("[" + key.firstSeq + ":" + key.secondSeq + "]" +":" +value + "\n"); } if(out1!=null) out1.close(); }
{ "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
given a file, generate all sequence of size
private static void getPatterns(int size) { // TODO Auto-generated method stub hashOne = new HashMap<SequencePair,Integer>(); hashTwo = new HashMap<SequencePair,Integer>(); ArrayList<Integer> first; ArrayList<Integer> second; ArrayList<Integer> third; //System.out.println(lrcSeq.size()); for(int i = 0; i < lrcSeq.size() - size ;++i) { first = new ArrayList<Integer>(); second = new ArrayList<Integer>(); third = new ArrayList<Integer>(); for(int j = i; j < i+ size ;++j) { first.add(lrcSeq.get(j)); second.add(meloSeq.get(j)); third.add(durSeq.get(j)); } //System.out.println(first); //System.out.println(second); //System.out.println(third); SequencePair cur= new SequencePair(first, second); int count = hashOne.containsKey(cur)?hashOne.get(cur):0; hashOne.put(cur, count+1); cur = new SequencePair(second, third); count = hashTwo.containsKey(cur)?hashTwo.get(cur):0; hashTwo.put(cur, count+1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void generateSequence() throws FileNotFoundException {\n Scanner s = new Scanner(new BufferedReader(new FileReader(inputPath + filename)));\n\t\tlrcSeq = new ArrayList<Integer>();\n\t\tmeloSeq = new ArrayList<Integer>();\n\t\tdurSeq = new ArrayList<Integer>();\n\t\t\n\t\tString line = null;\n\t\tint wordStress;\n\t\tint pitch;\n\t\tint melStress;\n\t\tint stress;\n\t\tint duration;\n\t\t\n\t\twhile(s.hasNextLine()) {\n\t\t\tline = s.nextLine();\n\t\t\tString[] temp = line.split(\",\");\n\t\t\t\n\t\t\twordStress = Integer.parseInt(temp[1]);\n\t\t\tpitch = Integer.parseInt(temp[2]);\n\t\t\tmelStress = Integer.parseInt(temp[3]);\n\t\t\tduration = Integer.parseInt(temp[4]);\n\t\t\t\n\n\t\t\t//combine word level stress and sentence level stress\n\t\t\tstress = wordStress * 3 + melStress;\n\t\t\t/*if(stress < 0 || stress > 9) {\n\t\t\t\tSystem.out.println(\"Stress range error\");\n\t\t\t}*/\n\t\t\tlrcSeq.add(stress);\n\t\t\tmeloSeq.add(pitch);\n\t\t\tdurSeq.add(duration);\n\t\t}\n\t\t\n\t\t//calculate relative value\n\t\tfor(int i = 0;i < lrcSeq.size() -1;++i) {\n\t\t\tlrcSeq.set(i, lrcSeq.get(i+1)-lrcSeq.get(i));\n\t\t\tmeloSeq.set(i, meloSeq.get(i+1) - meloSeq.get(i));\n\t\t\tif(durSeq.get(i+1) / durSeq.get(i)>=1)\n\t\t\t\tdurSeq.set(i, durSeq.get(i+1) / durSeq.get(i));\n\t\t\telse \n\t\t\t\tdurSeq.set(i,durSeq.get(i) / durSeq.get(i+1) * (-1));\n\t\t}\n\t\tlrcSeq.remove(lrcSeq.size()-1);\n\t\tmeloSeq.remove(meloSeq.size()-1);\n\t\tdurSeq.remove(durSeq.size()-1);\n\t\t\n\t}", "static void getSize(String root) throws IOException {\n\t\tint k = 2;\n\t\twhile (k <= 7) {\n\t\t\tint j = 1;\n\n\t\t\tString filesize = \"\";\n\t\t\twhile (j <= 10) {\n\t\t\t\tif (k == 1) {\n\t\t\t\t\tFile f = new File(\n\t\t\t\t\t\t\troot + \"M\" + k + \"/M1.1/Testbeds-\" + j + \"/Generated/seed.aml\");\n\t\t\t\t\tfilesize += new DecimalFormat(\"#.#\").format(((double) f.length() / 1024))\n\t\t\t\t\t\t\t+ \"\\n\";\n\t\t\t\t} else {\n\t\t\t\t\tFile f = new File(root + \"M\" + k + \"/Testbeds-\" + j + \"/Generated/seed.aml\");\n\t\t\t\t\tfilesize += new DecimalFormat(\"#.#\").format(((double) f.length() / 1024))\n\t\t\t\t\t\t\t+ \"\\n\";\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tSystem.out.print(filesize);\n\t\t\tk++;\n\t\t}\n\t}", "public long generatePaths(int size) {\n return (MoreMath.factorial(2*size).divide((\n MoreMath.factorial(size).multiply(MoreMath.factorial(2*size - size))))).longValue();\n }", "public void generate(File file) throws IOException;", "public int importOnlyFnaBitSequences(String filename, int start, int end) {\n int currentKID = 0;\n int result = 0;\n// String currName = null;\n boolean store = false;\n SuperString seq = new SuperString();\n try (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\n for (String line; (line = br.readLine()) != null; ) {\n if (line.charAt(0) == '>'){\n if (currentKID >= start) {\n if (seq.length() > 0) {\n// System.err.print(\"KID\\t\"+currentKID+\"\\thas length\\t\"+seq.length());\n storeOnlyBitSequence(currentKID, seq);\n } else {\n sequenceLength.add(0);\n exceptionsArr.add(new HashMap<Integer,Character>());\n }\n result++;\n seq = new SuperString();\n// currName = line.trim().substring(1);\n store = true;\n }\n currentKID++;\n } else if (store) {\n seq.addAndTrim(line);\n }\n if (currentKID >= end) break;\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return result;\n }", "public TwoSum(int size, File file) throws FileNotFoundException{\n this.size = size;\n ht = new Node[size];\n \n //create and populate array from file\n Scanner sc = new Scanner(file);\n long x,i=0;\n while(sc.hasNext()){\n x=sc.nextLong();\n insert(x);\n System.out.println(i+\" \"+x);\n i++;\n }\n \n findTwoSum();\n }", "private void readInFile()\n {\n try\n {\n file = new File(fileAddress);//Create new file from the given file name\n fileScanner = new Scanner(file);//Create a file scanner to scan for all the integers\n }\n catch(FileNotFoundException e) //Throws a FileNotFountException if the given file name doesn't exist\n {\n System.out.println(\"The file \" + fileAddress + \" could not be found\");\n }\n\n int i = 0;\n\n for(int j = 0; j < 1000; j++)\n {\n integerList[j] = fileScanner.nextInt();//Store the next integer from the file in to the integerList\n\n //Check to see if the index is at the end of the array and the file still has more integers,\n //then we reallocate more space for the array.\n\n /* if(i > (integerList.length - 1) && fileScanner.hasNextInt())\n resizeArray();\n i++;*/\n }\n\n /*while(fileScanner.hasNextInt())//Iterate through the file until there are no more integers\n {\n integerList[i] = fileScanner.nextInt();//Store the next integer from the file in to the integerList\n\n //Check to see if the index is at the end of the array and the file still has more integers,\n //then we reallocate more space for the array.\n\n if(i >= (integerList.length - 1) && fileScanner.hasNextInt())\n resizeArray();\n i++;\n }*/\n\n fileScanner.close();//close the scanner\n }", "public static int getSize(){\n Scanner input;\n \n \n File f = new File(fName);\n \n \n int size = 0;\n \n try{\n input = new Scanner(f);\n input.nextLine();\n \n while(input.hasNextLine()){\n input.nextLine();\n size++;\n \n }\n input.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n return size;\n}", "public static void main(String[] args) throws FileNotFoundException {\n\t\t Scanner input = new Scanner(new File(\"B-large.in\"));\r\n\t\t PrintWriter out = new PrintWriter(new File(\"pB.out\"));\r\n\r\n\t\twhile (input.hasNext()) {\r\n\t\t\tint T = input.nextInt();\r\n\r\n\t\t\tfor (int t = 1; t <= T; ++t) {\r\n\t\t\t\tint N = input.nextInt();\r\n\t\t\t\tint lineNum = 2 * N - 1;\r\n\t\t\t\tint[] countHeight = new int[2500+1];\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < lineNum; ++i){\r\n\t\t\t\t\tfor(int j = 0; j < N; ++j){\r\n\t\t\t\t\t\t++countHeight[input.nextInt()];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tout.printf(\"Case #%d: \", t);\r\n\t\t\t\tboolean isFirstNum = true;\r\n\t\t\t\tfor(int i = 0; i < countHeight.length; ++i){\r\n\t\t\t\t\tif(countHeight[i] % 2 == 1){\r\n\t\t\t\t\t\tif(isFirstNum){\r\n\t\t\t\t\t\t\tout.print(i);\r\n\t\t\t\t\t\t\tisFirstNum = false;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tout.printf(\" %d\", i);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tout.println();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tout.close();\r\n\t\tinput.close();\r\n\t}", "public static void main(String[] args) throws IOException {\n FileWriter fw = new FileWriter(new File(\"src/output_files/threesumA.txt\"));\n StringBuilder sb = new StringBuilder();\n // the rest input files\n String[] inputFiles = {\"src/input_files/8ints.txt\", \"src/input_files/1Kints.txt\", \"src/input_files/2Kints.txt\",\n \"src/input_files/2Kints.txt\", \"src/input_files/4Kints.txt\", \"src/input_files/8Kints.txt\",\n \"src/input_files/16Kints.txt\", \"src/input_files/32Kints.txt\"};\n int i = 8;\n for (String file : inputFiles) {\n In in = new In(file);\n int[] a = in.readAllInts();\n long startTime = System.nanoTime();\n int result = count(a);\n long elapsedTime = System.nanoTime() - startTime;\n sb.append(String.format(\"%d %d\\n\", i, elapsedTime));\n System.out.println(result);\n if (i == 8) {\n i = 1000;\n } else {\n i *= 2;\n }\n }\n fw.write(sb.toString());\n fw.close();\n }", "private static int[] readData(int size, String filename) throws FileNotFoundException {\n\t\tint[] input = new int[size];\t\n\t\tScanner scanner = new Scanner(new File(filename));\n \n int i = 0;\n while (scanner.hasNext() && i < size)\n {\n \tinput[i] = Integer.parseInt(scanner.next());\n \ti++;\n }\n scanner.close();\n\t return input;\n\t}", "private static int calcGenerations(String filename, int reps) {\n List<String> fileContentsAsStrings = utilities.getFileContentsAsStrings(filename);\n\n // parse initial state\n String prefix = \"........................\";\n List<String> replay = new ArrayList<>();\n// replay.add(addCalibraton(prefix));\n\n String currentState = parseInitialState(fileContentsAsStrings.get(0), prefix);\n\n // parse rules\n HashMap<String, String> rules = parseRules(fileContentsAsStrings.subList(2, fileContentsAsStrings.size()));\n\n String previousLine = currentState;\n\n // do 20 times\n for (int i = 0; i < reps; i++) {\n replay.add(previousLine);\n if (previousLine.substring(previousLine.length() - RULE_LENGTH).contains(\"#\")) {\n previousLine += \".....\";\n }\n\n StringBuilder nextLine = new StringBuilder();\n nextLine.append(\"..\");\n\n // for each element in current line, apply rule and build next line\n for (int pot = 0; pot <= previousLine.length() - RULE_LENGTH; pot++) {\n nextLine.append(transformThisCell(previousLine.substring(pot, pot + RULE_LENGTH), rules));\n }\n nextLine.append(\"..\");\n previousLine = nextLine.toString();\n }\n\n// printResults(replay, prefix.length());\n\n // after 20 times, potSum of the entire string and the zero index (prefix length)\n return potSum(previousLine, prefix.length());\n }", "private int getSize(File f) {\n int lines = 0;\n try {\n Scanner s = new Scanner(f);\n while (s.hasNextLine()) {\n s.nextLine();\n lines++;\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return lines;\n }", "public static int filesWithSizes (File f)\n\t{\n\t\tif (f.isFile())\n\t\t{\n\t\t\tif (f.length()>= 10000 && f.length() <= 25000)\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint count = 0;\n\t\t\tfor (File file: f.listFiles())\n\t\t\t{\n\t\t\t\tcount += filesWithSizes(file);\n\t\t\t}\n\t\t\treturn count;\n\t\t}\n\t}", "public static int[] scanFile(String fileName){\n File file = new File(fileName);\n int[] freqNums = new int[94];\n //try catch in case the file doesn't exist\n try {\n Scanner scan = new Scanner(file);\n //loop to look at each word in the file\n while (scan.hasNext()) {\n String s = scan.next();\n //loop to look at each character in the word\n for(int i = 0; i < s.length(); i++){\n if((int)s.charAt(i)-32 <= 94)\n freqNums[(int)s.charAt(i)-32] = freqNums[(int)s.charAt(i)-32] + 1;\n }\n //accounts for all the spaces\n freqNums[0] = freqNums[0]+1;\n }\n scan.close();\n //gets rid of the imaginary last space\n freqNums[0] = freqNums[0]-1;\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return freqNums;\n }", "public List<String> splitByCount(String fileName, int count)\n throws IOException, InterruptedException {\n\n List<String> parts = new ArrayList<String>();\n File file = new File(fileName);\n int blockSize = (int) Math.ceil(file.length() / (double) count);\n RandomAccessFile raf = new RandomAccessFile(fileName, \"r\");\n long totalLen = raf.length();\n CountDownLatch latch = new CountDownLatch(count);\n\n long startPos = 0L;\n long nextPos = 0L;\n\n for (int i = 0; i < count; i++) {\n nextPos = Long.min((long) (i + 1) * blockSize, totalLen - 1);\n raf.seek(nextPos);\n //Calculate the start position for the next file.\n do {\n raf.seek(nextPos);\n if (raf.readByte() == '\\n') {\n nextPos = nextPos + 1;\n break;\n }\n nextPos--;\n } while (true);\n long readSizeTemp = nextPos - startPos;\n int readSize = (int) readSizeTemp;\n String partFileName = fileName.replace(\"raw\", \"raw\" + (i + 1));\n new SplitRunnable(readSize, startPos, partFileName, file, latch).run();\n startPos = nextPos;\n parts.add(partFileName);\n }\n //Wait until all the files are written.\n latch.await();\n return parts;\n }", "public ArrayList<BigInteger> read(String fileName) {\n String line = null; // current line from text file\n String[] numbers = null;\n try {\n BufferedReader lineReader = new BufferedReader\n ( (fileName == null || fileName.length() <= 0 || fileName.equals(\"-\"))\n ? new InputStreamReader(System.in)\n : new FileReader(fileName)\n );\n while ((line = lineReader.readLine()) != null) { // read and process lines\n if (! line.matches(\"\\\\s*#.*\") && ! line.matches(\"\\\\s*\")) { // no comment line, no empty line\n numbers = line.trim().split(\"\\\\s+\");\n int last = numbers.length - 1;\n /*\n try {\n int index = Integer.parseInt(numbers[0]);\n } catch (Exception exc) {\n }\n */\n sequence.add(new BigInteger(numbers[last]));\n } else {\n // ignore comment line\n }\n } // while ! eof\n lineReader.close();\n } catch (Exception exc) {\n log.error(exc.getMessage(), exc);\n } // try\n return sequence;\n }", "public void readIn(String file) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\t/** Initialise loop variable **/\r\n\r\n\t\t\tusedSize = 0;\r\n\r\n\t\t\t/** Set up file for reading **/\r\n\r\n\t\t\tFileReader reader = new FileReader(file);\r\n\r\n\t\t\tScanner in = new Scanner(reader);\r\n\r\n\t\t\t/** Loop round reading in data while array not full **/\r\n\r\n\t\t\twhile (in.hasNextInt() && (usedSize < size)) {\r\n\r\n\t\t\t\tA[usedSize] = in.nextInt();\r\n\r\n\t\t\t\tusedSize++;\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\tSystem.out.println(\"Error processing file \" + file);\r\n\r\n\t\t}\r\n\r\n\t}", "private static void stepSorter(String file, DataOutputStream d, int size) throws FileNotFoundException, IOException {\n\t\tDataInputStream inputA = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(file))));\n\t\tDataInputStream inputB = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(file))));\n\t\tint numDivisions = (int) Math.ceil(fileSize/((double) size));\n\t\tinputB.skip(size*4);\n\t\tfor (int j = 0; j < numDivisions/2; j++){\t\n\t\t\tint counterA = size;\n\t\t\tint counterB = Math.min(fileSize - j*size*2 - size, size);\n\t\t\tInteger a = inputA.readInt();\n\t\t\tInteger b = inputB.readInt();\n\t\t\twhile (counterA > 0 && counterB > 0){\n\t\t\t\tif (a < b){\n\t\t\t\t\td.writeInt(a);\n\t\t\t\t\tif (counterA > 1){\n\t\t\t\t\t\ta = inputA.readInt();\n\t\t\t\t\t}\n\t\t\t\t\tcounterA--;\n\t\t\t\t} else {\n\t\t\t\t\td.writeInt(b);\n\t\t\t\t\tif (counterB > 1){\n\t\t\t\t\t\tb = inputB.readInt();\n\t\t\t\t\t}\n\t\t\t\t\tcounterB--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (counterA == 0){\n\t\t\t\td.writeInt(b);\n\t\t\t\tcounterB--;\n\t\t\t\tfor (int i =0; i < counterB; i++){\n\t\t\t\t\td.writeInt(inputB.readInt());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\td.writeInt(a);\n\t\t\t\tcounterA--;\n\t\t\t\tfor (int i =0; i < counterA; i++){\n\t\t\t\t\td.writeInt(inputA.readInt());\n\t\t\t\t}\n\t\t\t}\n\t\t\tinputA.skip(size*4);\n\t\t\tinputB.skip(size*4);\n\t\t}\n\t\t\n\t\t//copy the excess\n\t\twhile (inputA.available()>0){\n\t\t\td.writeInt(inputA.readInt());\n\t\t}\n\t\tinputA.close();\n\t\tinputB.close();\n\t\td.flush();\n\t}", "public static void generateCostTable(int n, String fileName) \r\n\tthrows FileNotFoundException {\r\n\t\tPrintStream output = new PrintStream(new File(fileName));\r\n\t\t\r\n\t\tfor(int i = 0; i < n; i++) {\r\n\t\t\tfor(int j = 0; j < n; j++) {\r\n\t\t\t\tif(i > j) {\r\n\t\t\t\t\toutput.print(\"NA\\t\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(i == j) {\r\n\t\t\t\t\toutput.print(0 + \"\\t\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// randCost between 1 inclusive and MAX_COST inclusive\r\n\t\t\t\t\tint randCost = (new Random().nextInt(MAX_COST)) + 1; \r\n\t\t\t\t\toutput.print(randCost + \"\\t\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\toutput.println();\r\n\t\t}\r\n\t\t\r\n\t\toutput.close();\r\n\t}", "public static void randomNumsFile(String fileName, int howMany, int rangeFrom, int rangeTo) throws IOException\n {\n int temp; //to hold temporary value for swapping\n int number; //to hold generated random numbers\n if (rangeTo<rangeFrom) //check if upper limit is smaller than lower limit \n {\n //swap\n temp = rangeFrom;\n rangeFrom = rangeTo;\n rangeTo = temp;\n } \n // Open the file.\n PrintWriter outputFile = new PrintWriter(fileName);\n\n // Get data and write it to the file.\n for (int i = 1; i <= howMany; i++)\n {\n Random randomNumber = new Random();//set up an object to generate random nubmers\n number = randomNumber.nextInt((rangeTo - rangeFrom) + 1) + rangeFrom; // generate random number\n // Write the number to the file.\n outputFile.println(number);\n }\n // Close the file.\n outputFile.close();\n }", "public static int[] generateSequence(String arguments[]){\n int size = Integer.parseInt(arguments[1]);\n int i;\n int primeArray[] = new int[size];\n PrimeSequence prime = new PrimeSequence(Integer.parseInt(arguments[0]));\n \n for(i = 0; i < size; i++){\n primeArray[i] = prime.next();\n } \n return primeArray;\n \n }", "public static File createTestFile(File file, long length) throws IOException {\n FileOutputStream output = new FileOutputStream(file);\n for (long i = 0; i < length; i++) {\n output.write((int) i);\n }\n output.close();\n return file;\n }", "public void expandFile()\n throws IOException\n {\n file.seek(FILE_SIZE);\n for (int i = 0; i < BLOCK_SIZE; i++)\n {\n file.write(0);\n }\n FILE_SIZE += BLOCK_SIZE;\n }", "void addFile(int numberLines);", "@Override\r\n\tpublic void setSequenceSize(int size) {\n\t\tthis.sequence = \"Sequence length: \"+size;\r\n\t\tupdate();\r\n\t}", "@Override\r\n\tpublic void setSequenceSize(int x) {\n\t\tsizeNum = x;\r\n\t\tupdate();\r\n\t}", "public static int[] makePermutation(int numFilesInSet) {\n\tint value;\n\tboolean todo;\n\tboolean exist[];\n\n\tint[] permutation = new int[numFilesInSet];\n\texist = new boolean[numFilesInSet];\n\tvalue = 0;\n\tfor (int i = 0; i < permutation.length; i++) {\n\t todo = true;\n\t while (todo) {\n\t\tvalue = _random.nextInt(numFilesInSet);\n\t\ttodo = (exist[value] != false);\n\t }\n\t permutation[i] = value;\n\t exist[value] = true;\n\t}\n\treturn permutation;\n }", "public static void createAllPackets() throws IOException {\r\n fileReader = new FileInputStream(filePath); // open file\r\n\r\n // // uncomment this part for checking\r\n // File outFile = new File(\"out\");\r\n // FileOutputStream fos = new FileOutputStream(outFile);\r\n\r\n while (!isDone) {\r\n // while there are still bytes to read from file\r\n byte[] data = new byte[MAX_LENGTH];\r\n\r\n int bytesRead = fileReader.read(data);\r\n\r\n if (bytesRead == -1) {\r\n isDone = true;\r\n break;\r\n } else {\r\n byte[] packet = createPacket(data);\r\n packets.add(packet); // add packet to list of packets, its sequence num is index+1 because list is zero based\r\n\r\n // // uncomment this part for checking\r\n // byte[] temp = new byte[1022];\r\n // System.arraycopy(packet, 2, temp, 0, 1022); // out.png\r\n // fos.write(temp);\r\n }\r\n }\r\n\r\n //fos.close();\r\n fileReader.close();\r\n }", "public void expandFile(long length) throws IOException {\n\n\t}", "public int size() { return seq.size(); }", "interface Generator {\n int[] generate(int size);\n }", "public static void splitFile() throws IOException{\n\t\tPath currentRelativePath = Paths.get(\"\");\n\t\tFile file = new File(currentRelativePath.toAbsolutePath().toString()+\"/\"+fileName);\n\n\t\t//fileChunks are of size windowSize\n\t\tint num = fileSize; \n\t\tint lastByteRead = 0;\n\t\tint start =0;\n\t\tint i= 0; //where we are in bitfield map\n\t\tbyte[] fileChunkArray = new byte[windowSize];\n\t\t//read in the file\n\t\ttry{\n\t\t\tFileInputStream fileInputStream = new FileInputStream(file);\n\t\t\twhile(num > 0){\n\t\t\t\tif (num <= 5){\n\t\t\t\t\twindowSize = num;\n\t\t\t\t}\n\t\t\t\t// byte[] fileChunkArray = new byte[windowSize];\n\t\t\t\t\n\t\t\t\tlastByteRead = fileInputStream.read(fileChunkArray,0,windowSize);\n\t\t\t\t\n\t\t\t\t// start = start +windowSize;\n\t\t\t\t\n\t\t\t\t// String s1 = new String(fileChunkArray);\n\t\t\t\tSystem.out.print(\"the chunkarray length is :\" + fileChunkArray.length);\n\t\t\t\tSystem.out.print(\"the lastbyte read is :\"+ lastByteRead);\n\t\t\t\t// System.out.print(\"the fileChunk array is :\"+ s1);\n\t\t\t\tbitfieldMap.put(lastByteRead,fileChunkArray);\n\t\t\t\ti++;\n\t\t\t\tdynamicName = fileName+ i;\n\t\t\t\tworkingDirectory = System.getProperty(\"user.dir\");\n\t\t\t\tabsoluteFilePath = workingDirectory + File.separator + dynamicName;\n\t\t\t\tnum = num - windowSize; \n\t\t\t\tFileOutputStream newFile = new FileOutputStream(absoluteFilePath);\n\t\t\t\tnewFile.write(fileChunkArray);\n\t\t\t\tnewFile.flush();\n\t\t\t\tnewFile.close();\n\n\t\t\t}\n\t\t\tfileInputStream.close();\t\n\t\t}catch(IOException ioe){\n\t\t\tSystem.out.println(\"Could not split file: \" + ioe);\n\t\t}\n\t}", "public static File generateTestInput(int min, int max, int size) throws IOException\r\n {\r\n int i;\r\n File data = new File(DATA_FILE_NAME);\r\n data.createNewFile();\r\n //try (FileWriter writer = new FileWriter(data)) {\r\n FileWriter writer = new FileWriter(data);\r\n writer.write(String.valueOf(size));\r\n writer.write(\" \");\r\n for (i = 0; i < size; i++)\r\n {\r\n Random rand = new Random();\r\n writer.write(String.valueOf(rand.nextInt(max - min + 1) + min));\r\n writer.write(\" \");\r\n }\r\n writer.flush();\r\n writer.close();\r\n //}\r\n return data;\r\n }", "static long m61428a(File file) {\n long j;\n try {\n StatFs statFs = new StatFs(file.getAbsolutePath());\n j = (((long) statFs.getBlockCount()) * ((long) statFs.getBlockSize())) / 50;\n } catch (IllegalArgumentException unused) {\n j = 5242880;\n }\n return Math.max(Math.min(j, 52428800), 5242880);\n }", "private static byte[] m136428a(File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[((int) file.length())];\n int i = 0;\n while (i < bArr.length) {\n int read = fileInputStream.read(bArr, i, bArr.length - i);\n if (read < 0) {\n break;\n }\n i += read;\n }\n if (i >= bArr.length) {\n fileInputStream.close();\n return bArr;\n }\n StringBuilder sb = new StringBuilder(\"Could not completely read file \");\n sb.append(file.getName());\n throw new IOException(sb.toString());\n }", "public static long count(String path) throws IOException {\n\n Configuration conf = NutchConfiguration.create();\n FileSystem fs = FileSystem.get(conf);\n\n Path file = new Path(path);\n System.out.println(file);\n\n SequenceFile.Reader reader = new SequenceFile.Reader(conf, SequenceFile.Reader.file(file));\n\n Writable key = (Writable)\n ReflectionUtils.newInstance(reader.getKeyClass(), conf);\n Writable value = (Writable)\n ReflectionUtils.newInstance(reader.getValueClass(), conf);\n\n\n //skip rows\n long i = 0;\n\n\n while(reader.next(key, value)) {\n i += 1;\n }\n return i;\n }", "public void importFnaBitSequences(String filename, int start, int end) {\n\n int currentKID = -1;\n SuperString currentSeq = new SuperString();\n //String currentName = \"\";\n boolean ignore = true; //do not write empty sequence to database\n\n TimeTotals tt = new TimeTotals();\n tt.start();\n\n System.out.println(\"\\nFNA import begins \" + tt.toHMS() + \"\\n\");\n try (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\n for (String line; (line = br.readLine()) != null; ) {\n\n if (debug) {\n System.err.println(\"Single line:: \" + line);\n }\n\n // if blank line, it does not count as new sequence\n if (line.trim().length() == 0) {\n if (debug) System.err.println(\" :: blank line detected \");\n\n if (!ignore)\n if(currentKID >= start && currentSeq.length() > 0) {\n storeSequence(currentKID, currentSeq, tt);\n } else {\n sequenceLength.add(currentSeq.length());\n exceptionsArr.add(new HashMap<>());\n }\n\n else if (!ignore) {\n sequenceLength.add(currentSeq.length());\n exceptionsArr.add(new HashMap<>());\n }\n ignore = true;\n\n // if line starts with \">\", then it is start of a new reference sequence\n } else if (line.charAt(0) == '>') {\n if (debug) System.err.println(\" :: new entry detected \" + line);\n\n // save previous iteration to database\n if (!ignore && currentSeq.length() > 0) {\n storeSequence(currentKID, currentSeq, tt);\n } else if (!ignore) {\n sequenceLength.add(currentSeq.length());\n exceptionsArr.add(new HashMap<>());\n }\n // initialize next iteration\n if (indexOf(line.trim()) == -1) {\n //original.addAndTrim(new Kid(line.trim()));\n //addNewKidEntry(line);\n add(new Kid(line.trim()));\n if (getLast()==start || (getLast()== 1 && start == 1)){\n System.err.println(\"Found KID\\t\" + currentKID + \"\\tbit string import started\");\n }\n }\n\n currentKID = getKid(line.trim()); // original.indexOf(line.trim());\n if (currentKID == -1) {\n System.err.println(\"This sequence not found in database : \" + line);\n listEntries(0);\n exit(0);\n }\n //currentSeq = \"\";\n\n currentSeq = new SuperString();\n\n ignore = false;\n } else {\n currentSeq.addAndTrim(line.trim());\n }\n\n\n if (currentKID >= end){\n break;\n }\n } //end for\n\n //write last\n if (!ignore && currentKID >= start && currentSeq.length() > 0) {\n storeSequence(currentKID, currentSeq, tt);\n }\n// else if (!ignore) {\n// sequenceLength.add(currentSeq.length());\n// exceptionsArr.add(new HashMap<>());\n// }\n br.close();\n\n }catch (FileNotFoundException e1) {\n e1.printStackTrace();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n\n }", "public static ArrayList<String> parseSequenceFile(String filePath) {\n\t\tArrayList<String> sequence = new ArrayList<String>();\n\t\tFile file = new File(filePath);\n\t\tScanner scanner;\n\n\t\ttry {\n\t\t\tscanner = new Scanner(file);\n\n\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\tsequence.add(scanner.nextLine());\n\t\t\t}\n\n\t\t\tscanner.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found. Program aborted.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\treturn sequence;\n\t}", "@Test\r\n\tpublic void generateFile() {\n\t\tfor (int i = 1; i <= 5; i++) {\r\n\t\t\t// String filePath = \"C://Users//AtifKhan//Desktop//sample-\" + i +\r\n\t\t\t// \".csv\";\r\n\t\t\tString filePath = \"C://Users//olcay tarazan//Desktop//sample-\" + i + \".csv\";\r\n\t\t\tint numberOfDataLines = 400;\r\n\t\t\ttry {\r\n\t\t\t\tgenerateCsvFile(filePath, numberOfDataLines);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"File generated : sample-\" + i + \".csv \");\r\n\t\t}\r\n\t}", "public void numeros() {\r\n \tint[] lista= new int[3001];\r\n\r\n\t\tFile crear = new File (\"Numerosaleatorios.txt\");\r\n \r\n\t\tFileWriter escribir = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tescribir = new FileWriter (crear);\r\n\t\t\tBufferedWriter escribir1 = new BufferedWriter (escribir);\r\n\t\t\tint linea;\r\n\t\t\tRandom aleatorios = new Random();\r\n\t\t\tfor (int i =0; i<3000; i++) {\r\n\t\t\t\tlinea = aleatorios.nextInt(1000);\r\n\t\t\t\tlista[i]= aleatorios.nextInt(1000);\r\n\t\t\t\tescribir1.write(linea + \"\\n\");\r\n\t\t}\r\n\t\t\r\n\t\tescribir.close();\r\n\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);\r\n\t}\r\n\t}", "public void generate() throws FileNotFoundException, UnsupportedEncodingException {\n\t\twriter = new PrintWriter(outputFile, \"UTF-8\");\n\t\tFile file = new File(inputFile);\n\t\treader = new Scanner(file);\n\t\tinitializeFile();\n\t\t\n\t\tString line = readLine();\n\t\twhile (line != null) {\n\t\t\tprocess(line);\n\t\t\tline = readLine();\n\t\t}\n\t\t\n\t\tfinishFile();\n\t\twriter.close();\n\t}", "public static int readNextBatch(long[] primeNumbers, RandomAccessFile inout) {\n int size = 0;\n try {\n while (inout.getFilePointer() < inout.length() && size < ARRAY_SIZE) {\n primeNumbers[size++] = inout.readLong();\n }\n }\n catch (Exception ex) {\n ex.printStackTrace();\n }\n\n return size;\n //*/\n }", "public String fileView(RandomAccessFile file){\n StringBuilder out = new StringBuilder(\"\");\n try{\n file.seek(0);\n while(true){\n out.append(file.readInt() + \"\\n\");\n }\n }catch (IOException e){\n\n }\n return out.toString();\n }", "public static File produceTocFile(File file) throws FileNotFoundException {\n if (!file.exists()) {\n throw new FileNotFoundException(\"Input file is not valid!\");\n }\n\n TreeMap<String, Set<Integer>> map = new TreeMap<>();\n\n\n LongAdder lineCounter = new LongAdder();\n lineCounter.increment(); // First line is line1\n File newFile = null;\n\n Path filePath = file.toPath();\n String fullFileName = filePath.getFileName().toString();\n System.out.println(\"full file name: \" + filePath);\n String fileName = fullFileName.substring(0, fullFileName.lastIndexOf(\".\")) + \".toc\";\n System.out.println(\"new file: \" + fileName);\n\n try (Stream<String> lines = Files.lines(filePath)) {\n Path path = Paths.get(filePath.getParent().toString() + \"\\\\\" + fileName);\n\n if (Files.exists(path)) Files.delete(path);\n newFile = Files.createFile(Paths.get(filePath.getParent().toString() + \"\\\\\" + fileName)).toFile();\n\n lines.forEach(e -> {\n String[] wordsInEachLIne = e.split(\"\\\\W+\");\n for (String element : wordsInEachLIne) {\n int counter = lineCounter.intValue();\n\n if (map.containsKey(element)) {\n map.get(element).add(counter);\n } else {\n Set<Integer> valueSet = new HashSet<>();\n valueSet.add(counter);\n map.put(element, valueSet);\n }\n }\n lineCounter.increment();\n });\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n while (!map.isEmpty()) {\n Map.Entry<String, Set<Integer>> entry = map.pollFirstEntry();\n String text = entry.getKey() + \":\" + entry.getValue().toString() + \" \";\n try {\n Files.write(newFile.toPath(), text.getBytes(), StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return newFile;\n }", "private static void readFile(File file) throws IOException {\n try (FileInputStream is = new FileInputStream(file)) {\n byte[] buf = new byte[CHUNK];\n int count = 0;\n long t = System.nanoTime();\n for (int i = 0; i < N/CHUNK; i++) {\n int c = is.read(buf);\n if (c == -1) {\n System.out.println(\"EOF\");\n break;\n } else if (c < 10) {\n System.out.println(\"PARTIAL\");\n break;\n }\n count += c;\n }\n System.out.println((System.nanoTime() - t) / 1_000_000 + \" ms \" + count + \" bytes\");\n }\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tSystem.setIn(new FileInputStream(\"1213.txt\"));\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tfor(int tc=1;tc<=10;tc++) {\r\n\t\t\tint num = sc.nextInt();\r\n\t\t\tString target = sc.next();\r\n\t\t\tString test = sc.next();\r\n\t\t\tint result = 0;\r\n\t\t\tchar[] arr = new char[target.length()];\r\n\t\t\tfor(int i=0;i<arr.length;i++) {\r\n\t\t\t\tarr[i] = target.charAt(i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<=test.length()-target.length();i++) {\r\n\t\t\t\tchar[] tmp = new char[target.length()];\r\n\t\t\t\tint cnt = 0, m = 0;\r\n\t\t\t\tfor(int j=i;j<i+target.length();j++) {\r\n\t\t\t\t\ttmp[m] = test.charAt(j);\r\n\t\t\t\t\tm++;\r\n\t\t\t\t}\r\n\t\t\t\tfor(int k=0;k<target.length();k++) {\r\n\t\t\t\t\tif(arr[k] == tmp[k]) {\r\n\t\t\t\t\t\tcnt++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(cnt == target.length()) {\r\n\t\t\t\t\tresult++;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"#\"+tc+\" \"+result);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "@Test\n public void allSize() throws Exception{\n fillFile();\n Assert.assertEquals(maxBlocks, rf.size());\n }", "public File[] writeChunks(String save, int chunkSize) throws IOException {\n\t\tCollection<File> rtrn=new TreeSet<File>();\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(this.fastqFile)));\n\t\tString nextLine;\n\t\tFileWriter writer=new FileWriter(save+\".0.fq\");\n \tint i=0;\n while ((nextLine = reader.readLine()) != null && (nextLine.trim().length() > 0)) {\n \tif(nextLine.startsWith(\"@\")){\n \t\tif(i%chunkSize ==0){\n \t\t\twriter.close();\n \t\t\trtrn.add(new File(save+\".\"+(i/chunkSize)+\".fq\")); \n \t\t\twriter=new FileWriter(save+\".\"+(i/chunkSize)+\".fq\"); \n \t\t\tSystem.err.println(i);\n \t\t}\n \t\tString firstLine=nextLine;\n \t\tString secondLine=reader.readLine();\n \t\tString thirdLine=reader.readLine();\n \t\tString fourthLine=reader.readLine();\n \t\t\n \t\tFastqSequence seq=new FastqSequence(firstLine, secondLine, thirdLine, fourthLine);\n \t\t//String sequence=seq.getSequence();\n \t\twriter.write(seq.toFastq()+\"\\n\");\n \t\ti++;\n \t\tif(i % 100000 == 0){System.err.println(\"Iterating.. \"+ i);}\n \t}\n \t\n \t\n }\n this.numberOfSeq=i;\n File[] files=new File[rtrn.size()];\n int counter=0;\n for(File file: rtrn){files[counter++]=file;}\n\t\treturn files;\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t Scanner in = new Scanner(new File(args[0]));\n\t int X=0,N,i;\n\t int t = in.nextInt(); // Scanner has functions to read ints, longs, strings, chars, etc.\n\t for (int ii = 1; ii <= t; ++ii) {\n\t\t\n\t\t\t\t i=1;\n\t\t\t\tSet set = new HashSet<String>();\n\t\t\t\tN = in.nextInt();\n\t\t\t\tif(N==0){\n\t\t\t\t\tSystem.out.println(\"Case #\"+ii+\": INSOMNIA\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\twhile(set.size()!=10){\n\t\t\t\t\tX = N*i;\n\t\t\t\t\tString str = Integer.toString(X);\n\t\t\t\t\tString[] list = str.split(\"|\");\n\t\t\t\t\tfor(String j: list){\n\t\t\t\t\t\tset.add(j);\n\t\t\t\t\t}\n\t\t\t\t\t//set.addAll(list);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Case #\"+ii+\": \"+\tX);\n\t }\n\t}", "public static void main(String[] args) throws IOException {\n\n long count=0;\n int line_num = 0;\n try{\n\n File file = new File(\"C:\\\\Users\\\\achyutha.aluru\\\\Desktop\\\\Files\\\\newfile_shortest1.txt\");\n PrintWriter writer = new PrintWriter(file, \"UTF-8\");\n\n\n Random random = new Random();\n// int randomInt = random.nextInt(10);\n for(long i = 0; i < 5000; i++) //858993451 for 6.2gb\n { \n char[] word = new char[random.nextInt(8)+3]; // words of length 3 through 10. (1 and 2 letter words are boring.)\n count+=word.length;\n for(int j = 0; j < word.length; j++)\n {\n word[j] = (char)('a' + random.nextInt(26));\n\n }\n writer.print(new String(word) + ' ');\n count+=1;\n if (i % 10 == 0){\n writer.print(\".\");\n// writer.print(\"\\n\");\n line_num+=1;\n count+=1;\n }\n// if (line_num == randomInt) {\n// \twriter.print(\"\\n\");\n// \tline_num=0;\n// \trandomInt = random.nextInt(10);\n// }\n }\n writer.close();\n } catch (IOException e) {\n // do something\n }\n \n FileWrite fw = new FileWrite();\n fw.AppendToFile(\"C:\\\\\\\\Users\\\\\\\\achyutha.aluru\\\\\\\\Desktop\\\\\\\\Files\\\\\\\\newfile_shortest1.txt\");\n System.out.println(count);\n\n}", "public static void addtoHashMap (File filename){\n\t\tFileInputStream fin;\n\t\ttry{\n\t\t\tfin = new FileInputStream(filename);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fin));\n\t\t\tString n;\n\t\t\ttry{\n\t\t\t\twhile ((n = br.readLine()) != null){\n\t\t\t\t\tif(h.containsKey(n)){\n\t\t\t\t\t\tint i = (Integer) h.get(n);\n\t\t\t\t\t\th.put(n, (i+1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\th.put(n, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}catch(FileNotFoundException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void shiftFile(String file) {\r\n\t\t\tint newCount = files.length + 1;\r\n\t\t\tif (newCount > max_number)\r\n\t\t\t\tnewCount = max_number;\r\n\t\t\tString[] fs = new String[newCount];\r\n\t\t\tfs[0] = file;\r\n\t\t\tint i = 0;\r\n\t\t\twhile (i < newCount - 1) {\r\n\t\t\t\tfs[i + 1] = files[i];\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\tfiles = new String[fs.length];\r\n\t\t\tSystem.arraycopy(fs, 0, files, 0, fs.length);\r\n\t\t}", "public static String leerFasta(File prueba) {\n\t\tString gen = \"\", genescogido = null;\n\t\ttry {\n\t\t\tArrayList<Integer> cabeceras = new ArrayList<>();\n\t\t\tint contador = 0;\n\t\t\tScanner leerfichero = new Scanner(prueba);\n\t\t\twhile(leerfichero.hasNextLine()){\n\t\t\t\tif (leerfichero.nextLine().startsWith(\">\")) {\n\t\t\t\t\tcabeceras.add(contador);\n\t\t\t\t\tcontador++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tRandom generador = new Random();\n\t\t\tint genElegido = cabeceras.get(Math.abs(generador.nextInt()%(cabeceras.size())));\n\t\t\tcontador = 0;\n\t\t\tleerfichero.close();\n\t\t\tleerfichero = new Scanner(prueba);\n\t\t\twhile(contador < cabeceras.get(genElegido)){\n\t\t\t\tleerfichero.nextLine();\n\t\t\t\tcontador++;\n\t\t\t}\n\t\t\tgenescogido = leerfichero.nextLine();\n\t\t\twhile (!genescogido.startsWith(\">\")) genescogido = leerfichero.nextLine();\n\t\t\tString line = leerfichero.nextLine();\n\t\t\twhile (!line.startsWith(\">\") ){\n\t\t\t\tgen+=line.replaceAll(\"\\n\", \"\");\n\t\t\t\tline = leerfichero.nextLine();\n\t\t\t}\n\t\t\tleerfichero.close();\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Gen elegido: \"+ genescogido.replaceAll(\"gene\", \"\") +\"\\n\" + gen);\n\t\treturn gen;\n\t}", "public Set<Integer> generateSet(int size){\n Set<Integer> data = new HashSet<>();\n for (int i = 0; i < size; i++){\n data.add(i);\n }\n return data;\n }", "public static void main(String[] args) throws IOException {\n char[][] key = new char[8][8];\n\n String[] lines = new String[8];\n\n File fileCardan = new File(\"cardan.txt\");\n\n Scanner fileScanner = new Scanner(fileCardan);\n\n for (int i = 0; i < 8; i++) {\n lines[i] = fileScanner.nextLine();\n }\n\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n key[i][j] = lines[i].charAt(j);\n }\n\n }\n\n // reading text from input.txt file and getting count of 64 char blocks\n String text = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\n int blocksCount = text.length() / 64 + 1;\n\n FileWriter fw = new FileWriter(\"encode.txt\");\n\n // encoding all 64 char blocks\n for (int i = 0; i < blocksCount; i++) {\n\n char[][] res;\n if(64+i*64 > text.length())\n res = encode(key, text.substring(i*64));\n else\n res = encode(key, text.substring(i*64,64+i*64));\n fileWrite(res,fw);\n\n }\n\n fw.close();\n\n text = new String(Files.readAllBytes(Paths.get(\"encode.txt\")));\n\n fw = new FileWriter(\"decode.txt\");\n\n for (int i = 0; i < blocksCount; i++) {\n\n fw.write(decode(text.substring(i*64,i*64+64),key));\n\n }\n\n fw.close();\n\n\n\n }", "public List<Integer> generateList(int size){\n List<Integer> data = new ArrayList<>();\n for (int i = 0; i < size; i++){\n data.add(i);\n }\n return data;\n }", "public void doTheStuff (String filename) throws FileNotFoundException {\n\tScanner in = new Scanner (new File (filename));\n\tint numberOfCases = in.nextInt();\n\tfor (int caseNumber = 1; caseNumber <= numberOfCases; caseNumber++) {\n\t\tSystem.out.print (\"Case #\"+caseNumber+\": \");\n\t\tsolve(in);\n\t}\n}", "public void mergeChunks(String fileName,int numChunks)\n {\n FileInputStream fInput;\n BufferedInputStream bufInput;\n BufferedOutputStream bufOutput;\n FileOutputStream fOutput;\n try\n { \n fOutput = new FileOutputStream(fileName);\n bufOutput = new BufferedOutputStream(fOutput); \n for(int i=0;i<numChunks;i++)\n {\n fInput = new FileInputStream(fileName+ \".chunk.\" + i);\n bufInput = new BufferedInputStream(fInput);\n int b;\n while((b=bufInput.read())!= -1)\n {\n bufOutput.write(b);\n }\n\n }\n bufOutput.close();\n }\n\t\tcatch(FileNotFoundException ex)\n {\n System.out.println(\"File Not Found\");\n }\n catch(IOException ex)\n {\n System.out.println(\"Some IOException occurred\");\n }\n }", "public List<BigInteger> generateList(int size) {\n LinkedList<BigInteger> list = new LinkedList<>();\n for (int i = 0; i < size; i++) {\n list.add(this.nextValue());\n }\n return list;\n }", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new FileReader(\"whereami.in\"));\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"whereami.out\")));\n\n //reads in and initializes n and k values\n StringTokenizer st = new StringTokenizer(f.readLine());\n int stringSize = Integer.parseInt(st.nextToken());\n\n st = new StringTokenizer(f.readLine());\n //initializes variable for input string\n String string = st.nextToken();\n\n //computes all subsequences and adds to set\n subsequence(string, string.length());\n\n boolean[] checks= new boolean[stringSize];\n\n int smallestSize = 0;\n\n for (int i = 0; i < stringSize; i++) {\n checks[i] = true;\n for (String s : subSequences) {\n if (s.length() == i + 1 && numberOccurrences(string, s) != 1) {\n checks[s.length() - 1] = false;\n }\n }\n if (checks[i] == true) {\n smallestSize = i + 1;\n break;\n }\n }\n\n out.println(smallestSize);\n out.close();\n }", "private static void readNIO(File file) throws IOException {\n FileChannel channel = new RandomAccessFile(file, \"rw\").getChannel();\n //channel.position(2*N);\n ByteBuffer buf = ByteBuffer.allocateDirect(CHUNK);\n long t = System.nanoTime();\n for (int i = 0; i < N/CHUNK; i++) {\n channel.position(i * CHUNK);\n channel.read(buf);\n }\n System.out.println((System.nanoTime() - t) / 1_000_000 + \" ms \" + channel.position() + \" bytes\");\n\n channel.close();\n }", "static void runIt() throws IOException {\n\t\t String inFName = \"resource/C-large.in\";\n//\t\tString outFName = \"resource/C-small.out\";\n\t\t String outFName = \"resource/C-large.out\";\n\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFName));\n\t\tPrintWriter out = new PrintWriter(new File(outFName));\n\n\t\tint testCases = Integer.parseInt(in.readLine());\n\n\t\tfor (int i = 0; i < testCases; ++i) {\n\n\t\t\tString line[] = in.readLine().split(\" \");\n//\t\t\tSystem.out.println(line);\n\t\t\tStringBuilder output = new StringBuilder();\n\t\t\toutput.append(\"Case #\" + (i + 1) + \": \");\n\n\t\t\tint R = Integer.parseInt(line[0]);\n\t\t\tint K = Integer.parseInt(line[1]);\n\t\t\tlong euros = 0;\n\t\t\tint pass = 0;\n\t\t\tline = in.readLine().split(\" \");\n\t\t\tVector<Integer> queue = new Vector<Integer>();\n\t\t\tVector<Integer> first = new Vector<Integer>();\n\t\t\tfor (String string : line) {\n\t\t\t\tqueue.add(Integer.parseInt(string));\n\t\t\t\tfirst.add(Integer.parseInt(string));\n\t\t\t\t\n\t\t\t}\n\n\n\t\t\tfor (int time = 0; time < R; ++time) {\n\t\t\t\tint p = 0;\n\t\t\t\twhile (true) {\n\t\t\t\t\tif (p < queue.size()) {\n\t\t\t\t\t\tInteger g = queue.elementAt(p++);\n\t\t\t\t\t\tif (pass + g <= K) {\n\t\t\t\t\t\t\tpass += g;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tfor (int kk = 1; kk < p; ++kk) {\n\t\t\t\t\tInteger m = queue.remove(0);\n\t\t\t\t\tqueue.add(m);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\teuros += pass;\n\t\t\t\tpass=0;\n\t\t\t\tif(queue.equals(first)){\n\t\t\t\t\tint s = R/(time+1);\n\t\t\t\t\teuros*=s;\n\t\t\t\t\ttime *=s;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\toutput.append(euros);\n\t\t\tSystem.out.println(output);\n\t\t\tout.println(output);\n\t\t}\n\n\t\tin.close();\n\t\tout.flush();\n\t\tout.close();\n\t}", "@Test\n\tpublic void generateCompressedFile() throws Exception {\n\t\tint sourceRecords = 10000000;\n\t\tint bufferSize = 1000;\n\t\tAssert.isTrue(sourceRecords % bufferSize == 0); // make sure its divisible without the remainder\n\t\tfinal int outerLoop = sourceRecords / bufferSize;\n\t\tfinal CountDownLatch latch = new CountDownLatch(outerLoop);\n\t\t\n\t\tExecutorService executor = Executors.newFixedThreadPool(8);\n\n\t\tfinal FileOutputStream fos = new FileOutputStream(new File(\"source/compressed.txt\"));\n\t\tfinal BufferedReader br = new BufferedReader(new FileReader(\"source/source.txt\"));\n\t\t\n\t\tfinal ArrayBlockingQueue<String> recordQueue = new ArrayBlockingQueue<String>(outerLoop);\n\t\texecutor.execute(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < outerLoop; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfos.write(recordQueue.poll(1000, TimeUnit.MILLISECONDS).getBytes());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tlatch.countDown();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tlong start = System.currentTimeMillis();\n\t\tfor (int i = 0; i < outerLoop; i++) {\n\t\t\tStringBuffer buffer = new StringBuffer(bufferSize * 230);\n\t\t\tfor (int j = 0; j < bufferSize; j++) {\n\t\t\t\tString line = br.readLine();\n\t\t\t\tbuffer.append(line + \"\\n\");\n\t\t\t}\n\t\t\tfinal String bufferString = buffer.toString();\n\t\t\t\n\t\t\texecutor.execute(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString compressedRecord = compressRecord(bufferString) + \"\\n\";\n\t\t\t\t\t\trecordQueue.offer(compressedRecord);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t}\n\n\t\tlatch.await();\n\t\tlong stop = System.currentTimeMillis();\n\t\tSystem.out.println(\"Compressed and written \" + sourceRecords + \" records in \" + (stop - start) + \" milliseconds\");\n\t\tfos.close();\n\t\tbr.close();\n\t}", "public static int size_seqnum() {\n return (8 / 8);\n }", "public static void main(String[] args) {\n int limit = a.length/2;\n int size = 2;\n while(size<=limit) {\n createPartitionsOfSize(a, size);\n size+=2;\n }\n System.out.println(\"Result: \" + Arrays.toString(a));\n }", "public DynamicTest generateSizeTest(int limit) {\n\t\t\tList<BigInteger> actual = FibonacciGenerator.fibonacciNumbers(limit);\n\t\t\treturn dynamicTest(\"size for limit = \" + limit, () -> {\n\t\t\t\tassertEquals(limit, actual.size());\n\t\t\t});\n\t\t}", "public static void main(String[] args) throws Exception {\n FileOutputStream file = new FileOutputStream(\"randoms.txt\");\n PrintWriter output = new PrintWriter(file);\n\n //write 100 random numbers to the file\n\n\n\n\n //open the file for input\n\n\n\n\n //print the sorted array on the screen\n\n\n\n}", "private Chunk generateChunk(int size) {\n String json;\n ObjectMapper objectMapper = new ObjectMapper();\n List<Record> recordList = new ArrayList<>();\n int i = 1;\n while (i <= size) {\n json = \"{ \\\"Price\\\" :\" + priceGenerator.nextDouble() * 100 + \" }\";\n try {\n recordList.add(new Record(String.valueOf(i), LocalDateTime.now(), objectMapper.readTree(json)));\n } catch (JsonProcessingException e) {\n log.error(\"Issue with the chunk generation: \" + e.getMessage());\n return null;\n }\n i++;\n\n }\n log.info(\"Generated Chunk :\");\n recordList.forEach((record) -> log.info(record.toString()));\n return new Chunk(recordList);\n }", "public static void main(String[] args) {\n String fileName = null;\n if (args.length >= 2) {\n // ignore [0] = \"-f\"\n fileName = args[1];\n }\n ArrayList<BigInteger> seq = (new BFileReader()).read(fileName);\n int index = 0;\n while (index < seq.size()) {\n System.out.println(index + \" \" + seq.get(index).toString());\n index ++;\n } // while index\n }", "void startFile() {\n writeToFile(defaultScore);\n for (int i = 0; i < 5; i++) {\n writeToFile(readFromFile() + defaultScore);\n }\n }", "private IntStream createStream() {\n DataInputStream dataInputStream = null;\n try {\n dataInputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(fileName)));\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found\");\n }\n DataInputStream finalDin = dataInputStream;\n return IntStream.generate(() -> {\n try {\n assert finalDin != null;\n return finalDin.readInt();\n } catch (IOException e) {\n System.out.println(\"Stream problem\");\n }\n return 0;\n })\n .limit(20);\n }", "public static void main(String[] args) throws IOException {\n\t\tRandomAccessFile file = new RandomAccessFile(\"C:/Users/Administrator/Desktop/cs.txt\", \"rw\");\n\t\tFileChannel channle = file.getChannel();\n\t\tByteBuffer buffer = ByteBuffer.allocate(10);\n\t\tint readByte = channle.read(buffer);\n\t\twhile (readByte > -1) {\n\t\t\tSystem.out.println(\"readLength:\" + readByte);\n\t\t\twhile (buffer.hasRemaining()) {\n\t\t\t\tSystem.out.println(buffer.get());\n\t\t\t}\n\t\t\tbuffer.clear();\n\t\t\treadByte = channle.read(buffer);\n\t\t}\n\t}", "public RandomFileFactory(int fileSize, File directory) throws IOException {\n file = File.createTempFile(PREFIX, SUFFIX, directory);\n byte[] buffer = new byte[BUFFER_SIZE];\n\n FileOutputStream outputStream = null;\n\n try {\n outputStream = new FileOutputStream(file);\n\n for (int written = 0; written < fileSize;) {\n int thisChunk = Math.min(BUFFER_SIZE, fileSize - written);\n random.nextBytes(buffer);\n outputStream.write(buffer, 0, thisChunk);\n\n written += thisChunk;\n }\n } finally {\n if (outputStream != null) {\n outputStream.close();\n }\n }\n }", "public Collection<FastqSequence> parse(File file)throws IOException{\n\t\tCollection<FastqSequence> rtrn=new ArrayList<FastqSequence>();\n\t\tString nextLine;\n while ((nextLine = reader.readLine()) != null && (nextLine.trim().length() > 0)) {\n \tif(nextLine.startsWith(\"@\")){\n \t\tString firstLine=nextLine;\n \t\tString secondLine=reader.readLine();\n \t\tString thirdLine=reader.readLine();\n \t\tString fourthLine=reader.readLine();\n \t\t\n \t\tFastqSequence seq=new FastqSequence(firstLine, secondLine,thirdLine, fourthLine);\n \t\t\t\n \t\trtrn.add(seq);\n \t}\n \t\n \t\n }\n return rtrn;\n\t}", "List<File> compress(File directory, int size);", "public static void main(String[] args) throws IOException {\n\t String FinalContigWritePath=args[0];\n\t\tString ContigAfterPath=args[1];\n\t\tString ContigSPAdesPath=args[2];\n\t\tString MUMmerFile1=args[3];\n\t\tString MUMmerFile2=args[4];\n\t\tint SizeOfContigAfter=CommonClass.getFileLines(ContigAfterPath)/2;\n\t String ContigSetAfterArray[]=new String[SizeOfContigAfter];\n\t int RealSizeOfContigSetAfter=CommonClass.FastaToArray(ContigAfterPath,ContigSetAfterArray); \n\t System.out.println(\"The real size of ContigSetAfter is:\"+RealSizeOfContigSetAfter);\n\t\t//low.\n\t\tint SizeOfContigSPAdes=CommonClass.getFileLines(ContigSPAdesPath);\n\t String ContigSetSPAdesArray[]=new String[SizeOfContigSPAdes+1];\n\t int RealSizeOfContigSetSPAdes=CommonClass.FastaToArray(ContigSPAdesPath,ContigSetSPAdesArray); \n\t System.out.println(\"The real size of ContigSetSPAdes is:\"+RealSizeOfContigSetSPAdes);\n\t\t//Loading After.\n\t\tint LoadingContigAfterCount=0;\n\t\tString LoadingContigAfterArray[]=new String[RealSizeOfContigSetAfter]; \n\t\tfor(int r=0;r<RealSizeOfContigSetAfter;r++)\n\t\t{\n\t\t\t if(ContigSetAfterArray[r].length()>=64)\n\t\t\t {\n\t\t\t\t LoadingContigAfterArray[LoadingContigAfterCount++]=ContigSetAfterArray[r];\n\t\t\t }\n\t\t}\n\t\tSystem.out.println(\"File After loading process end!\");\n\t\t//Alignment1.\n\t\tint SizeOfMUMmerFile1 = CommonClass.getFileLines(MUMmerFile1);\n\t\tString MUMerArray1[] = new String[SizeOfMUMmerFile1];\n\t\tint RealSizeMUMmer1 = CommonClass.FileToArray(MUMmerFile1, MUMerArray1);\n\t\tSystem.out.println(\"The real size of MUMmer1 is:\" + RealSizeMUMmer1);\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile2 = CommonClass.getFileLines(MUMmerFile2);\n\t\tString MUMerArray2[] = new String[SizeOfMUMmerFile2];\n\t\tint RealSizeMUMmer2 = CommonClass.FileToArray(MUMmerFile2, MUMerArray2);\n\t\tSystem.out.println(\"The real size of MUMmer2 is:\" + RealSizeMUMmer2);\n\t\t//Get ID1.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor(int f=4;f<RealSizeMUMmer1;f++)\n\t\t{\n\t\t\tString[] SplitLine1 = MUMerArray1[f].split(\"\\t|\\\\s+\");\n\t\t\tif(SplitLine1.length==14 && (SplitLine1[13].equals(\"[CONTAINS]\") || SplitLine1[13].equals(\"[BEGIN]\") || SplitLine1[13].equals(\"[END]\")))\n\t\t\t{\n\t\t\t\tString[] SplitLine2 = SplitLine1[11].split(\"_\");\n\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine2[1]);\n\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t}\n\t\t}\n\t\t//Get ID2.\n\t\tfor(int g=4;g<RealSizeMUMmer2;g++)\n\t\t{\n\t\t\tString[] SplitLine11 = MUMerArray2[g].split(\"\\t|\\\\s+\");\n\t\t\tString[] SplitLine12 = SplitLine11[12].split(\"_\");\n\t\t\tint SPAdes_id = Integer.parseInt(SplitLine12[1]);\n\t\t\thashSet.add(SPAdes_id);\n\t\t}\n\t //Write.\n\t\tint LineNum1=0;\n\t for(int x=0;x<LoadingContigAfterCount;x++)\n\t {\n\t\t\t FileWriter writer1= new FileWriter(FinalContigWritePath+\"contig.AfterMerge.fa\",true);\n\t writer1.write(\">\"+(LineNum1++)+\":\"+LoadingContigAfterArray[x].length()+\"\\n\"+LoadingContigAfterArray[x]+\"\\n\");\n\t writer1.close();\n\t }\n\t //Filter.\n\t\tint CountAdd=0;\n\t\tSet<String> HashSetSave = new HashSet<String>();\n\t for(int k=0;k<RealSizeOfContigSetSPAdes;k++)\n\t {\n\t \tif(!hashSet.contains(k))\n\t \t{\n\t \t\tHashSetSave.add(ContigSetSPAdesArray[k]);\n\t \t}\n\t }\n\t\tSystem.out.println(\"The real size of un-useded contigs is:\" + HashSetSave.size());\n\t\t//Write.\n\t\tIterator<String> it = HashSetSave.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tString SPAdesString = it.next();\n\t\t\tint Flag=1;\n\t\t for(int x=0;x<LoadingContigAfterCount;x++)\n\t\t {\n\t\t \tif((LoadingContigAfterArray[x].length()>=SPAdesString.length())&&(LoadingContigAfterArray[x].contains(SPAdesString)))\n\t\t \t{\n\t\t \t\tFlag=0;\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n\t\t\tif(Flag==1)\n\t\t\t{\n\t\t\t\tFileWriter writer = new FileWriter(FinalContigWritePath+\"contig.AfterMerge.fa\",true);\n\t\t\t\twriter.write(\">Add:\"+(LineNum1++)+\"\\n\"+SPAdesString+\"\\n\");\n\t\t\t\twriter.close();\n\t\t\t\tCountAdd++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The real size of add Complementary contigs is:\" + CountAdd);\n\t\tSystem.out.println(\"File write process end!\");\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tFile file = new File(\"input.txt\");\n\t\t@SuppressWarnings(\"resource\")\n Scanner scan = new Scanner(file);\n\t\t\n\t\tint caseNumber = scan.nextInt();\n for (int i = 1; i <= caseNumber; i++){\n Long N = scan.nextLong();\n Long L = scan.nextLong();\n List<Long> list = new ArrayList<Long>();\n for(int j = 0; j < L; j++) {\n \tlist.add(scan.nextLong());\n }\n String result = cryptopangrams(N,L,list);\n System.out.println(\"Case #\" + i + \":\" + \" \" + result);\n }\n\t}", "@Override\r\n public long problem0(int size) {\r\n System.out.println(\"This is just an example, but please follow this template.\");\r\n String s = \"\";\r\n long start = System.currentTimeMillis();\r\n\r\n for (int i=0; i<size; i++) {\r\n s = s + i;\r\n }\r\n \r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "private static void generateForSingleFile() throws IOException {\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(singlePatternPath+ filename));\n\t\t\n\t\tIterator iter = countOne.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\tif(out!=null)\n\t\t\tout.close();\n\t\t\n\t\t\n\t\tBufferedWriter out1 = new BufferedWriter(new FileWriter(newSinglePatternPath+filename));\n\t\titer = countTwo.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout1.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\t \n\t\tif(out1!=null)\n\t\t\tout1.close();\n\t}", "public ArrayList<Integer> readFile(File file) {\n\t\tArrayList<Integer> fileData = new ArrayList<Integer>();\n\t\t// read the file\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n\t\t\twhile (sc.hasNextInt()) {\n\t\t\t\tfileData.add(sc.nextInt());\n\t\t\t}\n\t\t\tsc.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An error occurred.\");\n\t\t e.printStackTrace();\n\t\t}\n\t\treturn fileData;\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tpublic static int fillHM(String fileName) throws Exception{\r\n\t\t//System.out.println(\"fileName:\"+fileName);\r\n\t\tcat.info(\"fileName:\"+fileName);\r\n\t\tif(hm == null){\r\n\t\t\thm = new HashMap();\r\n\t\t}\r\n//\t\tString fileURL = URL + fileName;\r\n\t\tString fileURL = fileName;\r\n\t\tFileInputStream in = new FileInputStream(fileURL);\r\n\t\tint len = in.available();\r\n\t\t////System.out.println(len);\r\n\t\tbyte[] bt = new byte[len];\r\n\t\tin.read(bt);\r\n\t\t////System.out.println(len);\r\n\t\t\r\n\t\tint pjz = Integer.parseInt(buffer);\r\n\t\tint zs = len/pjz;\r\n\t\tint xs = len%pjz;\r\n\t\t\r\n\t\tint count = 0;\r\n\t\tif(zs==0&&xs==0){\r\n\t\t\tcount = 0;\r\n\t\t}else if(zs==0&&xs!=0){\r\n\t\t\tcount = 1;\r\n\t\t}else if(zs!=0&&xs==0){\r\n\t\t\tcount = zs;\r\n\t\t}else if(zs!=0&&xs!=0){\r\n\t\t\tcount = zs + 1;\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0;i<count-1;i++){\r\n\t\t\tbyte[] bt_i = new byte[pjz];\r\n\t\t\tSystem.arraycopy(bt,i*pjz,bt_i,0,pjz);\r\n\t\t\thm.put(fileName+\"[\"+String.valueOf(i)+\"]\",bt_i);\r\n\t\t}\r\n\t\tbyte[] bt_end = new byte[len-(count-1)*pjz];\r\n\t\tSystem.arraycopy(bt,(count-1)*pjz,bt_end,0,len-(count-1)*pjz);\r\n\t\thm.put(fileName+\"[\"+(count-1)+\"]\",bt_end);\r\n\t\t\r\n//\t\ti_count = count;\r\n//\t\tSystem.out.println(\"count-----------\"+count);\r\n\t\treturn count;\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tint n = readInt(), m = readInt();\n\t\tint[] freq = new int[m+1];\n\t\tint total = 0;\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint x = readInt();\n\t\t\tfreq[x]++;\n\t\t\tif (freq[x] == 1) {\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\tif (total == m) {\n\t\t\t\tcount++;\n\t\t\t\ttotal = 0;\n\t\t\t\tArrays.fill(freq, 0);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count+1);\n\t}", "private void countCharactersInFile() {\n\t\ttry (BufferedReader reader = Files.newBufferedReader(sourceFile, CHARSET)) {\n\t\t\tfinal char[] buffer = new char[8192];\n\t\t\tint nb = -1;\n\t\t\twhile (reader.ready()) {\n\t\t\t\tnb = reader.read(buffer);\n\t\t\t\tfor (int i = 0; i < nb; i++) {\n\t\t\t\t\tcharacterCount[buffer[i]]++;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (final IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "int getChunkSize();", "public void buildMultigramModel(String fileName, int n) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(fileName));\n\t\tString line = null;\n\t\tStringBuilder sb = null;\n\t\tMap<String, Integer> count = new HashMap<>();\n\t\tint totalCount = 0;\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tsb = new StringBuilder();\n//\t\t\tsb.append(terminal); // no \"$\" at the beginning\n\t\t\tfor (char c : line.toCharArray()) {\n\t\t\t\tif (Character.isLetter(c) || c == ' ' || c == ',' || c == '.' || c == '\\'') {\n\t\t\t\t\tif (Character.isLowerCase(c)) {\n\t\t\t\t\t\tc = (char) (c + 'A' - 'a');\n\t\t\t\t\t}\n\t\t\t\t\tsb.append(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(terminal);\n\t\t\t// sb is established and preprocessed: \"hello, this is a sentence.$\"\n\t\t\t\n\t\t\twhile (sb.length() >= n) { // n == 2 if it is a bigram model\n\t\t\t\tString crt = sb.substring(0, n); // the first n characters\n\t\t\t\tif (count.containsKey(crt)) {\n\t\t\t\t\tcount.put(crt, count.get(crt) + 1);\n\t\t\t\t\ttotalCount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount.put(crt, 1);\n\t\t\t\t}\n\t\t\t\tsb.deleteCharAt(0);\n\t\t\t}\n\t\t}\n\t\tif (n == 2) {\n\t\t\tbi = new HashMap<>(count);\n\t\t\tlm.putAll(bi);\n\t\t\tthis.sizeOfBiword = totalCount;\n\t\t} else if (n == 3) {\n\t\t\ttri = new HashMap<>(count);\n\t\t\tlm.putAll(tri);\n\t\t\tthis.sizeOfTriword = totalCount;\n\t\t}\n//\t\tSystem.out.println(\"File \" + fileName + \"\\'s \" + n + \"-gram model is ready.\");\n\t\treader.close();\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n RandomizedQueue<String> randomizedQueue = new RandomizedQueue();\n FileInputStream inputStream = new FileInputStream(args[0]);\n Scanner scanner = new Scanner(inputStream);\n while (scanner.hasNext()) {\n randomizedQueue.enqueue(scanner.next());\n }\n Iterator it = randomizedQueue.iterator();\n while (it.hasNext()) {\n StdOut.print(it.next() + \" \");\n }\n }", "void mo80454a(File file, long j);", "List<CompressResult> compress(Path input, Path output, int maxSizeInMB) throws IOException;", "private void createIntBuffer(long sizeOfBuffer) {\n\t\t\tFile bufferFile = createMappedBufferFile();\n\t\t\ttry {\n\t\t\t\trandomAccessFile = new RandomAccessFile(bufferFile,\n\t\t\t\t\t\treadWriteMode);\n\t\t\t\toutChan = randomAccessFile.getChannel();\n\t\t\t\tlong size = (sizeOfBuffer > 0) ? sizeOfBuffer\n\t\t\t\t\t\t: MAXIMUM_BYTES_PER_BLOCK;\n\t\t\t\tintBuffer = outChan.map(MapMode.READ_WRITE, 0, size)\n\t\t\t\t\t\t.asIntBuffer();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "public RandomDataFile(String fileName) {\n this.fileName = fileName;\n DataOutputStream dataOutputStream;\n try {\n dataOutputStream = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(fileName)));\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found\");\n return;\n }\n Stream.generate(() -> ((int) (Math.random() * 10) + 1))\n .limit(20)\n .forEach(n -> {\n try {\n dataOutputStream.writeInt(n);\n } catch (IOException e) {\n System.out.println(\"Problem with data to file writing\");\n }\n });\n try {\n dataOutputStream.close();\n } catch (IOException e) {\n System.out.println(\"Problem with closing DataOutputStream\");\n }\n }", "private static int lines(String path) throws FileNotFoundException {\n\t\tFile file = new File(path);\n\t\tScanner in = new Scanner(file);\n\t\tint l = 0;\n\t\twhile(in.hasNext()) {\n\t\t\tin.nextLine();\n\t\t\tl++;\n\t\t}\n\t\treturn l;\n\t}", "private void orderer(double[] sizes, File[] files) {\r\n for (int i = 0; i < sizes.length - 1; i++) {\r\n boolean flag = true;\r\n if(i < sizes.length -1) {\r\n if (sizes[i] > sizes[i + 1]) { // this file size is bigger than the next\r\n\r\n double tempInt = sizes[i]; // switch between them\r\n sizes[i] = sizes[i + 1];\r\n sizes[i + 1] = tempInt;\r\n\r\n File tempFile = files[i];\r\n files[i] = files[i + 1];\r\n files[i + 1] = tempFile;\r\n\r\n flag = false; // there was a switch made, make sure we go over it all again\r\n }\r\n }\r\n else {\r\n if (!flag){ // we're not done ordering, restart\r\n i = -1;\r\n }\r\n }\r\n }\r\n }", "private int getMatrixSize(String inputFileName) {\n\nint countLines = 0;\nList<String> linesLength = new ArrayList<>();\ntry {\nBufferedReader bfReader = new BufferedReader(new FileReader(inputFileName));\nString line = bfReader.readLine();\nwhile (line != null) {\nlinesLength.add(line);\ncountLines++;\nline = bfReader.readLine();\n}\n} catch (Exception e) {\n\n}\n\nfor (int i = 0; i < linesLength.size(); i++) {\nif (countLines != linesLength.get(i).length()) {\nTerminal.printError(\"Matrix must be quadratic\");\n} else {\nreturn countLines;\n}\n}\nreturn countLines;\n\n}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tFile file = new File(\"src/input.txt\");\n\t\tScanner scan = new Scanner(file);\n\t\tint N = scan.nextInt();\n\t\tscan.nextLine(); // clear buffer\n\t\tint[] arr = new int[N];\n\t\tfor (int i=0; i<N; i++) {\n\t\t\tarr[i] = scan.nextInt();\n\t\t}\n\t\tSystem.out.print(\"Before: \");\n\t\tfor (int el : arr) System.out.print(el + \" \");\n\t\tSystem.out.println();\n\t\tcountSwaps(arr);\n\t\tscan.close();\n\t\t\n\n\t}", "public static void main(String[] args) throws IOException {\n\t\tInput in = new Input(\"input.txt\", 2 * 1024);\r\n\t\tPrintWriter out = new PrintWriter(\"output.txt\");\r\n\r\n\t\tl = in.nextInt();\r\n\t\tint m = in.nextInt();\r\n\t\tint n = in.nextInt();\r\n\t\t\r\n\t\tpattern = new int[m + 1][l + 1];\r\n\t\t\r\n\t\tfor (int i = 0; i < m; ++i) { \r\n\t\t\tpattern[i][l] = in.nextInt();\r\n\t\t\tfor (int j = 0; j < l; ++j) pattern[i][j] = in.nextInt();\r\n\t\t}\r\n\t\t\r\n\t\trand = new Random();\r\n\t\tsort(0, m - 1);\r\n\t\t\r\n\t\tint ok = 0, bad = 0, pos;\r\n\t\tbuf = new int[l];\r\n\t\t\r\n\t\tfor (int i = 0; i < l; ++i) pattern[m][i] = Integer.MAX_VALUE;\r\n\t\t\r\n\t\tfor (int i = 0; i < n; ++i) {\r\n\t\t\tfor (int j = 0; j < l; ++j) buf[j] = in.nextInt();\r\n\t\t\tpos = offer(0, m);\r\n\t\t\tif (pos >= 0) {\r\n\t\t\t\tout.println(pattern[pos][l]);\r\n\t\t\t\t++ok;\r\n\t\t\t} else {\r\n\t\t\t\tout.println(\"-\");\r\n\t\t\t\t++bad;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tout.println(\"OK=\" + ok + \" BAD=\" + bad);\r\n\t\tout.close();\r\n\t}", "public static List<Integer> readBinaryFile(String filename) throws IOException\n {\n List<Integer> binary = new ArrayList<>();\n\n FileInputStream inputStream = new FileInputStream(filename);\n BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream);\n\n byte[] byteInput = bufferedInputStream.readAllBytes();\n\n String stringInput = new String(byteInput);\n\n for(char c : stringInput.toCharArray())\n {\n binary.add((int) (c - '0'));\n }\n\n return binary;\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tif (args.length != 2) {\n\t\t\tSystem.out.println(\"Usage: java PE1910_SplitFiles souceFile numberOfPieces\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t// Get number of pieces\n\t\tint numberOfPiecesArg = Integer.parseInt(args[1]);\n\n\t\t// Get Source file and create input stream for it\n\t\tBufferedInputStream inputArg = new BufferedInputStream(new FileInputStream(\n\t\t\t\tnew File(\"C:/Java/examples/\" + args[0])));\n\n\t\t// Get fileName and extension of the source file\n\t\tFile sourceFileArg = new File(\"C:/Java/examples/\" + args[0]);\n\t\tString fileNameArg = sourceFileArg.getName().substring(0, sourceFileArg.getName().length() - 4);\n\n\t\t// Get fileSize and size of the split file\n\t\tlong fileSizeArg = inputArg.available();\n\t\tint partArg = (int)\n\t\t\t\tMath.ceil(1.0 * fileSizeArg / numberOfPiecesArg);\n\t\tSystem.out.println(partArg);\n\t\t// Copy the content of the sourceFile into split files\n\t\tfor (int i = 0; i < numberOfPiecesArg; i++) {\n\t\t\tBufferedOutputStream outputArg = new BufferedOutputStream(\n\t\t\t\t\tnew FileOutputStream(new File(\"C:/Java/examples/\" + fileNameArg + \".part\" + i)));\n\t\t\tint value;\n\t\t\tint numberOfBytesArg = 0;\n\t\t\twhile (numberOfBytesArg++ < partArg && (value = inputArg.read()) != -1) {\n\t\t\t\toutputArg.write(value);\n\t\t\t}\n\t\t\toutputArg.close();\n\t\t}\n\t\t\n\t\tinputArg.close();\n\t\tSystem.out.println(\"[\" + sourceFileArg.length() + \"]\");\n\n\t}", "private static int[] generateSortedArray(int size) {\n\n int[] sortedArray = new int[size];\n\n // fill the array with the numbers beginning by 1\n for (int i = 0; i < size; i++) {\n\n sortedArray[i] = i + 1;\n }\n\n return sortedArray;\n }", "public static void writeUnique(String filePath, File outFile ) throws Exception\n\t{\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(outFile));\t\t\n\t\tList<FastaSequence> fastaList = FastaSequence.readFastaFile(filePath);\t\n\t\tHashMap<String, Integer> hash_map = new HashMap<String, Integer>();\n\t\t\n\t\t//iterate through lsit object and append to has map value\n\t\tfor( FastaSequence fs : fastaList) \n\t\t{\n\t\t\tif(hash_map.get(fs.getSequence())!= null) {\n\t\t\t\thash_map.put(fs.getSequence(),hash_map.get(fs.getSequence())+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\thash_map.put(fs.getSequence(),1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<fastaOrder> orderArray = new ArrayList<fastaOrder>();\n\t\t//populate objects and file em into an array\n\t\tfor(Map.Entry<String,Integer> entry : hash_map.entrySet()) \n\t\t{\n\t\t\t//orderArray[counter] = new fastaOrder(entry.getValue(), entry.getKey() );\n\t\t\t//fastaOrder objHolder = new fastaOrder((Integer)entry.getValue(), entry.getKey().toString());\n\t\t\tint count = entry.getValue();\n\t\t\tString seq = entry.getKey();\n\t\t\tfastaOrder objHolder = new fastaOrder(count,seq);\n\t\t\torderArray.add(objHolder);\n\t\t}\n\t\t\t//return output as file\n\t\t\tCollections.sort(orderArray);\n\t\t\tfor(fastaOrder i : orderArray) {\n\t\t\t\tSystem.out.println(i.getCount() + \" \" + i.getSeq());\n\t\t\t\twriter.write(i.getCount() + \" \" + i.getSeq()+\"\\n\");\n\t\t\t}\n\t\t\n\t\twriter.close();\n\t}" ]
[ "0.59771174", "0.5641804", "0.54976636", "0.5484344", "0.5388084", "0.5382379", "0.5364096", "0.5286713", "0.528039", "0.523069", "0.5229174", "0.5226371", "0.52108043", "0.519802", "0.5032296", "0.5032272", "0.501464", "0.5008921", "0.5006093", "0.4991001", "0.49893898", "0.49817035", "0.49556026", "0.4953294", "0.49525997", "0.49410018", "0.49309334", "0.49242082", "0.4916996", "0.49080333", "0.48892596", "0.48877108", "0.4882647", "0.4877674", "0.48747912", "0.4870592", "0.48664406", "0.48649096", "0.48451066", "0.48260596", "0.48258236", "0.4810364", "0.48072192", "0.48002988", "0.47983888", "0.4780984", "0.47691995", "0.47667238", "0.47623703", "0.4761841", "0.47426605", "0.47426233", "0.47377595", "0.473587", "0.47271213", "0.4707367", "0.47005105", "0.4699929", "0.46978185", "0.4695739", "0.46906662", "0.4684811", "0.46824887", "0.4677009", "0.4666521", "0.46629515", "0.46513042", "0.46483272", "0.4643474", "0.46390277", "0.46358293", "0.46257243", "0.46217725", "0.46214408", "0.461077", "0.46048892", "0.45838386", "0.4576923", "0.45768923", "0.45751888", "0.45540315", "0.4553844", "0.45445383", "0.45441693", "0.45350033", "0.45339382", "0.45331386", "0.453054", "0.45236704", "0.4523455", "0.45159152", "0.45059007", "0.45058823", "0.4501151", "0.44978246", "0.44918066", "0.44888222", "0.44884375", "0.44851872", "0.44803664", "0.44724774" ]
0.0
-1
validate and shared preferences to make then an intent to the main activity ver si modifica si se aplica el public en la declaracion
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); initViews(); buttonRegister.setOnClickListener(this); buttonlog1.setOnClickListener(this); firebaseAuth = FirebaseAuth.getInstance(); progressDialog = new ProgressDialog(this); users = FirebaseDatabase.getInstance().getReference("users"); //usuario = firebaseAuth.getCurrentUser().getEmail(); String email = editTextEmail.getText().toString(); String password= editTextPassword.getText().toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onStart() {\n if (sharedPref.contains(getString(R.string.acno))) {\n ODAcCreation.this.startActivity(new Intent(ODAcCreation.this, UPICreation.class));\n ODAcCreation.this.finish();\n }\n\n super.onStart();\n }", "private void checkFirstLaunch(){\n SharedPreferencesEditor editor = new SharedPreferencesEditor(this);\n boolean test = editor.GetBoolean(\"firstLaunch\");\n if(test){\n loadData();\n return;\n }\n startActivity(new Intent(MainActivity.this, FirstLaunch.class));\n editor.WriteBoolean(\"firstLaunch\", true);\n }", "private void ComprobarCredenciales(SharedPreferences preferencias){\n\n if(preferencias.getBoolean(\"autenticado\", false)){\n //Toast.makeText(this, \"Autenticado\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(this, ContentActivity.class));\n }\n\n }", "@Override\r\n\t\tpublic void onClick(View arg0) {\n\t\t\tString ac=account.getText().toString();\r\n\t\t\tString ppString=pwd.getText().toString();\r\n\t\t\tif (ac.equals(\"admin\") && ppString.equals(\"123456\")) {\r\n\t\t\t\teditor=preferences.edit();\r\n\t\t\t\tif (reBox.isChecked()) {\r\n\t\t\t\t\teditor.putBoolean(\"remeber\", true);\r\n\t\t\t\t\teditor.putString(\"account\", ac);\r\n\t\t\t\t\teditor.putString(\"pwd\", ppString);\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\teditor.clear();\r\n\t\t\t\t}\r\n\t\t\t\teditor.commit();\r\n\t\t\t\tIntent intent=new Intent(LoginActivity.this,MainActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\tfinish();\r\n\t\t\t}else {\r\n\t\t\t\tToast.makeText(LoginActivity.this, \"²»ÕýÈ·\", 1).show();\r\n\t\t\t}\r\n\t\t}", "public void updatePreferences() {\n\n Toast.makeText(this, \"enter your data\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(this, SipSettingsActivity.class));\n\n }", "@Override\n public void onClick(View v) {\n\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"player1name\", player1Name.getText().toString());\n editor.putString(\"player2name\", player2Name.getText().toString());\n editor.commit();\n\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n i.putExtra(\"isPlayerDetsSet\", true);\n getApplicationContext().startActivity(i);\n\n }", "private void masuk(){\n Preferences.setLoggedInUser(getBaseContext(),Preferences.getRegisteredUser(getBaseContext()));\n Preferences.setLoggedInStatus(getBaseContext(), true);\n startActivity(new Intent(getBaseContext(),MainActivity.class));\n finish();\n }", "private void preferences() {\n\tstartActivity (new Intent(getApplicationContext(), PushPreferencesActivity.class));\n}", "private void checkAppKeySetup() {\n if (APP_KEY.startsWith(\"CHANGE\") ||\n APP_SECRET.startsWith(\"CHANGE\")) {\n showToast(\"You must apply for an app key and secret from developers.dropbox.com, and add them to the DBRoulette ap before trying it.\");\n finish();\n return;\n }\n\n // Check if the app has set up its manifest properly.\n Intent testIntent = new Intent(Intent.ACTION_VIEW);\n String scheme = \"db-\" + APP_KEY;\n String uri = scheme + \"://\" + AuthActivity.AUTH_VERSION + \"/test\";\n testIntent.setData(Uri.parse(uri));\n PackageManager pm = getPackageManager();\n if (0 == pm.queryIntentActivities(testIntent, 0).size()) {\n showToast(\"URL scheme in your app's \" +\n \"manifest is not set up correctly. You should have a \" +\n \"com.dropbox.client2.android.AuthActivity with the \" +\n \"scheme: \" + scheme);\n finish();\n }\n }", "@Override\n\tprotected void onResume() {\n\t\t\tif(SPHelper.getDetailMsg(SettingActivity.this, \"ischecked\", \"\").equals(\"\")){\n\t\t\t\tIntent intent = new Intent(SettingActivity.this, AppActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t\tsuper.onResume();\n\t}", "private void tutorialCheck() {\n SharedPreferences sp = getApplicationContext().getSharedPreferences(getApplicationContext().getString(R.string.app_name), MODE_PRIVATE);\n if (sp.contains(\"Tutorial_Complete\")) {\n if (sp.getBoolean(\"Tutorial_Complete\", false)) {\n return;\n }\n }\n Intent intent = new Intent(this, TutorialPanel.class);\n startActivity(intent);\n }", "@Override\n public boolean onPreferenceClick(Preference preference) {\n final Intent intent = new Intent(Settings.ACTION_APN_SETTINGS);\n // This will setup the Home and Search affordance\n intent.putExtra(\":settings:show_fragment_as_subsetting\", true);\n mPrefActivity.startActivity(intent);\n return true;\n }", "@Override\n public void onClick(View view) {\n\n sharedPrefManager.addNotificationCount(1);\n Log.d(TAG, \"shared pref count: \" + sharedPrefManager.getNotificationCount());\n\n\n if (userMemberType == 1 || userMemberType == 2) {\n showMyWillQuestionDialog();\n\n } else if (userMemberType == 3) {\n goToMyWill();\n\n } else {\n showAccessDeniedDialog();\n }\n /*testNoWill();*/\n }", "protected void makePref(){\n //Creates a shared pref called MyPref and 0-> MODE_PRIVATE\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //so the pref can be edit\n edit = sharedPref.edit();\n}", "@Override\n public void run() {\n\n String userid = SharedPreferenceStore.getValue(getApplicationContext(), \"Userid\", \"\");\n String userCompId = SharedPreferenceStore.getValue(getApplicationContext(), \"client_comp_id\", \"\");\n String loginType = SharedPreferenceStore.getValue(getApplicationContext(), \"Type\",\"\");\n SharedPreferenceStore.getValue(getApplicationContext(), \"LoadingPoint\", \"\");\n String country_code = SharedPreferenceStore.getValue(getApplicationContext(), \"country_code\",\"AE\"); // May Put Here default\n String currency_code = SharedPreferenceStore.getValue(getApplicationContext(),\"currency_code\",\"AED\"); // May put here Default\n appGlobal.userType = loginType ;\n appGlobal.userId = userid;\n appGlobal.userCompId = userCompId;\n appGlobal.currency_code = currency_code ;\n appGlobal.country_code = country_code ;\n\n /*******************/\n if(userid.isEmpty()) {\n Intent intent = new Intent(SplashActivity.this, HomeContainer.class); // LoginContainer.class\n startActivity(intent);\n finish();\n }\n else\n {\n Intent intent = new Intent(getApplicationContext(), HomeContainer.class);\n startActivity(intent);\n finish();\n }\n\n }", "public boolean onPreferenceClick(Preference preference) {\n String url = \"https://github.com/ilayaraja97/ManageAccounts\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n startActivity(i);\n return true;\n }", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n if (key.equals(KEY_PREF_RUN_ON_START)) {\n CheckBoxPreference runOnStartPref = (CheckBoxPreference) findPreference(key);\n if(runOnStartPref.isChecked()) {\n requestPermission(getActivity(), PermissionsMapping.REBOOT_NOTIF);\n }\n } else if(key.equals(KEY_PREF_KEEP_SCREEN_ON)){\n CheckBoxPreference pref = (CheckBoxPreference) findPreference(key);\n if(pref.isChecked()) {\n getActivity().findViewById(R.id.main_layout).setKeepScreenOn(true);\n } else {\n getActivity().getParent().findViewById(R.id.main_layout).setKeepScreenOn(false);\n }\n }\n }", "@Override\n public void onClick(View v) {\n SaveSharedPreference.setLoggedIn(getApplicationContext(), false);\n\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n // Load the preferences from an XML resource\n addPreferencesFromResource(R.xml.preferences);\n\n wifi = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_WIFI);\n wifiData = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_WIFI_DATA);\n data = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_DATA);\n\n wifi.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifiData.setChecked(false);\n data.setChecked(false);\n wifi.setChecked(true);\n }\n return true;\n }\n });\n\n wifiData.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifi.setChecked(false);\n data.setChecked(false);\n wifiData.setChecked(true);\n }\n return true;\n }\n });\n\n data.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifiData.setChecked(false);\n wifi.setChecked(false);\n data.setChecked(true);\n }\n return true;\n }\n });\n\n Preference button = findPreference(KEY_PREF_UPDATE);\n button.setSummary(getString(R.string.current_version) + \" \" + ApplicationController.VERSION);\n\n button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n UpdateController.getInstance(getActivity()).checkVersion();\n return true;\n }\n });\n }", "@Override\n public void run() {\n Intent i;\n //Tutorial at first launch\n boolean tutorial = !prefs_Read.contains(Constants.PREFS_APP_LAST_VERSION);\n try{\n\n if (getString(R.string.app_version_name).compareTo(prefs_Read.getString(Constants.PREFS_APP_LAST_VERSION, \"\")) > 0) {\n //Do update things\n\n String[] vero2 = prefs_Read.getString(Constants.PREFS_APP_LAST_VERSION, \"\").split(\"\\\\.\");\n String[] vern2 = getString(R.string.app_version_name).split(\"\\\\.\");\n\n tutorial = vero2.length == 0 || !(vero2[0].equals(vern2[0]) && vero2[1].equals(vern2[1]));//check first two numbers of version\n }\n }catch(ClassCastException ignore){}\n if (tutorial) {\n i = new Intent(SplashActivity.this, TutorialActivity.class);\n } else {\n i = new Intent(SplashActivity.this, MainActivity.class);\n }\n\n startActivity(i);\n overridePendingTransition(R.anim.fade_in, R.anim.fade_out);\n finish();\n\n }", "@Override\r\nprotected void onCreate(Bundle savedInstanceState) {\n\tsuper.onCreate(savedInstanceState);\r\n\tsetContentView(R.layout.login);\r\n\tbutton=(Button)this.findViewById(R.id.login);\r\n\taccount=(EditText)this.findViewById(R.id.account);\r\n\tpwd=(EditText)this.findViewById(R.id.pwd);\r\n\treBox=(CheckBox)this.findViewById(R.id.checkBox1);\r\n\tpreferences=PreferenceManager.getDefaultSharedPreferences(this);\r\n boolean re=preferences.getBoolean(\"remeber\", false);\r\n if (re) {\r\n\t\taccount.setText(preferences.getString(\"account\", \"\"));\r\n\t\tpwd.setText(preferences.getString(\"pwd\", \"\"));\r\n\t\treBox.setChecked(true);\r\n\t}\r\n\t\r\n\tbutton.setOnClickListener(new OnClickListener() {\r\n\t\t\r\n\t\t@Override\r\n\t\tpublic void onClick(View arg0) {\r\n\t\t\t// TODO Auto-generated method stub\r\n\t\t\tString ac=account.getText().toString();\r\n\t\t\tString ppString=pwd.getText().toString();\r\n\t\t\tif (ac.equals(\"admin\") && ppString.equals(\"123456\")) {\r\n\t\t\t\teditor=preferences.edit();\r\n\t\t\t\tif (reBox.isChecked()) {\r\n\t\t\t\t\teditor.putBoolean(\"remeber\", true);\r\n\t\t\t\t\teditor.putString(\"account\", ac);\r\n\t\t\t\t\teditor.putString(\"pwd\", ppString);\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\teditor.clear();\r\n\t\t\t\t}\r\n\t\t\t\teditor.commit();\r\n\t\t\t\tIntent intent=new Intent(LoginActivity.this,MainActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\tfinish();\r\n\t\t\t}else {\r\n\t\t\t\tToast.makeText(LoginActivity.this, \"²»ÕýÈ·\", 1).show();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);\n final SharedPreferences.Editor editor = prefs.edit();\n\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_change_setup) {\n editor.putString(\"INIT_SETUP\", \"1\");\n editor.apply();\n\n Intent intent = new Intent(MainActivity.this, SetupActivity.class);\n startActivity(intent);\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public final void mo32362c() {\n Editor edit = PreferenceManager.getDefaultSharedPreferences(C13499h.m39721g()).edit();\n edit.putString(\"com.facebook.appevents.SourceApplicationInfo.callingApplicationPackage\", this.f34929a);\n edit.putBoolean(\"com.facebook.appevents.SourceApplicationInfo.openedByApplink\", this.f34930b);\n edit.apply();\n }", "public void onClicked(View check, View emailTxt, View passwordTxt) {\n\n try {\n email = ((EditText) emailTxt).getText().toString();\n password = ((EditText) passwordTxt).getText().toString();\n CheckBox checkbox = ((CheckBox) check);\n\n\n if (!email.isEmpty() && !password.isEmpty()) {\n\n SharedPreference_Login login=new SharedPreference_Login(activity);\n\n //check the auth data saved\n if (new SharedPreference_Auth(activity).IsExpired()\n && (email.equals(login.emailOriginal())&&password.equals(login.passwordOriginal())))\n {\n\n Intent intent = new Intent(activity, ActivityMain.class);\n activity.startActivity(intent);\n activity.finish();\n\n\n } else {\n JsonReceiver jsonReceiver = new JsonReceiver(activity, \"https://puresoftware.org/user/en/oauth2/access/token.json\");\n Map<String, String> parser = new HashMap<String, String>();\n parser.put(\"grant_type\", \"password\");\n parser.put(\"username\", email);\n parser.put(\"password\", password);\n parser.put(\"scope\", \"climax\");\n jsonReceiver.post(parser,processor);\n }\n } else {\n checkbox.setChecked(false);\n ((EditText) emailTxt).getText().clear();\n ((EditText) passwordTxt).getText().clear();\n Toast.makeText(activity, \"please fill text boxes\", Toast.LENGTH_LONG).show();\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\r\n public void run() {\n SharedPreferences pref = getSharedPreferences(\"ActivityPREF\", Context.MODE_PRIVATE);\r\n\r\n //if user has logged in\r\n if (pref.getBoolean(\"activity_executed\", false)) {\r\n\r\n String bus_or_pas = pref.getString(\"bus_or_passenger\",\"bus\");\r\n\r\n switch (bus_or_pas){\r\n //if user has logged as a bus\r\n case(\"bus\"):{\r\n Intent intent = new Intent(SplashActivity.this, BusMapsActivity.class);\r\n startActivity(intent);\r\n finish();\r\n\r\n break;\r\n }\r\n\r\n //if user has logged as passenger\r\n case (\"passenger\"):{\r\n Intent intent = new Intent(SplashActivity.this, NavDrawerActivity.class);\r\n startActivity(intent);\r\n finish();\r\n\r\n break;\r\n }\r\n }\r\n\r\n //if user hasn't logged in\r\n } else {\r\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\r\n startActivity(intent);\r\n finish();\r\n }\r\n\r\n\r\n }", "@Override\r\n public void onCreate(Bundle savedInstanceState) { \t\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.settings); \r\n String oldtitle = (String) getTitle();\r\n setTitle(oldtitle + \" > Settings\");\r\n \r\n //Load the settings\r\n SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);\r\n String liveid = settings.getString(\"liveusername\", \"\");\r\n String password = settings.getString(\"livepassword\", \"\");\r\n String saved_livedownloaddp = settings.getString(\"livedownloaddp\", \"\");\r\n String saved_liveignorestockdp = settings.getString(\"liveignorestockdp\", \"\");\r\n\r\n \teLiveID = ((TextView)findViewById(R.id.editLiveID));\r\n \teLiveID.setText(liveid); \t\r\n \tePassword = ((TextView)findViewById(R.id.editPassword));\r\n \tePassword.setText(password); \r\n \t\r\n \tliveremember = ((CheckBox)findViewById(R.id.checkRememberlive));\r\n \th_livedownloaddp = ((CheckBox)findViewById(R.id.checkDownloadDP));\r\n \th_liveignorestockdp = ((CheckBox)findViewById(R.id.checkIgnoreStockDP));\r\n \t\r\n \tif(liveid.length() > 0 || password.length() > 0)\r\n \t\tliveremember.setChecked(true);\r\n \t\r\n \tif(saved_livedownloaddp.equals(\"true\")) {\r\n \t\th_livedownloaddp.setChecked(true);\r\n \t}\r\n\r\n \tif(saved_liveignorestockdp.equals(\"true\")) {\r\n \t\th_liveignorestockdp.setChecked(true);\r\n \t}\r\n \t\r\n \tButton btnSave = (Button)findViewById(R.id.btnSave);\r\n btnSave.setOnClickListener(btnSaveOnClick);\r\n \r\n Button btnCancel = (Button)findViewById(R.id.btnDiscard);\r\n btnCancel.setOnClickListener(btnCancelOnClick);\r\n }", "@Override\n public void openSharedPreferences(Activity activity) {\n SharedPreferences sharedPreferences = activity.getSharedPreferences(\"auth\", MODE_PRIVATE);\n //default value is \"\"\n String savedPendingEmail = sharedPreferences.getString(KEY_PENDING_EMAIL,\"\");\n Log.d(TAG, \"savedPendingEmail : \" + savedPendingEmail);\n authPresenter.openSavedPendingEmail(savedPendingEmail);\n }", "private void chkPermission() {\n permissionStatus = getSharedPreferences(\"permissionStatus\", MODE_PRIVATE);\n\n if (ActivityCompat.checkSelfPermission(LoginActivity.this, permissionsRequired[0]) != PackageManager.PERMISSION_GRANTED\n || ActivityCompat.checkSelfPermission(LoginActivity.this, permissionsRequired[1]) != PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(LoginActivity.this, permissionsRequired[0])\n || ActivityCompat.shouldShowRequestPermissionRationale(LoginActivity.this, permissionsRequired[1])) {\n //Show Information about why you need the permission\n ActivityCompat.requestPermissions(LoginActivity.this, permissionsRequired, PERMISSION_CALLBACK_CONSTANT);\n\n } else if (permissionStatus.getBoolean(permissionsRequired[0], false)) {\n //Previously Permission Request was cancelled with 'Dont Ask Again',\n // Redirect to Settings after showing Information about why you need the permission\n sentToSettings = true;\n Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\", getPackageName(), null);\n intent.setData(uri);\n startActivityForResult(intent, REQUEST_PERMISSION_SETTING);\n Toast.makeText(getBaseContext(), \"Go to Permissions to Grant Camera, Phone and Storage\", Toast.LENGTH_LONG).show();\n\n } else {\n //just request the permission\n ActivityCompat.requestPermissions(LoginActivity.this, permissionsRequired, PERMISSION_CALLBACK_CONSTANT);\n }\n\n //txtPermissions.setText(\"Permissions Required\");\n\n SharedPreferences.Editor editor = permissionStatus.edit();\n editor.putBoolean(permissionsRequired[0], true);\n editor.commit();\n } else {\n //You already have the permission, just go ahead.\n //proceedAfterPermission();\n }\n\n }", "public void Initialse() {\n\t\tappSettings = ctx.getSharedPreferences(APP_SETTINGS, 0);\n\t\tSharedPreferences.Editor prefEditor = appSettings.edit();\n\t\tprefEditor.putBoolean(BLOCK, true); // master switch\n\t\tprefEditor.putBoolean(NOTIFY, true); // controls whether a notification appears in status bar ans notifications lit\n\t\tprefEditor.putBoolean(REMOVE_CALLS, false); // determines whether calls are removed form the call log\n\t\t// add INIT to prevent this code from being called again\n\t\tprefEditor.putBoolean(INIT, true); // flag to allow subsequent loads to recognise that defaults are set\n\t\tprefEditor.putString(TEST, ctx.getString(R.string.test_number));\n\t\tprefEditor.putBoolean(RULES_EXIST, false); // added to control whether app kicks off commshandler\n\t\t\n\t\tprefEditor.commit();\n \n\t}", "SharedPreferences mo117960a();", "public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menuAbout:\n Log.i(\"Menu\", \"About\");\n Intent showAbout = new Intent(\"se.hv.mindag.ABOUT\");\n startActivity(showAbout);\n break;\n\n case R.id.menuPrefs:\n Intent showSettings = new Intent(\"se.hv.mindag.SETTINGS\");\n startActivity(showSettings);\n break;\n\n case R.id.menuTwitter:\n SharedPreferences settingsTwitter = getSharedPreferences(PREFS_NAME, 0);\n String savedTwitter = settingsTwitter.getString(\"TWITTER\", \"http://search.twitter.com/search.json?q=hogskolan%20vast\");\n Intent showTwitter = new Intent(\"se.hv.mindag.TWITTER\");\n showTwitter.putExtra(\"STRING\", savedTwitter);\n startActivity(showTwitter);\n break;\n case R.id.menuMail:\n SharedPreferences settingsMail = getSharedPreferences(PREFS_NAME, 0);\n String savedMail = settingsMail.getString(\"MAIL\", \"http://login.live.com\");\n Intent showMail = new Intent(getApplicationContext(), WebReader.class);\n showMail.putExtra(\"KEY_LINK\", savedMail);\n startActivity(showMail);\n break;\n case R.id.menuTTela:\n Intent showTTela = new Intent(getApplicationContext(), WebReader.class);\n showTTela.putExtra(\"KEY_LINK\", \"http://m.ttela.se\");\n startActivity(showTTela);\n break;\n case R.id.menuSchema:\n Intent showSchema = new Intent(getApplicationContext(), Schema.class);\n startActivity(showSchema);\n break;\n }\n return false;\n }", "public void authUser(){\n\n String emptyString = \"\";\n if(!(String.valueOf(userName.getText()).equals(emptyString) ||\n String.valueOf(userNumber.getText()).equals(emptyString))){\n\n SharedPreferences preferences = getApplicationContext().getSharedPreferences(\"user_info\", 0);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putBoolean(getResources().getString(R.string.isLoggedIn), true);\n editor.putString(getResources().getString(R.string.userName), String.valueOf(userName.getText()));\n editor.putString(getResources().getString(R.string.userNumber), String.valueOf(userNumber.getText()));\n editor.apply();\n\n Intent intent = new Intent(getApplicationContext(), HomeScreen.class);\n\n startActivity(intent);\n }\n else{\n Toast.makeText(getApplicationContext(),\n \"Please enter compelete credentials..\", Toast.LENGTH_SHORT)\n .show();\n }\n\n }", "private void finishAutoSetup() {\n\t\tLog.i(TAG, \"Saving preference data.\");\n\n\t\tString xmppID = mEdtAddress.getText().toString().trim();\n\t\tString password = mEdtPassword.getText().toString().trim();\n\n\t\tmPreferences = getSharedPreferences(\n\t\t\t\t\"de.tudresden.inf.rn.mobilis.mxa_preferences\",\n\t\t\t\tContext.MODE_PRIVATE);\n\n\t\tSharedPreferences.Editor editor = mPreferences.edit();\n\n\t\teditor.putString(\"pref_host\", mServer.host);\n\t\teditor.putString(\"pref_service\", mServer.serviceName);\n\t\teditor.putString(\"pref_resource\", \"MXA\");\n\t\teditor.putString(\"pref_port\", mServer.port);\n\n\t\teditor.putString(\"pref_xmpp_user\", xmppID);\n\t\teditor.putString(\"pref_xmpp_password\", password);\n\n\t\teditor.commit();\n\n\t\t// show main activity\n\t\tIntent i = new Intent(this, SetupComplete.class);\n\t\tstartActivity(i);\n\t}", "@Override\n public void onClick(View v) {\n SharedPreferences sharedPreferences = getSharedPreferences(Key.KEY_GETSHAREDFEREND, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n\n editor.putBoolean(Key.KEY_LOGIN, false);\n editor.apply();\n // finish();\n\n\n Intent intent = new Intent(AccountActivity.this, SplashActivity.class);\n startActivity(intent);\n\n finish();\n\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(PACKAGE, Utils.getAppPackageName(getApplicationContext()), null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivityForResult(intent, PERMISSIONS_REQUEST_CODE);\n }", "@Override\r\n public void onClick(View v) {\n boolean checker = DB.saveSetting(set_wallpaper, write_ext_storage, call_phone, send_sms, read_contacts, access_file_loc);\r\n\r\n if (checker == true)\r\n Toast.makeText(MyProfile.this, \"Save Settings\", Toast.LENGTH_SHORT).show();\r\n else\r\n Toast.makeText(MyProfile.this, \"Something Wrong\", Toast.LENGTH_SHORT).show();\r\n\r\n onBackPressed();\r\n }", "private void haveFcmId(){\n Request.getAppData();\n App.removeNonChatUsers();\n boolean termsAccepted = AppPreferences.getBoolean(Keys.termsAccepted,false);\n String userId = AppPreferences.getString(Keys.userId,\"\");\n int userState = AppPreferences.getInt(Keys.userState,0);\n if(!termsAccepted){\n startActivity(new Intent(this, ActivityTerms.class));\n } else if(userId.isEmpty() || userState == 0) {\n startActivity(new Intent(this, ActivitySignInUp.class));\n } else if(userState == 1){\n startActivity(new Intent(this, ActivitySecurityQuestions.class));\n } else if(userState == 2){\n startActivity(new Intent(this, ActivitySetProfile.class));\n } else {\n startActivity(new Intent(this, ActivityContacts.class));\n }\n finish();\n }", "@SuppressLint(\"CommitPrefEdits\")\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if(id==R.id.action_settings) {\n SignUpActivity.editor = getSharedPreferences(MY_PREFS_NAME, MODE_PRIVATE).edit();\n SignUpActivity.editor.putBoolean(\"is_logedin\", false);\n SignUpActivity.editor.apply();\n Intent myIntent = new Intent(HomeActivity.this, SignUpActivity.class);\n HomeActivity.this.startActivity(myIntent);\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "private static void storeActivation(Context context) {\n\t\t//securely store in shared preference\n\t\tSharedPreferences secureSettings = new SecurePreferences(context);\n\t\tString account = UserEmailFetcher.getEmail(context);\n\n\t\t//update preference\n\t\tSharedPreferences.Editor secureEdit = secureSettings.edit();\n\t\tsecureEdit.putBoolean(account + \"_paid\", true);\n\t\tsecureEdit.apply();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tthis.prefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\t/*\n\t\t * Each app has its own shared preferences available to all components\n\t\t * of the app and this loads the default preferences that are saved on\n\t\t * the phone\n\t\t */\n\t\tthis.prefs.registerOnSharedPreferenceChangeListener(this);\n\t\t/*\n\t\t * Each user can change preferences. So this listener is a mechanism to\n\t\t * notify this activity that the old values are stale\n\t\t */\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.form);\n\n\t\tif (android.os.Build.VERSION.SDK_INT > 9) {\n\t\t\t StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n\t\t\t StrictMode.setThreadPolicy(policy);\n\t\t\t}\n\t\tsplash=(Button)findViewById(R.id.button2);\n\t\tsplash.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent=new Intent(InputForm.this,SplashScreen.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\tmyPrefs = this.getSharedPreferences(\"myPrefs\",MODE_WORLD_READABLE);\n prefsEditor = myPrefs.edit();\n //prefsEditor.putString(\"info\", \"false\");\n //prefsEditor.commit();\n String prefName = myPrefs.getString(\"info\", \"false\");\n\n if(prefName==\"true\")\n {\n \tIntent intent=new Intent(this,SplashScreen.class);\n \t\tstartActivity(intent);\n \t\n }\n else\n {\n \n\t\tname=(EditText)findViewById(R.id.editText1);\n\t\tage=(EditText)findViewById(R.id.editText2);\n\t\temail=(EditText)findViewById(R.id.editText4);\n\t\tcontact=(EditText)findViewById(R.id.editText3);\n\t\tcity=(EditText)findViewById(R.id.editText5);\n\t\tcourse=(EditText)findViewById(R.id.editText6);\n\t\tcountry=(EditText)findViewById(R.id.editText7);\n\t\t\n\t\tsub=(Button)findViewById(R.id.button1);\n\t\t\n\t\tsub.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tif((name.getText().toString().trim().equals(\"\")) \n\t\t\t\t\t\t|| (age.getText().toString().trim().equals(\"\")) \n\t\t\t\t\t\t|| (contact.getText().toString().trim().equals(\"\")) ||\n\t\t\t\t\t\t(email.getText().toString().trim().equals(\"\")) || (city.getText().toString().trim().equals(\"\")) ||\n\t\t\t\t\t\t(course.getText().toString().trim().equals(\"\")) || (country.getText().toString().trim().equals(\"\")))\n\t\t\t\t{\n\t\t\t\t Toast.makeText(getApplicationContext(), \"Please fill the remaining fields\", Toast.LENGTH_SHORT).show();\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\tSname = name.getText().toString();\n\t\t\t\t\tSage = age.getText().toString();\n\t\t\t\t\tScontact = contact.getText().toString();\n\t\t\t\t\tSemail = email.getText().toString();\n\t\t\t\t\tScity = city.getText().toString();\n\t\t\t\t\tScourse = course.getText().toString();\n\t\t\t\t\tScountry = country.getText().toString();\n\t\t\t\t\tSystem.out.println(Sname);\n\t\t\t\t\tSystem.out.println(Sage);\n\t\t\t\t\tSystem.out.println(Scontact);\n\t\t\t\t\tSystem.out.println(Semail);\n\t\t\t\t\tSystem.out.println(Scity);\n\t\t\t\t\tSystem.out.println(Scountry);\n\t\t\t\t\tSystem.out.println(Scourse);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tHttpClient httpclient = new DefaultHttpClient();\n\t\t\t\t\tString data=\"\"+\"http://messi14.byethost7.com/info.php?name=\"+Sname+\"&age=\"+Sage+\"&contact=\"+Scontact+\"&email=\"+Semail+\"&city=\"+Scity+\"&course=\"+Scourse+\"&country=\"+Scountry+\"\";\n\t\t\t\t\tString data1=\"http://messi14.byethost7.com/info.php?name=pawan&age=34&contact=9821350649&[email protected]&city=Mumbai&course=MS&country=US\";\n\t\t\t\t\tSystem.out.println(data);\n\t\t\t\t\tSystem.out.println(data1);\n\t\t\t\t\tHttpGet httpget = new HttpGet(data);\n\t\t\t\t\ttry {\n\t\t\t\t\t HttpResponse response = httpclient.execute(httpget);\n\t\t\t\t\t System.out.println(\"Sent data\");\n\t\t\t\t\t if(response != null) {\n\t\t\t\t\t // String line = \"\";\n\t\t\t\t\n\t\t\t\t\t \t//InputStream inputstream = response.getEntity().getContent();\n\t\t\t\t\t //line = convertStreamToString(inputstream);\n\t\t\t\t\t Toast.makeText(getApplicationContext(),\"Info Updated\", Toast.LENGTH_SHORT).show();\n\n\t\t\t\t\t prefsEditor.putString(\"info\", \"true\");\n\t\t\t\t\t prefsEditor.commit();\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t Intent i=new Intent(getApplicationContext(),SplashScreen.class);\n\t\t\t\t\t startActivity(i);\n\t\t\t\t\t } else {\n\t\t\t\t\t Toast.makeText(getApplicationContext(), \"Unable to complete your request\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t Intent i=new Intent(getApplicationContext(),SplashScreen.class);\n\t\t\t\t\t startActivity(i);\n\t\t\t\t\t }\n\t\t\t\t\t} catch (ClientProtocolException e) {\n\t\t\t\t\t Toast.makeText(getApplicationContext(), \"Caught ClientProtocolException\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t Toast.makeText(getApplicationContext(), \"Caught IOException\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t Toast.makeText(getApplicationContext(), \"Caught Exception\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t\t}\n\t\t\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\n\t}\n\t}", "public boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n \n\t case MENU_PREFS:\n\t \tToast.makeText(getApplicationContext(), \"Prefs\", Toast.LENGTH_SHORT).show();\n\t \t//Intent intent = new Intent()\n\t \t//\t.setClass(this, com.osilabs.android.apps.Prefs.class);\n\t \t//this.startActivityForResult(intent, 0);\n\t \treturn true;\n\t \n\t case R.id.menu_feedback:\n\t \tString pi = URLEncoder.encode(\n\t \t\t\tBuild.MANUFACTURER + \", \" +\n Build.MODEL + \", \" +\n Build.BRAND + \", \" +\n Build.DEVICE + \", \" +\n Build.DISPLAY + \", \" +\n Build.FINGERPRINT + \", \" +\n Build.PRODUCT + \", \" +\n Build.VERSION.RELEASE);\n\t \t\n\t \tIntent i = new Intent(Intent.ACTION_VIEW);\n\t \ti.setData(Uri.parse(URI_FEEDBACK + \"?phoneinfo=\" + pi));\n\t \tstartActivity(i);\n\t \treturn true;\n\n\t\t\tcase R.id.menu_help:\n\t\t //\n\t\t // Set locals with manifest variables\n\t\t //\n\t\t PackageInfo pInfo = null;\n\t\t\t\ttry {\n\t\t\t\t\tpInfo = getPackageManager().getPackageInfo(\"com.osilabs.android.apps.livedropper\",\n\t\t\t\t\t\t\tPackageManager.GET_META_DATA);\n\t\t\t\t\tversion = pInfo.versionName;\n\t\t\t\t} catch (NameNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t AlertDialog alertDialog = new AlertDialog.Builder(this).create();\n\t\t alertDialog.setTitle(R.string.app_name);\n\t\t alertDialog.setMessage(\"You are running version \" + version);\n\t\t alertDialog.setButton(this.getString(R.string.sample_button),\n\t\t \t\tnew DialogInterface.OnClickListener() {\n\t\t \tpublic void onClick(DialogInterface dialog, int which) {\n\t\t \t\tIntent mIntent = new Intent(Intent.ACTION_VIEW, \n\t\t \t\t\t\tUri.parse(\"http://osilabs.com/m/mobilecontent/livedropper/about.php#\" + version)); \n \t\t\t\tstartActivity(mIntent); \n\t\t } \n\t\t });\n\t\t alertDialog.setIcon(R.drawable.ic_launcher);\n\t\t alertDialog.show();\n\t\t \treturn true;\n\n\t\t case R.id.menu_quit:\n\t\t finish();\n\t\t return true;\n\t }\n\t return false;\n\t}", "@Override\n public void onClick(View v) {\n Intent i = new Intent(ConfiguracionActivity.this, WebViewActivity.class);\n startActivity(i);\n\n // Opcion para navegador externo\n /*\n String url = getResources().getString(R.string.privacy_policy_url);\n Intent intentWeb = new Intent();\n intentWeb.setAction(Intent.ACTION_VIEW);\n intentWeb.setData(Uri.parse(url));\n startActivity(intentWeb);\n */\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.settings_page);\n //Top menu buttons\n Button done = findViewById(R.id.done2);\n Button personalPage = findViewById(R.id.toggle2_1);\n Button infoPage = findViewById(R.id.toggle2_2);\n //Preferences buttons\n CheckBox[] preferenceButtons = {findViewById(R.id.concordiaShuttle), findViewById(R.id.elevators), findViewById(R.id.escalators),\n findViewById(R.id.stairs), findViewById(R.id.accessibilityInfo), findViewById(R.id.stepFreeTrips)};\n //Top menu events\n done.setOnClickListener(view -> startActivityIfNeeded(new Intent(SettingsActivity.this, MapsActivity.class).setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT), 0));\n personalPage.setOnClickListener(view -> startActivityIfNeeded(new Intent(SettingsActivity.this, SettingsPersonalActivity.class).setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT), 0));\n infoPage.setOnClickListener(view -> startActivityIfNeeded(new Intent(SettingsActivity.this, SettingsInfoActivity.class).setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT), 0));\n //Check Default preferences\n setCheckedBoxes();\n //My preferences events\n for (CheckBox preferenceButton : preferenceButtons) {\n preferenceButton.setOnClickListener(view -> changePreferences(preferenceButton, preferenceButtons));\n }\n }", "@Override\n public void onClick(View view) {\n Intent screenChange = new Intent(getApplicationContext(), settings.class);\n //creating a bundle to store the variables that will be passed into the next\n //activity\n //starting our activity for a result\n startActivity(screenChange);\n }", "public void onStart() {\n super.onStart();\n if (PreferenceManager.getDefaultSharedPreferences(this.f3712b).getBoolean(\"FirstBootVersionUp2\", false)) {\n Intent intent = new Intent(this.f3712b, GuidanceMenuActivity.class);\n intent.putExtra(\"Reconnect\", false);\n startActivity(intent);\n } else {\n startActivity(new Intent(this.f3712b, TermsAgreementActivity.class));\n }\n finish();\n }", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface paramDialogInterface, int paramInt) {\n\t\t\t\t\tIntent myIntent = new Intent( Settings.ACTION_SECURITY_SETTINGS );\r\n context.startActivity(myIntent);\r\n \r\n Constants.IS_FROM_GPSLOCATION=true;\r\n //checkForProviders(mLocationManager);\r\n //to check once more for providers\r\n //getGPSLocation(context);\r\n\t\t\t\t}", "public void home(View view){\n if(check.equals(\"true\")){\n Intent intent = new Intent(this, Menu_Admin.class);\n intent.putExtra(MainActivity.USER, this.email);\n intent.putExtra(MainActivity.CHECK_ADMIN, check);\n startActivity(intent);\n }\n else{\n Intent intent = new Intent(this, Menu_Client.class);\n intent.putExtra(MainActivity.USER, this.email);\n intent.putExtra(MainActivity.CHECK_ADMIN, check);\n startActivity(intent);\n }\n }", "public void saveSettings(View v) {\n EditText apikeytext = (EditText) findViewById(R.id.editapi);\n EditText redcapurltext = (EditText) findViewById(R.id.editredcapurl);\n UserDBHelper udb = new UserDBHelper(this);\n User currentUser = udb.getActiveUser();\n\n String inputApiKey = apikeytext.getText().toString().trim();\n currentUser.setAPIKEY(inputApiKey);\n\n String inputRedcapURL = redcapurltext.getText().toString().trim();\n currentUser.setRedcapURL(inputRedcapURL);\n\n udb.updateUser(currentUser);\n\n Resources res = getResources();\n DisplayMetrics dm = res.getDisplayMetrics();\n Configuration config = res.getConfiguration();\n\n String targetLanguage;\n\n CheckBox cb_en = (CheckBox) findViewById(R.id.cb_english);\n CheckBox cb_pt = (CheckBox) findViewById(R.id.cb_port);\n\n if( cb_en.isChecked() ) {\n targetLanguage = \"en-US\";\n } else {\n targetLanguage = \"pt\";\n }\n\n Locale newLang = new Locale(targetLanguage);\n\n config.locale = newLang;\n res.updateConfiguration(config, dm);\n\n try {\n Intent i = new Intent(getBaseContext(), MainActivity.class);\n startActivity(i);\n finish();\n } catch (Exception e) {}\n }", "private void initSome() {\n from_status=getIntent().getStringExtra(\"from\");\n Log.e(TAG, \"initSome: \"+from_status );\n\n progressBar.setVisibility(View.GONE);\n viewModel = ViewModelProviders.of(this).get(AuthViewModel.class);\n //initialize fb callbackmanger\n callbackManager = CallbackManager.Factory.create();\n //initialize firebase auth\n auth = FirebaseAuth.getInstance();\n\n prefs = Prefs.with(this);\n\n\n }", "private void studentRoleAction(){\n savePreferenceData(\"student\");\n Intent intent = new Intent(this, StudentMainActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent introActivity = new Intent(getApplicationContext(), MapActivity.class);\n\n // si la locacion tiene un valor null guardar estado de la variable de \"FalseLocationSignal\"\n if (LocationReal == null) {\n SharedPreferences prefst = getApplicationContext().getSharedPreferences(\"PrefsLocationFalse\", MODE_PRIVATE);\n SharedPreferences.Editor editor = prefst.edit();\n editor.putBoolean(\"LocationFalsePref\", FalseLocationSignal);\n editor.apply(); // sincronizacion de forma asincrona\n //editor.commit(); // sincronizacion de forma sincrona devolviendo en valor booleano si o si\n\n // TODO : en caso de requerir variables estaticas para MapActivity:\n // introActivity.putExtra(\"falselocation\",FalseLocationSignal);\n\n }\n // caso contrario guardar estado de la variable \"TrueLocationSignal\"\n else {\n SharedPreferences prefsf = getApplicationContext().getSharedPreferences(\"PrefsLocationTrue\", MODE_PRIVATE);\n SharedPreferences.Editor editor = prefsf.edit();\n editor.putBoolean(\"LocationTruePref\", TrueLocationSignal);\n editor.putString(\"LatitudePref\",LatitudeTruePref);\n editor.putString(\"LongitudePref\",LongitudeTruePref);\n editor.apply();\n\n // TODO : en caso de requerir una variable de locacion estatica para MapActivity:\n // introActivity.putExtra(\"truelocation\",TrueLocationSignal);\n // introActivity.putExtra(\"reallocation\", LocationReal);\n }\n\n startActivity(introActivity);\n savePrefsData();\n finish();\n\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tswitch(requestCode){\n\t\tcase 0:\t\t\t\n\t\t\tif(resultCode == RESULT_OK){\n\t\t\t\tLog.d(TAG, Integer.toString(RESULT_OK));\n\t\t\t\tString u_signup, p_signup;\n\t\t\t\tu_signup = data.getStringExtra(\"username\");\n\t\t\t\tp_signup = data.getStringExtra(\"password\");\n\t\t\t\tLog.d(TAG, u_signup);\n\t\t\t\tintent = new Intent(getApplicationContext(), Timeline.class);\n\t\t\t\tintent.putExtra(\"first_time\", true); //Setting Boolean first_time to true\n\t\t\t\tintent.putExtra(\"username\", u_signup);\n\t\t\t\tintent.putExtra(\"password\", p_signup);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void onResume() {\n sharedpreferences = getApplicationContext().getSharedPreferences(mypreference, Context.MODE_PRIVATE);\n sharedpreferences = getSharedPreferences(mypreference, Context.MODE_PRIVATE);\n\n if(!viewModel.isUserLoggedIn()) {\n if (sharedpreferences.contains(\"email\") && sharedpreferences.contains(\"password\")){\n loadSharedPreferences();\n String email = viewModel.getDBUser().getEmail();\n int atIndex = email.indexOf(\"@\");\n email = email.substring(0, atIndex);\n getSupportActionBar().setTitle(\"Notas de \" + email);\n viewModel.refreshNotes();\n }\n else{\n this.finish();\n goToLoginActivity();\n }\n }\n else {\n String email = viewModel.getDBUser().getEmail();\n int atIndex = email.indexOf(\"@\");\n email = email.substring(0, atIndex);\n getSupportActionBar().setTitle(\"Notas de \" + email);\n viewModel.refreshNotes();\n }\n\n super.onResume();\n }", "private void callPermissionSettings() {\n Intent intent = new Intent();\n intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\", HomeActivity.this.getApplicationContext().getPackageName(), null);\n intent.setData(uri);\n startActivityForResult(intent, 300);\n }", "public void onClick(View v) {\n Intent i = new Intent(MainPage.this, AddPolicy.class);\n i.putExtra(\"Update\", \"False\");\n startActivity(i);\n }", "private void openAppSettings() {\n //Open the Settings Activity\n Intent settingsActivityIntent = new Intent(this, SettingsActivity.class);\n startActivity(settingsActivityIntent);\n }", "protected void onResume () {\n super.onResume();\n this.verifyPreferences ();\n }", "private void loadPreferences() {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n boolean lm = sp.getBoolean(getString(R.string.live_match), true);\n boolean ls = sp.getBoolean(getString(R.string.live_score), true);\n\n if(lm) live_match.setChecked(true);\n else live_match.setChecked(false);\n\n if(ls) live_score.setChecked(true);\n else live_score.setChecked(false);\n }", "public void onClickGo(View view){\n Intent intent;\n int gameEndCode = 0;\n // if (sws) {\n intent = new Intent(MainActivity.this, GameField.class);\n /*\n intent.putExtra(\"start_w_settings\",pref.getBoolean(\"start_w_settings\", false));\n intent.putExtra(\"field_size\",pref.getInt(\"field_size\",3));*/\n // }\n // else {intent = new Intent(MainActivity.this, Settings.class);}\n startActivityForResult(intent, gameEndCode);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n ButterKnife.bind(this);\n Prefs prefs = new Prefs(this);\n if (prefs.getUrl()!=null)\n textUrl.setText(prefs.getUrl());\n checkCallPermission();\n }", "@Override\n protected void onResume() {\n super.onResume();\n SharedPreferences sharedPreferences = getSharedPreferences(\"com.example.ivonneortega.the_news_project.Settings\", Context.MODE_PRIVATE);\n theme_changed = sharedPreferences.getBoolean(SettingsActivity.THEME_HAS_CHANGED,false);\n\n if(mStartActivity){\n mStartActivity = false;\n\n } else if (theme_changed){\n SharedPreferences sharedPreferences1 = getSharedPreferences(\"com.example.ivonneortega.the_news_project.Settings\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences1.edit();\n editor.putBoolean(SettingsActivity.THEME_HAS_CHANGED,false);\n editor.apply();\n finish();\n startActivity(getIntent());\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch(id){\n case R.id.History_of_appointments:\n Intent intent_history = new Intent(this,history_of_appointments.class);\n intent_history.putExtra(\"netId\", getIntent().getStringExtra(\"netId\").toString());\n this.startActivity(intent_history);\n return true;\n case R.id.Create_appointment_slot:\n Intent intent_create_appointment = new Intent(this,create_appointment_slot.class);\n intent_create_appointment.putExtra(\"netId\", getIntent().getStringExtra(\"netId\").toString());\n this.startActivity(intent_create_appointment);\n return true;\n case R.id.Messenger:\n Intent intent_messenger = new Intent(this,Messenger.class);\n intent_messenger.putExtra(\"netId\", getIntent().getStringExtra(\"netId\").toString());\n this.startActivity(intent_messenger);\n return true;\n case R.id.Search:\n Intent intent_search = new Intent(this,search.class);\n this.startActivity(intent_search);\n return true;\n case R.id.Logout:\n Intent intent_Logout = new Intent(this,LoginActivity.class);\n SharedPreferences settings = getSharedPreferences(\"UTA_APPT_SCHEDULER\", 0);\n\n settings.edit()\n .putString(\"UserName\", \"NA\")\n .putString(\"Password\", \"NA\")\n .putString(\"user_name\", \"NA\")\n .putString(\"user_dept\", \"NA\")\n .putString(\"user_type\", \"NA\")\n .putString(\"user_email\", \"NA\")\n .putString(\"user_deptname\", \"NA\")\n .apply();\n intent_Logout.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intent_Logout.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n intent_Logout.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n this.startActivity(intent_Logout);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n ml = getSharedPreferences(\"musicList\", Context.MODE_PRIVATE);\n Intent receivem = getIntent();\n\n received = receivem.getIntExtra(\"MUS\",0);\n\n if(received==1)\n {\n MusKey=\"MUSICONE\";\n\n }\n\n if(received==2)\n {\n MusKey=\"MUSICTWO\";\n Toast.makeText(getApplicationContext(), \"Its shit\",\n Toast.LENGTH_SHORT).show();\n\n }\n if(received==3)\n {\n MusKey=\"MUSICTHREE\";\n }\n if(received==4)\n {\n MusKey=\"MUSICFOUR\";\n }\n\n if(received==9)\n {\n MusKey=\"EASYMUSIC\";\n }\n init_phone_music_grid();\n }", "@Override\n public void onClick(View view) {\n\n if (!prefs.getBoolean(Constants.KEY_IS_MINI_GUIDE_SHOWN, false)) {\n openMiniGuide1();\n } else {\n prefs.edit().putString(Constants.KEY_IS_FIRST_TIME, \"true\");\n startActivity(new Intent(SplashLandingActivity.this, SignUpActivity.class));\n finish();\n }\n\n }", "private void saveSharedPref() {\n SharedPreferences.Editor editor = this.sharedPreferences.edit();\n if (checkBox.isChecked()) {\n editor.putBoolean(Constants.SP_IS_REMEMBERED_KEY, true);\n }\n editor.apply();\n }", "public void onClick(DialogInterface dialogBox, int id) {\n if(userInputDialogEditText.getText().toString().equals(\"rohitrohit\")){\n\n //Toast.makeText(c, \"You have Access!\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getApplicationContext(),FeedBackActivity.class);\n startActivity(intent);\n\n\n }\n else{\n Toast.makeText(MainActivity.this, \"You Do not have the access to this feature!\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t super.onCreate(savedInstanceState);\n\t //init\n\n Constants.SMS_INTERCEPTOR_IS_ACTIVE = true;\n \n\t requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t sp = getSharedPreferences(\"S.PRE\", 0);\n\t editor = sp.edit();\n\t \n\t String cityName = sp.getString(\"S.PRE_CITY_NAME\", \"NOT_SPECIFIED\");\n\t \n\t //set the sender num, if never set, set to null\n\t if( cityName.equalsIgnoreCase(\"waterloo\") ) { \n\t Constants.SENDER_NUM = Constants.WATERLOO_NUMBER;\n\t } else if( cityName.equalsIgnoreCase(\"toronto\") ) {\n\t \tConstants.SENDER_NUM = Constants.TORONTO_NUMBER;\n\t } else {\n\t \tConstants.SENDER_NUM = null;\n\t }\n\t \n if( sp.getBoolean(\"S.PRE_FIRST_LAUNCH\", true) ) {\n \t setContentView(R.layout.firstlunch);\n \t englishButton = (Button)findViewById(R.id.englishButton);\n \t //english.setMinimumWidth(200);\n \t englishButton.setOnClickListener( new Button.OnClickListener() { \n \t \tpublic void onClick(View v) {\n \t \t\teditor.putBoolean(\"S.PRE_CHINESE\", false);\n \t \t\teditor.putBoolean(\"S.PRE_FIRST_LAUNCH\", false);\n \t \t\teditor.commit();\n \t\t\tIntent start = new Intent();\n \t\t\tstart.setClass( AppStartConfig.this, AppStartConfig.class );\n \t\t\tstartActivity(start);\n \t\t\tAppStartConfig.this.finish();\n \t \t}\n \t });\n \t \n \t chineseButton = (Button)findViewById(R.id.chineseButton);\n \t //english.setMinimumWidth(200);\n \t \n \t chineseButton.setOnClickListener( new Button.OnClickListener() { \n \t \tpublic void onClick(View v) {\n \t \t\teditor.putBoolean(\"S.PRE_CHINESE\", true);\n \t \t\teditor.putBoolean(\"S.PRE_FIRST_LAUNCH\", false);\n \t \t\teditor.commit();\n \t\t\tIntent start = new Intent();\n \t\t\tstart.setClass( AppStartConfig.this, AppStartConfig.class );\n \t\t\tstartActivity(start);\n \t\t\tAppStartConfig.this.finish();\n \t \t}\n \t });\n } else {\n \tif( sp.getBoolean(\"S.PRE_CHINESE\", false) ) {\n\t \t Locale locale = Locale.SIMPLIFIED_CHINESE;\n\t \t Locale.setDefault(locale);\n\t \t \n\t \t Configuration config = new Configuration();\n\t \t config.locale = locale;\n\t \t getBaseContext().getResources().updateConfiguration(config, getBaseContext().getResources().getDisplayMetrics());\n \t} else {\n\t \t Locale locale = Locale.ENGLISH;\n\t \t Locale.setDefault(locale);\n\t \t \n\t \t Resources resources = getBaseContext().getResources();\n\t \t Configuration config = resources.getConfiguration();\n\t \t DisplayMetrics dm = resources .getDisplayMetrics(); \n\t \t config.locale = locale;\n\t \t resources.updateConfiguration(config, dm);\n \t}\n \t\t\tIntent start = new Intent();\n \t\t\tstart.setClass( AppStartConfig.this, ShowMainMenu.class );\n\t \t\tstartActivity(start);\n\t \t\tAppStartConfig.this.finish();\n }\n\t}", "@Override\n public void onClick(View v) {\n SharedPreferences currShared = getContext().getSharedPreferences(MainActivity.CURR_PREFS, Context.MODE_PRIVATE);\n SharedPreferences.Editor currEditor = currShared.edit();\n currEditor.clear();\n currEditor.apply();\n Toast.makeText(getContext(), \"We should build a post trip page\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getContext(), MainActivity.class));\n\n }", "@Override\n\t\tprotected void onSuccess(final Context context) {\n\t\t\tfinal SharedPreferences settings = getSharedPreferences(Constants.PREFS_NAME, 0);\n\t\t\tfinal SharedPreferences.Editor editor = settings.edit();\n\t\t\teditor.putString(\"email\", email);\n\t\t\teditor.putString(\"password\", user.getPassword());\n\t\t\teditor.commit();\n\n\t\t\tlaunchMain();\n\t\t\tfinish();\n\t\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tloadPref();\n\t}", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "public void saveSettings(View v) {\n SharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE); // get shared preferences\n SharedPreferences.Editor editor = sharedPref.edit();\n int seconds_rec = Integer.parseInt(time_recording.getText().toString());\n int notif_occ = Integer.parseInt(time_occurance.getText().toString());\n\n editor.putInt(getString(R.string.time_recording_seconds), seconds_rec); // save values to a sp\n editor.putInt(getString(R.string.time_notification_minutes), notif_occ);\n editor.commit(); // commit the differences\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(null);\n setContentView(R.layout.activity_setting);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n //set up pref listener\n if (fragment == null) {\n fragment = new SettingFragment();\n getFragmentManager()\n .beginTransaction()\n .replace(android.R.id.content, fragment)\n .commit();\n getFragmentManager().executePendingTransactions();\n }\n sharedP = PreferenceManager\n .getDefaultSharedPreferences(SettingActivity.this);\n final boolean pref_use_map = sharedP.getBoolean(\"pref_use_map\", false);\n final int pref_upload = Integer.parseInt(sharedP.getString(\"pref_upload_mode\", \"0\"));\n final boolean pref_in_team = sharedP.getBoolean(\"pref_in_team\", false);\n hideIfNotInTeam(pref_in_team);\n hideIfUsingMap(pref_use_map);\n hideIfManual(pref_upload);\n if (sharedPreferenceChangeListener == null) {\n sharedPreferenceChangeListener = new SharedPreferences.OnSharedPreferenceChangeListener() {\n @Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n switch (key.toLowerCase()) {\n case \"pref_in_team\":\n hideIfNotInTeam(sharedPreferences.getBoolean(key, false));\n break;\n case \"pref_use_map\":\n hideIfUsingMap(sharedPreferences.getBoolean(key, false));\n break;\n case \"pref_battery\":\n final String pref_battery = sharedPreferences.getString(key, \"\");\n ServiceController.allowBattery = Integer.parseInt(pref_battery);\n if ((ServiceController.allowBattery != 0)\n && ((ServiceController.resourceManager == null)\n || (!ServiceController.resourceManager.isAlive()))) {\n Log.e(\"SETT\", \"restart resource manger bat=\" + ServiceController.allowBattery);\n ServiceController.resourceManager = new ResourceManager(SettingActivity.this);\n ServiceController.resourceManager.start();\n }\n break;\n case \"pref_kill_ap_no_gps\":\n final String pref_kill_ap_no_gps = sharedPreferences.getString(key, \"\");\n ServiceController.allowNoLocation = Integer.parseInt(pref_kill_ap_no_gps);\n if ((ServiceController.allowNoLocation != 0)\n && ((ServiceController.resourceManager == null)\n || (!ServiceController.resourceManager.isAlive()))) {\n Log.e(\"SETT\", \"restart resource manger=\" + ServiceController.allowNoLocation);\n ServiceController.resourceManager = new ResourceManager(SettingActivity.this);\n ServiceController.resourceManager.start();\n }\n break;\n case \"pref_upload_mode\":\n final int pref_upload = Integer.parseInt(sharedPreferences.getString(key, \"\"));\n hideIfManual(pref_upload);\n break;\n case \"pref_upload_entry\":\n ServiceController.numberOfApToUpload =\n Integer.parseInt(\n sharedPreferences.getString(key, \"5000\"));\n break;\n case \"pref_show_counter\":\n ServiceController.showCounterWrapper\n .setShouldShow(sharedPreferences.getBoolean(key, false));\n break;\n case \"pref_team\":\n ServiceController.teamId = sharedPreferences.getString(key, \"\");\n if (!Utils.checkBssid(ServiceController.teamId)) {\n showAlert(getString(R.string.wrong_id_format));\n }\n break;\n case \"pref_team_tag\":\n ServiceController.tag = sharedPreferences.getString(key, \"\");\n break;\n case \"pref_public_data\":\n if (sharedPreferences.getBoolean(key, true)) {\n ServiceController.mode |= 1;\n } else {\n ServiceController.mode &= 2;\n }\n break;\n case \"pref_publish_map\":\n if (sharedPreferences.getBoolean(key, false)) {\n ServiceController.mode |= 2;\n } else {\n ServiceController.mode &= 1;\n }\n break;\n default:\n break;\n }\n }\n };\n }\n }", "public void UniversitySelected(View view) {\n\n SharedPreferences storeduniversity = getSharedPreferences(\"universityfile\",Activity.MODE_PRIVATE);\n SharedPreferences.Editor editor=storeduniversity.edit();\n\n EditText editText = (EditText) findViewById(R.id.enterDescription);\n String uni=editText.getText().toString();\n\n editor.putString(\"university\",uni);\n editor.apply();\n\n\n \n\n\n Intent intent = new Intent(this, ClassAdder.class);\n //String message = String.valueOf(id.UniversitySelect);\n //intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n }", "@Override\r\n \t\t\tpublic void onClick(View arg0) {\n \t\t\t\tIntent intent = new Intent(AppDownloaded.this, SettingActivity.class);\r\n \t\t\t\tstartActivity(intent);\r\n \t\t\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings) {\r\n if(item.getTitle().equals(\"Add to Favorites\")) {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n\r\n String value1 = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor1.putString(id_fav, value1);\r\n editor1.commit();\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n }\r\n\r\n Toast.makeText(getApplicationContext(), \"Added to Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n else\r\n {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n editor1.remove(id_fav);\r\n editor1.commit();\r\n\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n }\r\n\r\n\r\n Toast.makeText(getApplicationContext(), \"Removed from Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n //SharedPreferences.Editor editor = sharedpreferences.edit();\r\n //editor.putString(\"Name\", \"Rachit\");\r\n //SharedPreferences events=getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n //String l=\"-1\";\r\n //String value=events.getString(id_fav,l);\r\n //editor.commit();\r\n return true;\r\n }\r\n else if (id == R.id.share) {\r\n if (ShareDialog.canShow(ShareLinkContent.class)) {\r\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\r\n .setContentUrl(Uri.parse(\"http://developers.facebook.com/android\"))\r\n .build();\r\n shareDialog.show(linkContent);\r\n }\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n\t\t\n super.onCreate(savedInstanceState);\n setContentView(R.layout.dlg_preferences);\n m_myPrefs = Preferences.getInstance(this);\n \n // setup handler for Ok button\n Button btnOk = (Button) findViewById(R.id.ButtonOK);\n btnOk.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t savePreferences();\n\t setResult(RESULT_OK);\n\t finish();\n }\n });\n // setup handler for the Cancel button\n Button btnCancel = (Button) findViewById(R.id.ButtonCancel);\n btnCancel.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t setResult(RESULT_CANCELED);\n \t finish();\n }\n });\n\n // setup handler for sound picker buttons\n Button btnPickRing = (Button) findViewById(R.id.ButtonPickRing);\n btnPickRing.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n\t Intent intentBrowseFiles = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n\t PreferencesAct.this.startActivityForResult(intentBrowseFiles, PICK_FILE_RING);\n }\n });\n\n Button btnPickSMS = (Button) findViewById(R.id.ButtonPickSMS);\n btnPickSMS.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n\t Intent intentBrowseFiles = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n\t PreferencesAct.this.startActivityForResult(intentBrowseFiles, PICK_FILE_SMS);\n }\n });\n\n Button btnPickIM = (Button) findViewById(R.id.ButtonPickIM);\n btnPickIM.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n\t Intent intentBrowseFiles = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n\t PreferencesAct.this.startActivityForResult(intentBrowseFiles, PICK_FILE_IM);\n }\n });\n \n Button btnPickMail = (Button) findViewById(R.id.ButtonPickMail);\n btnPickMail.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n\t Intent intentBrowseFiles = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n\t PreferencesAct.this.startActivityForResult(intentBrowseFiles, PICK_FILE_MAIL);\n }\n });\n\n \n // setup handler for test buttons\n Button btnTestRing = (Button) findViewById(R.id.ButtonTestRing);\n btnTestRing.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerRing);\n \t CheckBox myCheckVibrate\t= (CheckBox) findViewById(R.id.CheckBoxVibrateRing);\n \t CheckBox myCheckSound\t= (CheckBox) findViewById(R.id.CheckBoxSoundRing);\n \t if (myCheckSound.isChecked())\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), m_strUriRing);\n \t }\n \t else\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), \"\");\n \t }\n }\n });\n Button btnTestCharge = (Button) findViewById(R.id.ButtonTestCharge);\n btnTestCharge.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerCharge);\n \t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION);\n }\n });\n Button btnTestSMS = (Button) findViewById(R.id.ButtonTestSMS);\n btnTestSMS.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerSMS);\n \t CheckBox myCheckVibrate\t= (CheckBox) findViewById(R.id.CheckBoxVibrateSMS);\n \t CheckBox myCheckSound\t= (CheckBox) findViewById(R.id.CheckBoxSoundSMS);\n \t if (myCheckSound.isChecked())\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), m_strUriSMS);\n \t }\n \t else\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), \"\");\n \t }\n }\n });\n \n Button btnTestMail = (Button) findViewById(R.id.ButtonTestMail);\n btnTestMail.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerMail);\n \t CheckBox myCheckVibrate\t= (CheckBox) findViewById(R.id.CheckBoxVibrateMail);\n \t CheckBox myCheckSound\t= (CheckBox) findViewById(R.id.CheckBoxSoundMail);\n \t if (myCheckSound.isChecked())\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), m_strUriMail);\n \t }\n \t else\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), \"\");\n \t }\n }\n });\n \n Button btnTestIM = (Button) findViewById(R.id.ButtonTestIM);\n btnTestIM.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerIM);\n \t CheckBox myCheckVibrate\t= (CheckBox) findViewById(R.id.CheckBoxVibrateIM);\n \t CheckBox myCheckSound\t= (CheckBox) findViewById(R.id.CheckBoxSoundIM);\n \t if (myCheckSound.isChecked())\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), m_strUriIM);\n \t }\n \t else\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), \"\");\n \t }\n }\n });\n \n Button btnTestSleep = (Button) findViewById(R.id.ButtonTestSleep);\n btnTestSleep.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerSleep);\n \t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION);\n }\n });\n\n Spinner mySpinRing = (Spinner) findViewById(R.id.SpinnerRing);\n ArrayAdapter myAdapterRing = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterRing.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinRing.setAdapter(myAdapterRing);\n\n Spinner mySpinCharge = (Spinner) findViewById(R.id.SpinnerCharge);\n ArrayAdapter myAdapterCharge = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterCharge.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinCharge.setAdapter(myAdapterCharge);\n\n Spinner mySpinSMS = (Spinner) findViewById(R.id.SpinnerSMS);\n ArrayAdapter myAdapterSMS = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterSMS.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinSMS.setAdapter(myAdapterSMS);\n\n Spinner mySpinMail = (Spinner) findViewById(R.id.SpinnerMail);\n ArrayAdapter myAdapterMail = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterMail.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinMail.setAdapter(myAdapterMail);\n\n Spinner mySpinIM = (Spinner) findViewById(R.id.SpinnerIM);\n ArrayAdapter myAdapterIM = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterIM.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinIM.setAdapter(myAdapterIM);\n\n Spinner mySpinSleep = (Spinner) findViewById(R.id.SpinnerSleep);\n ArrayAdapter myAdapterSleep = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterSleep.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinSleep.setAdapter(myAdapterSleep);\n \n Spinner mySpinVibrateOffFrom = (Spinner) findViewById(R.id.SpinnerVibrationOffFrom);\n ArrayAdapter myAdapterVibrateOffFrom = ArrayAdapter.createFromResource(\n this, R.array.times, android.R.layout.simple_spinner_item);\n myAdapterVibrateOffFrom.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinVibrateOffFrom.setAdapter(myAdapterVibrateOffFrom);\n\n Spinner mySpinVibrateOffTo = (Spinner) findViewById(R.id.SpinnerVibrationOffTo);\n ArrayAdapter myAdapterVibrateOffTo = ArrayAdapter.createFromResource(\n this, R.array.times, android.R.layout.simple_spinner_item);\n myAdapterVibrateOffTo.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinVibrateOffTo.setAdapter(myAdapterVibrateOffTo);\n\n Spinner mySpinSoundOffFrom = (Spinner) findViewById(R.id.SpinnerSoundOffFrom);\n ArrayAdapter myAdapterSoundOffFrom = ArrayAdapter.createFromResource(\n this, R.array.times, android.R.layout.simple_spinner_item);\n myAdapterSoundOffFrom.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinSoundOffFrom.setAdapter(myAdapterSoundOffFrom);\n\n Spinner mySpinSoundOffTo = (Spinner) findViewById(R.id.SpinnerSoundOffTo);\n ArrayAdapter myAdapterSoundOffTo = ArrayAdapter.createFromResource(\n this, R.array.times, android.R.layout.simple_spinner_item);\n myAdapterSoundOffTo.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinSoundOffTo.setAdapter(myAdapterSoundOffTo);\n \n readPreferences();\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "public void shared() {\n\n String Email = editTextEmail.getText().toString();\n String Password = editTextPassword.getText().toString();\n String username = userstring;\n\n SharedPreferences sharedlog = getSharedPreferences(\"usernamelast\" , MODE_PRIVATE);\n SharedPreferences.Editor editorlogin = sharedlog.edit();\n editorlogin.putString(\"usernamelast\", username);\n editorlogin.apply();\n\n SharedPreferences sharedPref = getSharedPreferences(\"email\", MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"email\", Email);\n editor.apply();\n //Los estados los podemos setear en la siguiente actividad\n SharedPreferences sharedPref2 = getSharedPreferences(\"password\", MODE_PRIVATE);\n SharedPreferences.Editor editor2 = sharedPref2.edit();\n editor2.putString(\"password\", Password);\n editor2.apply();\n\n\n }", "private void showSettingsDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(BaseActivity.this);\n builder.setTitle(\"Need Permissions\");\n builder.setMessage(\"This app needs permission to use this feature. You can grant them in app settings.\");\n builder.setPositiveButton(\"GOTO SETTINGS\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n openSettings();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n builder.show();\n\n }", "public void onResume() {\n super.onResume();\n Log.i(tag, \"onResume\");\n handlePing();\n if (ControlWidget.getPreferenceInt(getApplicationContext(), \"redirect_widget_settings\") == 1) {\n Log.i(tag, \"redirect_widget_settings 1, redirect to widget settings\");\n ControlWidget.setPreferenceInt(getApplicationContext(), \"redirect_widget_settings\", 0);\n attemptToJumpToWidgetSettings();\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n // check which menu item has been clicked and perform the switch case action\n switch (id) {\n case R.id.action_settings:\n\n // Start the settings activity when this setting menu item has been clicked\n Intent settingsIntent = new Intent(this, SettingsActivity.class);\n startActivity(settingsIntent);\n return true;\n\n case R.id.action_share:\n String message = getString(R.string.share_message);\n Intent share = new Intent(Intent.ACTION_SEND);\n share.setType(\"text/plain\");\n share.putExtra(Intent.EXTRA_TEXT, message);\n startActivity(share);\n return true;\n\n case R.id.action_refresh:\n new UpdateOnlineRadio(this);\n return true;\n\n case R.id.action_news:\n Intent news = new Intent(this, News.class);\n startActivity(news);\n return true;\n\n case R.id.action_privacy_policy:\n Intent privacyPolicy = new Intent(this, privacy_policy.class);\n\n privacyPolicy.putExtra(\"url\", \"http://www.samtakie.co.za/onlineradio/privacy_policy.html\");\n privacyPolicy.putExtra(\"title\", \"Privacy Policy\");\n startActivity(privacyPolicy);\n return true;\n\n case R.id.action_terms_conditions:\n Intent termsAndConditions = new Intent(this, privacy_policy.class);\n termsAndConditions.putExtra(\"url\", \"http://www.samtakie.co.za/onlineradio/terms_and_conditions.html\");\n termsAndConditions.putExtra(\"title\", \"Terms and Conditions\");\n startActivity(termsAndConditions);\n return true;\n\n default:\n // Do nothing for the time being\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onClick(View v) {\n SharedPreferences sharedPreferences = getSharedPreferences( USERNAME_KEY, MODE_PRIVATE );\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString( USERNAME_key, null );\n editor.apply();\n\n //berpindah activity\n Intent gotohome = new Intent(My_ProfilAct.this,SignInAct.class);\n startActivity( gotohome );\n finish();\n }", "@Override\n public boolean onPreferenceClick(Preference preference) {\n Intent shortcutIntent = new Intent(getActivity(), VendorActivity.class);\n shortcutIntent.putExtra(\"vendor_id\", vendorDetailsObject.vendorId);\n// SharedPreferences example = getActivity().getSharedPreferences(\"USER\", 0);\n// SharedPreferences.Editor editor = example.edit();\n// editor.putString(\"latitude\", Home.lat+\"\");\n// editor.putString(\"longitude\", Home.longi+\"\");\n// editor.apply();\n MainApplication.getInstance().data.userMain.latitude = MainApplication.getInstance().location.getLatitude() + \"\";\n MainApplication.getInstance().data.userMain.longitude = MainApplication.getInstance().location.getLongitude() + \"\";\n MainApplication.getInstance().data.userMain.saveUserDataLocally();\n\n shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n Intent addIntent = new Intent();\n\n ImageView image = VendorActivity.logoView;\n Bitmap bitmap = ((BitmapDrawable) image.getDrawable()).getBitmap();\n\n\n addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, vendorDetailsObject.name);\n addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON, bitmap);\n addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);\n addIntent.setAction(\"com.android.launcher.action.INSTALL_SHORTCUT\");\n getActivity().sendBroadcast(addIntent);\n Toast.makeText(getActivity(), \"Pinned To Home Screen\", Toast.LENGTH_SHORT).show();\n return true;\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n app_preferences = PreferenceManager.getDefaultSharedPreferences(this);\n first_run = app_preferences.getBoolean(\"first_run\", true);\n \n if (first_run) {\n \tnew AlertDialog.Builder(AndroidExamples.this)\n \t\t.setTitle(\"Welcome to Android Developer Examples\")\n \t\t.setMessage(\"This application is a set of advanced examples for http://android.ifies.org.\\nThese examples are available online via the website, where you can download the sourcecode for this application.\")\n \t\t.setNeutralButton(\"Close\", new DialogInterface.OnClickListener() {\n \t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n \t\t\t\tSharedPreferences.Editor editor = app_preferences.edit();\n\t\t\t\t\teditor.putBoolean(\"first_run\", false);\n\t\t\t\t\teditor.commit();\n \t\t\t}\n \t\t})\n \t\t.show();\n }\n \n example_admob = (Button) findViewById(R.id.example_admod);\n example_admob.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent i_AdMob = new Intent(AndroidExamples.this, AdmobExample.class);\n\t\t\t\tstartActivity(i_AdMob);\n\t\t\t}\n \t\n });\n \n example_gallery = (Button) findViewById(R.id.example_gallery);\n example_gallery.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent i_Gallery1 = new Intent(AndroidExamples.this, GalleryExample.class);\n\t\t\t\tstartActivity(i_Gallery1);\n\t\t\t}\n \t\n });\n \n example_alerts = (Button) findViewById(R.id.example_alerts);\n example_alerts.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent i_Alert = new Intent(AndroidExamples.this, AlertExamplesHome.class);\n\t\t\t\tstartActivity(i_Alert);\n\t\t\t}\n \t\n });\n \n example_rss_parser = (Button) findViewById(R.id.example_rss_parser);\n example_rss_parser.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent i_Alert = new Intent(AndroidExamples.this, RssActivity.class);\n\t\t\t\tstartActivity(i_Alert);\n\t\t\t}\n \t\n });\n \n example_webview = (Button) findViewById(R.id.example_webkit_view);\n example_webview.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent i_Alert = new Intent(AndroidExamples.this, ExampleWebkit.class);\n\t\t\t\tstartActivity(i_Alert);\n\t\t\t}\n \t\n });\n \n example_location = (Button) findViewById(R.id.example_location);\n example_location.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent i_Alert = new Intent(AndroidExamples.this, Location.class);\n\t\t\t\tstartActivity(i_Alert);\n\t\t\t}\n \t\n });\n \n }", "@ReactMethod\n public void AlertIfWhitelist(String title, String message, String dontShowAgainText, String positiveText, String negativeText) {\n final SharedPreferences settings = this.getCurrentActivity().getSharedPreferences(\"Whitelist\",Context.MODE_PRIVATE);\n final String saveIfSkip = \"skipWhitelistMessage\";\n boolean skipMessage = settings.getBoolean(saveIfSkip, false);\n // Show dialog only when \"do not show again\" hasn't been enabled yet\n if (!skipMessage) {\n final SharedPreferences.Editor editor = settings.edit();\n // Check if intent of the android whitelist apps activity is callable\n for (Intent intent : AUTO_START_INTENTS){\n if (isCallable(intent)) {\n // Prepare dialog\n final AppCompatCheckBox dontShowAgain = new AppCompatCheckBox(this.getCurrentActivity());\n dontShowAgain.setText(dontShowAgainText);\n dontShowAgain.setLeft(20);\n dontShowAgain.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n editor.putBoolean(saveIfSkip, isChecked);\n editor.apply();\n }\n });\n\n final RelativeLayout layout = new RelativeLayout(this.getCurrentActivity());\n layout.setPadding(50,50,0,0);\n layout.addView(dontShowAgain);\n\n new AlertDialog.Builder(this.getCurrentActivity())\n .setTitle(title)\n .setMessage(message)\n .setView(layout)\n .setPositiveButton(positiveText, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n try {\n for (Intent intent : AUTO_START_INTENTS)\n if (isCallable(intent)) {\n editor.putBoolean(saveIfSkip, true);\n editor.apply();\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);\n reactContext.startActivity(intent);\n break;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n })\n .setNegativeButton(negativeText, null)\n .show();\n break;\n }\n }\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n btn_login_dia= findViewById(R.id.btnLogin);\n btn_login_dia.setOnClickListener(this);\n btn_signup_dia= findViewById(R.id.btnSignup);\n btn_signup_dia.setOnClickListener(this);\n mAuth = FirebaseAuth.getInstance();\n sp=getSharedPreferences(\"details1\",0);\n }", "@Override\n public void run() {\n if (sharedPreferences.contains(\"User-id\")) {\n loginUserId = sharedPreferences.getString(\"User-id\", null);\n if (loginUserId.equals(\"\") || loginUserId.equals(null)) {\n startActivity(new Intent(SplashScreen.this, LoginActivity.class));\n } else {\n startActivity(new Intent(SplashScreen.this, HomePageActivity.class));\n }\n } else {\n startActivity(new Intent(SplashScreen.this, LoginActivity.class));\n }\n }", "private void showUserPreferences() {\r\n MyAccount ma = state.getAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n \r\n mOriginName.setEnabled(!state.builder.isPersistent() && TextUtils.isEmpty(ma.getUsername()));\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary;\r\n if (ma.getUsername().length() > 0) {\r\n summary = new StringBuilder(ma.getUsername());\r\n } else {\r\n summary = new StringBuilder(this.getText(ma.alternativeTermForResourceId(R.string.summary_preference_username)));\r\n }\r\n mEditTextUsername.setDialogTitle(this.getText(ma.alternativeTermForResourceId(R.string.dialog_title_preference_username)));\r\n mEditTextUsername.setTitle(this.getText(ma.alternativeTermForResourceId(R.string.title_preference_username)));\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(!state.builder.isPersistent() && !ma.isUsernameValidToStartAddingNewAccount());\r\n \r\n boolean isNeeded = ma.canChangeOAuth();\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(isNeeded);\r\n if (isNeeded) {\r\n mOAuth.setTitle(R.string.title_preference_oauth);\r\n mOAuth.setSummary(ma.isOAuth() ? R.string.summary_preference_oauth_on : R.string.summary_preference_oauth_off);\r\n } else {\r\n mOAuth.setTitle(\"\");\r\n mOAuth.setSummary(\"\");\r\n }\r\n \r\n isNeeded = ma.getConnection().isPasswordNeeded();\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n if (isNeeded) {\r\n mEditTextPassword.setTitle(R.string.title_preference_password);\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n } else {\r\n summary = null;\r\n mEditTextPassword.setTitle(\"\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(isNeeded);\r\n \r\n int titleResId;\r\n boolean addAccountOrVerifyCredentialsEnabled = ma.isOAuth() || ma.getCredentialsPresent();\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (state.builder.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n if (!ma.isUsernameValidToStartAddingNewAccount()) {\r\n addAccountOrVerifyCredentialsEnabled = false;\r\n }\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n addAccountOrVerifyCredentials.setTitle(titleResId);\r\n addAccountOrVerifyCredentials.setSummary(summary);\r\n addAccountOrVerifyCredentials.setEnabled(addAccountOrVerifyCredentialsEnabled);\r\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n startActivity(new Intent(context, Preferences.class));\n }", "public void sendSettings()\n {\n Intent startSettings = new Intent(this, Main3Activity.class);\n startActivity(startSettings);\n }", "public void onClick(DialogInterface dialog, int which) {\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.USER_ID, AllKeys.DNF);\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.FIRST_NAME, AllKeys.DNF);\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.LAST_NAME, AllKeys.DNF);\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.MOBILE, AllKeys.DNF);\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.EMAIL, AllKeys.DNF);\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.CITY, AllKeys.DNF);\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.STATE, AllKeys.DNF);\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.COUNTRY, AllKeys.DNF);\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.PINCODE, AllKeys.DNF);\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.DATEOFBIRTH, AllKeys.DNF);\n CommonMethods.setPreference(DashBoardActivity.this, AllKeys.ADDRESS, AllKeys.DNF);\n Intent intent = new Intent(DashBoardActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n overridePendingTransition(R.anim.activity_open_translate, R.anim.activity_close_scale);\n Toast.makeText(DashBoardActivity.this, \"See you again!\", Toast.LENGTH_SHORT).show();\n }", "@Override\r\n public void onClick(View view) {\n String message = enterMessage.getText().toString().trim();\r\n\r\n //create the SharedPrefference instantiations, so that we are able to save the data:\r\n //primul arg e key, apoi mode (we can limit the accesibility from other apps with mode):\r\n// MODE_PRIVATE = ONLY THIS APP IS ABLE TO ACCESS THIS...(xml file)\r\n SharedPreferences sharedPreferences = getSharedPreferences(MESSAGE_ID, MODE_PRIVATE );\r\n\r\n\r\n //invoke the SharedPreferences editor:\r\n //ony \"editor\" will be able to access..\r\n SharedPreferences.Editor editor = sharedPreferences.edit();\r\n editor.putString(\"key_message\", message);\r\n\r\n editor.apply(); //this saves to disk;\r\n\r\n }", "public void settings_clicked(View view) {\n Intent intent = new Intent(this, SettingsActivity.class);\n // EditText editText = (EditText) findViewById(R.id.editText);\n // String message = \"final data\";\n // intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n }" ]
[ "0.6850515", "0.66788185", "0.66731703", "0.6401223", "0.6351545", "0.634208", "0.6332242", "0.6287975", "0.62188566", "0.6156017", "0.6149069", "0.61206746", "0.61083287", "0.6099163", "0.6072645", "0.6037411", "0.6036721", "0.60314494", "0.6022106", "0.60147953", "0.600566", "0.6004745", "0.5994295", "0.5989332", "0.5988613", "0.59749496", "0.5966394", "0.5955134", "0.5953669", "0.59529287", "0.5952021", "0.5924033", "0.5919363", "0.59186924", "0.5893427", "0.58927745", "0.5881632", "0.587372", "0.5871846", "0.58635134", "0.58597165", "0.58332396", "0.58320856", "0.58317584", "0.5828782", "0.58256996", "0.5810827", "0.57908064", "0.5788952", "0.578153", "0.5771002", "0.57609516", "0.57604134", "0.5743877", "0.57242143", "0.571907", "0.5717196", "0.5715922", "0.57158357", "0.5712467", "0.57106984", "0.57051665", "0.5702754", "0.5702512", "0.5696878", "0.5690723", "0.5686348", "0.5685197", "0.56814104", "0.56814104", "0.56748354", "0.567397", "0.56708753", "0.56637084", "0.56621826", "0.5658421", "0.5650875", "0.56427956", "0.5640422", "0.56345886", "0.5634298", "0.5631658", "0.5631658", "0.5631658", "0.5631658", "0.56240076", "0.56226385", "0.5622437", "0.5614015", "0.5613987", "0.5602673", "0.5598286", "0.5597191", "0.5596645", "0.5596286", "0.5589505", "0.5583221", "0.55781776", "0.557449", "0.5574368", "0.5570992" ]
0.0
-1
es similar a la anterior pero utiliza el objeto FirebaseAuth para poder permitirle al usuario ingresar sus datos y en caso de que exista el usuario wn la parte de autenticacion le permite ingresar
private void loguearUsuario() { final FirebaseAuth auth = FirebaseAuth.getInstance(); FirebaseUser user = auth.getCurrentUser(); // consigue el usuario final String email = editTextEmail.getText().toString().trim(); String password = editTextPassword.getText().toString().trim(); if (TextUtils.isEmpty(email)) { Toast.makeText(this, "Se debe ingresar un email", Toast.LENGTH_LONG).show(); return; } if (TextUtils.isEmpty(password)) { Toast.makeText(this, "Falta ingresar la contraseña", Toast.LENGTH_LONG).show(); return; } progressDialog.setMessage("Realizando consulta en linea..."); progressDialog.show(); firebaseAuth.signInWithEmailAndPassword(email, password) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { // la misma funcion que en el caso anterior pero para poder ingresar @Override public void onComplete(@NonNull Task<AuthResult> task) { //el oncomplete es para tener la comprobacion sea del campo del login o el singup if (task.isSuccessful()) { // si el usuario se encontraba creado entonces la tarea es exitosa int pos = email.indexOf("@"); userstring = email.substring(0, pos); //consigue el nombre del usuario Toast.makeText(Login.this, "Bienvenido: " + editTextEmail.getText(), Toast.LENGTH_LONG).show(); // consigue el email que habia sido asignado a la variable TextEmail Intent intencion = new Intent(getApplication(), UserView.class); // nueva actividad intencion.putExtra("user", email); // le pasa como dato al usuario ingresado a la proxima actividad startActivity(intencion); //hay que hacer el get del usuario en la parte principal // userapasar = user; loged = true; } else { loged = false; if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisiÛn Toast.makeText(Login.this, "Procesando", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(Login.this, "", Toast.LENGTH_LONG).show(); } } progressDialog.dismiss(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cadastrarUsuario(final Usuario usuario){\n mAuth = ConfiguracaoFirebase.getFirebaseAuth();\n mAuth.createUserWithEmailAndPassword(\n usuario.getEmail(),usuario.getSenha()\n ).addOnCompleteListener(\n this, new OnCompleteListener<AuthResult>() {\n //Verifica exceções e se o usuário se cadastrou\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Toast.makeText(getApplicationContext(),\"Usuário cadastrado com sucesso!\",Toast.LENGTH_SHORT).show();\n finish();\n //Convertendo email em base 64 para ser usado como uidPessoa\n try {\n String identificadorUsuario = Base64Custom.codificarBase64(FirebaseAuth.getInstance().getCurrentUser().getEmail());\n usuario.setUidPessoa(identificadorUsuario);\n usuario.setNome(FirebaseAuth.getInstance().getCurrentUser().getDisplayName());\n usuario.setEmail(FirebaseAuth.getInstance().getCurrentUser().getEmail());\n usuario.setPontos(1);\n usuario.salvar();\n cadastrarUsuario(usuario);\n logarUsuario(usuario);\n abrirTelaPrincipal();\n }catch (Exception e){\n e.printStackTrace();\n }\n }else {String excecao = \"\";\n try{\n throw task.getException();\n\n }catch (FirebaseAuthWeakPasswordException e){\n excecao = \"Digite uma senha forte!\";\n }catch (FirebaseAuthInvalidCredentialsException e){\n excecao = \"Por favor, digite um e-mail válido\";\n }catch (FirebaseAuthUserCollisionException e){\n excecao = \"esta conta já está cadastrada\";\n }catch (Exception e){\n excecao = \"Erro ao cadastrar usuário\" + e.getMessage();\n e.printStackTrace();\n }\n Toast.makeText(getApplicationContext(),excecao,Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void inicializarFirebaseAuth() {\n refAutenticacaofb = ConfiguracaoFirebase.metodoAutenticacaoFirebase();\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser currentUser = firebaseAuth.getCurrentUser();\n if (currentUser != null) {\n Log.w(TAG, \"Usuario Logeado\" + currentUser.getEmail());\n } else {\n Log.w(TAG, \"Usuario NO Logeado\");\n }\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n user = firebaseAuth.getCurrentUser(); // con esto traemos el estado\n\n if(user!=null){\n Log.d(\"TAG\",\"Esta logueado: con el id: \" + user.getUid());\n\n Toast.makeText(MainActivity.this, \"esta logueado\", Toast.LENGTH_SHORT).show();\n\n finish();\n\n //and open profile activity\n startActivity(new Intent(getApplicationContext(), Ingreso.class));\n\n\n }else{\n Log.d(\"TAG\",\"NO Esta logueado\");\n\n }\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(LGN, \"Resultado de Solicitud\");\n super.onActivityResult(requestCode, resultCode, data);\n try {\n Log.d(LGN, \"onActivityResult: \" + requestCode);\n if (requestCode == GOOGLE_SIGNIN_REQUEST) {\n Log.d(LGN, \"Respuesta de Google\");\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n Log.d(LGN, result.getStatus() + \"\");\n Log.d(LGN, resultCode + \"\");\n Log.d(LGN, data + \"\");\n if (result.isSuccess()) {\n Log.d(LGN, \"Respuesta Buena\");\n GoogleSignInAccount user = result.getSignInAccount();\n AuthCredential credential = GoogleAuthProvider.getCredential(user.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(LGN, \"Login con Google correcta: \" + task.isSuccessful());\n if (task.isSuccessful()) {\n isNew = task.getResult().getAdditionalUserInfo().isNewUser();\n Log.d(LGN, \"Antiguedad: \" + (isNew ? \"Nuevo\" : \"Antiguo\"));\n if (isNew) {\n Log.d(LGN, \"Es nuevo\");\n FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();\n uid = currentUser.getUid();\n\n for (UserInfo profile : currentUser.getProviderData()) {\n correo = profile.getEmail();\n }\n\n Usuario usuario = new Usuario();\n usuario.setNombre(currentUser.getDisplayName());\n usuario.setCorreo(correo);\n usuario.setExp(0);\n usuario.setMonedas(0);\n usuario.setAvatar(currentUser.getPhotoUrl() != null ? currentUser.getPhotoUrl().toString() : null);\n\n DatabaseReference usuarioData = FirebaseDatabase.getInstance().getReference(\"usuario\");\n usuarioData.child(currentUser.getUid()).setValue(usuario)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n createColecciones(uid);\n Log.d(LGN, \"Usuario con Google Creado\");\n Toast.makeText(LoginActivity.this, \"Usuario Creado\", Toast.LENGTH_SHORT).show();\n } else {\n Log.d(LGN, \"Error en la creacion\");\n Log.e(LGN, \"onFailure\", task.getException());\n }\n }\n });\n\n /* Intent home = new Intent(LoginActivity.this, AvatarActivity.class);\n startActivity(home);\n finish();*/\n\n } else {\n Log.d(LGN, \"Es antiguo\");\n }\n } else {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(LGN, \"Login con Google incorrecta:\", task.getException());\n Toast.makeText(LoginActivity.this, \"Autenticacion Fallida.\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n } else {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(LGN, \"Sesion con Google Errada!\");\n }\n } else if (FACEBOOK_SIGNIN_REQUEST == requestCode) {\n Log.d(LGN, \"Respuesta de Facebook\");\n mCallbackManager.onActivityResult(requestCode, resultCode, data);\n }\n } catch (Throwable t) {\n try {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(TAG, \"onThrowable: \" + t.getMessage(), t);\n if (getApplication() != null)\n Toast.makeText(getApplication(), t.getMessage(), Toast.LENGTH_LONG).show();\n } catch (Throwable x) {\n }\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) { //el oncomplete es para tener la comprobacion sea del campo del login o el singup\n\n if (task.isSuccessful()) {\n // si el usuario se encontraba creado entonces la tarea es exitosa\n\n int pos = email.indexOf(\"@\");\n userstring = email.substring(0, pos); //consigue el nombre del usuario\n Toast.makeText(Login.this, \"Bienvenido: \" + editTextEmail.getText(), Toast.LENGTH_LONG).show(); // consigue el email que habia sido asignado a la variable TextEmail\n Intent intencion = new Intent(getApplication(), UserView.class); // nueva actividad\n intencion.putExtra(\"user\", email); // le pasa como dato al usuario ingresado a la proxima actividad\n startActivity(intencion); //hay que hacer el get del usuario en la parte principal\n // userapasar = user;\n loged = true;\n\n } else {\n loged = false;\n\n if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisiÛn\n\n Toast.makeText(Login.this, \"Procesando\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(Login.this, \"\", Toast.LENGTH_LONG).show();\n }\n }\n progressDialog.dismiss();\n }", "private void signIn(){\n // get text and email strings from fields\n String email = mEmailField.getText().toString();\n String password = mPasswordField.getText().toString();\n\n if(TextUtils.isEmpty(email) || TextUtils.isEmpty(password)) { // is pass/user empty?\n // if so alert user via toast\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.empty_field_error)\n , Toast.LENGTH_LONG).show();\n }\n\n else { // else sign in via auth\n mFirebaseAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(\n new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n // alert user on complete if combination is wrong\n if (!task.isSuccessful()) {\n Toast.makeText(LoginActivity.this,\n getResources().getString\n (R.string.login_wrong_combination_error)\n ,Toast.LENGTH_LONG).show();\n }\n\n else {\n // else check if a profile exists for the user, if not create one\n\n // get current user\n final FirebaseUser user = mFirebaseAuth.getCurrentUser();\n\n // Attach a listener to read the data\n databaseReference.child(user.getUid())\n .addListenerForSingleValueEvent(\n new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n User userInfo = dataSnapshot.getValue(User.class);\n\n // null make a new one\n if (userInfo == null)\n {\n userInfo = new User();\n\n // update database using user id\n databaseReference.child\n (user.getUid()).setValue(userInfo);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.db_error_text)\n + databaseError.getCode(),\n Toast.LENGTH_LONG).show();\n }\n });\n }\n }\n });\n }\n }", "private void firebaseAuthWithGoogle(AuthCredential credential) {\n\n\n try {\n// showProgressDialog();\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Utility.logData(\"signInWithCredential:onComplete:\" + task.isSuccessful());\n if (!task.isSuccessful()) {\n Utility.logData(\"signInWithCredential\" + task.getException().getMessage());\n task.getException().printStackTrace();\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n } else {\n// createUserInFirebaseHelper(mUser);\n\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n\n\n mDatabase.child(AppStringConstants.USER_ENTITY).\n child(Utility.encodeEmail(mUser.getEmail())).child(AppStringConstants.PROFILE_ENTITY).\n addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n try {\n if (snapshot.getValue() != null) {\n try {\n\n mUser = snapshot.getValue(UserModel.class);\n SessionManager.getInstance().createUser(mUser);\n SessionManager.getInstance().setCurrentuserRole(mUser.getRole());\n\n\n Utility.logData(\"logging user \\n\" + Objects.requireNonNull(mUser).toString());\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else {\n UserModel model = new UserModel();\n model.setEmail(mUser.getEmail());\n model.setName(mUser.getName());\n model.setPhoto(mUser.getPhoto());\n model.setIdToken(mUser.getIdToken());\n model.setRole(UserRole.USER);\n model.setCity(mUser.getCity());\n model.setSpecialisation(mUser.getSpecialisation());\n mDatabase.child(AppStringConstants.USER_ENTITY).\n child(Utility.encodeEmail(model.getEmail())).child(AppStringConstants.PROFILE_ENTITY).\n setValue(model);\n SessionManager.getInstance().createUser(model);\n SessionManager.getInstance().setCurrentuserRole(model.getRole());\n\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n\n });\n\n\n startMainActivity();\n\n\n Utility.showLongToast(\"Login successful\");\n\n\n }\n// hideProgressDialog();\n }\n });\n }catch (Exception e){\n Utility.logExceptionData(e);\n Utility.hideLoader(this);\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n\n Toast.makeText(RegistroActivity.this,\"Se ha registrado el usuario con el email: \"+ TextEmail.getText(),Toast.LENGTH_LONG).show();\n Intent intent = new Intent(RegistroActivity.this, LoginActivity.class);\n startActivity(intent);\n }\n else{\n if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisión\n Toast.makeText(RegistroActivity.this, \"Ese usuario ya existe \", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(RegistroActivity.this, \"No se pudo registrar el usuario \", Toast.LENGTH_LONG).show();\n }\n }\n progressDialog.dismiss();\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBarlogin.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n inputPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(MainActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n } else {\n FirebaseUser user = mAuth.getCurrentUser();\n String email = user.getEmail();\n String uid = user.getUid();\n HashMap<Object,String> hashMap = new HashMap<>();\n hashMap.put(\"email\", email);\n hashMap.put(\"uid\", uid);\n hashMap.put(\"onlineStatus\", \"online\");\n hashMap.put(\"typingTo\",\"noOne\");\n hashMap.put(\"username\", \"\");\n hashMap.put(\"phone\", \"\");\n hashMap.put(\"image\",\"\");\n hashMap.put(\"cover\",\"\");\n // path to store data\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference reference = database.getReference(\"Users\");\n reference.child(uid).setValue(hashMap);\n Intent intent = new Intent(MainActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(LoginActivity.this,\n getResources().getString\n (R.string.login_wrong_combination_error)\n ,Toast.LENGTH_LONG).show();\n }\n\n else {\n // else check if a profile exists for the user, if not create one\n\n // get current user\n final FirebaseUser user = mFirebaseAuth.getCurrentUser();\n\n // Attach a listener to read the data\n databaseReference.child(user.getUid())\n .addListenerForSingleValueEvent(\n new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n User userInfo = dataSnapshot.getValue(User.class);\n\n // null make a new one\n if (userInfo == null)\n {\n userInfo = new User();\n\n // update database using user id\n databaseReference.child\n (user.getUid()).setValue(userInfo);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.db_error_text)\n + databaseError.getCode(),\n Toast.LENGTH_LONG).show();\n }\n });\n }\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_login);\n initViews();\n buttonRegister.setOnClickListener(this);\n buttonlog1.setOnClickListener(this);\n\n firebaseAuth = FirebaseAuth.getInstance();\n\n progressDialog = new ProgressDialog(this);\n\n users = FirebaseDatabase.getInstance().getReference(\"users\");\n\n //usuario = firebaseAuth.getCurrentUser().getEmail();\n\n String email = editTextEmail.getText().toString();\n String password= editTextPassword.getText().toString();\n }", "private void registerUser(){\n mAuth.createUserWithEmailAndPassword(correo, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //mapa de valores\n Map<String, Object> map = new HashMap<>();\n map.put(\"name\",name);\n map.put(\"email\",correo);\n map.put(\"password\",password);\n map.put(\"birthday\",cumple);\n map.put(\"genre\",genre);\n map.put(\"size\",size);\n //obtenemos el id asignado por la firebase\n String id= mAuth.getCurrentUser().getUid();\n //pasamos el mapa de valores\n mDatabase.child(\"Users\").child(id).setValue(map).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task2) {\n //validams que la tarea sea exitosa\n if(task2.isSuccessful()){\n startActivity(new Intent(DatosIniciales.this, MainActivity.class));\n //evitamos que vuelva a la pantalla con finsh cuando ya se ha registrado\n finish();\n }else{\n Toast.makeText(DatosIniciales.this, \"Algo fallo ups!!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }else{\n Toast.makeText(DatosIniciales.this, \"No pudimos completar su registro\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n //delete user just created\n user.delete();\n //prompt user to create account\n Toast.makeText(MainActivity.this, \"No Email Exist \", Toast.LENGTH_SHORT).show();\n Toast.makeText(MainActivity.this, \"Create New Account \", Toast.LENGTH_SHORT).show();\n } else {\n // if failed, email already exist and move on to verify passoword\n //Toast.makeText(MainActivity.this, \"Loggin In\", Toast.LENGTH_SHORT).show();\n signUserIn(emailX);\n }\n\n }", "private void reauthenticate() {\n FirebaseUser firebaseUser = mAuth.getCurrentUser();\n\n if (firebaseUser == null) {\n return;\n }\n\n AuthCredential credential = EmailAuthProvider.getCredential(\n user.getEmail(),\n user.getPassword()\n );\n\n firebaseUser.reauthenticate(credential)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n updateData();\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n FirebaseCrash.report(e);\n Toast.makeText(\n getContext(),\n e.getMessage(),\n Toast.LENGTH_SHORT\n ).show();\n }\n });\n }", "private void checkFirebaseAuth(NavigationView view){\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n // Name, email address, and profile photo Url\n String user_name = user.getDisplayName();\n String email = user.getEmail();\n photoUrl = user.getPhotoUrl();\n user_id = user.getUid();\n\n // Check if user's email is verified\n boolean emailVerified = user.isEmailVerified();\n\n // The user's ID, unique to the Firebase project. Do NOT use this value to\n // authenticate with your backend server, if you have one. Use\n // FirebaseUser.getToken() instead.\n View header = view.getHeaderView(0);\n TextView UserName = header.findViewById(R.id.user_name);\n TextView UserEmail = header.findViewById(R.id.user_email);\n ImageView ProfilePic = header.findViewById(R.id.profile_pic);\n UserName.setText(user_name);\n UserEmail.setText(email);\n if (photoUrl != null) {\n Picasso.with(this).load(photoUrl).into(ProfilePic);\n }\n }\n if (user == null){\n View header = view.getHeaderView(0);\n TextView UserName = header.findViewById(R.id.user_name);\n TextView UserEmail = header.findViewById(R.id.user_email);\n ImageView ProfilePic = header.findViewById(R.id.profile_pic);\n UserName.setText(getText(R.string.def_user));\n UserEmail.setText(getText(R.string.def_email));\n ProfilePic.setImageResource(R.drawable.def_icon);\n }\n\n }", "public void recogerUsuarioFirebase() {\n //if user is not valid\n FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();\n if (currentUser == null) {\n startActivity(StartActivity.createIntent(this));\n finish();\n return;\n } else {\n uniqueID = currentUser.getUid();\n }\n }", "private void metodoSalvarUsuarioFirebase(final Usuarios variavelClasseUsuarios) {\n\n refAutenticacaofb = ConfiguracaoFirebase.metodoAutenticacaoFirebase();\n refAutenticacaofb.createUserWithEmailAndPassword(variavelClasseUsuarios.getEmail(),\n variavelClasseUsuarios.getSenha()).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n\n idUsuario = task.getResult().getUser().getUid();\n variavelClasseUsuarios.setId(idUsuario);\n variavelClasseUsuarios.salvarUsuario();\n\n if(pegarTipoUsuarioSwitch() == \"Cliente\"){\n\n startActivity(new Intent(CadastroUsuario.this, Home.class));\n finish();\n Toast.makeText(CadastroUsuario.this, \"Usuário salvo com sucesso\", Toast.LENGTH_LONG).show();\n }else{\n\n startActivity(new Intent(CadastroUsuario.this, PainelEmpresa.class));\n finish();\n Toast.makeText(CadastroUsuario.this, \"Empresa inserida com sucesso!\", Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n\n\n }\n });\n\n }", "private void registerUserToFirebaseAuth() {\n Utils.showProgressDialog(this);\n Task<AuthResult> task = mAuth.createUserWithEmailAndPassword(etEmail.getText().toString().trim(), etPassword.getText().toString().trim());\n task.addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Utils.dismissProgressDialog();\n if (task.isSuccessful()) {\n String firebaseId = task.getResult().getUser().getUid();\n\n // Storage Image to Firebase Storage.\n addProfileImageToFirebaseStorage(firebaseId);\n\n } else {\n Utils.toast(context, \"Some Error Occurs\");\n }\n }\n });\n }", "@Override\n public void onAuthenticated(AuthData authData) {\n Map<String, String> map = new HashMap<>();\n map.put(\"provider\", authData.getProvider());\n if(authData.getProviderData().containsKey(\"email\")) {\n map.put(\"email\", authData.getProviderData().get(\"email\").toString());\n }\n mRef.child(\"users\").child(authData.getUid()).setValue(map);\n final Intent startIntent = new Intent(getActivity(), HomeActivity.class);\n startIntent.putExtra(\"START_POS\", 0);\n startActivity(startIntent);\n }", "@Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n ArrayList<Usuario> usuarioArrayList = new ArrayList<>();\n for (DataSnapshot child : dataSnapshot.getChildren()) {\n Usuario usuario = child.getValue(Usuario.class);\n usuarioArrayList.add(usuario);\n }\n\n // Comparar cedula del usuario nuevo con la de usuarios registrados\n for (int i = 0; i < usuarioArrayList.size(); i++) {\n String docu = usuarioArrayList.get(i).getDocumentoIdentidad();\n if (estudiante.getDocumentoIdentidad().equals(docu)) {\n estaRegistrado = true;\n break;\n }\n }\n\n // Verificar si el usuario cumple los requisitos para ser registrado\n if (!nombre.equals(\"\") && !codigo.equals(\"\") && !documentoIdentidad.equals(\"\") && !estaRegistrado &&\n !clave.equals(\"\") && clave.equals(confirmarClave) && condicionesRButton.isChecked()) {\n FirebaseDatabase.getInstance().getReference().child(\"estudiantes\").child(id).setValue(estudiante);\n Intent i = new Intent(RegistroActivity.this, MenuActivity.class);\n\n // Pasar usuario a la siguiente actividad\n i.putExtra(\"usuario\", estudiante);\n\n // Cerrar actividades anteriores\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n startActivity(i);\n } else if (!clave.equals(confirmarClave)) {\n runOnUiThread(\n () -> {\n Toast.makeText(RegistroActivity.this, \"Las claves no coinciden\", Toast.LENGTH_SHORT).show();\n }\n );\n } else if (estaRegistrado) {\n runOnUiThread(\n () -> {\n Toast.makeText(RegistroActivity.this, \"El usuario ya está registrado\", Toast.LENGTH_SHORT).show();\n }\n );\n } else {\n runOnUiThread(\n () -> {\n Toast.makeText(RegistroActivity.this, \"Rellene los campos y acepte los términos y condiciones\", Toast.LENGTH_SHORT).show();\n }\n );\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser firebaseUser = firebaseOps.getCurrentFirebaseUser();\n if (firebaseUser.isEmailVerified()) {\n createUserObjectInDatabase(firebaseUser.getUid());\n\n } else {\n Toast.makeText(MainActivity.this, \"Please verify your email first\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Toast.makeText(this, getResources().getString(R.string.autenticandoseGoogle) + \" \" + acct.getId(), Toast.LENGTH_SHORT).show();\n\n showProgressDialog();\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticadoGoogle), Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user);\n finish();\n } else {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticacionFallida), Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n hideProgressDialog();\n\n\n }\n });\n }", "@Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.child(user).exists()) {\n // Get user information\n mDialog.dismiss();\n User currentUser = dataSnapshot.child(user).getValue(User.class);\n if (currentUser.getPassword().equals(password)) {\n Toast.makeText(MainActivity.this, \"Sign In Successfully !\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(MainActivity.this, HomeActivity.class).putExtra(\"name\", currentUser.getName()).putExtra(\"rollNo\", currentUser.getRollNo()));\n finish();\n } else {\n Toast.makeText(MainActivity.this, \" Sign In Failed !!\\nCheck Credentials\", Toast.LENGTH_SHORT).show();\n }\n } else {\n mDialog.dismiss();\n Toast.makeText(getApplicationContext(), \"User not exist inside Database\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onResume() {\n if(currentUser != null){\n btnEnviar.setEnabled(false);\n DatabaseReference referenciaTipo = FirebaseDatabase.getInstance().getReference().child(\"usuarios\").child(currentUser);\n referenciaTipo.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Usuarios usuarios = dataSnapshot.getValue(Usuarios.class);\n nombreUsuarioLog = usuarios.getNombre();\n textNombre.setText(nombreUsuarioLog);\n btnEnviar.setEnabled(true);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }else{\n returnLogin();\n }\n super.onResume();\n }", "@Override\n public void onClick(View v) {\n if (!validate(\"\" + username.getText())) {\n// Toast.makeText(activity, \"Email nn valid\", Toast.LENGTH_LONG).show();\n Log.w(\"EMAIL_PASS\", \"Email nn valid\");\n }\n else if (password.getText().length() < 6){\n Log.w(\"ERROR_PASS\", \"password must be > 6\");\n } else{\n mFirebaseAuth.signInWithEmailAndPassword(\"\" + username.getText(), \"\" + password.getText())\n .addOnCompleteListener(activity, task -> {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"signInWithEmail\", \"signInWithEmail:success\");\n FirebaseUser user = mFirebaseAuth.getCurrentUser();\n startActivity(new Intent(activity, home.class));\n finish();\n// updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"FAILER AUTH\", \"signInWithEmail:failure\", task.getException());\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n// updateUI(null);\n // ...\n }\n//\n });\n // Log.w(\"FIREBASE\", String.valueOf(mFirebaseAuth.getCurrentUser()));\n // Toast.makeText(getApplicationContext(), \"\" + mFirebaseAuth.getUid(),Toast.LENGTH_LONG).show();\n }\n }", "public static FirebaseAuth getFirebaseAutenticacao() {\n if (referenciaAutenticacao == null) {\n referenciaAutenticacao = FirebaseAuth.getInstance();\n }\n\n return referenciaAutenticacao;\n }", "private void authUser(String email, String password){\n firebaseAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Log.d(TAG, \"onComplete: user logged in successfully\");\n Snackbar.make(view, \"User has logged in\", Snackbar.LENGTH_LONG).show();\n goToMainActivity();\n }\n if(!task.isSuccessful()){\n Log.d(TAG, \"onComplete: user's credentials're incorrect\");\n Snackbar.make(view, \"Login or password is incorrect\", Snackbar.LENGTH_LONG).show();\n }\n }\n });\n }", "public void registerNewEmail(final String userID, String password){\n\n showDialog();\n\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(userID, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(\"파베 아이디 등록\", \"유저 이메일 등록:onComplete:\" + task.isSuccessful());\n\n if (task.isSuccessful()){\n Log.d(\"파베 아이디 등록\", \"onComplete: Auth상태: \" + FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n //insert some default data\n User user = new User();\n user.setEmail(userID);\n user.setUsername(userID.substring(0, userID.indexOf(\"@\")));\n user.setUser_id(FirebaseAuth.getInstance().getUid());\n\n FirebaseFirestoreSettings settings = new FirebaseFirestoreSettings.Builder()\n .setTimestampsInSnapshotsEnabled(true)\n .build();\n mDb.setFirestoreSettings(settings);\n\n DocumentReference newUserRef = mDb\n .collection(getString(R.string.collection_users))\n .document(FirebaseAuth.getInstance().getUid());\n\n newUserRef.set(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideDialog();\n\n if(task.isSuccessful()){\n redirectLoginScreen();\n }else{\n View parentLayout = findViewById(android.R.id.content);\n Snackbar.make(parentLayout, \"파베 가입 오류1\", Snackbar.LENGTH_SHORT).show();\n }\n }\n });\n\n }\n else {\n View parentLayout = findViewById(android.R.id.content);\n Snackbar.make(parentLayout, \"파베 가입 오류2\", Snackbar.LENGTH_SHORT).show();\n hideDialog();\n }\n\n // ...\n }\n });\n }", "private void onSignIn() {\n\n //get the signed in user's info from the db and\n //turn it into a user object.\n db.collection(\"users\").document(email).get()\n .addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {\n @Override\n public void onSuccess(DocumentSnapshot documentSnapshot) {\n user = documentSnapshot.toObject(User.class);\n goToDoctors();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(\"MainActivity\", \"Couldn't get user's data\", e);\n Toast.makeText(getApplicationContext(), \"Data retrieval failed.\",\n Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "@Override\n public void onClick(View v)\n {\n String inputEmail = email.getText().toString();\n String inputPasswd = passwd.getText().toString();\n // Login\n fbAuth\n .signInWithEmailAndPassword(inputEmail, inputPasswd)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>()\n {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n // Login error\n if (!task.isSuccessful())\n {\n // Snackbar\n Snackbar.make(\n btnLog,\n getString(R.string.error_ema_or_pass),\n Snackbar.LENGTH_LONG\n // OK button in the Snackbar\n ).setAction(R.string.action_ok, new View.OnClickListener()\n {\n @Override\n public void onClick(View v)\n {\n // Dismiss the Snackbar\n }\n\n }).show();\n } else\n {\n // UID of logged-in user\n String uid = fbAuth.getCurrentUser().getUid();\n // Firebase Instance\n fbDatabase = FirebaseDatabase.getInstance();\n // Reference to logged-in user\n DatabaseReference userReference = fbDatabase.getReference()\n .child(\"usuarios/\" + uid);\n\n userReference.addListenerForSingleValueEvent(new ValueEventListener()\n {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot)\n {\n if (dataSnapshot.hasChildren())\n {\n // Get logged user data\n /*User user = dataSnapshot.getValue(User.class);\n // Crate a Bundle\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"_user\", user);*/\n // Main Activity\n Intent intent = new Intent(\n LoginActivity.this,\n MainActivity.class\n );\n // Storage data in the Intent\n /*intent.putExtras(bundle);*/\n // Launch the intent\n startActivity(intent);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError)\n {\n\n }\n });\n }\n }\n });\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n //inicio de sesion exitoso\n //Recuperacion de los datos del usuario logueado\n FirebaseUser user = mAuth.getCurrentUser();\n //llamado a la vista inicial de usuario autenticado\n startActivity(new Intent(Login.this,Principal.class));\n finish();\n\n } else {\n // Fallo el inicio de sesion con firebase.\n Toast.makeText(Login.this, R.string.errorInicioSesion,\n Toast.LENGTH_SHORT).show();\n\n }\n\n }\n });\n }", "private void attemptLogin2(String emailString,String passwordString) {\n FirebaseDatabase skoovyDatabase = FirebaseDatabase.getInstance();\r\n // Get a reference to our userInfo node\r\n DatabaseReference currentSkoovyUsers = skoovyDatabase.getReference(\"userInfo\");\r\n mAuth.signInWithEmailAndPassword(email, password)\r\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n //Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\r\n Toast.makeText(loginActivity.this, \"login successful\",\r\n Toast.LENGTH_SHORT).show();\r\n // If sign in fails, display a message to the user. If sign in succeeds\r\n // the auth state listener will be notified and logic to handle the\r\n // signed in user can be handled in the listener.\r\n if (!task.isSuccessful()) {\r\n //Log.w(TAG, \"signInWithEmail:failed\", task.getException());\r\n Toast.makeText(loginActivity.this, \"login failed\",\r\n Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n // ...\r\n }\r\n });\r\n }", "private void setUpFirebaseAuthentication() {\n authentication = FirebaseAuth.getInstance();\n authStateListener = firebaseAuth -> {\n currentUser = firebaseAuth.getCurrentUser();\n if (currentUser != null) {\n Log.d(TAG, \"Success\");\n Intent intent = new Intent(SignInActivity.this, HomePageActivity.class);\n startActivity(intent);\n\n } else {\n Log.d(\"HIRHEFOIH\", \"signed out\");\n }\n };\n }", "private void finishLoginAndRegistration() {\n if (mAuth.getCurrentUser() == null){\n Log.d(\"Login\", \"the user closed firbaseUI and didnt login / register\" );\n return;\n\n }\n\n //now lets check if the user is already in our database\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference usersDatabase = database.getReference(\"users\");\n try{\n ((ProgressBar)findViewById(R.id.loadprofileProgressBar)).setVisibility(View.VISIBLE); //display the progress bar\n\n //remove the buttons while loading data (added with nitzan & asaf 6.6.2017)\n ((Button) findViewById(R.id.loginButton)).setVisibility(View.INVISIBLE);\n ((Button) findViewById(R.id.loginButton)).setEnabled(false);\n ((Button) findViewById(R.id.logoutButton)).setVisibility(View.INVISIBLE);\n ((Button) findViewById(R.id.logoutButton)).setEnabled(false);\n\n\n }catch (NullPointerException e){\n //could not load the progress bar. probably was logged in not through home fragment\n }\n\n\n //using listener get all the users with the same uid\n usersDatabase.orderByKey().equalTo(mAuth.getCurrentUser().getUid()).addListenerForSingleValueEvent(new ValueEventListener(){\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n DatabaseReference mDatabase;\n\n //check if the snapshot we got back is not empty (meaning there is no user with uid like this)\n if (snapshot.hasChild(mAuth.getCurrentUser().getUid())){\n //we found the user in the database\n\n // set the current user to the user we found\n currentLoggedUser = snapshot.child(mAuth.getCurrentUser().getUid()).getValue(TaramtiDamUser.class); //get an object of the user\n Log.d(TAG,\"currentLoggedUser now contain the logged user profile: \"+currentLoggedUser.getFullName());\n Log.d(TAG,\"currentLoggedUser now contain the logged user profile: \"+currentLoggedUser.getEmail());\n //displayProfileAfterLoadingfromDtabase();\n try{\n ((ProgressBar)findViewById(R.id.loadprofileProgressBar)).setVisibility(View.GONE); //remove the progress bar\n\n }catch (NullPointerException e){\n //could not load the progress bar. probably was logged in not through home fragment\n }\n doThingsAfterLogin();\n mDatabase = FirebaseDatabase.getInstance().getReference();\n String instanceId = FirebaseInstanceId.getInstance().getToken();\n if (instanceId != null) {\n mDatabase.child(\"users\")\n .child(currentLoggedUser.getuid())\n .child(\"instanceId\")\n .setValue(instanceId);\n }\n\n }\n else{\n //user is not in database -> so do a registration\n Log.d(TAG,\"user was not found in datatbase\");\n\n // create the user a new profile and insert him to the database\n\n currentLoggedUser = new TaramtiDamUser(mAuth.getCurrentUser().getUid(), mAuth.getCurrentUser().getDisplayName(), mAuth.getCurrentUser().getEmail() , \"\", \"A+\" );\n mDatabase = FirebaseDatabase.getInstance().getReference();\n mDatabase.child(\"users\").child(currentLoggedUser.getuid()).setValue(currentLoggedUser);\n\n Log.d(TAG, \"new user was created in database\");\n\n //displayProfileAfterLoadingfromDtabase();\n doThingsAfterLogin();\n String instanceId = FirebaseInstanceId.getInstance().getToken();\n if (instanceId != null) {\n mDatabase.child(\"users\")\n .child(currentLoggedUser.getuid())\n .child(\"instanceId\")\n .setValue(instanceId);\n }\n\n try{\n // ((ProgressBar)findViewById(R.id.loadprofileProgressBar)).setVisibility(View.GONE); //remove the progress bar\n\n }catch (NullPointerException e){\n //could not load the progress bar. probably was logged in not through home fragment\n }\n Toast.makeText(MainActivity.this, R.string.auth_registration_completed, Toast.LENGTH_SHORT).show(); // display message\n\n }\n\n }\n @Override public void onCancelled(DatabaseError error) { }\n\n\n });\n\n }", "private void signInUidPass(){\n mAuth.signInWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(Constants.TAG, \"signInwithEmail: onComplete:\" + task.isSuccessful());\n if(!task.isSuccessful()){\n Log.w(Constants.TAG, \"signInwithEmail: failed\", task.getException());\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n inputPassword.setError(getString(R.string.password_requirement));\n } else {\n Toast.makeText(getActivity(), \"Masukkan Data dengan Benar\", Toast.LENGTH_LONG).show();\n }\n } else {\n if (auth.getCurrentUser() != null) {\n Toast.makeText(getActivity(), \"Login Berhasi\", Toast.LENGTH_SHORT).show();\n }\n else{\n System.out.println(\"NO LOGGED\");\n }\n }\n }", "public void authenticateemail(final String email, final String pass){\n\n mAuth2.createUserWithEmailAndPassword(email, pass)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"MAIN\", \"createUserWithEmail:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n linking(email,pass);\n //Log.d(\"MAIN\", \"yupyup\"+user.getUid());\n\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"MAIN\", \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(otherinfoActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n\n }", "private void setFirebase() {\n auth = FirebaseAuth.getInstance();\n\n //get current user\n final FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n authListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user == null) {\n // user auth state is changed - user is null\n // launch login activity\n startActivity(new Intent(MainActivity.this, LoginActivity.class));\n finish();\n }\n }\n };\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n passwordW.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(SignUpActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n } else {\n\n FirebaseUser user = auth.getCurrentUser();\n UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()\n .setDisplayName(dpName)\n .build();\n\n user.updateProfile(profileUpdates)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(SignUpActivity.this, \"User Created! Welcome to Udghosh.\", Toast.LENGTH_LONG).show();\n }\n else {\n Toast.makeText(SignUpActivity.this, \"Cannot connect to servers right now.\", Toast.LENGTH_LONG).show();\n }\n }\n });\n mDatabase.child(\"app\").child(\"users\").child(user.getUid()).setValue(phoneNumber);\n\n Intent intent = new Intent(SignUpActivity.this, HomeActivity.class);\n startActivity(intent);\n finish();\n }\n }", "private void setupFirebaseAuth(){\n Log.d(TAG, \"setupFirebaseAuth: setting up firebase auth.\");\n\n mAuth = FirebaseAuth.getInstance();\n mFirebaseDatabase = FirebaseDatabase.getInstance();\n myRef = mFirebaseDatabase.getReference();\n\n mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n if (user != null) {\n // User is signed in\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n } else {\n // User is signed out\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n }\n // ...\n }\n };\n\n\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n user = firebaseAuth.getCurrentUser();\n if (user != null) {\n // User is signed in\n Log.d(\"LoginActivity\", \"onAuthStateChanged:signed_in:\" + user.getUid());\n jump_main();\n } else {\n // User is signed out\n Log.d(\"LoginActivity\", \"onAuthStateChanged:signed_out\");\n //signOut();\n tv_name.setText(\"\");\n tv_email.setText(\"\");\n boolean_google = false;\n }\n // [START_EXCLUDE]\n updateUI(user);\n // [END_EXCLUDE]\n }", "@Override\n public void onDataChange(DataSnapshot snapshot) {\n if (snapshot.hasChild(id)) {\n\n //load User data\n FirebaseManager firebaseManager = new FirebaseManager(\"user\",getApplicationContext());\n firebaseManager.getUser(\"facebook\", id);\n\n Intent intent = new Intent(getApplicationContext(), UserPrimaryActivity.class);\n startActivity(intent);\n\n\n //gotta check if Authority\n\n } else {\n\n JSONParser jsonParser = new JSONParser();\n\n //if not registered then we need some more details\n Intent intent = new Intent(getApplicationContext(), UserFormActivity.class);\n intent.putExtras(jsonParser.makePreliminaryUserData(jsonObject,\"facebook\"));\n startActivity(intent);\n\n }\n }", "private void setupFirebaseAuth(){\n Log.d(TAG, \"setupFirebaseAuth\");\n mAuth = FirebaseAuth.getInstance();\n fbaseDB = FirebaseDatabase.getInstance();\n dbRef = fbaseDB.getReference();\n\n mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n if(user != null){\n //somebody signed in\n Log.d(TAG, \"onAuthStateChanged:signed_in\" + user.getUid());\n dbRef.addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(checkUsernamExists(username.getText().toString(), dataSnapshot)){\n Toast.makeText(SignUp.this,\"Signup SUCCESSFUL\",Toast.LENGTH_SHORT).show();\n } else{\n\n mAuth.signOut();\n }\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n }\n );\n } else{\n //nobodys here\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n }\n }\n };\n }", "private void authSignInResult() {\n userEmail = sharedPreferences.getString(getString(R.string.shared_prefs_key_email), \"\");\n rref.orderByChild(getString(R.string.firebase_key_email)).equalTo(userEmail).addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot appleSnapshot : dataSnapshot.getChildren()) {\n\n member = appleSnapshot.getValue(Member.class);\n String loginType = member.getLoginType().trim();\n if (loginType.equals(getString(R.string.login_type_auth))) {\n String key = appleSnapshot.getKey();\n editor.putString(getString(R.string.shared_prefs_key_firebasekey), key);\n firebaseKey = key;\n getUserDetailsFromFirebase();\n userName = member.getUsername();\n String userPhotoUrlString = member.getPhotoUrl();\n editor.putString(getString(R.string.shared_prefs_key_user_photo_url), userPhotoUrlString);\n editor.putString(getString(R.string.shared_prefs_key_username), userName);\n editor.apply();\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n }\n );\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n //delete user just created\n user.delete();\n //prompt user to create account\n Toast.makeText(MainActivity.this, \"No Email Exist \", Toast.LENGTH_SHORT).show();\n Toast.makeText(MainActivity.this, \"Create New Account \", Toast.LENGTH_SHORT).show();\n } else {\n // if failed, email already exist and move on to verify passoword\n //Toast.makeText(MainActivity.this, \"Loggin In\", Toast.LENGTH_SHORT).show();\n sentReset(finalInputUsername);\n }\n }", "private void registerUser(final String email, final String password) {\n\n progressDialog.show();\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, dismiss dialog and start register activity\n progressDialog.dismiss();\n FirebaseUser user = mAuth.getCurrentUser();\n\n String email = user.getEmail();\n String uid = user.getUid();\n String username = mUserNameEdt.getText().toString().trim();\n int selectedId = radioGroup.getCheckedRadioButtonId();\n RadioButton radioSexButton = findViewById(selectedId);\n String gender = radioSexButton.getText().toString();\n\n //store the registered user info into firebase using Hashmap\n HashMap<Object, String> hashMap = new HashMap<>();\n\n hashMap.put(\"email\",email);\n hashMap.put(\"uid\",uid);\n hashMap.put(\"username\", username);\n hashMap.put(\"gender\", gender);\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference reference = database.getReference();\n\n reference.child(uid).setValue(hashMap);\n\n Toast.makeText(SignUpActivity.this, \"Registered...\\n\"+user.getEmail(), Toast.LENGTH_SHORT).show();\n startActivity(new Intent(SignUpActivity.this,UserProfileActivity.class));\n finish();\n\n } else {\n // If sign in fails, display a message to the user.\n progressDialog.dismiss();\n Toast.makeText(SignUpActivity.this, \"Authentication failed.\", Toast.LENGTH_SHORT).show();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n //error, dismiss progress error, get and show the error message\n progressDialog.dismiss();\n Toast.makeText(SignUpActivity.this,\"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n fbAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n UserModel userModel=new UserModel();\n userModel.setEmail(user.getEmail());\n userModel.setDisplayName(user.getDisplayName());\n userModel.setPhotoUrl(user.getPhotoUrl().toString());\n userModel.setUid(user.getUid());\n UserFBDB userFBDB = new UserFBDB();\n userFBDB.save(userModel);\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Exception ex=task.getException();\n signupWithGoogleBtn.setVisibility(View.VISIBLE);\n mProgress.setVisibility(View.INVISIBLE);\n Toast.makeText(SignupActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n //updateUI(null);\n }\n\n // ...\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"singn\", e.getMessage());\n }\n });\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser mFirebaseUser = mFirebaseAuth.getCurrentUser();\n if( mFirebaseUser != null){\n Toast.makeText(LogInActivity.this,\"You are logged in\",Toast.LENGTH_SHORT).show();\n Intent move = new Intent(LogInActivity.this,HomeActivity.class);\n startActivity(move);\n }\n else{\n Toast.makeText(LogInActivity.this,\"Please Log In\",Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user != null) {\n // User is signed in\n // Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n // toastMessage(\"Successfully signed in with: \" + user.getEmail());\n } else {\n // User is signed out\n // Log.d(TAG, \"onAuthStateChanged:signed_out\");\n // toastMessage(\"Successfully signed out.\");\n }\n // ...\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n if (task.isSuccessful()) {\n ((MainActivity)getContext()).setFirebaseAuth(FirebaseAuth.getInstance());\n ((MainActivity)getContext()).setFirebaseUser(FirebaseAuth.getInstance().getCurrentUser());\n if (profileFragment == null)\n profileFragment = new ProfileFragment();\n outerTransaction(profileFragment);\n } else {\n Toast.makeText(getContext(), task.getException().getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_registro_usuario);\n\n TelefonoEdt = (EditText) findViewById(R.id.TelefonoEdt);\n CorreoEdt = (EditText) findViewById(R.id.CorreoEdt);\n ContrasenaEdt =(EditText) findViewById(R.id.ContrasenaEdt);\n RegistrarBtn = (Button) findViewById(R.id.RegistrarBtn);\n Nombretext = (EditText) findViewById(R.id.Nombre);\n\n mAuth = FirebaseAuth.getInstance();\n mDatabase = FirebaseDatabase.getInstance().getReference();\n btnFotoP =(Button) findViewById (R.id.button);\n fotoP = findViewById (R.id.imageView5);\n\n dDatabase = FirebaseDatabase.getInstance();\n dReference = FirebaseDatabase.getInstance().getReference();\n dStorage = FirebaseStorage.getInstance().getReference();\n sp_rol = findViewById(R.id.sp_rol);\n\n\n RegistrarBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //Se asigna los que el usuario ingresan en los EditText a las variables\n telefono = TelefonoEdt.getText().toString();\n correo = CorreoEdt.getText().toString();\n contrasena = ContrasenaEdt.getText().toString();\n nombre = Nombretext.getText().toString();\n\n if(!telefono.isEmpty() && !correo.isEmpty() && !contrasena.isEmpty() && !nombre.isEmpty()){\n if(contrasena.length()>=6 && telefono.length()==10){\n registrarUsuario();\n }else{\n Toast.makeText(ActivityUsuario.this, \"La contraseña debe tener al menos 6 caracteres\", Toast.LENGTH_LONG).show();\n Toast.makeText(ActivityUsuario.this, \"El telefono debe ser de 10 dígitos\", Toast.LENGTH_LONG).show();\n }\n\n }else{\n Toast.makeText(ActivityUsuario.this, \"Completar campos vacíos\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n\n final TextView textViewLogin = findViewById(R.id.textLogin);\n\n textViewLogin.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent login = new Intent(ActivityUsuario.this, MainActivity.class);\n startActivity(login);\n finish();\n }\n });\n\n btnFotoP.setOnClickListener (new View.OnClickListener ( ) {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent (Intent.ACTION_PICK);\n intent.setType (\"image/*\");\n startActivityForResult (intent,GALLERY_INTENT);\n }\n });\n\n }", "private void setupFirebaseAuth() {\n Log.d(TAG, \"setupFirebaseAuth: setting up firebase auth.\");\n\n mAuth = FirebaseAuth.getInstance();\n mFirebaseDatabse = FirebaseDatabase.getInstance();\n mRef = mFirebaseDatabse.getReference();\n\n mAuthStateListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n final FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user != null) {\n Log.d(TAG, \"onAuthStateChanged: signed in:\" + user.getUid());\n\n mRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n checkIfUsernameExists(username);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n //moving back to login screen after successful sign up.\n finish();\n\n } else\n Log.d(TAG, \"onAuthStateChanged: signed out\");\n }\n };\n\n\n }", "public void validateLogin(String email, String password, final CredValidationInterface listner) {\n\n collectionReference = db.collection(\"Users\");\n firebaseAuth = FirebaseAuth.getInstance();\n firebaseAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()) {\n Log.d(TAG, \"validateLogin: **********\" +firebaseAuth.getCurrentUser().getUid());\n currentUser = FirebaseAuth.getInstance().getCurrentUser();\n final String currentUserId = currentUser.getUid();\n Log.d(TAG, \"onComplete: \" + currentUserId);\n collectionReference.whereEqualTo(\"UserIdInDB\", currentUserId).get()\n .addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {\n @Override\n public void onSuccess(QuerySnapshot queryDocumentSnapshots) {\n boolean recordNotExists = true;\n for (QueryDocumentSnapshot snapshots: queryDocumentSnapshots) {\n String userId = snapshots.getString(\"UserIdInDB\");\n\n recordNotExists = false;\n\n EntityClass entityObj = EntityClass.getInstance();\n entityObj.setUserName(snapshots.getString(\"UserName\"));\n entityObj.setUserIdInDb(currentUserId);\n listner.onSuccessValidatingCredentials(true);\n }\n if(recordNotExists){\n Log.d(\"Database Connector\", \"onSuccess: validateLogin| Record not exist.\");\n listner.onFailure(\"Record not exists\");\n listner.onSuccessValidatingCredentials(false);\n }\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"Database Connector\", \"onFailure: validateLogin| \" + e.getMessage());\n listner.onFailure(e.getMessage());\n listner.onSuccessValidatingCredentials(false);\n }\n });\n\n } else {\n Log.d(TAG, \"onComplete: \" + task.getException().getMessage());\n }\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"Database Connector\", \"onFailure: validateLogin| \" + e.getMessage());\n listner.onFailure(e.getMessage());\n listner.onSuccessValidatingCredentials(false);\n }\n });\n\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.d(\"LOGIN\", \"Error logging in after creating user\");\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user != null) {\n Log.d(TAG, \"user.isEmailVerified():\" + user.isEmailVerified());\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n signInAlready(user);\n } else {\n // User is signed out//\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n signOut();\n }\n }", "public void createAccount (String email, String password) {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(Login.this, \"Registration Successful\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n //Sign in existing users\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n //Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n //Log.w(TAG, \"signInWithEmail\", task.getException());\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "public void reAuthenticateUser(User regUser){\n System.out.println(\"Authenticating Google User from DB\");\n UserWithRoles authUser = new UserWithRoles(regUser);\n Authentication authentication = new UsernamePasswordAuthenticationToken(\n authUser, authUser.getPassword(), authUser.getAuthorities()\n );\n SecurityContextHolder.getContext().setAuthentication(authentication);\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\r\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\r\n mauth.signInWithCredential(credential)\r\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if (task.isSuccessful()) {\r\n\r\n progressDialog.dismiss();\r\n\r\n Intent intent=new Intent(Gmailaccountactivity.this,MainActivity.class);\r\n startActivity(intent);\r\n\r\n\r\n // Sign in success, update UI with the signed-in user's information\r\n // Log.d(TAG, \"signInWithCredential:success\");\r\n // FirebaseUser user = auth.getCurrentUser();\r\n // String name=user.getDisplayName();\r\n// String email=user.getEmail();\r\n//\r\n// String photourl=user.getPhotoUrl().toString();\r\n//\r\n// HashMap<String,Object>gmailinfo=new HashMap<>();\r\n// gmailinfo.put(\"username\",name);\r\n// gmailinfo.put(\"imageurl\",photourl);\r\n//\r\n//\r\n// String uid=auth.getCurrentUser().getUid();\r\n//\r\n// rotref.child(uid).setValue(gmailinfo).addOnCompleteListener(new OnCompleteListener<Void>()\r\n// {\r\n// @Override\r\n// public void onComplete(@NonNull Task<Void> task) {\r\n//\r\n// if (task.isSuccessful())\r\n// {\r\n// progressDialog.dismiss();\r\n// Toast.makeText(Gmailaccountactivity.this, \"successfully logging\", Toast.LENGTH_SHORT).show();\r\n// Intent intent=new Intent(Gmailaccountactivity.this,MainActivity.class);\r\n// startActivity(intent);\r\n// }\r\n// else {\r\n// progressDialog.dismiss();\r\n// Toast.makeText(Gmailaccountactivity.this, \"error: \"+task.getException().toString(), Toast.LENGTH_SHORT).show();\r\n// }\r\n//\r\n// }\r\n// });\r\n\r\n\r\n // updateUI(user);\r\n } else {\r\n\r\n progressDialog.dismiss();\r\n // If sign in fails, display a message to the user.\r\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\r\n// Snackbar.make(findViewById(R.id.main_layout), \"Authentication Failed.\", Snackbar.LENGTH_SHORT).show();\r\n// updateUI(null);\r\n }\r\n\r\n // ...\r\n }\r\n });\r\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n if(firebaseAuth.getCurrentUser() != null){\n // go to home screen via intent\n startActivity(\n new Intent(LoginActivity.this, NavigationActivity.class));\n }\n }", "private void initAuthListener() {\n\n mAuthStateListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n\n mExecutors.networkIO().execute(() -> {\n mFirebaseUser = firebaseAuth.getCurrentUser();\n mFirebaseUserLiveData.postValue(mFirebaseUser);\n if (mFirebaseUser != null) {\n initUserReference(mFirebaseUser);\n }\n });\n\n }\n };\n mFirebaseAuth.addAuthStateListener(mAuthStateListener);\n }", "public void registerNewEmail(String email, String password){\n\n showProgressDialog();\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if (task.isSuccessful()){\n Log.d(TAG, \"onComplete: AuthState: \" + FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n // TODO(\"send verification email\")\n // sendVerificationEmail();\n\n //insert some default user data\n String selectedLanguage = mUserRegBinding.spinnerLanguage.getSelectedItem().toString();\n String selectedCountry = mUserRegBinding.spinnerCountry.getSelectedItem().toString();\n String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();\n PrivateUser user = new PrivateUser();\n user.setFirstName(mUserRegBinding.editTextFirstName.getText().toString());\n user.setLastName(mUserRegBinding.editTextLastName.getText().toString());\n user.setTelephone(mUserRegBinding.editTextPrivTelephone.getText().toString());\n user.setCountry(selectedCountry);\n user.setLanguage(selectedLanguage);\n user.setUser_id(userId);\n\n\n // get the document reference for private users\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n DocumentReference privateUserRef = db\n .collection(getString(R.string.private_user))\n .document(userId);\n\n privateUserRef.set(user).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n hideProgressDialog();\n Snackbar.make(getCurrentFocus().getRootView(), \"Registration Successful :)\", Snackbar.LENGTH_SHORT).show();\n\n // sign current user out\n FirebaseAuth.getInstance().signOut();\n\n // send user to login screen on successful registration\n Bundle bundle = new Bundle();\n bundle.putString(\"TYPE_OF_USER\", getString(R.string.private_user));\n redirectLoginScreen(bundle);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n hideProgressDialog();\n Log.e( \"Db Creation Failed\", \"Failed\", e );\n Snackbar.make(getCurrentFocus().getRootView(), e.getMessage(), Snackbar.LENGTH_SHORT).show();\n }\n });\n\n }\n if (!task.isSuccessful()) {\n FirebaseAuthException e = (FirebaseAuthException) task.getException();\n Snackbar.make(getCurrentFocus().getRootView(), e.getMessage(), Snackbar.LENGTH_LONG).show();\n Log.e( \"User Registration: \" , \"Failed\", e );\n }\n hideProgressDialog();\n }\n });\n }", "private void handleFacebookAccessToken(AccessToken token) {\n //Log.d(TAG, \"handleFacebookAccessToken:\" + token);\n\n AuthCredential credential = FacebookAuthProvider.getCredential(token.getToken());\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user);\n\n //Aqui envia os dados para o banco ou pega os dados de lá\n DadosUsuario dados = new DadosUsuario();\n dados.setTipoConexao(1);\n\n for (UserInfo profile : user.getProviderData()) {\n // Id of the provider (ex: google.com)\n\n dados.setUid(profile.getUid());\n\n // Name, email address, and profile photo Url\n dados.setNome(profile.getDisplayName());\n dados.setEmail(profile.getEmail());\n dados.setUrlFoto(profile.getPhotoUrl().toString());\n\n }\n\n //Verifica se já ah conta\n dados.verificarExistencia();\n if(dados.getConta()==false){\n\n criarNickName = new Intent(InicialLoginActivity.this, CriarNomeUsuario.class);\n startActivity(criarNickName);\n finish();\n\n } else {\n\n //Aqui importa e inicial a tela inicial do jogo logo após o usuario estar conectado\n telaInicial = new Intent(InicialLoginActivity.this, TelaInicial.class);\n startActivity(telaInicial);\n finish();\n }\n\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(InicialLoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n\n // ...\n }\n });\n }", "public void checkLogin() {\n String username = ((EditText) findViewById(R.id.Username)).getText().toString();\n String password = ((EditText) findViewById(R.id.Password)).getText().toString();\n final TextView feedback = (TextView) findViewById(R.id.feedback);\n mAuth.signInWithEmailAndPassword(username, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"LOG IN\", \"signInWithEmail:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n startActivity(new Intent(LoginActivity.this, HomeScreen.class));\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"LOGIN\", \"signInWithEmail:failure\", task.getException());\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n feedback.setText(\"FAIL!\");\n }\n\n // ...\n }\n });\n\n\n }", "private void setupFirebaseAuth() {\n Log.d(TAG, \"setupFirebaseAuth: setting up firebase auth.\");\n mAuth = FirebaseAuth.getInstance();\n mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n //check if the user is logged in\n checkCurrentUser(user);\n\n if (user != null) {\n //User is signed in\n Log.d(TAG, \"onAuthStateChanged: signed_in:\" + user.getUid());\n }\n else {\n //User is signed out\n Log.d(TAG, \"onAuthStateChanged: signed out\");\n }\n }\n };\n }", "public void registerUser(View view) {\n TextView emailAddressField = (TextView) findViewById(R.id.registerEmailAddress);\n final String emailAddress = emailAddressField.getText().toString();\n\n TextView passwordField = (TextView) findViewById(R.id.registerPassword);\n final String password = passwordField.getText().toString();\n\n TextView nameField = (TextView) findViewById(R.id.registerName);\n final String name = nameField.getText().toString();\n\n final String company = \"Purple Store\";\n\n if(emailAddress.isEmpty() || password.isEmpty() || name.isEmpty()) {\n Toast.makeText(this, \"Email Address, password or name cannot be blank\",Toast.LENGTH_SHORT).show();\n return;\n }\n\n mAuth.createUserWithEmailAndPassword(emailAddress, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"createUserWithEmail:success\");\n FirebaseUser currentUser = mAuth.getCurrentUser();\n String uid = currentUser.getUid();\n\n // Write credentials in Fire Store\n User newUser = new User();\n newUser.createUser(uid, emailAddress, name, company);\n newUser.writeData();\n\n // Save the details on shared preferences for future calls\n SharedPreferences sharedPreferences = getSharedPreferences(\"USER_DETAILS\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"userId\", uid);\n editor.putString(\"emailAddress\", emailAddress);\n editor.putString(\"name\", name);\n editor.putString(\"companyId\", company);\n editor.apply();\n\n // Redirect to Dashboard\n Intent intent = new Intent(RegisterActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(RegisterActivity.this, task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n }", "public void onCreateAccountPressed(final View view) throws FirebaseAuthUserCollisionException{\n username=mEditTextUsernameCreate.getText().toString();\n email=mEditTextEmailCreate.getText().toString();\n password=mEditTextPasswordCreate.getText().toString();\n\n if(!isEmailValid(email) || !isUserNameValid(username) || !isPasswordValid(password)){\n return;\n }\n mAuthProgressDialog.show();\n final FirebaseAuth auth=FirebaseAuth.getInstance();\n final DatabaseReference ref=mReference.child(Constants.FIREBASE_LOCATION_USER_ACCOUNTS).child(Utils.encodeEmail(email));\n auth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (task.isSuccessful()){\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n mAuthProgressDialog.dismiss();\n ref.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.getValue()==null){\n User user=new User(username, email);\n ref.setValue(user);\n }\n else {\n showErrorToast(getResources().getString(R.string.error_email_taken));\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.e(LOG_TAG, databaseError.getMessage());\n }\n });\n onSignInPressed(view);\n\n }\n else {\n mAuthProgressDialog.dismiss();\n Log.d(TAG, \"createUserWithEmail:onFailure:\" + task.getException());\n showErrorToast(task.getException().getMessage());\n\n }\n }\n\n\n });\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.i(\"lt\",\"auth failed\");\n }", "public void registerUser(String email, String password){\n fbAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"createUserWithEmail:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n updateUI(user);\n Toast.makeText(Signup.this, \"Registration success.\",\n Toast.LENGTH_SHORT).show();\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(Signup.this, \"Registration failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n\n FirebaseDatabase.getInstance().getReference(Common.user_rider_btl)\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n Common.currentUser = dataSnapshot.getValue(User.class);\n Intent intent = new Intent(new Intent(LoginUser.this, HomeActivity.class));\n startActivity(intent);\n finish();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "private void userLogin() {\n String email = editTextEmail.getText().toString().trim();\n String password = editTextPassword.getText().toString().trim();\n\n if(email.isEmpty()) {\n editTextEmail.setError(\"Email is required!\");\n editTextEmail.requestFocus();\n return;\n }\n\n if(!Patterns.EMAIL_ADDRESS.matcher(email).matches()){\n editTextEmail.setError(\"Please enter a valid email!\");\n editTextEmail.requestFocus();\n return;\n }\n\n if(password.isEmpty()){\n editTextPassword.setError(\"Password is required!\");\n editTextPassword.requestFocus();\n return;\n }\n\n if(password.length() < 6) {\n editTextPassword.setError(\"Min password length is 6 characters!\");\n editTextPassword.requestFocus();\n return;\n }\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if(user.isEmailVerified()) {\n startActivity(new Intent(LoginActivity.this, HomeScreen.class));\n } else{\n user.sendEmailVerification();\n Toast.makeText(LoginActivity.this, \"Check your email to verify your account!\",\n Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(LoginActivity.this, \"Failed to login! Please check your credentials\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n\n\n\n\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n Demo_User demo_user = new Demo_User();\n demo_user.setEmail(editEmail.getText().toString());\n demo_user.setPassword(editPassword.getText().toString());\n demo_user.setName(editName.getText().toString());\n demo_user.setPhone(editPhone.getText().toString());\n\n //user email to key\n users.child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(demo_user)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Snackbar.make(rootLayout,\"Register success fully\",Snackbar.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Snackbar.make(rootLayout,\"Failed\" + e.getMessage(),Snackbar.LENGTH_LONG).show();\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n progressBar.setVisibility(View.GONE);\n if (!task.isSuccessful()) {\n // there was an error\n if (password.length() < 6) {\n inputPassword.setError(getString(R.string.minimum_password));\n } else {\n Toast.makeText(LoginActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show();\n }\n } else {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n if (user.isEmailVerified()) {\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n Intent intent = new Intent(LoginActivity.this, VerifyEmailScreen.class);\n startActivity(intent);\n }\n finish();\n }\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.child(txt_phone.getText().toString()).exists()){\n // get user info\n dialog.dismiss();\n User login = dataSnapshot.child(txt_phone.getText().toString()).getValue(User.class);\n if (login.getPassword().equals(txt_password.getText().toString())){\n //Toast.makeText(SignIn.this, \"login success\", Toast.LENGTH_SHORT).show();\n login.setPhone(txt_phone.getText().toString());\n Common.currentUser=login;\n startActivity(Home.newItent(SignIn.this));\n finish();\n }else{\n Toast.makeText(SignIn.this, \"kata sandi salah\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n }else{\n dialog.dismiss();\n Toast.makeText(SignIn.this, \"Belum terdaftar\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n }", "public void createUserAccount(String email, String password, final String userId, final SignUpInterface listner) {\n collectionReference = db.collection(\"Users\");\n firebaseAuth = FirebaseAuth.getInstance();\n firebaseAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n currentUser = FirebaseAuth.getInstance().getCurrentUser();\n assert currentUser!= null;\n final String currentUserId = currentUser.getUid();\n\n Map<String, String> userMap = new HashMap<>();\n userMap.put(\"UserIdInDB\", currentUserId);\n userMap.put(\"UserName\", userId);\n\n collectionReference.add(userMap)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n documentReference.get()\n .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if(task.getResult().exists()) {\n\n String name = task.getResult().getString(\"UserName\");\n\n EntityClass entityObj = EntityClass.getInstance();\n entityObj.setUserName(name);\n entityObj.setUserIdInDb(currentUserId);\n listner.signUpStatus(true);\n }\n }\n });\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.signUpStatus(false);\n listner.onFailure(e.getMessage());\n }\n });\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.signUpStatus(false);\n listner.onFailure(e.getMessage());\n }\n });\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Log.d(TAG, \"firebaseAuthWithGoogle:\" + acct.getId());\n\n showProgressDialog();\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n uID = user.getUid();\n\n mDatabase.child(\"users\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n boolean check = false;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()){\n if (snapshot.getKey().equals(uID)) {\n check = true;\n break;\n }\n }\n if(!check){\n mDatabase.child(\"users\").child(uID).setValue(true);\n setCategories();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n }\n\n // [START_EXCLUDE]\n hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n }", "private void signUpNewUserToDB(){\n dbAuthentication.createUserWithEmailAndPassword(this.newUser.getEmail(), this.newUser.getPassword())\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n /**signUp success, will update realTime DB ant firebase Authentication*/\n FirebaseUser currentUser = dbAuthentication.getCurrentUser();\n addToRealDB(currentUser.getUid());\n /**will send verification email to the user from Firebase Authentication*/\n currentUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n }\n });\n }else{isBadEmail = true;}\n }\n });\n }", "private void saveData() {\n firebaseUser = firebaseAuth.getInstance().getCurrentUser();\n String uID = firebaseUser.getUid();\n\n //Get auth credentials from the user for re-authentication\n credential = EmailAuthProvider.getCredential(mEmailField, mPassField);\n\n\n final DatabaseReference userDatabase = firebaseDatabase.getInstance().getReference().child(\"users\").child(uID);\n //Get the value of edit text\n editTextValue = changeFieldEt.getText().toString().trim();\n //Check whether edit text is empty\n if (!TextUtils.isEmpty(editTextValue)) {\n //if change name\n if (mNameField.equals(\"name\")) {\n UserProfileChangeRequest userProfileChangeRequest = new UserProfileChangeRequest.Builder()\n .setDisplayName(editTextValue).build();\n firebaseUser.updateProfile(userProfileChangeRequest).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.i(\"PROFILE\", \"User profile updated.\");\n updateDatabase(userDatabase);\n spotsDialog.dismiss();\n }\n }\n });\n }//if change password\n else if (mNameField.equals(\"password\")) {\n\n firebaseUser.reauthenticate(credential)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n firebaseUser.updatePassword(editTextValue).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.i(\"PASSWORD\", \"User password updated.\");\n updateDatabase(userDatabase);\n } else {\n Log.i(\"PASSWORD\", \"User cannot updated.\");\n Utility.MakeLongToastToast(activity, \"Password must have more than 7 characters\");\n spotsDialog.dismiss();\n }\n }\n });\n } else {\n Log.i(\"AUTH\", \"Error auth failed\");\n }\n }\n });\n }//if change email\n else if (mNameField.equals(\"email\")) {\n firebaseUser.reauthenticate(credential)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n firebaseUser.updateEmail(editTextValue).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.i(\"EMAIL\", \"User email address updated.\");\n updateDatabase(userDatabase);\n } else {\n Utility.MakeLongToastToast(activity, \"Cannot Updated. Please try another name \");\n spotsDialog.dismiss();\n }\n }\n });\n } else {\n Log.i(\"AUTH\", \"Error auth failed\");\n }\n }\n });\n\n }\n\n\n } else {\n Utility.MakeLongToastToast(getActivity(), \"Please enter your change.\");\n spotsDialog.dismiss();\n }\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n binding = ActivitySignUpBinding.inflate(LayoutInflater.from(this));\r\n setContentView(binding.getRoot());\r\n binding.login.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n String name = binding.username.getText().toString();\r\n String pass = binding.password.getText().toString();\r\n if (TextUtils.isEmpty(name)) {\r\n binding.username.setError(\"this field can't be empty\");\r\n binding.username.setFocusable(true);\r\n return;\r\n }\r\n if (TextUtils.isEmpty(pass)) {\r\n binding.password.setError(\"this field can't be empty\");\r\n binding.password.setFocusable(true);\r\n return;\r\n }\r\n// User user = new User(name, \"\", mobile, pass, email,\"0\");\r\n FirebaseFirestore.getInstance().collection(\"Admin\").whereEqualTo(\"name\",name).whereEqualTo(\"password\",pass).get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\r\n if (task.isSuccessful()) {\r\n for (QueryDocumentSnapshot document : task.getResult()) {\r\n Map<String, Object> hm = document.getData();\r\n String mobile1 = (String) hm.get(\"mobile\");\r\n String name1 = (String) hm.get(\"name\");\r\n String pass1 = (String) hm.get(\"password\");\r\n String email1 = (String) hm.get(\"email\");\r\n if (name.equalsIgnoreCase(name1)) {\r\n if (pass.equalsIgnoreCase(pass1)) {\r\n SharedPreferences mPrefs = getSharedPreferences(\"Digital\", MODE_PRIVATE);\r\n SharedPreferences.Editor prefsEditor = mPrefs.edit();\r\n prefsEditor.putString(\"user\", \"admin\");\r\n prefsEditor.commit();\r\n check = false;\r\n Intent i = new Intent(SignUpAsAdmin.this, HomeActivity.class);\r\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\r\n startActivity(i);\r\n finish();\r\n }\r\n }\r\n }\r\n if (check)\r\n Toast.makeText(SignUpAsAdmin.this, \"Admin not found. Please check the filled information.\", Toast.LENGTH_SHORT).show();\r\n } else\r\n Toast.makeText(SignUpAsAdmin.this, \"\" + task.getException(), Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n// FirebaseFirestore.getInstance().collection(\"Admin\").document(id).set(user).addOnCompleteListener(new OnCompleteListener<Void>() {\r\n// @Override\r\n// public void onComplete(@NonNull Task<Void> task) {\r\n// if(task.isSuccessful()){\r\n//\r\n// }else{\r\n// Toast.makeText(SignUpAsAdmin.this, \"\"+task.getException(), Toast.LENGTH_SHORT).show();\r\n// }\r\n// }\r\n// });\r\n// class AsyncTaskUploadClass extends AsyncTask<Void, Void, String> {\r\n// @Override\r\n// protected void onPreExecute() {\r\n//\r\n// super.onPreExecute();\r\n// }\r\n//\r\n// @Override\r\n// protected void onPostExecute(String string1) {\r\n// super.onPostExecute(string1);\r\n// if(string1.equalsIgnoreCase(\"1\")) {\r\n// SharedPreferences mPrefs=getSharedPreferences(\"Digital\",MODE_PRIVATE);\r\n// SharedPreferences.Editor prefsEditor = mPrefs.edit();\r\n// prefsEditor.putString(\"user\", \"admin\");\r\n// prefsEditor.commit();\r\n// Intent i = new Intent(SignUpAsAdmin.this, HomeActivity.class);\r\n// startActivity(i);\r\n// finish();\r\n// }\r\n// else{\r\n// Toast.makeText(SignUpAsAdmin.this, \"You are not an admin\", Toast.LENGTH_SHORT).show();\r\n// }\r\n// Log.e(\"spanshoe\", \"post execute\" + string1);\r\n// }\r\n//\r\n// private String bufferedWriterDataFN(HashMap<String, String> HashMapParams) throws UnsupportedEncodingException {\r\n//\r\n// StringBuilder stringBuilderObject;\r\n//\r\n// stringBuilderObject = new StringBuilder();\r\n//\r\n// for (Map.Entry<String, String> KEY : HashMapParams.entrySet()) {\r\n//\r\n// if (check)\r\n//\r\n// check = false;\r\n// else\r\n// stringBuilderObject.append(\"&\");\r\n//\r\n// stringBuilderObject.append(URLEncoder.encode(KEY.getKey(), \"UTF-8\"));\r\n//\r\n// stringBuilderObject.append(\"=\");\r\n//\r\n// stringBuilderObject.append(URLEncoder.encode(KEY.getValue(), \"UTF-8\"));\r\n// }\r\n//\r\n// return stringBuilderObject.toString();\r\n// }\r\n//\r\n// @Override\r\n// protected String doInBackground(Void... params) {\r\n// HashMap<String, String> HashMapParams = new HashMap<String, String>();\r\n//\r\n// HashMapParams.put(\"name\", name);\r\n//\r\n// HashMapParams.put(\"mobile\", mobile);\r\n// HashMapParams.put(\"email\", email);\r\n// HashMapParams.put(\"password\", pass);\r\n// StringBuilder stringBuilder = new StringBuilder();\r\n//\r\n// try {\r\n// HttpURLConnection httpURLConnectionObject;\r\n// OutputStream OutPutStream;\r\n// BufferedWriter bufferedWriterObject;\r\n// BufferedReader bufferedReaderObject;\r\n// int RC;\r\n//\r\n// url = new URL(\"https://192.168.137.1/aman/loginasadmin.php\");\r\n// Log.e(\"spanshoe\", \"image upload\");\r\n// HttpsTrustManager.allowAllSSL();\r\n// httpURLConnectionObject = (HttpURLConnection) url.openConnection();\r\n//\r\n// httpURLConnectionObject.setReadTimeout(19000);\r\n//\r\n// httpURLConnectionObject.setConnectTimeout(19000);\r\n//\r\n// httpURLConnectionObject.setRequestMethod(\"POST\");\r\n//\r\n// httpURLConnectionObject.setDoInput(true);\r\n//\r\n// httpURLConnectionObject.setDoOutput(true);\r\n//\r\n// OutPutStream = httpURLConnectionObject.getOutputStream();\r\n//\r\n// bufferedWriterObject = new BufferedWriter(\r\n//\r\n// new OutputStreamWriter(OutPutStream, \"UTF-8\"));\r\n//\r\n// bufferedWriterObject.write(bufferedWriterDataFN(HashMapParams));\r\n//\r\n// bufferedWriterObject.flush();\r\n//\r\n// bufferedWriterObject.close();\r\n//\r\n// OutPutStream.close();\r\n//\r\n// RC = httpURLConnectionObject.getResponseCode();\r\n//\r\n// if (RC == HttpsURLConnection.HTTP_OK) {\r\n//\r\n// bufferedReaderObject = new BufferedReader(new InputStreamReader(httpURLConnectionObject.getInputStream()));\r\n//\r\n// stringBuilder = new StringBuilder();\r\n//\r\n// String RC2;\r\n//\r\n// while ((RC2 = bufferedReaderObject.readLine()) != null) {\r\n//\r\n// stringBuilder.append(RC2);\r\n// }\r\n// }\r\n//\r\n// } catch (Exception e) {\r\n// e.printStackTrace();\r\n// }\r\n// return stringBuilder.toString();\r\n// }\r\n// }\r\n// AsyncTaskUploadClass AsyncTaskUploadClassOBJ = new AsyncTaskUploadClass();\r\n//\r\n// AsyncTaskUploadClassOBJ.execute();\r\n }\r\n });\r\n }", "private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n if(Constants.mAuth==null){\n Constants.mAuth= FirebaseAuth.getInstance();\n Log.d(Constants.TAG,\"mAuth new Instance\");\n }\n Constants.mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(Constants.TAG, \"signInResult:google success\");\n Constants.user=Constants.mAuth.getCurrentUser();\n SharedPreferences sharedPreferences=getSharedPreferences(Constants.LoginSharedPref.SHARED_PREF_NAME,MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putBoolean(Constants.LoginSharedPref.PREVIOUSLY_STARTED,true);\n editor.putBoolean(Constants.LoginSharedPref.LOGGED_IN,true);\n String email=Constants.user.getEmail();\n String name=Constants.user.getDisplayName();\n Uri photoUrl=Constants.user.getPhotoUrl();\n editor.putString(Constants.LoginSharedPref.LOGIN_EMAIL,email);\n editor.putString(Constants.LoginSharedPref.LOGIN_URENAME,name);\n if(photoUrl!=null) {\n Log.d(Constants.TAG,\" Photo Url Extract: \"+photoUrl.toString());\n editor.putString(Constants.LoginSharedPref.PROFILE_URL, photoUrl.toString());\n }\n editor.putBoolean(Constants.LoginSharedPref.IS_EMAIL_VERIFIED,true);\n editor.commit();\n progressBar.setVisibility(View.GONE);\n contentHome.setVisibility(View.VISIBLE);\n Intent intent=new Intent(HomeActivity.this,MainActivity.class);\n startActivity(intent);\n finish();\n } else {\n // If sign in fails, display a message to the user.\n progressBar.setVisibility(View.GONE);\n contentHome.setVisibility(View.VISIBLE);\n Log.d(Constants.TAG, \"signInResult:google with firebase failure\", task.getException());\n Toast.makeText(HomeActivity.this, \"An error occured while signing in. Check your network connection \",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "private void login() {\n final String departmentNumber = mDepartmentField.getText().toString();\n final String email = mEmailField.getText().toString();\n final String password = mPasswordField.getText().toString();\n\n Log.d(TAG, \"Signing in with email: \" + email);\n if (!validateInput()) {\n SharedUtil.dismissProgressDialog(mProgressDialog);\n Toast.makeText(LoginActivity.this, \"Validation Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"signInWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Log.w(TAG, \"signInWithEmail:failed\", task.getException());\n Toast.makeText(LoginActivity.this, R.string.auth_failed,\n Toast.LENGTH_SHORT).show();\n SharedUtil.dismissProgressDialog(mProgressDialog);\n } else {\n\n final String Uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\n DatabaseReference acctypeRef = FirebaseDatabase.getInstance().getReference(\"officer\");\n acctypeRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n // Validate department number\n if (dataSnapshot.hasChild(departmentNumber)) {\n if (dataSnapshot.child(departmentNumber).hasChild(Uid)) {\n getSharedPreferences(getString(R.string.shared_preferences), MODE_PRIVATE)\n .edit().putString(getString(R.string.shared_preferences_department_number),\n departmentNumber).commit();\n SharedUtil.dismissProgressDialog(mProgressDialog);\n Toast.makeText(LoginActivity.this, \"Validation success!\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(getBaseContext(), DashboardActivity.class);\n startActivity(i);\n finish();\n } else {\n FirebaseAuth.getInstance().signOut();\n SharedUtil.dismissProgressDialog(mProgressDialog);\n Toast.makeText(LoginActivity.this,\n \"This is not an officer account.\",\n Toast.LENGTH_SHORT).show();\n }\n\n } else {\n FirebaseAuth.getInstance().signOut();\n SharedUtil.dismissProgressDialog(mProgressDialog);\n mDepartmentField.setError(\"Invalid department number\");\n mDepartmentField.requestFocus();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n SharedUtil.dismissProgressDialog(mProgressDialog);\n }\n });\n }\n }\n });\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n View headerView = navigationView.getHeaderView(0); //title of drawer\n// TextView userNameDrawerTV = headerView.findViewById(R.id.);\n// TextView userTypeDrawerTV = headerView.findViewById(R.id.);\n Log.d(\"STATE LISTENER\", \"new user sign up - listening\");\n final FirebaseUser currentUser = firebaseAuth.getCurrentUser();\n\n if (currentUser != null) { //user is logged in\n // sharedPref.setSignedInStatus(true);\n Log.d(\"STATE LISTENER\", \"Signed in\");\n // userNameDrawerTV.setText(currentUser.getDisplayName());\n // sharedPref.setMyUserId(currentUser.getUid());\n// userType DrawerTV.setText(\"\");\n db.collection(Consts.DB_DJS).document(currentUser.getUid()).get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n Log.d(\"onAuthStateChanged\", \"success\");\n if (task.getResult().exists()) {\n // sharedPref.setIsDj(true);\n Log.d(\"onAuthStateChanged\", \"user is a dj\");\n // gotToFrag(Consts.DJ_PROFILE_FRAG, currentUser.getUid(), Consts.DB_DJS);\n } else {\n Log.d(\"onAuthStateChanged\", \"user NOT a dj\");\n // sharedPref.setIsDj(false);\n // gotToFrag(Consts.USER_PROFILE_FRAG, currentUser.getUid(), Consts.DB_USERS);\n }\n } else {\n Log.d(\"onAuthStateChanged\", \"failed connecting to DB\");\n\n }\n }\n });\n\n\n// navigationView.getMenu().findItem(R.id.sign_in).setVisible(false);\n// navigationView.getMenu().findItem(R.id.sign_up).setVisible(false);\n// navigationView.getMenu().findItem(R.id.reset_password).setVisible(false);\n// navigationView.getMenu().findItem(R.id.sign_out).setVisible(true);\n\n } else { //signed out\n changeFragmentDisplay(Consts.LOGIN_SCREEN_FRAG);\n // sharedPref.setSignedInStatus(false);\n // sharedPref.setMyUserId(\"\");\n\n\n// userNameDrawerTV.setText(getResources().getString(R.string.login_please));\n// userTypeDrawerTV.setText(getResources().getString(R.string.wait_for_you));\n// navigationView.getMenu().findItem(R.id.sign_in).setVisible(true);\n// navigationView.getMenu().findItem(R.id.sign_up).setVisible(true);\n// navigationView.getMenu().findItem(R.id.reset_password).setVisible(true);\n// navigationView.getMenu().findItem(R.id.sign_out).setVisible(false);\n }\n\n }", "public void signUpUser(final AuthActivity fromAuthActivity, String email, String password, final String displayName) {\n try {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(fromAuthActivity, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n // sign in user\n FirebaseUser firebaseUser = mAuth.getCurrentUser();\n User user = new User(firebaseUser);\n loggedInUser = user;\n setUserDisplayName(displayName);\n GameManager.statisticsManager.initUserInDatabase();\n fromAuthActivity.onSignUpSuccess();\n\n } else {\n // If sign in fails, call \"callback\"\n fromAuthActivity.onSignUpError(task.getException());\n }\n }\n });\n } catch (Exception e) {\n fromAuthActivity.onSignUpError(new Exception(\"Something didn't work here :/\"));\n e.printStackTrace();\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n FirebaseUser usuarioActual = FirebaseAuth.getInstance().getCurrentUser();\n UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()\n .setDisplayName(name.getText().toString() + \" \" + lastname.getText().toString()).build();\n usuarioActual.updateProfile(profileUpdates);\n\n ref.child(projectnameNew.getText().toString());\n\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(i);\n }\n if (!task.isSuccessful()) {\n Toast.makeText(RegisterActivity.this, \"Algo está mal :C\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }", "private void FirebaseGoogleAuth(GoogleSignInAccount acct) {\n if (acct != null) {\n AuthCredential authCredential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(authCredential).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Successful\", Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n\n updateUI(user);\n\n } else {\n Toast.makeText(MainActivity.this, \"Failed\", Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n }\n });\n }\n else{\n Toast.makeText(MainActivity.this, \"acc failed\", Toast.LENGTH_SHORT).show();\n }\n }", "private void registerUser() {\n String finalFullName = fullName.getText().toString().trim();\n String finalAge = age.getText().toString().trim();\n String finalEmail = email.getText().toString().trim();\n String finalPassword = password.getText().toString().trim();\n\n if(finalFullName.isEmpty()){\n fullName.setError(\"Full name is required.\");\n fullName.requestFocus();\n return;\n }\n\n if(finalAge.isEmpty()){\n age.setError(\"Age is required.\");\n age.requestFocus();\n return;\n }\n\n if(finalEmail.isEmpty()){\n email.setError(\"Email is required.\");\n email.requestFocus();\n return;\n }\n\n if(!Patterns.EMAIL_ADDRESS.matcher(finalEmail).matches()){\n email.setError(\"Please provide valid email!.\");\n email.requestFocus();\n return;\n }\n\n if(finalPassword.length() < 6){\n password.setError(\"Min. password length is 6 characters.\");\n password.requestFocus();\n return;\n }\n\n if(finalPassword.isEmpty()){\n password.setError(\"Password is required.\");\n password.requestFocus();\n return;\n }\n\n progressBar.setVisibility(View.VISIBLE);\n\n setEmail(finalEmail);\n setAge(finalAge);\n setFullName(finalFullName);\n\n //Using Firebase libraries, create the user data and send the info to Firebase\n mAuth.createUserWithEmailAndPassword(finalEmail, finalPassword)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //Create the User object\n User user = new User(getFullName(),getEmail(),getAge());\n\n //Now send that object to the Realtime Database\n FirebaseDatabase.getInstance().getReference(\"Users\")\n //Get registered user's ID and set it the the User object\n //so that they're connected\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n //pass the user object. OnCompleteListener is used to Check if\n //the data was added to the database.\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n //Inside OnCompleteListener you must complete that\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if(task.isSuccessful()){\n Toast.makeText(RegistrationActivity.this, \"User has been registered successfully!\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n\n //Then redirect to login layout\n } else {\n Toast.makeText(RegistrationActivity.this,\"Failed to register. Try again.\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n\n }\n });\n } else {\n Toast.makeText(RegistrationActivity.this,\"Failed to register. Try again.\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n }\n });\n\n\n\n }", "private void registerUser(String email, String passwd){\n\n mAuth.createUserWithEmailAndPassword(email, passwd)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n String key = \"\";\n //checking if success\n if(task.isSuccessful()){\n key = task.getResult().getUser().getUid();\n toastMessage(\"seccuss here \"+key);\n String name = \"\";\n String phone = \"\";\n String c = String.valueOf(spinner.getSelectedItem());\n Classe classe = new Classe(c);\n name = nom.getText().toString();\n phone = tel.getText().toString();\n UserInformation U = new UserInformation(name,phone,classe);\n // toastMessage(\"hello uid \"+Useruid);\n myRef.child(\"users\").child(key).setValue(U);\n /* sharedPref = getApplicationContext().getSharedPreferences(Name, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(Key, key);\n editor.apply();*/\n\n }else{\n toastMessage(\"Failed\"); }\n\n\n }\n });\n /*sharedPref = getApplicationContext().getSharedPreferences(Name, MODE_PRIVATE);\n uid = sharedPref.getString(Key, null);\n // toastMessage(\"hello thoast \"+uid);\n return uid ;*/\n }", "public void loginAsAdmin() {\n mAuth.signInWithEmailAndPassword(\"[email protected]\", \"password\")\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (! task.isSuccessful()) {\n alert(\"Firebase\", \"ERROR: Invalid username or password!\");\n return;\n }\n\n authenticationDone = true;\n if (splashTimeoutFinished) {\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(intent);\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful())\n {\n //verifier si l'utilisateur est etudiant ou volontaire pour le diriger\n startActivity(new Intent(getActivity(), profil_etd.class));\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n\n saveUser save = new saveUser(registerEmailString, registerPassword);\n FirebaseDatabase.getInstance().getReference(\"Register\").child(FirebaseAuth.\n getInstance().getCurrentUser().getUid()).setValue(save).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Sign up successful\", Toast.LENGTH_SHORT).show();\n\n pleaseWait.setVisibility(View.GONE);//\n Intent bac = new Intent(Sign_Up.this, Sign_In.class);\n startActivity(bac);\n\n } else {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Email already exist error\", Toast.LENGTH_SHORT).show();\n pleaseWait.setVisibility(View.GONE);\n\n }\n }\n });\n } else {\n progressDialog.dismiss();\n Toast.makeText(Sign_Up.this, \"Error try again\", Toast.LENGTH_SHORT).show();\n pleaseWait.setVisibility(View.GONE);\n }\n }", "private void recoverUser(){\n if(auth.getCurrentUser()!=null){\n String id= auth.getCurrentUser().getUid();\n\n //Solo la igualo para poder sacarla del metodo\n idU=id;\n\n //Buscamos el id del usuario logueado en la rama contactos\n db.getReference().child(\"contactos/\" + id).addValueEventListener(\n new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot data) {\n\n adapter.clear();\n\n for(DataSnapshot child: data.getChildren()){\n Contacto contacto=child.getValue(Contacto.class);\n adapter.addContacto(contacto);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n\n }\n }\n );\n }\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.d(TAG, \"Login attempt failed\");\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.d(TAG, \"Login attempt failed\");\n }", "private Boolean loginUserToAccount() {\n String email = userEmail.getText().toString();\n String password = userPassword.getText().toString();\n // perform validations\n if(email.isEmpty()){\n Toast.makeText(this,\"Please Enter Email\",Toast.LENGTH_SHORT).show();\n }\n else if(password.isEmpty()){\n Toast.makeText(this,\"Please Enter Password\",Toast.LENGTH_SHORT).show();\n }\n else{\n\n loadingBar.setTitle(\"Login\");\n loadingBar.setMessage(\"Please wait, while we log into your account\");\n loadingBar.show();\n loadingBar.setCanceledOnTouchOutside(true);\n\n // Create user at firebase using email\n mAuth.signInWithEmailAndPassword(email,password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n loadingBar.dismiss();\n if(task.isSuccessful()){\n sendUserToMainActivity();\n Toast.makeText(LoginActivity.this, \"Login succesfully\", Toast.LENGTH_SHORT).show();\n }\n else{\n String errMessage = task.getException().getMessage();\n Toast.makeText(LoginActivity.this, \"Error in login: \"+errMessage, Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n return true;\n }", "private void loadUserInformation(){\n FirebaseUser user = mAuth.getCurrentUser();\n\n String displayEmail = user.getEmail();\n email.setText(\"Velkommenn \" + displayEmail+\"!\");\n }", "public void onClick(View v) {\n EditText email = (EditText) findViewById(R.id.email);\n final String emailString = email.getText().toString();\n\n EditText pass = (EditText) findViewById(R.id.pass);\n final String passString = pass.getText().toString();\n Firebase ref = new Firebase(\"https://gymguy.firebaseio.com\");\n\n // Create a handler to handle the result of the authentication\n Firebase.AuthResultHandler authResultHandler = new Firebase.AuthResultHandler() {\n @Override\n public void onAuthenticated(AuthData authData) {\n // Authenticated successfully with payload authData\n\n Context context = getApplicationContext();\n CharSequence text = \"Logged in\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n //save uid\n //remove uid\n SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(\n getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"uid\", authData.getUid().toString());\n editor.commit();\n\n Intent goToNextActivity = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(goToNextActivity);\n }\n\n @Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n // Authenticated failed with error firebaseError\n Context context = getApplicationContext();\n// CharSequence text = firebaseError.getMessage() + \" : for \" + emailString + passString + firebaseError.getDetails();\n CharSequence text = firebaseError.getMessage() + \" : \" + firebaseError.getDetails();\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }\n };\n\n // Authenticate users with a custom Firebase token\n// ref.authWithCustomToken(\"<token>\", authResultHandler);\n // Or with an email/password combination\n ref.authWithPassword(emailString, passString, authResultHandler);\n }", "private void isUserExist() {\n\n if (firebaseAuth.getCurrentUser() != null) {\n\n final String user_id = firebaseAuth.getCurrentUser().getUid();\n users_database_reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n if (dataSnapshot.hasChild(user_id)) {\n // sign in the user and go to main activity\n // Intent intent = new Intent(StartActivity.this, MainActivity.class);\n // intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(intent);\n } else {\n // go to profile page\n Intent intent = new Intent(MainActivity.this, Profile.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n User user = new User();\n user.setEmail(edtMail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n user.setName(edtName.getText().toString());\n user.setPhone(edtPhone.getText().toString());\n Log.d(\"RRR\", \"OKET\" + user);\n\n users.child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void unused) {\n Snackbar.make(rootLayout, \"Register success\", Snackbar.LENGTH_SHORT)\n .show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Snackbar.make(rootLayout, \"Failed\" + e.getMessage(), Snackbar.LENGTH_SHORT)\n .show();\n }\n });\n }", "private void registerUser(){\n final String email = editTextEmail.getText().toString().trim();\n final String password = editTextPassword.getText().toString().trim();\n final String name=editTextName.getText().toString().trim();\n final String joiningdate=editTextJoiningDate.getText().toString().trim();\n //final String uid=firebaseAuth.getCurrentUser().getUid();\n //checking if email and passwords are empty\n if(TextUtils.isEmpty(email)){\n Toast.makeText(this,\"Please enter email\",Toast.LENGTH_LONG).show();\n return;\n }\n\n if(TextUtils.isEmpty(password)){\n Toast.makeText(this,\"Please enter password\",Toast.LENGTH_LONG).show();\n return;\n }\n if(TextUtils.isEmpty(name)){\n Toast.makeText(this,\"Please enter Name\",Toast.LENGTH_LONG).show();\n return;\n }\n\n if(TextUtils.isEmpty(joiningdate)){\n Toast.makeText(this,\"Please enter Joining Date\",Toast.LENGTH_LONG).show();\n return;\n }\n //if the email and password are not empty\n //displaying a progress dialog\n\n progressDialog.setMessage(\"Registering Please Wait...\");\n progressDialog.show();\n\n getLocation();\n\n //creating a new user\n firebaseAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n\n\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.i(\"Hey Entered OnComplete\",\"\");\n //checking if success\n if(task.isSuccessful()){\n Log.i(\"Hey Entered issuccess\",\"\");\n User user= new User(name,joiningdate,email,loc);\n// Map map=new HashMap();\n// map.put(\"name\",name);\n// map.put(\"joining date\",joiningdate);\n// map.put(\"email\",email);\n// map.put(\"uid\",uid);\n database=FirebaseDatabase.getInstance();\n\n myRef=database.getReference(\"Users\");\n\n myRef.child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(MainActivity.this,\"Registration Successful\",Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(),MenuActivity.class));\n }\n else{\n Toast.makeText(MainActivity.this,\"Registration Error\",Toast.LENGTH_LONG).show();\n }\n }\n });\n\n// String id=myRef.push().getKey();\n// myRef.child(id).setValue(user);\n\n\n }\n else{\n //display some message here\n Toast.makeText(MainActivity.this,\"Registration Error\",Toast.LENGTH_LONG).show();\n }\n progressDialog.dismiss();\n }\n });\n\n }" ]
[ "0.7192611", "0.7092799", "0.7052751", "0.6960698", "0.68912345", "0.6882512", "0.68165195", "0.6747676", "0.66590196", "0.6638194", "0.6580688", "0.6576754", "0.653814", "0.65346706", "0.6523531", "0.6487048", "0.64796215", "0.6477561", "0.6458177", "0.6431758", "0.6388773", "0.636692", "0.6355041", "0.6326158", "0.6315264", "0.63135636", "0.63001174", "0.6288471", "0.6275131", "0.6274366", "0.6268808", "0.6243955", "0.62349546", "0.62222457", "0.62222195", "0.62162447", "0.6209662", "0.6200135", "0.61957115", "0.619516", "0.6162168", "0.61617506", "0.6160561", "0.61587924", "0.61460674", "0.61409926", "0.61233956", "0.61197865", "0.61162144", "0.61115575", "0.6107533", "0.6107402", "0.6082162", "0.6079255", "0.6077395", "0.60756886", "0.60723376", "0.606367", "0.60541034", "0.6051905", "0.60368156", "0.6033176", "0.60299236", "0.60295796", "0.60244787", "0.6018111", "0.6014732", "0.60138094", "0.6011735", "0.60003763", "0.59954864", "0.59950995", "0.5967797", "0.59658664", "0.5964818", "0.5956432", "0.59509504", "0.59450966", "0.59422916", "0.5942018", "0.59376794", "0.59128356", "0.59041023", "0.590352", "0.5892769", "0.5890875", "0.58835626", "0.58835125", "0.5882808", "0.5874564", "0.5861529", "0.5857246", "0.58538246", "0.58538246", "0.58515286", "0.58505", "0.5849821", "0.58496064", "0.5846625", "0.5839886" ]
0.7075139
2
la misma funcion que en el caso anterior pero para poder ingresar
@Override public void onComplete(@NonNull Task<AuthResult> task) { //el oncomplete es para tener la comprobacion sea del campo del login o el singup if (task.isSuccessful()) { // si el usuario se encontraba creado entonces la tarea es exitosa int pos = email.indexOf("@"); userstring = email.substring(0, pos); //consigue el nombre del usuario Toast.makeText(Login.this, "Bienvenido: " + editTextEmail.getText(), Toast.LENGTH_LONG).show(); // consigue el email que habia sido asignado a la variable TextEmail Intent intencion = new Intent(getApplication(), UserView.class); // nueva actividad intencion.putExtra("user", email); // le pasa como dato al usuario ingresado a la proxima actividad startActivity(intencion); //hay que hacer el get del usuario en la parte principal // userapasar = user; loged = true; } else { loged = false; if (task.getException() instanceof FirebaseAuthUserCollisionException) {//si se presenta una colisiÛn Toast.makeText(Login.this, "Procesando", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(Login.this, "", Toast.LENGTH_LONG).show(); } } progressDialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void excavate();", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "public void Exterior() {\n\t\t\r\n\t}", "public void anterior(){//executa metodo que volta pagina de regitro de funcionarios\r\n\t\tdao.anterior();\r\n\t}", "@Override\n public void alRechazarOperacion() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n public int continuar() {\n // TODO Auto-generated method stub\n return 0;\n }", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "@Override\r\n\tprotected void processOk() {\n\t\tboolean isExito = consultarSustentoProxy.isExito();\r\n\t\tif (isExito) {\r\n\t\t\tint status = consultarSustentoProxy.getResponse().getStatus();\r\n\t\t\tif (status == 0) {\r\n\t\t\t\tList<SustentoTO> sustento = consultarSustentoProxy.getResponse().getListaSustento();\r\n\t\t\t\tadap = new EfficientAdapter(this, sustento);\r\n\t\t\t\tsetListAdapter(adap);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tshowToast(consultarSustentoProxy.getResponse().getDescripcion());\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tprocessError();\r\n\t\t}\r\n\t\tsuper.processOk();\r\n\t}", "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "public void sendeFehlerHelo();", "private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }", "@Override\n\tpublic void anular() throws ExcFiltroExcepcion {\n\n\t}", "void berechneFlaeche() {\n\t}", "private boolean poseeSaldoAnterior() {\n boolean retorno = false;\n if(saldoAnterior !=null){\n retorno = true;\n }\n return retorno;\n }", "public void inquiryError() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void correjir() throws ExcFiltroExcepcion {\n\n\t}", "@Override\n protected void adicionarLetrasErradas() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void trabajar() {\n\n\t}", "public void processarJogada(int resultadoDado1, int resultadoDado2, boolean PagamentoPrisao) throws Exception {\n\n\n if ((isResultadoDadoValido(resultadoDado1)) && (isResultadoDadoValido(resultadoDado2))) {\n\n if(bankruptcy && !listaJogadores.get(vez).ifRollAvaliable()){\n\n throw new Exception(\"Player can't roll dice when trying to avoid bankruptcy\");\n }\n\n if (!this.jogadorTerminouAVez() == true) {\n this.terminarAVez();// Prepara proxima jogada e coloca terminou vez para true\n\n }\n if (resultadoDado1 == resultadoDado2 && this.RegraJogadaDupla == true) {\n this.repete = true;\n this.duplasAcumuladas++;\n print(\"Repete foi ativado\");\n } else if (resultadoDado1 != resultadoDado2 && this.RegraJogadaDupla == true) {\n this.duplasAcumuladas = 0;\n this.repete = false;\n print(\"Repete foi desativado\");\n }\n\n\n if (this.duplasAcumuladas == 3 && this.RegraJogadaDupla == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n this.DeslocarJogador(jogadorAtual(), 10);\n this.duplasAcumuladas = 0;\n while (listaJogadoresNaPrisao.contains(listaJogadores.get(jogadorAtual()).getNome())) {\n PrepareNextJogada();\n }\n } else if (PagamentoPrisao == true) {\n this.pagarSaidaDaPrisao();\n pagouPrisaoRecentemente = true;\n this.repete = false;\n } else if (PagamentoPrisao == false) {\n if (this.repete == false) {\n this.terminarAVez();\n this.iniciarNovaVez();//coloca terminouVez para false\n }\n this.moverJogadorDaVez(resultadoDado1, resultadoDado2);\n this.repete = false;\n }\n\n\n this.print(\"Jogador \" + this.jogadorAtual());\n this.print(\"\\tEstá em \" + this.posicoes[this.jogadorAtual()]);\n this.print(\"\\tvai andar \" + (resultadoDado1 + resultadoDado2) + \" casas.\");\n\n\n\n }\n\n\n }", "@Override\n\tpublic void exucute() {\n\t\t\n\t}", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "public void acaba() \n\t\t{\n\t\t\tsigo2 = false;\n\t\t}", "public boolean proceedOnErrors() {\n return false;\n }", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "public void carroNoEncontrado(){\n System.out.println(\"Su carro no fue removido porque no fue encontrado en el registro\");\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void transformarse() throws ErrorNoCumpleReqTrans, ErrorNoHayMasTrans {\n\n\t}", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "public abstract boolean esComestible();", "@Override\n\tprotected void logic() {\n\n\t}", "boolean invokeOperation() {\n return false;\n }", "public boolean indietro();", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private boolean guardarAutorizacionReservaEmpresa(java.sql.Connection conExt, int indice, int CodEmp, int CodLoc, int CodCot){\n boolean blnRes=true;\n try{\n if(conExt!=null){\n if(moverItemsCotizacionReservaEmpresa(conExt,CodEmp, CodLoc, CodCot)){\n if(cambiarEstadoCotizacionAutorizada(conExt, CodEmp, CodLoc, CodCot,indice)){\n if(realizaMovimientoEntreEmpresas(conExt, CodEmp, CodLoc, CodCot)){\n //if(moverInvBodReservado(conLoc,intCodEmp,intCodLoc,intCodCot)){\n if(updateCotizacionProcesoSolicitaTransferenciaInventario(conExt, CodEmp, CodLoc, CodCot)){\n if(insertarCotizacionSeguimiento(conExt, CodEmp, CodLoc, CodCot)){\n if(blnGenSolTra ){\n Librerias.ZafMovIngEgrInv.ZafReaMovInv objReaMovInv = new Librerias.ZafMovIngEgrInv.ZafReaMovInv(objParSis,this ); \n Compras.ZafCom91.ZafCom91 objCom91 = new Compras.ZafCom91.ZafCom91(objParSis,1);\n arlDatSolTra = new ArrayList();\n arlDatSolTra=(objCom91.insertarSolicitudTransferenciaReservas(conExt,arlSolTraDat,CodEmp,CodLoc,CodCot));\n System.out.println(\"GeneraSolicitud\" + arlDatSolTra.toString());\n if(isSolTraInv(conExt,CodEmp,CodLoc,CodCot)){\n if(objReaMovInv.inicia(conExt, arlDat,datFecAux,arlDatSolTra,null)){\n if(modificaDetalleCotizacionCantidadesLocalesRemotasDos(conExt, CodEmp,CodLoc, CodCot)){\n System.out.println(\"OK PRESTAMOS\");\n }\n else{\n MensajeInf(\"Error al Guardar: Reservar mercaderia local\");\n System.out.println(\"GeneraSolicitud NO reservo local.....\");\n blnRes=false;\n }\n }else{\n MensajeInf(\"Error al Guardar: Prestamos entre empresas\");\n System.out.println(\"GeneraSolicitud No Genero la solicitud.....\");\n blnRes=false;\n }\n }\n else{\n MensajeInf(\"Error al Guardar: La solicitud de transferencia\");\n System.out.println(\"No Genero la solicitud.....\");\n blnRes=false;\n }\n objParSis.setCodigoMenu(intCodMnuResVenAut); // AUTORIZACIONES \n objReaMovInv = null;\n objCom91 = null;\n\n }\n else{\n /* Todo es local */\n// if(modificaDetalleCotizacionCantidadesLocalesRemotas(conExt, CodEmp, CodLoc, CodCot)){\n// System.out.println(\"OK PRESTAMOS\");\n// }\n// else{\n// MensajeInf(\"Error al Guardar: Reservar mercaderia local\");\n// System.out.println(\"GeneraSolicitud NO reservo local.....\");\n// blnRes=false;\n// }\n if(cotizacionSinSolicitudTransferencia(conExt,CodEmp,CodLoc,CodCot)){\n if(ponerItemsComoReservaLocal(conExt,CodEmp,CodLoc,CodCot)){\n System.out.println(\"generarEgresoMercaderiaReservada OK\");\n }\n else{\n MensajeInf(\"Error al Guardar: Reservar mercaderia local\");\n System.out.println(\"GeneraSolicitud NO reservo local.....\");\n blnRes=false;\n }\n }\n }\n /* Genera Egreso de reserva */\n }else{blnRes=false;MensajeInf(\"Error al Guardar: Insertando Cotizacion en el seguimiento\");}\n }\n //}\n }else{blnRes=false;MensajeInf(\"Error al Guardar: Realizando Movimiento Entre Empresas \");}\n }\n }\n }\n }\n catch(Exception Evt){ \n objUti.mostrarMsgErr_F1(this, Evt);\n blnRes=false;\n } \n return blnRes;\n }", "private static boolean isDone0(Object result)\r\n/* 74: */ {\r\n/* 75:110 */ return (result != null) && (result != UNCANCELLABLE);\r\n/* 76: */ }", "@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void escoger(){\n partida.escoger(ficha1,ficha2);\n ficha1=null;\n ficha2=null;\n this.ok=partida.ok;\n }", "@Override\n\tpublic void verificar() {\n\t\tsuper.verificar();\n\t}", "protected void failed()\r\n {\r\n //overwrite\r\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private boolean validacionesSolicitarReserva(int indice, int CodEmp, int CodLoc, int CodCot, boolean isSol){\n boolean blnRes=true;\n try{\n if(!validaItemsServicio(CodEmp, CodLoc, CodCot)){\n blnRes=false;\n MensajeInf(\"La cotizacion contiene Items de Servicio o Transporte, los cuales no deben ser reservados.\");\n }\n\n if(!validaFechasMAX(indice, tblDat.getValueAt(indice,INT_TBL_DAT_STR_TIP_RES_INV).toString(),isSol)){\n blnRes=false;\n MensajeInf(\"La Fecha solicitada es mayor a la permitida, revise la Fecha y vuelva a intentarlo\");\n }\n \n if(!validaTerminalesLSSegunEmpresaLocal(CodEmp,CodLoc,CodCot)){\n blnRes=false;\n MensajeInf(\"No puede solicitar reserva de codigos L/S en este local, debe reservarlo por el local que puede ser facturado\");\n }\n \n if(!validaFechasPrimerDiaLaboral(indice,isSol,CodEmp,CodLoc)){\n blnRes=false;\n MensajeInf(\"La Fecha solicitada, no corresponde al primer dia laboral registrado\");\n } \n \n if(tblDat.getValueAt(indice,INT_TBL_DAT_STR_TIP_RES_INV).toString().equals(\"R\")){\n if(!validaTerminalesLReservaLocal(CodEmp,CodLoc,CodCot)){\n blnRes=false;\n MensajeInf(\"No puede solicitar Reserva en Empresa de Codigos L \");\n }\n }\n }\n catch(Exception e){\n objUti.mostrarMsgErr_F1(null, e);\n blnRes=false;\n }\n return blnRes;\n }", "private void inizia() throws Exception {\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "final void checkForComodification() {\n\t}", "@Override\n\tpublic void procesar() throws WrongValuesException, ExcEntradaInconsistente {\n\n\t}", "public void selecao () {}", "private void accionIngresar() {\n\n\t\tString fieldCodigo = this.textCodigo.getText();\n\t\tString fieldNombre = this.textNombre.getText();\n\t\tString fieldDescripcion = this.textDescripcion.getText();\n\t\tString fieldTelefono = this.textTelefono.getText();\n\n\t\t// Si alguno es vacío, mostramos una ventana de mensaje\n\t\tif (fieldNombre.equals(\"\") || fieldCodigo.equals(\"\") || fieldDescripcion.equals(\"\") || fieldTelefono.equals(\"\")) {\n\t\t\tJOptionPane.showMessageDialog(frame, \"Debe completar todos los datos marcados con (*).\", \"Datos incompletos!\",\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\n\t\t\treturn; }\n\t\t\n\t\t// Controlo el maximo de caracteres\n\t\tif (fieldCodigo.length() > 5) {\n\t\t\tJOptionPane.showMessageDialog(frame, \"El código puede contener máximo 5 caracteres\", \"Datos inválidos!\",\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t\t\treturn;\n\t\t} else if (fieldNombre.length() > 20) {\n\t\t\tJOptionPane.showMessageDialog(frame, \"El nombre puede contener máximo 20 caracteres\", \"Datos inválidos!\",\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t\t\treturn;\n\t\t} else if (fieldDescripcion.length() > 100) {\n\t\t\tJOptionPane.showMessageDialog(frame, \"La descripción puede contener máximo 100 caracteres\", \"Datos inválidos!\",\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t\t\treturn;\n\t\t} else if (fieldTelefono.length() > 20) {\n\t\t\tJOptionPane.showMessageDialog(frame, \"El teléfono puede contener máximo 20 caracteres\", \"Datos inválidos!\",\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Controlo que el fenomeno no exista ya\n\t\t\n\t\tboolean existe;\n\t\t\n\t\ttry{\n\t\t\texiste = ClienteGeoPosUy.ExisteFenomeno(fieldNombre);\n\t\t} catch (Exception e){\n\t\t\tJOptionPane.showMessageDialog(frame, \"Error de conexión con el servidor. Intente más tarde.\",\n\t\t\t\t\t\"Error de conexión!\", JOptionPane.WARNING_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (existe) {\n\t\t\tJOptionPane.showMessageDialog(frame, \"Ya existe un fenómeno con ese nombre\",\n\t\t\t\t\t\"Fenómeno existente!\", JOptionPane.WARNING_MESSAGE);\n\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Si todo va bien lo doy de alta\n\t\t\n\t\tboolean almacenado = false;\n\t\ttry {\n\t\t\talmacenado = ClienteGeoPosUy.crearFenomeno(fieldCodigo, fieldNombre, fieldDescripcion, fieldTelefono);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (almacenado) {\n\t\t\tJOptionPane.showMessageDialog(frame, \"El fenómeno ha sido registrado con éxito.\",\n\t\t\t\t\t\"Cliente Registrado!\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\t\t// cerramos la ventanta\n\t\t\tthis.frame.dispose();\n\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tJOptionPane.showMessageDialog(frame, \"Hubo un error al almacenar. Intente nuevamente más tarde\",\n\t\t\t\t\t\"Error al registrar!\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\t\n\t\t\n}", "private boolean guardarSolicitudReservaFacturaAutomatica(java.sql.Connection conExt,int indice ,int CodEmp,int CodLoc, int CodCot ){\n boolean blnRes=true;\n try{\n if(conExt!=null){\n if(solicitarAutorizacionCxC(CodEmp, CodLoc, CodCot)){\n /* PASO 1: Ventana de Pedidos a otras bodegas */\n if(existenTerminalesPedidos(CodEmp, CodLoc, CodCot)){\n ZafVen42_03 objVen42_03 = new ZafVen42_03(javax.swing.JOptionPane.getFrameForComponent(this), objParSis,CodEmp,CodLoc,CodCot);\n objVen42_03.show();\n if(objVen42_03.acepta()){\n arlDatRes = objVen42_03.getArlDatRes();\n if(!arlDatRes.isEmpty()){\n if(modificaChecksPedOtrBod(CodEmp,CodLoc)){\n objTblMod.setValueAt(true, indice, INT_TBL_DAT_CHK_PED_OTR_BOD); \n }\n }else{blnRes=false;}\n }else{blnRes=false;}\n objVen42_03 = null;\n }\n\n if(blnRes){\n /* PASO 2: Codigos L */\n if(existenCodigosL(CodEmp, CodLoc, CodCot)){\n arlDatCodL = new ArrayList();\n ZafVen42_04 objVen42_04 = new ZafVen42_04(javax.swing.JOptionPane.getFrameForComponent(this), objParSis,CodEmp,CodLoc,CodCot);\n objVen42_04.show();\n if (objVen42_04.acepta()) {\n arlDatCodL = objVen42_04.getArlDatResTerL();\n if(!arlDatCodL.isEmpty()){\n if(modificarCotizacionCompras(conExt)){\n System.out.println(\"ok L \");\n }else{ blnRes = false;MensajeInf(\"Error al Guardar: Modificando los codigo L\");}\n }else{blnRes = false;}\n }else{blnRes = false;}\n objVen42_04 = null;\n }\n }\n /* PASO 3: Configuracion de Despachos por cliente fue inactivada */\n // PENDIENTE DE SALIR -- JM 13/Jul/2017\n// if(blnRes){\n// if(!revisarDespachosCliente(CodEmp, CodLoc, CodCot)){\n// ZafVen42_06 objVen42_06 = new ZafVen42_06(javax.swing.JOptionPane.getFrameForComponent(this), objParSis,intCodEmp,intCodLoc,intCodCot,arlDatRes);\n// objVen42_06.show();\n// if(objVen42_06.acepta()){\n// System.out.println(\"ok Configuracion despachos \");\n// }\n// else{\n// MensajeInf(\"Error al Guardar: Insertando los datos del despacho\");\n// blnRes=false;\n// }\n// objVen42_06 = null;\n// }\n// }\n // PENDIENTE DE SALIR -- JM 13/Jul/2017 \n /* PASO 4: Grabar configuracion y guarda en la tabla de pedidos a otras bodegas */\n if(blnRes){\n if(modificarDatosDetallesCotizacionBodegasReserva(conExt,CodEmp,CodLoc,CodCot,indice)){ // DETALLE DE LA COTIZACION\n if(pedidosBodegaDestino(conExt,CodEmp,CodLoc,CodCot)){\n// if(terminalesStockLocal(conExt,CodEmp,CodLoc,CodCot)){ /* NO EXISTE ESTO es un terminal que debe estar configurado */\n System.out.println(\"ok prestamos \");\n// }else{blnRes=false;MensajeInf(\"Error al Guardar: Insertando pedidos Otras bodegas 3\"); }\n }else{blnRes=false;MensajeInf(\"Error al Guardar: Insertando pedidos Otras bodegas 2\"); }\n }else{blnRes=false;MensajeInf(\"Error al Guardar: Insertando pedidos Otras bodegas\"); }\n }\n /* PASO 5: Tabla grande nueva, items segun la forma de despacho */\n if(blnRes){\n if(existenTerminalesPedidos(CodEmp, CodLoc, CodCot)){\n ZafVen42_07 objVen42_07 = new ZafVen42_07(javax.swing.JOptionPane.getFrameForComponent(this), objParSis,conExt,CodEmp,CodLoc,CodCot);\n objVen42_07.show();\n if (objVen42_07.acepta()){\n strSql=objVen42_07.getCadenaInsertBodegasDespacho();\n if(strSql.length()>0){\n if(modificarDatosBodegaDespacho(conExt,strSql)){\n System.out.println(\"ok Configuracion/Modificacion Despachos \");\n }else{blnRes=false;MensajeInf(\"Error al Guardar: Modificacion en los datos del despacho\");}\n }else{blnRes=false;}\n }\n else{\n blnRes=false;\n MensajeInf(\"Error al Guardar: Modificacion en los datos del despacho\");\n }\n objVen42_07 = null;\n }\n }\n\n /* PASO 6: Modificacion en el estado de la cotizaicon*/\n if(blnRes){\n if(modificarEstadoCotizacion(conExt,CodEmp,CodLoc,CodCot,indice)){\n System.out.println(\"ok modificarEstadoCotizacion\");\n }\n else{\n MensajeInf(\"Error al Guardar: Modificacion de la Cotizacion de venta\");\n blnRes=false;\n }\n }\n }\n else{\n MensajeInf(\"Error al Guardar: Controles de CxC\");\n blnRes=false;\n }\n }\n }\n catch(Exception Evt){ \n objUti.mostrarMsgErr_F1(this, Evt);\n blnRes=false;\n } \n return blnRes;\n }", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "private void checkExecutionStatus() {\r\n\t\tif (detenido) {\r\n\t\t\tthrow new RejectedExecutionException(\"el procesador está detenido. no puede aceptar más tareas\");\r\n\t\t}\r\n\t}", "private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}", "@Override\r\n\tpublic void realizarTransacción() {\n\t\tSystem.out.println(\"Transaccion en progreso\");\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void borrarDatosOk() {\n\n\t}", "@Override\r\n public void salir() {\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "private static void cajas() {\n\t\t\n\t}", "private static void askForContinue() {\n\t\t\t\n\t\t}", "public void esperarRecogidaIngrediente(){\n enter();\n if ( ingredienteact != -1 )\n estanquero.await();\n leave();\n }", "@Override public final boolean onExceptionalCompletion(Throwable ex, CountedCompleter caller ) {\n //if( _nleft != null ) _nleft.cancel(true); _nleft = null;\n //if( _nrite != null ) _nrite.cancel(true); _nrite = null;\n //if( _left != null ) _left.cancel(true); _left = null;\n //if( _rite != null ) _rite.cancel(true); _rite = null;\n _nleft = _nrite = null;\n _left = _rite = null;\n return super.onExceptionalCompletion(ex, caller);\n }", "private static void concretizarRegisto(String nome, int escalao) {\n\t\tif (gestor.registarFuncionario(nome, escalao))\n\t\t\tSystem.out.println(\"REGISTO do funcionario \" + nome + \" com escalao \" + escalao);\n\t\telse \n\t\t\tSystem.out.println(\"ERRO: Nao foi possivel registar o funcionario \" + nome);\n\t}", "public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }", "public void NopagaImpuestos(){\n\t\tif(sueldoBruto<BASE_MINIMA_IMPUESTOS){\n\t\tsueldoNeto=sueldoBruto;\n\t\ttipoImpuesto=\"En esta ocasión no paga impuestos\";\n\t\t}\n\t}", "public void verificarRastro() {\n verificarRastroFormulaProceso();\n index = -1;\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}", "public boolean deposito(int idConta, double quantia) {\n try {\n Conta conta = new Conta(idConta); //deveria poder fazer isto\n boolean executado = conta.depositoConta(quantia);\n System.out.println(executado ? \"Deposito efetuado com sucesso.\" : \"Erro ao Efeuar o Deposito\" );\n return executado;\n } catch (Exception e) {\n System.out.println(\"Erro no serviço deposito: \" + e.getMessage());\n return false;\n } \n}", "private void limpiar() {\n // Si se llega a usar este método es porque ha habido una excepción (ya sea por un verdadero\n // error o porque el cliente ha terminado la conexión o porque han pasado\n // TIEMPO_DESCONEXION_AUTOMATICA milisegundos sin comunicación del cliente).\n // Nótese que el código de cierre es riguroso: una versión más abreviada podría limitarse\n // a intentar cerrar el socket (los flujos de E/S se cierran al cerrarse éste); el único problema\n // que podría aparecer en esa versión del código es que podrían quedarse abiertos los flujos si\n // no se pudiera cerrar el socket (esta posibilidad es inhabitual: normalmente, si el socket no\n // se puede cerrar es porque ya se había cerrado antes).\n // El igualar entrada, salida y socket a null es una buena práctica cuando se puede llamar\n // varias veces a limpiar(); así se evita intentar cerrar dos veces un objeto.\n if ( entrada != null ) {\n try {\n entrada.close();\n }\n catch (IOException e1) {}\n entrada = null;\n }\n if ( salida != null ) {\n salida.close();\n salida = null;\n }\n if ( socket != null ) {\n try {\n socket.close();\n } \n catch (IOException e2) {}\n socket = null;\n }\n }", "long invalidations();", "@Override\r\n\tpublic int contarPasajeros() {\n\t\treturn 0;\r\n\t}", "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\n\t}", "private void registroErroneo(InterfazParams interfazParams) {\n\t\tLong registrosErroneos = (Long) interfazParams.getQueryParams().get(\n\t\t\t\t\"registrosErroneos\");\n\t\tregistrosErroneos = new Long(registrosErroneos.longValue() + 1);\n\t\tinterfazParams.getQueryParams().put(\"registrosErroneos\",\n\t\t\t\tregistrosErroneos);\n\t}", "static void complete_return_requirements(){\n\t\tString ad = memory.get(SP+1)+memory.get(SP);\n\t\tSP+=2;\n\t\tPC = hexa_to_deci(ad);\n\t\tmodified =true;\n\t}", "public void cargarSecuencia(FacturaProveedorSRI facturaProveedorSRI, PuntoDeVenta puntoDeVenta)\r\n/* 277: */ throws ExcepcionAS2\r\n/* 278: */ {\r\n/* 279:280 */ AutorizacionDocumentoSRI autorizacionDocumentoSRI = null;\r\n/* 280:283 */ if (puntoDeVenta != null) {\r\n/* 281:284 */ autorizacionDocumentoSRI = this.servicioDocumento.cargarDocumentoConAutorizacion(getFacturaProveedorSRI().getDocumento(), puntoDeVenta, facturaProveedorSRI\r\n/* 282:285 */ .getFechaEmisionRetencion());\r\n/* 283: */ }\r\n/* 284:287 */ if ((Integer.parseInt(facturaProveedorSRI.getNumeroRetencion()) == 0) || (\r\n/* 285:288 */ (facturaProveedorSRI.getDocumento() != null) && (facturaProveedorSRI.getDocumento().isIndicadorDocumentoElectronico()) && \r\n/* 286:289 */ (!facturaProveedorSRI.isTraCorregirDatos())))\r\n/* 287: */ {\r\n/* 288:290 */ String numero = this.servicioSecuencia.obtenerSecuencia(getFacturaProveedorSRI().getDocumento().getSecuencia(), facturaProveedorSRI\r\n/* 289:291 */ .getFechaEmisionRetencion());\r\n/* 290: */ \r\n/* 291:293 */ facturaProveedorSRI.setNumeroRetencion(numero);\r\n/* 292:294 */ facturaProveedorSRI.setAutorizacionRetencion(autorizacionDocumentoSRI.getAutorizacion());\r\n/* 293: */ }\r\n/* 294: */ }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "void faild_response();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void carroAgregado(){\n System.out.println(\"Su carro fue agregado con exito al sistema\");\n }", "@Override\n\tpublic void imprimir() {\n\t\t\n\t}", "@Override\n\tpublic boolean postIt() {\n\t\treturn false;\n\t}", "private void verificaData() {\n\t\t\n\t}", "private boolean Verific() {\n\r\n\treturn true;\r\n\t}", "public void abrirCerradura(){\n cerradura.abrir();\r\n }", "@Override\n\tpublic boolean verificarCancelar() {\n\t\treturn true;\n\t}", "private void ingresarReserva() throws Exception {\r\n\t\tif (mngRes.existeReservaPeriodo(getSitio().getId())) {\r\n\t\t\tif (mayorEdad) {\r\n\t\t\t\tmngRes.crearReserva(getEstudiante(), getSitio(), periodo.getPrdId(), null);\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t} else {\r\n\t\t\t\tmngRes.crearReserva(getEstudiante(), getSitio(), periodo.getPrdId(),\r\n\t\t\t\t\t\tgetDniRepresentante() + \";\" + getNombreRepresentante());\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t}\r\n\t\t\tMensaje.crearMensajeINFO(\"Reserva realizada correctamente, no olvide descargar su contrato.\");\r\n\t\t} else {\r\n\t\t\tMensaje.crearMensajeWARN(\"El sitio seleccionado ya esta copado, favor eliga otro.\");\r\n\t\t}\r\n\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "private void correctError()\r\n\t{\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void exibir() {\n\t\t\r\n\t\tSystem.out.println(\"Condicoes atuais: \" + temp + \"°C e \" + umid + \"% de umidade \" \r\n\t\t\t\t+ pressao + \" pressao\");\r\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void frear() throws FrenagemDesligadoException {\n\t\t\n\t}", "@Entao(\"^nao sera possivel por falta de estoque$\")\n\tpublic void naoSeraPossivelPorFaltaDeEstoque() throws Throwable {\n\t throw new PendingException();\n\t}", "@Override\n\tpublic void darMasaje() {\n\t\t\n\t}" ]
[ "0.63014", "0.62727314", "0.6265241", "0.6237964", "0.6199529", "0.61256677", "0.6123586", "0.6098582", "0.6041384", "0.5958276", "0.5953085", "0.5950457", "0.59483206", "0.594435", "0.5900438", "0.589916", "0.58846664", "0.58628845", "0.58628654", "0.5861068", "0.58590806", "0.5839099", "0.5833096", "0.5831155", "0.583066", "0.5805132", "0.57915205", "0.577652", "0.57764894", "0.576816", "0.57598937", "0.57481664", "0.57481664", "0.57481664", "0.57481664", "0.57481664", "0.5744871", "0.5736722", "0.5729325", "0.57283545", "0.570786", "0.5707624", "0.5700668", "0.56993365", "0.5697856", "0.5689468", "0.5681984", "0.56783557", "0.56672823", "0.56626594", "0.5661768", "0.5658119", "0.5650778", "0.5635991", "0.5629153", "0.5628431", "0.56271946", "0.5608715", "0.560428", "0.56026745", "0.5602494", "0.5601836", "0.56017065", "0.55967915", "0.5591465", "0.5589787", "0.5582727", "0.55812585", "0.55763626", "0.55704737", "0.556553", "0.55612993", "0.55608225", "0.5557102", "0.5555652", "0.55503273", "0.5548286", "0.55444497", "0.55442166", "0.5536108", "0.55288535", "0.5522584", "0.55220866", "0.5521988", "0.55192506", "0.55187917", "0.5517324", "0.5512402", "0.551227", "0.5510716", "0.5507463", "0.5504346", "0.5503536", "0.5502801", "0.5502801", "0.54993916", "0.54961383", "0.5490204", "0.5488229", "0.5486202", "0.5485357" ]
0.0
-1
Intentando agregar el uso de la id
public void shared() { String Email = editTextEmail.getText().toString(); String Password = editTextPassword.getText().toString(); String username = userstring; SharedPreferences sharedlog = getSharedPreferences("usernamelast" , MODE_PRIVATE); SharedPreferences.Editor editorlogin = sharedlog.edit(); editorlogin.putString("usernamelast", username); editorlogin.apply(); SharedPreferences sharedPref = getSharedPreferences("email", MODE_PRIVATE); SharedPreferences.Editor editor = sharedPref.edit(); editor.putString("email", Email); editor.apply(); //Los estados los podemos setear en la siguiente actividad SharedPreferences sharedPref2 = getSharedPreferences("password", MODE_PRIVATE); SharedPreferences.Editor editor2 = sharedPref2.edit(); editor2.putString("password", Password); editor2.apply(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "II addId();", "public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }", "private void AutoID() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "void addId(II identifier);", "public void generarId() {\n try{\n int numAleatorio = (int)(Math.random()*99999);\n boolean resultado = dgt.generarIdAutomatico(numAleatorio);\n tfid.setText(String.valueOf(numAleatorio));\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "public void AddUserDepot(String id, String label) {\r\n try {\r\n UserManager mydb = new UserManager(activity);\r\n mydb.open();\r\n mydb.AddUserWarehouse(id, label);\r\n mydb.close();\r\n }catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void setId_usuario(String usuario) {\n this.id_usuario = usuario;\n }", "public void asignarID(Object id) {\n\n propiedad temporal;\n for (int i = 0; i < this.listadoElementos.size(); i++) {\n temporal = listadoElementos.get(i);\n if (temporal instanceof propiedadId) {\n propiedadId v = (propiedadId) temporal;\n if (!id.toString().equalsIgnoreCase(\"\")) {\n v.idElemento = id.toString();\n this.listadoElementos.set(i, v);\n break;\n\n }\n }\n }\n \n propiedadId n =new propiedadId(id);\n this.listadoElementos.add(n);\n }", "public com.walgreens.rxit.ch.cda.II addNewId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.II target = null;\n target = (com.walgreens.rxit.ch.cda.II)get_store().add_element_user(ID$6);\n return target;\n }\n }", "Boolean agregar(String userName, Long idProducto);", "public addEspecieComercializada(String id_especies_comercializadas) {\n initComponents();\n conexao = new Conexao();\n conexao.conecta(\"mil_interface\");\n System.out.println(\"especies_comercializadas\");\n idd_especie_comercializada = id_especies_comercializadas;\n\n }", "public void setId_tecnico(java.lang.Long newId_tecnico);", "public void setIdPtoServicio(String idPtoServicio);", "String idProvider();", "public void setId(String uid){\n this.uid = uid;\n }", "void addId(String root);", "public void wypelnij(){\n ArrayList<ComboUserInsert> tmp = a.getAllUsers();\n for(int i = 0 ; i < tmp.size(); i++){\n uzytkownicy.addItem(tmp.get(i));\n }\n uzytkownicy.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e){\n Object item = uzytkownicy.getSelectedItem();\n chosen_id = ((ComboUserInsert)item).id;\n }\n });\n }", "public void setUsua_id(java.lang.Long newUsua_id);", "public void addID(int id){\n IDList.add(id);\n }", "public void setIdUsuario(Integer idUsuario) {\n this.idUsuario = idUsuario;\n }", "public void setID(String idIn) {this.id = idIn;}", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "@Override public void onClick(View view) {\n Intent nuevo_lugar = new Intent(getApplicationContext(), EdicionLugarActivity.class);\n nuevo_lugar.putExtra(\"_id\", \"UID\");\n startActivity(nuevo_lugar);\n }", "@Override\n public String getId() {\n return \"1\";\n }", "void setId(String id);", "void setId(String id);", "void setId(String id);", "public void addNeeded(long id) {\n\t\tidTracker.set(id);\n\t}", "private void setId(Integer id) { this.id = id; }", "public void setId(int id){ this.id = id; }", "public void setIdUsuario(int value) {\n this.idUsuario = value;\n }", "@Override\n\tpublic void setUniqueId(int id) {}", "@Override\r\n public int getId() {\n return id;\r\n }", "private void setId(int ida2) {\n\t\tthis.id=ida;\r\n\t}", "@Override\n public int getId() {\n return 0;\n }", "protected void addIdPropertyDescriptor ( Object object )\n {\n itemPropertyDescriptors.add ( createItemPropertyDescriptor ( ( (ComposeableAdapterFactory)adapterFactory ).getRootAdapterFactory (), getResourceLocator (), getString ( \"_UI_Site_id_feature\" ), getString ( \"_UI_PropertyDescriptor_description\", \"_UI_Site_id_feature\", \"_UI_Site_type\" ), GlobalPackage.Literals.SITE__ID, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null ) );\n }", "void suplantarIdUsuer(String nombre) throws Exception {\n\t\tLibro[] librosPres = new Libro[Const.MAXLIBROSPRES];\n\t\tint bpn = busquedaPrimerNulo();\n\t\tUsuario[] vu = ArrayObject.listadoUsuarios();\n\n\t\tMiObjectInputStream oi = null;\n\n\t\ttry { // comprueba que el archivo FUSUARIOS existe antes de leerlo\n\t\t\toi = new MiObjectInputStream(new FileInputStream(Const.FUSUARIOS));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Archivo no encontrado - suplantarIdUsuer - \" + e.toString());\n\t\t}\n\n\t\t// busca donde se encuentra el primer usuario null del archivo para crear un\n\t\t// usuario nuevo en ese mismo lugar para obtener un id ordenado. Del mismo modo\n\t\t// la primera vez que esto se ustiliza llena el archivode usuarios de nulos pero\n\t\t// no elimna los usuarios que se encuentran por debajo\n\t\tUsuario u = (Usuario) oi.readObject();\n\t\tu = new Usuario(bpn, nombre, librosPres);\n\t\tvu[bpn] = u;\n\n\t\ttry {\n\t\t\tFileOutputStream fo = new FileOutputStream(Const.FUSUARIOSAUX, true);\n\t\t\tMiObjectOutputStream oo = new MiObjectOutputStream(fo);\n\t\t\tint i = 0;\n\t\t\twhile (i < vu.length) {\n\t\t\t\tu = vu[i];\n\t\t\t\too.writeObject(u);\n\t\t\t\ti++;\n\t\t\t} // finaliza el while para la lectura\n\t\t\too.close();\n\n\t\t} catch (Exception e) { // encaso de encontrar el archivos pero no puede leerlo\n\t\t\tSystem.out.println(\"Problemas al leer el archivo - suplantarIdUsuer - \" + e.toString());\n\t\t}\n\t\toi.close();\n\t}", "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void llenarPorId(Object id) {\n\t\t\n\t}", "void addId(String root, String extension);", "public void setId (String id);", "protected String getFactoryID( String id ){\n return id;\n }", "public void agregarMobibus(Mobibus mobibus);", "@Override\n public int loadAutoID() {\n return 0;\n }", "public void setIdLocacion(Integer idLocacion);", "public Edificio( String id )\n {\n identificador = id;\n salones = new ArrayList<Salon>( );\n }", "@Import(\"id\")\n\tint getId();", "public void add (String id, String email, int type, String name);", "private int getId() {\r\n\t\treturn id;\r\n\t}", "void setId(java.lang.String id);", "@Override\n public void definirId(Endereco objeto, int id) {\n objeto.setId(id);\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "private int generateNewId() {\n int size = userListCtrl.getUsers().size();\n \n if (size == 0) {\n return 1;\n } else {\n return userListCtrl.getUsers().get(size-1).getUserID()+1;\n }\n }", "public void setId_user(int id_user) {\r\n this.id_user = id_user;\r\n }", "@Override\n\tpublic void setId(Integer arg0) {\n\n\t}", "ParqueaderoEntidad agregar(String nombre);", "int getId() throws UnsupportedOperationException;" ]
[ "0.6236386", "0.5992491", "0.59852993", "0.5976782", "0.59230584", "0.5873705", "0.58666766", "0.58086383", "0.5785979", "0.5752428", "0.57294196", "0.57210124", "0.5706818", "0.56722826", "0.5668418", "0.56662464", "0.5659408", "0.5656483", "0.5636437", "0.5625538", "0.5625424", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5608724", "0.5599923", "0.5592071", "0.5586371", "0.5586371", "0.5586371", "0.55801475", "0.5578887", "0.5574682", "0.5560905", "0.5559723", "0.55565584", "0.5547521", "0.55416757", "0.5536388", "0.553484", "0.5529091", "0.55160725", "0.5512322", "0.5511601", "0.55115527", "0.55111885", "0.55067027", "0.55051917", "0.550295", "0.54889685", "0.54845387", "0.54844266", "0.5480731", "0.54798543", "0.5477511", "0.5474449", "0.5474449", "0.54691166", "0.54683965", "0.546772", "0.5449575", "0.54488194" ]
0.0
-1
This method will throw the Service exception
public DBException(String message) { super(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataAccessorServiceException() {\n }", "public void testSetService() throws Exception {\n }", "public DataAccessorServiceException(String msg) {\n super(msg);\n }", "@Test\n\tpublic void test() throws ServiceException {\n\t}", "public static String _service_create() throws Exception{\nreturn \"\";\n}", "public AlfrescoServiceException(final Throwable cause) {\n super(cause);\n }", "@Override\n\t\tpublic void onServiceError(String error) {\n\n\t\t}", "@Override\n\t\tpublic void onServiceError(String error) {\n\n\t\t}", "public SearchServiceException()\n\t{\n\t\t// Documented empty block\n\t}", "public ServiceAlreadyRemovedFromServicePackageException(Throwable cause) {\n\t\tsuper(cause);\n\t}", "public JiraServiceException(Throwable cause) {\r\n super(cause);\r\n }", "@Override\n\tpublic void start() throws ServiceException\n\t{\n\t\t\n\t}", "@Test\n public void testLoad() throws Exception {\n try{\n service.load();\n } catch(Exception e){\n fail(\"Exception should not be thrown on load!!!!!\");\n }\n }", "public OperationException() {\n super();\n }", "@Test(expected = NuxeoFraSCAtiException.class)\n public void testThrowExceptionIfGetUnexistingService() throws NuxeoFraSCAtiException { \t\n \tRunnable r = frascatiService.getService(fcomponent.getComponent(), \"unknown\", Runnable.class); \t\n }", "public ServiceException(String message, Throwable cause){\n super(message, cause);\n }", "public AlfrescoServiceException(final String message) {\n super(message);\n }", "public GetEtudiantServiceException() {\n super(BaseService.messageExceptionEtudiantGet);\n BaseService.logger.info(BaseService.messageExceptionEtudiantGet);\n }", "public BusinessObjectException() {\r\n super();\r\n }", "public SearchServiceException(String message)\n\t{\n\t\tsuper(message);\n\t}", "public CommunicationException() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tpublic void doException() {\n\r\n\t}", "public OperationException(Throwable cause) {\n super(cause);\n }", "public DataAccessLayerException() {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "@Override\n public void onFailure(int code) {\n Log.e(TAG, \"addServiceRequest Failure \" + code);\n mService.stopSelf();\n }", "public AdminServiceFacadeFault() {\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 VTorInUseException() {\n super();\n }", "@Override\n public void onRequestFailure(SpiceException spiceException) {\n }", "private SmartServiceException createException(Throwable t, String key, Object... args) {\n return new SmartServiceException.Builder(getClass(), t).userMessage(key, args).build();\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "private void assertService() {\n \t\n if(mLedService == null) {\n throw new IllegalStateException(\"LedClient not connected\");\n }\n }", "public JiraServiceException() {\r\n }", "public ViaturaExistenteException(){\n super();\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "public JiraServiceException(String message) {\r\n super(message);\r\n }", "public ServiceAlreadyRemovedFromServicePackageException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}", "private void throwsError() throws OBException {\n }", "public OrderServiceSecurityException() {\n\t}", "@Override\n public void Wsdl2CodeFinishedWithException(Exception ex) {\n }", "@Override\n public void onClosedWatchServiceException(ClosedWatchServiceException x) {\n\n }", "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 SureBetNotFoundException(Exception exception) {\r\n\t\tsuper(exception);\r\n\t}", "@Test\n public void testSaveCurrentProgress() throws Exception {\n try{\n service.saveCurrentProgress();\n } catch(Exception e){\n fail(\"Exception should not be thrown on save!!!\");\n }\n }", "public HealthInformationExchangeException(Exception cause)\n\t{\n\t\tsuper(cause);\n\t}", "public TechnicalException() {\r\n }", "interface serviceproducts\n{\n void AddProduct() throws Exception;\n}", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "public ApiLimitException() {\n super();\n }", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "public OLMSException() {\r\n super();\r\n }", "public AlfrescoServiceException(final String message, final Throwable cause) {\n super(message, cause);\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "public JiraServiceException(String message, Throwable cause) {\r\n super(message, cause);\r\n }", "public OpenXdataDataAccessException() {\r\n \tsuper(\"A Data Base Access Exception occurred.\");\r\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "public OrderServiceSecurityException(String msg) {\n\t\tsuper(msg);\n\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "public CredentialManagerException() {\n\t\tsuper();\n\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "public ExpiredProductAddedException(){\r\n super(\"Attedmpted to add expired product to the database\");\r\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "public ServiceInstanceUpdateNotSupportedException(Throwable cause) {\n\t\tsuper(MESSAGE_PREFIX, cause);\n\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "private static void throwError(ApplicationContext context) {\n DisplayService displayService = (DisplayService) context.getBean(DisplayService.class);\n throw new IllegalArgumentException(displayService.getMessage(Constants.USAGE_MESSAGE, ProductService.getProductsNames()));\n }", "public Exception() {\n\t\t\tsuper();\n\t\t}", "public StockException() {\r\n\t\tsuper();\r\n\t}", "void failure(ServiceExecutionEvent e) {\n\n }", "@Override\n protected boolean shouldSendThrowException() {\n return false;\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "public ContainerAlreadyExistsInFacilityException() {\r\n\t\tsuper();\r\n\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n\n }", "public ItemNotFoundException() {\n super();\n }", "public PriceModelException() {\n\n }", "public NotBoundException(){\n\t\t super();\n\t }" ]
[ "0.682824", "0.6766682", "0.6704666", "0.66881055", "0.6659916", "0.6514968", "0.64872515", "0.64872515", "0.64484614", "0.64157104", "0.63903373", "0.63542557", "0.63042647", "0.6290622", "0.6244622", "0.6236733", "0.6175353", "0.61490625", "0.6094792", "0.6066969", "0.6057967", "0.60457116", "0.6025211", "0.6019391", "0.6013003", "0.6007562", "0.598403", "0.5978295", "0.5977451", "0.59763914", "0.59753215", "0.5965206", "0.596488", "0.59561896", "0.59552705", "0.5951902", "0.5951902", "0.5951178", "0.5938138", "0.5936394", "0.5913788", "0.59030086", "0.58991474", "0.589828", "0.58942306", "0.5892888", "0.58909065", "0.5878295", "0.5875956", "0.5874653", "0.58648694", "0.5860289", "0.58576554", "0.58576554", "0.5856246", "0.58552766", "0.5830484", "0.5830484", "0.582233", "0.58214647", "0.5819919", "0.5819919", "0.5813716", "0.5812799", "0.5812799", "0.5807157", "0.5804322", "0.5804322", "0.5804322", "0.5804322", "0.5804322", "0.5799469", "0.5799469", "0.5799469", "0.5799469", "0.5799469", "0.5799469", "0.5799469", "0.5799469", "0.5799469", "0.5799469", "0.5792882", "0.5792882", "0.57914263", "0.57895654", "0.57895654", "0.57895654", "0.57895654", "0.5784593", "0.5778613", "0.5777385", "0.5768633", "0.5764117", "0.5762057", "0.5761446", "0.57503676", "0.57466555", "0.57437503", "0.5742014", "0.5736639", "0.57295895" ]
0.0
-1
private ScoreIndicator scoreIndicator; private LivesIndicator livesIndicator; Instantiates a new GameLevel.
public GameLevel(KeyboardSensor keyboard, GUI gui, LevelInformation info, AnimationRunner runner, Counter score, Counter lives) { this.sprites = new SpriteCollection(); this.environment = new GameEnvironment(); this.score = score; this.numberOfLives = lives; this.ballsList = new ArrayList<>(); this.runner = runner; this.keyboard = keyboard; this.gui = gui; this.info = info; this.remainingBlocks = new Counter(info.numberOfBlocksToRemove()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addIndicators() {\r\n ScoreIndicator scoreIndicator = new ScoreIndicator(this.score);\r\n scoreIndicator.addToGame(this);\r\n LivesIndicator livesIndicator = new LivesIndicator(this.numberOfLives);\r\n livesIndicator.addToGame(this);\r\n NameLevelIndicator nameLevel = new NameLevelIndicator(info);\r\n nameLevel.addToGame(this);\r\n }", "public GameLevel(LevelInformation info, KeyboardSensor kboard, AnimationRunner aRunner,\n ScoreIndicator scoreInd, LivesIndicator lifeInd, Counter scoreC, Counter livesC) {\n this.levelInfo = info;\n this.keyboard = kboard;\n this.runner = aRunner;\n this.scoreIndi = scoreInd;\n this.lifeIndi = lifeInd;\n this.scoreCounter = scoreC;\n this.lifeCounter = livesC;\n }", "public LevelInterface generateLevel (GamePlay playerMetrics);", "public ScoreIndicator(Counter score) {\r\n this.score = score;\r\n }", "public HighScore ()\n {\n this.name = \"P'ngball Grandmaster\";\n this.score = 0;\n this.level = \"level 1\";\n }", "public void setLevel(Level level) { this.currentLevel = level; }", "private void initLevel () \n {\n score = 0;\n scoreVisual = score;\n level = new Level(Constants.LEVEL_01);\n cameraHelper.setTarget(level.bird);\n initPhysics();\n }", "public HighScore (int score)\n {\n this.name = \"P'ngball Grandmaster\";\n this.score = score;\n this.level = \"level 1\";\n }", "public Level() {\n\t\tthis.availableCount = NUM_SPOTS;\n\t}", "public Level(){\n\t\tlevel_image_pattern = \"default\";\n\t\t\n\t\timages = new HashMap <String, Image>();\n\t\tpickables = new ArrayList<Pickable>();\n\t\tplayer_initial_position = new int[2];\n\t\tplayer_initial_position[0] = 0;\n\t\tplayer_initial_position[1] = 0;\n\t\t\n\t\tconfig = Config.getInstance();\n\t\t\n\t}", "public HighScore (String name)\n {\n this.name = name;\n this.score = 0;\n this.level = \"level 1\";\n }", "Interface(Level level){\n\t\tthis.level=level;\n\t}", "public Level3(Game game)\n {\n super(game);\n \n // set game var\n g = game;\n \n // set world\n world = game.getWorld();\n //set player\n player = game.getPlayer();\n // set default enemy exists state\n enemyExist = true;\n // set frame\n frame = g.getFrame();\n\n }", "public LiveIndicator(int lives) {\r\n this.lives = lives;\r\n }", "public JLabel getLevelCounter()\n {\n return levelCounter;\n }", "public void level1() {\n\t\tlevel = new Level(1); //Create Level object, passing 1 to constructor for level 1\n\t\tplayer = new Player(100, 100); //Set player y position); //Create player object, place in middle of screen, position will later be determined by level png\n\t}", "public void testLightningLevel() {\n\t\tBoard brd = new Board();\n\t\tLightningLevel lvl = new LightningLevel(brd);\n\n\t\tassertEquals(\"Lightning\", lvl.getLevelType());\n\n\t\tlvl.assignTime(42);\n\t\tassertEquals(42, lvl.getTime());\n\t}", "public void newlevel() {\n\t\tblack = new Background(COURT_WIDTH, COURT_HEIGHT); // reset background\n\t\tcannon = new Cannon(COURT_WIDTH, COURT_HEIGHT); // reset cannon\n\t\tdeadcannon = null;\n\t\tbullet = null;\n\t\tshot1 = null;\n\t\tshot2 = null;\n\t\t// reset top row\n\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\talien1[i] = new Alien(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien1[i].pos_x = alien1[i].pos_x + 30*i;\n\t\t\talien1[i].v_x = level + alien1[i].v_x;\n\t\t}\n\t\t// reset second row\n\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\talien2[i] = new Alien2(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien2[i].pos_x = alien2[i].pos_x + 30*i;\n\t\t\talien2[i].v_x = level + alien2[i].v_x;\n\t\t}\n\t\t// reset third row\n\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\talien3[i] = new Alien3(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien3[i].pos_x = alien3[i].pos_x + 30*i;\n\t\t\talien3[i].v_x = level + alien3[i].v_x;\n\t\t}\n\t}", "public interface ILevelDefinition {\n\n /**\n * Get the agents that actually exist in the game\n * @return The currently existing agents\n */\n List<AgentReference> getCurrentAgents();\n void removeAgent(int index);\n void addAgent(String agentName, int x, int y, double direction, List<? extends IPropertyDefinition> instanceProperties);\n\n List<String> getPlaceableAgents();\n void removePlaceableAgent(int index);\n void removePlaceableAgent(String agentName);\n void addPlaceableAgent(String agentName);\n\n Map<String, List<Point2D>> getPaths();\n void removePath(int index);\n void removePath(String name);\n void addPath(String name, List<Point2D> path);\n\n String getBackgroundImageURL();\n void setBackgroundImageURL(String imageURL);\n\n ILevelDefinition clone() throws CloneNotSupportedException;\n\n void defineAttribute(IAttributeDefinition attribute);\n List<? extends IAttributeDefinition> getAttributes();\n}", "public void runLevels(List<LevelInformation> levels) {\n\n for (LevelInformation levelInfo : levels) {\n\n Counter blocks = new Counter();\n GameLevel level = new GameLevel(levelInfo, this.keyboardSensor, this.animationRunner, this.lives,\n this.score, blocks);\n level.initialize();\n\n // play the same level over and over again as long as the player still has lives left\n while (this.lives.getValue() > 0) {\n level.playOneTurn();\n\n // if no blocks are left - move to the next level\n if (blocks.getValue() == 0) {\n // if all blocks are dead by now, add 100 to the score\n this.score.increase(LEVEL_COMPLETE_SCORE);\n break;\n } else {\n // subtract 1 life\n this.lives.decrease(1);\n\n // if no more lives are left, the game's over\n if (this.lives.getValue() == 0) {\n break;\n }\n }\n }\n\n // if no more lives are left, the game's over\n if (this.lives.getValue() == 0) {\n break;\n }\n }\n\n // ask the user for his name if his score is going to be on the highscore table\n if (this.highscore.isHighScore(this.score.getValue())) {\n DialogManager dialog = this.animationRunner.gui().getDialogManager();\n String name = dialog.showQuestionDialog(\"Name\", \"What is your name?\", \"\").trim();\n\n // if no name was entered\n if (name.equals(\"uninitializedValue\") || name.isEmpty()) {\n name = \"Anonymous\";\n }\n\n // remove commas\n if (name.contains(\",\")) {\n name = name.replace(\",\", \"\");\n }\n\n // add the record to the list\n this.highscore.add(new ScoreInfo(name.trim(), this.score.getValue()));\n\n try {\n // save the data\n this.highscore.save();\n } catch (IOException ioe) {\n System.err.println(ioe.getMessage());\n System.exit(-1);\n }\n }\n\n // show end screen - win or lose\n this.animationRunner.run(new KeyPressStoppableAnimation(\n this.keyboardSensor, \"space\", new EndScreen(this.lives, this.score)));\n // show highscores table\n this.animationRunner.run(new KeyPressStoppableAnimation(\n this.keyboardSensor, \"space\", new HighScoresAnimation(this.highscore)));\n\n // when the game ends reset counters\n this.score = new Counter();\n this.lives = new Counter(Ass7Game.LIVES);\n }", "public Game() {\r\n\r\n\t\tmakeFrame();\r\n\t\tisClicked = false;\r\n\t\tisPlaying = false;\r\n\t\tlevelEasy = true;\r\n\t\tlevelIntermediate = false;\r\n\t\tlevelHard = false;\r\n\t\tplayerScore = 0;\r\n\r\n\t}", "public void initialize() {\r\n levelInformation.getBackground().addToGame(this);\r\n ScoreTrackingListener scoreTrackingListener = new ScoreTrackingListener(score);\r\n ScoreIndicator scoreIndicator = new ScoreIndicator(score, guiWidth);\r\n BlockRemover blockRemover = new BlockRemover(this, blockCounter);\r\n BallAdder ballAdder = new BallAdder(this, environment, ballCounter);\r\n BallRemover ballRemover = new BallRemover(this, ballCounter);\r\n for (Block blocks : levelInformation.blocks()) {\r\n Block block = blocks;\r\n if (block.getColor() == Color.black) {\r\n block.addHitListener(ballRemover);\r\n }\r\n if (block.getColor() == Color.magenta) {\r\n block.addHitListener(ballAdder);\r\n }\r\n block.addHitListener(blockRemover);\r\n block.addHitListener(scoreTrackingListener);\r\n block.addToGame(this);\r\n }\r\n blockCounter.increase(levelInformation.numberOfBlocksToRemove());\r\n Paddle paddle = new Paddle(new Rectangle(new Point((guiWidth / 2) - (levelInformation.paddleWidth() / 2),\r\n 580), levelInformation.paddleWidth(), 10), Color.YELLOW, keyboard, levelInformation.paddleSpeed());\r\n paddle.addToGame(this);\r\n Block top = new Block(new Rectangle(new Point(0, 0), 800, 20), Color.GRAY);\r\n Block left = new Block(new Rectangle(new Point(0, 10), wallWidth, 630), Color.GRAY);\r\n Block right = new Block(new Rectangle(new Point(guiWidth - wallWidth, 10), wallWidth, 630), Color.GRAY);\r\n Block bottom = new Block(new Rectangle(new Point(0, guiHeight), 800, 10), Color.GRAY);\r\n bottom.addToGame(this);\r\n right.addToGame(this);\r\n left.addToGame(this);\r\n top.addToGame(this);\r\n bottom.addHitListener(ballRemover);\r\n scoreIndicator.addToGame(this);\r\n }", "@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}", "public GameLogic(){\n\t\tplayerPosition = new HashMap<Integer, int[]>();\n\t\tcollectedGold = new HashMap<Integer, Integer>();\n\t\tmap = new Map();\n\t}", "private void loadLevel(Game game, int level) {\n //stop any ongoing sounds\n game.getGameLevel().getLevelSound().stop();\n //creates new arrList\n game.resetGameLevels();\n //Loads levels in the arrList\n game.buildGameLevelsArray();\n //set to desired level\n game.setLevel(level);\n //load all necessary components for the game\n // and updates the existing one.\n game.goNextLevel();\n // sets the player lifes and collected eggs\n game.getHero().setLifes(10);\n game.getHero().setEggs(0);\n }", "public GameInfo(int numPlayers, int initialLives, int deathPoints) {\n this.numAlive = numPlayers;\n this.deathPoints = deathPoints;\n \n gamePoints = new ArrayList<Integer>();\n for (int i = 0; i < numPlayers; i++) {\n gamePoints.add(0);\n }\n \n lives = new ArrayList<Integer>();\n for (int i = 0; i < numPlayers; i++) {\n lives.add(initialLives);\n }\n }", "public interface ILevel {\n\n\t/**\n\t * Initialize level\n\t */\n\tpublic void init();\n\n\t/**\n\t * Update level each frame\n\t */\n\tpublic void update();\n\n}", "void createNewLevel(int level);", "public void incLevel(int lvl){this.Level=this.XP/(100);}", "public void levelBuilder() {\r\n\t\t//round 1\r\n\t\tEnemy[] round1Enemy = new Enemy[1];\r\n\t\tround1Enemy[0] = new Enemy();\r\n\t\t\tround1Enemy[0].type = 0;\r\n\t\t\tround1Enemy[0].imag = (MyFrame.refFrame).client.getOtherPlayer(0).getCardLeader().getCardImage();\r\n\t\t\tround1Enemy[0].position = new vec2(157, 0); \r\n\t\t\tround1Enemy[0].size = new vec2(185, 201); //X: 0~500 Y:250 lower\r\n\t\t\tround1Enemy[0].blood = (MyFrame.refFrame).client.getOtherPlayer(0).getHp();\r\n\t\t\tround1Enemy[0].currentBlood = (MyFrame.refFrame).client.getOtherPlayer(0).getHp();\r\n\t\t\tround1Enemy[0].attackCD = 0;\r\n\t\t\tround1Enemy[0].attack = 0;\r\n\t\t\tround1Enemy[0].initialCD = 0;\r\n\t\t\tround1Enemy[0].defense = 0;\r\n\t\t\t\r\n\t\tround[0].addEnemy(round1Enemy);\r\n\t}", "protected int getLevel(){\r\n return this.level;\r\n }", "public void initialize() {\r\n /**********************************/\r\n //this.numOfLives=new hitevent.Counter(START_NUM_LIVES);\r\n //this.blocksCounter = new hitevent.Counter(this.levelInformation.numberOfBlocksToRemove());\r\n //this.gui = new GUI(\"jumping\", WIDTH_SCREEN, HI_SCREEN);\r\n /*****************************************/\r\n //create new point to create the edges of the screen\r\n Point p1 = new Point(-5, 20);\r\n Point p2 = new Point(-5, -5);\r\n Point p3 = new Point(WIDTH_SCREEN - 20, -5);\r\n Point p4 = new Point(-5, HI_SCREEN - 15);\r\n //an array to the blocks of the edges\r\n Block[] edges = new Block[4];\r\n //create the adges of the screen\r\n Counter[] edgeCount = new Counter[4];\r\n edgeCount[0] = new Counter(1);\r\n edges[0] = new Block(new Rectangle(p1, WIDTH_SCREEN + 20, 25), Color.RED, edgeCount[0]);\r\n edgeCount[1] = new Counter(1);\r\n edges[1] = new Block(new Rectangle(p2, 25, HI_SCREEN + 20), Color.RED, edgeCount[1]);\r\n edgeCount[2] = new Counter(1);\r\n edges[2] = new Block(new Rectangle(p3, 25, HI_SCREEN + 20), Color.RED, edgeCount[2]);\r\n edgeCount[3] = new Counter(1);\r\n edges[3] = new Block(new Rectangle(p4, WIDTH_SCREEN + 20, 25), Color.RED, edgeCount[3]);\r\n\r\n //initilize the paddle\r\n initializePaddle();\r\n //sprite collection and game evnironment\r\n SpriteCollection sprite = new SpriteCollection();\r\n GameEnvironment game1 = new GameEnvironment();\r\n\r\n //add the Background of the level to the sprite collection\r\n this.addSprite(this.levelInformation.getBackground());\r\n //create score Indicator, lives Indicator and level name\r\n ScoreIndicator scoreIndicator1 = new ScoreIndicator(score);\r\n LivesIndicator livesIndicator1 = new LivesIndicator(numOfLives);\r\n LevelIndicator levelName = new LevelIndicator(this.levelInformation.levelName());\r\n\r\n game1.addCollidable((Collidable) this.paddle);\r\n sprite.addSprite((Sprite) this.paddle);\r\n sprite.addSprite((Sprite) scoreIndicator1);\r\n sprite.addSprite((Sprite) livesIndicator1);\r\n sprite.addSprite((Sprite) levelName);\r\n\r\n //add the paddle, score Indicator, lives Indicator and level name to the game\r\n this.paddle.addToGame(this);\r\n scoreIndicator1.addToGame(this);\r\n livesIndicator1.addToGame(this);\r\n levelName.addToGame(this);\r\n\r\n //initilize the Blocks\r\n initializeBlocks();\r\n\r\n }", "public int getLevel()\n {\n return level; \n }", "public int getLevel(){\n return this.level;\n }", "public int getLevel(){\n return this.level;\n }", "public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }", "public Game(int id, int accountId, String name,String type, int achievements, int level, String rank , boolean rareSkins){\n this.id = id;\n this.accountId = accountId;\n this.name = name;\n this.type = type;\n this.achievements = achievements;\n this.level = level;\n this.rank = rank;\n this.rareSkins = rareSkins;\n }", "private void startGame() {\n hideView(R.id.title);\n hideView(R.id.score);\n gameView.setVisibility(View.VISIBLE);\n level=0;\n totalPoints =0;\n gameView.setTotalPoints(totalPoints);\n startLevel();\n }", "public void setupLevelAndPoints(){\r\n \t\tint[] levelAndPoints = new int[]{0, 0, 0};\r\n \t\tlevelAndPoints = DashboardActivity.getLevelAndPoints();\r\n \t\tLog.i(\"levelAndPoints content\", levelAndPoints.toString());\r\n\t\t\r\n \t\t//Setting up level\r\n \t\tlevelImage = (ImageView) findViewById(R.id.levelImageView);\r\n \t\tif(levelAndPoints[0] == 1){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_one));\r\n \t\t}else if(levelAndPoints[0] == 2){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_two));\r\n \t\t}else if(levelAndPoints[0] == 3){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_three));\r\n \t\t}else if(levelAndPoints[0] == 4){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_four));\r\n \t\t}else if(levelAndPoints[0] == 5){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_five));\r\n \t\t}else if(levelAndPoints[0] == 6){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_six));\r\n \t\t}\r\n \t\t\r\n \t\t//Setting up progressbar and points above bar\r\n \t\tlevelProgressBar = (ProgressBar) findViewById(R.id.levelProgressBar);\r\n \t\tlevelProgressBar.setVisibility(ProgressBar.VISIBLE);\r\n \t\tlevelProgressBar.setMax(levelAndPoints[2]);\r\n \t\tlevelProgressBar.setProgress(levelAndPoints[1]);\r\n \r\n \t\tshowPointsAboveProgressBar = (TextView) findViewById(R.id.pointsInProgressBar);\r\n \t\tshowPointsAboveProgressBar.setText(levelAndPoints[1] + \"/\" + levelAndPoints[2]);\r\n \t}", "public LevelMenu(int levelmenu) {}", "public void initLevel(){\n baseLevel = levelCreator.createStaticGrid(this.levelFile);\n dynamicLevel= levelCreator.createDynamicGrid(levelFile);\n colDetector = new CollisionHandler();\n goalTiles = baseLevel.getTilePositions('x');\n }", "public String getLevel()\n {\n return gameLevel;\n }", "private void initLevel(){\r\n\t\tBetterSprite doodleSprite = (BetterSprite)(getGroup(\"doodleSprite\").getSprites()[0]);\r\n\t\tinitControls(doodleSprite);\r\n\t\tinitEvents();\r\n\t}", "int getOnLevel();", "private void populateLevel() {\r\n\r\n\r\n\t\t// Setup Goal\r\n\t\tJsonValue goalVal = levelAssets.get(\"goal\");\r\n\t\tfloat gWidth = goalTile.getRegionWidth()/scale.x;\r\n\t\tfloat gHeight = goalTile.getRegionHeight()/scale.y;\r\n\t\tfloat gX = goalVal.get(\"pos\").getFloat(0) + gWidth / 2;\r\n\t\tfloat gY = goalVal.get(\"pos\").getFloat(1) + gHeight / 2;\r\n\t\tgoalDoor = new DoorModel(gX, gY, gWidth, gHeight);\r\n\t\tgoalDoor.setBodyType(BodyDef.BodyType.StaticBody);\r\n\t\tgoalDoor.setDensity(constants.get(\"goal\").getFloat(\"density\", 0));\r\n\t\tgoalDoor.setFriction(constants.get(\"goal\").getFloat(\"friction\", 0));\r\n\t\tgoalDoor.setRestitution(constants.get(\"goal\").getFloat(\"restitution\", 0));\r\n\t\tgoalDoor.setSensor(true);\r\n\t\tgoalDoor.setDrawScale(scale);\r\n\t\tgoalDoor.setTexture(goalTile);\r\n\t\tgoalDoor.setName(\"goal\");\r\n\t\taddObject(goalDoor);\r\n\t\taddObjectTo(goalDoor, LevelCreator.allTag);\r\n\r\n\t\t// Get default values\r\n\t\tJsonValue defaults = constants.get(\"defaults\");\r\n\t\tJsonValue objs = levelAssets.get(\"objects\");\r\n\r\n\t\t//group platform constants together for access in following for-loop\r\n\t\tTextureRegion[] xTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\tlightningLightTexture, lightningDarkTexture, lightningAllTexture,\r\n\t\t\trainLightTexture, rainDarkTexture, rainAllTexture,\r\n\t\t\t\tcrumbleLightTexture, crumbleDarkTexture, crumbleAllTexture};\r\n\r\n\t\tTextureRegion[] reducedXTexture = {lightTexture, darkTexture, allTexture,\r\n\t\t\t\tlightningLightTextureReduced, lightningDarkTextureReduced, lightningAllTextureReduced,\r\n\t\t\t\trainLightTextureReduced, rainDarkTextureReduced, rainAllTextureReduced,\r\n\t\t\t\tcrumbleLightTextureReduced, crumbleDarkTextureReduced, crumbleAllTextureReduced};\r\n\r\n\r\n\t\t// Setup platforms\r\n\t\tfor(int i=0; i < (objs != null ? objs.size : 0); i++)\r\n\t\t{\r\n\t\t\tJsonValue obj = objs.get(i);\r\n\r\n\t\t\t// Get platform attributes\r\n\t\t\tint platformType = obj.get(\"type\").asInt();\r\n\t\t\tint property = obj.get(\"property\") == null ? 0: obj.get(\"property\").asInt();\r\n\t\t\tJsonValue platformArgs = obj.get(\"positions\");\r\n\t\t\tJsonValue pathsArgs = obj.get(\"paths\");\r\n\r\n\t\t\tfor (int j = 0; j < platformArgs.size; j++) {\r\n\t\t\t\tfloat[] bounds = platformArgs.get(j).asFloatArray();\r\n\t\t\t\tfloat x = bounds[0], y = bounds[1], width = bounds[2], height = bounds[3];\r\n\t\t\t\tTextureRegion newXTexture;\r\n\t\t\t\tTextureRegion crumbleTexture = null;\r\n\t\t\t\tTexture originalTexture = null;\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// temporary - need to refactor asset directory\r\n\t\t\t\t\tJsonValue assetName = obj.get(\"assetName\");\r\n\t\t\t\t\tint assetIndex = assetName.asInt();\r\n\t\t\t\t\tnewXTexture = new TextureRegion(tutorial_signs[assetIndex]);\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tint platIdx = platformType-1+(property - 1)*3;\r\n\t\t\t\t\tint crumbleIdx = platIdx + 3;\r\n\t\t\t\t\tnewXTexture = new TextureRegion(xTexture[platIdx]);\r\n\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t// For crumble animation\r\n\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\tcrumbleTexture = new TextureRegion(xTexture[crumbleIdx]);\r\n//\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If the platform size is the same as the spritesheet size\r\n\t\t\t\t\tif (originalTexture.getWidth() > 32 && width%(originalTexture.getWidth()/32) == 0) {\r\n\t\t\t\t\t\tnewXTexture = new TextureRegion(reducedXTexture[platIdx]);\r\n\t\t\t\t\t\toriginalTexture = newXTexture.getTexture();\r\n\t\t\t\t\t\tif (platIdx > 5) {\r\n\t\t\t\t\t\t\tcrumbleTexture = new TextureRegion(reducedXTexture[crumbleIdx]);\r\n//\t\t\t\t\t\t\tcrumbleTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tnewXTexture.setRegion(0, 0, width, height);\r\n\t\t\t\t}\r\n\t\t\t\tPlatformModel platformModel = new PlatformModel(bounds, platformType, property, newXTexture, scale,\r\n\t\t\t\t\t\tdefaults.getFloat( \"density\", 0.0f ), defaults.getFloat( \"friction\", 0.0f ) ,\r\n\t\t\t\t\t\tdefaults.getFloat( \"restitution\", 0.0f ), originalTexture, crumbleTexture);\r\n\t\t\t\tplatformModel.setTag(platformType);\r\n\t\t\t\tplatformModel.setProperty(property);\r\n\t\t\t\taddObject(platformModel);\r\n\t\t\t\taddObjectTo(platformModel, platformType);\r\n\t\t\t\t//TODO: Moving platforms\r\n\r\n\r\n\t\t\t\tif (pathsArgs != null) {\r\n\t\t\t\t\tfloat[] paths = pathsArgs.get(j).asFloatArray();\r\n\r\n\t\t\t\t\t//** Moving platform if > 1 path or different path from starting position\r\n\t\t\t\t\tif (hasValidPath(x, y, paths)) {\r\n\t\t\t\t\t\tplatformModel.setBodyType(BodyDef.BodyType.KinematicBody);\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\r\n\t\t\t\t\t\tPooledList<Vector2> pathList = new PooledList<>();\r\n\t\t\t\t\t\tfor (int k = 0; k < paths.length; k+=2) {\r\n\t\t\t\t\t\t\tpathList.add(new Vector2(paths[k], paths[k+1]));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfloat velocity = 3;\r\n\r\n\t\t\t\t\t\tplatformModel.setGravityScale(0);\r\n\t\t\t\t\t\tplatformModel.setPaths(pathList);\r\n\t\t\t\t\t\tplatformModel.setVelocity(velocity);\r\n\r\n\t\t\t\t\t\tmovingObjects.add(platformModel);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// This world is heavier\r\n\t\tworld.setGravity( new Vector2(0,defaults.getFloat(\"gravity\",0)) );\r\n\r\n\t\t// Set level background index\r\n\t\tint backgroundTextureIndex = levelAssets.get(\"background\").asInt();\r\n\t\tbackgroundLightTexture = backgrounds[backgroundTextureIndex - 1];\r\n\t\tbackgroundDarkTexture = backgrounds[backgroundTextureIndex];\r\n\t\tbackgroundTexture = backgroundLightTexture;\r\n\r\n\t\t// Initialize background animations\r\n\t\tactualBackgroundTexture = backgroundTexture.getTexture();\r\n\t\tbackgroundEntirePixelWidth = actualBackgroundTexture.getWidth();\r\n\t\tbackgroundNumAnimFrames = (int)(backgroundEntirePixelWidth/backgroundFramePixelWidth);\r\n\t\tbackgroundAnimator = new FilmStrip(backgroundTexture,1, backgroundNumAnimFrames, backgroundNumAnimFrames);\r\n\t\tbackgroundAnimator.setFrame(0);\r\n\t\tbackgroundAnimeframe = 0;\r\n\t\tbackgroundOrigin = new Vector2(backgroundAnimator.getRegionWidth()/2.0f, backgroundAnimator.getRegionHeight()/2.0f);\r\n\r\n\t\t// Set level bounds\r\n\t\twidthUpperBound = levelAssets.get(\"dimensions\").getInt(0);\r\n\t\theightUpperBound = levelAssets.get(\"dimensions\").getInt(1);\r\n\r\n\t\t// Setup Somni\r\n\r\n\t\tJsonValue somniVal = levelAssets.get(\"somni\");\r\n\t\tfloat sWidth = somniTexture.getRegionWidth()/scale.x;\r\n\t\tfloat sHeight = somniTexture.getRegionHeight()/scale.y;\r\n\t\tfloat sX = somniVal.get(\"pos\").getFloat(0) + sWidth / 2;\r\n\t\tfloat sY = somniVal.get(\"pos\").getFloat(1) + sHeight / 2;\r\n\t\tsomni = new CharacterModel(constants.get(\"somni\"), sX, sY, sWidth, sHeight, platformController.somnif, CharacterModel.LIGHT);\r\n\t\tsomni.setDrawScale(scale);\r\n\t\tsomni.setTexture(somniIdleTexture);\r\n\t\tsomni.setFilterData(platformController.somnif);\r\n\t\tsomni.setActive(true);\r\n\t\taddObject(somni);\r\n\t\taddObjectTo(somni, LevelCreator.allTag);\r\n\r\n\r\n\t\t// Setup Phobia\r\n\r\n\t\tJsonValue phobiaVal = levelAssets.get(\"phobia\");\r\n\t\tfloat pWidth = phobiaTexture.getRegionWidth()/scale.x;\r\n\t\tfloat pHeight = phobiaTexture.getRegionHeight()/scale.y;\r\n\t\tfloat pX = phobiaVal.get(\"pos\").getFloat(0) + pWidth / 2;\r\n\t\tfloat pY = phobiaVal.get(\"pos\").getFloat(1) + pHeight / 2;\r\n\t\tphobia = new CharacterModel(constants.get(\"phobia\"), pX, pY, pWidth, pHeight, platformController.phobiaf, CharacterModel.DARK);\r\n\t\tphobia.setDrawScale(scale);\r\n\t\tphobia.setTexture(phobiaIdleTexture);\r\n\t\tphobia.setFilterData(platformController.phobiaf);\r\n\t\taddObject(phobia);\r\n\t\taddObjectTo(phobia, LevelCreator.allTag);\r\n\t\tphobia.setActive(true);\r\n\r\n\t\t// Setup Combined\r\n\r\n\t\tfloat cWidth = combinedTexture.getRegionWidth()/scale.x;\r\n\t\tfloat cHeight = combinedTexture.getRegionHeight()/scale.y;\r\n\r\n\t\tcombined = new CharacterModel(constants.get(\"combined\"), 0, 0, cWidth, cHeight, platformController.combinedf, CharacterModel.DARK);\r\n\t\tcombined.setDrawScale(scale);\r\n\t\tcombined.setTexture(somniPhobiaTexture);\r\n\t\t//combined.setTag();\r\n\t\tcombined.setFilterData(platformController.combinedf);\r\n\t\taddObject(combined);\r\n\t\taddObjectTo(combined, LevelCreator.allTag);\r\n\t\tcombined.setActive(true);\r\n\r\n\t\t//Remove combined\r\n\t\tobjects.remove(combined);\r\n\t\tsharedObjects.remove(combined);\r\n\t\tcombined.setActive(false);\r\n\r\n\t\taction = 0;\r\n\r\n\t\tPreferences prefs = GDXRoot.getPreferences();\r\n\t\tvolume = prefs.contains(\"volume\") ? prefs.getFloat(\"volume\") : defaults.getFloat(\"volume\",\r\n\t\t\t\t1.0f);\r\n//\t\tSystem.out.println(volume);\r\n\r\n\t\tplatformController.applyFilters(objects);\r\n\t}", "public GamePlayStatus() {}", "public LevelLoader(GameStateManager gsm){\n\t\tsuper(gsm);\n\t}", "public Glow(double level) {\n setLevel(level);\n }", "public Level getCurrentLevel(){\r\n return currentLevel;\r\n }", "public LevelGenerator(GameDescription game, ElapsedCpuTimer elapsedTimer){\n\t\trandom = new Random();\n\t\tminSize = 4;\n\t\tmaxSize = 18;\n\n\t\temptyPercentage = 0.9;\n\t}", "public HighScore (String name,String level, int score)\n {\n this.name = name;\n this.score = score;\n this.level = level;\n }", "public Level(TiltMazeGame game) {\n super(game);\n }", "public int getLevel(){\n return level;\n }", "public int getLevel(){\n return level;\n }", "public double Getlevel()\r\n {\r\n return level;\r\n }", "private void constructLevel(int level){\n gamePanel.removeAll();\n GridLayout layout = new GridLayout(grid.length,grid[0].length);\n gamePanel.setLayout(layout);\n gamePanel.setBackground(Color.BLACK);\n gamePanel.setFocusable(true);\n gamePanel.requestFocusInWindow();\n gamePanel.updateUI();\n }", "public void runLevels() {\n int levelnum = 1;\n double speed = 1;\n while (true) {\n\n GameLevel level = new GameLevel(new Level(levelnum, speed),\n this.keyboardSensor, this.animationRunner, this.blocks,\n this.score, this.numLives);\n this.frameRate = level.getFrameRate();\n\n level.initialize();\n\n while (this.blocks.getValue() > 0 && this.numLives.getValue() > 0) {\n level.playOneTurn(frameRate);\n if (this.blocks.getValue() == 0) {\n\n break;\n }\n\n this.numLives.decrease(1);\n }\n levelnum++;\n speed += 0.5;\n\n if (this.numLives.getValue() <= 0) {\n break;\n }\n\n }\n\n this.animationRunner.run(new KeyPressStoppableAnimation(animationRunner.getGui().getKeyboardSensor(),\n KeyboardSensor.SPACE_KEY, new EndScreen(score.getValue(), false)), this.frameRate);\n\n showScore();\n\n score = new Counter(0);\n numLives = new Counter(numberLives);\n blocks = new Counter(0);\n\n }", "public Game()\r\n\t{\r\n\t\tenemy = new ArrayList<Enemy>();\r\n\t\tbullets = new ArrayList<Bullet>();\r\n\t\tplatforms = new ArrayList<Platforms>();\r\n\t\tsetAlive(false);\r\n\t\tlevel = 1;\r\n\t\tscore = 0;\r\n\t}", "private int getLevel() {\n return getStat(currentLevel);\n }", "public void addHealthLevel(int points)\n {\n healthLevel = healthLevel + points;\n showHealthLevel();\n if (healthLevel < 0) \n {\n Greenfoot.playSound(\"game-over.wav\");\n Greenfoot.stop();\n }\n }", "@Override\n\tpublic void newGame(String level) {\n\t\tmanager.newGame(level);\n\t}", "public GameManager(int playerLives, int playerScore) {\n\t\t\n\t\t// create player01 and player02 with 4 lives and 0 points\n\t\tplayer01 = new Player(playerLives, playerScore);\n\t\tplayer02 = new Player(playerLives, playerScore);\n\t}", "double getLevel();", "double getLevel();", "public BattleShipGame(){\n ui = new UserInterface();\n played = false;\n highestScore = 0;\n }", "@Test\r\n\tpublic final void testAddLevel() {\r\n\t\tlevels.add(lostLevel2);\r\n\t\tgameStatisticsLoss.addLevel(lostLevel2);\r\n\t\tassertTrue(gameStatisticsLoss.getLevels().equals(levels));\r\n\t}", "public String getLevel ()\n {\n return level;\n }", "public int \t\t\t\t\t\t\tgetLevel()\t\t\t\t\t\t\t\t\t{ return this.currentLevel; }", "@Override\n\tpublic void loadScore() {\n\n\t}", "public Game() {\n String configPath= String.valueOf(getClass().getResource(\"/config/conf.xml\"));\n\n listeners= new ArrayList<>();\n assembler= new Assembler(configPath);\n levelApple= (ILevel) assembler.newInstance(\"levelApple\");\n levelRarity= (ILevel) assembler.newInstance(\"levelRarity\");\n levelRainbow= (ILevel) assembler.newInstance(\"levelRainbow\");\n levelRunning= levelApple;\n levelApple.selected();\n levelFlutter= null;\n levelPinky= null;\n jukebox = (Jukebox) assembler.newInstance(\"jukebox\");\n jukebox.switchTo(\"apple\");\n event = new LevelChangeEvent();\n event.setNumberOfLevel(6);\n setEventSelected(true, false, false);\n setEventRunning(true, true, true);\n }", "public static int getEnemyLives(){\n return 1 + currentLvl * 2;\n\n }", "StartGameStatus start(Level level);", "public Level(String levelToEdit)\r\n\t{\r\n\t\tmakeCommonObjects();\r\n\t\tgrid = new Grid(levelToEdit);//CHANGE GRID COORDINATES WHILE MAKING A NEW LEVEL\r\n\t\tmakeButton = new GameSprite(Player.filename);\r\n\t\tmakeButton.setPosition(0,0);\r\n\t\tplayer = new Player(100, 420);\r\n\t\tbackground = new Background(1, grid);\r\n\t}", "public Level(int levelNumber)\r\n\t{\t\r\n\t\tlevelNum = levelNumber;\r\n\t\tlevelFileName = \"level\"+levelNum+\".txt\";\r\n\t\tlistFileName = \"level\"+levelNum+\"items.txt\";\r\n\t\tmakeCommonObjects();\r\n\t\tgrid = new Grid(levelFileName);\r\n\t\tGridSquare startSquare = grid.startLocation();\r\n\t\tplayer = new Player((int)startSquare.rect.x,(int)startSquare.platform.getBoundingRectangle().y+3);\r\n\t\tAndroidGame.camera.position.x = player.getX();\r\n\t\tAndroidGame.camera.position.y = player.getY();\r\n\t\tbackground = new Background(levelNumber, grid);\r\n\t\tdoorBubble = new OffScreenBubble(grid.getFinish());\r\n\t\tif(grid.getKey()!=null)\r\n\t\t{\r\n\t\t\thasKey = true;\r\n\t\t\tkeyBubble = new OffScreenBubble(grid.getKey());\r\n\t\t}\r\n\t\tplayer.reset(grid);\r\n\t}", "private void init() \n\t{\n\t\tgoalReached = false;\n\t\tGdx.input.setInputProcessor(this);\n\t\tcameraHelper = new CameraHelper();\n\t\tlives = Constants.LIVES_START;\n\t\tlivesVisual = lives;\n\t\ttimeLeftGameOverDelay = 0;\n\t\tinitLevel();\n\n\t}", "public void checkLevel(){\n if(score<50){\n level = 1;\n asteroidsMaxNumber = 5;\n }\n if(score>50 && level == 1){\n level = 2;\n asteroidsMaxNumber = 7;\n }\n if(score>100 && level == 2){\n level = 3;\n asteroidsMaxNumber = 10;\n }\n if(score>200 && level == 3){\n level = 4;\n asteroidsMaxNumber = 13;\n }\n if(score>350 && level == 4){\n level = 5;\n asteroidsMaxNumber = 15;\n }\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.MEGAHORN);\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.TAIL_WHIP);\n beginnerSkills.add(SkillFactory.WATER_GUN);\n beginnerSkills.add(SkillFactory.WATER_SPORT);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAIL_WHIP)));\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_GUN)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_SPORT)));\n levelUpSkills.put(13, new ArrayList<Integer>(Arrays.asList(SkillFactory.FOCUS_ENERGY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RAZOR_SHELL)));\n levelUpSkills.put(21, new ArrayList<Integer>(Arrays.asList(SkillFactory.FURY_CUTTER)));\n levelUpSkills.put(26, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_PULSE)));\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.REVENGE)));\n levelUpSkills.put(34, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_JET)));\n //39 ENCORE\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_TAIL)));\n //51 RETALIATE\n levelUpSkills.put(58, new ArrayList<Integer>(Arrays.asList(SkillFactory.SWORDS_DANCE)));\n levelUpSkills.put(63, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYDRO_PUMP)));\n initEvolutionSkills();\n }", "private void prepareLevel(){\n levelAnimation = true;\n\n // Reset the menace level\n menaceInterval = 1200;\n\n // Here we will initialize all the game objects\n // Make a new player space ship\n defender = new Defender(context, PlayableX, PlayableY, ExcessX);\n\n // Prepare the players bullet\n bullet = new Bullet(context, PlayableX, PlayableY, (float) 1.2);\n\n // Initialize the invadersBullets array\n for(int i = 0; i < invadersBullets.length; i++){\n invadersBullets[i] = new Bullet(context, PlayableX, PlayableY, (float) 0.80);\n }\n\n // Build an army of invaders\n numInvaders = 0;\n for(int column = 0; column < invadersColumn; column ++ ){\n for(int row = 0; row < invadersRow; row ++ ){\n invaders[numInvaders] = new Invader(context, row, column, PlayableX, PlayableY, ExcessX);\n numInvaders ++;\n }\n }\n invadersLeft = numInvaders;\n\n try {\n // Create objects of the 2 required classes\n AssetManager assetManager = context.getAssets();\n explosionEffect = new Bitmap[12];\n for (int i=0; i < 12; i++) {\n explosionEffect[i] = Bitmap.createScaledBitmap(BitmapFactory.decodeStream(assetManager.open(\"explosion/\" + (i + 1) + \".png\")), (int) (invaders[0].getLength()*1.75), (int) (invaders[0].getLength()*1.75), true);\n }\n } catch (IOException e) {\n e.printStackTrace();\n // Print an error message to the console\n Log.e(\"error\", \"failed to load explosion effect image files\");\n }\n\n }", "public GameLogic() {\n this.display = createScreen();\n playerShipHealth = 30;\n enemyShipHealth = 20;\n playerShield = 1;\n enemyShield = 1;\n playerMissile = 10;\n enemyMissile = 5;\n\n isPlayerPilotDamaged = false;\n isPlayerGunLDamaged = false;\n isPlayerGunMDamaged = false;\n isPlayerShieldDamaged = false;\n isPlayerEngineDamaged = false;\n\n isEnemyPilotDamaged = false;\n isEnemyGunLDamaged = false;\n isEnemyGunMDamaged = false;\n isEnemyShieldDamaged = false;\n isEnemyEngineDamaged = false;\n\n playerEvasionPercent = .3;\n enemyEvasionPercent = .3;\n\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.LEER);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.EMBER)));\n levelUpSkills.put(8, new ArrayList<Integer>(Arrays.asList(SkillFactory.WORK_UP)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.HEADBUTT)));\n levelUpSkills.put(15, new ArrayList<Integer>(Arrays.asList(SkillFactory.NOBLE_ROAR)));\n levelUpSkills.put(20, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAKE_DOWN)));\n levelUpSkills.put(23, new ArrayList<Integer>(Arrays.asList(SkillFactory.FIRE_FANG)));\n levelUpSkills.put(28, new ArrayList<Integer>(Arrays.asList(SkillFactory.ENDEAVOR)));\n levelUpSkills.put(33, new ArrayList<Integer>(Arrays.asList(SkillFactory.ECHOED_VOICE)));\n levelUpSkills.put(36, new ArrayList<Integer>(Arrays.asList(SkillFactory.FLAMETHROWER)));\n levelUpSkills.put(39, new ArrayList<Integer>(Arrays.asList(SkillFactory.CRUNCH)));\n levelUpSkills.put(43, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYPER_VOICE)));\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.INCINERATE)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.OVERHEAT)));\n }", "@Override\r\n public void load()\r\n {\r\n\tLevel.openMap(\"maps/Level1.map\", _width, _height);\r\n\t_level = Level.getInstance();\r\n\tCamera.getInstance().setBounds(_level.getWorldBoundaries());\r\n\t_printText = new Text(TILESHEET_TEXTURE, \"0123456789xUPC\", 0, 244, 32, 37, 4, 24, 28);\r\n\t_coin = new Sprite(\"Coin\", 6, _height - 34, 24, 24, Tiles.get(COIN_ANIM), false);\r\n\t_1UP = new Sprite(\"1UP\", 200, _height - 42, 42, 42, Tiles.get(MUSHROOM_GREEN), false);\r\n\tSoundLibrary.getInstance().loop(MUSIC_LEVEL);\r\n\tMario.clearData();\r\n }", "private StrategyLevel(int value, String name, String literal) {\r\n\t\tthis.value = value;\r\n\t\tthis.name = name;\r\n\t\tthis.literal = literal;\r\n\t}", "public void newGameStart(int level) {\n animationThread.stop();\n if(muteMusic == false){\n music.stopPlayingAudio(\"All\");\n music.playAudio(\"LevelMusic\");\n }\n musicName = \"LevelMusic\";\n setTitle(\"Chip's Challenge: Level \" + level);\n replay.clearMovement();\n exited = false;\n timeRuunableThread.setDrawNumber(true);\n timeRuunableThread.setSecond(101);\n gameStarted = true;\n gamePaused = false;\n timeRuunableThread.setPause(gamePaused);\n timeRuunableThread.setGameStart(gameStarted);\n infoCanvas.drawLevelNumber(level);\n board = new Board(level);\n keysize = 0;\n originalChipNumber = board.getTreasureRemainingAmount();\n infoCanvas.drawChipsLeftNumber(board.getTreasureRemainingAmount());\n infoCanvas.drawSquares((Graphics2D) infoCanvas.getGraphics(), 14 * infoCanvas.getHeight() / 20, infoCanvas.getWidth(), infoCanvas.getHeight());\n renderer = new MazeRenderer(boardCanvas.getGraphics());\n renderer.redraw(board, boardCanvas.getWidth(), boardCanvas.getHeight());\n }", "public Indicator() {\n }", "public LevelStateMachine(GameState gameState) {\n this.gameState = gameState;\n }", "public GameState() {}", "public void setLevel(int newlevel)\n {\n level = newlevel; \n }", "public Digger(Level level) {\n\t\t// Location on 20 x 20 board.\n\t\tthis.tilePositionX = this.STARTING_X;\n\t\tthis.tilePositionY = this.STARTING_Y;\n\n\t\t// Initialize score and level.\n\t\tthis.score = 0;\n\t\tthis.level = level;\n\n\t\t// Sets Initial Conditions.\n\t\tthis.isGodModeEnabled = false;\n\t\tthis.life = 0;\n\t\tthis.collisionBox = new Rectangle2D.Double(this.tilePositionX\n\t\t\t\t* this.SCALE, this.tilePositionY * this.SCALE, this.SCALE,\n\t\t\t\tthis.SCALE);\n\n\t\t// Set initial direction and delayCounter.\n\t\tthis.direction = \"right\";\n\t\tthis.delayCounter = 0;\n\t\t\n\t\tthis.pointGain = new MusicPlayer(\n\t\t\t\t\"/music/pointsGainSound.mp3\");\n\n\t\t// Assign the player's image.\n\t\ttry {\n\t\t\tthis.sprite = ImageIO.read(getClass().getResourceAsStream(\"/digger/digger.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error: File not found.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void loadLevel(int level) {\n if (level == 0) {\n return;\n }\n if (this.levels[level] == null) {\n this.elevatorLevelsUnlocked = Math.max(this.elevatorLevelsUnlocked,\n (int)((level-1)/5.0));\n \n this.levels[level] = new MineLevel.Builder(level).buildLevel(this);\n }\n Iterator<Gateway> gateways = this.levels[level-1].getGateways();\n Gateway nextGateway;\n while (gateways.hasNext()) {\n nextGateway = gateways.next();\n if (nextGateway.getDestinationGateway() == null) {\n nextGateway.setDestinationArea(this.levels[level]);\n nextGateway.setDestinationGateway(this.levels[level].getEntranceGateway());\n }\n }\n }", "public void init(Level level) {\r\n\t\tthis.level = level;\r\n\t}", "public int getLevel()\r\n {\r\n return level;\r\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n //TODO: CONVERSION 2\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.CONVERSION);\n beginnerSkills.add(SkillFactory.SHARPEN);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.PSYBEAM)));\n levelUpSkills.put(12, new ArrayList<Integer>(Arrays.asList(SkillFactory.AGILITY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RECOVER)));\n //TODO: MAGNET RISE 23\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.SIGNAL_BEAM)));\n //TODO: RECYCLE 34\n levelUpSkills.put(40, new ArrayList<Integer>(Arrays.asList(SkillFactory.DISCHARGE)));\n levelUpSkills.put(45, new ArrayList<Integer>(Arrays.asList(SkillFactory.LOCK_ON)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.TRI_ATTACK)));\n //TODO: MAGIC COAT 56\n levelUpSkills.put(62, new ArrayList<Integer>(Arrays.asList(SkillFactory.ZAP_CANNON)));\n }", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "public interface Game\n{\n\tpublic int getScore();\t\t\t\t\t\t\t\t\t\t\t// Returns the score of the game\n\tpublic int getCurLevel();\t\t\t\t\t\t\t\t\t\t// Returns the current level\n\tpublic int getLevelTime();\t\t\t\t\t\t\t\t\t\t// Returns the time for which the CURRENT level has been played\n\tpublic int getTotalTime();\t\t\t\t\t\t\t\t\t\t// Returns the time for which the game has been played (across all levels)\n\tpublic int getLivesRemaining();\t\t\t\t\t\t\t\t\t// Returns the number of lives remaining for the hero\n\n\tpublic List<Node> getPillList();\t\t\t\t\t\t\t\t// Get a list of all available pills in the current level\n\tpublic List<Node> getPowerPillList();\t\t\t\t\t\t\t// Get a list of all available power pills in the current level\n\n\tpublic boolean checkPill(Node location);\t\t\t\t\t\t// Checks if the location specified is a pill / is still available\n\tpublic boolean checkPowerPill(Node location);\t\t\t\t\t// Checks if the location specified is a power pill / is still available\n\n\tpublic Hero getHero();\t\t\t\t\t\t\t\t\t\t\t// Returns a copy of the hero object\n\tpublic Enemy getEnemy(int whichEnemy);\t\t\t\t\t\t\t// Returns a copy of a specific enemy number\n\tpublic List<Enemy> getEnemies();\t\t\t\t\t\t\t\t// Returns a copy of the enemy array\n\n\tpublic Game copy();\t\t\t\t\t\t\t\t\t\t\t\t// Returns an exact copy of the game (forward model)\n\tpublic Maze getCurMaze();\t\t\t\t\t\t\t\t\t\t// Returns the current maze information\n\tpublic static Random rng = new Random(0);\t\t\t\t\t// Random number generator with fixed seed\n\n\tpublic int[] advanceGame(int heroDir, int[] enemyDirs);\t\t\t// Advances the game using the actions (directions) supplied; returns all directions played [Hero, Enemy1, Enemy2, Enemy3, Enemy4]\n\tpublic boolean gameOver();\t\t\t\t\t\t\t\t\t\t// Returns true if the hero has lost all her lives or if MAX_LEVELS has been reached\n\n\t//These constants specify the exact nature of the game\n\tpublic class Direction { public static final int UP = 0, RIGHT = 1, DOWN = 2, LEFT = 3, EMPTY = -1; }\t//directions\n\n\t// Points\n\tpublic static final int PILL_SCORE = 10;\n\tpublic static final int POWER_PILL_SCORE = 50;\n\tpublic static final int ENEMY_EAT_SCORE = 200;\n\n\t// Timing\n\tpublic static final int EDIBLE_TIME = 200;\t\t\t\t\t\t//initial time an enemy is edible for (decreases as level number increases)\n\tpublic static final float EDIBLE_TIME_REDUCTION = 0.9f;\t\t\t//reduction factor by which edible time decreases as level number increases\n\tpublic static final int[] LAIR_TIMES = {40, 60, 80, 100};\t\t//time spend in the lair by each enemy at the start of a level\n\tpublic static final int COMMON_LAIR_TIME = 40;\t\t\t\t\t//time spend in lair after being eaten\n\tpublic static final float LAIR_REDUCTION = 0.9f;\t\t\t\t//reduction factor by which lair times decrease as level number increases\n\tpublic static final int LEVEL_LIMIT = 3000;\t\t\t\t\t\t//time limit for a level\n\tpublic static final int DELAY = 40;\t\t\t\t\t\t\t\t//delay (in milliseconds) between game advancements\n\n\t// Initial Game State\n\tpublic static final int NUM_LIVES = 3;\t\t\t\t\t\t\t//total number of lives the hero has (current + NUM_LIVES-1 spares)\n\tpublic static final int INITIAL_HERO_DIR = 3;\t\t\t\t\t//initial direction taken by the hero\n\tpublic static final int[] INITIAL_ENEMY_DIRS = {3, 1, 3, 1};\t//initial directions for the enemies (after leaving the lair)\n\tpublic static final int ENEMY_SPEED_REDUCTION = 2;\t\t\t\t//difference in speed when enemies are edible (every ENEMY_SPEED_REDUCTION, an enemy remains stationary)\n\n\t// Misc. configurations for game\n\tpublic static final float ENEMY_REVERSAL = 0.0015f;\t\t\t\t//probability of a global enemy reversal event\n\tpublic static final int EXTRA_LIFE_SCORE = 10000;\t\t\t\t//extra life is awarded when this many points have been collected\n\tpublic static final int EAT_DISTANCE = 2;\t\t\t\t\t\t//distance in the connected graph considered close enough for an eating event to take place\n\tpublic static final int NUM_ENEMY = 4;\t\t\t\t\t\t\t//number of enemies in the game\n\tpublic static final int NUM_MAZES = 4;\t\t\t\t\t\t\t//number of different mazes in the game\n\tpublic static final int MAX_LEVELS = 16;\t\t\t\t\t\t//maximum number of levels played before the end of the game\n\n\tpublic enum DM{PATH,EUCLID,MANHATTEN};\t\t\t\t \t\t\t//simple enumeration for use with the direction methods\n}", "private GameProgress() {\n maxTime = 3000;\n heathMax = 1000;\n fuelMax = 4000;\n difficultyLv = 1;\n fuelGainMultiply = 0;\n healthGainMultiply = 0;\n money = 0;\n lives = 1;\n increaseSafeTime = 0;\n livesWereBought = 0;\n decreaseDamage = 0;\n time = 0;\n lv = 1;\n }", "public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }" ]
[ "0.7374299", "0.68466896", "0.68390834", "0.6721225", "0.65178734", "0.64962846", "0.64538646", "0.6409856", "0.640796", "0.6402657", "0.631016", "0.62906796", "0.6211612", "0.6205922", "0.61793286", "0.61753255", "0.6096691", "0.60959375", "0.60875577", "0.60800153", "0.6055194", "0.60442066", "0.6028122", "0.6016395", "0.60120136", "0.60078025", "0.6005509", "0.5988253", "0.59822816", "0.59655964", "0.5955858", "0.59555846", "0.5952787", "0.5925038", "0.5925038", "0.5914102", "0.59138167", "0.5913199", "0.5908297", "0.5907912", "0.5901718", "0.58908933", "0.5885631", "0.5878563", "0.5854235", "0.5846179", "0.58308464", "0.58262163", "0.5817488", "0.58134204", "0.581162", "0.5806763", "0.5806219", "0.5806219", "0.5803804", "0.58011067", "0.57992506", "0.57980865", "0.5790163", "0.5785569", "0.57744396", "0.5773043", "0.5762006", "0.5762006", "0.5760945", "0.5758651", "0.575552", "0.57550967", "0.5746607", "0.57422805", "0.57380664", "0.57330036", "0.5728362", "0.5727902", "0.5720986", "0.5703828", "0.57032293", "0.569507", "0.5689028", "0.5684642", "0.5684505", "0.5666885", "0.5663498", "0.5662465", "0.5651841", "0.56340814", "0.5629338", "0.5629009", "0.56283665", "0.5625989", "0.5625421", "0.56176984", "0.5617611", "0.5617611", "0.5617611", "0.5617611", "0.5617611", "0.56170166", "0.5613658", "0.5610412" ]
0.69881284
1
Gets number of lives.
public Counter getNumberOfLives() { return this.numberOfLives; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int lives() {\r\n return lives;\r\n }", "public final int getLives() {\n\t\treturn lives;\n\t}", "public int getLives() {\r\n\t\treturn lives;\r\n\t}", "public int lives() {\r\n return lifeStates.head().lives();\r\n }", "public int getLives() {\n return lives;\n }", "public int getLives()\n {\n return lives;\n }", "public int getlives(){\n\t\treturn this.lives;\n\t}", "public int getLives() {return lives;}", "public int getValue() {\r\n return lives;\r\n }", "public int getNumAlive() {\n return numAlive;\n }", "public int getLives(){return lives;}", "public int getLife() {\r\n\t\treturn life;\r\n\t}", "public int getLife()\n\t{\n\t\treturn life;\n\t}", "public int getLife() {\n\t\treturn life;\n\t}", "public int getLife() {\n return life;\n }", "public List<Integer> getLives() {\n return lives;\n }", "public int getLife() {\n\t\treturn this.life;\n\t}", "public int getNumDeaths() {\n\t\treturn this.numDeaths;\n\t}", "public int getLife(){\r\n\t\treturn this.life;\r\n\t}", "public long getLifePoints()\n {\n return this.lifePoints;\n }", "public int getLifePoints(){\n return this.lifePoints;\n }", "public int getLiveCount() {\n return liveCount;\n }", "public int getLosses() {\n return losses;\n }", "public int getDeaths() {\n return deaths;\n }", "public int getLosses() {\n return losses;\n }", "public void setLives(int lives){\n liveCount = lives;\n }", "public int getILives() {\n return iLives;\n }", "public int nbEnemiesAlive(){\n return state.getPlayers().size()-1;\n }", "public int getDeathPoints() {\n return deathPoints;\n }", "public int getNumDead() {\n int count = 0;\n for (Map.Entry<Integer, Enemy> entry :enemies.entrySet()) {\n if (entry.getValue().isDead()) {\n count++;\n }\n }\n return count;\n }", "public int getLivesRemaining();", "public int getNumPeople(){\r\n int num = 0;\r\n return num;\r\n }", "public int getDeaths()\n\t{\n \treturn currentDeath;\n\t}", "public int calcMaxLife() {\n\t\treturn 10;\r\n\t}", "@Override\r\n\tpublic String lives() {\n\t\treturn \"lives in land and water\";\r\n\t}", "public int howManyHeroDead() {\r\n int count;\r\n count = 0;\r\n for (Hero h: team) {\r\n if (h.isDead()) {\r\n count = count + 1;\r\n }\r\n }\r\n return count;\r\n }", "public int numAlivePokemon() {\r\n\t\tint count = 0;\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tif (p.getCurrentHP() > 0) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int getLifeTime() {\n return lifeTime;\n }", "public int getHealthCount() {\n return healthCount;\n }", "public void addLife() {lives++;}", "public int getLife(){\n return lifeTime;\n }", "public int getShipsAlive() {\n return this.numberOfShips;\n }", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "public int getNumTimes();", "public void takeLife()\n\t{\n\t\tlives --;\n\t}", "public int getPointsHealthy()\n {\n return pointsHealthy;\n }", "int getNumOfPlayers() {\n return this.numOfPlayers;\n }", "public int getRobotsDestroyed () {\r\n\t\treturn this.robotsDestroyed;\r\n\t}", "public void setLives(int lives) {\r\n\t\tthis.lives = lives;\r\n\t}", "public int getlife(){\r\n return life;\r\n}", "public int getMaxLife() {\n\t\treturn MAX_LIFE;\n\t}", "public void setLives(int lives) {this.lives = lives;}", "public int getPlayerCount() {\n \n \treturn playerCount;\n \t\n }", "public static int getNumPlayers(){\n\t\treturn numPlayers;\n\t}", "public int getNumPlayers() {\n\n\t\treturn this.playerCount;\n\t}", "public Integer getNumLoteLanc() {\n\t\treturn numLoteLanc;\n\t}", "public void buyLife() {\n this.lives++;\n livesWereBought++;\n\n }", "int getNumberOfGuests();", "public int get_count();", "public int getNbVictoires()\r\n\t{\r\n\t\treturn this.nbVictoires;\r\n\t}", "int getAchievementsCount();", "public int checkNoOfExplosivesPlayerHolds () { return noOfExplosives; }", "int getExperiencesCount();", "int getPointsCount();", "public void lostLife(){\r\n\t\tthis.lives--;\r\n\t}", "public int playersCount(){\r\n\t\treturn players.size();\r\n\t}", "public int getVisits() {\n return visits;\n }", "public int getNowPeople() {\n\t\treturn nowPeople;\n\t}", "public int getNumPersons() {\r\n\t\treturn this.persons.size();\r\n\t}", "public int countPlayers(){\n return players.size();\n }", "public int getPlayerCount() {\n\t\treturn playerCount;\n\t}", "public long getCount() {\n return counter.get();\n }", "public String getDeadCount() {\n return deadCount;\n }", "public int length() {\n \t\tif (-1 == n_points) setupForDisplay();\n \t\treturn n_points;\n \t}", "public int playerCount()\r\n\t{\r\n\t\tint count = 0;\r\n\t\tfor(Player player: this.players)\r\n\t\t{\r\n\t\t\tif(player != null)\r\n\t\t\t{\r\n\t\t\t\t++count;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int get_howmany() {\n return how_many;\n }", "public int getNumOfPlayers() {\n\t\treturn numOfPlayers;\n\t}", "public int getNumPlayers() {\n return numPlayers;\n }", "public static int getLunchCounter() {\n return lunchCounter;\n }", "public static int getCampLeaseCount( ) {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\treturn leaseDao.getCampLeaseCount();\r\n\t}", "public int getNumTimesEntered() {\n return numTimesEntered;\n }", "public int getStatsCount() {\n return instance.getStatsCount();\n }", "public int getNumPlayers(){\n return m_numPlayers;\n }", "public int getTimeToLive() {\n\t\treturn deathsTillForget;\n\t}", "int getInCount();", "public int numPlayers() {\n return playerList.size();\n }", "public short getLosses() {\n\n return m_losses;\n }", "public static int getEnemyLives(){\n return 1 + currentLvl * 2;\n\n }", "public int getTotalPeopleLeft() {\n\t\treturn totalPeopleLeft;\n\t}", "@Exported\n public int getNumberOfSlaves() {\n if (this.slaves == null) {\n return 0;\n }\n return this.slaves.size();\n }", "public int getNumPlayers(){\n\t\treturn this.players.size();\n\t}", "public int numPlayers(){\n return this.members.size();\n }", "int getReaultCount();", "public int numHouses() {\n\t\treturn buildings;\n\t}", "public long numHits() {\n return numHits.longValue();\n }", "public int lireCount() {\n\t\treturn cpt;\n\t}", "public int count() {\r\n return count;\r\n }", "public int numberOfTires() {\n int tires = 4;\n return tires;\n }" ]
[ "0.85166234", "0.83475", "0.83037496", "0.81369215", "0.8129405", "0.7993711", "0.7657878", "0.7600284", "0.75938684", "0.72795016", "0.7165723", "0.7164996", "0.7131674", "0.71003014", "0.7012955", "0.7009808", "0.69888675", "0.69655305", "0.6928752", "0.6870947", "0.68599296", "0.68415856", "0.67305017", "0.67215985", "0.6709331", "0.66766804", "0.6652126", "0.6648542", "0.66389257", "0.66278416", "0.6613481", "0.66059875", "0.6593322", "0.6510529", "0.6452428", "0.64088774", "0.6401411", "0.6388057", "0.63813114", "0.6361448", "0.63566077", "0.6344086", "0.63255805", "0.63255805", "0.63255805", "0.6289916", "0.62405795", "0.6187639", "0.618314", "0.61814326", "0.6179562", "0.61712074", "0.6162996", "0.6160403", "0.6154193", "0.6141605", "0.61359376", "0.6130756", "0.6130311", "0.6106957", "0.6079758", "0.6075745", "0.6063086", "0.6059185", "0.6057787", "0.6055503", "0.6049376", "0.60418916", "0.60390675", "0.6032656", "0.6026931", "0.60161716", "0.60074186", "0.60007095", "0.5997475", "0.59954625", "0.59899384", "0.59834343", "0.59745437", "0.59672505", "0.5966483", "0.59640086", "0.5959657", "0.5955758", "0.594885", "0.5948452", "0.59474987", "0.59471047", "0.5945332", "0.5937871", "0.59323525", "0.59312487", "0.59301233", "0.59297734", "0.5919109", "0.591627", "0.5915317", "0.59130895", "0.5903475", "0.589816" ]
0.7183261
10
Initialize. Initialize a new game: create the Blocks, Ball and Paddle, and add them to the game.
public void initialize() { addSprite(this.info.getBackground()); createBorders(); defineDeathBlock(); addIndicators(); BlockRemover removeBlock = new BlockRemover(this, this.remainingBlocks); // this.remainingBlocks=removeBlock.getRemainingBlocks(); ScoreTrackingListener scoreTrackingListener = new ScoreTrackingListener(this.score); for (int i = 0; i < info.blocks().size(); i++) { info.blocks().get(i).addHitListener(removeBlock); info.blocks().get(i).addHitListener(scoreTrackingListener); info.blocks().get(i).addToGame(this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initialize() {\n // create a runner using a function\n this.createScreenBorders();\n // create a keyboard sensor.\n this.keyboard = this.runner.getGUI().getKeyboardSensor();\n //create the environment for the game (game environment and sprites collection)\n this.createEnvironment();\n // BACKGROUND CREATION //\n this.createBackground();\n // create the counters for the game.\n this.createCounters();\n // LISTENERS CREATION //\n //create a message printing listener.\n HitListener phl = new PrintingHitListener();\n //create a new block remover listener.\n HitListener blockrmv = new BlockRemover(this, blockCounter);\n //create a new ball remover listener.\n HitListener ballrmv = new BallRemover(this, ballCounter);\n //create a new score counter listener.\n HitListener scorelstn = new ScoreTrackingListener(this.scoreCounter);\n // BLOCKS CREATION //\n this.createBlocks(phl, blockrmv, scorelstn);\n // SIDE BLOCKS CREATION //\n this.createSideBlocks();\n // DEATH BLOCK CREATION //\n this.createDeathBlock(ballrmv);\n // LEVEL'S NAME //\n LevelsName name = new LevelsName(this.levelInfo.levelName());\n // add the whole-game indicators to the sprites list.\n this.sprites.addSprite(scoreIndi);\n this.sprites.addSprite(lifeIndi);\n this.sprites.addSprite(name);\n }", "public void initialize() {\r\n levelInformation.getBackground().addToGame(this);\r\n ScoreTrackingListener scoreTrackingListener = new ScoreTrackingListener(score);\r\n ScoreIndicator scoreIndicator = new ScoreIndicator(score, guiWidth);\r\n BlockRemover blockRemover = new BlockRemover(this, blockCounter);\r\n BallAdder ballAdder = new BallAdder(this, environment, ballCounter);\r\n BallRemover ballRemover = new BallRemover(this, ballCounter);\r\n for (Block blocks : levelInformation.blocks()) {\r\n Block block = blocks;\r\n if (block.getColor() == Color.black) {\r\n block.addHitListener(ballRemover);\r\n }\r\n if (block.getColor() == Color.magenta) {\r\n block.addHitListener(ballAdder);\r\n }\r\n block.addHitListener(blockRemover);\r\n block.addHitListener(scoreTrackingListener);\r\n block.addToGame(this);\r\n }\r\n blockCounter.increase(levelInformation.numberOfBlocksToRemove());\r\n Paddle paddle = new Paddle(new Rectangle(new Point((guiWidth / 2) - (levelInformation.paddleWidth() / 2),\r\n 580), levelInformation.paddleWidth(), 10), Color.YELLOW, keyboard, levelInformation.paddleSpeed());\r\n paddle.addToGame(this);\r\n Block top = new Block(new Rectangle(new Point(0, 0), 800, 20), Color.GRAY);\r\n Block left = new Block(new Rectangle(new Point(0, 10), wallWidth, 630), Color.GRAY);\r\n Block right = new Block(new Rectangle(new Point(guiWidth - wallWidth, 10), wallWidth, 630), Color.GRAY);\r\n Block bottom = new Block(new Rectangle(new Point(0, guiHeight), 800, 10), Color.GRAY);\r\n bottom.addToGame(this);\r\n right.addToGame(this);\r\n left.addToGame(this);\r\n top.addToGame(this);\r\n bottom.addHitListener(ballRemover);\r\n scoreIndicator.addToGame(this);\r\n }", "private void setUpGame() {\n\t\tsetUpBlocks();\n\t\tsetUpBall();\n\t\tsetUpPaddle();\n\t\taddMouseListeners();\n\t}", "private void init() {\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager); //lets us access keyboard\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\tAssets.init();\n\t\t\n\t\tgameCamera = new GameCamera(this, 0,0);\n\t\thandler = new Handler(this);\n\t\t\n\t\tgameState = new GameState(handler);\n\t\tmenuState = new MenuState(handler);\n\t\tsettingState = new SettingState(handler);\n\t\tmapState = new mapState(handler);\n\t\tmansionState = new mansionState(handler);\n\t\tparkState = new parkState(handler);\n\t\tjazzState = new jazzState(handler);\n\t\tmansionGardenState = new mansionGardenState(handler);\n\t\tmansionArcadeState = new mansionArcadeState(handler);\n\t\tmansionStudyState = new mansionStudyState(handler);\n\t\tjazzPRoomState = new jazzPRoomState(handler);\n\t\tState.setState(menuState);\n\t}", "private void initialize() {\n\n this.levelName = \"Green 3\";\n this.numberOfBalls = 2;\n int ballsRadius = 5;\n Color ballsColor = Color.white;\n this.paddleHeight = (screenHeight / 27);\n this.paddleWidth = (screenWidth / 8);\n this.paddleSpeed = 11;\n int surroundingBlocksWidth = 30;\n this.paddleColor = new Color(1.0f, 0.699f, 0.000f);\n this.paddleUpperLeft = new Point(screenWidth / 2.2, screenHeight - surroundingBlocksWidth\n - this.paddleHeight);\n Color backgroundColor = new Color(0.000f, 0.420f, 0.000f);\n this.background = new Block(new Rectangle(new Point(0, 0), screenWidth + 1\n , screenHeight + 2), backgroundColor);\n this.background.setNumber(-1);\n\n Color[] colors = {Color.darkGray, Color.red, Color.yellow, Color.blue, Color.white};\n int blocksRowsNum = 5;\n int blocksInFirstRow = 10;\n int blocksWidth = screenWidth / 16;\n int blockHeight = screenHeight / 20;\n int firstBlockYlocation = screenHeight / 4;\n int removableBlocks = 0;\n Block[][] stairs = new Block[blocksRowsNum][];\n //blocks initialize.\n for (int i = 0; i < blocksRowsNum; i++, blocksInFirstRow--) {\n int number;\n for (int j = 0; j < blocksInFirstRow; j++) {\n if (i == 0) {\n number = 2; //top row.\n } else {\n number = 1;\n }\n stairs[i] = new Block[blocksInFirstRow];\n Point upperLeft = new Point(screenWidth - (blocksWidth * (j + 1)) - surroundingBlocksWidth\n , firstBlockYlocation + (blockHeight * i));\n stairs[i][j] = new Block(new Rectangle(upperLeft, blocksWidth, blockHeight), colors[i % 5]);\n if (stairs[i][j].getHitPoints() != -2 && stairs[i][j].getHitPoints() != -3) { // not death or live block\n stairs[i][j].setNumber(number);\n removableBlocks++;\n }\n this.blocks.add(stairs[i][j]);\n }\n\n }\n this.numberOfBlocksToRemove = (int) (removableBlocks * 0.5); //must destroy half of them.\n this.ballsCenter.add(new Point(screenWidth / 1.93, screenHeight * 0.9));\n this.ballsCenter.add(new Point(screenWidth / 1.93, screenHeight * 0.9));\n List<Velocity> v = new ArrayList<>();\n v.add(Velocity.fromAngleAndSpeed(45, 9));\n v.add(Velocity.fromAngleAndSpeed(-45, 9));\n this.ballsFactory = new BallsFactory(this.ballsCenter, ballsRadius, ballsColor,\n screenWidth, screenHeight, v);\n\n //bodies.\n //tower.\n Block base = new Block(new Rectangle(new Point(surroundingBlocksWidth + screenWidth / 16, screenHeight * 0.7)\n , screenWidth / 6, screenHeight * 0.3), Color.darkGray);\n base.setNumber(-1);\n this.bodies.add(base);\n Block base2 = new Block(new Rectangle(new Point(base.getCollisionRectangle().getUpperLine()\n .middle().getX() - base.getWidth() / 6\n , base.getCollisionRectangle().getUpperLeft().getY() - base.getHeight() / 2.5), base.getWidth() / 3\n , base.getHeight() / 2.5), Color.gray);\n base2.setNumber(-1);\n this.bodies.add(base2);\n Block pole = new Block(new Rectangle(new Point(base2.getCollisionRectangle().getUpperLine().middle().getX()\n - base2.getWidth() / 6, base2.getCollisionRectangle().getUpperLeft().getY() - screenHeight / 3)\n , base2.getWidth() / 3, screenHeight / 3), Color.lightGray);\n pole.setNumber(-1);\n this.bodies.add(pole);\n\n double windowWidth = base.getWidth() / 10;\n double windowHeight = base.getHeight() / 7;\n double b = base.getWidth() / 12;\n double h = base.getHeight() / 20;\n for (int i = 0; i < 6; i++) { //windows of tower.\n for (int j = 0; j < 5; j++) {\n Block window = new Block(new Rectangle(new Point(base.getCollisionRectangle().getUpperLeft().getX() + b\n + (windowWidth + b) * j,\n base.getCollisionRectangle().getUpperLeft().getY() + h + (windowHeight + h) * i), windowWidth\n , windowHeight), Color.white);\n window.setNumber(-1);\n this.bodies.add(window);\n }\n }\n\n //circles on the top of the tower.\n Circle c1 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 17, Color.black, \"fill\");\n Circle c2 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 12, Color.darkGray, \"fill\");\n Circle c3 = new Circle(pole.getCollisionRectangle().getUpperLine().middle().getX()\n , pole.getCollisionRectangle().getUpperLine().middle().getY() - 17, 7, Color.red, \"fill\");\n this.bodies.add(c1);\n this.bodies.add(c2);\n this.bodies.add(c3);\n\n\n }", "public void initialize() {\r\n /**********************************/\r\n //this.numOfLives=new hitevent.Counter(START_NUM_LIVES);\r\n //this.blocksCounter = new hitevent.Counter(this.levelInformation.numberOfBlocksToRemove());\r\n //this.gui = new GUI(\"jumping\", WIDTH_SCREEN, HI_SCREEN);\r\n /*****************************************/\r\n //create new point to create the edges of the screen\r\n Point p1 = new Point(-5, 20);\r\n Point p2 = new Point(-5, -5);\r\n Point p3 = new Point(WIDTH_SCREEN - 20, -5);\r\n Point p4 = new Point(-5, HI_SCREEN - 15);\r\n //an array to the blocks of the edges\r\n Block[] edges = new Block[4];\r\n //create the adges of the screen\r\n Counter[] edgeCount = new Counter[4];\r\n edgeCount[0] = new Counter(1);\r\n edges[0] = new Block(new Rectangle(p1, WIDTH_SCREEN + 20, 25), Color.RED, edgeCount[0]);\r\n edgeCount[1] = new Counter(1);\r\n edges[1] = new Block(new Rectangle(p2, 25, HI_SCREEN + 20), Color.RED, edgeCount[1]);\r\n edgeCount[2] = new Counter(1);\r\n edges[2] = new Block(new Rectangle(p3, 25, HI_SCREEN + 20), Color.RED, edgeCount[2]);\r\n edgeCount[3] = new Counter(1);\r\n edges[3] = new Block(new Rectangle(p4, WIDTH_SCREEN + 20, 25), Color.RED, edgeCount[3]);\r\n\r\n //initilize the paddle\r\n initializePaddle();\r\n //sprite collection and game evnironment\r\n SpriteCollection sprite = new SpriteCollection();\r\n GameEnvironment game1 = new GameEnvironment();\r\n\r\n //add the Background of the level to the sprite collection\r\n this.addSprite(this.levelInformation.getBackground());\r\n //create score Indicator, lives Indicator and level name\r\n ScoreIndicator scoreIndicator1 = new ScoreIndicator(score);\r\n LivesIndicator livesIndicator1 = new LivesIndicator(numOfLives);\r\n LevelIndicator levelName = new LevelIndicator(this.levelInformation.levelName());\r\n\r\n game1.addCollidable((Collidable) this.paddle);\r\n sprite.addSprite((Sprite) this.paddle);\r\n sprite.addSprite((Sprite) scoreIndicator1);\r\n sprite.addSprite((Sprite) livesIndicator1);\r\n sprite.addSprite((Sprite) levelName);\r\n\r\n //add the paddle, score Indicator, lives Indicator and level name to the game\r\n this.paddle.addToGame(this);\r\n scoreIndicator1.addToGame(this);\r\n livesIndicator1.addToGame(this);\r\n levelName.addToGame(this);\r\n\r\n //initilize the Blocks\r\n initializeBlocks();\r\n\r\n }", "public void initializeGame() {\n speed = 75;\n ticks = 0;\n ticksTubes = 0;\n best = null;\n score = 0;\n\n //Make a new pool of birds based on the parameters set in the species'\n //genomes\n birds.clear();\n for (final Species species : Pool.species)\n for (final Genome genome : species.genomes) {\n genome.generateNetwork();\n birds.add(new Bird(species, genome));\n }\n tubes.clear();\n }", "public void gameInitialize() {\n this.world = new BufferedImage(GameConstants.GAME_SCREEN_WIDTH,\n GameConstants.GAME_SCREEN_HEIGHT,\n BufferedImage.TYPE_3BYTE_BGR);\n\n gameObjs = new ArrayList<>();\n try {\n background = (BufferedImage)Resource.getHashMap().get(\"wallpaper\");\n /*\n * note class loaders read files from the out folder (build folder in Netbeans) and not the\n * current working directory.\n */\n InputStreamReader isr = new InputStreamReader(Objects.requireNonNull(RainbowReef.class.getClassLoader().getResourceAsStream(\"map/map1\")));\n BufferedReader mapReader = new BufferedReader(isr);\n\n String row = mapReader.readLine();\n if (row == null) {\n throw new IOException(\"nothing here\");\n }\n String[] mapInfo = row.split(\"\\t\");\n int numCols = Integer.parseInt(mapInfo[0]);\n int numRows = Integer.parseInt(mapInfo[1]);\n for (int curRow = 0; curRow < numRows; curRow++){\n row = mapReader.readLine();\n mapInfo = row.split(\"\\t\");\n for(int curCol = 0; curCol< numCols; curCol++){\n switch (mapInfo[curCol]) {\n case \"2\" -> {\n UnbreakableWall sowall = new UnbreakableWall(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"SolidBlock\"));\n gameObjs.add(sowall);\n }\n case \"3\" -> {\n BreakableWall pwall = new BreakableWall(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"PinkBlock\"));\n gameObjs.add(pwall);\n }\n case \"4\" -> {\n BreakableWall ywall = new BreakableWall(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"YellowBlock\"));\n gameObjs.add(ywall);\n }\n case \"5\" -> {\n BreakableWall rwall = new BreakableWall(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"RedBlock\"));\n gameObjs.add(rwall);\n }\n case \"6\" -> {\n BreakableWall gwall = new BreakableWall(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"GreenBlock\"));\n gameObjs.add(gwall);\n }\n case \"7\" -> {\n Health health = new Health(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"HealthBlock\"));\n gameObjs.add(health);\n }\n case \"8\" -> {\n BulletBlock bigbullet = new BulletBlock(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"BulletBlock\"));\n gameObjs.add(bigbullet);\n }\n case \"9\" -> {\n Goblin bl = new Goblin(curCol * 20, curRow * 20, (BufferedImage) Resource.getHashMap().get(\"Goblin\"));\n gameObjs.add(bl);\n }\n }\n }\n }\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n ex.printStackTrace();\n }\n\n Katch t1 = new Katch(290, 440, 0, 0, 0, (BufferedImage) Resource.getHashMap().get(\"Katch\"));\n KatchControl tc1 = new KatchControl(t1, KeyEvent.VK_D, KeyEvent.VK_A, KeyEvent.VK_SPACE);\n this.setBackground(Color.BLACK);\n this.lf.getJf().addKeyListener(tc1);\n this.gameObjs.add(t1);\n\n }", "public static void init() {\n Handler.log(Level.INFO, \"Loading Blocks\");\n\n oreAluminum = new BaseOre(Config.oreAluminumID).setUnlocalizedName(Archive.oreAluminum)\n .setHardness(3.0F).setResistance(5.0F);\n\n blockGrinder = new BaseContainerBlock(Config.blockGrinderID, Archive.grinderGUID)\n .setUnlocalizedName(Archive.blockGrinder);\n\n blockOven = new BaseContainerBlock(Config.blockOvenID, Archive.ovenGUID)\n .setUnlocalizedName(Archive.blockOven);\n }", "protected void initialize() {\n \tsetShowStartScreen(false);\n \t\n \t// do not preload resources, for this very simple game\n \t// preloadResources();\n \t\n \t// Max number of balls is just 17\n \tchains.setMaxBalls(17);\n }", "public void initGame() {\n this.game = new Game();\n }", "public void initializeGameComponents(){\n\t\tcreateWalls();\n\t}", "public static void initialize()\n {\n CHUNK_LOADER = new ChunkLoader();\n //VILLAGE_INDICATOR = new VillageIndicator();\n\n BLOCK_LIST.add(CHUNK_LOADER);\n //BLOCK_LIST.add(VILLAGE_INDICATOR);\n Log.info(\"=========================================================> Initialized Blocks\");\n }", "private void GameInitialize()\r\n { \r\n // set to fullscreen to use the entire \r\n // display or false to only use\r\n // the area inbetween the two bars on the display\r\n setFullScreenMode(true);\r\n\r\n // setup 3D\r\n try\r\n {\r\n Object3D[] buffer = Loader.load(\"/RaptorWalk.m3g\");\r\n\r\n for(int i = 0; i < buffer.length; i++)\r\n {\r\n if(buffer[i] instanceof World)\r\n {\r\n // get our world node\r\n mWorld = (World)buffer[i];\r\n mEnemy = (SkinnedMesh)mWorld.find(56);\r\n mEnemyTimer = 0;\r\n break;\r\n }\r\n }\r\n }\r\n catch(Exception e) \r\n { System.out.println(\"Loading error!\" + e.getMessage()); }\r\n\r\n // create a game font\r\n mGameFont = Font.getFont(Font.FACE_MONOSPACE, \r\n Font.STYLE_PLAIN, Font.SIZE_SMALL);\r\n\r\n // Get the active camera from the world\r\n mCam = mWorld.getActiveCamera();\r\n mCam.translate(0, 1.0f, 0);\r\n\r\n // Create an ambient light and add it to the world node\r\n Light light = new Light();\r\n light.setMode(Light.AMBIENT);\r\n light.setIntensity(3);\r\n mWorld.addChild(light);\r\n }", "public void initGame() {\n\t\tWorld.clear();\n\t\tstate = STATE.PLAYING;\n\n\t\tWorld.add(bat1);\n\t\tWorld.add(bat2);\n\n\t\tball = new Ball(Screen.getCenterX() - Ball.WIDTH / 2,\n\t\t\t\tScreen.getCenterY() - Ball.HEIGHT / 2);\n\n\t\tWorld.add(new Wall(0, 0, Screen.getWidth(), LOWER_LIMIT));\n\t\tWorld.add(new Wall(0, UPPER_LIMIT, Screen.getWidth(), Screen\n\t\t\t\t.getHeight() - UPPER_LIMIT));\n\n\t\tWorld.add(ball);\n\n\t\tInput.register(new InputListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyDown(int eventKey) {\n\t\t\t\tif (eventKey == Keyboard.KEY_ESCAPE) {\n\t\t\t\t\tinitIntro();\n\t\t\t\t\tInput.unregister(this);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyUp(int eventKey) {\n\t\t\t}\n\t\t});\n\t\tWorld.add(new TextStatic(footerText, Screen.getCenterX()\n\t\t\t\t- footerText.length() * Sprite.CHAR_WIDTH / 2,\n\t\t\t\tSprite.CHAR_HEIGHT, Color.yellow));\n\t}", "public void initGame() {\n\t\ttoolbar = new Toolbar();\n\t\ttoolbar.setButtonListener(this);\n\t\tadd(toolbar, BorderLayout.NORTH);\n\n\t\t// setup & add board\n\t\tboard = new Board();\n\t\tadd(board, BorderLayout.CENTER);\n\n\t\t// jframe setup\n\t\tsetSize(Constants.BOARD_WIDTH, Constants.BOARD_HEIGHT);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t}", "GameModel() {\n mState = GAME_BEFORE_START;\n mFixCount = 30;\n mReasonable = false;\n mBoard = new BlockState[BOARD_ROWS][BOARD_COLS];\n for (int r = 0; r < BOARD_ROWS; ++r) {\n for (int c = 0; c < BOARD_COLS; ++c) {\n mBoard[r][c] = new BlockState();\n }\n }\n reInit();\n }", "public Game() \n {\n parser = new Parser();\n name = new String();\n player = new Player();\n ai = new AI();\n createRooms();\n rand = -1;\n enemyPresent = false;\n wantToQuit = false;\n alive = true;\n createItems();\n createWeapons();\n createEnemy();\n setEnemy();\n setItems();\n setWeapons();\n setExits();\n }", "public static void init()\n {\n oreStarSteel = new BlockOreStarSteel(MSAConfig.ores, Material.rock);\n storageStarSteel = new BlockStorageStarSteel(MSAConfig.storageBlock, Material.iron);\n // tech blocks\n launchTower = new BlockLaunchTower(MSAConfig.launchTower, Material.iron);\n launchTowerController = new BlockLaunchControl(MSAConfig.launchController, Material.iron);\n rocketAssembler = new BlockRocketAssembler(MSAConfig.rocketAssembler, Material.iron);\n comSatellite = new BlockComSatellite(MSAConfig.comSatellite, Material.iron);\n ssBuilding = new BlockSSBuilding(MSAConfig.ssBuilding, Material.rock);\n commandCenter = new BlockCommandCenter(MSAConfig.commandCenter, Material.iron);\n\n /* Register Blocks */\n // ore blocks\n GameRegistry.registerBlock(oreStarSteel, \"oreStarSteel\");\n GameRegistry.registerBlock(storageStarSteel, \"storageStarSteel\");\n // tech blocks\n GameRegistry.registerBlock(launchTower, \"launchTower\");\n GameRegistry.registerBlock(launchTowerController, \"launchTowerController\");\n GameRegistry.registerBlock(rocketAssembler, \"rocketAssembler\");\n GameRegistry.registerBlock(comSatellite, \"comSatellite\");\n GameRegistry.registerBlock(ssBuilding, \"ssBuilding\");\n GameRegistry.registerBlock(commandCenter, \"commandCenter\");\n\n /* Set block harvest level */\n // ore blocks\n MinecraftForge.setBlockHarvestLevel(oreStarSteel, \"pickaxe\", 2);\n MinecraftForge.setBlockHarvestLevel(storageStarSteel, \"pickaxe\", 2);\n // building blocks\n MinecraftForge.setBlockHarvestLevel(ssBuilding, \"pickaxe\", 2);\n // tech blocks\n MinecraftForge.setBlockHarvestLevel(launchTower, \"pickaxe\", 1);\n }", "public Game()\r\n { \r\n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\r\n super(800, 600, 1);\r\n \r\n // add grill obj on left\r\n grill = new Grill();\r\n addObject(grill, 200, 400);\r\n \r\n // add table on right\r\n prepTable = new PrepTable();\r\n addObject(prepTable, 600, 400);\r\n \r\n // add all the table buttons\r\n addTableButtons();\r\n \r\n // add timer text\r\n timerText = new Text(\"2:00\");\r\n addObject(timerText, 60, 30);\r\n \r\n // setup the timer\r\n frameRate = 60;\r\n timeLeft = frameRate * 2;\r\n \r\n // setup the points\r\n score = 0;\r\n scoreText = new Text(\"$0\");\r\n addObject(scoreText, 50, 80);\r\n \r\n // setup orders\r\n orders = new ArrayList<Order>();\r\n orderTimer = frameRate * 4; // start with a 4 sec delay before the first order\r\n \r\n // the game is still updating\r\n stillRunning = true;\r\n \r\n // fix layering order\r\n setPaintOrder(Text.class, Topping.class, Button.class, Patty.class, Order.class);\r\n \r\n // set order variance\r\n orderVariance = 2 * frameRate;\r\n \r\n // init seconds counter\r\n totalSecondsElapsed = 0;\r\n }", "public static void initializeBlocks() {\n if (Config.enableGiveADamn) {\n giveADamn = new GiveADamn();\n }\n\n if (Config.enableGlowstone) {\n glowstone = new HeavyLight();\n }\n\n if (Config.enableSpicedSand) {\n sandSpiced = new SpicedSand();\n }\n /*\n\n if (Config.enableMuffler){\n muffler = new Muffler();\n }\n */\n }", "private void prepare()\n {\n Block block = new Block(10);\n addObject(block,372,150);\n Wall wall = new Wall();\n addObject(wall,52,167);\n Wall wall2 = new Wall();\n addObject(wall2,160,167);\n Wall wall3 = new Wall();\n addObject(wall3,550,167);\n Wall wall4 = new Wall();\n addObject(wall4,650,167);\n Wall wall5 = new Wall();\n addObject(wall5,750,167);\n block.setLocation(306,171);\n Robot robot = new Robot();\n addObject(robot,48,51);\n Pizza pizza = new Pizza();\n addObject(pizza,550,60);\n Pizza pizza2 = new Pizza();\n addObject(pizza2,727,53);\n Pizza pizza3 = new Pizza();\n addObject(pizza3,364,303);\n Pizza pizza4 = new Pizza();\n addObject(pizza4,224,400);\n Pizza pizza5 = new Pizza();\n addObject(pizza5,622,395);\n ScorePanel scorePanel = new ScorePanel();\n addObject(scorePanel,106,525);\n Home home = new Home();\n addObject(home,717,521);\n\n block.setLocation(344,173);\n pizza3.setLocation(394,297);\n Pizza pizza6 = new Pizza();\n addObject(pizza6,711,265);\n Pizza pizza7 = new Pizza();\n addObject(pizza7,68,276);\n\n }", "public Game() {\n\n GameBoard gameBoard = new GameBoard();\n Renderer renderer = new Renderer(gameBoard);\n }", "public Game() {\n initializeBoard();\n }", "private void init() {\n display = new Display(title, getWidth(), getHeight()); \n Assets.init();\n player = new Player(getWidth() / 2 - 50, getHeight() - 50, 100, 30, this);\n rayo = new Rayo(getWidth() / 2 - 10, player.y - player.height , 10, 30, 0, 0, this);\n borrego = new Borrego(-80, 60 , 50, 20, 0, 0, this);\n generateEnemies();\n generateFortalezas();\n bombas= new ArrayList<Bomba>();\n \n \n display.getJframe().addKeyListener(keyManager);\n }", "public Game()\n {\n createRooms();\n parser= new Parser();\n }", "public GameConfigure()\n {\n trackItems = new Stack<String>();\n random = new Random();\n visits = new Stack<Room>();\n items = new ArrayList<Item>(); \n rooms = new ArrayList<Room>(); \n characters = new ArrayList<Person>();\n\n // Creates all the items, people, rooms and the player.\n resetGame();\n }", "public void init() {\n\t\tGRect background = new GRect(APPLICATION_WIDTH, APPLICATION_HEIGHT);\n\t\tbackground.setFilled(true);\n\t\tbackground.setFillColor(Color.LIGHT_GRAY);\n\t\tadd(background);\n\t\t\n\t\ttopText = new GLabel(\"Welcome to the slot machine!\");\n\t\tmidText = new GLabel(\"You now have $50.\");\n\t\tbotText = new GLabel(\"Click to play\");\n\t\ttopText.setFont(\"Serif-24\");\n\t\tmidText.setFont(\"Serif-24\");\n\t\tbotText.setFont(\"Serif-24\");\n\t\tadd(topText, 100, 250);\n\t\tadd(midText, 100, 280);\n\t\tadd(botText, 100, 310);\n\t\t\n\t\tslotBox1 = new GImage(\"empty.png\");;\n\t\tslotBox2 = new GImage(\"empty.png\");\n\t\tslotBox3 = new GImage(\"empty.png\");\n\t\tadd(slotBox1, 100, 100);\n\t\tadd(slotBox2, 250, 100);\n\t\tadd(slotBox3, 400, 100);\n\t\t\n\t\t\n\t\t\n\t\twhile (!gameOver()) {\n\t\t\twaitForClick();\n\t\t\tremoveAll();\n\t\t\tadd(background);\n\t\t\tplayGame();\n\t\t}\n\t}", "public GameManager(){\r\n init = new Initialisation();\r\n tower=init.getTower();\r\n courtyard=init.getCourtyard();\r\n kitchen=init.getKitchen();\r\n banquetHall=init.getBanquetHall();\r\n stock=init.getStock();\r\n throneHall=init.getThroneHall();\r\n vestibule=init.getVestibule();\r\n stables=init.getStables();\r\n\r\n this.player = new Player(tower);\r\n\r\n push(new IntroductionState());\r\n\t}", "public void GameInit() {\n ufot = new ArrayList();\n kuti = new Kuti();\n pelaaja = new Pelaaja();\n ufokuti = new UfoKuti();\n ufokuti.setVisible(false);\n kuti.setVisible(false);\n grafiikka = new Grafiikka(this);\n grafiikka.asetaKuvaRajahdykselle();\n grafiikka.asetaKuvaPelaajalle(grafiikka.pelaajaIcon(pelaaja), pelaaja);\n asetaUfotRiveihin();\n ufokutiInit();\n }", "private void setupGame() {\n \tdrawBricks();\n \tdrawPaddle();\n \tdrawBall(); \t\n \tsetInitialBallVelocity();\n }", "@SuppressWarnings(\"static-access\")\n\tprivate void init() {\n\t\tdisplay= new Display(title,width,height);\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\n\t\t\n\t\t//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Declarare imagini~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n Assets.init();\n \n\t\tgameState= new GameState(this);\n\t\tgameStateAI= new GameStateAI(this);\n\t\tmenuState = new MenuState(this);\n\t\tsettingsState= new SettingsState(this);\n\t\tState.setState(menuState);\t\n\t\t\n\t\n\t}", "void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }", "@Override\n public void init(GameContainer gc, StateBasedGame stateBasedGame) throws SlickException {\n //Clear all all objects & add them again\n objects.clear();\n objects.add(new Tower());\n objects.add(new Player());\n objects.add(new Enemy());\n\n //Clear the lists\n bulletList.clear();\n enemies.clear();\n basicTowers.clear();\n sniperTowers.clear();\n quickTowers.clear();\n bomberTowers.clear();\n\n //Set the variables when the state is initialized\n enemyCounter = 10;\n enemyHPCounter = 5;\n currentLevel = 0;\n sellTower = false;\n upgradePressed = false;\n timePassedEnemy = 0;\n\n //Loads this seperate, else the map is over-riding all drawn during the game\n loadMap.init(gc, stateBasedGame);\n\n //Run init for all objects\n for (GameObject obj : objects) {\n obj.init(gc, stateBasedGame);\n }\n\n java.awt.Font font = new java.awt.Font(\"Agency FB\", java.awt.Font.BOLD, 16);\n pauseFont = new TrueTypeFont(font,false);\n\n }", "private void init() {\n\t\t\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager);\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\t\n\t\t//Adding the mouseManager to the canvas reduces glitches\n\t\tdisplay.getCanvas().addMouseListener(mouseManager); \n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\t\n\t\t\n\t\tVisuals.init();\n\n\t\tManager.init(this); // Setting up our manager singleton\n\n\t\tgameCamera = new GameCamera(0, 0);\n\t\tgameTimer = new GameTimer();\n\n\t\tgameState = new GameState();\n\t\t//We want to initialise the states we may switch to for easy access\n\t\t//The main menu state\n\t\tState menuState = new MenuState();\n\t\t//The state for the settings menu\n\t\tState settingState = new SettingState();\n\t\t\n\t\tState.setState(gameState); //This sets the state of the program to our game\n\t\t\n\t}", "public void initialise_new_game() {\n\n data.read_from_file(\"maxus2.txt\");\n\n mySound.initialise();\n\n pacman.init();\n ghost.init();\n\n score.initialise();\n }", "public void gameInit() {\n lobbyRoom.sendPortToAll();\n lobbyRoom.sendPlayers(game.getCars());\n lobbyRoom.sendTrack(game.getTrack());\n lobbyRoom.sendPowerupManager(game.getManager());\n this.running = true;\n }", "public Game() \n {\n Logger.setLogger(null);\n createInstances();\n parser = new Parser();\n player = new Player();\n userInputs = new ArrayList<String>();\n }", "public BallGame() {\n\t\tmyCanvas = new Canvas(\"Ball Demo\", 600, 500, Color.WHITE);\n\t\tmyCanvas.setVisible(true);\n\t\t// Aufgabe 1: MouseListener registrieren\n\t\tmyCanvas.addMouseListener(new DartArrow());\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}", "public void initialize()\n {\n \t// Luodaan manager-luokat\n EffectManager.getInstance();\n MessageManager.getInstance();\n CameraManager.getInstance();\n\n // Luodaan pelitilan eri osat\n backgroundManager = new BackgroundManager(wrapper);\n \tweaponManager = new WeaponManager();\n hud = new Hud(context, weaponManager);\n touchManager = new TouchManager(dm, surfaceView, context, hud, weaponManager);\n gameMode = new GameMode(gameActivity, this, dm, context, hud, weaponManager);\n \n // Järjestellään Wrapperin listat uudelleen\n wrapper.sortDrawables();\n wrapper.generateAiGroups();\n \n // Merkitään kaikki ladatuiksi\n allLoaded = true;\n }", "public Game()\r\n\t{\r\n\t\tenemy = new ArrayList<Enemy>();\r\n\t\tbullets = new ArrayList<Bullet>();\r\n\t\tplatforms = new ArrayList<Platforms>();\r\n\t\tsetAlive(false);\r\n\t\tlevel = 1;\r\n\t\tscore = 0;\r\n\t}", "public Game() {\n initComponents();\n }", "public Game() \n {\n createRooms();\n parser = new Parser();\n }", "public Game() \n {\n createRooms();\n parser = new Parser();\n }", "public GameBis() { \t\n\t\t\n\t\t// initialization of the size of the game\n\t\tthis.width = 12; // ATTENTION : dimensions of the map (can be changed)\n\t\tthis.height = 12;\n\t\tthis.widthRoad = width * 2 + 1;\n\t\tthis.heightRoad = height * 2 + 1;\n\t\tthis.pxWidth = (width * 50) + ((width + 1) * 20); // ATTENTION TAILLE DES IMAGES : 50*50px (constructions), 20px (roads) (can be changed)\n\t\tthis.pxHeight = (width * 50) + ((width + 1) * 20);\n this.onTheRoadAgain= new LinkedList<Inhabitant>();\n\t\t\n\t\t// initialization of the boards of roads and constructions\n\t\tboardRoad = new BoardRoad(widthRoad, heightRoad); \n\t\tboardBuilding = new BoardBuilding(width, height);\n\t\t\n\t\t/*\n\t\t// initialization of 50 inhabitants ready to moving in at the beginning of the game\n\t\tfor (int i=0 ; i<50 ; i++) {\n\t\t\tpopulation.add(new Inhabitant(\"Inhabitant\"+i));\n\t\t}\n\t\t*/\n //initialistation du timer\n\t\ttimer = new Timer (100, new TimerClass());\n\t\ttimer.start();\n\t\t\n\t\t// display of the game\n\t\twindow = new Window(pxWidth, pxHeight, boardBuilding, boardRoad);\n\t\t\n\t}", "@Override\n protected void initGame() {\n\n// entityBuilder()\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(getAppWidth() - 64, getAppHeight() - 64)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(0, getAppHeight() / 2 - 32)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .with(new ProjectileComponent(new Point2D(1, 0), 150))\n// .buildAndAttach();\n }", "public void init(){\n \tgamePanel = new GamePanel(this);\n getContentPane().add(gamePanel, BorderLayout.CENTER);\n \n gamePanel.addMouseListener(this);\n gamePanel.addMouseMotionListener(this);\n \n \tgamePanel.game.init();\n }", "public void initGame() {\n\t\tfor (int i = 0; i < gameSize; i++) {\n\t\t\tfor (int j = 0; j < gameSize; j++) {\n\t\t\t\tgrid[i][j] = new GridNode(GridNode.NodeType.EMPTY);\n\t\t\t\tgridLocker[i][j] = -1;\n\t\t\t}\n\t\t}\n\n\t\t// Snakes are placed into start positions here\n\t\tfor (int i = 0; i < snakesList.size(); i++) {\n\t\t\tint x = (int) (Math.random() * 1000) % gameSize;\n\t\t\tint y = (int) (Math.random() * 1000) % gameSize;\n\t\t\tif (grid[x][y].nodeType == GridNode.NodeType.EMPTY) {\n\t\t\t\tSnake currentSnake = snakesList.get(i);\n\t\t\t\tgrid[x][y].SnakeID = currentSnake.snakeID;\n\t\t\t\tcurrentSnake.initalizeSnakeLocation(x, y, gameSize);\n\t\t\t\tgrid[x][y].nodeType = GridNode.NodeType.SNAKEHEAD;\n\t\t\t} else {\n\t\t\t\t// Every snake has to be allocated a spot so go back to the\n\t\t\t\t// index\n\t\t\t\t// of the snake to add and try again\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\t// Places some snake food randomly somewhere\n\t\tfor(int i = 0; i <4; i++) {\n\t\t\tplaceBonus();\n\t\t}\n\t}", "private void init(){\n \tdimension.set(0.5f, 0.5f);\n \tsetAnimation(Assets.instance.goldCoin.animGoldCoin);\n \tstateTime = MathUtils.random(0.0f,1.0f);\n \t\n \t//regGoldCoin = Assets.instance.goldCoin.goldCoin;\n \t // Set bounding box for collision detection\n \tbounds.set(0,0,dimension.x, dimension.y);\n \tcollected = false;\n }", "public static void setupGame()\n {\n final PhysicsSpace pSpace = PhysicsSpace.getPhysicsSpace( PhysicsSpace.BroadphaseTypes.AXIS_SWEEP_3 );\n\n // Create a DebugGameState\n // - override the update method to update/sync physics space\n PhysicsDebugGameState state = new PhysicsDebugGameState()\n {\n @Override\n public void update( float tpf )\n {\n super.update( tpf );\n pSpace.update( tpf );\n }\n };\n\n state.setText( \"A compound collision shape made from every primative\" );\n\n // Only render the physics bounds\n state.setDrawState( PhysicsDebugGameState.DrawState.Both );\n\n PhysicsNode compound = createCompoundCollisionShape();\n compound.setLocalTranslation( 0f, 0f, 0f );\n state.getRootNode().attachChild( compound );\n compound.updateRenderState();\n pSpace.add( compound );\n\n // The floor, which does not move (mass=0)\n PhysicsNode floor = new PhysicsNode( new Box( \"physicsfloor\", Vector3f.ZERO, 20f, 0.2f, 20f ), CollisionShape.ShapeTypes.BOX, 0 );\n floor.setLocalTranslation( new Vector3f( 0f, -6, 0f ) );\n state.getRootNode().attachChild( floor );\n floor.updateRenderState();\n pSpace.add( floor );\n\n // Add the gamestate to the manager\n GameStateManager.getInstance().attachChild( state );\n\n // Activate the game state, so we can see it\n state.setActive( true );\n }", "private void init() throws IOException {\n //Initializing a new Display\n this.display = new Display(title, width, height);\n this.background = new SpriteSheet(gfx.loader(\"/images/RoadTile3.png\"));\n this.inputHandler = new InputHandler(this.display);\n Assets.init();\n\n gameState = new GameState();\n StateManager.setState(gameState);\n\n player = new Player();\n enemies = new ArrayList<>();\n }", "public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }", "private void initialize() {\n //Asteroid Shape (8 sided)\n polygon = new Vector2f[]{new Vector2f(400, -800), new Vector2f(-400, -800), new Vector2f(-800, -400),\n new Vector2f(-800, 400), new Vector2f(-400, 800), new Vector2f(400, 800), new Vector2f(800, 400), new Vector2f(800, -400)};\n //Translation variables\n this.tx = spawnX;\n this.ty = spawnY; //Start above screen to gain momentum\n this.velocity = new Vector2f();\n\n //World initialize\n this.world = new Matrix3x3f();\n\n }", "public void InitGame(){\n System.out.format(\"New game initiated ...\");\n Game game = new Game(client_List);\n SetGame(game);\n }", "public GameMain()\n {\n allenBad = new AllenSucks(this);\n }", "private void init() throws LWJGLException {\n gameLogic.init(window);\n }", "public void\tinitialize(Game game);", "@Override\n public void initialize(AppStateManager stateManager, Application app) {\n super.initialize(stateManager, app);\n this.app = (SimpleApplication) app;\n this.gameNode = (Node)this.app.getRootNode().getChild(InGameState.GAME_NODE);\n this.assetManager = this.app.getAssetManager();\n this.stateManager = this.app.getStateManager();\n this.physicsSpace = this.stateManager.getState(\n BulletAppState.class).getPhysicsSpace();\n \n this.levelNode = new Node(LEVEL_NODE);\n \n levelNode.attachChild(wizardNode);\n levelNode.attachChild(fireballNode);\n levelNode.attachChild(platformNode);\n levelNode.attachChild(miscNode);\n \n this.player = (Player)gameNode.getChild(\"player\");\n gameNode.attachChild(levelNode);\n \n chunkFactory = new ChunkFactory(assetManager);\n \n initiateLevel();\n }", "public Game() {\n String configPath= String.valueOf(getClass().getResource(\"/config/conf.xml\"));\n\n listeners= new ArrayList<>();\n assembler= new Assembler(configPath);\n levelApple= (ILevel) assembler.newInstance(\"levelApple\");\n levelRarity= (ILevel) assembler.newInstance(\"levelRarity\");\n levelRainbow= (ILevel) assembler.newInstance(\"levelRainbow\");\n levelRunning= levelApple;\n levelApple.selected();\n levelFlutter= null;\n levelPinky= null;\n jukebox = (Jukebox) assembler.newInstance(\"jukebox\");\n jukebox.switchTo(\"apple\");\n event = new LevelChangeEvent();\n event.setNumberOfLevel(6);\n setEventSelected(true, false, false);\n setEventRunning(true, true, true);\n }", "public void initGame() {\r\n Log.d(\"UT3\", \"init game\");\r\n mEntireBoard = new Tile(this);\r\n // Create all the tiles\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large] = new Tile(this);\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small] = new Tile(this);\r\n }\r\n mLargeTiles[large].setSubTiles(mSmallTiles[large]);\r\n }\r\n mEntireBoard.setSubTiles(mLargeTiles);\r\n\r\n // If the player moves first, set which spots are available\r\n mLastSmall = -1;\r\n mLastLarge = -1;\r\n setAvailableFromLastMove(mLastSmall);\r\n }", "public Game()\n\t{\n\t\tsetSize(Main.FRAMEWIDTH, Main.FRAMEHEIGHT);\n\t\taddMouseListener(mouse);\n\t\taddMouseMotionListener(mouse);\n\t\taddKeyListener(key);\n\t\taddMouseWheelListener(mouse);\n\t\tsetFocusable(true);\n\t\t//setVisible(false);\n\t\t\n\t\tengine.start();\n\t}", "public void startGame() {\n\t\ttank1.create(20, 530, 0, 0);\n\t\ttank1.setDefaults();\n\t\ttank2.create(960, 530, 0, 0);\n\t\ttank2.setDefaults();\n\t\tobjects.add(tank1);\n\t\tobjects.add(tank2);\n\t\tground = new Groundmod2((int) (Math.random() * 4));\n\t\tturn = Turn.PLAYER1;\n\t\tgrabFocus();\n\t}", "public void init()\n\t{\n\t\tpaused = false;\n\t\tbg.play();\n\t\tdeath.setVolume(10);\n\t\texplosion.setVolume(20);\n\t\tsetGameOver(false);\n\t\tscore = 0;\n\t\tlives = 3;\n\t\tgameTime = 0;\n\t\tgameObj = new GameWorldCollection();\n\t\tshipSpawned = false;\n\t\tsound = true;\n\t\ttotalNPS = 0;\n\t\tcollisionVectorPS = new Vector<ICollider>();\n\t\tcollisionVectorNPS\t = new Vector<ICollider>();\n\t\tcollisionVectorAsteroid = new Vector<ICollider>();\n\t\ttrash\t\t\t\t\t= new Vector<ICollider>();\n\t\tnotifyObservers();\t\n\t}", "@Override\n public void simpleInitApp() {\n bulletAppState = new BulletAppState();\n stateManager.attach(bulletAppState);\n \n //Create minecraft engine\n CubesTestAssets.registerBlocks();\n CubesSettings blockSettings = CubesTestAssets.getSettings(this);\n blockSettings.setBlockSize(2.5f);\n blockTerrain = new BlockTerrainControl(blockSettings, new Vector3Int(4,1,4));\n \n //Create voxel world/map\n blockTerrain.setBlockArea(new Vector3Int(2, 0, 2), new Vector3Int(14, 1, 14), CubesTestAssets.BLOCK_STONE);\n blockTerrain.setBlockArea(new Vector3Int(1, 0, 1), new Vector3Int(16, 3, 1), CubesTestAssets.BLOCK_WOOD );\n blockTerrain.setBlockArea(new Vector3Int(1, 0, 15), new Vector3Int(16, 3, 1), CubesTestAssets.BLOCK_WOOD );\n blockTerrain.setBlockArea(new Vector3Int(1, 0, 1), new Vector3Int(1, 3, 15), CubesTestAssets.BLOCK_WOOD );\n blockTerrain.setBlockArea(new Vector3Int(16, 0, 1), new Vector3Int(1, 3, 15), CubesTestAssets.BLOCK_WOOD );\n \n //Add voxel world/map to collisions\n blockTerrain.addChunkListener(new BlockChunkListener(){\n @Override\n public void onSpatialUpdated(BlockChunkControl blockChunk){\n Geometry optimizedGeometry = blockChunk.getOptimizedGeometry_Opaque();\n landscape = optimizedGeometry.getControl(RigidBodyControl.class);\n if(landscape == null){\n landscape = new RigidBodyControl(0);\n optimizedGeometry.addControl(landscape);\n bulletAppState.getPhysicsSpace().add(landscape);\n }\n landscape.setCollisionShape(new MeshCollisionShape(optimizedGeometry.getMesh()));\n }\n });\n \n //Attach voxel world/map to rootNode\n Node terrainNode = new Node();\n terrainNode.addControl(blockTerrain);\n rootNode.attachChild(terrainNode);\n \n //Set up first-person view with collisions\n CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(1.5f,3f,1);\n player = new CharacterControl(capsuleShape, 0.05f);//Step size is set in last argument\n player.setJumpSpeed(20);\n player.setFallSpeed(30);\n player.setGravity(30);\n \n //Place player in starting position\n player.setPhysicsLocation(new Vector3f(10,10,10));\n \n //bulletAppState.getPhysicsSpace().add(landscape);\n bulletAppState.getPhysicsSpace().add(player);\n \n \n //Load the minecraft character model from blender\n steveNPC = assetManager.loadModel(\"Models/MinecraftSteve/MinecraftSteve.j3o\");\n steveNPC.setName(\"steveNPC\");\n steveNPC.setLocalScale(1.5f);\n rootNode.attachChild(steveNPC);\n CapsuleCollisionShape capsuleShape2 = new CapsuleCollisionShape(1.0f,2.5f,1);\n steveCtrl = new CharacterControl(capsuleShape2,0.05f);\n steveCtrl.setFallSpeed(1);\n steveCtrl.setGravity(30);\n \n //Set up MonkeyBrains Engine and create the 'agent'/bot for steve\n brainsAppState.setApp(this);\n npc = new Agent(\"NPC\", steveNPC);\n brainsAppState.addAgent(npc);\n //Set bullet physics\n steveCtrl.setPhysicsLocation(new Vector3f(20f, 10f, 10f));\n npc.setLocalTranslation(steveCtrl.getPhysicsLocation().subtract(0,5f,0));\n bulletAppState.getPhysicsSpace().add(steveCtrl);\n \n //Create the behavior of the npc agent\n SimpleMainBehavior mainBehavior = new SimpleMainBehavior(npc);\n npcSeek = new SeekBehavior(npc, new Vector3f(7f,2.5f,12f));\n mainBehavior.addBehavior(npcSeek);\n //setting moveSpeed, rotationSpeed, mass..\n npc.setMoveSpeed(2); \n npc.setRotationSpeed(5);\n //used for steering behaviors in com.jme3.ai.agents.behaviors.npc.steering\n npc.setMass(80);\n npc.setMaxForce(0.1f);\n\n //agents can have only one behavior but that behavior can contain other behaviors\n npc.setMainBehavior(mainBehavior);\n //starting agents\n brainsAppState.start();\n \n //cam.setLocation(new Vector3f(5, 10, 5));\n //cam.lookAt(steveNPC.getWorldTranslation(), Vector3f.UNIT_Y);\n cam.lookAtDirection(new Vector3f(1, 0, 1), Vector3f.UNIT_Y);\n flyCam.setMoveSpeed(15);\n setUpKeys();\n \n //Create Material\n proj_mat = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n proj_mat.setColor(\"Color\",ColorRGBA.Blue);\n //bulletAppState.getPhysicsSpace().enableDebug(assetManager);\n }", "public static void init () {\n\t\t\n\t\t/*\n\t\t * Letter block naming and registry code\n\t\t */\n\t\tfor (int i = 0; i <= NameHandler.length(); ++i) {\n\t\t\tBlockLetter bL = new BlockLetter();\n\t\t\tString name = NameHandler.getNameFromIndex(i);\n\t\t\tbL.setBlockName(name);\n\t\t\tGameRegistry.registerBlock(bL, name);\n\t\t\tletterBlocks.add(bL);\n\t\t}\n\t\t\n\t\tcopperBlock.setBlockName(Names.Blocks.COPPER_BLOCK);\n\t\ttinBlock.setBlockName(Names.Blocks.TIN_BLOCK);\n\t\tsilverBlock.setBlockName(Names.Blocks.SILVER_BLOCK);\n\t\tclassicBronzeBlock.setBlockName(Names.Blocks.CLASSIC_BRONZE_BLOCK);\n\t\tmildBronzeBlock.setBlockName(Names.Blocks.MILD_BRONZE_BLOCK);\n\t\telectrumBlock.setBlockName(Names.Blocks.ELECTRUM_BLOCK);\n\t\tcopperDustBlock.setBlockName(Names.Blocks.COPPER_DUST_BLOCK);\n\t\t\n\t\tcopperOre.setBlockName(Names.Blocks.COPPER_ORE);\n\t\ttinOre.setBlockName(Names.Blocks.TIN_ORE);\n\t\tsilverOre.setBlockName(Names.Blocks.SILVER_ORE);\n\t\t\n\t\tmarble.setBlockName(Names.Blocks.MARBLE);\n\t\t\n\t\tgrindstone.setBlockName(Names.Blocks.GRINDSTONE);\n\t\t\n\t\tGameRegistry.registerBlock(column, Names.Blocks.COLUMN);\n\t\tGameRegistry.registerBlock(copperBlock, Names.Blocks.COPPER_BLOCK);\n\t\tGameRegistry.registerBlock(tinBlock, Names.Blocks.TIN_BLOCK);\n\t\tGameRegistry.registerBlock(silverBlock, Names.Blocks.SILVER_BLOCK);\n\t\tGameRegistry.registerBlock(classicBronzeBlock, Names.Blocks.CLASSIC_BRONZE_BLOCK);\n\t\tGameRegistry.registerBlock(mildBronzeBlock, Names.Blocks.MILD_BRONZE_BLOCK);\n\t\tGameRegistry.registerBlock(electrumBlock, Names.Blocks.ELECTRUM_BLOCK);\n\t\tGameRegistry.registerBlock(copperDustBlock, Names.Blocks.COPPER_DUST_BLOCK);\n\t\t\n\t\tGameRegistry.registerBlock(copperOre, Names.Blocks.COPPER_ORE);\n\t\tGameRegistry.registerBlock(tinOre, Names.Blocks.TIN_ORE);\n\t\tGameRegistry.registerBlock(silverOre, Names.Blocks.SILVER_ORE);\n\t\tGameRegistry.registerBlock(marble, Names.Blocks.MARBLE);\n\t\t\n\t\tGameRegistry.registerBlock(grindstone, Names.Blocks.GRINDSTONE);\n\t}", "public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}", "public Game() {\n\n\t}", "public void initialize() {\n\t\tthis.avatar = new Avatar();\n\t\tthis.pellet = new Pellet(HEIGHT, WIDTH);\n\t\tthis.wall = new Wall(HEIGHT, WIDTH);\n\n\t\t// notifies the user about the controls\n\t\tSystem.out.println(\"\\nGame controls:\");\n\t\tSystem.out.println(\"w --> move up, s --> move down, a --> move left, d --> move right\");\n\t\tSystem.out.println(\"e --> exit the game\");\n\t\t\n\t\t// display the initial score and location\n\t\tSystem.out.println(\"\\nAvatar location: \" + avatar.getLocation().getX() + \",\" + avatar.getLocation().getY());\n System.out.println(\"Points: \" + avatar.getScore());\n\t}", "private Board()\r\n {\r\n this.grid = new Box[Config.GRID_SIZE][Config.GRID_SIZE];\r\n \r\n for(int i = 0; i < Config.NB_WALLS; i++)\r\n {\r\n this.initBoxes(Wall.ID);\r\n }\r\n \r\n for(int i = 0; i < Config.NB_CHAIR; i++)\r\n {\r\n this.initBoxes(Chair.ID);\r\n }\r\n \r\n for(int i = 0; i < Config.NB_PLAYER; i++)\r\n {\r\n this.initBoxes(Chair.ID);\r\n }\r\n }", "public void initialize() {\n\t\tmaze = new Block[width][height];\n\t\tborder();\n\t}", "public void initialize() throws FactoryException {\n theGame = createModel();\n theGame.attach(this);\n ghostController = new RandomGhostMover(theGame);\n createUI();\n }", "public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Rectangle(new Point(0, 25), 25, 576), fill);\n //add each screen-side block to game and set 1 hitpoint.\n topB.addToGame(this);\n topB.setHitPoints(1);\n rightB.addToGame(this);\n rightB.setHitPoints(1);\n leftB.addToGame(this);\n leftB.setHitPoints(1);\n }", "public Game() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor (int i = 0; i < NBCARDS; i++) {\r\n\t\t\tcards.add(new Card());\r\n\t\t}\r\n\t\tplayers = new ArrayList<Player>();\r\n\t\tfor (int i = 0; i < NBPLAYER; i++) {\r\n\t\t\tplayers.add(new Player(i + 1));\r\n\t\t}\r\n\t}", "public void initGame() {\n\r\n\t\tscore = 0;\r\n\t\tshipsLeft = MAX_SHIPS;\r\n\t\tasteroidsSpeed = MIN_ROCK_SPEED;\r\n\t\tnewShipScore = NEW_SHIP_POINTS;\r\n\t\tnewUfoScore = NEW_UFO_POINTS;\r\n\t\tShip.initShip();\r\n\t\tinitPhotons();\r\n\t\tstopUfo();\r\n\t\tstopMissle();\r\n\t\tinitAsteroids();\r\n\t\tinitExplosions();\r\n\t\tplaying = true;\r\n\t\tpaused = false;\r\n\t\tphotonTime = System.currentTimeMillis();\r\n\t}", "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 }", "public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}", "private void prepare()\n {\n MazeBlock mazeBlock = new MazeBlock();\n addObject(mazeBlock,25,25);\n MazeBlock mazeBlock1 = new MazeBlock();\n addObject(mazeBlock1,25,75);\n MazeBlock mazeBlock2= new MazeBlock();\n addObject(mazeBlock2,75,75);\n MazeBlock mazeBlock3= new MazeBlock();\n addObject(mazeBlock3,75,125);\n MazeBlock mazeBlock4= new MazeBlock();\n addObject(mazeBlock4,125,125);\n MazeBlock mazeBlock5= new MazeBlock();\n addObject(mazeBlock5,175,125);\n MazeBlock mazeBlock6= new MazeBlock();\n addObject(mazeBlock6,225,125);\n MazeBlock mazeBlock7= new MazeBlock();\n addObject(mazeBlock7,275,125);\n MazeBlock mazeBlock8= new MazeBlock();\n addObject(mazeBlock8,275,175);\n MazeBlock mazeBlock9= new MazeBlock();\n addObject(mazeBlock9,275,225);\n MazeBlock mazeBlock10= new MazeBlock();\n addObject(mazeBlock10,275,275);\n MazeBlock mazeBlock11= new MazeBlock();\n addObject(mazeBlock11,275,325);\n MazeBlock mazeBlock12= new MazeBlock();\n addObject(mazeBlock12,325,325);\n MazeBlock mazeBlock13= new MazeBlock();\n addObject(mazeBlock13,375,325);\n MazeBlock mazeBlock14= new MazeBlock();\n addObject(mazeBlock14,425,275);\n MazeBlock mazeBlock15= new MazeBlock();\n addObject(mazeBlock15,475,275);\n MazeBlock mazeBlock16= new MazeBlock();\n addObject(mazeBlock16,125,325);\n MazeBlock mazeBlock17= new MazeBlock();\n addObject(mazeBlock17,125,375);\n MazeBlock mazeBlock18= new MazeBlock();\n addObject(mazeBlock18,125,425);\n MazeBlock mazeBlock19= new MazeBlock();\n addObject(mazeBlock19,175,425);\n MazeBlock mazeBlock20= new MazeBlock();\n addObject(mazeBlock20,225,425);\n\n EnemyFlyer enemyFlyer = new EnemyFlyer();\n addObject(enemyFlyer,29,190);\n EnemyFlyer enemyFlyer3 = new EnemyFlyer();\n addObject(enemyFlyer3,286,389);\n WalkingEnemy walkingEnemy = new WalkingEnemy(true);\n addObject(walkingEnemy,253,293);\n walkingEnemy.setLocation(125,275);\n WalkingEnemy walkingEnemy2 = new WalkingEnemy(false);\n addObject(walkingEnemy2,28,81);\n walkingEnemy2.setLocation(170,82);\n FinalLevel finalLevel = new FinalLevel();\n addObject(finalLevel, 508, 45);\n Hero hero = new Hero();\n addObject(hero,62,499);\n }", "public void initializeGame() throws Exception\n\t{\n\t\tsystemDataInput.initializePlayers(this);\n\t\tinitializeDecks();\n\t\tinitializePlayers();\n\t\tinitializeLandmarks();\n\t\tinitializeStatus();\n\t}", "public Game() {\n parser = new Parser();\n }", "public GameController() {\n \t\t// Fill the table empty positions.\n \t\tfor (int i = 0; i < MAX_NUMBER_OF_PILES; i++) {\n \t\t\tmTable.add(i, null);\n \t\t}\n \t\tcreateDeck();\n \t\tgs = new GameState(mTable, pileNames, pileNo);\n \t\tnew Listener(this);\n \t}", "@Override\n\tpublic void create() {\n\t\tassetManager = new AssetManager();\n\t\tassetManager.load(ROLIT_BOARD_MODEL, Model.class);\n\t\tassetManager.load(ROLIT_BALL_MODEL, Model.class);\n\t\t\n\t\t//construct the lighting\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\t\t\n\t\tmodelBatch = new ModelBatch();\n\t\t\n\t\tcam = new PerspectiveCamera(67f, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\t\n\t\tGdx.input.setInputProcessor(new InputHandler());\n\t}", "public Game_classes_init(Context context){\n game_class_init_context = context;\n\n init_game_classes();\n }", "public Game() {\t\t\t\t\t\n\t\t\n\t\tmDeck = new Deck();\t\t\t\t\t\t\t\t\t\t\t\n\t\tmDealer = new Dealer(mDeck.getCard(), mDeck.getCard());\t//dealer gets a random value card twice to initialise the dealers hand with 2 cards\n\t\tmUser = new User();\t\t\t\t\t\t\t\t\t\t\t\n\t\tgiveCard();\t\t\t\t\t\n\t}", "public Game() {\r\n\r\n\t\tmakeFrame();\r\n\t\tisClicked = false;\r\n\t\tisPlaying = false;\r\n\t\tlevelEasy = true;\r\n\t\tlevelIntermediate = false;\r\n\t\tlevelHard = false;\r\n\t\tplayerScore = 0;\r\n\r\n\t}", "public Game() {\n\t\tsuper();\n\t\tgameModel = new GameModel();\n\t\tview = new GamePane(gameModel);\n\t\t\n\t\tadd(view);\n\t\tpack();\n\t\tsetLocationRelativeTo(null);\n\t}", "private void init() {\n display = new Display(title, getWidth(), getHeight());\n Assets.init();\n player = new Player(getWidth() / 2, getHeight() - 100, 1, 60, 40, this);\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 6; j++) {\n aliens.add(new Alien(150 + 50 * j, 50 + 50 * i, 1, 40, 40, this));\n }\n }\n display.getJframe().addKeyListener(keyManager);\n }", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "public Game(int balls) {\r\n currentLevel = new NullLevel();\r\n totalScore = 0;\r\n this.balls = balls;\r\n }", "@Override\r\n\tpublic void gameInit() \r\n\t{\r\n\t\tfont = new Font(\"Courier\", Font.BOLD, 14);\r\n\t\tfontInfo = this.getFontMetrics(font);\r\n\t\tkeys = new KeyValues();\r\n\t\t\r\n\t\tbackground.loadImage(\"/images/sky.png\");\r\n\t\ttileset = new TileSet(10,10,32,32);\r\n\t\ttileset.loadTiles(\"/images/test_tiles.png\");\r\n\t\tmap = new Map(tileset, 20, 50);\r\n\t\tmap.readMap(\"res/maps/testmap2.txt\");\r\n\t\t\r\n\t\tcamera.setDimensions(getScreenWidth(), getScreenHeight());\r\n\t\tcamera.setXRange(0, map.getWidth() - getScreenWidth());\r\n\t\tcamera.setYRange(0, map.getHeight() - getScreenHeight());\r\n\t}", "public void init(){\n\t\n\t\t//background init\n\t\tthis.background = new Sprite(this.scene, \"space-backdrop.png\", 1280 * 5, 800 * 5);\n\t\tthis.background.setBoundAction(\"background\");\n\t\tthis.background.setSpeedScale(0.2);\n\t\tthis.background.setSpeed(0);\n\t\tthis.sprites.add(this.background);\n\t\t\n\t\t//compass init\n\t\tthis.compass = new Sprite(this.scene, \"compass.png\", 100, 100);\n\t\tthis.compass.setSpeed(0);\n\t\tthis.compass.setPosition(this.compass.getWidth() / 2, this.scene.getHeight() - this.compass.getHeight() / 2);\n\t\t\n\t\t//earth init\n\t\tthis.earth = new Planet(this.scene, \"earth.png\", 4800, 4800);\n\t\tthis.earth.setSpeed(0);\n\t\tthis.earth.setPosition(0, 7000);\n\t\tthis.earth.setBoundAction(\"continue\");\n\t\tthis.sprites.add(this.earth);\n\t\t\n\t\t//ship init\n\t\tthis.mainSprite = new Ship(this.scene, \"cannon.png\", 50, 50, this.k);\n\t\tthis.mainSprite.keyListen = true;\n\t\tthis.mainSprite.setSpeed(0);\n\t\tthis.mainSprite.setPosition(this.scene.getWidth() / 2, this.scene.getHeight() / 2);\n\t\t\n\t\t//asteroids init\n\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", 250, 250, this));\n\t\tthis.asteroids.get(0).setBoundAction(\"continue\");\n\t\tthis.asteroids.get(0).setSpeed(0);\n\t\tthis.asteroids.get(0).setPosition(0, 0);\n\t\tthis.sprites.add(this.asteroids.get(0));\n\t\t\n\t\tfor(int i = 1; i < 200; i++){\n\t\t\t\n\t\t\tint size = (int) Math.round(Math.random() * 400 + 50);\n\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\n\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t}\n\t\t\t\n\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t}\n\t\t\t\n\t\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", size, size, this));\n\t\t\tthis.asteroids.get(i).setBoundAction(\"continue\");\n\t\t\tthis.asteroids.get(i).setSpeed(0);\n\t\t\tthis.asteroids.get(i).setPosition(x, y);\n\t\t\t\n\t\t\tthis.sprites.add(this.asteroids.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t//chest init\n\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\tthis.chests.get(0).setBoundAction(\"continue\");\n\t\tthis.chests.get(0).setSpeed(0);\n\t\tthis.chests.get(0).setPosition(500, 500);\n\t\tthis.sprites.add(this.chests.get(0));\n\t\t\n\t\tfor(int i = 1; i < this.numChests; i++){\n\t\t\t\n\t\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\t\tthis.chests.get(i).setBoundAction(\"continue\");\n\t\t\tthis.chests.get(i).setSpeed(0);\n\t\t\t\n\t\t\tboolean keepGoing = true;\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t\n\t\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.chests.get(i).setPosition(x, y);\n\t\t\t\t\n\t\t\t\t//check for collisions with asteroids\n\t\t\t\tboolean colliding = false;\n\t\t\t\tfor(int j = 0; j < this.asteroids.size() && colliding == false; j++){\n\t\t\t\t\tif(this.asteroids.get(j).collidesWith(this.chests.get(i))){\n\t\t\t\t\t\tcolliding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tkeepGoing = colliding;\n\t\t\t\t\n\t\t\t}while(keepGoing);\n\t\t\t\n\t\t\tthis.sprites.add(this.chests.get(i));\n\t\t\t\n\t\t}//end for\n\t\n\t\tthis.scene.start();\n\t\t\n\t\tSystem.out.println(\"==== Welcome to Space Smuggler! ====\");\n\t\tSystem.out.println(\"(WASD to move)\");\n\t\tSystem.out.println(\"Follow your compass in the bottom left corner to find treasure.\");\n\t\tSystem.out.println(\"Collect all of the treasure, then follow your compass to Earth!\");\n\t\tSystem.out.println(\"Watch out for the asteroids though, their gravitational pull is strong!\");\n\t\tSystem.out.println(\"Crashing into one will certainly kill you! D:\");\n\t\tSystem.out.println(\"Good Luck!\");\n\t\t\n\t}", "public void initialize() {\n\t\tbombLabel.setText(\"Flag: \" + game.getFlagCounter() + \"/\" + game.getNumOfBombs());\n\t\ttimerLabel.setText(\"Time: \" + 0);\n\t\tboard.getStyleClass().add(\"grid\");\n\t\tbtnArray = new Button[game.getHeight()][game.getWidth()];\n\t\tfor (int x = 0; x < game.getHeight(); x++) {\n\t\t\tfor (int y = 0; y < game.getWidth(); y++) {\n\t\t\t\tButton btn = new Button(\"\");\n\t\t\t\tbtnArray[x][y] = btn;\n\t\t\t\tbtn.setMaxSize(50, 50);\n\t\t\t\tbtn.setMinSize(50, 50);\n\t\t\t\t//Add Button to the board (GridPane)\n\t\t\t\tboard.add(btn, x, y);\n\t\t\t\tbtn.setId(x + \" . \" + y);\n\t\t\t\tbtn.setOnMouseClicked(e -> TileClicked(e));\n\t\t\t}\n\t\t}\n\t}", "public void populate() { \n \n // make some grounds\n ground1 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground1.setPosition(new Vec2(-380, -200));\n \n Body ground2 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground2.setPosition(new Vec2(-0, -200));\n\n Body ground3 = new Body(world, PolygonShape.makeBox(100, 5), Body.Type.STATIC);\n ground3.setPosition(new Vec2(300, -100));\n \n // make a moving platform \n Body movingPlatform = new SlidingPlatform(world, PolygonShape.makeBox(100, 5), new Vec2(130, 0), 2);\n movingPlatform.setPosition(new Vec2(-260, -150));\n \n // make some bottles\n Bottle bottle1 = new Bottle(game);\n bottle1.putOn(ground1);\n bottle1.setName(\"bottle1\");\n \n Bottle bottle2 = new Bottle(game);\n bottle2.putOn(ground2);\n bottle2.setName(\"bottle2\");\n \n Bottle bottle3 = new Bottle(game);\n bottle3.putOn(ground3);\n bottle3.setName(\"bottle3\");\n \n // show dialog with information about level\n JOptionPane.showMessageDialog(frame, \"Press N or M to throw bottles to kill Boxies.\", \"Level instructions:\", JOptionPane.PLAIN_MESSAGE);\n \n // make some boxies\n Boxy boxy1 = new Boxy(game);\n boxy1.setName(\"boxy1\");\n Vec2 vec1 = new Vec2(100, 0);\n boxy1.move(vec1);\n\n Boxy boxy2 = new Boxy(game);\n boxy2.setName(\"boxy2\");\n Vec2 vec2 = new Vec2(-100, 200);\n boxy2.move(vec2);\n\n Boxy boxy3 = new Boxy(game);\n boxy3.setName(\"boxy3\");\n Vec2 vec3 = new Vec2(-400, 200);\n boxy3.move(vec3);\n \n }", "@Override\n public void populate(Game game) {\n super.populate(game);\n //Left Wall\n Shape leftPlatform = new BoxShape(0.25f, 30);\n Body leftBody = new StaticBody(this, leftPlatform);\n leftBody.setPosition(new Vec2(-12.25f, -12));\n\n //Allows the balls to bounce off the left wall in a fixed speed without the balls slowing down or moving faster.\n SolidFixture leftFixture = new SolidFixture(leftBody, leftPlatform);\n leftFixture.setDensity(1);\n leftFixture.setRestitution(1);\n\n //Right Wall\n Shape rightPlatform = new BoxShape(0.25f, 30);\n Body rightBody = new StaticBody(this, rightPlatform);\n rightBody.setPosition(new Vec2(12.25f, -12));\n\n //Allows the balls to bounce off the right wall in a fixed speed without the balls slowing down or moving faster.\n SolidFixture rightFixture = new SolidFixture(rightBody, rightPlatform);\n rightFixture.setDensity(1);\n rightFixture.setRestitution(1);\n\n //Top Wall\n Shape topPlatform = new BoxShape(30, 0.25f);\n Body topBody = new StaticBody(this, topPlatform);\n topBody.setPosition(new Vec2(-12, 12.25f));\n\n //Allows the balls to bounce off the top wall in a fixed speed without the balls slowing down or moving faster.\n SolidFixture topFixture = new SolidFixture(topBody, topPlatform);\n topFixture.setDensity(1);\n topFixture.setRestitution(1);\n\n //Bottom Wall\n Shape bottomPlatform = new BoxShape(30, 0.25f);\n Body bottomBody = new StaticBody(this, bottomPlatform);\n bottomBody.setPosition(new Vec2(-12, -12.25f));\n\n //Allows the balls to bounce off the bottom wall in a fixed speed without the balls slowing down or moving faster.\n SolidFixture bottomFixture = new SolidFixture(bottomBody, bottomPlatform);\n bottomFixture.setDensity(1);\n bottomFixture.setRestitution(1);\n\n //Creating a ball object within the world\n Ball ballTwo = new Ball(this, 6, 1);\n ballTwo.setLinearVelocity(new Vec2(-2, -10));\n\n //Creating a box object within the world\n Box boxOne = new Box(this, -6, 9);\n\n Puppet puppet = new Puppet(this);\n puppet.setPosition(new Vec2(10, 10));\n\n //Creating a powerUp object and setting the position\n PowerUp powerUp = new PowerUp(this);\n powerUp.setPosition(new Vec2(-10, 10));\n }", "public Game() {\n }", "private void prepareGame()\n {\n Rocket rocket = new Rocket();\n \n scoreCounter = new Counter(\"Score: \");\n \n addObject(rocket, getWidth()/2 + 100, getHeight()/2);\n \n addObject(scoreCounter, 60, 480);\n \n //TODO (69): Make a method call to addAsteroids that uses your constant for the number of asteroids\n addAsteroids(START_ASTEROIDS);\n }", "public abstract void initialize(GameContainer gc);", "public SnakeGame() {\n\t\t// game initialy not running\n\t\tgameRunning = false; \n\t\t// init our GUI\n\t\tinitGUI();\n\t}", "private void init() \n\t{\n\t\tgoalReached = false;\n\t\tGdx.input.setInputProcessor(this);\n\t\tcameraHelper = new CameraHelper();\n\t\tlives = Constants.LIVES_START;\n\t\tlivesVisual = lives;\n\t\ttimeLeftGameOverDelay = 0;\n\t\tinitLevel();\n\n\t}", "public Game(){\n\t\tDimension dimension = new Dimension(Game.WIDTH, Game.HEIGHT); //Create dimensions for window size\n\t\tsetPreferredSize(dimension); //Set the start size\n\t\tsetMinimumSize(dimension); //Set the min size\n\t\tsetMaximumSize(dimension); //Set the max size, this locks the window size.\n\t\taddKeyListener(this); //Add the key listener to the game object\n\t\tlevel1(); //Load level 1\n\t\twinScreen = new WinScreen(); //Create win object\n\t\tdeadScreen = new DeadScreen(); //Create dead object\n\t\tstartScreen = new StartScreen(); //Create startScreen object\n\t\tpauseScreen = new PauseScreen(); //Create pauseScreen object\n\t\tspriteSheet = new SpriteSheet(\"img/sprites.png\"); //Create SpriteSheet object\n\t\tnew Texture(); //Initialize texture object\n\t}" ]
[ "0.77575916", "0.7644199", "0.73652405", "0.70847946", "0.7063478", "0.70619285", "0.70336866", "0.70249826", "0.70080817", "0.6974771", "0.69330806", "0.6932625", "0.69314283", "0.6904737", "0.690032", "0.6876895", "0.68310076", "0.68291664", "0.6821634", "0.677257", "0.67691165", "0.6754111", "0.6748791", "0.6726969", "0.6704401", "0.66981393", "0.66977185", "0.6693946", "0.66670066", "0.6664731", "0.66548574", "0.6652235", "0.6623782", "0.6621562", "0.66098106", "0.66072583", "0.66069436", "0.6593882", "0.6572039", "0.6571877", "0.65672827", "0.65660024", "0.6559016", "0.6557595", "0.6557595", "0.65280014", "0.6520493", "0.65061367", "0.6504732", "0.65028596", "0.65017796", "0.6492157", "0.6488695", "0.6478193", "0.6460685", "0.6457594", "0.645356", "0.6452596", "0.6429642", "0.6427334", "0.64215565", "0.6414561", "0.6399472", "0.6381798", "0.6377991", "0.63753974", "0.63684225", "0.63642985", "0.6363881", "0.634897", "0.6344677", "0.6340015", "0.63395464", "0.63356674", "0.63328075", "0.6332379", "0.63263786", "0.6316546", "0.63099825", "0.63029665", "0.6301449", "0.62971747", "0.6294068", "0.62897956", "0.6288978", "0.62876976", "0.6283851", "0.6276918", "0.6276868", "0.6274178", "0.62729007", "0.6272589", "0.62695867", "0.6263171", "0.6259244", "0.6258531", "0.62497836", "0.62483585", "0.6246496", "0.62426543" ]
0.7227405
3
This method define the border that if the ball cross this border the ball remove from the game.
private void defineDeathBlock() { BallRemover removeBall = new BallRemover(this); Rectangle death = new Rectangle(new Point(0, HEIGHT), WITH, 10); Block deathRegion = new Block(death, Color.black,0); deathRegion.addHitListener(removeBall); deathRegion.addToGame(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void borders() {\n if (loc.y > height) {\n vel.y *= -bounce;\n loc.y = height;\n }\n if ((loc.x > width) || (loc.x < 0)) {\n vel.x *= -bounce;\n } \n //if (loc.x < 0) loc.x = width;\n //if (loc.x > width) loc.x = 0;\n }", "void addEventBorder(DefaultBorder border, DefaultBall ball);", "public void unsetBorder()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(BORDER$22);\n }\n }", "public void bounceOffEdge()\n {\n int margin = 2;\n\n if (getX() <= margin || getX() >= getWorld().getWidth() - margin) //left or right side\n {\n turn(180);\n }\n if (getY() <= margin || getY() >= getWorld().getHeight() - margin) //top or bottom side\n {\n turn(180);\n }\n }", "public void updateBotBorder()\n {\n //update bottom border\n for(int i = 0; i<botborder.size(); i++)\n {\n botborder.get(i).update();\n\n //if border is moving off screen, remove it and add a corresponding new one\n if(botborder.get(i).getX()<-25) {\n botborder.remove(i);\n\n\n //determine if border will be moving up or down\n if (botborder.get(botborder.size() - 1).getY() <= height-maxBorderHeight) {\n down = true;\n }\n if (botborder.get(botborder.size() - 1).getY() >= height - minBorderHeight) {\n down = false;\n }\n\n if (down) {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), botborder.get(botborder.size() - 1).getX() + 25, botborder.get(botborder.size() - 1\n ).getY() + 1));\n } else {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder\n ), botborder.get(botborder.size() - 1).getX() + 25, botborder.get(botborder.size() - 1\n ).getY() - 1));\n }\n }\n }\n }", "public void resetBorders(){\n for (int i = 0; i * 25 < width + 40; i++) {\n if (i == 0) {\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, 0, 10));\n } else {\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, 0, topborder.get(i - 1).getHeight() + 1));\n }\n }\n\n\n for (int i = 0; i * 25 < width + 40; i++) {\n if (i == 0) {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25,height-minBorderHeight));\n } else {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, botborder.get(i - 1).getY() - 1));\n }\n }\n }", "protected void updateBorder() {\r\n\t\tif (myTarget != null) {\r\n\r\n\t\t\tRectangle2D bounds = myTarget.getBounds();\r\n\r\n\t\t\tmyFrame.setBounds((float) bounds.getX(), (float) bounds.getY(), (float) bounds\r\n\t\t\t\t\t.getWidth(), (float) bounds.getHeight());\r\n\t\t\tmyFrame.setPaint(null);\r\n\t\t\tmyFrame.setStrokePaint(myColor);\r\n\t\t}\r\n\t}", "public void updateBottomBorder(){\n if (player.getScore()%40 ==0){\n botBorders.add(new BotBorder(BitmapFactory.decodeResource(getResources(),R.drawable.brick),\n botBorders.get(botBorders.size()-1).getX()+20,\n (int)(rand.nextDouble()*maxBorderHeight)+HEIGHT-maxBorderHeight));\n }\n //update bottom border\n for (int i =0; i<botBorders.size(); i++){\n botBorders.get(i).update();\n if (botBorders.get(i).getX()<-20) {\n botBorders.remove(i);\n if (botBorders.get(botBorders.size() - 1).getY() <= HEIGHT- maxBorderHeight) {\n botDown = true ;\n }\n if (botBorders.get(botBorders.size() - 1).getY() >= HEIGHT- minBorderHeight) {\n botDown = false;\n }\n if (botDown) {\n botBorders.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.brick),\n botBorders.get(botBorders.size() - 1).getX() + 20,\n botBorders.get(botBorders.size() - 1).getY() + 1));\n } else {\n botBorders.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.brick),\n botBorders.get(botBorders.size() - 1).getX() + 20,\n botBorders.get(botBorders.size() - 1).getY() - 1));\n }\n }\n }\n }", "public void updateTopBorder(){\n if (player.getScore()%50 ==0){\n topBorders.add(new TopBorder(BitmapFactory.decodeResource(getResources(),R.drawable.brick),\n topBorders.get(topBorders.size()-1).getX()+20,\n 0,\n (int)(rand.nextDouble()*maxBorderHeight)+1 ));\n }\n //update top border\n for (int i=0; i<topBorders.size(); i++){\n topBorders.get(i).update();\n //if border off screen -> remove\n if (topBorders.get(i).getX()<-20){\n topBorders.remove(i);\n //calculate topdown which determines the direction of border (up or down)\n if (topBorders.get(topBorders.size()-1).getHeight()>=maxBorderHeight){\n topDown = false;\n }\n if (topBorders.get(topBorders.size()-1).getHeight()<=minBorderHeight){\n topDown = true;\n }\n //new border added will have larger height\n if (topDown){\n topBorders.add(new TopBorder(BitmapFactory.decodeResource(getResources(),R.drawable.brick),\n topBorders.get(topBorders.size()-1).getX()+20,\n 0,\n topBorders.get(topBorders.size()-1).getHeight()+1));\n }\n //new border added will have smaller height\n else {\n topBorders.add(new TopBorder(BitmapFactory.decodeResource(getResources(),R.drawable.brick),\n topBorders.get(topBorders.size()-1).getX()+20,\n 0,\n topBorders.get(topBorders.size()-1).getHeight()-1));\n }\n }\n }\n }", "private void clearStage(GOval ball) {\n remove(ball);\n remove((paddle));\n }", "public void ballVSbrick(Ball bb, Brick br) {\n Rectangle bb_box = new Rectangle(bb.getX(), bb.getY(), bb.getWidth(), bb.getHeight());\r\n Rectangle br_box = new Rectangle(br.getX(), br.getY(), br.getWidth(), br.getHeight());\r\n\r\n if (bb_box.intersects(br_box)) {\r\n //collision\r\n if (bb.getVX() < 0 && bb.getVY() < 0) {//-x,-y\r\n bb.setVY(bb.getVY() * -1);\r\n //remove brick\r\n //totalBricks.get(i)\r\n }//Inconsistent with collision\r\n else if (bb.getVX() > 0 && (bb.getVY() > 0)) {//+x,+y\r\n bb.setVY(bb.getVY() * -1);\r\n }//works\r\n else if (bb.getVX() < 0 && (bb.getVY() > 0)) {//-x,+y\r\n bb.setVY(bb.getVY() * -1);\r\n }//also inconsistent with collision\r\n else if(bb.getVX()>0 && bb.getVY()<0){//+x,-y\r\n bb.setVY(bb.getVY()*-1);\r\n }\r\n }\r\n if (totalBricks.isEmpty()) {\r\n this.setCleared(true);\r\n }\r\n //when the ball hits a brick\r\n //remove the brick\r\n //update velocity of ball\r\n\r\n }", "@Override\n public void collision(Ball ball) {\n if (!(this.collideLine.size() == 0)){\n ball.setVelocity(Geometry.reflectWall(this.collideLine.get(0), ball.getVelocity()));\n //if ball collides with corner, reflect off circle\n }else if (!(this.collideCirc.size() == 0)){\n ball.setVelocity(Geometry.reflectCircle(this.collideCirc.get(0).getCenter(), ball.getPosition(), ball.getVelocity()));\n }\n\n this.trigger();\n\n }", "private int collideObject(GOval ball, int bricksOnStage) {\n GObject collider = getCollidingObject(ball);\n if (isObjectAPaddle(collider) && vy > 0){\n vy = - vy;\n }\n else if (isObjectABrick(collider)){\n remove(collider);\n vy = - vy;\n bricksOnStage -= 1;\n }\n return bricksOnStage;\n }", "public void border() {\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tmaze[x][0] = Block.WALL;\n\t\t\tmaze[x][height - 1] = Block.WALL;\n\t\t}\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tmaze[0][y] = Block.WALL;\n\t\t\tmaze[width - 1][y] = Block.WALL;\n\t\t}\n\t}", "public void removeRedBorder (){\n ((Label)_node).setBorder(NO_BORDER);\n }", "@Override\n protected void paintBorder(Graphics g) {\n g.setColor(getForeground());\n g.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 15, 50);\n }", "private boolean isBallCollideCelling(GOval ball) {\n return ball.getY() <= 0;\n }", "private GObject getCollidingObject(GOval ball) {\n GObject result = null;\n GPoint[] borderPoints = createArrayOfBallBorders(ball);\n for (GPoint someBorderPoint : borderPoints) {\n result = getElementAt(someBorderPoint);\n if (result != null){\n break;\n }\n }\n return result;\n }", "public void CheckCollision(Ball b){\n\n if( b.getDirX() < 0f ){\n if( (b.getPosX() - b.getSizeX() ) < px + sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n } \n }else{\n if( (b.getPosX() + b.getSizeX() ) > px - sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n }\n }\n }", "public boolean isBorderOpaque() {\n // TODO codavaj!!\n return false;\n }", "@Override \n public void paintBorder(Component c, Graphics g, int x, int y, int width, int height){ \n g.setColor( c.getForeground() ); \n g.drawLine(0, height - 1, width, height - 1); //Border Bottom \n }", "@Override\n\tpublic void action() {\n\t if (firingBall.getY() + firingBall.getRadius() < this.y) { \n\t //deactivate absorber locally and in GameBoard\n\t firingBall = null;\n\t gb.removeFromActiveList(this);\n\t }\n\t}", "public void updateTopBorder(){\n\n\n //Go up until reach maximum border height and then go down, so zig zag, maximum will increase when score increases.\n //Every 100 points insert random blocks\n\n for (int i = 0; i < topborder.size(); i++){\n topborder.get(i).update();\n\n //Remove top border if off map and replace by adding a new one\n if (topborder.get(i).getX()<-25){\n topborder.remove(i);\n\n //Retrieves the last element in the array list\n if (topborder.get(topborder.size()-1).getHeight()>=maxBorderHeight){\n top = false;\n }\n if (topborder.get(topborder.size()-1).getHeight()<=minBorderHeight){\n top = true;\n }\n\n //New border will have a larger height, else smaller height\n if (top){\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(),R.drawable.newborder), topborder.get(topborder.size()-1).getX()+25, 0, topborder.get(topborder.size()-1).getHeight()+1));\n }\n else {\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(),R.drawable.newborder), topborder.get(topborder.size()-1).getX()+25, 0, topborder.get(topborder.size()-1).getHeight()-1));\n }\n }\n }\n\n }", "private boolean isBallCollideLeftWall(GOval ball) {\n return ball.getX() <= 0;\n }", "private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int w, int h)\r\n/* 193: */ {\r\n/* 194:228 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 195: */ \r\n/* 196: */ \r\n/* 197:231 */ g2.drawOval(x, y, w, h);\r\n/* 198: */ }", "protected void paintBorder(Graphics g) {\n g.setColor(getForeground());\n g.drawOval(0, 0, getSize().width-1, getSize().height-1);\n }", "Border createBorder();", "public void paddleCollision(Paddle myPaddle, Ball ball, Ball secondBall) {\n this.getMyImageView().setVisible(false);\n this.setX(1000);\n }", "private void bounceOffHorizontalWall() {\n vy = -vy;\n }", "protected void paintBorder (Graphics g)\r\n {\n }", "protected void paintBorder(Graphics g) {\r\n\t\t\tg.setColor(getForeground());\r\n\t\t\tg.drawOval(0, 0, getSize().width - 1, getSize().height - 1);\r\n\t\t}", "@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(e.getX()<0)\r\n\t\t\tborder=2;\r\n\t\telse\r\n\t\t\tif(e.getX()>174)\r\n\t\t\t\tborder=173;\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tborder = e.getX();\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t}", "@Override\n\t\tpublic void setBorder(Border border) {\n\t\t}", "private void collideStageLimits(GOval ball) {\n if (isBallCollideCelling(ball)){\n vy = - vy;\n }\n if (isBallCollideRightWall(ball) || isBallCollideLeftWall(ball)){\n vx = - vx;\n }\n }", "protected void paintComponentBorder(Graphics g) {\r\n int height = this.getHeight();\r\n int width = this.getWidth();\r\n Color c = g.getColor();\r\n g.setColor(getUiPrefs().getBorderColor());\r\n g.drawRoundRect(0, 0, width - 1, height - getInsets().bottom, 10, 10);\r\n g.setColor(c);\r\n }", "@Override\n\t\tpublic void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {\n\t\t\tsuper.paintBorder(c, g, x - 1, y, width + 5, height);\n\t\t}", "private boolean isBallCollideRightWall(GOval ball) {\n return ball.getX() + 2 * BALL_RADIUS >= getWidth();\n }", "private void createAreaWithoutBorder(){\n image.setColor(backgroundColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n }", "@Override\n\tpublic boolean collide(int ballX, int ballY, Drawable ball) {\n\t\tint[] coordinates = brick.get();\n\t\tint brickX = coordinates[0];\n\t\tint brickY = coordinates[1];\n\t\tif (ballX + ball.getWidth() >= brickX\n\t\t\t\t&& ballX <= brickX + brick.getWidth()\n\t\t\t\t&& ballY+ ball.getHeight() >= brickY\n\t\t\t\t&& ballY <= brickY + brick.getHeight()) {\n\t\t\t\n\t\t\t//System.out.println(\"Collideed\");\n\t\t\tbrickBlast = true;\n\t\t\treturn true;\n\t\t \n\t\t}\n\t\treturn false;\n\t}", "void removeBall(Coordinates at);", "private void reSetBorder(ChessBorder mChessBorder) {\n\t\tmChessBorder.right = 0;\r\n\t\tmChessBorder.bottom = 0;\r\n\t\tmChessBorder.top = size;\r\n\t\tmChessBorder.left = size;\r\n\t}", "private boolean tryBorder(int x, int y){\n\n\t\treturn y == this.dimension - 1 || x == this.dimension - 1;\n\t}", "public void cancelSelectionBorder(){\n BackgroundImage bgselected= new BackgroundImage(new Image(\"rugbeats/img/Background_selectedhdpi.png\"),BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,\n new BackgroundSize(1.0, 1.0, true, true, false, false));\n ImgStack.setBackground(new Background(bgselected));\n }", "private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int width, int height)\r\n/* 89: */ {\r\n/* 90:133 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 91: */ \r\n/* 92: */ \r\n/* 93:136 */ g2.drawRect(x, y, width, height);\r\n/* 94: */ }", "public void clearBorders() {\n\n findViewById(R.id.eslot1).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n findViewById(R.id.eslot2).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n findViewById(R.id.eslot3).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n findViewById(R.id.eslot4).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n\n findViewById(R.id.eslot1).refreshDrawableState();\n findViewById(R.id.eslot2).refreshDrawableState();\n findViewById(R.id.eslot3).refreshDrawableState();\n findViewById(R.id.eslot4).refreshDrawableState();\n }", "void collision(float x_a,float y_a,float x_b,float y_b){\n float dy = y_a - y_b;\r\n float dx = x_a - x_b;\r\n float distance12 = dy * dy + dx * dx;\r\n\r\n if (distance12 < ((2 * ballRadius) * (2 * ballRadius))) {\r\n\r\n ((GameActivity)mActivity).mTimer.cancel();\r\n ((GameActivity)mActivity).layout.removeAllViews();\r\n new AlartMessage(mActivity);\r\n }\r\n\r\n }", "public Border getBorder()\n {\n return null;\n }", "private void createBorders() {\r\n // Upper border rectangle\r\n Rectangle topRecFrame = new Rectangle(new Point(0, 0), WITH, SIZE + 20);\r\n // Left border rectangle\r\n Rectangle leftRecFrame = new Rectangle(new Point(0, SIZE + 21), SIZE, HEIGHT);\r\n // Right border rectangle\r\n Rectangle rightRecFrame = new Rectangle(new Point(WITH - SIZE, SIZE + 21), SIZE, HEIGHT);\r\n // Rectangle for block on top of upper block for the score\r\n Rectangle topRecScore = new Rectangle(new Point(0, 0), WITH, 20);\r\n Block topScore = new Block(topRecScore, Color.LIGHT_GRAY, 0);\r\n Block topFrame = new Block(topRecFrame, Color.GRAY, 0);\r\n Block leftFrame = new Block(leftRecFrame, Color.gray, 0);\r\n Block rightFrame = new Block(rightRecFrame, Color.gray, 0);\r\n topFrame.addToGame(this);\r\n leftFrame.addToGame(this);\r\n rightFrame.addToGame(this);\r\n topScore.addToGame(this);\r\n\r\n }", "private void handleObjectCollision() {\n \tGObject obstacle = getCollidingObject();\n \t\n \tif (obstacle == null) return;\n \tif (obstacle == message) return;\n \t\n\t\tvy = -vy;\n\t\t\n\t\tSystem.out.println(\"ball x: \" + ball.getX() + \" - \" + (ball.getX() + BALL_RADIUS * 2) );\n\t\tSystem.out.println(\"paddle x: \" + paddleXPosition + \" - \" + (paddleXPosition + PADDLE_WIDTH) );\n\t\tif (obstacle == paddle) {\n\t\t\tpaddleCollisionCount++;\n\t\t\t\n\t\t\t// if we're hitting the paddle's side, we need to also bounce horizontally\n\t\t\tif (ball.getX() >= (paddleXPosition + PADDLE_WIDTH) || \n\t\t\t\t(ball.getX() + BALL_RADIUS * 2) <= paddleXPosition ) {\n\t\t\t\tvx = -vx;\t\t\t\t\n\t\t\t}\n\t\t} else {\n \t\t// if the object isn't the paddle, it's a brick\n\t\t\tremove(obstacle);\n\t\t\tnBricksRemaining--;\n\t\t}\n\t\t\n\t\tif (paddleCollisionCount == 7) {\n\t\t\tvx *= 1.1;\n\t\t}\n }", "private void clearBorder(Canvas canvas, Paint paint) {\n paint.setPathEffect(new DashPathEffect(new float[]{0, 0}, 0));\n\n // better use background color\n paint.setColor(Color.WHITE);\n canvas.drawRect(0, 0, width, height, paint);\n }", "private void renderBorder() {\n\t\trenderHorizontalLine(0, BORDER_SIGN_HORIZONTAL);\n\t\trenderHorizontalLine(this.output.length - 1, BORDER_SIGN_HORIZONTAL);\n\t\trenderVerticalLine(0, BORDER_SIGN_VERTICAL);\n\t\trenderVerticalLine(this.output[0].length - 1, BORDER_SIGN_VERTICAL);\n\n\t\tthis.output[0][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[0][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t}", "public void removeBalls() {\r\n for (Ball ball : this.ballsList) {\r\n ball.removeFromGame(this);\r\n }\r\n this.ballsList.clear();\r\n }", "public boolean collides(Ball ball) //collision detection\n {\n if( ( position.y+height ) > ball.getPosY()-8 )\n {\n if( position.y+10 < ( ball.getPosY()-8 ) )\n {\n if(\n !((\n (ball.getPosX()-12 < ( position.x)+width ) &&\n (ball.getPosX()+12 < (position.x+width) ) &&\n (ball.getPosX()-12 < position.x ) &&\n (ball.getPosX()+12 < position.x )\n )||\n (\n (ball.getPosX()-12 > ( position.x+width )) &&\n (ball.getPosX()+12 > (position.x+width) ) &&\n (ball.getPosX()-12 > ( position.x )) &&\n (ball.getPosX()+12 > position.x )\n ))\n ){return true;}\n }\n\n }\n\n return false;\n\n /*\n if(position.y > (ball.getPosY() - 77 ) ) //should be ball.getheight\n {\n\n return Intersector.overlaps(ball.getCircle(), rect);\n }\n */\n\n }", "public void drawBorder(boolean blue)\n\t{\n\t\t// copied most of the following from http://forums.inside3d.com/viewtopic.php?t=1326\n\t\tif (blue)\n\t\t\tglColor3f(0, 0, 1); // blue\n\t\telse\n\t\t\tglColor3f(1, 0, 0); // red\n\n\t\tglLineWidth(2); // Set line width to 2\n\t\tglLineStipple(1, (short) 0xf0f0); // Repeat count, repeat pattern\n\t\tglEnable(GL_LINE_STIPPLE); // Turn stipple on\n\n\t\tglBegin(GL_LINE_LOOP);\n\t\tglVertex2d(x - BORDER, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y - BORDER);\n\t\tglVertex2d(x + BORDER + width, y + BORDER + height);\n\t\tglVertex2d(x - BORDER, y + BORDER + height);\n\t\tglEnd();\n\t\tif (action == 3)\n\t\t{\n\t\t\tglBegin(GL_LINE_LOOP);\n\t\t\tdouble endPoint = endPos;\n\t\t\tif (!downRight)\n\t\t\t\tendPoint = startPos;\n\t\t\t//System.out.println(\"StartPos, EndPos, endPoint: \" + startPos + \", \" + endPos + \", \" + endPoint);\n\t\t\tif (upDown)\n\t\t\t{\n\t\t\t\tglVertex2d(x - BORDER, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint - BORDER);\n\t\t\t\tglVertex2d(x + BORDER + width, endPoint + BORDER + height);\n\t\t\t\tglVertex2d(x - BORDER, endPoint + BORDER + height);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglVertex2d(endPoint - BORDER, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y - BORDER);\n\t\t\t\tglVertex2d(endPoint + BORDER + width, y + BORDER + height);\n\t\t\t\tglVertex2d(endPoint - BORDER, y + BORDER + height);\n\t\t\t}\n\t\t\tglEnd();\n\t\t}\n\n\t\tglDisable(GL_LINE_LOOP); // Turn it back off\n\t\tglDisable(GL_LINE_STIPPLE); // Turn it back off\n\t\tglEnd();\n\t}", "public void collideBoundary() {\n\t\tif (getWorld() == null) return;\n\t\tif (getXCoordinate() < 1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getXCoordinate() > getWorld().getWidth()-1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getYCoordinate() < 1.01 * getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t\tif (getYCoordinate() > getWorld().getHeight()-1.01*getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t}", "protected void clearBallCount(int ballCount){\n canvas.remove(ballBox);\n for (int i = 0; i < ballCount; i++){\n if (canvas.getElementAt(60 + i*(15), 730) instanceof Ellipse){\n canvas.remove(canvas.getElementAt(60 + i*(15), 730));\n }\n }\n }", "public void turnLightsOff() {\n if (isFlashing()) {\n return;\n }\n \n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).turnOff();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).turnOff();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).turnOff();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).turnOff();\n }\n topLeft.turnOff();\n topRight.turnOff();\n bottomLeft.turnOff();\n bottomRight.turnOff();\n }", "public void arreglarBoton()\r\n\t{\r\n\t\tthis.setBorder(BorderFactory.createLineBorder(Color.white, 4));\r\n\t\tthis.setFont(new Font(\"Arial\", Font.BOLD, 17));\r\n\t}", "@Override\n\tpublic List getBoundaryShape(Ball b) {\n\t List shapes = new ArrayList();\n\t double x2 = x+width*GameBoard.PixelsPerL - 1;\n\t double y2 = y+height*GameBoard.PixelsPerL - 1;\n\t \n\t if (b.equals(firingBall)) {\n\t //leave out section of top and corner cirle so ball being fired\n\t //can exit\n\t shapes.add(new LineSegment(x, y, x2-GameBoard.PixelsPerL, y));\n\t } else {\n\t shapes.add(new Circle(x2, y, 0));\n\t shapes.add(new LineSegment(x, y, x2, y));\n\t }\n\n\t shapes.add(new LineSegment(x, y, x, y2));\n\t shapes.add(new LineSegment(x2, y, x2, y2));\n\t shapes.add(new LineSegment(x, y2, x2, y2));\n\t //0-radius circles at corners\n\t \n\t shapes.add(new Circle(x2, y2, 0));\n\t shapes.add(new Circle(x, y2, 0));\n\t shapes.add(new Circle(x, y, 0));\n\t return shapes;\n\t}", "public void supprimerJoueur() {\n cercle.setStroke(Color.TRANSPARENT);\n isVisible = false;\n }", "public void moveBall() {\n\t\tif (BrickPanel.getBrickCount() == -1) {\n\t\t\t\n \t\tcontrolPanel.resetGame();\n \t\tcontrolPanel.gameWonText();\n \t}\n\t\tif (BrickPanel.getBallShape().getY() >= 300) {\n\t\t\t \n\t\t\tcontrolPanel.resetGame();\n\t\t\t controlPanel.gameOverText();\n\t\t\t \n\t\t\t}\n\t\t//calls the moveBall method to move the ball\n\t\tBrickPanel.moveBall();\n\t}", "public void clearBalls();", "private void bounceOffVerticalWall() {\n vx = -vx;\n }", "private void collideWithBall() {\n die();\n }", "@Override\n public void draw(Canvas onCanvas) {\n Paint border = new Paint();\n border.setColor(Color.BLACK);\n border.setStyle(Paint.Style.STROKE);\n border.setStrokeWidth(1);\n\n // -1 on width and height because the 1st pixel (0 index) is included\n // Java's placement on the border lines are really weird...\n //\n // It draws the top and left borders on the 0 pixel\n // BUT it draws the right and bottom ones PAST the last pixel\n // WHY U DO DIS\n onCanvas.drawRect(0, 0, getW() - 1, getH() - 1, border);\n\n super.draw(onCanvas);\n }", "private GPoint [] createArrayOfBallBorders(GOval ball) {\n GPoint [] borderPoints = new GPoint[4];\n borderPoints[0] = new GPoint(ball.getX(), ball.getY());\n borderPoints[1] = new GPoint(ball.getX() + 2 * BALL_RADIUS, ball.getY());\n borderPoints[2] = new GPoint(ball.getX() + 2 * BALL_RADIUS, ball.getY() + 2 * BALL_RADIUS);\n borderPoints[3] = new GPoint(ball.getX(), ball.getY() + 2 * BALL_RADIUS);\n return borderPoints;\n }", "private boolean hasMissPaddle(GOval ball){\n return ball.getY() + 2 * BALL_RADIUS >= getHeight();\n }", "public void paddleVSball(Paddle p, Ball b) {\n Rectangle p_box = new Rectangle(p.getX(), p.getY(), p.getWidth(), p.getHeight());\r\n // System.out.println(\"X: \"+p.getX()+\"Y: \"+p.getY()+\"W: \"+p.getWidth()+\"H: \"+p.getHeight());\r\n Rectangle b_box = new Rectangle(b.getX(), b.getY(), b.getWidth(), b.getHeight());\r\n\r\n if (p_box.intersects(b_box)) {\r\n //collision\r\n //if ball is going +y and -x\r\n if (b.getVY() > 0 || b.getVY() < 0) {\r\n b.setVY(b.getVY() * -1);\r\n }\r\n if (b.getY() < p.getY()) {//if the ball is inside the paddle\r\n b.setVX(b.getVX() * -1);\r\n b.setVX(b.getVX() * -1);\r\n }\r\n }\r\n }", "private boolean reachedBorder(Line trajectory) {\n\n boolean reachedBorder = false;\n\n //checking top and bottom borders of the screen\n\n double upperLeftY = this.gameLevel.getBorders()[BOTTOM].getCollisionRectangle().getUpperLeft().getY();\n double lowerLeftY = this.gameLevel.getBorders()[TOP].getCollisionRectangle().getLowerLeft().getY();\n double upperLeftX = this.gameLevel.getBorders()[RIGHT].getCollisionRectangle().getUpperLeft().getX();\n double upperRightX = this.gameLevel.getBorders()[LEFT].getCollisionRectangle().getUpperRight().getX();\n\n if ((this.velocity.getDy() > 0\n && (trajectory.start().getY() >= upperLeftY || equals(trajectory.start().getY(), upperLeftY)))\n || (this.velocity.getDy() < 0 && (trajectory.start().getY() <= lowerLeftY))\n || equals(trajectory.start().getY(), lowerLeftY)) {\n this.velocity.setDy(-this.velocity.getDy());\n reachedBorder = true;\n }\n\n //checking left and right borders of the screen\n if (this.velocity.getDx() > 0\n && (trajectory.start().getX() >= upperLeftX || equals(trajectory.start().getX(), upperLeftX))\n || (this.velocity.getDx() < 0 && (trajectory.start().getX() <= upperRightX))\n || equals(trajectory.start().getX(), upperRightX)) {\n this.velocity.setDx(-this.velocity.getDx());\n reachedBorder = true;\n }\n\n return reachedBorder;\n }", "@Override\n\t\tpublic void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {\n\t\t\tsuper.paintBorder(c, g, x, y, width + 1, height);\n\t\t}", "private void colidiuPaddle(Bola bola, Sprite paddle) {\n\t\tPoint posicaoB = bola.getPosition();\n\t\tPoint posicaoP = paddle.getPosition();\n\t\tif (posicaoB.y + 5 == posicaoP.y && posicaoP.x + 27 >= posicaoB.x && posicaoP.x <= posicaoB.x + 5) {\n\t\t\tbola.invertVertical();\n\t\t}\n\t}", "private void bounceIfWallCollision() {\n \tdouble x = ball.getX();\n \tdouble y = ball.getY();\n \t\n \t// Ball hits side\n \tif (x <= 0 || (x + BALL_RADIUS * 2) >= getWidth()) vx = -vx;\n \t\n \t// Ball hits top\n \tif (y <= 0) vy = -vy;\n }", "private void setLastBorderHit(int borderHit)\n\t{\n\t\t// Set every border to false\n\t\tfor(int i = 0;i<4;i++)\n\t\t{\n\t\t\tlastBorderHit[i] = false;\n\t\t}\n\n\t\t// Set the borderHit index to true\n\t\tlastBorderHit[borderHit] = true;\n\t}", "public void xsetBorder(org.apache.xmlbeans.XmlString border)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(BORDER$22);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(BORDER$22);\n }\n target.set(border);\n }\n }", "public void throwBall() {\r\n\t\tthis.move();\r\n\t\tballCount--;\r\n\r\n\t}", "boolean checkBorders();", "protected boolean isBorder(int x, int y){\n if(super.getLocationX() == x)\n return true;\n //top border\n if (super.getLocationY() == y)\n return true;\n\n //right border\n if((super.getLocationX() + super.getWidth() - 1) == x)\n return true;\n\n //bottom border\n if ((super.getLocationY() + super.getHeight() - 1) == y)\n return true;\n\n //return false if not\n return false;\n }", "public void checkWallBounce(){\n // Bounce the ball back when it hits the top of screen\n if (getRect().top < 0) {\n reverseYVelocity();\n clearObstacleY(40);\n }\n\n // If the ball hits left wall bounce\n if (getRect().left < 0) {\n reverseXVelocity();\n clearObstacleX(2);\n }\n\n // If the ball hits right wall Velocity\n if (getRect().right > screenX) {\n reverseXVelocity();\n clearObstacleX(screenX - 57);\n }\n }", "public void setBoulderLockOff(){\r\n\t\tservoTarget = Constants.BALL_HOLDER_RETRACTED;\r\n\t}", "public void collision(Ball b){\n float cir_center_X = b.getCenterX();\r\n float cir_center_Y = b.getCenterY();\r\n \r\n // aabb half extent\r\n float extent_X = (this.p4[0]-this.p1[0])/2; //half width\r\n float extent_Y = (this.p3[1]-this.p4[1])/2; // half height\r\n // rec center \r\n float rec_center_X = this.p1[0]+extent_X;\r\n float rec_center_Y = this.p1[1]+extent_Y;\r\n \r\n // difference between center : vector D = Vector Cir_center-Rec-center\r\n float d_X =cir_center_X-rec_center_X;\r\n float d_Y = cir_center_Y-rec_center_Y;\r\n \r\n //\r\n float p_X =Support_Lib.clamp(d_X,-extent_X,extent_X);\r\n float p_Y =Support_Lib.clamp(d_Y,-extent_Y,extent_Y);\r\n \r\n\r\n \r\n float closest_point_X = rec_center_X +p_X;\r\n float closest_point_Y = rec_center_Y +p_Y; \r\n \r\n \r\n d_X = closest_point_X -cir_center_X;\r\n d_Y = closest_point_Y -cir_center_Y;\r\n \r\n \r\n \r\n float length = (float)Math.sqrt((d_X*d_X)+(d_Y*d_Y));\r\n \r\n if(length+0.001 <=b.getRadius()){\r\n\r\n \r\n float ratio =(closest_point_X-rec_center_X)/(extent_X*2);\r\n b.accelartion(ratio);\r\n b.updateVelocity(Support_Lib.direction(d_X,d_Y));\r\n \r\n }\r\n \r\n \r\n }", "@Override\n\t\tprotected boolean hasBorder(KrollDict d)\n\t\t{\n\t\t\treturn true;\n\t\t}", "public void removePaddle() {\r\n this.removeSprite(this.paddle);\r\n this.removeCollidable(this.paddle);\r\n }", "public void intersections(){\n\n \tif (ball.intersect(paddle.getX(), paddle.getY(), paddle.getWidth(), paddle.getHeight())){\n\t\t\tball.bouncePaddle(paddle.getX(),paddle.getY(),paddle.getWidth(),paddle.getHeight());\n\t\t}\n\n\t\t//WHEN POWERUP HITS PADDLE\n\n\t\tfor (int i = 0; i < powerups.size(); i++){\n\t\t\tif (paddle.intersect(powerups.get(i).getX(), powerups.get(i).getY(), powerups.get(i).getWidth(), powerups.get(i).getHeight())) {\n\t\t\t\tif (powerups.get(i).getType() != 4){\n\t\t\t\t\tpaddle.setType(powerups.get(i).getType());\n\t\t\t\t}else{\n\t\t\t\t\tball.setType(1);\n\t\t\t\t}\n\t\t\t\tpowerups.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t//WHEN LASER HITS BRICK\n\n\t\tfor (int i = 0; i < lasers.size() ; i++){\n\t\t\tfor (int j = 0; j < bricks.size(); j++){\n\n\t\t\t\tif (lasers.size() != 0 && lasers.get(i).intersect(bricks.get(j).getX(), bricks.get(j).getY(), bricks.get(j).getWidth(), bricks.get(j).getHeight())){\n\t\t\t\t\tbricks.get(j).hit(0);\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tif (i > 0){\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\n\t\t//BRICKS\n\t\tfor (int i = 0; i < bricks.size(); i++){\n\t\t\t//WHEN BALL HITS BRICK\n\t\t\tif (ball.intersect(bricks.get(i).getX(), bricks.get(i).getY(), bricks.get(i).getWidth(), bricks.get(i).getHeight())){\n\t\t\t\t\n\t\t\t\tball.bounceBrick(ball.hitOnSide(bricks.get(i).getX(), bricks.get(i).getY(), bricks.get(i).getWidth(), bricks.get(i).getHeight()));\n\t\t\t\tball.move();\n\n\n\t\t\t\tbricks.get(i).hit(ball.getType());\n\t\t\t\tif (ball.getType() == 1){\n\t\t\t\t\tfor (int j = 0; j < bricks.size(); j++){\n\t\t\t\t\t\tif (bricks.get(j).getX() > ball.getX()-50 && bricks.get(j).getX() < ball.getX()+50){\n\t\t\t\t\t\t\tif (bricks.get(j).getY() > ball.getY()-75 && bricks.get(j).getY() < ball.getY()+75){\n\t\t\t\t\t\t\t\tbricks.get(j).hit(1);\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\tball.setType(0);\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t//WHEN BRICK DIES\n\t\tfor (int i = bricks.size()-1; i>=0; i--){\n\t\t\tif (bricks.get(i).isDead()){\n\t\t\t\tif (bricks.get(i).spawnPowerup()){\n\t\t\t\t\tpowerups.add(new Powerup(bricks.get(i).getX(), bricks.get(i).getY(), paddle));\n\t\t\t\t}\n\t\t\t\tbricks.remove(i);\n\t\t\t}\n\t\t}\n\n }", "private void bulletMoveOffScreen() {\r\n\t\tif(bullet != null && (bullet.getX() > getWidth() || bullet.getX() < 0)){\r\n\t\t\tremove(bullet);\r\n\t\t\tbullet = null;\r\n\t\t}\r\n\t}", "public void trimBarrier(){\n game.setBarrierNumOfParties(game.getPlayersConnected());\n }", "public void aapneOgByttFarge() {\n aapne();\n if (!bombe) {\n Color lysegroenn = Color.rgb(86, 130, 3, 0.3);\n setBackground(new Background(new BackgroundFill(lysegroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n }", "public void drawBorder(Graphics g, Shape s) {\r\n\t\tgraphics.setStroke(new BasicStroke(8f)); // set the surround size of the shape\r\n\t\tgraphics.setColor(Color.BLACK);\r\n\t\tgraphics.draw(s);\r\n\t}", "protected void paintBorder(Graphics g) {\n super.paintComponent(g);\n\n\n g.setColor(country.getCont().getContColor());\n g.fillRoundRect(innerDiameter,innerDiameter,width-2*innerDiameter, height-2*innerDiameter,0,0);\n g.setColor(country.getOwner().getPlayerColor());\n g.fillOval(innerDiameter, innerDiameter, getSize().width-2*innerDiameter, getSize().height-2*innerDiameter);\n\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"default\", Font.BOLD, 14));\n\n g.drawString(\"\"+country.getArmy(),20,20);\n }", "boolean borderCountryNeedsHelp(Country border)\n\t{\n\treturn (border.getArmies() <= borderForce) && ! weOwnContsArround(border);\n\t}", "public static void handlePlatformCollision(Ball ball, Platform platform) {\n if(Shape.intersect(ball, platform).getBoundsInLocal().getWidth() != -1) {\n ball.moveUp();\n }\n }", "@Override\n\tpublic void collision(Ball ball) {\n PhysicsComponent gadgetPartToCollideWith = this.physicsComponentList.get(0);\n double minTimeUntilCollision = Double.MAX_VALUE;\n for(PhysicsComponent gadgetPart: physicsComponentList){\n double timeUntilCollisionPart = gadgetPart.timeUntilCollision(ball.getBallCircle(), ball.getVelocity());\n if (timeUntilCollisionPart < minTimeUntilCollision){ \n minTimeUntilCollision = timeUntilCollisionPart;\n gadgetPartToCollideWith = gadgetPart;\n }\n }\n Vect newVelocity = gadgetPartToCollideWith.reflect(ball.getBallCircle(), ball.getVelocity(), ball.getCoefficentOfReflection()); \n ball.setVelocity(newVelocity);\n trigger();\n\t}", "public void checkBallCollisions(Ball ball, Board board, ArrayList<Brick> bricks) {\n float currDir = ball.getDirection();\n // check if the ball has hit any of the bricks\n for(Brick brick : bricks){\n boolean hitBrick = false;\n boolean hitCorner = false;\n\n if (ball.intersects(brick.getTopLeftCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getTopLeftCorner());\n if ((!ball.hasPositiveXDirection()) && angle<reverseVerticalDirection(angle)) ball.reverseVerticalDirection();\n else if (ball.hasPositiveYDirection() && angle>reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getTopRightCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getTopRightCorner());\n if (ball.hasPositiveXDirection() && angle>reverseVerticalDirection(angle) && angle<Math.PI) ball.reverseVerticalDirection();\n else if (ball.hasPositiveYDirection() && (angle<reverseHorizontalDirection(angle)\n || angle>Math.PI)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getBottomLeftCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getBottomLeftCorner());\n if ((!ball.hasPositiveXDirection()) && angle>reverseVerticalDirection(angle)) ball.reverseVerticalDirection();\n else if ((!ball.hasPositiveYDirection()) && angle<reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getBottomRightCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getBottomRightCorner());\n if (ball.hasPositiveXDirection() && angle<reverseVerticalDirection(angle) && angle>Math.PI) ball.reverseVerticalDirection();\n else if ((!ball.hasPositiveYDirection()) && angle>reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n }\n if (hitCorner) {\n brick.decrementLife(); Points.getInstance().addPoints(10);\n break;\n }\n if (ball.intersects(brick.getNorthLine()) && Math.PI<=currDir\n && currDir<=2*Math.PI) {\n ball.reverseVerticalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getSouthLine()) && 0<=currDir\n && currDir<=Math.PI) {\n ball.reverseVerticalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getWestLine()) && ((0<=currDir\n && currDir<=(Math.PI)/2) || ((3*Math.PI)/2<=currDir\n && currDir<=2*Math.PI))) {\n ball.reverseHorizontalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getEastLine()) && (Math.PI)/2<=currDir\n && currDir<=(3*Math.PI)/2) {\n ball.reverseHorizontalDirection();\n hitBrick = true;\n }\n if (hitBrick) {\n brick.decrementLife(); Points.getInstance().addPoints(10);\n break;\n }\n }\n\n // check if the ball has hit the ceiling or one of the walls\n if (ball.getY() <= ceilingPos) {\n ball.setY(ceilingPos);\n ball.reverseVerticalDirection();\n } else if (ball.getMaxX() >= rightWallPos) {\n ball.setX(rightWallPos - 2 * ball.getRadius());\n ball.reverseHorizontalDirection();\n } else if (ball.getX() <= leftwallPos) {\n ball.setX(leftwallPos);\n ball.reverseHorizontalDirection();\n }\n\n // check if the ball has hit the board\n if (currDir>((Math.PI)/6) && currDir<((3*Math.PI)/6)) return;\n if (ball.intersects(board.getBody()) && currDir>Math.PI) {\n ball.reverseVerticalDirection();\n } else if (ball.intersects(board.getLeftEdge())) {\n float angle = getDirectionAfterCollisionWithCircle(ball, board.getLeftEdge());\n if (angle<((Math.PI)/2) || angle>(3*Math.PI)/2) ball.reverseVerticalDirection();\n else ball.setDirection(angle);\n } else if (ball.intersects(board.getRightEdge())) {\n float angle = getDirectionAfterCollisionWithCircle(ball, board.getRightEdge());\n if (angle>((Math.PI)/2) && angle<(3*Math.PI)/2) ball.reverseVerticalDirection();\n else ball.setDirection(angle);\n }\n }", "void addBorderContactObserver(BorderObserver observer);", "private void circleCollison() {\n\t\t\n\t}", "private void playRound(GOval ball) {\n int bricksOnStage = NBRICK_ROWS * NBRICKS_PER_ROW;\n\n while(true) {\n bricksOnStage = collideObject(ball, bricksOnStage);\n collideStageLimits(ball);\n if (hasMissPaddle(ball)) {\n showLabel(\"BUSTED\", Color.BLACK);\n clearStage(ball);\n break;\n }\n ball.move(vx, vy);\n //println(vx + \" \" + vy);\n if (isBricksLeft(bricksOnStage)){\n showLabel(\"YOU WON!\", Color.red);\n clearStage(ball);\n break;\n }\n pause(PAUSE_TIME);\n }\n }", "public Bordereau() {\n\t\tsuper();\n\t}", "private void createBallsOnTopOfPaddle() {\r\n for (int i = 0; i < levelInformation.numberOfBalls(); i++) {\r\n Ball ball = new Ball((guiWidth / 2) - ((levelInformation.numberOfBalls() - 1) * ballRadius)\r\n + (i * (ballRadius * 2)), 550, ballRadius, Color.WHITE, environment);\r\n ball.setVelocity(levelInformation.initialBallVelocities().get(i));\r\n ball.addToGame(this);\r\n }\r\n ballCounter.increase(levelInformation.numberOfBalls());\r\n }", "void lostBall()\n {\n currentBall = null;\n }", "private void calculateBorder(ArrayList<double[]> contour,\r\n ArrayList<double[]> border) {\r\n\r\n // Circumradius\r\n double circumradius = (sideLength * Math.sqrt(3)) / 3;\r\n\r\n // Reduce the circumradius by the border width\r\n double scaledCircumRadius = circumradius - borderWidth;\r\n\r\n // Make sure the radius never drops below zero\r\n if (scaledCircumRadius < 0)\r\n scaledCircumRadius = 0;\r\n\r\n // Scaling factor\r\n double scale = scaledCircumRadius / circumradius;\r\n\r\n // Scale each vertex of the contour of the whole polygon\r\n for (double[] vertex : contour) {\r\n double[] borderVertex = new double[9];\r\n borderVertex[0] = vertex[0] * scale;\r\n borderVertex[1] = vertex[1] * scale;\r\n border.add(borderVertex);\r\n }\r\n }", "@Override\n public void clear_area(int x1, int y1, int x2, int y2) {\n graphics.setColor(getBackGround());\n graphics.fillRect(x1, y1, x2 - x1, y2 - y1);\n graphics.setColor(getForeGround());\n }", "protected void moveBall() {\n int width = getWidth();\n int height = getHeight();\n int min, max, randomX, randomY;\n min = 0;\n max = 200;\n randomX = min + (int)(Math.random() * ((max - min)+1));\n randomY = min + (int)(Math.random() * ((max - min)+1));\n //System.out.println(randomX + \", \" + randomY);\n\n Rectangle ballBounds = ball.getBounds();\n// //System.out.println(ballBounds.x + \", \" + ballBounds.y);\n// if (ballBounds.x + randomX < 0) {\n// randomX = 200;\n// } else if (ballBounds.x + ballBounds.width + randomX > width) {\n// randomX = -200;\n// }\n// if (ballBounds.y + randomY < 0) {\n// randomY = 200;\n// } else if (ballBounds.y + ballBounds.height + randomY > height) {\n// randomY = -200;\n// } \n\n ballBounds.x = randomX;\n ballBounds.y = randomY;\n _ballXpos = ballBounds.x;\n _ballYpos = ballBounds.y;\n ball.setFrame(ballBounds);\n thePlacebo.repaint();\n }" ]
[ "0.6792716", "0.66687185", "0.66254365", "0.6478188", "0.6381706", "0.6347348", "0.6281002", "0.62592334", "0.6246905", "0.6164852", "0.61559886", "0.61280906", "0.6121235", "0.61189455", "0.6087671", "0.604991", "0.59821874", "0.5981286", "0.5889005", "0.58861923", "0.5875609", "0.5856463", "0.5854041", "0.58379334", "0.58119047", "0.57977706", "0.5782887", "0.5780933", "0.5768626", "0.5768131", "0.5766057", "0.57590115", "0.5747863", "0.57405996", "0.5739118", "0.57303554", "0.5726229", "0.57211226", "0.5689477", "0.5676748", "0.5670155", "0.5662572", "0.5650612", "0.56457514", "0.56424254", "0.5641846", "0.5617939", "0.56066716", "0.5592822", "0.55882293", "0.5586212", "0.5580884", "0.5576508", "0.5569544", "0.5567649", "0.55591124", "0.5550723", "0.5544191", "0.5528311", "0.55239093", "0.5523171", "0.5520282", "0.551934", "0.5508151", "0.5499026", "0.5498391", "0.549532", "0.5491553", "0.5480935", "0.54755145", "0.5464032", "0.5457002", "0.5437441", "0.54210424", "0.54198617", "0.5418205", "0.5400537", "0.53981423", "0.53912425", "0.5374114", "0.5371509", "0.5361325", "0.5355436", "0.53547347", "0.53464687", "0.53436977", "0.5330423", "0.53275955", "0.5317731", "0.53128874", "0.53103495", "0.5309864", "0.52939826", "0.5293458", "0.5291547", "0.5290911", "0.528745", "0.5286112", "0.5279634", "0.52731425", "0.52720475" ]
0.0
-1
Method to determine borders.
private void createBorders() { // Upper border rectangle Rectangle topRecFrame = new Rectangle(new Point(0, 0), WITH, SIZE + 20); // Left border rectangle Rectangle leftRecFrame = new Rectangle(new Point(0, SIZE + 21), SIZE, HEIGHT); // Right border rectangle Rectangle rightRecFrame = new Rectangle(new Point(WITH - SIZE, SIZE + 21), SIZE, HEIGHT); // Rectangle for block on top of upper block for the score Rectangle topRecScore = new Rectangle(new Point(0, 0), WITH, 20); Block topScore = new Block(topRecScore, Color.LIGHT_GRAY, 0); Block topFrame = new Block(topRecFrame, Color.GRAY, 0); Block leftFrame = new Block(leftRecFrame, Color.gray, 0); Block rightFrame = new Block(rightRecFrame, Color.gray, 0); topFrame.addToGame(this); leftFrame.addToGame(this); rightFrame.addToGame(this); topScore.addToGame(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Rectangle[] getBorders(){\n\t\treturn borders;\n\t}", "boolean checkBorders();", "@Test\n public void testGetBorder() {\n Assert.assertEquals(Border.ALL, Border.getBorder(true, true, true, true));\n Assert.assertEquals(Border.BOTTOM, Border.getBorder(false, false, false, true));\n Assert.assertEquals(Border.BOTTOM_LEFT, Border.getBorder(true, false, false, true));\n Assert.assertEquals(Border.BOTTOM_LEFT_RIGHT, Border.getBorder(true, true, false, true));\n Assert.assertEquals(Border.BOTTOM_RIGHT, Border.getBorder(false, true, false, true));\n Assert.assertEquals(Border.BOTTOM_TOP, Border.getBorder(false, false, true, true));\n Assert.assertEquals(Border.BOTTOM_TOP_LEFT, Border.getBorder(true, false, true, true));\n Assert.assertEquals(Border.BOTTOM_TOP_RIGHT, Border.getBorder(false, true, true, true));\n Assert.assertEquals(Border.LEFT, Border.getBorder(true, false, false, false));\n Assert.assertEquals(Border.LEFT_RIGHT, Border.getBorder(true, true, false, false));\n Assert.assertEquals(Border.NONE, Border.getBorder(false, false, false, false));\n Assert.assertEquals(Border.RIGHT, Border.getBorder(false, true, false, false));\n Assert.assertEquals(Border.TOP, Border.getBorder(false, false, true, false));\n Assert.assertEquals(Border.TOP_LEFT, Border.getBorder(true, false, true, false));\n Assert.assertEquals(Border.TOP_LEFT_RIGHT, Border.getBorder(true, true, true, false));\n Assert.assertEquals(Border.TOP_RIGHT, Border.getBorder(false, true, true, false));\n }", "public int getBorders() {\n for (int row = 0; row < board.length; row++)\n for (int col = 0; col < board.length; col++) {\n\n // left-border (excluding corners - check 3 sides only)\n if (row != 0 && row != board.length - 1 && col == 0) {\n if (board[row - 1][col] != null && board[row][col + 1] !=\n null && board[row + 1][col] != null)\n if (board[row - 1][col].getPlayerNumber() == board[row][col + 1].getPlayerNumber()\n && board[row - 1][col].getPlayerNumber() == board[row + 1][col].getPlayerNumber() &&\n board[row][col + 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n return board[row][col + 1].getPlayerNumber();\n }\n\n // right-border (excluding corners - check 3 sides only)\n if (row != 0 && row != board.length - 1 && col == board.length - 1) {\n if (board[row - 1][col] != null && board[row][col - 1] !=\n null && board[row + 1][col] != null)\n if (board[row - 1][col].getPlayerNumber() == board[row][col - 1].getPlayerNumber()\n && board[row - 1][col].getPlayerNumber() == board[row + 1][col].getPlayerNumber() &&\n board[row][col - 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n return board[row][col - 1].getPlayerNumber();\n }\n\n // top-border (excluding corners - check 3 sides only)\n if (col != 0 && col != board.length - 1 && row == 0) {\n if (board[row][col - 1] != null && board[row][col + 1] !=\n null && board[row + 1][col] != null)\n if (board[row][col - 1].getPlayerNumber() == board[row][col + 1].getPlayerNumber()\n && board[row + 1][col].getPlayerNumber() == board[row][col - 1].getPlayerNumber() &&\n board[row][col - 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n return board[row][col - 1].getPlayerNumber();\n }\n\n // bottom-border (excluding corners - check 3 sides only)\n if (col != 0 && col != board.length - 1 && row == board.length - 1) {\n if (board[row][col - 1] != null && board[row][col + 1] !=\n null && board[row - 1][col] != null)\n if (board[row][col - 1].getPlayerNumber() == board[row][col + 1].getPlayerNumber()\n && board[row - 1][col].getPlayerNumber() == board[row][col - 1].getPlayerNumber() &&\n board[row][col - 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n return board[row][col - 1].getPlayerNumber();\n }\n\n }\n return -1;\n }", "public void resetBorders(){\n for (int i = 0; i * 25 < width + 40; i++) {\n if (i == 0) {\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, 0, 10));\n } else {\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, 0, topborder.get(i - 1).getHeight() + 1));\n }\n }\n\n\n for (int i = 0; i * 25 < width + 40; i++) {\n if (i == 0) {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25,height-minBorderHeight));\n } else {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, botborder.get(i - 1).getY() - 1));\n }\n }\n }", "public float border() {\n\t\treturn borderThickness;\n\t}", "public BorderDefine[] getBorderDefine() {\n\t\tBorderDefine[] defines = new BorderDefine[4];\n\t\tdefines[0] = border_top != null ? border_top : border;\n\t\tdefines[1] = border_right != null ? border_right : border;\n\t\tdefines[2] = border_bottom != null ? border_bottom : border;\n\t\tdefines[3] = border_left != null ? border_left : border;\n\t\treturn defines;\n\t}", "private void createCanvasBorders() {\n\n\t\tLabel lblBorderMiddle = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderMiddle.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\t\tlblBorderMiddle.setBounds(0, 72, 285, 2);\n\n\t\tLabel lblBorderBottom = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderBottom.setBounds(0, 198, 285, 2);\n\t\tlblBorderBottom.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderLeft = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderLeft.setBounds(0, 0, 2, 200);\n\t\tlblBorderLeft.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderRight = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderRight.setBounds(283, 0, 2, 200);\n\t\tlblBorderRight.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderTop = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderTop.setBounds(0, 0, 285, 2);\n\t\tlblBorderTop.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\t}", "private void renderBorder() {\n\t\trenderHorizontalLine(0, BORDER_SIGN_HORIZONTAL);\n\t\trenderHorizontalLine(this.output.length - 1, BORDER_SIGN_HORIZONTAL);\n\t\trenderVerticalLine(0, BORDER_SIGN_VERTICAL);\n\t\trenderVerticalLine(this.output[0].length - 1, BORDER_SIGN_VERTICAL);\n\n\t\tthis.output[0][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[0][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t}", "Border createBorder();", "private static Border[] getCornerBorders(Tile tile, Map<Border, List<Tile>> borderMap) {\n Border[] result = new Border[2];\n for (Border border : tile.getBorders()) {\n if (borderMap.get(border).size() == 1) {\n result[result[0] == null ? 0 : 1] = border;\n }\n }\n return result;\n }", "CellStyleCriterion border(Keywords.BorderSide first, Keywords.BorderSide second, Consumer<BorderCriterion> borderConfiguration);", "private List<String> extractBorders ()\n {\n List<String> borders = new ArrayList<String> ();\n for (String sortedClass : sortedClasses)\n {\n ProjectDependenciesAnalyzer.DependencyInfo info = infos.get (sortedClass);\n double x = info.getNormalizedUsing ();\n double y = info.getNormalizedExtending ();\n if (x < 0.05 || x > 0.95 || y < 0.05 || y > 0.95)\n {\n borders.add (sortedClass);\n }\n }\n sortedClasses.removeAll (borders);\n return borders;\n }", "protected boolean isBorder(int x, int y){\n if(super.getLocationX() == x)\n return true;\n //top border\n if (super.getLocationY() == y)\n return true;\n\n //right border\n if((super.getLocationX() + super.getWidth() - 1) == x)\n return true;\n\n //bottom border\n if ((super.getLocationY() + super.getHeight() - 1) == y)\n return true;\n\n //return false if not\n return false;\n }", "public BorderInfo getBorderEnd() {\n return borderEnd.getBorderInfo();\n }", "private void drawBorders(Graphics g) {\n\t\tRectangle field = g.getClipBounds();\n\t\tdouble[] thisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n\t\tdouble[] upToThisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n\t\tdouble[] leftToThisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n\t\t\n\t\tdouble thisF_xy;\n\t\tdouble upToThisF_xy;\n\t\tdouble leftToThisF_xy;\n\t\t\n\t\tfor(int i = field.x+plotSheet.getFrameThickness() + 1; i < field.x + field.width-plotSheet.getFrameThickness(); i++) {\n\t\t\tfor(int j = field.y+plotSheet.getFrameThickness() + 1; j < field.y +field.height-plotSheet.getFrameThickness(); j++) {\n\t\t\t\tthisCoordinate = plotSheet.toCoordinatePoint(i, j, field);\n\t\t\t\tupToThisCoordinate = plotSheet.toCoordinatePoint(i, j-1, field);\n\t\t\t\tleftToThisCoordinate = plotSheet.toCoordinatePoint(i-1, j, field);\n\t\t\t\tthisF_xy = function.f(thisCoordinate[0], thisCoordinate[1]);\n\t\t\t\tupToThisF_xy = function.f(upToThisCoordinate[0], upToThisCoordinate[1]);\n\t\t\t\tleftToThisF_xy = function.f(leftToThisCoordinate[0], leftToThisCoordinate[1]);\n\t\t\t\t\n\t\t\t\tif(onBorder(thisF_xy, upToThisF_xy) || onBorder(thisF_xy, leftToThisF_xy)) {\n\t\t\t\t\tg.drawLine(i, j, i, j);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "CellStyleCriterion border(Keywords.BorderSide first, Keywords.BorderSide second, Keywords.BorderSide third, Consumer<BorderCriterion> borderConfiguration);", "public Border getBorder()\n {\n return null;\n }", "void border(Keywords.BorderSide first, Keywords.BorderSide second, @DelegatesTo(BorderCriterion.class) @ClosureParams(value=FromString.class, options = \"org.modelcatalogue.spreadsheet.query.api.BorderCriterion\") Closure borderConfiguration);", "public boolean isBordered() {\n return mPolygonShapeSpec.hasBorder();\n }", "public ValueExpression getBorder() {\n return border;\n }", "public boolean getPaintBorder() {\n\t\treturn p.getPaintBorder();\n\t}", "@Override\n public boolean getScaleDownInsideBorders() {\n return mScaleDownInsideBorders;\n }", "public boolean getPaintBorder() {\n\t\treturn paintBorder;\n\t}", "public Color getBorderColor();", "CellStyleCriterion border(Keywords.BorderSide location, Consumer<BorderCriterion> borderConfiguration);", "public static ArrayList<double[]> isBorder()\n {\n ArrayList<double[]> borders = new ArrayList<double[]>() ;\n // for all points\n for(int i=0; i<POINTS.length; i++)\n {\n // for all neighbouring points\n for(int k=i+1; k<POINTS.length; k++)\n {\n // System.out.println(\"Checking pair: \" + Arrays.toString(POINTS[i]) + \" \" + Arrays.toString(POINTS[k]));\n ArrayList<Double> sides = new ArrayList<Double>();\n // checking tmp vals\n for(int n=0; n<POINTS.length; n++) // O(n^3)\n {\n double[] test = POINTS[n];\n // find which side of line the test is on\n double d = side(POINTS[i], POINTS[k], POINTS[n]);\n // append to sides\n\n sides.add(d);\n //System\n }\n // check if sides for this pairing is same\n if (neg(sides) || pos(sides))\n {\n\n borders.add(POINTS[i]);\n borders.add(POINTS[k]);\n }\n }\n }\n /**double[] tmp = POINTS[i];\n double d = side(p1, p2, tmp);\n sides.add(d);\n //System.out.println(\"Printing sides array for pairing \" + p1[0] + \",\" + p1[1] + \" and \" + p2[0] + \",\" + p2[1] );\n if (neg(sides) || pos(sides))\n {\n System.out.println(\"p1 and p2 are borders\");\n borders.add(p1); borders.add(p2);\n }\n }\n for (int i=0; i<borders.size(); i++){\n System.out.println(Arrays.toString(borders.get(i)));\n }\n /**\n System.out.println(\"is all neg: \");\n System.out.println(neg(sides));\n System.out.println(\"is all pos: \");\n System.out.println(pos(sides));*/\n// return false;\n return borders;\n }", "@Override\n public int getBorderColor() {\n return mBorderColor;\n }", "void border(Keywords.BorderSide first, Keywords.BorderSide second, Keywords.BorderSide third, @DelegatesTo(BorderCriterion.class) @ClosureParams(value=FromString.class, options = \"org.modelcatalogue.spreadsheet.query.api.BorderCriterion\") Closure borderConfiguration);", "private boolean tryBorder(int x, int y){\n\n\t\treturn y == this.dimension - 1 || x == this.dimension - 1;\n\t}", "public Color getBorderColor() {\r\n return this.borderColor;\r\n }", "public void createScreenBorders() {\n // set the screen's borders.\n this.upper = 0;\n this.lower = 600;\n this.left = 0;\n this.right = 800;\n }", "public boolean getBorderVisible() {\n checkWidget();\n return borderLeft == 1;\n }", "public Border getBorder() {\n\t return border;\n\t}", "public Border getBorder() {\n\t\treturn border;\n\t}", "public Rectangle getViewportBorderBounds() {\n/* 608 */ Rectangle rectangle = new Rectangle(getSize());\n/* */ \n/* 610 */ Insets insets = getInsets();\n/* 611 */ rectangle.x = insets.left;\n/* 612 */ rectangle.y = insets.top;\n/* 613 */ rectangle.width -= insets.left + insets.right;\n/* 614 */ rectangle.height -= insets.top + insets.bottom;\n/* */ \n/* 616 */ boolean bool = SwingUtilities.isLeftToRight(this);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 622 */ JViewport jViewport1 = getColumnHeader();\n/* 623 */ if (jViewport1 != null && jViewport1.isVisible()) {\n/* 624 */ int i = jViewport1.getHeight();\n/* 625 */ rectangle.y += i;\n/* 626 */ rectangle.height -= i;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 633 */ JViewport jViewport2 = getRowHeader();\n/* 634 */ if (jViewport2 != null && jViewport2.isVisible()) {\n/* 635 */ int i = jViewport2.getWidth();\n/* 636 */ if (bool) {\n/* 637 */ rectangle.x += i;\n/* */ }\n/* 639 */ rectangle.width -= i;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 645 */ JScrollBar jScrollBar1 = getVerticalScrollBar();\n/* 646 */ if (jScrollBar1 != null && jScrollBar1.isVisible()) {\n/* 647 */ int i = jScrollBar1.getWidth();\n/* 648 */ if (!bool) {\n/* 649 */ rectangle.x += i;\n/* */ }\n/* 651 */ rectangle.width -= i;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 657 */ JScrollBar jScrollBar2 = getHorizontalScrollBar();\n/* 658 */ if (jScrollBar2 != null && jScrollBar2.isVisible()) {\n/* 659 */ rectangle.height -= jScrollBar2.getHeight();\n/* */ }\n/* */ \n/* 662 */ return rectangle;\n/* */ }", "void border(Keywords.BorderSide location, @DelegatesTo(BorderCriterion.class) @ClosureParams(value=FromString.class, options = \"org.modelcatalogue.spreadsheet.query.api.BorderCriterion\") Closure borderConfiguration);", "@Override\n public float getBorderWidth() {\n return mBorderWidth;\n }", "public java.lang.String getBorder()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(BORDER$22);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private void calculateBorder(ArrayList<double[]> contour,\r\n ArrayList<double[]> border) {\r\n\r\n // Circumradius\r\n double circumradius = (sideLength * Math.sqrt(3)) / 3;\r\n\r\n // Reduce the circumradius by the border width\r\n double scaledCircumRadius = circumradius - borderWidth;\r\n\r\n // Make sure the radius never drops below zero\r\n if (scaledCircumRadius < 0)\r\n scaledCircumRadius = 0;\r\n\r\n // Scaling factor\r\n double scale = scaledCircumRadius / circumradius;\r\n\r\n // Scale each vertex of the contour of the whole polygon\r\n for (double[] vertex : contour) {\r\n double[] borderVertex = new double[9];\r\n borderVertex[0] = vertex[0] * scale;\r\n borderVertex[1] = vertex[1] * scale;\r\n border.add(borderVertex);\r\n }\r\n }", "private boolean reachedBorder(Line trajectory) {\n\n boolean reachedBorder = false;\n\n //checking top and bottom borders of the screen\n\n double upperLeftY = this.gameLevel.getBorders()[BOTTOM].getCollisionRectangle().getUpperLeft().getY();\n double lowerLeftY = this.gameLevel.getBorders()[TOP].getCollisionRectangle().getLowerLeft().getY();\n double upperLeftX = this.gameLevel.getBorders()[RIGHT].getCollisionRectangle().getUpperLeft().getX();\n double upperRightX = this.gameLevel.getBorders()[LEFT].getCollisionRectangle().getUpperRight().getX();\n\n if ((this.velocity.getDy() > 0\n && (trajectory.start().getY() >= upperLeftY || equals(trajectory.start().getY(), upperLeftY)))\n || (this.velocity.getDy() < 0 && (trajectory.start().getY() <= lowerLeftY))\n || equals(trajectory.start().getY(), lowerLeftY)) {\n this.velocity.setDy(-this.velocity.getDy());\n reachedBorder = true;\n }\n\n //checking left and right borders of the screen\n if (this.velocity.getDx() > 0\n && (trajectory.start().getX() >= upperLeftX || equals(trajectory.start().getX(), upperLeftX))\n || (this.velocity.getDx() < 0 && (trajectory.start().getX() <= upperRightX))\n || equals(trajectory.start().getX(), upperRightX)) {\n this.velocity.setDx(-this.velocity.getDx());\n reachedBorder = true;\n }\n\n return reachedBorder;\n }", "public final Color getBorderColor() {\n\t\treturn borderColor;\n\t}", "void border(@DelegatesTo(BorderCriterion.class) @ClosureParams(value=FromString.class, options = \"org.modelcatalogue.spreadsheet.query.api.BorderCriterion\") Closure borderConfiguration);", "protected void setBordersFromCell() {\n borderBefore = cell.borderBefore.copy();\n if (rowSpanIndex > 0) {\n borderBefore.normal = BorderSpecification.getDefaultBorder();\n }\n borderAfter = cell.borderAfter.copy();\n if (!isLastGridUnitRowSpan()) {\n borderAfter.normal = BorderSpecification.getDefaultBorder();\n }\n if (colSpanIndex == 0) {\n borderStart = cell.borderStart;\n } else {\n borderStart = BorderSpecification.getDefaultBorder();\n }\n if (isLastGridUnitColSpan()) {\n borderEnd = cell.borderEnd;\n } else {\n borderEnd = BorderSpecification.getDefaultBorder();\n }\n }", "CellStyleCriterion border(Consumer<BorderCriterion> borderConfiguration);", "public BorderInfo getBorderStart() {\n return borderStart.getBorderInfo();\n }", "public int getDOWN_BORDER() {\n\t\treturn DOWN_BORDER;\n\t}", "@Override\n\t\tprotected boolean hasBorder(KrollDict d)\n\t\t{\n\t\t\treturn true;\n\t\t}", "@Test\n public void testBorderVertical() {\n System.out.println(\"borderVertical\");\n int x = 0;\n int y = 0;\n int decks = 0;\n int i = 0;\n int[][] field = null;\n int state = 0; \n instance.borderVertical(x, y, decks, i, field, state);\n \n }", "private void initBorderPositions(int blockX0, int blockY0, int blockWidth, int blockHeight) {\n\t\t// Top\n\t\tborderTopXMin = blockX0;\n\t\tborderTopXMax = blockX0 + blockWidth;\n\t\tborderTopYMin = blockY0;\n\t\tborderTopYMax = blockY0 + DEFAULT_BORDER_WEIGHT;\n\t\t// Right\n\t\tborderRightXMin = blockX0 + blockWidth - DEFAULT_BORDER_WEIGHT;\n\t\tborderRightXMax = blockX0 + blockWidth;\n\t\tborderRightYMin = blockY0;\n\t\tborderRightYMax = blockY0 + blockHeight;\n\t\t// Bottom\n\t\tborderBottomXMin = blockX0;\n\t\tborderBottomXMax = blockX0 + blockWidth;\n\t\tborderBottomYMin = blockY0 + blockHeight - DEFAULT_BORDER_WEIGHT;\n\t\tborderBottomYMax = blockY0 + blockHeight;\n\t\t// Left\n\t\tborderLeftXMin = blockX0;\n\t\tborderLeftXMax = blockX0 + DEFAULT_BORDER_WEIGHT;\n\t\tborderLeftYMin = blockY0;\n\t\tborderLeftYMax = blockY0 + blockHeight;\n\t}", "public int getRIGHT_BORDER() {\n\t\treturn RIGHT_BORDER;\n\t}", "public void testFindBorders() {\n System.out.println(\"findBorders\");\n RasterImage rImage = new RasterImage(20,21);\n int expResult[] = {16777215, 0, 0, 0, 0, 0, 0, 16777215, 16777215,\n 16777215, 16777215, 16777215, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 16777215, 16777215, 16777215, 16777215, 0, 16777215, 16777215, 16777215,\n 16777215, 16777215, 0, 0, 0, 16777215, 16777215, 16777215, 0, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 16777215,\n 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 0,\n 16777215, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 0, 16777215, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 16777215, 16777215, 0, 16777215,\n 16777215, 16777215, 16777215, 16777215, 16777215, 0, 0, 0, 16777215, 0, 0, 0, 16777215,\n 16777215, 16777215, 0, 0, 0, 0, 16777215, 16777215, 0, 0, 0, 0, 0, 0, 0, 0, 16777215,\n 16777215, 16777215, 16777215};\n int pixels[] = {16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,0,0,0,\n 0,0,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,0,0,\n 0,0,0,0,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,0,0,0,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,0,16777215,16777215,16777215,\n 16777215,16777215,16777215,0,0,0,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,16777215,16777215,\n 16777215,0,0,0,0,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,0,0,0,0,0,\n 0,0,0,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,\n 16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215,16777215};\n for(int i=0;i<420;i++){\n int x = i%20;\n int y = i/20;\n rImage.setRGB(x, y, pixels[i]);\n }\n\n\n\n RasterImage result = CutCharacter.findBorders(rImage);\n for(int i=0;i<168;i++)\n assertEquals(expResult[i], result.getRGB(i));\n \n }", "public native PixelPacket getBorderColor() throws MagickException;", "@Nullable\n public Border getBorder() {\n if (mImpl.hasBorder()) {\n return Border.fromProto(mImpl.getBorder());\n } else {\n return null;\n }\n }", "public boolean isSetBorder()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(BORDER$22) != null;\n }\n }", "private void generateBorder() {\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\tif (x == 0 || y == 0 || x == width - 1 || y == height - 1) {\n\t\t\t\t\ttiles[x + y * width] = Tile.darkGrass;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public native int kbAreaGetNumberBorderAreas(int areaID);", "public Border getViewportBorder() {\n/* 571 */ return this.viewportBorder;\n/* */ }", "@Test\n public void testBorderHorizontal() {\n System.out.println(\"borderHorizontal\");\n int x = 0;\n int y = 0;\n int decks = 0;\n int i = 0;\n int[][] field = null;\n int state = 0; \n instance.borderHorizontal(x, y, decks, i, field, state);\n \n }", "public void borders() {\n if (loc.y > height) {\n vel.y *= -bounce;\n loc.y = height;\n }\n if ((loc.x > width) || (loc.x < 0)) {\n vel.x *= -bounce;\n } \n //if (loc.x < 0) loc.x = width;\n //if (loc.x > width) loc.x = 0;\n }", "private void drawBorders(Graphics g) {\n // set the drawing colour\n g.setColor(DEFAULT_BORDER_COLOR);\n\n // draw the upper border\n g.drawLine(DEFAULT_BORDER_GAP, DEFAULT_BORDER_GAP, this.getWidth()-DEFAULT_BORDER_GAP , DEFAULT_BORDER_GAP);\n\n // draw the bottom border\n g.drawLine(DEFAULT_BORDER_GAP, this.getHeight()-DEFAULT_BORDER_GAP, this.getWidth()-DEFAULT_BORDER_GAP ,\n this.getHeight()-DEFAULT_BORDER_GAP);\n\n // draw the left border\n g.drawLine(DEFAULT_BORDER_GAP, DEFAULT_BORDER_GAP, DEFAULT_BORDER_GAP, this.getHeight()-DEFAULT_BORDER_GAP);\n\n // draw the right border\n g.drawLine(this.getWidth()-DEFAULT_BORDER_GAP , DEFAULT_BORDER_GAP , this.getWidth()-DEFAULT_BORDER_GAP,\n this.getHeight()-DEFAULT_BORDER_GAP);\n\n // draw the horizontal internal border\n g.drawLine(DEFAULT_BORDER_GAP, this.getHeight()-25,\n this.getWidth()-textAreaLenght , this.getHeight()-25);\n\n // draw the vertical internal border\n g.drawLine(this.getWidth()-textAreaLenght , DEFAULT_BORDER_GAP ,\n this.getWidth()-textAreaLenght ,this.getHeight()-25 );\n\n }", "public native MagickImage borderImage(Rectangle borderInfo)\n\t\t\tthrows MagickException;", "private static void fillBorders()\n\t{\n\t\tfor(int i=0; i<board.length; i++)\n\t\t{\n\t\t\tif(i==0 || i==board.length-1)\n\t\t\t\tArrays.fill(board[i], Cells.WALL);\n\t\t\telse\n\t\t\t{\n\t\t\t\tboard[i][0]=Cells.WALL;\n\t\t\t\tboard[i][board[i].length-1]=Cells.WALL;\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testContainsBorder() {\n for (final Border border : Border.values()) {\n for (final Border test : Border.values()) {\n final String[] parts = test.toString().split(\"_\");\n for (final String part : parts) {\n final Border contains = Border.valueOf(part);\n if (border.toString().contains(part) || (border == Border.ALL && contains != Border.NONE)) {\n Assert.assertTrue(border + \" should contain \" + contains, border.containsBorder(contains));\n } else {\n Assert.assertFalse(border + \" shouldn't contain \" + contains, border.containsBorder(contains));\n }\n }\n }\n }\n }", "private void createAreaWithBorder(int borderWidth, int borderHeight){\n image.setColor(borderColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n \n image.setColor(backgroundColor);\n image.fillRect(borderWidth, borderHeight, fieldWidth - (borderWidth * 2), fieldHeight - (borderHeight * 2));\n }", "@Test\n public void testBorderOccupied() {\n new Submarine().placeShipAt(0, 0, true, ocean);\n new Submarine().placeShipAt(1, 0, true, ocean);\n new Submarine().placeShipAt(2, 0, true, ocean);\n final String errorMessage = \"Border is not occupied\";\n final int thirdColumn = 3;\n assertTrue(errorMessage, ocean.isBorderOccupied(1, thirdColumn));\n assertTrue(errorMessage, ocean.isBorderOccupied(1, 1));\n assertTrue(errorMessage, ocean.isBorderOccupied(0, 1));\n assertTrue(errorMessage, ocean.isBorderOccupied(0, thirdColumn));\n assertTrue(errorMessage, ocean.isBorderOccupied(0, 2));\n assertTrue(errorMessage, ocean.isBorderOccupied(2, 1));\n assertTrue(errorMessage, ocean.isBorderOccupied(2, thirdColumn));\n assertTrue(errorMessage, ocean.isBorderOccupied(2, 2));\n\n final int eighteenthRow = 18;\n final int tenthColumn = 10;\n new Submarine().placeShipAt(eighteenthRow, tenthColumn, true, ocean);\n\n final int nineColumn = 9;\n assertTrue(errorMessage, ocean.isBorderOccupied(eighteenthRow, nineColumn));\n final int thirteenColumn = 13;\n assertTrue(errorMessage, ocean.isBorderOccupied(eighteenthRow, thirteenColumn));\n }", "IOverlayStyle borderThickness(int thick);", "public Color getScrollBorderColor();", "public boolean isBorderOpaque() {\n // TODO codavaj!!\n return false;\n }", "@Override\n public java.lang.Object getUilBoxBorderColor() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (UIL_BOX_BORDER_COLOR_);\n return (java.lang.Object)retnValue;\n }", "public java.awt.Insets getBorderInsets(java.awt.Component c) {\n // TODO codavaj!!\n return null;\n }", "public TextureBorder getBorderX() {\n return mBorderX;\n }", "public boolean insideBorder(int x, int y) {\r\n\t\treturn insideBorder(x, y, 0);\r\n\t}", "public int sides1() {\n for (int row = 0; row < board.length; row++)\n for (int col = 0; col < board.length; col++) {\n // left-border (excluding corners - check 3 sides only)\n if (row != 0 && row != board.length - 1 && col == 0) {\n if (board[row - 1][col] != null && board[row][col + 1] != null && board[row + 1][col] != null\n && board[row][col] != null)\n if (board[row - 1][col].getPlayerNumber() != board[row][col].getPlayerNumber()\n && board[row - 1][col].getPlayerNumber() != board[row][col].getPlayerNumber() &&\n board[row][col + 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n if (playersArray[board[row][col].getPlayerNumber()] != -3)\n return board[row][col].getPlayerNumber();\n\n }\n // right-border (excluding corners - check 3 sides only)\n if (row != 0 && row != board.length - 1 && col == board.length - 1) {\n if (board[row - 1][col] != null && board[row][col - 1] !=\n null && board[row + 1][col] != null&& board[row][col] != null)\n if (board[row - 1][col].getPlayerNumber() != board[row][col].getPlayerNumber()\n && board[row][col].getPlayerNumber() != board[row+1][col] .getPlayerNumber() &&\n board[row][col - 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n if (playersArray[board[row][col].getPlayerNumber()] != -3)\n return board[row][col].getPlayerNumber();\n }\n // above-border (excluding corners - check 3 sides only)\n if (col != 0 && col != board.length - 1 && row == 0) {\n if (board[row][col - 1] != null && board[row][col + 1] !=\n null && board[row + 1][col] != null&& board[row][col] != null)\n if (board[row][col].getPlayerNumber() == board[row][col + 1].getPlayerNumber()\n && board[row + 1][col].getPlayerNumber() != board[row][col].getPlayerNumber() &&\n board[row][col - 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n if (playersArray[board[row][col].getPlayerNumber()] != -3)\n return board[row][col].getPlayerNumber();\n }\n // bottom-border (excluding corners - check 3 sides only)\n if (col != 0 && col != board.length - 1 && row == board.length - 1) {\n if (board[row][col - 1] != null && board[row][col + 1] != null && board[row - 1][col] != null&&\n board[row][col]!= null)\n if (board[row][col].getPlayerNumber() != board[row][col + 1].getPlayerNumber()\n && board[row - 1][col].getPlayerNumber() != board[row][col].getPlayerNumber() &&\n board[row][col - 1].getPlayerNumber() != board[row][col].getPlayerNumber())\n return board[row][col - 1].getPlayerNumber();\n }\n\n }\n return -2;\n\n }", "public void border() {\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tmaze[x][0] = Block.WALL;\n\t\t\tmaze[x][height - 1] = Block.WALL;\n\t\t}\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tmaze[0][y] = Block.WALL;\n\t\t\tmaze[width - 1][y] = Block.WALL;\n\t\t}\n\t}", "public boolean borderAhead () {\r\n if ( myDirection == NORTH ) {\r\n return getY() == 0;\r\n } else if ( myDirection == EAST ) {\r\n return getX() == getWorld().getWidth() - 1;\r\n } else if ( myDirection == SOUTH ) {\r\n return getY() == getWorld().getHeight() - 1;\r\n } else { // if ( myDirection == WEST ) {\r\n return getX() == 0;\r\n }\r\n }", "public static ZoneBorders forRegion(int regionId) {\r\n\t\tint baseX = ((regionId >> 8) & 0xFF) << 6;\r\n\t\tint baseY = (regionId & 0xFF) << 6;\r\n\t\tint size = 64 - 1;\r\n\t\treturn new ZoneBorders(baseX, baseY, baseX + size, baseY + size);\r\n\t}", "public TextureBorder getBorderY() {\n return mBorderY;\n }", "public boolean withinBorders(int x, int y) {\n\t\treturn\n\t\t\tx >= x1 && x < x2\n\t\t\t&& y >= y1 && y < y2;\n\t}", "private Rect getBorderRect(IEvent event) {\n\n Rect rect = new Rect();\n rect.top = getPositionOfTime(event.getStartTime()) + mTimeHeight / 2 + mSeparateHourHeight + mVerticalBorderHeight;\n rect.bottom = getPositionOfTime(event.getEndTime()) + mTimeHeight / 2 + mSeparateHourHeight + mVerticalBorderHeight;\n rect.left = mHourWidth + mEventMarginLeft;\n rect.right = mHourWidth + mEventMarginLeft + borderWidth;\n\n if (borderArrayList.size() == 0) {\n borderArrayList.add(rect);\n return rect;\n } else {\n Rect modifiedRect = placingEvent(rect, borderArrayList);\n Log.d(\"modified\", modifiedRect + \" modified rect\");\n borderArrayList.add(modifiedRect);\n return modifiedRect;\n }\n\n }", "protected static int checkBorders(int i, int j, byte[][] currentGen){\n \n try{\n return currentGen[i][j];\n }\n catch(ArrayIndexOutOfBoundsException e){\n\n }\n return 0;\n }", "public void updateBotBorder()\n {\n //update bottom border\n for(int i = 0; i<botborder.size(); i++)\n {\n botborder.get(i).update();\n\n //if border is moving off screen, remove it and add a corresponding new one\n if(botborder.get(i).getX()<-25) {\n botborder.remove(i);\n\n\n //determine if border will be moving up or down\n if (botborder.get(botborder.size() - 1).getY() <= height-maxBorderHeight) {\n down = true;\n }\n if (botborder.get(botborder.size() - 1).getY() >= height - minBorderHeight) {\n down = false;\n }\n\n if (down) {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), botborder.get(botborder.size() - 1).getX() + 25, botborder.get(botborder.size() - 1\n ).getY() + 1));\n } else {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder\n ), botborder.get(botborder.size() - 1).getX() + 25, botborder.get(botborder.size() - 1\n ).getY() - 1));\n }\n }\n }\n }", "void setBorder(Color color, int thickness);", "public org.apache.xmlbeans.XmlString xgetBorder()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(BORDER$22);\n return target;\n }\n }", "private int computeVerticalBorderClassCount ()\n {\n int usingBorderCount = 0;\n int usedBorderCount = 0;\n for (String sortedClass : sortedClasses)\n {\n ProjectDependenciesAnalyzer.DependencyInfo info = infos.get (sortedClass);\n double using = info.getNormalizedExtending ();\n if (using < 0.05)\n {\n usingBorderCount++;\n }\n else if (using > 0.95)\n {\n usedBorderCount++;\n }\n }\n return Math.max (usingBorderCount, usedBorderCount);\n }", "public void setInnerBorder(int left, int right, int top, int bottom) {\n GtkEntryOverride.setInnerBorder(this, left, right, top, bottom);\n }", "public void _BorderColor() {\n testProperty(\"BorderColor\", new PropertyTester() {\n protected Object getNewValue(String p, Object old) {\n return utils.isVoid(old) ? new Integer(1234) : null ;\n }\n }) ;\n }", "IOverlayStyle borderOffset(int offset);", "private void setupAllBorderColorViews(){\n allBorderColorViews = new ArrayList<>();\n\n allBorderColorViews.add(hLLRow1);\n allBorderColorViews.add(hLLRow2);\n allBorderColorViews.add(hLLRow3);\n\n if (hLLRow4 != null){\n allBorderColorViews.add(hLLRow4);\n\n // if hLLRow4 is not null, we assume 5 and 6 aren't either\n allBorderColorViews.add(hLLRow5);\n allBorderColorViews.add(hLLRow6);\n }\n }", "private static boolean isCornerTile(Tile tile, Map<Border, List<Tile>> borderMap) {\n int n = 0;\n for (Border border : tile.getBorders()) {\n if (borderMap.get(border).size() == 1) {\n n++;\n }\n }\n return n == 2;\n }", "private void updateBorderSpecs() {\n if(mPolygonShapeSpec.hasBorder()) {\n mBorderPaint.setStrokeWidth(mPolygonShapeSpec.getBorderWidth());\n mBorderPaint.setColor(mPolygonShapeSpec.getBorderColor());\n } else {\n mBorderPaint.setStrokeWidth(0);\n mBorderPaint.setColor(0);\n }\n updatePolygonSize();\n invalidate();\n }", "private void buildCellRowBorder( StringBuffer content, String borderName,\n \t\t\tString cellBorderWidth, String cellBorderStyle,\n \t\t\tString cellBorderColor, int cellWidthValue, String rowBorderWidth,\n \t\t\tString rowBorderStyle, String rowBorderColor, int rowWidthValue )\n \t{\n \t\tboolean bUseCellBorder = true;// true means choose cell's border;\n \t\t// false means choose row's border\n \t\tif ( null == rowBorderStyle )\n \t\t{\n \t\t}\n \t\telse if ( null == cellBorderStyle )\n \t\t{\n \t\t\tbUseCellBorder = false;\n \t\t}\n \t\telse if ( cellBorderStyle.matches( \"hidden\" ) )\n \t\t{\n \t\t}\n \t\telse if ( rowBorderStyle.matches( \"hidden\" ) )\n \t\t{\n \t\t\tbUseCellBorder = false;\n \t\t}\n \t\telse if ( rowBorderStyle.matches( CSSConstants.CSS_NONE_VALUE ) )\n \t\t{\n \t\t}\n \t\telse if ( cellBorderStyle.matches( CSSConstants.CSS_NONE_VALUE ) )\n \t\t{\n \t\t\tbUseCellBorder = false;\n \t\t}\n \t\telse if ( rowWidthValue < cellWidthValue )\n \t\t{\n \t\t}\n \t\telse if ( rowWidthValue > cellWidthValue )\n \t\t{\n \t\t\tbUseCellBorder = false;\n \t\t}\n \t\telse if ( !cellBorderStyle.matches( rowBorderStyle ) )\n \t\t{\n \t\t\tInteger iCellBorderLevel = ( (Integer) borderStyleMap.get( cellBorderStyle ) );\n \t\t\tInteger iRowBorderLevel = ( (Integer) borderStyleMap.get( rowBorderStyle ) );\n \t\t\tif ( null == iCellBorderLevel )\n \t\t\t{\n \t\t\t\tiCellBorderLevel = new Integer( -1 );\n \t\t\t}\n \t\t\tif ( null == iRowBorderLevel )\n \t\t\t{\n \t\t\t\tiRowBorderLevel = new Integer( -1 );\n \t\t\t}\n \n \t\t\tif ( iRowBorderLevel.intValue( ) > iCellBorderLevel.intValue( ) )\n \t\t\t{\n \t\t\t\tbUseCellBorder = false;\n \t\t\t}\n \t\t}\n \n \t\tif ( bUseCellBorder )\n \t\t{\n \t\t\tAttributeBuilder.buildBorder( content,\n \t\t\t\t\tborderName,\n \t\t\t\t\tcellBorderWidth,\n \t\t\t\t\tcellBorderStyle,\n \t\t\t\t\tcellBorderColor );\n \t\t}\n \t\telse\n \t\t{\n \t\t\tAttributeBuilder.buildBorder( content,\n \t\t\t\t\tborderName,\n \t\t\t\t\trowBorderWidth,\n \t\t\t\t\trowBorderStyle,\n \t\t\t\t\trowBorderColor );\n \t\t}\n \t}", "protected void drawBorders(\n // CSOK: ParameterNumber\n final float startx, final float starty, final float width,\n final float height, final BorderProps bpsBefore,\n final BorderProps bpsAfter, final BorderProps bpsStart,\n final BorderProps bpsEnd, final int level) {\n final Rectangle2D.Float borderRect = new Rectangle2D.Float(startx,\n starty, width, height);\n final BorderProps bpsTop = bpsBefore;\n final BorderProps bpsBottom = bpsAfter;\n BorderProps bpsLeft;\n BorderProps bpsRight;\n if (level == -1 || (level & 1) == 0) {\n bpsLeft = bpsStart;\n bpsRight = bpsEnd;\n } else {\n bpsLeft = bpsEnd;\n bpsRight = bpsStart;\n }\n drawBorders(borderRect, bpsTop, bpsBottom, bpsLeft, bpsRight);\n }", "public int getBorderColor() {\n if (getFieldState() != BaseField.FieldState.ENABLE || !this.mEditText.hasFocus()) {\n return super.getBorderColor();\n }\n return Color.parseColor(\"#394b65\");\n }", "public static int[] addRectangleBorder(final List<DoubleList> output, final double x, final double y, final double width, final double height, final Border border,\n final double thickness) {\n if (border == Border.ALL) {\n return VboUtil.addRectangleBorder(output, x, y, width, height, thickness);\n }\n final IntList modes = new ArrayIntList(8);\n // calculate the metrics\n final double xLeft = x - (width * 0.5);\n final double xRight = x + (width * 0.5);\n final double yBottom = y - (height * 0.5);\n final double yTop = y + (height * 0.5);\n // verts\n final double verts[][] = new double[4][];\n // top\n if (border.isTop()) {\n verts[0] = new double[]{xLeft, yTop};\n verts[1] = new double[]{xLeft, yTop + thickness};\n verts[2] = new double[]{xRight, yTop + thickness};\n verts[3] = new double[]{xRight, yTop};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // bottom\n if (border.isBottom()) {\n verts[0] = new double[]{xLeft, yBottom - thickness};\n verts[1] = new double[]{xLeft, yBottom};\n verts[2] = new double[]{xRight, yBottom};\n verts[3] = new double[]{xRight, yBottom - thickness};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // left\n if (border.isLeft()) {\n verts[0] = new double[]{xLeft - thickness, yBottom};\n verts[1] = new double[]{xLeft - thickness, yTop};\n verts[2] = new double[]{xLeft, yTop};\n verts[3] = new double[]{xLeft, yBottom};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // right\n if (border.isRight()) {\n verts[0] = new double[]{xRight, yBottom};\n verts[1] = new double[]{xRight, yTop};\n verts[2] = new double[]{xRight + thickness, yTop};\n verts[3] = new double[]{xRight + thickness, yBottom};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // upper left corner\n if (border.isLeft() && border.isTop()) {\n verts[0] = new double[]{xLeft - thickness, yTop};\n verts[1] = new double[]{xLeft - thickness, yTop + thickness};\n verts[2] = new double[]{xLeft, yTop + thickness};\n verts[3] = new double[]{xLeft, yTop};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // upper right corner\n if (border.isRight() && border.isTop()) {\n verts[0] = new double[]{xRight, yTop};\n verts[1] = new double[]{xRight, yTop + thickness};\n verts[2] = new double[]{xRight + thickness, yTop + thickness};\n verts[3] = new double[]{xRight + thickness, yTop};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // lower left corner\n if (border.isLeft() && border.isBottom()) {\n verts[0] = new double[]{xLeft - thickness, yBottom - thickness};\n verts[1] = new double[]{xLeft - thickness, yBottom};\n verts[2] = new double[]{xLeft, yBottom};\n verts[3] = new double[]{xLeft, yBottom - thickness};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n // lower right corner\n if (border.isRight() && border.isBottom()) {\n verts[0] = new double[]{xRight, yBottom - thickness};\n verts[1] = new double[]{xRight, yBottom};\n verts[2] = new double[]{xRight + thickness, yBottom};\n verts[3] = new double[]{xRight + thickness, yBottom - thickness};\n final ArrayDoubleList vertices = new ArrayDoubleList(12);\n output.add(vertices);\n modes.add(addPolygon(vertices, verts));\n }\n return modes.toArray();\n }", "public Vector[] getCorners() {\n\t\treturn new Vector[] { this.topLeft, this.topRight, this.botLeft, this.botRight };\n\t}", "public Pair<Queue<BaseSingle>, boolean[][]> getBorderTroops() {\n Queue<BaseSingle> borderTroops = new LinkedList<>();\n boolean[][] inDanger = new boolean[depth][width];\n int i = 0;\n int j = 0;\n\n // First, scan the first line.\n BaseSingle troop;\n boolean oneLineLeft = false;\n for (j = 0; j < width; j++) {\n troop = aliveTroopsFormation[i][j];\n if (troop != null) {\n borderTroops.add(troop);\n inDanger[i][j] = true;\n } else {\n oneLineLeft = true;\n }\n }\n if (oneLineLeft) return new Pair<>(borderTroops, inDanger);\n\n // Then scan downward from both sides\n int heightLeft = 0;\n int heightRight = 0;\n BaseSingle troopLeft;\n BaseSingle troopRight;\n for (i = 1; i < depth; i++) {\n troopLeft = aliveTroopsFormation[i][0];\n troopRight = aliveTroopsFormation[i][width - 1];\n if (troopLeft != null) {\n borderTroops.add(troopLeft);\n heightLeft += 1;\n inDanger[i][0] = true;\n }\n if (troopRight != null) {\n borderTroops.add(troopRight);\n heightRight += 1;\n inDanger[i][width - 1] = true;\n }\n if (troopLeft == null || troopRight == null) break;\n }\n\n // Last line\n int lastLine = Math.min(heightLeft, heightRight);\n if (lastLine == depth - 1) {\n for (j = 1; j < width - 1; j++) {\n inDanger[lastLine][j] = true;\n borderTroops.add(aliveTroopsFormation[lastLine][j]);\n }\n } else {\n for (j = 1; j < width - 1; j++) {\n if (aliveTroopsFormation[lastLine + 1][j] == null) {\n inDanger[lastLine][j] = true;\n borderTroops.add(aliveTroopsFormation[lastLine][j]);\n } else {\n inDanger[lastLine + 1][j] = true;\n borderTroops.add(aliveTroopsFormation[lastLine + 1][j]);\n }\n }\n }\n return new Pair<>(borderTroops, inDanger);\n }", "public double getBorderSafeZone()\n {\n return borderSafeZone;\n }", "private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int width, int height)\r\n/* 89: */ {\r\n/* 90:133 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 91: */ \r\n/* 92: */ \r\n/* 93:136 */ g2.drawRect(x, y, width, height);\r\n/* 94: */ }", "void render(Rectangle borders);" ]
[ "0.74957424", "0.7486708", "0.7023304", "0.6870789", "0.68567467", "0.6834558", "0.68152624", "0.67722535", "0.6767088", "0.6711719", "0.66726524", "0.66575754", "0.665691", "0.66431475", "0.6580129", "0.6563471", "0.6558236", "0.6555043", "0.65522593", "0.65510255", "0.654953", "0.6547923", "0.6530156", "0.65173143", "0.6491103", "0.6485297", "0.64481354", "0.64269274", "0.64220804", "0.6404483", "0.6392691", "0.6392025", "0.6391711", "0.63764286", "0.6368728", "0.6366524", "0.6331892", "0.6315112", "0.63139546", "0.62306577", "0.6230392", "0.6204018", "0.6203026", "0.6190443", "0.617564", "0.6167231", "0.6141788", "0.6136804", "0.6120475", "0.6112107", "0.61041296", "0.6102399", "0.6094283", "0.60846686", "0.6025326", "0.60252064", "0.60100806", "0.5992964", "0.5968942", "0.5968572", "0.5932889", "0.5923591", "0.59097177", "0.5907218", "0.59063715", "0.58982724", "0.58802634", "0.58592504", "0.5855317", "0.58328325", "0.5830994", "0.5807216", "0.58013964", "0.5790053", "0.5789427", "0.5773649", "0.57608217", "0.5738939", "0.5734915", "0.5704535", "0.57030344", "0.569857", "0.56907386", "0.5659475", "0.564978", "0.56465614", "0.56354135", "0.5631547", "0.56211495", "0.56191945", "0.5597597", "0.55961925", "0.5593181", "0.55790496", "0.55785406", "0.55741787", "0.5572762", "0.5571617", "0.5564041", "0.5552526" ]
0.65827465
14
This method adds the indicator.
private void addIndicators() { ScoreIndicator scoreIndicator = new ScoreIndicator(this.score); scoreIndicator.addToGame(this); LivesIndicator livesIndicator = new LivesIndicator(this.numberOfLives); livesIndicator.addToGame(this); NameLevelIndicator nameLevel = new NameLevelIndicator(info); nameLevel.addToGame(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addIndicator() {\n createIndicator(mCurrentAdapterSize);\n mViewPager.setCurrentItem(mViewPager.getAdapter().getCount() - 1);\n }", "public org.dhis2.ns.schema.dxf2.IndicatorRefDocument.IndicatorRef addNewIndicatorRef()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.dhis2.ns.schema.dxf2.IndicatorRefDocument.IndicatorRef target = null;\n target = (org.dhis2.ns.schema.dxf2.IndicatorRefDocument.IndicatorRef)get_store().add_element_user(INDICATORREF$0);\n return target;\n }\n }", "private void createIndicator(int tag) {\n\n LayoutParams params;\n int color;\n if (tag == mCurrentlySelectedIndicator) {\n params = mParamsSelected;\n color = mColorSelected;\n } else {\n params = mParamsDeselected;\n color = mColorDeselected;\n }\n\n // Create indicator view\n View indicator = new View(mContext);\n indicator.setTag(tag);\n\n // Set params\n indicator.setLayoutParams(params);\n\n // Set indicator color\n setColor(indicator, color);\n\n // Add it to the view\n addView(indicator);\n }", "public void updateLorenzoIndicator(int indicator){\n\n }", "public Indicator() {\n }", "public org.dhis2.ns.schema.dxf2.IndicatorRefDocument.IndicatorRef insertNewIndicatorRef(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.dhis2.ns.schema.dxf2.IndicatorRefDocument.IndicatorRef target = null;\n target = (org.dhis2.ns.schema.dxf2.IndicatorRefDocument.IndicatorRef)get_store().insert_element_user(INDICATORREF$0, i);\n return target;\n }\n }", "public org.dhis2.ns.schema.dxf2.IndicatorGroupDocument.IndicatorGroup addNewIndicatorGroup()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.dhis2.ns.schema.dxf2.IndicatorGroupDocument.IndicatorGroup target = null;\n target = (org.dhis2.ns.schema.dxf2.IndicatorGroupDocument.IndicatorGroup)get_store().add_element_user(INDICATORGROUP$0);\n return target;\n }\n }", "private void updateIndicator()\n\t{\n\t\tLogger.D(TAG, \"updateIndicator+\");\n\t\tif(batteryView != null)\n\t\t{\n\t\t\tbatteryView.setPowerState(batteryLevel, isPowerConnected);\n\t\t}\n\t\tLogger.D(TAG, \"updateIndicator-\");\n\t}", "@Override\r\n\tpublic void updateIndicator(int num, int current) {\n\t\tif (num >= 0 && current >= 0 && current < num && mIndicator != null) {\r\n\t\t\tmIndicator.setTotal(num);\r\n\t\t\tmIndicator.setCurrent(current);\r\n\t\t}\r\n\t}", "@Override\n public void updateLorenzoIndicator(int i) {\n\n }", "public TextView getIndicator() {\n return mIndicator;\n }", "private void createIndicators() {\n this.removeAllViews();\n int n = this.mViewpager.getAdapter().getCount();\n if (n > 0) {\n int n2 = this.mViewpager.getCurrentItem();\n int n3 = this.getOrientation();\n for (int i = 0; i < n; ++i) {\n if (n2 == i) {\n this.addIndicator(n3, this.mIndicatorBackgroundResId, this.mImmediateAnimatorOut);\n continue;\n }\n this.addIndicator(n3, this.mIndicatorUnselectedBackgroundResId, this.mImmediateAnimatorIn);\n }\n }\n }", "public boolean isIndicatorVisible() {\n return isIndicatorVisible;\n }", "private void createStatusIndicator(GridBagConstraints gridBagConstraint) {\r\n statusIndicator.setBorder(BorderFactory.createEmptyBorder(30, 10, 10, 10));\r\n statusIndicator.setBounds(100, 200, 50, 80);\r\n statusIndicator.setBackground(Color.decode(ServerConstants.COLOR_CODE));\r\n gridBagConstraint.fill = GridBagConstraints.HORIZONTAL;\r\n gridBagConstraint.weightx = 1;\r\n gridBagConstraint.gridx = 1;\r\n gridBagConstraint.gridy = 1;\r\n gridBagConstraint.ipady = 0;\r\n gridBagConstraint.insets = new Insets(0, 0, 0, 0);\r\n add(statusIndicator, gridBagConstraint);\r\n }", "public void setCurrentRecordIndicator(boolean value) {\n this.currentRecordIndicator = value;\n }", "public void setCurrentRecordIndicator(boolean value) {\n this.currentRecordIndicator = value;\n }", "public void setOperationalIndicator(Character aOperationalIndicator) {\n operationalIndicator = aOperationalIndicator;\n }", "private void addIndicator(int n, int n2, Animator animator2) {\n if (animator2.isRunning()) {\n animator2.end();\n animator2.cancel();\n }\n View view = new View(this.getContext());\n view.setBackgroundResource(n2);\n this.addView(view, this.mIndicatorWidth, this.mIndicatorHeight);\n LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams)view.getLayoutParams();\n if (n == 0) {\n layoutParams.leftMargin = this.mIndicatorMargin;\n layoutParams.rightMargin = this.mIndicatorMargin;\n } else {\n layoutParams.topMargin = this.mIndicatorMargin;\n layoutParams.bottomMargin = this.mIndicatorMargin;\n }\n view.setLayoutParams((ViewGroup.LayoutParams)layoutParams);\n animator2.setTarget((Object)view);\n animator2.start();\n }", "@Override\n\tpublic void setRequiredIndicatorVisible(boolean requiredIndicatorVisible) {\n\t\t\n\t}", "private int getNextIndicator() throws IOException {\n if (this.indicator == 0) {\n this.indicator = in.read();\n }\n return this.indicator;\n }", "private void removeIndicator() {\n\n int indicatorToRemove;\n\n if (mCurrentlySelectedIndicator == mCurrentAdapterSize - 1) {\n indicatorToRemove = mCurrentlySelectedIndicator - 1;\n } else {\n indicatorToRemove = mCurrentlySelectedIndicator + 1;\n }\n\n // Remove from view\n View view = getChildAt(indicatorToRemove);\n if (view != null) {\n removeView(view);\n }\n }", "public void emitIadd() {\n\t\tlines.append(\"iadd\\n\");\n\t}", "public void addInterest() {\n\t\tdouble interest = getBalance() * interestRate / 100;\n\t\tdeposit(interest);\n\t}", "public ScoreIndicator(Counter score) {\r\n this.score = score;\r\n }", "public void showInteractIndicator() {\n if (interactIndicator == null) {\n interactIndicator = new EntityAnimated();\n interactIndicator.addAnimation(\"flash\", new SpriteAnimation(\"Menu/Tutorial/E to interact.png\", 0, 0, 50, 50, 1, 2, 1, 1, 1));\n interactIndicator.setCurrentAnimation(\"flash\");\n interactIndicator.setLayer(9);\n interactIndicator.setPosition(x + width / 2 - 25, y - 60);\n room.addEntity(interactIndicator);\n }\n }", "public void drawAngleIndicator(){\n\t\tfloat bottomLineHyp = 60;\n\t\tfloat topLineHyp = 100;\n\t\t\n\t\tfloat bottomXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\tfloat bottomYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * bottomLineHyp);\n\t\t\n\t\tfloat bottomX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale()) / 2 ) + bottomXCoord;\n\t\tfloat bottomY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale()) / 2 ) + bottomYCoord ;\n\t\t\n\t\tfloat topXCoord = (float) ((Math.cos(Math.toRadians(angle) ) ) * topLineHyp);\n\t\tfloat topYCoord = (float) ((Math.sin(Math.toRadians(angle) ) ) * topLineHyp);\n\t\t\n\t\tfloat topX = Player.getxPlayerLoc() + ((Player.getPlayerImage().getWidth() * Player.getPlayerScale() ) / 2 ) + topXCoord;\n\t\tfloat topY = Player.getyPlayerLoc() + ((Player.getPlayerImage().getHeight() * Player.getPlayerScale() ) / 2 ) + topYCoord;\n\t\t\n\t\tShapeRenderer shape = new ShapeRenderer();\n\t\tshape.setColor(Color.BLACK);\n\t\tshape.begin(ShapeType.Line);\n\t\tshape.line(bottomX, bottomY, topX, topY);\n\t\tshape.end();\n\t}", "public interface Indicator {\n\n void onMove(float distance, float offset);\n\n void onHold();\n\n void reset();\n\n int getState();\n\n void setState(int state);\n\n}", "public boolean isValidIndicator() {\r\n return validIndicator;\r\n }", "@Override\r\n\tvoid indicators() {\n\t\tSystem.out.println(\"general indicators\");\r\n\t}", "public IndicatorExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "private void addButton() {\n // do not show warning messages in IMR gui bean. this is needed\n // so that warning messages for site parameters are not shown when Add graph is clicked\n imrGuiBean.showWarningMessages(false);\n try{\n calc = new HazardCurveCalculator();\n }catch(Exception e){\n e.printStackTrace();\n }\n // check if progress bar is desired and set it up if so\n if(this.progressCheckBox.isSelected()) {\n Thread t = new Thread(this);\n t.start();\n\n timer = new Timer(200, new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n try{\n if(calc.getCurrRuptures()!=-1){\n progressClass.updateProgress(numSA_PeriodValDone,numSA_PeriodVals);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n if(isIndividualCurves) {\n drawGraph();\n //isIndividualCurves = false;\n }\n if (hazCalcDone) {\n timer.stop();\n progressClass.dispose();\n drawGraph();\n }\n }\n });\n\n // timer for disaggregation progress bar\n /*disaggTimer = new Timer(500, new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if(disaggCalc.getCurrRuptures()!=-1)\n disaggProgressClass.updateProgress(disaggCalc.getCurrRuptures(), disaggCalc.getTotRuptures());\n if (disaggCalc.done()) {\n // Toolkit.getDefaultToolkit().beep();\n disaggTimer.stop();\n disaggProgressClass.dispose();\n }\n }\n });*/\n }\n else {\n this.computeHazardCurve();\n this.drawGraph();\n }\n }", "public void addLabel()\r\n {\r\n LabelFigure label = new LabelFigure();\r\n this.labels.add(label);\r\n add(label);\r\n }", "private void addLine(ImageIcon imageIcon, JPanel container, String label, int quantity, GridBagConstraints gbc, boolean criterion, boolean intertitle, Color foreground, boolean practice, boolean disableCheckbox){\r\n\t\taddLine(imageIcon, container, label, new JLabel(quantity+\"\",javax.swing.SwingConstants.CENTER), gbc, criterion, intertitle, foreground, practice, disableCheckbox);\r\n\t}", "protected void add() {\n\t\tfinal float previous = value;\n\t\tvalue = Math.min(max, value + incrementStep);\n\n\t\tif (value != previous) {\n\t\t\tupdateAndAlertListener();\n\t\t}\n\n\t\treturn;\n\t}", "public void setValidIndicator(boolean validIndicator) {\r\n this.validIndicator = validIndicator;\r\n }", "public RenkoIndicator(TimeSeries series) {\r\n\t\tsuper(series);\r\n\t\tthis.series = series;\r\n\t}", "ISlot add(ISlot newEntry);", "public void addInterest() {}", "void addArrow() {\n Drawer.getInstance().addElem(this);\n Drawer.getInstance().addElem(triangle);\n }", "@Schema(description = \"Indicates the name of indicator which crossed the threshold.\")\n\n\tpublic String getIndicatorName() {\n\t\treturn indicatorName;\n\t}", "private void addTab(String label, int drawableId, Intent i) {\n \tTabHost.TabSpec spec = tabHost.newTabSpec(label);\r\n \tView tabIndicator = LayoutInflater.from(this).inflate(R.layout.tabs, getTabWidget(), false);\r\n \tTextView title = (TextView) tabIndicator.findViewById(R.id.title);\r\n \ttitle.setText(label);\r\n// \tImageView icon = (ImageView) tabIndicator.findViewById(R.id.icon);\r\n// \ticon.setImageResource(drawableId);\r\n \tspec.setIndicator(tabIndicator).setContent(i);\r\n \ttabHost.addTab(spec);\r\n }", "private void displayLoadingIndicator(Boolean displayIndicator){\n Log.d(LOG_TAG, \"displayLoadingIndicator() => \" + displayIndicator);\n if (displayIndicator){\n /* Display the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n } else {\n /* Hide the loading indicator */\n mLoadingIndicator.setVisibility(View.INVISIBLE);\n }\n }", "public Character getOperationalIndicator() {\n return operationalIndicator;\n }", "public void setCvIndicator(java.lang.String cvIndicator) {\r\n this.cvIndicator = cvIndicator;\r\n }", "private void showIndicator() {\n mProgressBarHolder.setVisibility(View.VISIBLE);\n mEmailView.setFocusableInTouchMode(false);\n mEmailView.setFocusable(false);\n mEmailView.setEnabled(false);\n mPasswordView.setFocusableInTouchMode(false);\n mPasswordView.setFocusable(false);\n mPasswordView.setEnabled(false);\n mRegister.setEnabled(false);\n mEmailSignInButton.setEnabled(false);\n }", "public void createCurrentPlayerIndicator()\n\t{\n\t\tcurrentPlayerTextbox = guiFactory.createTextBox();\n\t\t\n\t\tVector2 textBoxSize = new Vector2(200, 50);\n\t\t\n\t\t\n\t\tcurrentPlayerTextbox.setBounds(new Vector2((Constants.windowWidth / 2) - (textBoxSize.x / 2), \n\t\t\t\t\t\t\t\t\t\t\t\t\tConstants.windowHeight - textBoxSize.y), \n\t\t\t\t\t\t\t\t\t\t\t\t\ttextBoxSize);\n\t\t\n\t\tsetCurrentPlayerIndicator(1);\n\t}", "public void add_interest ()\r\n {\r\n\r\n balance += balance * (rate + BONUS_RATE);\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"Current Balance: \" + balance);\r\n System.out.println();\r\n\r\n }", "public void setIndicatorGap(float gap) {\n this.gap = gap;\n invalidate();\n }", "boolean isMarkedIndicator();", "public ScGridColumn<AcUpuTagSummaryVo> newInsuredOrRegisteredIndicatorColumn()\n {\n return newInsuredOrRegisteredIndicatorColumn(\"Insured Or Registered Indicator\");\n }", "public void setIndicative(String string) {\n\t\t\r\n\t}", "public long getModificationIndicator()\n {\n return m_nIndicator;\n }", "protected void addLabel(AeIconLabel aLabel) {\r\n }", "@Override\n\tpublic boolean isRequiredIndicatorVisible() {\n\t\treturn false;\n\t}", "public void aggiungiAnimale(Animale inputAnimale){\r\n\t\tanimali.add(inputAnimale);\r\n\t}", "public void addOverlay(IOverlay ovl) {\r\n\t\tSystem.out.println(\"OverlayManager: Adding overlay \" + ovl.toString() );\r\n\t\toverlays.add(ovl);\r\n\t}", "public void setProgressIndicator(ProgressIndicator progressIndicator) {\n this.progressIndicator = progressIndicator;\n }", "public void addEnumerateCallback(OctaveReference listener) {\n\t\tlistenerEnumerate.add(listener);\n\t}", "private void fireOnIndicatorDataEvent(List<TargetIndicator> indicators) {\n \t\tif(!facade.getApplicationStateManager()\r\n \t\t\t\t.getApplicationState().equals(ApplicationState.LOADING_INDICATORS)) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t\r\n \t\tIterator<IndicatorDataListener> it = this.indicatorDataListeners.iterator();\r\n \t\t\r\n \t\twhile(it.hasNext()) {\r\n \t\t\tit.next().onIndicatorData(indicators);\r\n \t\t}\r\n \t}", "public void addPOI(POI poi)\n\t{\n\t\tmProcessor.addPOI(poi);\n\t}", "public void setDeletionIndicator(\n @Nullable\n final Boolean deletionIndicator) {\n rememberChangedField(\"DeletionIndicator\", this.deletionIndicator);\n this.deletionIndicator = deletionIndicator;\n }", "public UrlSigningParamIdentifier withParamIndicator(ParamIndicator paramIndicator) {\n this.paramIndicator = paramIndicator;\n return this;\n }", "public void increment() { this.progressBar.setValue(++this.progressValue); }", "public void MakeLine() {\n\t\tLineButton = new JButton(\n\t\t\t\tnew ImageIcon(getClass().getResource(GetLineChartImage())));\n\t\tLineButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\t\n\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\"Line Chart\", \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}else {\n\t\t\t\t\tGetHost().LeftPanelContent(new LineChart(\n\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\tGetHost().GetColourScheme(),GetHost()));\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(LineButton);\n\t}", "public void addBalance()\n\t\t{\n\t\t\tthis.setBalance_acc2(this.getBalance_acc2() + this.getTemp_d_acc2());\n\t\t}", "private void addLine()\n\t{\n\t\tlines.add(printerFormatter.markEOL());\n\t}", "public void visit(IncrementDesignatorAddition incrementDesignatorAddition)\n {\n processIncrementDecrement(Code.add);\n }", "public Builder addProgress(int value) {\n ensureProgressIsMutable();\n progress_.add(value);\n onChanged();\n return this;\n }", "public Builder addProgress(int value) {\n ensureProgressIsMutable();\n progress_.add(value);\n onChanged();\n return this;\n }", "public Builder addProgress(int value) {\n ensureProgressIsMutable();\n progress_.add(value);\n onChanged();\n return this;\n }", "org.hl7.fhir.ObservationStatus addNewStatus();", "@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}", "void add(Control control);", "public void addInterest(TXSemanticTag interest);", "public long startCalculation() {\r\n WebProgressBar pb = new WebProgressBar();\r\n pb.setStringPainted(true);\r\n panel.add(pb);\r\n progressBarMap.put(id, pb);\r\n return id++;\r\n }", "public synchronized void addAnimation(AnimationBase a) {\n addAnimation(a, 1);\n }", "public void addValue() {\n addValue(1);\n }", "public void addDotIndicator(int position){\n Dots = new TextView[sliderAdapter.getCount()];\n DotLayout.removeAllViews();\n\n for(int i = 0; i < sliderAdapter.getCount(); i++){\n Dots[i] = new TextView(this);\n Dots[i].setText(Html.fromHtml(\"&#8226;\"));\n Dots[i].setTextColor(getResources().getColor(i == position?\n R.color.white : R.color.nonOpaqueWhite,\n null));\n Dots[i].setTextSize(35);\n\n DotLayout.addView(Dots[i]);\n }\n }", "@JSProperty(\"currentDateIndicator\")\n void setCurrentDateIndicator(boolean value);", "public void addArrowHead(boolean value) {\n if (value) {\n setArrowHead(new OMArrowHead(OMArrowHead.ARROWHEAD_DIRECTION_FORWARD, 100));\n } else {\n arrowhead = null;\n }\n }", "public void add(Double addedAmount) {\n }", "public CalcIndicatorAccRecordInstance() {\n this(DSL.name(\"calc_indicator_acc_record_instance\"), null);\n }", "@Override\n public String getAjaxIndicatorMarkupId() {\n return \"veil\";\n }", "public void setCurrentIndicatorData(Collection<IndicatorData> data)\n {\n indicatorDataMap = data.stream().collect(Collectors.toMap(IndicatorData::getCountryCode, Function.identity()));\n }", "private Line addLine() {\n\t\t// Create a new line\n\t\tLine line = new Line(doily.settings.getPenScale(), \n\t\t\t\tdoily.settings.getPenColor(), doily.settings.isReflect());\n\t\tdoily.lines.add(line);\n\t\treturn line;\n\t}", "public void add_interest () \r\n {\r\n balance += balance * rate;\r\n System.out.println (\"Interest added to account: \" + account);\r\n System.out.println (\"Current Balance: \" + balance);\r\n System.out.println();\r\n\r\n }", "private void add() {\n\n\t}", "public boolean isCurrentRecordIndicator() {\n return currentRecordIndicator;\n }", "public boolean isCurrentRecordIndicator() {\n return currentRecordIndicator;\n }", "public final void addInterest( final String tag ) {\n Log.d( TAG, \"Adding interest for '\" + tag + \"'.\" );\n\n this.interestList.add(tag);\n\n final D2DAddInterestNotificationEvent event = new D2DAddInterestNotificationEvent( true );\n event.interestList.add( tag );\n this.sendEvent( event );\n }", "private void checkIndicatorConfig(Context context) {\n int n = this.mIndicatorWidth < 0 ? this.dip2px(5.0f) : this.mIndicatorWidth;\n this.mIndicatorWidth = n;\n n = this.mIndicatorHeight < 0 ? this.dip2px(5.0f) : this.mIndicatorHeight;\n this.mIndicatorHeight = n;\n n = this.mIndicatorMargin < 0 ? this.dip2px(5.0f) : this.mIndicatorMargin;\n this.mIndicatorMargin = n;\n n = this.mAnimatorResId == 0 ? R.animator.scale_with_alpha : this.mAnimatorResId;\n this.mAnimatorResId = n;\n this.mAnimatorOut = this.createAnimatorOut(context);\n this.mImmediateAnimatorOut = this.createAnimatorOut(context);\n this.mImmediateAnimatorOut.setDuration(0L);\n this.mAnimatorIn = this.createAnimatorIn(context);\n this.mImmediateAnimatorIn = this.createAnimatorIn(context);\n this.mImmediateAnimatorIn.setDuration(0L);\n n = this.mIndicatorBackgroundResId == 0 ? R.drawable.white_radius : this.mIndicatorBackgroundResId;\n this.mIndicatorBackgroundResId = n;\n n = this.mIndicatorUnselectedBackgroundResId == 0 ? this.mIndicatorBackgroundResId : this.mIndicatorUnselectedBackgroundResId;\n this.mIndicatorUnselectedBackgroundResId = n;\n }", "public abstract void addProgressComponents (Container panel);", "public void addNotify()\n {\n super.addNotify();\n\t\n ib = createImage(width,height);\n ig = ib.getGraphics(); \n }", "public void setPrimaryPrintIndicator(java.lang.String param){\n localPrimaryPrintIndicatorTracker = true;\n \n this.localPrimaryPrintIndicator=param;\n \n\n }", "public void addLines(){\n\t\tif (controlPoints.size() == 1) return;\n\t\t\n\t\tif (lineLists.size() < controlPoints.size()-1){\n\t\t lineLists.add(new LinkedList<Line>());\n\t\t}\n\t\t\n\t\t\n\t\tint numControlLines = controlPoints.size() - 1;\n\t\t\n\t\tfor (int i = 0; i < numControlLines; i++){\n\t\t\tLine line = new Line();\n\t\t\tif (i == 0){\n\t\t\t\tline.setStroke(Color.LIGHTGRAY);\n\t\t\t\tline.setStrokeWidth(2);\n\t\t\t\tline.setVisible(showPrimaryLines);\n\t\t\t\tpane.getChildren().add(line);\n\t\t\t\tline.toBack();\n\t\t\t} else {\n\t\t\t\tdouble hue = 360 * (((i-1)%controlPoints.size())/(double)controlPoints.size());\n\t\t\t\tdouble sat = .4;\n\t\t\t\tdouble bri = .8;\n\t\t\t\tline.setStroke(Color.hsb(hue, sat, bri));\n\t\t\t\tline.setStrokeWidth(2);\n\t\t\t\tline.setVisible(showSubLines);\n\t\t\t\tpane.getChildren().add(line);\n\t\t\t}\n\t\t\tLinkedList<Line> list = lineLists.get(i);\n\t\t\tlist.add(line);\n\t\t}\n\t}", "public void setDamageIndicatorPos(int x) {\n this.damageIndicator = new DamageIndicator(\n x, \n DamageIndicator.RADIUS*2);\n }", "private void addFeature()\r\n {\r\n MapGeometrySupport mgs = myCurrentGeometryHandler.getGeometry();\r\n MetaDataProvider mdp = myMetaDataHandler.getMetaDataProvider();\r\n TimeSpan span = buildTimeSpan(mdp);\r\n mgs.setTimeSpan(span);\r\n MapDataElement element = new DefaultMapDataElement(myFeatureId, span, myType, mdp, mgs);\r\n Color typeColor = myType.getBasicVisualizationInfo().getTypeColor().equals(DEFAULT_FEATURE_COLOR) ? myFeatureColor\r\n : myType.getBasicVisualizationInfo().getTypeColor();\r\n element.getVisualizationState().setColor(typeColor);\r\n myConsumer.addFeature(element);\r\n myFeatureCount++;\r\n }", "@Override\n public void visitIINC(IINC obj) {\n int v = obj.getIndex();\n int amount = obj.getIncrement();\n ConstantFrame f = getFrame();\n Constant c = f.getValue(v);\n if (c.isConstantInteger())\n f.setValue(v, new Constant(c.getConstantInt() + amount));\n else\n f.setValue(v, Constant.NOT_CONSTANT);\n // System.out.println(\"after iinc: \" + getFrame());\n }", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar, \"pbLoadingAuctionSaleList\");\n progressBar.setVisibility(0);\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLoadingAuctionSaleList);\n Intrinsics.checkExpressionValueIsNotNull(progressBar2, \"pbLoadingAuctionSaleList\");\n progressBar2.setVisibility(8);\n }", "public void addDotsIndicator(int position){\n\n slider_dots = new TextView[3];\n dotLayout.removeAllViews();\n\n for(int i = 0; i < slider_dots.length; i++){\n slider_dots[i] = new TextView(this);\n slider_dots[i].setText(Html.fromHtml(\"&#8226;\"));\n slider_dots[i].setTextSize(35);\n slider_dots[i].setTextColor(getResources().getColor(R.color.colorTransparentWhite));\n\n dotLayout.addView(slider_dots[i]);\n }\n\n if(slider_dots.length > 0){\n slider_dots[position].setTextColor(getResources().getColor(R.color.colorWhite));\n }\n }" ]
[ "0.7300717", "0.66731703", "0.6120876", "0.60439914", "0.60084623", "0.5986085", "0.58013767", "0.57604414", "0.57098687", "0.5699243", "0.56783277", "0.5583183", "0.55372965", "0.55095065", "0.5496926", "0.5496926", "0.5492708", "0.5441256", "0.54383165", "0.53942794", "0.53768915", "0.53155816", "0.5259287", "0.52447605", "0.5237793", "0.5215021", "0.51924914", "0.5170567", "0.5132317", "0.51091075", "0.50453544", "0.49916342", "0.49317214", "0.49110147", "0.48885804", "0.48804387", "0.48539138", "0.48400834", "0.4811832", "0.4807555", "0.47945523", "0.47928256", "0.47903642", "0.47839203", "0.4779575", "0.47778365", "0.4764322", "0.4758912", "0.4758889", "0.47579676", "0.47457823", "0.47428957", "0.47332814", "0.47330415", "0.47329777", "0.47261265", "0.47091398", "0.4703731", "0.46768847", "0.46607482", "0.46480718", "0.46473548", "0.464586", "0.4636738", "0.46330523", "0.46230683", "0.46179548", "0.46010378", "0.46010378", "0.46010378", "0.45964515", "0.45957574", "0.45914924", "0.45911026", "0.45722207", "0.45712638", "0.45662695", "0.4560782", "0.45584327", "0.45557714", "0.45509428", "0.45500436", "0.45482588", "0.45426443", "0.4542228", "0.45323205", "0.4529979", "0.45299375", "0.45299375", "0.4528087", "0.451547", "0.45001107", "0.44974336", "0.4494438", "0.4494389", "0.44903547", "0.4490093", "0.44728798", "0.4471853", "0.44691744" ]
0.6819254
1
This method removes the paddle from the game.
public void removePaddle() { this.removeSprite(this.paddle); this.removeCollidable(this.paddle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clearStage(GOval ball) {\n remove(ball);\n remove((paddle));\n }", "public void removeFromGame(){\n this.isInGame = false;\n }", "public void removePanel() \n\t{\n\t\tgame.remove(this);\n\t}", "void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}", "public void destroy() {\n\t\tfor (GroupPaddle groupPaddle : paddles) {\n\t\t\tPhysicsWorld.getPhysicsWorld().destroy(groupPaddle);\n\t\t}\n\t}", "private void resetForNextTurn() {\n\t\tremove(ball);\n\t\tdrawBall();\n\t\tsetInitialBallVelocity();\n\t\tpaddleCollisionCount = 0;\n\t\tpause(2000); \t\t\t\t\n }", "public void removePawn() {\n lives = 0;\n }", "private void drawPaddle(Graphics g) {\n Puddle t = game.getPaddle();\n Color savedCol = g.getColor();\n g.setColor(Puddle.COLOR);\n g.fillRect(t.getX() - Puddle.DIMENSION1 / 2,\n Puddle.Y_POS - Puddle.DIMENSION2 / 2, Puddle.DIMENSION1, Puddle.DIMENSION2);\n g.setColor(savedCol);\n }", "private void victory(Player p){\n printer.addPrintout(new Printout(p.getPlayerName() + \" Wins!\",\r\n PongGame.SCREEN_WIDTH/2, PongGame.SCREEN_HEIGHT/2));\r\n // remove the ball from the drawing list\r\n toDrawList.remove(ball);\r\n // its over.\r\n isOver = true;\r\n }", "public void removeButton() {\n pan.remove(playButton);\n }", "private void reset() {\n\t\tpaused = true;\r\n\r\n\t\t//reset the paddles and the ball\r\n\t\tint width = Graphics.getWidth();\r\n\t\tint height = Graphics.getHeight();\r\n\r\n\t\tballX = width / 2;\r\n\t\tballY = height / 2;\r\n\r\n\t\trand = new Random();\r\n\t\t//float angle = rand.nextfloat() * Math.PI / 6 + rand.nextInt(4) * Math.PI / 4 + Math.PI / 6;\r\n\t\tfloat angle = (float) (rand.nextInt(4) * Math.PI / 2 + Math.PI / 4);\r\n\t\tballVelX = (float) (Math.cos(angle) / 3);\r\n\t\tballVelY = (float) (Math.sin(angle) / 3);\r\n\r\n\t\tpaddle1X = getPaddleWidth() * 2;\r\n\t\tpaddle1Y = (height - getPaddleHeight()) / 2;\r\n\r\n\t\tpaddle2X = width - paddle1X - getPaddleWidth();\r\n\t\tpaddle2Y = paddle1Y;\r\n\t}", "void lostBall()\n {\n currentBall = null;\n }", "public void removeGameStateListener(GameStateListener gameListener);", "private void removePlayerFromLobby() {\n\n //Added Firebase functionality assuming var player is the player who wants to leave the game.\n }", "@Override\n public void kill() {\n alive = false;\n Board.getInstance().setPoints(points);\n }", "public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}", "public void movePaddleOnKeydown() {\n \tif (keyMouseMove == 0) return;\n \tdouble paddlePosition = paddle.getX();\n \t\n \t// don't move past the edges of the board\n \tif (paddlePosition <= 0 && keyMouseMove == -KEY_PADDLE_SPEED) return;\n \tif (paddlePosition > getWidth() - PADDLE_WIDTH && keyMouseMove == KEY_PADDLE_SPEED) return;\n\n \tpaddle.move(keyMouseMove, 0);\n }", "public void addPaddle(Paddle newPaddle) {\n\t\tGAME_PADDLE = newPaddle;\n\t}", "public synchronized void removeGame(String id) {\n if (null != this.waitingGame && this.waitingGame.getID() == id) {\n this.waitingGame = null;\n }\n }", "private GRect drawPaddle() {\n int paddleX = (getWidth() - PADDLE_WIDTH) / 2;\n int paddleY = (getHeight() - PADDLE_Y_OFFSET );\n GRect rect = new GRect(paddleX, paddleY, PADDLE_WIDTH, PADDLE_HEIGHT);\n rect.setFilled(true);\n rect.setColor(Color.BLACK);\n add(rect);\n return rect;\n }", "public void removeFromGame(Game g) {\r\n g.removeSprite(this);\r\n }", "void removeBall(Coordinates at);", "public void remove(Point p)\n {\n pellets.remove(p);\n }", "public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }", "public void remove () { this.setAsDown(); n.remove(); }", "public void remove() {\n\t\tstopFloating();\t\n\t\tPacketHandler.toggleRedTint(player, false);\n\t\tplayer.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 30, 1));\n\t\tplayer.stopSound(Sound.MUSIC_DISC_CHIRP);\n\t\tcleanTasks();\n\t\tactiveScenarios.remove(player.getUniqueId());\n\t}", "public void removeBalls() {\r\n for (Ball ball : this.ballsList) {\r\n ball.removeFromGame(this);\r\n }\r\n this.ballsList.clear();\r\n }", "public void removePowerUp(PowerUp p) {\n for (Location loc : p.getLocations()) {\n Location replacement = new Location(loc.getX(), loc.getY());\n gridCache.add(replacement);\n }\n\n powerUps.remove(p);\n render();\n}", "public void enemyoff(){\n getWorld().removeObject(this);\n }", "@Override\n public void removeGameApp(Handle<GameAppContext> that) \n {\n manager.removeGameApp(that);\n }", "public void removeFromGame(GameLevel g) {\n if (g != null) {\n g.removeSprite(this);\n g.getBallCounter().decrease(1);\n }\n }", "public void removeKing(){\n this.king = false;\n }", "public boolean removeGame(Game g)\n {\n return true;\n }", "public void removeGameEventListener(GameEventListener gameEventListener);", "public Builder clearPokeball() {\n \n pokeball_ = 0;\n onChanged();\n return this;\n }", "public void removeFromGame(GameLevel game) {\r\n game.removeCollidable(this);\r\n game.removeSprite(this);\r\n }", "public String removePlayer(int pno){\n\t\tplayerPosition.remove(pno);\n\t\tcollectedGold.remove(pno);\n\t\treturn \"You have left the game!\";\n\t}", "public void removeFromGame(GameLevel g) {\r\n g.removeSprite(this);\r\n }", "public void removeUnit(){\r\n tacUnit = null;\r\n }", "public void endGame(){\n\t\tgameRunning = false;\t// set gameRunning to false\n\t\tfinal SnakeGame thisGame = this;\t// store reference to the current game\n\t\tSwingUtilities.invokeLater(new Runnable() {\n public void run() {\n \t// remove our board and scoreboard\n \tgetContentPane().remove(board);\n \tgetContentPane().remove(scoreboard);\n \t// create a game over page\n \tgameOverPage = new GameOver(thisGame, scoreboard.getScore());\n \t// set our board and scoreboard to null\n \tboard = null;\n \tscoreboard = null;\n \t// add the game over page\n \tadd(gameOverPage);\n \t// validate and repaint\n \tvalidate();\n \trepaint();\n }\n\t\t});\t\n\t}", "public void removeGameObj(GameObject obj){\n display.getChildren().remove(obj.getDisplay());\n }", "public void unpause() {\n\t\t// Move the real time clock up to now\n\t\tsynchronized (mSurfaceHolder) {\n\t\t\tmLastTime = System.currentTimeMillis() + 100;\n\t\t}\n\t\tsetState(GameState.RUNNING_LVL);\n\t}", "@Override\n public Game removeGame(Long game_id) {\n Game game = gameDataAccess.findById(game_id).get();\n gameDataAccess.delete(game);\n return game;\n }", "void clean(Player p);", "private void destroyGameInstance() {\n // Destroy Game\n this.model.setPuzzle(null);\n this.model.setHintsUsed(0);\n this.model.getTimer().stop();\n this.model.setTimer(null);\n view.getGamePanel().getHintBtn().setEnabled(true);\n for (Cell cell : this.view.getGamePanel().getViewCellList()) {\n this.view.getGamePanel().getGrid().remove(cell);\n }\n }", "public void removePlayer(int id) {\n\n Jogador j = this.listaJogadores.get(id);\n\n if(bankruptcy && j.temPropriedades() && j.isBankruptcy()){\n //System.out.println(\"vez: \" + vez + \"id: \" + id );\n jogoInterrompidoEm = vez = voltaVez(vez);\n j.addComandoGiveUp();\n j.removeComandoRoll();\n j.setBankruptcy(true);\n vez = voltaVez(id);\n if(build)\n j.removerComandoBuild();\n }else{\n falirJogador(id);\n }\n\n }", "public void checkCollision(){\n if (ball.y <=0){\n ball.setYDirection(-ball.yVelocity);\n }\n if (ball.y >=GAME_HEIGHT-BALL_DIAMETER){\n ball.setYDirection(-ball.yVelocity);\n }\n if (ball.x <=0){\n ball.setXDirection(-ball.xVelocity);\n }\n if (ball.x >=GAME_WIDTH-BALL_DIAMETER){\n ball.setXDirection(-ball.xVelocity);\n }\n\n // this bounces balls to the paddles\n\n // this is for the paddle1\n if (ball.intersects(paddle1)) {\n ball.xVelocity = Math.abs(ball.xVelocity);\n ball.xVelocity++;\n if (ball.yVelocity > 0)\n ball.yVelocity++;\n else\n ball.yVelocity--;\n ball.setXDirection(ball.xVelocity);\n ball.setYDirection(ball.yVelocity);\n }\n // this is for the paddle2\n if (ball.intersects(paddle2)){\n ball.xVelocity = Math.abs(ball.xVelocity);\n ball.xVelocity++;\n if (ball.yVelocity >0)\n ball.yVelocity++;\n else\n ball.yVelocity--;\n ball.setXDirection(-ball.xVelocity);\n ball.setYDirection(ball.yVelocity);\n }\n\n //this method stops the paddles from passing the edges of the frame\n if(paddle1.y <= 0)\n paddle1.y = 0;\n if(paddle1.y >= (GAME_HEIGHT-PADDLE_HEIGTH))\n paddle1.y = GAME_HEIGHT-PADDLE_HEIGTH;\n if(paddle2.y <= 0)\n paddle2.y = 0;\n if(paddle2.y >= (GAME_HEIGHT-PADDLE_HEIGTH))\n paddle2.y = GAME_HEIGHT-PADDLE_HEIGTH;\n\n\n //this will give points to players and creates new paddles as well a new ball\n if (ball.x<=0){\n score.player2++;\n newPaddles();\n newBall();\n // System.out.println(\"Player 2: \"+ score.player2);\n }\n if (ball.x >= GAME_WIDTH-BALL_DIAMETER){\n score.player1++;\n newPaddles();\n newBall();\n //System.out.println(\"Player 1: \"+score.player1);\n }\n\n }", "public void removePokemon(int pokemonToRemove)\n {\n caughtPokemon.remove(pokemonToRemove);\n }", "public void removeFromGame(GameLevel gameLevel) {\n gameLevel.removeSprite(this);\n }", "public void removeFromGame(GameLevel gameLevel) {\n gameLevel.removeSprite(this);\n }", "public void removeFromGame(GameLevel gameLevel) {\n gameLevel.removeSprite(this);\n }", "void stopGame() {\n leader.disconnect();\n opponent.disconnect();\n }", "public void paddleCollision(Paddle myPaddle, Ball ball, Ball secondBall) {\n this.getMyImageView().setVisible(false);\n this.setX(1000);\n }", "public void paddleVSball(Paddle p, Ball b) {\n Rectangle p_box = new Rectangle(p.getX(), p.getY(), p.getWidth(), p.getHeight());\r\n // System.out.println(\"X: \"+p.getX()+\"Y: \"+p.getY()+\"W: \"+p.getWidth()+\"H: \"+p.getHeight());\r\n Rectangle b_box = new Rectangle(b.getX(), b.getY(), b.getWidth(), b.getHeight());\r\n\r\n if (p_box.intersects(b_box)) {\r\n //collision\r\n //if ball is going +y and -x\r\n if (b.getVY() > 0 || b.getVY() < 0) {\r\n b.setVY(b.getVY() * -1);\r\n }\r\n if (b.getY() < p.getY()) {//if the ball is inside the paddle\r\n b.setVX(b.getVX() * -1);\r\n b.setVX(b.getVX() * -1);\r\n }\r\n }\r\n }", "public void removePlayerPkmnInfoBox()\r\n {\r\n removeObject(playerPkmnInfoBox);\r\n }", "private void discardPlayer(Player p)\n {\n locations.remove(p);\n plugin.getAM().arenaMap.remove(p);\n clearPlayer(p);\n }", "public void removeSword() {\n \tthis.sword =null;\n \tthis.UIsword().set(false);\n \tdungeon.swordLeft().set(\"Sword Hits Left: 0\\n\");\n }", "public void destroy() {\n this.game.deleteObject(this);\n }", "public void resetPaddleToStartingPosition(){\n myRectangle.setX(initialXLocation);\n }", "private void reset() {\n\n try {\n if (playerOne.win() || playerTwo.win()) {\n Stage stage = application.getPrimaryStage();\n stage.setScene(new EndScene(application, playerOne, playerTwo));\n } else {\n ball.setLayoutX(WIDTH / 2 - LAYOUT / 2);\n ball.setLayoutY(HEIGHT / 2 - LAYOUT / 2);\n\n ball.randomiseDirection(new Random().nextInt(4));\n ball.resetMovementSpeed();\n\n playerOnePaddle.setLayoutY(HEIGHT / 2 - playerOnePaddle.getHeight() / 2);\n playerTwoPaddle.setLayoutY(playerOnePaddle.getLayoutY());\n\n countdown = 50;\n }\n } catch (Exception ex) {\n Logger.getLogger(GameScene.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n public void removeAll(){\n gameCollection.removeAllElements();\n }", "void removeLayer(int whichLayer);", "private void colidiuPaddle(Bola bola, Sprite paddle) {\n\t\tPoint posicaoB = bola.getPosition();\n\t\tPoint posicaoP = paddle.getPosition();\n\t\tif (posicaoB.y + 5 == posicaoP.y && posicaoP.x + 27 >= posicaoB.x && posicaoP.x <= posicaoB.x + 5) {\n\t\t\tbola.invertVertical();\n\t\t}\n\t}", "public void removeKey() {\n \tthis.key =null;\n \tdungeon.keyLeft().set(\"Key possession: No\\n\");\n }", "private void eliminatePlayer(Player loser){\n players.remove(loser);\n }", "@Override\n\tpublic void remove()\n\t{\n\t\tsuper.remove();\n\t\tgetMyPlayer().getGoldMines().remove(this);\n\t}", "public void checkForRemoval()\n {\n if (life <= 0)\n {\n SideScrollingWorld world = (SideScrollingWorld) getWorld(); \n \n world.isPacmanDead = true;\n getWorld().removeObject(this);\n }\n }", "void removeBomb();", "@Override\n public void removePlayer(Player player){\n this.steadyPlayers.remove(player);\n }", "void despawnHitbox() {\n\t\tif (hitbox == null) return;\n\t\thitbox.remove();\n\t\thitbox = null;\n\t}", "public void remove() {\n btRemove().push();\n }", "public void remove() {\n btRemove().push();\n }", "public void destroy(App p){\n if(!p.getToRemove().contains(this)){\n p.addObjectToRemove(this);\n }\n }", "public void removePlayer(String p) {\n this.playersNames.remove(p);\n }", "private boolean hasMissPaddle(GOval ball){\n return ball.getY() + 2 * BALL_RADIUS >= getHeight();\n }", "public void removePlayer(int place) {\r\n\t\tplayers.remove(place);\r\n\t}", "public void reset() {\n\t\tFile file = new File(\"src/LevelData.txt\");\n\t\tpaddle = new Paddle(COURT_WIDTH, COURT_HEIGHT, Color.BLACK);\n\t\tbricks = new Bricks(COURT_WIDTH, COURT_HEIGHT, file);\n\t\tball = new Ball(COURT_WIDTH, COURT_HEIGHT, 5, Color.BLACK);\n\n\t\tplaying = true;\n\t\tcurrScoreVal = 0;\n\t\tlivesLeft = 3;\n\t\tstatus.setText(\"Running...\");\n\t\tyourScore.setText(\"Your Score: 0\");\n\t\tlives.setText(\" Lives: \" + livesLeft.toString() + \"| \");\n\n\t\t// Making sure that this component has the keyboard focus\n\t\trequestFocusInWindow();\n\t}", "public void delete(Long id) {\n playerGames.remove(find(id));\n }", "public void removeBall(Ball otherBall) {\n\t\tBALL_LIST.remove(otherBall);\n\t\tIterator<Object> ballIterate = SPRITE_LIST.iterator();\n\t\twhile (ballIterate.hasNext()) {\n\t\t\tObject objBall = ballIterate.next();\n\t\t\tif (objBall instanceof Ball) {\n\t\t\t\tBall castBall = (Ball) objBall;\n\t\t\t\tif (castBall.equals(otherBall)) {\n\t\t\t\t\tballIterate.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Paddle2() {\r\n//Initial paddle position\r\n\r\n t.start();\r\n addKeyListener(this);\r\n setFocusable(true);\r\n setFocusTraversalKeysEnabled(false);\r\n \r\n }", "@Override\n public boolean remove(Object o) {\n return gameCollection.remove(o);\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}", "void getBlowUp(int x, int y) {\n //YOUR CODE HERE\n\t whichBoard.remove(x, y);\n }", "public void remove() {\r\n\tif (kingdom != null && currentEffect != null)\r\n\t currentEffect.removeFrom(kingdom);\r\n\tcurrentEffect = null;\r\n }", "protected void removeLane()\n {\n if (lane == 1)\n {\n\n MyWorld.Lane1Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 2)\n {\n MyWorld.Lane2Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 3)\n {\n MyWorld.Lane3Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 4)\n {\n MyWorld.Lane4Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 5)\n {\n MyWorld.Lane5Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n MyWorld.monsterAdded();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n GameWindow.this.remove(menuPanel);\n GameWindow.this.updateUI();\n checkBoolean = true;\n }", "public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }", "void gameOver() {\n if (!running.compareAndSet(true, false)) return;\n for (PlayerController controller : playerControllers) {\n if (controller == null) continue;\n controller.getClient().setPlayerController(null);\n try {\n controller.getClient().notifyGameOver();\n } catch (IOException e) {\n // no need to handle disconnection, game is over\n }\n }\n if (server != null) new Thread(() -> server.removeGame(this)).start();\n }", "public void movePawn(Pawn p) {\n pawn = new Pawn(p);\n p.removePawn();\n }", "public void playerLeft(Game game){\n game.getPlayers().remove(this);\n System.out.println(\"Player \" + this.getPlayerName() + \" has left the game\");\n }", "@Override\n\t\t\t\tpublic void touchUp(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer, int button) {\n\t\t\t\t\tgameObject.dispose();\n\t\t\t\t}", "public void act() \n {\n if(Greenfoot.mousePressed(this)){\n World world = getWorld();\n world.removeObject(this);\n }\n }", "private void remove(String name) {\n if (team.getPokemon(name) != null) {\n System.out.println(\"You are going to remove \" + name);\n System.out.println(\"This process is inrevertable, are you sure? [y/n]\");\n String command = input.next();\n if (command.equals(\"y\") || command.equals(\"yes\")) {\n team.remove(name);\n System.out.println(name + \" has been removed form your team\");\n System.out.println(\"You currently have \" + team.count() + \" pokemons in your team\");\n }\n } else {\n System.out.println(name + \" is not found within your team\");\n }\n }", "@Override\r\n\tpublic void mousePressed(MouseEvent e) {\n\t\tif(game)\r\n\t\t\tpanel.getGame().stickOff();\r\n\t}", "private void detener() {\n player.stop();\n player.release();\n player = null;\n }", "public void\tdeinitialize(Game game);", "public Paddle createPaddle() {\n int width = this.levelInfo.paddleWidth();\n int speed = this.levelInfo.paddleSpeed();\n // optimize the paddle location to the middle of the screen.\n // it should be placed a half of its' width from the center of the screen (which its' x coordinate is 400)\n double paddleX = 400 - (width / 2);\n double paddleY = 585;\n // create the paddle using the details we received from level info.\n Paddle pad = new Paddle(new Rectangle(new Point(paddleX, paddleY), width, 12),\n Color.ORANGE, speed);\n // update the keyboard sensor to pad.\n pad.updateKeyboardSensor(this.keyboard);\n // update the screen frame to pad.\n pad.updateFrame(this.upper, this.lower, this.right, this.left);\n return pad;\n }", "public void remove(){\n Api.worldRemover(getWorld().getWorldFolder());\n }", "public void removePaper(ConferencePaper pape){\r\n\t\tpapers.remove(pape);\r\n\t}", "@Override\n public void flingEffect(Battle b, ActivePokemon pelted) {\n removeLevitation(b, pelted);\n }" ]
[ "0.69633424", "0.6829642", "0.6798601", "0.6789081", "0.654192", "0.64539295", "0.62848794", "0.6153623", "0.6097358", "0.6024035", "0.5997636", "0.59695995", "0.5969286", "0.5937806", "0.59215075", "0.5879833", "0.58718055", "0.5870794", "0.5864381", "0.5861636", "0.5815142", "0.5809692", "0.5801863", "0.5796781", "0.5780255", "0.57479537", "0.57403296", "0.57377714", "0.571915", "0.57014775", "0.56930166", "0.56898844", "0.5678123", "0.567609", "0.567257", "0.5670391", "0.5670384", "0.5646422", "0.5634747", "0.5626948", "0.56237525", "0.5591432", "0.5583426", "0.55822116", "0.5575334", "0.5545971", "0.55450517", "0.5543434", "0.5541454", "0.5541454", "0.5541454", "0.55412394", "0.5538976", "0.5533808", "0.55329883", "0.5532585", "0.55180967", "0.55151486", "0.5514072", "0.5512074", "0.5488371", "0.54858243", "0.5479025", "0.54671055", "0.54336363", "0.5427387", "0.5427252", "0.542515", "0.5424866", "0.54185367", "0.54171187", "0.54171187", "0.54140186", "0.5409989", "0.540094", "0.5399808", "0.5396507", "0.5394874", "0.5386296", "0.5382229", "0.5378024", "0.537776", "0.5377734", "0.5376737", "0.5365075", "0.53632885", "0.53578264", "0.5356287", "0.535511", "0.5348275", "0.5347582", "0.5334894", "0.5324925", "0.5324189", "0.531557", "0.5313094", "0.5311394", "0.5303259", "0.53005433", "0.52933913" ]
0.88217294
0
This method removes the balls from the game.
public void removeBalls() { for (Ball ball : this.ballsList) { ball.removeFromGame(this); } this.ballsList.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearBalls();", "public void resetBalls() {\n\t\tBALL_LIST.clear();\n\t}", "void removeBall(Coordinates at);", "private void clearStage(GOval ball) {\n remove(ball);\n remove((paddle));\n }", "public int dropBalls(){\r\n if(balls>0){\r\n balls--;\r\n }\r\n return getBalls();\r\n }", "public void removeBall(Ball otherBall) {\n\t\tBALL_LIST.remove(otherBall);\n\t\tIterator<Object> ballIterate = SPRITE_LIST.iterator();\n\t\twhile (ballIterate.hasNext()) {\n\t\t\tObject objBall = ballIterate.next();\n\t\t\tif (objBall instanceof Ball) {\n\t\t\t\tBall castBall = (Ball) objBall;\n\t\t\t\tif (castBall.equals(otherBall)) {\n\t\t\t\t\tballIterate.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void clearBallCount(int ballCount){\n canvas.remove(ballBox);\n for (int i = 0; i < ballCount; i++){\n if (canvas.getElementAt(60 + i*(15), 730) instanceof Ellipse){\n canvas.remove(canvas.getElementAt(60 + i*(15), 730));\n }\n }\n }", "public void ClearAll()\r\n {\r\n balls.clear();\r\n board.SetMissedBall(0);\r\n }", "public void emptyBasket() {\n balls.clear();\n }", "public void removeLostBodies(){\n for(int i = physics.rigidBodies.size() - 1; i >= 0; i--){\n BObject body = physics.rigidBodies.get(i);\n Vector3f pos = body.getPosition();\n \n if(pos.z < -1000){\n int idx = group_bulletbodies.getChildIndex(body.displayShape);\n if(idx >= 0){\n group_bulletbodies.removeChild(idx);\n }\n physics.removeBody(body);\n }\n }\n }", "void lostBall()\n {\n currentBall = null;\n }", "public void removeFromGame(){\n this.isInGame = false;\n }", "private void removeOOSBalas() {\n balasToRemove = new ArrayList<>();\n balas.forEach(bala -> {\n if(bala.getState() == Enums.BulletState.TO_REMOVE) {\n if(!balasToRemove.contains(bala)) {\n balasToRemove.add(bala);\n }\n }\n });\n balasToRemove.forEach(bala -> balas.remove(bala));\n }", "public void ballVSbrick(Ball bb, Brick br) {\n Rectangle bb_box = new Rectangle(bb.getX(), bb.getY(), bb.getWidth(), bb.getHeight());\r\n Rectangle br_box = new Rectangle(br.getX(), br.getY(), br.getWidth(), br.getHeight());\r\n\r\n if (bb_box.intersects(br_box)) {\r\n //collision\r\n if (bb.getVX() < 0 && bb.getVY() < 0) {//-x,-y\r\n bb.setVY(bb.getVY() * -1);\r\n //remove brick\r\n //totalBricks.get(i)\r\n }//Inconsistent with collision\r\n else if (bb.getVX() > 0 && (bb.getVY() > 0)) {//+x,+y\r\n bb.setVY(bb.getVY() * -1);\r\n }//works\r\n else if (bb.getVX() < 0 && (bb.getVY() > 0)) {//-x,+y\r\n bb.setVY(bb.getVY() * -1);\r\n }//also inconsistent with collision\r\n else if(bb.getVX()>0 && bb.getVY()<0){//+x,-y\r\n bb.setVY(bb.getVY()*-1);\r\n }\r\n }\r\n if (totalBricks.isEmpty()) {\r\n this.setCleared(true);\r\n }\r\n //when the ball hits a brick\r\n //remove the brick\r\n //update velocity of ball\r\n\r\n }", "public void resetGame(){\n removeAll();\n\n brickManager = new BrickManager(BRICKMANAGER_X_POSITION, BRICKMANAGER_Y_POSITION);\n ball = new Ball(BALL_INITIAL_X_POSITION, BALL_INITIAL_Y_POSITION, BALL_RADIUS*2, BALL_RADIUS*2);\n bar = new Bar(BAR_INITIAL_X_POSITION, BAR_INITIAL_Y_POSITION, BAR_LENGTH, BAR_WIDTH);\n\n add(ball);\n add(bar);\n add(brickManager);\n }", "private void resetForNextTurn() {\n\t\tremove(ball);\n\t\tdrawBall();\n\t\tsetInitialBallVelocity();\n\t\tpaddleCollisionCount = 0;\n\t\tpause(2000); \t\t\t\t\n }", "@Override\n\tpublic void action() {\n\t if (firingBall.getY() + firingBall.getRadius() < this.y) { \n\t //deactivate absorber locally and in GameBoard\n\t firingBall = null;\n\t gb.removeFromActiveList(this);\n\t }\n\t}", "void removeBomb();", "public static void moveBalls() {\n\t\tfor (Ball b : Panel.balls) {\n\t\t\tif (b.getxPOS() + b.getxVelocity() < 410 || b.getxPOS() + b.getxVelocity() > (1200 - (b.getMass() * 7))) { //checking next frame for boundry collision\n\t\t\t\tb.setxVelocity(-b.getxVelocity());\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//reverseing velocity if true\n\t\t\t}\n\t\t\tif (b.getyPOS() + b.getyVelocity() < 0) {\n\t\t\t\tb.setyVelocity(-(b.getyVelocity()));\n\t\t\t}\n\t\t\tif (b.getyPOS() + b.getyVelocity() > (800 - (b.getMass() * 7)) - 22) { //on each collision with the floor, decrease the balls X and Y velocity\n\t\t\t\tb.setyVelocity(-(b.getyVelocity() - energyLost));\n\t\t\t\tif (Panel.tick % 7 == 0 && Panel.Gravity) {\n\t\t\t\t\tif (b.getxVelocity() < 0) {\n\t\t\t\t\t\tb.setxVelocity(b.getxVelocity() + 1);\n\t\t\t\t\t}\n\t\t\t\t\tif (b.getxVelocity() > 0) {\n\t\t\t\t\t\tb.setxVelocity(b.getxVelocity() - 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!(b.getyPOS() + b.getyVelocity() > (800 - (b.getMass() * 7)) - 22)) { //applying motion in the Y direction only if the ball is not resting on the floor\n\t\t\t\tb.setyPOS(b.getyPOS() + b.getyVelocity());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tb.setyPOS((800 - (b.getMass() * 7)) - 22);\n\t\t\t}\n\t\t\t\n\t\t\tb.setxPOS(b.getxPOS() + b.getxVelocity()); //motion is always applied in the X direction\n\t\t}\n\t}", "public boolean remove(Ball b) {\n\t\treturn this.contents.remove(b);\n\t}", "public void removePaddle() {\r\n this.removeSprite(this.paddle);\r\n this.removeCollidable(this.paddle);\r\n }", "protected void removeLane()\n {\n if (lane == 1)\n {\n\n MyWorld.Lane1Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 2)\n {\n MyWorld.Lane2Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 3)\n {\n MyWorld.Lane3Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 4)\n {\n MyWorld.Lane4Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n\n else if (lane == 5)\n {\n MyWorld.Lane5Monsters.remove(this);\n getWorld().removeObject(this);\n\n }\n MyWorld.monsterAdded();\n }", "public void removeBomb(Bomb b) {\r\n this.bombs.remove(b);\r\n }", "public void drop(){\r\n if(activeFish.isEmpty()) return;\r\n \r\n ArrayList<Fish> toremove = new ArrayList<Fish>();\r\n for(Fish bone : activeFish){\r\n bone.drop();\r\n\r\n if(!(bone.inBounds())){ // branch for out of bound fh\r\n toremove.add(bone);\r\n }\r\n }\r\n missedFish(toremove);\r\n\r\n update();\r\n }", "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}", "private void fireball1Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball1.getX() - 1, fireball1.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball1.getX() - 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tGObject topRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY());\r\n\t\tGObject bottomRight = getElementAt(fireball1.getX() + fireball1.getWidth() + 1, fireball1.getY() + fireball1.getHeight());\r\n\t\tif(topLeft == player || bottomLeft == player || topRight == player || bottomRight == player) {\r\n\t\t\tremove(fireball1);\r\n\t\t\tfireball1 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "private void cleaningBallot() {\n\t\tturnLeft();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t\tturnAround();\n\t\tmove();\n\t\tmove();\n\t\tgrabStrayBeepers();\n\t}", "void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}", "private void collideWithBall() {\n die();\n }", "public void removeElement(int id) {\n for (int i = 0; i < data.size(); i++) {\n if (data.get(i).id == id) {\n data.remove(data.get(i));\n }\n }\n System.out.println(\"there are \" + data.size() + \" balls left from the server\");\n }", "public void eat() {\r\n\t\tthis.app.getBones().remove(this);\r\n\t}", "public static void addBalls() {\n\t\tfor (int i = 0; i < numberOfBalls; i++) {\n\t\t\tPanel.balls.add(new Ball());\n\t\t}\n\t}", "@Override\n public void removeAll(){\n gameCollection.removeAllElements();\n }", "public void destroy() {\n\t\tfor (GroupPaddle groupPaddle : paddles) {\n\t\t\tPhysicsWorld.getPhysicsWorld().destroy(groupPaddle);\n\t\t}\n\t}", "public void removeVehicles() {\r\n numberOfVehicles = 0;\r\n for (Lane lane : lanes) {\r\n lane.removeVehicles();\r\n }\r\n }", "public Ball popBall() {\n return balls.pollLast();\n }", "private void reapDeadRabbits() {\n for (int i = (rabbitList.size() - 1); i >= 0; i--) {\n RabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n if (rabbit.getEnergy() <= 0) {\n space.removeRabbitAt(rabbit.getX(), rabbit.getY());\n rabbitList.remove(i);\n }\n }\n }", "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 throwBall() {\r\n\t\tthis.move();\r\n\t\tballCount--;\r\n\r\n\t}", "public void moveBall() {\n\t\tif (BrickPanel.getBrickCount() == -1) {\n\t\t\t\n \t\tcontrolPanel.resetGame();\n \t\tcontrolPanel.gameWonText();\n \t}\n\t\tif (BrickPanel.getBallShape().getY() >= 300) {\n\t\t\t \n\t\t\tcontrolPanel.resetGame();\n\t\t\t controlPanel.gameOverText();\n\t\t\t \n\t\t\t}\n\t\t//calls the moveBall method to move the ball\n\t\tBrickPanel.moveBall();\n\t}", "private void createBallsOnTopOfPaddle() {\r\n for (int i = 0; i < levelInformation.numberOfBalls(); i++) {\r\n Ball ball = new Ball((guiWidth / 2) - ((levelInformation.numberOfBalls() - 1) * ballRadius)\r\n + (i * (ballRadius * 2)), 550, ballRadius, Color.WHITE, environment);\r\n ball.setVelocity(levelInformation.initialBallVelocities().get(i));\r\n ball.addToGame(this);\r\n }\r\n ballCounter.increase(levelInformation.numberOfBalls());\r\n }", "public void clearLobbies() {\n\t\tlobbies.clear();\n\t}", "public void startGame() {\n\t\t\n\t\tmyCanvas.setVisible(true);\n\n\t\t// draw the ground\n\t\tmyCanvas.drawLine(50, GROUNDLINE, 550, GROUNDLINE);\n\n\t\t// B�lle erzeugen\n\t\tvar r = new Random();\n\t\t// Aufgabe 6: ein Ball ist nicht genug, oder?\n\t\t// Erweitern Sie die Erzeugung mit Random Zahlen und generieren Sie B�lle in einer Schleife\n\t\tfor(var i = 0; i < 5; ++i) {\n\t\t\tballs.add( new BouncingBall(20 + r.nextInt(80), 100, 20 + r.nextInt(60), new Color(r.nextInt(200)+56,r.nextInt(256),r.nextInt(256)), GROUNDLINE, myCanvas) );\n\t\t}\n\t\t\n\t\t\t\t\t\t\n\t\t// draw every ball in the list\n\t\tfor (BouncingBall ball : balls) {\n\t\t\tball.draw();\n\t\t}\t\t\n\t\t\n\t\t// make them bounce\n\t\tvar finished = false;\n\t\twhile (!finished) {\n\t\t\tmyCanvas.wait(50); // small delay\n\t\t\t\n\t\t\t// move every ball in the list\n\t\t\tfor (BouncingBall ball : balls) {\n\t\t\t\tball.move();\n\t\t\t}\t\t\n\t\t\t\n\t\t\t// stop if a ball has travelled a certain distance on x axis\n\t\t\tfor (BouncingBall ball : balls) {\t\t\t\t\n\t\t\t\tif (ball.getXPosition() >= 550) {\n\t\t\t\t\tfinished = true;\n\t\t\t\t\t// Aufgabe 5: Gameover\n\t\t\t\t\t// ...\n\t\t\t\t\tvar image = new ImageIcon(\"src/app/images/gameover.jpg\").getImage();\n\t\t\t\t\tmyCanvas.drawImage(image, 340, 240);\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t\n\t\t\t// Aufgabe 3: Alle B�lle getroffen?\n\t\t\tif (balls.size()==0) {\n\t\t\t\tfinished = true;\n\t\t\t\tvar image = new ImageIcon(\"src/app/images/gewonnen.jpg\").getImage();\n\t\t\t\tmyCanvas.drawImage(image, 340, 240);\n\t\t\t\t// Bild ausgeben, Gewonnen\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// erase every ball from the canvas\n\t\tfor (var ball : balls) {\n\t\t\tball.erase();\n\t\t}\t\t\n\t}", "public void resetArboles()\r\n {\r\n this.arboles = null;\r\n }", "@Override\n public void doAction() {\n checkRep();\n if (!storedBalls.isEmpty()) {\n Ball ballToShootOut = storedBalls.remove();\n ballToShootOut.setVelocity(new Vect(0,STOREDBALLVELOCITY));\n ballToShootOut.setActive(true);\n }\n checkRep();\n }", "private void reapDeadRabbits() {\n\t\tfor (int i = (rabbitList.size() - 1); i >= 0; i--) {\n\t\t\tRabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n\t\t\tif (rabbit.getEnergy() < 1) {\n\t\t\t\trabbitSpace.removeRabbitAt(rabbit.getX(), rabbit.getY());\n\t\t\t\trabbitList.remove(i);\n\t\t\t}\n\t\t}\n\t}", "public void removeRobotsAndRubble() {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getType() != PlayerType.Agent) {\n\t\t\t\tremovePosition(p.getPosition());\n\t\t\t\tremovePlayer(p.getName());\n\t\t\t}\n\t\t\telse \n\t\t\t\tp.resetRobotsFollowing();\n\t\t}\n\t}", "public void removeBoat (int index) {\n Boat b = getBoatAt(index);\n int startX = Math.min(b.getStartX(), b.getEndX());\n System.out.println(\"removeBoat(): startX = \" + startX);\n int startY = Math.min(b.getStartY(), b.getEndY());\n System.out.println(\"removeBoat(): startY = \" + startY);\n int endX = Math.max(b.getStartX(), b.getEndX());\n System.out.println(\"removeBoat(): endX = \" + endX);\n int endY = Math.max(b.getStartY(), b.getEndY());\n System.out.println(\"removeBoat(): endY = \" + endY);\n \n //reset cells in grid.\n if (startX == endX) { \n for (int j = startY; j <= endY; j++) {\n System.out.println(\"removeBoat(): X constant. Changing coordinate: \" + j);\n grid[startX-1][j-1].setHasBoat(false);\n System.out.println(\"removeBoat(): Cell: \" + grid[startX-1][j-1]);\n } \n } else if (startY == endY) {\n for (int i = startX; i <= endX; i++) {\n System.out.println(\"removeBoat(): Y constant. Changing coordinate: \" + i);\n grid[i-1][startY-1].setHasBoat(false);\n System.out.println(\"removeBoat(): Cell: \" + grid[i-1][startY-1]);\n }\n }\n \n //reset boat\n b.setStartX(INVALID); \n b.setStartY(INVALID); \n b.setEndX(INVALID); \n b.setEndY(INVALID);\n \n }", "private int collideObject(GOval ball, int bricksOnStage) {\n GObject collider = getCollidingObject(ball);\n if (isObjectAPaddle(collider) && vy > 0){\n vy = - vy;\n }\n else if (isObjectABrick(collider)){\n remove(collider);\n vy = - vy;\n bricksOnStage -= 1;\n }\n return bricksOnStage;\n }", "public void removeDead() {\n for (BaseObject object : new ArrayList<BaseObject>(bombs)) {\n if (!object.isAlive())\n bombs.remove(object);\n }\n\n for (BaseObject object : new ArrayList<BaseObject>(rockets)) {\n if (!object.isAlive())\n rockets.remove(object);\n }\n\n for (BaseObject object : new ArrayList<BaseObject>(ufos)) {\n if (!object.isAlive())\n ufos.remove(object);\n }\n }", "public void removeBrews(Brew b) {\r\n\t\tbrews.remove(b);\r\n\t\tb.setRecipe(null);\r\n\t}", "public void reInit() {\n balls.clear();\n for (Ball b: ballsInit) {\n balls.add(new Ball(b));\n }\n }", "private void clear() {\n\t\tremoveAll();\n\t\taddCircle();\n\t}", "public void clearGameList() {\n gameJList.removeAll();\n }", "public void RemoveBalloons (int x0, int y0)\n\t{\n\t\tcurrentSlice = i1.getCurrentSlice();\n\t\tipWallSegment = (i1.getStack()).getProcessor(i1.getCurrentSlice());\n\t\tpop = popSequence.PopList[currentSlice-1];\n\n\t\tdouble min_distance = 100000;\n\t\tint candidate = -1;\n\t\tfor (int i=0;i<pop.BallList.size();i++)\n\t\t{\n\t\t\tPoint P = ((Balloon)(pop.BallList.get(i))).getPoint();\n\t\t\tdouble d = (x0-P.getX())*(x0-P.getX()) + (y0-P.getY())*(y0-P.getY());\n\t\t\tif (d<min_distance)\n\t\t\t{\n\t\t\t\tcandidate = i;\n\t\t\t\tmin_distance = d;\n\t\t\t}\n\t\t}\n\t\tif (min_distance<64)\n\t\t{\n\t\t\tpop.remove(candidate);\n\t\t}\n\t\tpop = popSequence.PopList[currentSlice-1];\n\t}", "public void ballManagement(){\n\t\t\n//\t\tUpdates the Ball's X Position\n\t\tif (validBall.getxLoc() <0)\n\t\t\tvalidBall.setActiveBall(false);\n\t\telse\n\t\t\tvalidBall.updateBallXPos();\n\n//\t\tUpdates the Ball's Y Position\n\t\tif (validBall.getyLoc() > screenHeight)\n\t\t\tvalidBall.setActiveBall(false);\n\t\telse\n\t\t\tvalidBall.updateBallYPos();\n\t\t\n//\t\tUpdates the Ball Count of the Level\n\t\tupdateBallCount();\n\t\t\n//\t\tDraw the Ball on the Screen\n\t\tbatch.draw(validBall.getBallImage(), validBall.getxLoc(),validBall.getyLoc(), validBall.getBallImage().getWidth() * validBall.getBallScale(),validBall.getBallImage().getHeight() * validBall.getBallScale() );\n\t\t\n\t}", "public void resetGame() {\n\t\tBrickPanel.resetBallLocation();\n\t\tBrickPanel.repaint();\n\t}", "private void fireball2Collisions() {\r\n\t\tGObject topLeft = getElementAt(fireball2.getX() - 1, fireball2.getY());\r\n\t\tGObject topRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY());\r\n\t\tGObject bottomLeft = getElementAt(fireball2.getX() - 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tGObject bottomRight = getElementAt(fireball2.getX() + fireball2.getWidth() + 1, fireball2.getY() + fireball2.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(fireball2);\r\n\t\t\tfireball2 = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "void removeAllSpawn();", "public void endGame()\r\n {\r\n for (Cell c : gameBoard.bombList)\r\n {\r\n if (c.isBomb())\r\n {\r\n if (c.getText() == \"X\")\r\n {\r\n c.setId(\"correctFlag\");\r\n }\r\n else\r\n {\r\n c.setId(\"bombClicked\");\r\n }\r\n }\r\n else if (c.getText() == \"X\")\r\n {\r\n c.setId(\"incorrectFlag\");\r\n }\r\n c.setDisable(true);\r\n }\r\n if (gameBoard.emptyRemaining == 0)\r\n {\r\n win();\r\n }\r\n else\r\n {\r\n lose();\r\n }\r\n System.out.println(\"Game Over...\");\r\n scoreBoard.resetBtn.setDisable(false);\r\n }", "public void removeSprites(){\r\n\r\n\t}", "public void emptyBullets() {\n for(int i = 0; i < bossBullets.size(); i++){\n Bullet tempBullet = bossBullets.get(i);\n bossBullets.remove(i);\n }\n }", "public void removeEffectFromSpecialBrick(){\r\n\t\t\t// return everything to the original\r\n\t\t\tColor origColor = (specialBrickId.equals(\"Rect0\"))? discsColors[0]:(specialBrickId.equals(\"Rect1\"))? discsColors[1]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect2\"))? discsColors[2]:(specialBrickId.equals(\"Rect3\"))? discsColors[3]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect4\"))? discsColors[4]:(specialBrickId.equals(\"Rect5\"))? discsColors[5]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect6\"))? discsColors[6]:(specialBrickId.equals(\"Rect7\"))? discsColors[7]:null; \r\n\t\t\tint origWidth = (specialBrickId.equals(\"Rect0\"))? 30:(specialBrickId.equals(\"Rect1\"))? 60:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect2\"))? 90:(specialBrickId.equals(\"Rect3\"))? 120:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect4\"))? 150:(specialBrickId.equals(\"Rect5\"))? 180:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect6\"))? 210:(specialBrickId.equals(\"Rect7\"))? 240:null;\r\n\t\t\tRectangle rect = new Rectangle(origWidth,20, origColor);\r\n\t\t\trect.setId(specialBrickId);\r\n\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\trect.setStrokeWidth(3);\r\n\t\t\t\t\t\t\r\n\t\t\tswitch(specialBrickTower){\r\n\t\t\t\tcase \"firstTower\":\r\n\t\t\t\t\tfor(int i=0; i<firstTower.getChildren().size(); i++){ // cycle through the tower to check which one is the special brick\r\n\t\t\t\t\t\tif (firstTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tfirstTower.getChildren().set(i, rect); // then reset it\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"secondTower\":\r\n\t\t\t\t\tfor(int i=0; i<secondTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (secondTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tsecondTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"thirdTower\":\r\n\t\t\t\t\tfor(int i=0; i<thirdTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (thirdTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tthirdTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\trect.widthProperty().bind(scene.widthProperty().divide(3).subtract(250-origWidth));\r\n\t\t\trect.heightProperty().bind(scene.heightProperty().divide(19));\r\n\t\t\r\n\t\tif(countDownRunning){towersRegion.getChildren().remove(2);countDownRunning=false;} // remove the count down watch from the screen\t\t\r\n\t\tspecialBrickId=null; // reset the special brick id\r\n\t}", "public void clear() {\n for (int i = collisionBodies.size() - 1; i >= 0; i--) {\n CollisionBody line = collisionBodies.get(i);\n root.getChildren().remove(line.getLine());\n collisionBodies.remove(line);\n }\n }", "public void removeFromGame(GameLevel game) {\n game.removeCollidable(this); // now block is not a part of the collidables.\n game.removeSprite(this); // now block is not a part of the sprites.\n }", "private void move() {\n if(this.movement[0]) {\n moveRight();\n } else {\n moveLeft();\n }\n if(this.movement[1]) {\n moveDown();\n } else {\n moveUp();\n }\n\n //Checking boundaries of the game\n if(this.XPosition + this.ballWidth > instance.getWidth()) {\n this.movement[0] = false;\n } else if(XPosition <= 0) {\n this.movement[0] = true;\n } else if(YPosition <= 0) {\n this.movement[1] = true;\n } else if(YPosition + ballHeight >= instance.getHeight()) {\n instance.missedBall();\n if (instance.getBalls() > 0){\n this.lostLife.play();\n }\n this.XPosition = instance.getWidth() / 2;\n this.YPosition = instance.getHeight() - 43;\n this.movement[1] = false;\n Player.setPlayerX((instance.getWidth() - 111) / 2);\n Player.setPlayerY(instance.getHeight() - 19);\n instance.isPaused(true);\n }\n\n if (this.boundingBox.intersects(this.playerBoundingBox)){\n Rectangle leftHalfOfPlayer = new Rectangle((int)this.playerBoundingBox.getWidth() / 2, (int)this.playerBoundingBox.getHeight(),\n this.playerBoundingBox.x, this.playerBoundingBox.y);\n this.movement[0] = !this.boundingBox.intersects(leftHalfOfPlayer);\n this.movement[1] = false;\n } else {\n // Check if ball collides with brick;\n for (Bricks[] bricks : instance.getBricks()){\n for (Bricks brick: bricks){\n if (brick.collidesWith(new Rectangle(this.XPosition , this.YPosition , this.ballWidth , this.ballHeight))){\n Rectangle iRect = brick.brickHitBox.intersection(this.boundingBox);\n brick.destroy();\n //Sound brickBreak = new Sound(\"res/Break-Sound.wav\");\n this.brickBreak.play();\n // make logic\n this.movement[1] = true;\n if ((this.boundingBox.x+(this.boundingBox.width/2))<(iRect.x+(iRect.width/2))) {\n this.movement[0] = false;\n }\n if ((this.boundingBox.x+(this.boundingBox.width/2))>(iRect.x+(iRect.width/2))) {\n this.movement[0] = true;\n }\n if ((this.boundingBox.y+(this.boundingBox.height/2))<(iRect.y+(iRect.height/2))) {\n this.movement[1] = false;\n }\n }\n }\n }\n\n }\n\n }", "public void endBattle() {\n for (BattleEffect btlEff : effectsToRemove) {\n btlEff.remove();\n }\n playerInCombat.resetHealthAndMana();\n }", "private void playRound(GOval ball) {\n int bricksOnStage = NBRICK_ROWS * NBRICKS_PER_ROW;\n\n while(true) {\n bricksOnStage = collideObject(ball, bricksOnStage);\n collideStageLimits(ball);\n if (hasMissPaddle(ball)) {\n showLabel(\"BUSTED\", Color.BLACK);\n clearStage(ball);\n break;\n }\n ball.move(vx, vy);\n //println(vx + \" \" + vy);\n if (isBricksLeft(bricksOnStage)){\n showLabel(\"YOU WON!\", Color.red);\n clearStage(ball);\n break;\n }\n pause(PAUSE_TIME);\n }\n }", "public void removeAllPieces()\n\t{\n\t\t/* iterate over the rows and columns */\n\t\tfor (int i = 0; i < m_rows; i++) {\n\t\t\tfor (int j = 0; j < m_cols; j++) {\n\t\t\t\tremovePiece(i, j);\n\t\t\t}\n\t\t}\n\t}", "public void endRound() {\n if (!myTurn()) {\n return;\n }\n if (this.board.getWinners().size() > 0 && this.playerId == board.getPlayers().get(board.getPlayers().size() - 1).playerId) {\n this.board.setRunning(false);\n }\n // currentPlayerNumber = (currentPlayerNumber + 1) % players.size();\n // current = players.get(currentPlayerNumber);\n this.removableBlockades = new ArrayList<>();\n coins = (float) 0;\n bought = false;\n specialAction.setDraw(0);\n specialAction.setRemove(0);\n specialAction.setSteal(0);\n history = new ArrayList<>();\n //for (int i = tmpDiscardPile.size(); i > 0; i--){\n // discardPile.add(tmpDiscardPile.remove(0));\n //}\n discardPile.addAll(tmpDiscardPile);\n tmpDiscardPile = new ArrayList<Card>();\n draw();\n board.endRound();\n }", "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 }", "public void resetBallCount() {\r\n\t\tballCount = 30;\r\n\t}", "public void destroy()\n {\n GeneticRobots.rmCollider(this.collider);\n GeneticRobots.rmObject(this);\n }", "public void remove() {\n\t\tstopFloating();\t\n\t\tPacketHandler.toggleRedTint(player, false);\n\t\tplayer.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 30, 1));\n\t\tplayer.stopSound(Sound.MUSIC_DISC_CHIRP);\n\t\tcleanTasks();\n\t\tactiveScenarios.remove(player.getUniqueId());\n\t}", "public void checkBallCollisions(Ball ball, Board board, ArrayList<Brick> bricks) {\n float currDir = ball.getDirection();\n // check if the ball has hit any of the bricks\n for(Brick brick : bricks){\n boolean hitBrick = false;\n boolean hitCorner = false;\n\n if (ball.intersects(brick.getTopLeftCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getTopLeftCorner());\n if ((!ball.hasPositiveXDirection()) && angle<reverseVerticalDirection(angle)) ball.reverseVerticalDirection();\n else if (ball.hasPositiveYDirection() && angle>reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getTopRightCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getTopRightCorner());\n if (ball.hasPositiveXDirection() && angle>reverseVerticalDirection(angle) && angle<Math.PI) ball.reverseVerticalDirection();\n else if (ball.hasPositiveYDirection() && (angle<reverseHorizontalDirection(angle)\n || angle>Math.PI)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getBottomLeftCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getBottomLeftCorner());\n if ((!ball.hasPositiveXDirection()) && angle>reverseVerticalDirection(angle)) ball.reverseVerticalDirection();\n else if ((!ball.hasPositiveYDirection()) && angle<reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getBottomRightCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getBottomRightCorner());\n if (ball.hasPositiveXDirection() && angle<reverseVerticalDirection(angle) && angle>Math.PI) ball.reverseVerticalDirection();\n else if ((!ball.hasPositiveYDirection()) && angle>reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n }\n if (hitCorner) {\n brick.decrementLife(); Points.getInstance().addPoints(10);\n break;\n }\n if (ball.intersects(brick.getNorthLine()) && Math.PI<=currDir\n && currDir<=2*Math.PI) {\n ball.reverseVerticalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getSouthLine()) && 0<=currDir\n && currDir<=Math.PI) {\n ball.reverseVerticalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getWestLine()) && ((0<=currDir\n && currDir<=(Math.PI)/2) || ((3*Math.PI)/2<=currDir\n && currDir<=2*Math.PI))) {\n ball.reverseHorizontalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getEastLine()) && (Math.PI)/2<=currDir\n && currDir<=(3*Math.PI)/2) {\n ball.reverseHorizontalDirection();\n hitBrick = true;\n }\n if (hitBrick) {\n brick.decrementLife(); Points.getInstance().addPoints(10);\n break;\n }\n }\n\n // check if the ball has hit the ceiling or one of the walls\n if (ball.getY() <= ceilingPos) {\n ball.setY(ceilingPos);\n ball.reverseVerticalDirection();\n } else if (ball.getMaxX() >= rightWallPos) {\n ball.setX(rightWallPos - 2 * ball.getRadius());\n ball.reverseHorizontalDirection();\n } else if (ball.getX() <= leftwallPos) {\n ball.setX(leftwallPos);\n ball.reverseHorizontalDirection();\n }\n\n // check if the ball has hit the board\n if (currDir>((Math.PI)/6) && currDir<((3*Math.PI)/6)) return;\n if (ball.intersects(board.getBody()) && currDir>Math.PI) {\n ball.reverseVerticalDirection();\n } else if (ball.intersects(board.getLeftEdge())) {\n float angle = getDirectionAfterCollisionWithCircle(ball, board.getLeftEdge());\n if (angle<((Math.PI)/2) || angle>(3*Math.PI)/2) ball.reverseVerticalDirection();\n else ball.setDirection(angle);\n } else if (ball.intersects(board.getRightEdge())) {\n float angle = getDirectionAfterCollisionWithCircle(ball, board.getRightEdge());\n if (angle>((Math.PI)/2) && angle<(3*Math.PI)/2) ball.reverseVerticalDirection();\n else ball.setDirection(angle);\n }\n }", "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 void checkForRemoval()\n {\n if (life <= 0)\n {\n SideScrollingWorld world = (SideScrollingWorld) getWorld(); \n \n world.isPacmanDead = true;\n getWorld().removeObject(this);\n }\n }", "public void updateObjects()\r\n {\r\n //update states\r\n for (Ball ball : balls) {\r\n \tif(ball!=null)\r\n \t{\r\n\t \tif(ball.GetVisible()) ball.MoveDown();\r\n\r\n \t}\r\n \telse ball=null;\r\n }\r\n \r\n }", "public void remove() {\n super.remove();\n if (this.caughtEntity != null) {\n this.caughtEntity.noClip = false;\n }\n if (this.angler != null) {\n this.angler.fishingBobber = null;\n this.angler.noClip = false;\n }\n if(this.rod.getItem() == Items.ITEM_GRAB_HOOK){\n this.rod.getOrCreateTag().putBoolean(\"cast\", false);\n }\n }", "public void removePiece() {\n\t\troot.getChildren().clear();\n\t\tthis.piece = null;\n\t\troot.getChildren().add(rectangle);\n\t}", "protected void moveBall() {\n int width = getWidth();\n int height = getHeight();\n int min, max, randomX, randomY;\n min = 0;\n max = 200;\n randomX = min + (int)(Math.random() * ((max - min)+1));\n randomY = min + (int)(Math.random() * ((max - min)+1));\n //System.out.println(randomX + \", \" + randomY);\n\n Rectangle ballBounds = ball.getBounds();\n// //System.out.println(ballBounds.x + \", \" + ballBounds.y);\n// if (ballBounds.x + randomX < 0) {\n// randomX = 200;\n// } else if (ballBounds.x + ballBounds.width + randomX > width) {\n// randomX = -200;\n// }\n// if (ballBounds.y + randomY < 0) {\n// randomY = 200;\n// } else if (ballBounds.y + ballBounds.height + randomY > height) {\n// randomY = -200;\n// } \n\n ballBounds.x = randomX;\n ballBounds.y = randomY;\n _ballXpos = ballBounds.x;\n _ballYpos = ballBounds.y;\n ball.setFrame(ballBounds);\n thePlacebo.repaint();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(!chesses.isEmpty()) {\r\n\t\t\t\t\tChess to_remove = chesses.getLast();\r\n\t\t\t\t\tPoint to_delete = to_remove.getCor();\r\n\t\t\t\t\tisChess[to_delete.x][to_delete.y] = 0;\r\n\t\t\t\t\tchesses.remove(chesses.size() - 1);\r\n\t\t\t\t\tturn = 1 - turn;\t\r\n\t\t\t\t\trepaint();\r\n\t\t\t\t}\r\n\t\t\t}", "public static void drawBalls(Graphics2D g2) {\n\t\tfor (Ball b : Panel.balls) {\n\t\t\tg2.setColor(b.getColor());\n\t\t\tg2.fillOval(b.getxPOS(), b.getyPOS(), b.getMass() * 7, b.getMass() * 7);\n\t\t\tg2.setColor(Color.black);\n\t\t}\n\t}", "public void createBalls() {\n // add the required amount of balls according to the levelinfo.\n for (int i = 0; i < this.levelInfo.numberOfBalls(); i++) {\n Ball ball = new Ball(new Point(400, 580), 5, java.awt.Color.WHITE);\n // let the ball know the frame limits.\n ball.updateFrame(this.upper, this.lower, this.right, this.left);\n // let the ball know the collidables.\n ball.setGameEnvironment(this.environment);\n // use the velocity from the velocity list of levelinfo.\n Velocity v = this.levelInfo.initialBallVelocities().get(i);\n ball.setVelocity(v);\n // add the ball to the game.\n ball.addToGame(this);\n // increase the ball counter by 1.\n this.ballCounter.increase(1);\n }\n }", "private void removeArea() {\n \t\tthis.set.remove( this.area );\n \t\tthis.finish();\n \t}", "public void removeAll()\r\n {\r\n if (level ==2)\r\n {\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(Ladder.class));\r\n removeObjects(getObjects(SmallPlatform.class));\r\n removeObjects(getObjects(Door.class)); \r\n removeObjects(getObjects(Tomato.class)); \r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(DeadTomato.class));\r\n player.setLocation();\r\n }\r\n if (level == 3)\r\n {\r\n removeObjects(getObjects(Tomato.class));\r\n removeObject(door2);\r\n removeObjects(getObjects(Canon.class));\r\n removeObjects(getObjects(CanonBullet.class));\r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(Pedestal.class));\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(DeadTomato.class));\r\n }\r\n if (level == 4)\r\n {\r\n removeObjects(getObjects(Platforms.class));\r\n removeObjects(getObjects(Text.class));\r\n removeObjects(getObjects(Bullet.class));\r\n removeObjects(getObjects(Ladder.class));\r\n removeObjects(getObjects(Door.class)); \r\n removeObjects(getObjects(Boss.class)); \r\n removeObjects(getObjects(Thorns.class));\r\n player.setLocation();\r\n }\r\n }", "void unregisterObserver(BallStateObserver observer);", "public void clearGame() {\n //loop through piece array erase pieces\n\n //clear piece array\n for (int i = 0; i < 64; i++) {\n ChessBoard.pieces[i] = null;\n }\n\n //remove all piece components from chessboard\n chessboard.removeAll();\n \n //clear game log\n gamelog.clearLog();\n \n //refresh graphics\n frame.update(frame.getGraphics());\n }", "@Override\n public void remove(Shape[] shapes) {\n\n }", "@Override\n public void run() {\n System.out.println(\"Cleaning room\");\n numJunkPiles = 0;\n }", "public void youBrokeSon(){\n\t\tcoinList.clear();\n\t}", "private void removeAllObjects()\n {\n removeObjects (getObjects(Actor.class));\n }", "public void removeButtons(){\n if(buttons!= null) {\n screenCoords = new Vector2(buttons.getFurniture().getX(), buttons.getFurniture().getY());\n screenCoords = objectStage.toScreenCoordinates(screenCoords, objectStage.getBatch().getTransformMatrix());\n\n touch.set(screenCoords.x, screenCoords.y, 0);\n game.getOfficeState().getCam().unproject(touch);\n touch.mul(game.getOfficeState().getInvIsotransform());\n\n int indexX;\n int indexY;\n\n if (touch.y < 0)\n indexY = 0;\n else\n indexY = (int) touch.y + 1;\n\n indexX = (int) touch.x;\n\n if(!buttons.getFurniture().getBought()) {\n buttons.removeButtons();\n buttons.getFurniture().remove();\n setIsMoving(false);\n } else if (buttons.getFurniture().getBought() && !tileMap.getTiles()[indexX][indexY].getIsFull()\n && buttons.getFurniture().getIsMoving()) {\n buttons.removeButtons();\n tileMap.getTiles()[indexX][indexY].setIsFull(true);\n setIsMoving(false);\n buttons.getFurniture().setIsMoving(false);\n buttons.getFurniture().setTile(tileMap.getTiles()[indexX][indexY]);\n } else if (buttons.getFurniture().getBought() && !buttons.getFurniture().getIsMoving()) {\n buttons.removeButtons();\n setIsMoving(false);\n }\n }\n }", "void getBlowUp(int x, int y) {\n //YOUR CODE HERE\n\t whichBoard.remove(x, y);\n }", "public void removeGameObj(GameObject obj){\n display.getChildren().remove(obj.getDisplay());\n }", "protected void desactiveBoat() {\n if (activeBoat!=null) {\n activeBoat.setActive(false);\n activeBoat.getBoatRectangle().setMouseTransparent(false);\n activeBoat.getBoatRectangle().setFill(activeBoat.getDisactiveColor());\n activeBoat=null;\n closeMsg();\n } \n }", "public void removeParade(){\n\t\tfor(int i = 0; i < count; i++){\n\t\t\tthis.getChildren().remove(paradeCards[i]);\n\t\t}\n\t}", "public void clearGame() {\n\t\tselectedObjects.clear();\n\t}", "public void moveBlueCrab() {\n\t\tloseLife();\n\t\tif (wallOverlapX()) {\n\t\t\tif (hitRight) {\n\t\t\t\tif (xVel > 0) {\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else if (hitLeft) {\n\t\t\t\tif (xVel < 0) {\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (wallOverlapY()) {\n\t\t\tif (hitUp) {\n\t\t\t\tif (yVel < 0) {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else if (hitDown) {\n\t\t\t\tif (yVel > 0) {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\txPos += xVel;\n\t\t\t\t\tyPos += yVel;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint xLow = xPos;\n\t\tint xHigh =xPos + width;\n\t\tint yTop = yPos;\n\t\tint yBot = yPos + height;\n\t\tfor (int i = 0; i < game.m.walls.size(); i++) {\n\t\t\tif (game.m.walls.get(i).wallHit(this) > 0) {\n//\t\t\t\twhile (game.m.walls.get(i).wallHit(this)) {\n\t\t\t\tif (game.m.walls.get(i).wallHit(this) == 4) {\n\t\t\t\t\tif (yVel < 0) {\n\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 1) {\n\t\t\t\t\t\t\t\tif (xVel > 0) {\n\t\t\t\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 2) {\n\t\t\t\t\t\t\t\tif (xVel < 0) {\n\t\t\t\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (game.m.walls.get(i).wallHit(this) == 3) {\n\t\t\t\t\tif (yVel > 0) {\n\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 1) {\n\t\t\t\t\t\t\t\tif (xVel > 0) {\n\t\t\t\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 2) {\n\t\t\t\t\t\t\t\tif (xVel < 0) {\n\t\t\t\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (game.m.walls.get(i).wallHit(this) == 2) {\n\t\t\t\t\tif (xVel < 0) {\n\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 3) {\n\t\t\t\t\t\t\t\tif (yVel > 0) {\n\t\t\t\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 4) {\n\t\t\t\t\t\t\t\tif (yVel < 0) {\n\t\t\t\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (game.m.walls.get(i).wallHit(this) == 1) {\n\t\t\t\t\tif (xVel > 0) {\n\t\t\t\t\t\txPos += xVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 3) {\n\t\t\t\t\t\t\t\tif (yVel > 0) {\n\t\t\t\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int j = 0; j < game.m.walls.size(); j++) {\n\t\t\t\t\t\t\tif (game.m.walls.get(j).wallHit(this) == 4) {\n\t\t\t\t\t\t\t\tif (yVel < 0) {\n\t\t\t\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tyPos += yVel;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n//\t\t\t\tif (xVel > 0) {\n//\t\t\t\t\txPos -= 20;\n//\t\t\t\t\treturn;\n//\t\t\t\t} \n//\t\t\t\telse if (xVel < 0) {\n//\t\t\t\t\txPos += 20;\n//\t\t\t\t\treturn;\n//\t\t\t\t}\n//\t\t\t\tif (yVel > 0) {\n//\t\t\t\t\tyPos -= 20;\n//\t\t\t\t\treturn;\n//\t\t\t\t}\n//\t\t\t\telse if (yVel < 0) {\n//\t\t\t\t\tyPos += 20;\n//\t\t\t\t\treturn;\n//\t\t\t\t}\n//\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (xPos <= 0) {\n\t\t\tif (xVel > 0) {\n\t\t\t\txPos += xVel;\n\t\t\t} else if (yPos + height <= game.mapHeight && yPos >= 0){\n\t\t\t\tyPos += yVel;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (xPos + width >= game.mapWidth) {\n\t\t\tif (xVel < 0) {\n\t\t\t\txPos += xVel;\n\t\t\t} else if (yPos + height <= game.mapHeight && yPos >= 0){\n\t\t\t\tyPos += yVel;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (yPos <= 0) {\n\t\t\tif (yVel > 0) {\n\t\t\t\tyPos += yVel;\n\t\t\t} else if (xPos + width <= game.mapWidth && xPos >= 0){ \n\t\t\t\txPos += xVel;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (yPos + height >= game.mapHeight) { \n\t\t\tif (yVel < 0) {\n\t\t\t\tyPos += yVel;\n\t\t\t} else if (xPos + width <= game.mapWidth && xPos >= 0){\n\t\t\t\txPos += xVel;\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\txPos += xVel;\n\t\t\tyPos += yVel;\n\t\t}\n\n\t}", "public void removePlaces(){\n List<Place> copies = new ArrayList<>(places);\n for(Place p : copies){\n p.reset();\n }\n }" ]
[ "0.7961282", "0.71419865", "0.7069509", "0.702341", "0.6995389", "0.6908126", "0.68981934", "0.6806803", "0.65688145", "0.6544933", "0.6516382", "0.6514589", "0.6501531", "0.6497345", "0.6487033", "0.6464545", "0.6435969", "0.63042295", "0.62688375", "0.6264591", "0.6231247", "0.6214889", "0.62120354", "0.6184296", "0.61288846", "0.6109442", "0.60999316", "0.60802823", "0.60799366", "0.60784096", "0.60769767", "0.6069525", "0.6067151", "0.604734", "0.6044012", "0.5991008", "0.5976734", "0.59752417", "0.5957537", "0.5944431", "0.5913216", "0.590657", "0.58976805", "0.5892584", "0.58864874", "0.58844995", "0.5877194", "0.5875306", "0.58647937", "0.58623344", "0.58462006", "0.58284307", "0.58217025", "0.5795678", "0.57944304", "0.5789696", "0.57576674", "0.5757447", "0.5748561", "0.5744449", "0.57415277", "0.5734859", "0.5733773", "0.5732453", "0.5721015", "0.5714276", "0.571262", "0.5706122", "0.57059515", "0.56974846", "0.5689167", "0.5678727", "0.5677326", "0.5656764", "0.5655118", "0.565046", "0.56489617", "0.5646603", "0.56358147", "0.56295455", "0.5620519", "0.56177443", "0.56132567", "0.5612474", "0.5611603", "0.56115496", "0.5606682", "0.5602282", "0.5598427", "0.5596311", "0.55865234", "0.5583164", "0.5578971", "0.55770564", "0.55714417", "0.5571342", "0.55696714", "0.55683106", "0.5564402", "0.5561526" ]
0.8750966
0
the logic from the previous playOneTurn method goes here. the `return` or `break` statements should be replaced with this.running = false;
@Override public void doOneFrame(DrawSurface d) { this.sprites.drawAllOn(d); this.sprites.notifyAllTimePassed(); if (this.keyboard.isPressed("p")) { Animation puseScreen = new PauseScreen(this.keyboard); this.runner.run(new KeyPressStoppableAnimation(puseScreen, this.keyboard, KeyboardSensor.SPACE_KEY)); } if (this.remainingBlocks.getValue() == 0) { this.score.increase(100); this.running = false; } if (this.remainingBalls.getValue() == 0) { this.running = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n gameEnded = true;\n return;\n }\n \n moveCycle();\n \n if (!game.validateGame()) \n {\n IllegalBoardPenalty();\n }\n \n String gameOverMessage = game.isGameOver();\n if (gameOverMessage != null) \n {\n //TODO: ConsoleUtils.message(gameOverMessage);\n gameEnded = true;\n }\n \n game.switchPlayer();\n }", "public void playOneTurn() {\n // set running to be true\n this.running = true;\n // create 2 balls and add them to the game using function.\n this.createBalls();\n //create the paddle and place it in the bottom of the screen, middle of line.\n Paddle pad = this.createPaddle();\n //add paddle to game.\n pad.addToGame(this);\n // countdown before turn starts\n this.runner.run(new CountdownAnimation(2, 3, this.sprites));\n // use our runner to run the current animation -- which is one turn of the game\n this.runner.run(this);\n //finally remove pad before the next turn.\n pad.removeFromGame(this);\n }", "private void doGameTurn()\n\t{\n\t\tif (!lost && !won)\n\t\t{\n\t\t\trefreshMapAndFrame();\n\t\t\t\n\t\t\tcheckPlayerCondition();\n\t\t\tElementAccess.openExit();\n\t\t\tSystem.out.println(turn);\n\t\t}\n\t\telse if (lost)\n\t\t{\n\t\t\tSound.lost();\n\t\t\trefreshMapAndFrame();\n\n\t\t\tif (playerHasLost())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t\tlost = false;\n\t\t}\n\t\telse if (won)\n\t\t{\n\t\t\tSound.won();\n\t\t\trefreshMapAndFrame();\n\n\t\t\twon = false;\n\t\t\tif (playerNotInLevel())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tnextLevel();\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t}", "public void play() {\n\n int turn = 1;\n\n while (!isCheckMate()) {\n System.out.println(\"Turn \" + turn++);\n board.print();\n playTurn(whitePlayer);\n board.print();\n playTurn(blackPlayer);\n }\n }", "public void playOneTurn() {\r\n //the number of balls in the game\r\n this.ballCounter = new Counter(this.levelInformation.numberOfBalls());\r\n Sleeper sleeper = new Sleeper();\r\n\r\n this.runner = new AnimationRunner(gui, 60, sleeper);\r\n this.paddle.getRectangle().setUpperLeft(new Point(WIDTH_SCREEN / 2 - (this.levelInformation.paddleWidth() / 2),\r\n HI_SCREEN - 40));\r\n //initialize the balls\r\n initializeBall();\r\n\r\n //start the game by counting down\r\n if (this.sprites != null) {\r\n this.runner.run(new CountdownAnimation(2, 4, this.sprites));\r\n }\r\n //run the game\r\n this.running = true;\r\n this.runner.run(this);\r\n\r\n }", "public void run() {\n //while player has lives left and did not clear the level, give him another turn\n while ((this.lifeCounter.getValue() != 0) && (this.blockCounter.getValue() != 0)) {\n playOneTurn();\n }\n }", "public void cantPlayGoNext() {\n\t switchTurn();\n }", "private void myTurn()\n\t{\n\t\t\n\t\tif (canPlay())\n\t\t{\n\t\t\tif (isTop())\n\t\t\t{\n\t\t\t\traise();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequal();\n\t\t\t}\n\t\t}\n\t\ttable.nextPlayer();\n\t\t\n\t}", "public void playTurn() {\r\n\r\n }", "private void humanTurn() \n {\n \n playTurn();\n }", "public void run()\n\t{\n\t\tnextTurn();\n\t\tif (!stop)\n\t\t{\n\t\t\tdoGameTurn();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdoLastTurn();\n\t\t}\n\t}", "public void playGame() {\n\t\t\r\n\t\t\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tplayRoundOne();\r\n\t\t}\r\n\t\t\r\n\t}", "public void play() {\r\n\r\n gamestate.startGame();\r\n\r\n while (!quit) {\r\n\r\n if (newGame) {\r\n gamestate.startGame();\r\n turn = 0;\r\n finished = true;\r\n newGame = false;\r\n }\r\n\r\n while (!gamestate.gameOver()) {\r\n\r\n if (newGame) {\r\n break;\r\n }\r\n\r\n turn++;\r\n display.displayBoard();\r\n\r\n if (turn % 2 == 1) {\r\n player1.makeMove(gamestate);\r\n } else {\r\n player2.makeMove(gamestate);\r\n }\r\n\r\n }\r\n\r\n if (finished) {\r\n\r\n display.displayBoard();\r\n\r\n switch (gamestate.getWinner()) {\r\n case Connect4GameState.RED:\r\n System.out.println(\"R wins\");\r\n break;\r\n case Connect4GameState.YELLOW:\r\n System.out.println(\"Y wins\");\r\n break;\r\n default:\r\n System.out.println(\"No one wins\");\r\n }\r\n\r\n finished = false;\r\n\r\n }\r\n\r\n if (display instanceof Connect4ConsoleDisplay) {\r\n quit = true;\r\n }\r\n\r\n }\r\n\r\n }", "@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }", "public int run() {\r\n // Player 1 plays first, and is X.\r\n while (true) {\r\n if (this.board.gameOver()) {\r\n break;\r\n }\r\n Move m1 = p1.makeMove(this.board.clone());\r\n this.board.makeMove(m1, this.p1.getSide());\r\n \r\n if (this.board.gameOver()) {\r\n break;\r\n }\r\n Move m2 = p2.makeMove(this.board.clone());\r\n this.board.makeMove(m2, this.p2.getSide()); \r\n }\r\n // Done with game.\r\n return this.board.winner();\r\n }", "private void nextTurn()\n\t{\n\t\tturn++;\n\t\tFrameMap.remove();\n\t}", "private void playGame() {\n do {\n new Round(this);\n } while (!winner.isPresent());\n }", "private void doLastTurn()\n\t{\n\t\tInteger time = turn;\n\n\t\tstartEnterScore(time);\n\t\tdisposeFrameMap();\n\n\t\ttimer.cancel();\n\t}", "public void nextTurn() {\n visionChanged = true;\n SoundPlayer.playEndTurn();\n // Check if any protection objectives have failed\n gameState.updateAllHeroProtectionGoals(getHeroManager());\n // hook the next turn\n if (!multiplayerGameManager.hookNextTurn()) {\n\n if (map.enemyPerformingMove()) {\n return;\n }\n // Enemy action was made\n if (playerTurn && map.hasEnemy()) {\n try {\n map.enemyTurn(this);\n } catch (InterruptedException e) {\n logger.error(\"ayylmao at the GameManager.nextTurn(..) Method\");\n Platform.exit();\n Thread.currentThread().interrupt();\n }\n } else {\n map.playerTurn(this);\n updateBuffIcons();\n updateTempVisiblePoints();\n map.turnTick();\n for(CurrentHeroChangeListener listener:heroChangeListeners){\n \tlistener.onHeroChange(getHeroManager().getCurrentHero());\n }\n }\n\n } else {\n moveViewTo(getHeroManager().getCurrentHero().getX(), getHeroManager().getCurrentHero().getY());\n updateBuffIcons();\n updateTempVisiblePoints();\n }\n\n map.updateVisibilityArray();\n dayNightClock.tick();\n turnTickLiveTiles();\n abilitySelected = AbilitySelected.MOVE;\n abilitySelectedChanged = true;\n backgroundChanged = true;\n gameChanged = true;\n minimapChanged = true;\n saveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n // update(this.tracker,null);\n }", "public void continueRun() {\n pause = false;\n }", "public void run() {\n if(mPlayerGamePiece == mGame.getmCurrentlyPlaying()){\n mPlayableTiles = mGame.getmBoard().getPlayableTiles(mPlayerGamePiece);\n showGuidelines();\n mIsAllowedToPlay = true;\n }\n // Otherwise, opponent begins:\n else{\n mIsAllowedToPlay = false;\n makeAIMove();\n }\n\n }", "public void playRoundOne() {\r\n\t\t\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tif (theModel.chooseFirstActivePlayer() == true) {\r\n\t\t\t\t// theModel.selectCategory();\r\n\t\t\t\t// so at this point we have returned strings?\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.selectCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\r\n\t\t\t\tSystem.out.println(\"this should be the human\");\r\n\r\n\t\t\t\tplayRound();\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.autoCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\r\n\t\t\t\t// theModel.displayTopCard();\r\n\t\t\t\tSystem.out.println(\"this should be the ai\");\r\n\t\t\t\tplayRound();\r\n\t\t\t\t// return true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (theModel.isGameOver()) {\r\n\t\t\tsql.setGameDataToSQL(GameID, RoundID, winningPlayer.getName(), DrawNum, theModel.humanIsActivePlayer);\r\n\t\t}\r\n\t}", "public void inTurn() {\n\t\tthis.timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfinishTurn();\n\t\t\t}\n\t\t}, turnMaxSeconds * 1000);\n\n\t}", "@Override\npublic boolean changeTurn() {\n\tif (currentPlayer.hasNext()) {\n\t\tcurrentPlayer = currentPlayer.getNext();\n\t\treturn true;\n\t}\nreturn false;\n}", "public void nextTurn() {\r\n\r\n\t\t// System.out.println(\"nextTurn================================================================================================\" + this.DiceNumber);\r\n\t\tif (gameState == GameState.Playing) {\r\n\t\t\tif (!isPlayerCall && currentTurnPlayer != null && !currentTurnPlayer.getPlayerDetail().getIsRobot()) {\r\n\t\t\t\tif (currentTurnPlayer.PlayerTimeOutCall()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tcurrentTurnPlayer.addNoOperateTime();\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// current turn count add one.\r\n\t\t\tturnIndex++;\r\n\t\t\tisPlayerCall = false;\r\n\t\t\tcurrentTurnPlayer = findNextLiving();\r\n\t\t\tsendGameNextTurn(currentTurnPlayer, this);\r\n\r\n\t\t\t// if current player is robot,add robot logical action.\r\n\t\t\tif (currentTurnPlayer.getPlayerDetail().getIsRobot()\r\n\t\t\t\t\t|| currentTurnPlayer.getPlayerDetail().getIsRobotState()) {\r\n\t\t\t\tThreadSafeRandom random = new ThreadSafeRandom();\r\n\t\t\t\tAddAction(new RobotProcessAction(random.next(1, 6) * 1000, currentTurnPlayer));// 机器人随机一个叫的时间\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// if the player has trusteed the game,add trustee action to deal\r\n\t\t\t// with the condition.\r\n\t\t\t// if (currentTurnPlayer.getPlayerState() == PlayerState.Trustee)\r\n\t\t\t// {\r\n\t\t\t// AddAction(new TrusteePlayerAction(random.next(3, 6) * 1000,\r\n\t\t\t// currentTurnPlayer));\r\n\t\t\t// return;\r\n\t\t\t// }\r\n\r\n\t\t\t// this turn wait for 20 seconds.\r\n\t\t\tWaitTime(1000 * 20);// csf0423 以前是12 + 8\r\n\t\t\tonBeginNewTurn();\r\n\t\t}\r\n\t}", "public void play() {\n\n init();\n while (isGameNotFinished()) {\n log.info(\"*** Starting next turn\");\n for (Player player : getPlayers()) {\n executeTurn(player);\n }\n }\n log.info(\"*** Game Finished\");\n }", "public void startTurn(){\n if (hasWinner()){\n announceWinner();\n return;\n }\n\n gameDraft();\n gameAttack();\n if (hasWinner()) return; //Skipping fortify if the game is won\n gameFortify();\n displayMessage(\"End of \" + currentPlayer.getName() + \"'s turn!\");\n }", "public void run() {\r\n\t\tboolean doorgaan = true;\r\n\t\twhile (doorgaan) {\r\n\t\t\tplay();\r\n\t\t\tdoorgaan = readBoolean(\"\\n> Play another time? (y/n)?\", \"y\", \"n\");\r\n\t\t}\r\n\t}", "public void nextTurn() {\n\t\tusedPocket = false;\n\t\ttookFromPot = false;\n\t\tcurrentTurn++;\n\t\tcurrentTurn = currentTurn%2;\n\t\tif(currentTurn == 0) {\n\t\t\tcurrentPlayer = player1;\n\t\t\topponentPlayer = player2;\n\t\t} else {\n\t\t\tcurrentPlayer = player2;\n\t\t\topponentPlayer = player1;\n\t\t}\n\t}", "public void playTurn(){\r\n\t\t// all exceptions in this method are caught, because if this method throws an exception\r\n\t\t// the AIPlayer will not draw/discard a card and the program will freeze\r\n\t\ttry{\r\n\t\t\tupdateLastCardDiscarded();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, lastCard: \" + e.toString());\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tif(!(drawOrPickUp()^bestChoice(BEST_CHOICE_AT_FIFTY))){ // choose whether to draw from the deck or pick up from the stack\r\n\t\t\t\tif(!game.getRound().drawFromDiscard()) // If picking up from the discard is not possible,\r\n\t\t\t\t\tgame.getRound().drawFromDeck(); // draw from the deck instead\r\n\t\t\t}else{\r\n\t\t\t\tgame.getRound().drawFromDeck();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, draw: \" + e.toString());\r\n\t\t\tgame.getRound().drawFromDeck(); // if something goes wrong, draw\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tgroup = new Groups(this, getHand());\r\n\t\t\tif(!hasLaidDownPhase() && group.getCompletePhaseGroups() != null && // if the AI player, hasn't laid down PhaseGroups\r\n\t\t\t\t\tgroup.getCompletePhaseGroups().length == Configuration.getNumberRequired(getPhase()) && // will lay down the right number of phasesGroups\r\n\t\t\t\t\tgetGame().getRound().getTurnNumber() >= 8 - (difficulty/10)) // is past a certain turn number based off difficulty\r\n\t\t\t\taddPhaseGroups(group.getCompletePhaseGroups()); \r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, laydown: \" + e.toString()); // laid down all my cards Hand92,AI90afterAI74\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tif(hasLaidDownPhase())\r\n\t\t\t\tplayOffPhases();\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.out.println(\"AIPlayer, playoff: \" + e.toString());\r\n\t\t}\r\n\r\n\t\ttry{\r\n\t\t\tlastCardDiscarded = discardCard();\r\n\t\t\tgame.getRound().discard(lastCardDiscarded); // discard\r\n\t\t}catch(Phase10Exception e){\t\r\n\t\t}catch(Exception e){\r\n\t\t\tlastCardDiscarded = getHand().getCard(0);\r\n\t\t\tgame.getRound().discard(lastCardDiscarded);\r\n\t\t\tSystem.out.println(\"AIPlayer, discard: \" + e.toString());\r\n\t\t}\r\n\t}", "public void play()\r\n\t{\r\n \r\n\t\tupdateMessage(\"Starting \" + name + \" between \"+ agent[0].name+ \" and \"+ agent[1].name+\".\");\r\n random = new Random(System.currentTimeMillis());\r\n\t\tint turn = random.nextInt(2);\r\n first=turn;\r\n\t\tint dimension=8;\r\n\t\t//System.out.println(agent[turn].name+ \" makes the first move.\");\r\n\t\t//initialize(false,dimension,dimension);\r\n set(agent[first].role);\r\n agent[0].setAvailable(agent[first].role, dimension);\r\n agent[1].setAvailable(agent[first].role, dimension);\r\n \r\n \r\n\t\t//showGameState();\r\n \r\n\t\twhile(!isFinished())\r\n\t\t{\r\n\t\t\tupdateMessage(agent[turn].name+ \"'s turn. \");\r\n\t\t\tagent[turn].makeMove(this);\r\n agent[(turn+1)%2].off(agent[turn].newx,agent[turn].newy );\r\n agent[(turn+1)%2].setNew((OTHELLO)this);\r\n \r\n \r\n\t\t\tshowGameState();\r\n\t\t\t\r\n\t\t\tturn = (turn+1)%2;\r\n\t\t}\r\n\t\t\r\n // System.out.println(\" final winner role: \"+winner.role+\" agent[0]: \"+agent[0].role+\" agent[1]: \"+agent[1].role);\r\n \r\n\t\t\r\n\t\tif(draw)\t\r\n\t\t\tupdateMessage(\"Game drawn!!\");\r\n else updateMessage(winner.name+ \" wins!!!\");\r\n\t\t\r\n\t}", "public void stopGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tif(this.round == 0)\r\n\t\t{\r\n\t\t\t++this.round;\r\n\t\t}\r\n\t}", "public boolean playGame() {\n\t\tboolean movePlayed = false;\n\t\twhile (!gameOver) {\n\t\t\tSystem.out.println(board);\n\t\t\tmovePlayed = false;\n\t\t\twhile(!movePlayed) {\n\t\t\t\ttry {\n\t\t\t\t\tplayNextTurn();\n\t\t\t\t\tmovePlayed = true;\n\t\t\t\t}\n\t\t\t\tcatch (RuntimeException e) {\n\t\t\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.checkWin = board.checkWin();\n\t\treturn true;\n\t}", "public int startGame() {\n\t\tint counter = 0;\n\t\twhile (true) {\n\t\t\t\n\t\t\tPlayer current = (counter % 2 == 0) ? getPlayer1() : getPlayer2();\n\t\t\tint column = current.play(getGameBoard());\n\t\t\t\n\t\t\t// Check input validity:\n\t\t\t\n\t\t\tif(column < 0) {\n\t\t\t\tSystem.out.println(current.getName()+\" tries to play a negative column number -> disqualification.\");\n\t\t\t\treturn (current == player1)? 2 : 1;\n\t\t\t}\n\t\t\t\n\t \tif(isColumnFull(column, current)) {\n\t \t\tSystem.out.println(current.getName()+\" tries to play an already full column -> disqualification.\");\n\t \t\treturn (current == player1)? 2 : 1;\n\t \t}\n\t\t\t\n\t\t\tplayColumn(column, current);\n\t\t\tcounter++;\n\t\t\t\n\t\t\tif (isGameDrawn()) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\t// For Player 1:\n\t\t\tif (hasWon(getPlayer1())) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// For Player 2:\n\t\t\tif (hasWon(getPlayer2())) {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t\n\t\t\t// continue ...\n\t\t}\n\t}", "@Override\n public void play(){\n \n // while neither player is dead\n while (continueGame()) {\n \n // both player and cpu draw a card and display the card\n player.play();\n System.out.printf(\"%s has drawn %s \\n\", player.getPlayerID(), \n player.getCard());\n cpu.play();\n System.out.printf(\"%s has drawn %s \\n\", cpu.getPlayerID(), \n cpu.getCard());\n \n // checks if the player wins the round\n if (winRound(player, cpu)) {\n // adds the cards to the gamedeck then the game deck to the\n // player deck\n winner(player, cpu, gameDeck);\n player.getWinningsPile().addCards(gameDeck.showCards().subList(0\n , gameDeck.getSize()));\n // empties the game deck\n gameDeck.showCards().clear();\n System.out.printf(\"%s wins round\\n\", player.getPlayerID());\n } else if (winRound(cpu, player)) { // if the cpu wins\n // adds the cards to the gamedeck then the game deck to the\n // cpu deck\n winner(cpu, player, gameDeck);\n cpu.getWinningsPile().addCards(gameDeck.showCards().subList(0, \n gameDeck.getSize()));\n // empties the game deck\n gameDeck.showCards().clear();\n System.out.println(\"CPU wins round\");\n } else {\n // if its a draw, check to see if either the cpu or player is\n // dying, if so, dont add the card to the gameDeck\n if (!(player.isDying())) {\n gameDeck.addCard(player.getCard());\n player.clearCard();\n }\n if (!(cpu.isDying())) {\n gameDeck.addCard(cpu.getCard());\n cpu.clearCard();\n }\n System.out.println(\"DRAW\");\n }\n // shows the current status of the game\n System.out.printf(\"%s's deck: %d winnings: %d \\n\", \n player.getPlayerID(), player.getDeck().getSize(), \n player.getWinningsPile().getSize());\n System.out.printf(\"CPU deck: %d winnings: %d \\n\", \n cpu.getDeck().getSize(), \n cpu.getWinningsPile().getSize());\n System.out.println(\"Press Enter to go to the next round\");\n in.nextLine();\n }\n //display the winner\n declareWinner();\n }", "public void gameLoop() {\n while (!d_TournamentEnded) {\n d_CurrentPhase.run();\n }\n }", "public void checkPlay(int[][] boardState)\n {\n if(ai)\n {\n takeTurn(boardState);\n }\n }", "public void run() {\n\t\t\n\t\t//* Initializing starting variables ** //\n\t\t\n\t\tturns = NTURNS;\n\t\tstartturn = true; \n\t\tgameover = false;\n\t\t\t\t\n\t\t//* setup game board** //\n\t\t\n\t\tturns--;\n\t\tsetupBricks();\n\t\tsetupPaddle();\n\t\tsetupScoreboard();\n\n\t\t\n\t\n\t\t//* play game** //\n\t\t\t\t\n\t\t\n\t\twhile (turns >= 0) {\n\t\t\t\n\t\t\tif (startturn == true) {\n\t\t\t\t// starttext = new GLabel(\"Click mouse to start turn\", WIDTH / 2, HEIGHT / 2);\n\t\t\t\t// add(starttext);\n\t\t\t\tupdateScoreboard();\n\t\t\t\tplayBall();\n\t\t\t\twaitForClick();\n\t\t\t\tstartturn = false;\n\t\t\t}\n\t\t\t\n\t\t\tcheckWalls();\n\t\t\tcheckCollision();\n\t\t\tmoveBall();\n\t\t\tcheckWin();\n\n\t\t}\n\t\tshowLose();\n\t\t\n\t}", "private void playGame() throws IOExceptionFromController {\n for (Player player : players) {\n if (player.getGodCard().hasAlwaysActiveModifier()) game.addModifier(player.getGodCard());\n }\n while (!game.hasWinner()) {\n if (!running.get()) return;\n Player currentPlayer = players.get(game.getActivePlayer());\n for (Card modifier : game.getActiveModifiers()) {\n if (!modifier.hasAlwaysActiveModifier() && modifier.getController().getPlayer().equals(currentPlayer))\n game.removeModifier(modifier);\n }\n\n broadcastGameInfo(\"turnStart\");\n String result = playerControllers.get(game.getActivePlayer()).playTurn();\n switch (result) {\n case \"next\":\n checkWorkers();\n game.nextPlayer();\n break;\n case \"outOfMoves\":\n case \"outOfBuilds\":\n case \"outOfWorkers\":\n eliminatePlayer(currentPlayer, result);\n game.nextPlayer();\n break;\n case \"winConditionAchieved\":\n case \"godConditionAchieved\":\n setWinner(currentPlayer, result);\n break;\n default:\n logError(\"invalid turn\");\n break;\n }\n }\n gameOver();\n }", "public void playTheGame() {\n\t\tboolean gameIsOver = false;\n\t\tdo{\n\t\t\tcheckIfPiecedCanBeDroppedIn(column_number);\n\t\t\tdropPieces(column_number,gamePiece);\n\t\t\tif ( didLastMoveWin() ) {\n\t\t\t\tgameIsOver = true;\n\t\t\t}\n\t\t\tSystem.out.println(\"A\"+didLastMoveWin());\n\t\t\tSystem.out.println(\"b\"+gameIsOver);\n\t\t}while(! gameIsOver);\n\t}", "@Override\r\n\tpublic void startTurn() {\n\t\t\r\n\t}", "public void play() {\n shuffleAndDeal();\r\n\r\n while (true) {\r\n if (whoseTurn == 'P') {\r\n whoseTurn = takeTurn(false);\r\n\r\n if (player1.findAndRemoveBooks()) {\r\n System.out.println(\"PLAYER 1: Oh, that's a book!\");\r\n showBooks(false);\r\n }\r\n } else if (whoseTurn == 'C') {\r\n whoseTurn = takeTurn(true);\r\n\r\n if (player2.findAndRemoveBooks()) {\r\n System.out.println(\"PLAYER 2: Oh, that's a book!\");\r\n showBooks(true);\r\n }\r\n }\r\n\r\n // the games doesn't end until all 13 books are completed. the player with the\r\n // most books at the end of the game wins.\r\n\r\n if (player1.getBooks().size() + player2.getBooks().size() == 13) {\r\n if (player1.getBooks().size() > player2.getBooks().size()) {\r\n System.out.println(\"\\nCongratulations PLAYER 1, you win!\");\r\n } else {\r\n System.out.println(\"\\nCongratulations PLAYER 2, you win!\");\r\n }\r\n break;\r\n }\r\n }\r\n }", "@Override\n public void run() {\n if(mGame.getmGameStatus() == Game.GameStatus.ONGOING){\n\n // If turn was toggled:\n if(mGame.getmCurrentlyPlaying() != mPlayerGamePiece) {\n\n // Updating colors for profile areas:\n mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_green);\n mOpponentUsername.setBackgroundResource(R.color.colorGreenDarkAlpha);\n mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_gray);\n mPlayerUsername.setBackgroundResource(R.color.colorGrayDarkAlpha);\n\n // Now A.I. opponent should make a move:\n makeAIMove();\n\n }\n\n // Otherwise, player gets another turn:\n else{\n mPlayableTiles = mGame.getmBoard().getPlayableTiles(mPlayerGamePiece);\n showGuidelines();\n mIsAllowedToPlay = true;\n }\n\n }\n\n else{ // Otherwise, game has ended.\n handleGameEnding();\n }\n\n }", "public void nextTurn(){\r\n removeIceAndFire();\r\n currentTurn++;\r\n }", "@Override\n public void run() {\n if(mGame.getmGameStatus() == Game.GameStatus.ONGOING){\n\n // If turn was toggled:\n if(mGame.getmCurrentlyPlaying() != opponentPiece) {\n\n // Updating colors for profile areas:\n mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_green);\n mPlayerUsername.setBackgroundResource(R.color.colorGreenDarkAlpha);\n mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_gray);\n mOpponentUsername.setBackgroundResource(R.color.colorGrayDarkAlpha);\n\n // Now Player should make a move:\n showGuidelines();\n mIsAllowedToPlay = true;\n\n }\n\n // Otherwise, opponent gets another turn:\n else{\n makeAIMove();\n }\n\n }\n\n else{ // Otherwise (game has ended)\n handleGameEnding();\n }\n\n }", "public void play() {\r\n int ii = 0;\r\n\r\n System.out.println(\"****************************************************************\");\r\n System.out.println(\"Play game: a move is expressed as \\\"row#,col#\\\", such as \\\"1,2\\\"\");\r\n System.out.println(\"Computer: X Person: O\");\r\n System.out.println(\"****************************************************************\");\r\n while(!isGameEnded()) {\r\n if (ii >= MAX_MOVE_NUMBER) {\r\n\tbreak;\r\n }\r\n\r\n nextMove();\r\n ii++;\r\n }\r\n\r\n if (isPersonWin()) {\r\n System.out.println(\"Person Wins!\");\r\n saveLoseRecord();\r\n }\r\n else if (isComputerWin()) {\r\n System.out.println(\"Computer Wins!\");\r\n }\r\n else {\r\n System.out.println(\"Tie!\");\r\n }\r\n\r\n }", "public void changeTurn()\r\n {\r\n isPlayersTurn = !isPlayersTurn;\r\n }", "public void startGame() {\n\n // Initialize both players\n players[0] = new Player(\"Paras\", true);\n players[1] = new Player(\"Computer\", false);\n\n // Initialize ChessBoard\n board = new ChessBoard(8);\n movesPlayed = new ArrayList<>();\n\n // Keep playing game until GameStatus is BLACK_WIN or WHITE_WIN\n while (true) {\n\n processTurn(players[0]);\n if (this.status == GameStatus.WHITE_WIN) {\n System.out.println(\"P1 win!\");\n break;\n }\n\n processTurn(players[1]);\n if (this.status == GameStatus.BLACK_WIN) {\n System.out.println(\"P2 win!\");\n break;\n }\n }\n\n }", "public void launchTurn() {\n \twhile (getCurrentPlayer() instanceof AbstractIA) {\n \t\tSystem.out.println(\"Some thing happen or nothing\");\n \t\tjouerIA();\n \t\tendTurn();\n \t\t//setCurrentPlayer(getJoueur1());\t\n \t}\n \t\n }", "@Override\n\tpublic boolean nextPlayersTurn(int currentTurn, int startRow, int startCol, int endRow, int endCol) {\n\t\tif (currentTurn % player2.turn == 0) {\n\t\t\tSystem.out.println(\"****YEE-HAW! ITS PLAYER 2'S TURN*****\");\n\t\t\texecuteMove(player2, player1, state.gameBoard, currentTurn, startRow, startCol, endRow, endCol);\n\t\t} else {\n\t\t\tSystem.out.println(\"****YEE-HAW! ITS PLAYER 2'S TURN*****\");\n\t\t\texecuteMove(player1, player2, state.gameBoard, currentTurn, startRow, startCol, endRow, endCol);\n\t\t}\n\t\treturn continueGame;\n}", "public void play() {\n field.draw();\n userTurn();\n if(! field.isFull()) {\n computerTurn();\n }\n }", "public void nextTurn() {\n do {\n colonySimulator.nextTurn(curTurn);\n curTurn++;\n try {\n Thread.sleep(200);\n } catch (InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n } while (!stepping && queenAlive);\n }", "private void playTurn(Player player) {\n\n System.out.println(player.toString() + \"'s turn\");\n\n if (!player.getOccupiedSet().isEmpty())\n while(true) {\n Movement move = player.getMove();\n if (validMove(player, move)) {\n move(player, move);\n break;\n }\n }\n }", "public void playRound() {\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tif (theModel.setActivePlayer(winningPlayer) == true) {\r\n\t\t\t\t// theModel.selectCategory();\r\n\t\t\t\t// so at this point we have returned strings?\r\n\t\t\t\ttheModel.displayTopCard();\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.selectCategory()));\r\n\t\t\t\t\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\t\t\t\t\r\n\t\t\t\tRoundID++;\r\n\t\t\t\t\r\n\t\t\t\tSystem.err.println(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\t\r\n\t\t\t\tlog.writeFile(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\t\r\n\t\t\t\tsql.setRoundDataToSQL(GameID, RoundID, winningPlayer.getName(), theModel.getIsDraw(), theModel.humanIsActivePlayer);\r\n\t\t\t\r\n\t\t\t\t//System.out.println(\"this should be the human having won round\");\r\n\r\n\t\t\t} else {\r\n\t\t\t\tcheckIfHumanPlayerInGame();\r\n\t\t\t\twinningPlayer = theModel.compareCards(theModel.getSelectedCategory(theModel.autoCategory()));\r\n\t\t\t\tcheckIfWinOrDraw();\r\n\t\t\t\t\r\n\t\t\t\tRoundID++;\r\n\t\t\t\t\r\n\t\t\t\tSystem.err.println(\"\\nThe current Round: \" + RoundID);\r\n\t\t\t\tlog.writeFile(\"\\nThe current Round : \" + RoundID);\r\n\t\t\t\tsql.setRoundDataToSQL(GameID, RoundID, winningPlayer.getName(), theModel.getIsDraw(), theModel.humanIsActivePlayer);\r\n\r\n\t\t\t\t//System.out.println(\"this should be the ai \" + winningPlayer.getName() + \"who has won the last round\");\r\n\t\t\t\t// return true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void endTurn() {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Started endTurn() for player \"+currentPlayer.getNumber());\r\n\t\tturnIsEnding = true;\r\n\r\n\t\t// End turn restrictions\r\n\t\tif (!currentPlayer.isDead() && !currentPlayer.isFree() && !currentPlayer.hasQuit()) {\r\n\t\t\tif (currentPlayer.getPlayArea().getNonPlayedSize() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all cards in play area are played\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (mustChoose.size() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all choices are made\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (mustTrash.size() > 0) {\r\n\t\t\t\tgameChannel.sendMessage(\"**[ERROR]** Cannot end turn until all trashes are made\").queue();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t// Don't need to discard\r\n\t\t}\r\n\t\t\r\n\t\t// Mass deletes\r\n\t\tclearMessages();\r\n\t\t\r\n\t\t// If just escaped, send message after clearing\r\n\t\tif (currentPlayer.getCurrentRoom() == 0 && currentPlayer.getPiece().getX() == GlobalVars.playerCoordsPerRoom[39][0]) {\r\n\t\t\t// Update room\r\n\t\t\tcurrentPlayer.setCurrentRoom(39);\r\n\t\t\tif (firstEscapee == currentPlayer) {\r\n\t\t\t\tgameChannel.sendMessage(\":helicopter: **\"+currentName+\"** was the first to escape! They received a **20** :star: **Mastery Token**\\n:skull: Only **4** turn(s) left!\").queue();\r\n\t\t\t} else {\r\n\t\t\t\tgameChannel.sendMessage(\":helicopter: **\"+currentName+\"** escaped in time! They received a **20** :star: **Mastery Token**\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Set cards in PlayArea to not played for next time, Undos the Discarded tag\r\n\t\tfor (int i = 0; i < currentPlayer.getPlayArea().getSize(); i++) {\r\n\t\t\tcurrentPlayer.getPlayArea().getCard(i).setPlayed(false);\r\n\t\t\tif (currentPlayer.getPlayArea().getCard(i).toStringHand().contentEquals(\"*[Discarded]*\")) currentPlayer.getPlayArea().getCard(i).setStringInHand();\r\n\t\t}\r\n\t\t\r\n\t\t// Clear swords, skill, boots, etc\r\n\t\tcurrentPlayer.endOfTurnReset();\r\n\t\tmustDiscard.clear();\r\n\t\t\r\n\t\t// Replaces cards in dungeon row. Only one attack per turn\r\n\t\tif (!status.contentEquals(\"over\")) {\r\n\t\t\tboolean hasAttackedThisTurn = false;\r\n\t\t\tfor (int i = 0; i < 6; i++) {\r\n\t\t\t\t// Checks to see if it should replace card\r\n\t\t\t\tif (dungeonRow[i].isBought()) {\r\n\t\t\t\t\tdungeonRow[i] = mainDeck.getNext();\r\n\t\t\t\t\tif (dungeonRow[i].isDragonAttack() && !hasAttackedThisTurn) {\r\n\t\t\t\t\t\tdragonAttack(cubesPerLevel[attackLevel]);\r\n\t\t\t\t\t\thasAttackedThisTurn = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (dungeonRow[i].isHasArrive()) {\r\n\t\t\t\t\t\tdoArriveEffect(dungeonRow[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmainDeck.removeTop();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Instantly go on to next player if no dragon attack\r\n\t\t\tif (!hasAttackedThisTurn) {\r\n\t\t\t\tdetermineNextPlayer();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void playTheGame() {\n\t\tint column;\n\t\ttry {\n\t\t\tboolean gameIsOver = false;\n\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\taConnect4Field.toString());\n\n\t\t\tdo {\n\t\t\t\tfor (int index = 0; index < thePlayers.length; index++) {\n\t\t\t\t\t// thePlayers[index].getView().showOutput(aConnect4Field.toString());\n\t\t\t\t\tif (aConnect4Field.isItaDraw()) {\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\"Draw\");\n\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\tthePlayers[index].getName()\n\t\t\t\t\t\t\t\t\t\t+ \" it's Your Turn! play your move\");\n\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\twhile (!aConnect4Field\n\t\t\t\t\t\t\t\t.checkIfPiecedCanBeDroppedIn(column)) {\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\"Invalid Turn Try again\");\n\t\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taConnect4Field.dropPieces(column,\n\t\t\t\t\t\t\t\tthePlayers[index].getGamePiece());\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.toString());\n\t\t\t\t\t\tif (aConnect4Field.error != \"\") {\n\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.error);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (aConnect4Field.didLastMoveWin()) {\n\t\t\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t\t\t\t// all player get to know\n\t\t\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\t\t\"The winner is: \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ thePlayers[index]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} while (!gameIsOver);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void playGame() {\n show();\n while (gameStatus) {\n if (canPut(players.get((state.getTurn())))) {\n int choice = -1;\n while (gameStatus) {\n choice = controls.get(state.getTurn()).putCard(currentCard);\n if (validInput(players.get((state.getTurn())), choice)) {\n System.out.println(players.get(state.getTurn()).getCards().get(choice).toString());\n try{Thread.sleep(1000);}catch(InterruptedException ignored){}\n break;\n }\n }\n decide(players.get(state.getTurn()), players.get(state.getTurn()).getCards().get(choice));\n }\n try{Thread.sleep(500);}catch(InterruptedException ignored){}\n checkFinish();\n if (gameStatus) {\n state.nextTurn();\n show();\n }\n }\n }", "@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tSystem.out.println(\"Tempo scaduto.\");\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif(yourTurn) {\r\n\t\t\t\t\t\tendGame(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tendGame(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t} finally {\r\n\t\t\t\t\ttimer.cancel();\r\n\t\t\t\t\ttimer = null;\r\n\t\t\t\t\tendTurn = null;\r\n\t\t\t\t}\r\n\t\t\t}", "public synchronized void stopGame(){\n \t\tif (running){\n \t\t\trunning = false;\n \t\t}\n \t}", "public void playerTurn(Game game){\n int cardHandNum;\n boolean nextPlayer = false;\n String recentCardDesc;\n if(game.recentCardPlayed() && !(game.playerGetAnotherTurn(this))){\n if(game.getRecentCard() instanceof Mineral){\n recentCardDesc = \"\\nRecent card = Name: \" + game.getRecentCard().getCardName() + \" \" +\n \"Hardness: \" + ((Mineral) game.getRecentCard()).getCardHardness() + \" \" +\n \"Specific Gravity: \" + ((Mineral) game.getRecentCard()).getCardSpecGravity() + \" \" +\n \"Cleavage: \" + ((Mineral) game.getRecentCard()).getCardCleavage() + \" \" +\n \"Crystal Abundance: \" + ((Mineral) game.getRecentCard()).getCardCrystalAbundance() + \" \" +\n \"Economic Value: \" + ((Mineral) game.getRecentCard()).getCardEconomicValue() + \"\\n\"; // The recent card description of the Mineral card\n }\n else{\n recentCardDesc = \"\\nThe recent player play the \" + ((SuperTrumps) game.getRecentCard()).getCardName() + \" card\" + \"\\n\"; // The recent card description of the Supertrumps card\n }\n }\n else if(game.recentCardPlayed() && game.playerGetAnotherTurn(this)){\n System.out.println(\"You are granted to select the trump mode again\");\n recentCardDesc = \"\\nYou may pick the card again as you made all of other players pass\" + \"\\n\";\n gameStart(game); // Allowing the player that is not passed to pick up another trump category\n }\n else {\n recentCardDesc = \"\\nThere are no recent cards that have been played\" + \"\\n\";\n gameStart(game); // Description when there is no cards that is been played (when it is the start of the game)\n }\n while (!nextPlayer){\n // Used for looping until the person did the action (play the card or pass), which allows the next player to move\n String playerChoice;\n System.out.println(\"Game mode: \" + game.getGameModeMessage() + recentCardDesc + showCardInHand() + getPlayerName() + \", enter the card number you want to play or simply enter PASS to pass\");\n System.out.print(\">>>\");\n Scanner options = new Scanner(System.in);\n playerChoice = options.nextLine();\n if (playerChoice.toUpperCase().equals(\"PASS\")){\n drawPlayerCard(game.getCardDeck().drawnCard());\n nextPlayer = true;\n }\n else{\n try {\n cardHandNum = Integer.parseInt(playerChoice); // Changing the input into int from String\n Card cardPlayed = getPlayerCard(cardHandNum); // Used for trying to get the card played\n boolean continueGame = game.gameCard(cardPlayed, this); // Trying to play the card\n if(game.getGameMode().equals(\"CHOICE\")){ // Decision when a player play a special supertrump card to allow player to freely choose the trump mode\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n gameStart(game);\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n else if (game.getGameMode().equals(\"GRAV/MAG\")) {\n if(lookAtWinCard()) { // Check whether or not the player has the winning card, which is Magnetite\n for (Card cardInHand : playerHand) {\n game.putCardToGame(cardInHand);\n playerHand.remove(cardInHand);\n game.setRecentPlayer(this.getPlayerName());\n }\n game.setGameMode(\"SPECGRAV\"); // Change the game mode to Specific Gravity\n nextPlayer = true;\n }\n else {\n game.setGameMode(\"SPECGRAV\"); // Change the game mode to Specific Gravity\n }\n if(continueGame){\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n }\n else {\n if(continueGame){\n // Used for the normal card play\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n }\n }\n catch (Throwable e){\n System.out.println(\"Invalid input!\"); // When the user try to enter the input that does not match the card in the hand\n }\n }\n }\n if (playerHand.size() == 0){\n // Occurs when the player has no more card in the hand\n game.setRecentPlayer(game.getPlayers().get((game.getPlayers().indexOf(this)+1)%game.getPlayers().size()).getPlayerName());\n playerLeft(game);\n }\n }", "public void resume() {\n playing = true;\n gameThread = new Thread(this);\n gameThread.start();\n }", "public boolean switchPhase() {\n int cpuShipCounter = 0;\n int playerShipCounter = 0;\n do {\n cpuShipCounter = 0;\n playerShipCounter = 0;\n if (!cpuHasPlaced) {\n placeComputerShipsDumb((int) (Math.random() * 19) + 1);\n }\n for(int i = 0; i < 10; i++){\n for(int j = 0; j <10; j++){\n if(humanPlayerBoard[i][j] == board.ship.ordinal()){\n playerShipCounter++;\n }\n if (computerPlayerBoard[i][j] == board.ship.ordinal()) {\n cpuShipCounter++;\n }\n }\n }\n if (cpuShipCounter != 17) {\n cpuHasPlaced = false;\n cpuShipCounter = 0;\n playerShipCounter = 0;\n for (int i = 0; i < 10; i++) {\n for (int j = 0; j < 10; j++) {\n computerPlayerBoard[i][j] = 0;\n }\n }\n }\n\n } while (cpuShipCounter != 17);\n\n if(cpuShipCounter == 17 && playerShipCounter == 17){\n inGame = true;\n return true;\n }\n\n return false;\n }", "public void doTurn() {\n\t\tGFrame.getInstance().aiHold();\n\t}", "@Override\r\n public boolean playTurn()\r\n {\n System.out.println(\"current bid = \" + currentBid);\r\n currentBid = players[currentPlayer].playHand(currentBid);\r\n\r\n System.out.println(\"Player bid = \" + currentBid);\r\n // Add hand played to discard pile\r\n discards.add(currentBid.getHand());\r\n // Offer all other players the chance to call cheat\r\n int callee = -1;\r\n {\r\n int[] calls = new int[MINPLAYERS];\r\n int i = 0;\r\n for (int j = 0; j < players.length; ++j)\r\n {\r\n // don't allow us to call cheat on ourselves\r\n if (currentPlayer == j)\r\n continue;\r\n Player p = players[j];\r\n if (p.callCheat(currentBid, currentPlayer))\r\n calls[i++] = j;\r\n }\r\n if (i > 0)\r\n callee = calls[rg.nextInt(i)];\r\n }\r\n\r\n if (callee != -1)\r\n {\r\n System.out.println(\"Player called cheat by Player \" + (callee+1));\r\n if (isCheat(currentBid)) //CHEAT CALLED CORRECTLY\r\n {\r\n for (Player p : players)\r\n p.broadcastCheat(currentPlayer, callee, true);\r\n //Give the discard pile of cards to currentPlayer who then has to play again\r\n players[currentPlayer].addHand(discards);\r\n System.out.println(\"Player cheats!\");\r\n System.out.println(\"Adding cards to player \"+\r\n (currentPlayer+1) + \" \" + players[currentPlayer]);\r\n }\r\n else //CHEAT CALLED INCORRECTLY\r\n {\r\n for (Player p : players)\r\n p.broadcastCheat(currentPlayer, callee, false);\r\n System.out.println(\"Player Honest\");\r\n currentPlayer = callee; // set the currentPlayer to callee\r\n // later on we'll increase this, so it's the person after\r\n // they who called's turn.\r\n players[currentPlayer].addHand(discards);\r\n System.out.println(\"Adding cards to player \"+\r\n (currentPlayer+1) + players[currentPlayer]);\r\n }\r\n //If cheat is called, current bid reset to an empty bid with rank two whatever\r\n //the outcome\r\n currentBid = new Bid();\r\n //Discards now reset to empty\r\n discards = new Hand();\r\n }\r\n else\r\n {\r\n System.out.println(\"No Cheat Called\");\r\n }\r\n /*\r\n Game bug fix:\r\n The design of the game, as given, was floored in conjuction with\r\n the required implementations of the strategies.\r\n A scenario can arise where one player has all the twos and the other\r\n has none, but it's their turn to play.\r\n The player with all the twos can consitently correctly call cheat on the\r\n player, as they have to claim to of laid a 2.\r\n\r\n This is easily fixed by moving the turn to the player after the one who\r\n just got called out\r\n */\r\n currentPlayer = (currentPlayer+1) % nosPlayers;\r\n return true;\r\n }", "public void play() {\n HashSet<Board> positionsPlayed = new HashSet<Board>();\n _board = new Board();\n\n while (true) {\n int playerInd = _board.turn().ordinal();\n Move next;\n if (_playing) {\n if (_board.gameOver()) {\n announceWinner();\n _playing = false;\n continue;\n }\n if (_hasGUI) {\n if (_players[playerInd].type().equals(\"human\")) {\n if (_ready) {\n next = _nextMove;\n } else if (_readyCommand) {\n processCommand(_nextCommand);\n next = null;\n } else {\n continue;\n }\n } else {\n next = _players[playerInd].makeMove();\n }\n } else {\n next = _players[playerInd].makeMove();\n }\n assert !_playing || next != null;\n } else {\n if (_hasGUI) {\n System.out.print(\"\");\n if (_readyCommand) {\n processString(_nextCommand);\n }\n } else {\n getMove();\n }\n next = null;\n }\n if (next != null) {\n assert _board.isLegal(next);\n _board.makeMove(next);\n if (_players[playerInd].type().equals(\"machine\") && !_hasGUI) {\n System.out.println(_players[playerInd].side().abbrev().toUpperCase() + \"::\" + next.toString());\n if (_autoprint) {\n System.out.println(_board.toString2());\n }\n }\n if (_board.gameOver()) {\n announceWinner();\n _playing = false;\n }\n }\n _ready = false;\n }\n }", "private char playSingleGame() {\n this.resetGame();\n System.out.println(\"\\n---------- NEW GAME ----------\\n\");\n System.out.println(this);\n int turn = (int) (2 * Math.random());\n char res;\n do {\n Move move = this.players[turn].pickMove();\n if (move == null) {\n return 'Q';\n }\n this.executeMove(move, this.players[turn].getSymbol());\n System.out.println(this);\n if (turn == 0) { // changes turns from one player to the other\n turn = 1;\n } else turn = 0;\n res = this.getGameStatus();\n switch (res) {\n case 'O':\n res = 'C';\n break;\n case 'X':\n res = 'H';\n }\n } while (res == '?');\n return res;\n }", "@Override\n public void run() {\n computerTurn();\n }", "public void resume() {\n playing = true;\n gameThread = new Thread(this);\n gameThread.start();\n }", "public static void NextTurn() {\n if (num_of_players == turn)\n turn=0;\n turn++;\n }", "private void NextTurn() {\n\t\tTextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n\t\t\n\t\t\tif(player_1){\n\t\t\t\tplayer_1 = false;\n\t\t\t\tif(players == 1){ \n\t\t\t\t\ttvStatus.setText(\"Android Nole's turn\");\n\t\t\t\t\tLog.i(\"TEST\",\"Android turn\");\n\t\t\t\t\tAndroidTurn();\n\t\t\t\t}else{\n\t\t\t\t\ttvStatus.setText(\"Nole's turn\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tplayer_1 = true;\n\t\t\t\ttvStatus.setText(\"Gator's turn\");\n\t\t\t}\n\t\t}", "private GameResponse playNextRound() {\n if(gameResponse.getPoint() == 0) {\n gameResponse.setMessage(null);\n roll();\n gameResponse.setPoint(currentRoll);\n if (WINS.contains(gameResponse.getPoint())) {\n completeRound(GameEnum.WON);\n return gameResponse;\n } else if (LOSES.contains(gameResponse.getPoint())) {\n completeRound(GameEnum.LOST);\n return gameResponse;\n }\n } else {\n roll();\n if (currentRoll == gameResponse.getPoint()) {\n completeRound(GameEnum.WON);\n return gameResponse;\n } else if (currentRoll == 7) {\n completeRound(GameEnum.LOST);\n return gameResponse;\n }\n }\n return gameResponse;\n }", "public void nextTurn() {\r\n activePlayer = nextPlayer;\r\n advanceNextPlayer();\r\n }", "private static void continueGame()\r\n\t{\r\n\t\tString name = \"\";\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tname = scan(\"Write the name of your game: \");\r\n\t\t\t\r\n\t\t\tif(GameManager.instance().players().contains(name)) break;\r\n\t\t}\r\n\t\t\r\n\t\tGameManager.instance().setCurrentPlayer(name);\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tGameManager.instance().loadGame();\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\t//e.printStackTrace();\r\n\t\t\tSystem.out.println(\"Something happened\");\r\n\t\t}\r\n\t}", "public void play_game()\n {\n\tint r,c;\n\tString action;\n\n\twhile ( _the_board.game_won() == false )\n\t {\n\t\tSystem.out.println( _the_board );\n\n\t\tSystem.out.print(\"col: \");\n\t\tc = _scan.nextInt();\n\t\tSystem.out.print(\"row: \");\n\t\tr = _scan.nextInt();\n\t\tSystem.out.print(\"explore, flag, unflag: \");\n\t\taction = _scan.next();\n\n\t\tif ( action.equals(\"explore\") && \n\t\t _the_board.open_cell(c, r) )\n\t\t {\n\t\t\tSystem.out.println(\"BOOOOOOMMMMM!!!!!!!!!!\");\n\t\t\treturn;\n\t\t }\n\n\t\tif ( action.equals(\"flag\") )\n\t\t _the_board.place_flag(c, r);\n\t\t\n\t\tif ( action.equals(\"unflag\") )\n\t\t _the_board.remove_flag(c, r);\n\t }\n\n\tSystem.out.println(\"You win!!!\");\n }", "public boolean runRound() {\n gameMove();\n // return/check if gameover condiation is meet\n return isGameOver();\n }", "public static void nextTurn(){\n\t\tPlayerButton [][] ary = GameBoard.getPBAry();\n\t\t\n\t\tfor( int x=0; x< ary.length; x++ ){\n\t\t\tfor( int y=0; y<ary[x].length; y++ ){\n\t\t\t\tary[x][y].setMovable( false );\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurr++;\n\t\tif(curr >= players.size())\n\t\t\tcurr=0;\n\n\t\tif(players.get(curr).hasBeenKicked()){\n\t\t\tnextTurn();\n\t\t}\n\t}", "void skipNextPlayer() {\n endTurn();\n }", "private void startNewGame()\n {\n \n \t//this.mIsSinglePlayer = isSingle;\n \n \tmGame.clearBoard();\n \n \tfor (int i = 0; i < mBoardButtons.length; i++)\n \t{\n \t\tmBoardButtons[i].setText(\"\");\n \t\tmBoardButtons[i].setEnabled(true);\n \t\tmBoardButtons[i].setOnClickListener(new ButtonClickListener(i));\n \t\t//mBoardButtons[i].setBackgroundDrawable(getResources().getDrawable(R.drawable.blank));\n \t}\n \n \t\tmPlayerOneText.setText(\"Player One:\"); \n \t\tmPlayerTwoText.setText(\"Player Two:\"); \n \n \t\tif (mPlayerOneFirst) \n \t{\n \t\t\tmInfoTextView.setText(R.string.turn_player_one); \n \t\tmPlayerOneFirst = false;\n \t}\n \telse\n \t{\n \t\tmInfoTextView.setText(R.string.turn_player_two); \n \t\tmPlayerOneFirst = true;\n \t}\n \t\n \n \tmGameOver = false;\n }", "private void endTurn() {\n currentTurn = getNextPlayer();\n }", "public void newTurn() {\n int[] playersAlive = GameEngine.playersAlive();\n if (playersAlive[0] > 0) {\n turnData.clear();\n Die dice = new Die();\n thrown = dice.main();\n turnOnePlayer();\n\n } else {\n GameEngine.theEnd(playersAlive[1]);\n }\n }", "@Override\n public void run() {\n computerTurn();\n }", "public boolean meTurn(){\n return (isWhite && isWhitePlayer) || (!isWhite && !isWhitePlayer);\n }", "public void runTheGame() {\n\t\txPlayer.setOpponent(oPlayer);\n\t\toPlayer.setOpponent(xPlayer);\n\t\tboard.display();\n\t\txPlayer.play();\n\t}", "@Override\n public void play(Coordinate passInCoordinate) {\n checkersBoard.play(passInCoordinate, getCurrentPlayerIndex());\n if (checkersBoard.isFinishARound()) {\n if (checkersBoard.isWinningMove(getCurrentPlayerIndex())) {\n wonGame = true;\n } else {\n updateDatabase();\n playerTakeTurn();\n checkersBoard.resetFinishARound();\n }\n }\n notifyObservers();\n }", "public void arraiter() {\n \tthis.running = false;\n }", "public void playRound(){\n this.gameState = GameController.createGameState(this.game);\n \n // Verifica se o \n if(this.gameState.isEnded()){\n var winner = this.gameState.getPlayerQttCards() == 0 ? this.game.getComputer() : this.game.getPlayer();\n\n this.gameState.setWinner(winner);\n }\n else{\n \n // Mostrando o vira, as manilhas, a quantidade de cartas dos jogadores e as cartas do jogador\n this.view.displayGame(this.gameState);\n\n var playerCardChose = this.getPlayerCardChose();\n var computerCardChose = Utils.generateRandomNumber(getGameState().getComputerQttCards());\n\n try{\n var playerCard = this.game.getPlayer().playCard(playerCardChose);\n var computerCard = this.game.getComputer().playCard(computerCardChose);\n\n var winnerCard = this.verifyBiggerCard(playerCard, computerCard);\n\n // Verificando qual `Player` ganhou e se um ganhou\n\n var hasPlayerWon = winnerCard.equals(playerCard);\n var hasComputerWon = winnerCard.equals(computerCard);\n\n var turnedCard = this.getGameState().getTurnedCard();\n\n // Aqui caso o player tenha ganhado ele recebe a carta do computador e senão ele perde a carta para o computador\n if(hasPlayerWon){\n this.game.getPlayer().earnCard(computerCard);\n this.game.getComputer().loseCard(computerCard);\n }\n else if(hasComputerWon){\n this.game.getComputer().earnCard(playerCard);\n this.game.getPlayer().loseCard(playerCard);\n }\n \n // Na hora de mostrar o vencedor eu verifico se um player venceu, se sim eu mostro vitória ou derrota para o Player\n // Se não eu mostro empate\n \n if(hasComputerWon || hasPlayerWon){\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard, hasPlayerWon);\n }\n else {\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard);\n }\n\n }\n catch(Exception excp){\n this.view.displayMessageError(excp.getMessage());\n\n this.playRound();\n }\n }\n \n }", "public void finishTurn() {\n\t\tthis.cancelTimer();\n\t\t// if any hero is dead\n\t\tif (!opponents[0].isAlive() || !opponents[1].isAlive()) {\n\t\t\t// end the game\n\t\t\tfinishGame();\n\t\t} else {\n\t\t\t// switch turns\n\n\t\t\topponents[activeHero].setIsTurn(false);\n\t\t\topponents[activeHero].deselectAll();\n\n\t\t\tswitch (activeHero) {\n\t\t\tcase 0:\n\t\t\t\tactiveHero = 1;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tactiveHero = 0;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tstartTurn(opponents[activeHero]);\n\t\t}\n\t}", "public void playMove(int turn)\t{\n\t\tString command;\n\t\tint index = -1;\n\t\tCard dealt;\n\t\tCard drawn;\n\t\tboolean illegal = false;\n\t\tSystem.out.println(\"\\n\" + hand[turn].toString() + \"\\n\");\n\t\tSystem.out.println(\"Choose a number, or 'd' for draw, or 'p' for pass.\");\n\t\tcommand = input.nextLine();\n\t\trecord[turn] = command;\n\t\tif(command.equalsIgnoreCase(\"d\"))\t{\n\t\t\tdrawn = deck1.deal();\n\t\t\tif(drawn!=null)\t{\n\t\t\t\thand[turn].addCard(drawn);\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.print(\"\\n+++++No cards in deck!\");\n\t\t\t}\n\t\t\tplayMove(turn);\n\t\t}\n\t\telse if(command.equalsIgnoreCase(\"p\"))\t{\n\t\t\tif(deck1.isEmpty() || !hand[turn].playable(top))\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.print(\"\\n+++++Cannot pass!+++++\\n\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t}\n\t\telse\t{\n\t\t\tif(isNumber(command))\t{\n\t\t\t\tindex = Integer.parseInt(command);\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.println(\"Invalid Command!\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t\tif(index>=0 && index<hand[turn].countCards())\t{\n\t\t\t\tdealt = hand[turn].seekCard(index);\n\t\t\t\tif(top.getValue()!=8)\t{\n\t\t\t\t\tif(top.getSuit().equals(dealt.getSuit()) || \n\t\t\t\t\t\t\ttop.getValue()==dealt.getValue() || \n\t\t\t\t\t\t\tdealt.getValue()==8)\t{\n\t\t\t\t\t\tif(dealt.getValue()==8)\t{\n\t\t\t\t\t\t\tdealt.setSuit(chooseSuit());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\t{\n\t\t\t\t\t\tillegal = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\t{\n\t\t\t\t\tif(dealt.getValue()==8 || \n\t\t\t\t\t\t\ttop.getChosenSuit().equalsIgnoreCase(dealt.getSuit()))\t{\n\t\t\t\t\t\tillegal = false;\n\t\t\t\t\t}\n\t\t\t\t\telse\t{\n\t\t\t\t\t\tillegal = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(illegal)\t{\n\t\t\t\t\tSystem.out.println(\"Illegal Move!\");\n\t\t\t\t\tplayMove(turn);\n\t\t\t\t}\n\t\t\t\telse\t{\n\t\t\t\t\ttop = dealt;\n\t\t\t\t\thand[turn].removeCard(index);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.println(\"Card does not exist!\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "private void changeTurn(){ \r\n\t\tif (currentTurn == 1)\r\n\t\t\tcurrentTurn = 0; \r\n\t\telse\r\n\t\t\tcurrentTurn = 1; \r\n\t}", "public void restart() {\n\t\tmadeMove = false;\n\t\tcurrentPit = -1;\n\t\tnewGame(player1.getName(), player2.getName(), originalCount); \n\t}", "public final void playGame() {\n\t\tSystem.out.println(\"Welcome to \"+nameOfGame+\"!\");\n\t\tsetup(numberOfPlayers);\n\t\tfor(int i = 0; !isGameOver(); i = (i+1) % numberOfPlayers) {\n\t\t\ttakeTurn(i+1);\n\t\t}\n\t\tfinishGame();\n\t}", "@Override\n public boolean isWaitingForTurnPhase() {return true;}", "void playMatch() {\n while (!gameInformation.checkIfSomeoneWonGame() && gameInformation.roundsPlayed() < 3) {\n gameInformation.setMovesToZeroAfterSmallMatch();\n playSmallMatch();\n }\n String winner = gameInformation.getWinner();\n if(winner.equals(\"DRAW!\")){\n System.out.println(messageProvider.provideMessage(\"draw\"));\n }else {\n System.out.println(messageProvider.provideMessage(\"winner\")+\" \"+winner+\"!\");\n }\n }", "public void checkSetPlayerTurn() // Check and if needed set the players turns so it is their turn.\n\t{\n\t\tswitch (totalPlayers) // Determine how many players there are...\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tswitch (gameState)\n\t\t\t{\n\t\t\tcase twoPlayersNowPlayerOnesTurn: // Make sure it's player one's turn.\n\t\t\t\tplayers.get(0).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase twoPlayersNowPlayerTwosTurn: // Make sure it's player two's turn.\n\t\t\t\tplayers.get(1).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "boolean play();", "public void finishGame(){\r\n\t\t\t\tgameStarted = false;\r\n\t\t\t}", "private void start(){\r\n while (!playerWins && lives != 0){\r\n System.out.println(\"(Lives: \" + lives + \")\");\r\n printCharArray(hidden);\r\n System.out.println(\"\\nGuesses: \" + Arrays.toString(guesses.toArray()));\r\n if(!checkGuess(playerGuess())){\r\n lives -= 1;\r\n }\r\n if (checkVictory()){\r\n System.out.println(\"You win!\");\r\n printCharArray(hidden);\r\n System.out.println();\r\n replay();\r\n }\r\n }\r\n System.out.println(\"You lose! The word was: \" + word);\r\n replay();\r\n }", "public void play()\n {\n if(board.getNumberOfDisks() == (board.size()*board.size()))\n {\n playing = false;\n message.setText(\"It is a Tie!\");\n }\n else\n {\n message.setFont(new Font(message.getName(), Font.BOLD, 28));\n int status = board.getStatus();\n if(status == 1)\n {\n errorSound();\n message.setText(\"Outside of boundaries location, try again.\");\n }\n else if(status == 2)\n {\n errorSound();\n message.setText(\"Coordinate already used, try again.\");\n }\n else if (status == 3)\n {\n message.setText(\"Congratulations Player 1, you won!\");\n playWinSound();\n playing = false;\n }\n else if(status == 4)\n {\n message.setText(\"Congratulations Player 2, you won!\");\n playWinSound();\n playing = false;\n }\n else if(status == 0)\n {\n diskAddedsound();\n if(board.getNumberOfDisks() % 2 == 0) {message.setText(\"Player 1 please choose a new position!\");}\n else if (board.getNumberOfDisks() % 2 == 1) {message.setText(\"Player 2 please choose a new position!\");}\n }\n }\n }", "private void play() {\r\n\t\tfor (int i = 0; i < players.length; i++) {\r\n\t\t\tPlayer p = players[i];\r\n\t\t\tif (p instanceof ComputerPlayer) {\r\n\t\t\t\tfirstMove[i] = ((ComputerPlayer) p).makeFirstMove(board);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (firstMove[0] != null && firstMoveScores[0] > 0) {\r\n\t\t\tcalcBestFirstMove();\r\n\t\t}\r\n\r\n\t\twhile (!(board.gameOver())) {\r\n\t\t\t/* \tNIET LANGER NODIG GELOOF IK, DIT KAN DE SERVER (ICM EEN TIMER) DOEN\r\n\r\n\t\t\tplayers[(moveNr + startingPlayer) % players.length].makeMove(board);\r\n\t\t\tserver.updateHand(players[(moveNr + startingPlayer) % players.length],\r\n\t\t\t\t\tplayers[(moveNr + startingPlayer) % players.length].updateHand());\r\n\t\t\tmoveNr++;*/\r\n\t\t}\r\n\t}", "private Player playOneGame() {\n\t\tCountry.Counter = map.countries.size();\n\t\tPlayer winner = null;\n\t\tint turn = 0;\n\t\t\n\t\tstartUpPhase();\n\t\t\n\t\tdo\n\t\t{\n\t\t\tturn++;\n\t\t\tSystem.out.println(\"\\n - TURN \" + turn + \" -\");\n\n\t\t\tfor(Player p : map.players) \n\t\t\t{\n\t\t\t\tif(p.ownedCountries.size() > 0)\n\t\t\t\t{\n\t\t\t\t\treinforcementPhase(p);\n\t\t\t\t\tattackPhase(p);\n\t\t\t\t\t\n\t\t\t\t\tif(map.isOwned()) {\n\t\t\t\t\t\twinner = p;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfortificationPhase(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}while(!map.isOwned() && turn < maximumTurns); /* When map is owned, end of the game */\n\t\t\n\t\treturn winner;\n\t}", "@Override\n public void run() {\n systemTurn();\n }" ]
[ "0.7678249", "0.7509797", "0.7436768", "0.7274493", "0.7170182", "0.70949274", "0.709114", "0.70896757", "0.7065884", "0.700221", "0.69735134", "0.69367987", "0.6926266", "0.6920045", "0.6838507", "0.6834932", "0.68281865", "0.68223107", "0.6818081", "0.68107694", "0.68001777", "0.6761757", "0.6754392", "0.67510974", "0.67241484", "0.67231953", "0.66950834", "0.66822827", "0.66795516", "0.66790426", "0.66738343", "0.66562784", "0.6654216", "0.6640384", "0.6636709", "0.6632661", "0.6628508", "0.6597563", "0.6588849", "0.65857905", "0.6584722", "0.65796113", "0.657754", "0.65770394", "0.6575958", "0.657203", "0.657105", "0.6561774", "0.65573895", "0.6553543", "0.6546024", "0.6543589", "0.6541256", "0.6538671", "0.65232104", "0.65231943", "0.65198237", "0.6517658", "0.65113753", "0.65027857", "0.650081", "0.6500741", "0.6494008", "0.64874744", "0.64855945", "0.6485164", "0.6475558", "0.64737713", "0.64733714", "0.64675725", "0.64652586", "0.6460176", "0.6458946", "0.64573914", "0.6456097", "0.64493424", "0.6444863", "0.6443785", "0.64421", "0.6423022", "0.6414189", "0.6396232", "0.639476", "0.6394561", "0.6394364", "0.6380748", "0.6380495", "0.6379622", "0.63751936", "0.6373019", "0.63693637", "0.636077", "0.63534606", "0.63527083", "0.63475364", "0.6346664", "0.63462603", "0.6333283", "0.63227195", "0.6318424", "0.6317054" ]
0.0
-1
schedule the autonomous command (example) if (autonomousCommand != null) autonomousCommand.start();
public void autonomousInit() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void autonomousInit() {\n\t\tautonomousCommand = new Auto();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}", "@Override\n public void autonomousInit() {\n //ds.set(Value.kForward);\n /*m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n * \n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n //new VisionProcess().start();\n //SmartDashboard.putNumber(\"heerer\", value)\n new TeleOpCommands().start();\n }", "public void autonomousInit() {\n\t\tautonomousCommand.start();\r\n\t}", "public void autonomousInit() {\n if (autonomousCommand != null) autonomousCommand.start();\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 autonomousInit() {\n int sequenceNumber = (int)SmartDashboard.getNumber(\"Autonomous Sequence\");\n \n switch(sequenceNumber) {\n // Move into the Auto Zone\n case 0:\n autonomousCommand = new DirectionalDrive(0.0, -0.5, 1.25);\n break;\n \n // Grab a container and move into the Auto Zone\n case 1:\n autonomousCommand = new ContainerAutonomous();\n break;\n \n // If something else was supplied, do nothing for saftey reasons\n default:\n autonomousCommand = null;\n }\n // Start the autonomous command\n if (autonomousCommand != null) autonomousCommand.start();\n }", "@Override\n public void autonomousInit()\n {\n autonomousCommand = chooser.getSelected();\n \n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n */\n \n // schedule the autonomous command (example)\n if (autonomousCommand != null) \n {\n autonomousCommand.start();\n }\n }", "@Override\n public void autonomousInit() {\n\tgameData.readGameData();\n\tautonomousCommand = (Command) chooserMode.getSelected();\n\tdriveSubsystem.resetEncoders();\n\televatorSubsystem.resetEncoder();\n\t// schedule the autonomous command\n\tif (autonomousCommand != null) {\n\t // SmartDashboard.putString(\"i\", \"nit\");\n\t autonomousCommand.start();\n\t}\n }", "@Override\n public void autonomousInit() {\n //Diagnostics.writeString(\"State\", \"AUTO\");\n //m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\", \"Default\");\n * switch(autoSelected) { case \"My Auto\": autonomousCommand = new\n * MyAutoCommand(); break; case \"Default Auto\": default: autonomousCommand = new\n * ExampleCommand(); break; }\n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n\n teleopInit();\n }", "@Override\n\tpublic void autonomousInit() {\n\t\t//SmartDashboard.getData(\"Driver File\");\n\t\t//SmartDashboard.getData(\"Operator File\");\n\t\tautonomousCommand = chooser.getSelected();\n\t\tisAutonomous = true;\n\t\tisTeleoperated = false;\n\t\tisEnabled = true;\n\t\tRobot.numToSend = 3;\n\t\tdrivebase.resetGyro();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tRobot.gearManipulator.gearManipulatorPivot.setPosition(0);\n\t\tRobot.gearManipulator.gearManipulatorPivot.setSetpoint(0);\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}", "@Override\n\tpublic void autonomousInit() //initialization of the autonomous code\n\t{\n\t\t//m_autonomousCommand = m_chooser.getSelected();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (m_autonomousCommand != null) //if we have any autonomous code, start it\n\t\t{\n\t\t\tm_autonomousCommand.start();\n\t\t}\n\t\tRobotMap.encoderLeft.reset(); //reset the values of the encoder\n\t\tRobotMap.encoderRight.reset(); //reset the values of the encoder\n\t\tultrasonic.getInitialDist(); //if nullPointerException, use \"first\" boolean inside the method and run in periodic()\n\t}", "@Override\n\tpublic void autonomousPeriodic() //runs the autonomous mode, repeating every 20ms\n\t{\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n\t\tdriveExecutor.execute(); //running the execute() method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}", "@Override\n public void autonomousInit() {\n\n Robot.m_driveTrain.driveTrainLeftFrontMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainRightFrontMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainRightRearMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainLeftRearMotor.setSelectedSensorPosition(0);\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n */\n\n // schedule the autonomous command (example)\n }", "public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }", "public void autonomousPeriodic() \n {\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 }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousInit() {\n\n autonomousCommand = new Autonomous(start.getSelected(), chooser.getSelected());\n \n autonomousCommand.start();\n }", "public void autonomousInit(){\n\t \t//resetAndDisableSystems();\n\t\t \n\t \tautonomousCommand = (Command) autoChooser.getSelected();\n\t \tautonomousCommand.start();\n\t \t\n\t \t\n\t }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t\t\n\t\t// runs the autonomous smartdashboard display for auton\n\t\tActuators.getLeftDriveMotor().setEncPosition(0);\n\t\tActuators.getRightDriveMotor().setEncPosition(0);\n\t\tautonomousCommand = (Command) autoChooser.getSelected();\n\t\t\n//\t\tbackupCommand = (Command) backupChooser.getSelected();\n//\t\tActuators.getLeftDriveMotor().changeControlMode(TalonControlMode.MotionProfile);\n//\t\tActuators.getRightDriveMotor().changeControlMode(TalonControlMode.MotionProfile);\n//\t\tif (NetworkTables.getControlsTable().getBoolean(\"camera0\", false)) {//Auto for working camera\n\t\t\n\t\tif(autonomousCommand != null){\t\n\t\t\tSystem.out.println(autonomousCommand);\n\t\t\tautonomousCommand.start();\n\t\t}\n\t\t\n//\t\t\tSystem.out.println(\"I got here auto Command start\");\n//\t\t\t}\n//\t\telse{\n//\t\t\tbackupCommand.start();\t\t\t\n//\t\t}\n//\t\t\tDrive.driveWithPID(distance, distance);\n\n\t\tstate = \"auton\";\n\t\t// autoSelected = chooser.getSelected();\n\t\t// // autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t// // defaultAuto);\n\t\t// System.out.println(\"Auto selected: \" + autoSelected);\n\t\tNetworkTables.getControlsTable().putBoolean(\"auton\", true);\n\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.start();\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}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n public void autonomousPeriodic() {\n \n //Switch is used to switch the autonomous code to whatever was chosen\n // on your dashboard.\n //Make sure to add the options under m_chooser in robotInit.\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n if (m_timer.get() < 2.0){\n m_driveTrain.arcadeDrive(0.5, 0); //drive forward at half-speed\n } else {\n m_driveTrain.stopMotor(); //stops motors once 2 seconds have elapsed\n }\n break;\n }\n }", "public void autonomousPeriodic() {\n \tauto.autonomousPeriodic();\n\t}", "public void autonomousInit() {\n //autonomousCommand = (Command) chooser.getSelected();\n autoLoopCounter = 0; //This resets the loop counter to 0\n //if (autonomousCommand != null) autonomousCommand.start();\n }", "@Override\r\n public void robotPeriodic() {\r\n // Runs the Scheduler. This is responsible for polling buttons, adding newly-scheduled\r\n // commands, running already-scheduled commands, removing finished or interrupted commands,\r\n // and running subsystem periodic() methods. This must be called from the robot's periodic\r\n // block in order for anything in the Command-based framework to work.\r\n CommandScheduler.getInstance().run();\r\n }", "public void autonomousPeriodic() {\n if (m_apFirstRun) {\n System.out.println(\"Default autonomousPeriodic() method... Override me!\");\n m_apFirstRun = false;\n }\n }", "@Override\n public void robotPeriodic() {\n // Runs the Scheduler. This is responsible for polling buttons, adding newly-scheduled\n // commands, running already-scheduled commands, removing finished or interrupted commands,\n // and running subsystem periodic() methods. This must be called from the robot's periodic\n // block in order for anything in the Command-based framework to work.\n CommandScheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@Override\n public void teleopInit() {\n\t// This makes sure that the autonomous stops running when\n\t// teleop starts running. If you want the autonomous to\n\t// continue until interrupted by another command, remove\n\t// this line or comment it out.\n\tif (autonomousCommand != null) {\n\t autonomousCommand.cancel();\n\t}\n }", "@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n drive.updateAuto();\n sensor.updateAuto();\n }", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }", "public static void startAuto(){\n cancelAuto();\n //Turn our ID into a Command\n \tswitch(autonomousChooser.getSelected()){\n case 0:\n command = new BaseLine();\n break;\n default:\n\t\t\t\tSystem.out.println(\"No auto picked\");\n command = null;\n }\n //Run the Command\n\t\tif (command != null){\n\t\t\tcommand.start();\n\t\t}\n }", "public void autonomousInit() {\n autonomousCommand = (Command) autoChooser.getSelected();\n autonomousCommand.start();\n// \n }", "public void autonomousInit() {\n\t\tswitch (autoMode) {\r\n\t\tcase 0:\r\n\t\t\tauto = new G_NoAuto();\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tauto = new G_Step();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tauto = new G_BlockThenFour();\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tauto = new G_BinTwoLeft();\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tauto = new G_StepBinCentre();\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tauto = new G_StepBinLeft();\t\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tauto = new G_Block();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t//Start the chosen Autonomous command. \r\n\t\tauto.start();\r\n\t\t//Cancel the tele-op command, in case it was running before autonomous began. \r\n\t\tteleop.cancel();\r\n\t\t// Start pushing sensor readings to the SD.\r\n\t\treadings.start();\r\n\r\n\t}", "@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 autonomousPeriodic() {\n \tswitch(autoSelected) {\n \tcase customAuto:\n //Put custom auto code here \n break;\n \tcase defaultAuto:\n \tdefault:\n \t//Put default auto code here\n break;\n \t}\n }", "public void autonomousPeriodic() {\n // RobotMap.helmsman.trackPosition();\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "@Override\n\tpublic void autonomousInit() {\n\t\tselectedAutonomousCommand = new AutoModeCommandGroup(autoChooser.getSelected());\n\t\tif (selectedAutonomousCommand!=null) {\n\t\t\tselectedAutonomousCommand.start();\n\t\t}\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void autonomousPeriodic() {\r\n }", "public void autonomousPeriodic() {\r\n }", "public void autonomousInit() {\n Jagbot.isAutonomous = true;\n int mode = (int)SmartDashboard.getNumber(RobotMap.Autonomous.MODE_KEY);\n switch (mode) {\n case 0:\n System.out.println(\"Standing still\");\n new StandStill().start();\n break;\n case 1:\n System.out.println(\"Driving forward\");\n new DriveStraight(1).start();\n break;\n \n case 2:\n System.out.println(\"Turning left and shooting to score\");\n new TurnAndScore(-1).start();\n break;\n case 3:\n System.out.println(\"Turning right and shooting to score\");\n new TurnAndScore(1).start();\n break;\n }\n }", "public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }", "public void autonomousPeriodic() {\n \n }", "public AutoAim(TurretSubsystem turret, ShooterSubsystem shooter, LED led) {\n // Add your commands in the super() call, e.g.\n // super(new FooCommand(), new BarCommand());\n super(\n // aim towards thing\n new RunCommand(\n () -> {\n turret.turretAuto();\n //System.out.println(\"aiming with turret\");\n },\n turret\n ),\n\n new ShooterSetSpeedPIDF(shooter, true),\n\n new RunCommand(() -> {\n led.turnOnLED();\n }) {\n @Override\n public void end(boolean interrupted) {\n led.turnOffLED();\n }\n }\n \n // start shooter motor\n );\n this.turret = turret;\n this.shooter = shooter;\n this.led = led;\n }", "public void autonomousInit() {\n\t\ttimer.start();\n\t\tautonomousCommand = autoChooser.getSelected();\n\t\t//This outputs what we've chosen in the SmartDashboard as a string.\n\t\tSystem.out.println(autonomousCommand);\n\t\tif (DriverStation.getInstance().isFMSAttached()) {\n\t\t\tgameData = DriverStation.getInstance().getGameSpecificMessage();\n\t\t}\n\t\telse {\n\t\t\tgameData=\"RLR\";\n\t\t}\n\t\t//armSwing.setAngle(90); //hopefully this will swing the arms down. not sure what angle it wants though\n\t}", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "public void autonomousPeriodic()\r\n {\r\n \r\n }", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "public void autonomousPeriodic() {\n\n }", "public void autonomousPeriodic() {\n\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Left Speed\", Robot.driveSubsystem.getLeftSpeed());\n\t\tSmartDashboard.putNumber(\"Right Speed\", Robot.driveSubsystem.getRightSpeed());\n\n\t\tScheduler.getInstance().run();\n\t}", "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 }", "@Override\n\tpublic void autonomousInit() {\n\t\tvision_.startGearLiftTracker(15);\n\t\tgyro_.reset();\n\t\tautoCommand = (Command) autoChooser.getSelected();\n\t\tif(autoCommand != null)\n\t\t{\n\t\t\tautoCommand.start();\n\t\t}\n\t}", "@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}", "public void autonomousPeriodic() {\r\n \r\n }", "@Override\n\tpublic void teleopInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.cancel();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tSmartDashboard.putString(\"DT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTER Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTERPIVOT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"INTAKE Current Command\", \" \");\n\t\t\n\t\tScheduler.getInstance().run();\n//\t\t\n//\t\tRobot.drivetrain.leftLED.set(true);\n//\t\tRobot.drivetrain.rightLED.set(false);\n\n\t\tif(!autoAiming) {\n\t\t\tnew DriveForwardRotate(correctForDeadZone(oi.driver.getForward()), correctForDeadZone(oi.driver.getRotation())).start();\n\t\t}\n\t\t//new DriveForwardRotate(oi.driver.getForward(), oi.driver.getRotation()).start();\n\t\t\n\t\tif(oi.autoAim() && !prevStateAutoAim){\n\t\t\t//new SetPivotPosition(PivotPID.AUTO_CAMERA_AIM_POSITION).start(\n//\t\t\tnew AutoAim().start();\n\t\t\tnew AutoAim(TurnConstants.AIM_VELOCITY).start(); //this is a press and hold button 3 on joystick\n\t\t\t\n\t\t}\n\t\t\n\t\tif (readyToShoot && oi.operator.shootBallFlywheels() && oi.operator.shoot()){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- ready to shoot\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\t//INTAKE ------2 button\n\t\tif (oi.operator.intakeUp() && !prevStateIntakeUp){\n\t\t\tnew SetIntakePosition(IntakeSubsystem.UP).start();\n\t\t}\n\t\tif (oi.operator.intakeDeploy() && !prevStateIntakeDeployed){\n\t\t\tnew SetIntakePosition(!IntakeSubsystem.UP).start();\n\t\t}\n\t\t\n\t\t//CAMERA PISTON\n\t\t\n\t\t//move up\n\t\tif (oi.driver.isCameraUpPressed()){\n\t\t\tnew SetCameraPiston(CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\telse{\n\t\t\tnew SetCameraPiston(!CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\t\n//\t\tif (oi.driver.isCameraUpPressed() && !prevStateCameraUp){\n//\t\t\tnew SetCameraPiston(cameraUp ? !CameraSubsystem.CAM_UP : CameraSubsystem.CAM_UP).start();\n//\t\t\tcameraUp = !cameraUp;\n//\t\t}\n//\t\telse{\n//\t\t\tnew SetCameraPiston(cameraUp ? CameraSubsystem.CAM_UP : !CameraSubsystem.CAM_UP).start();\n//\t\t}\n\t\t\n\t\t\n\t\tif (oi.operator.isSemiAutonomousIntakePressed() && !prevStateSemiAutoIntake){\n\t\t\tnew SemiAutoLoadBall().start();\n\t\t}\n//\t\t\n\t\t\n\t\t//pivot state\n//\t\tif (oi.operator.pivotShootState() && !prevStatePivotUp){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n//\t\t}\n//\t\telse if(oi.operator.resetPivot() && !prevStateResetButton) {\n//\t\t\t new ResetPivot().start();\n//\t\t}\n//\t\telse if (oi.operator.pivotStoreState() && !prevStatePivotMiddle){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n//\t\t}\n\t\t\n\t\t//PIVOT\n\t\t\n\t\t//if going up\n\t\tif (oi.operator.pivotCloseShot() && !prevStatePivotCloseShot){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.CLOSE_SHOOT_STATE).start();\t\t\n\t\t}\n\t\t//if going down\n\t\telse if(oi.operator.pivotFarShot() && !prevStatePivotFarShot) {\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotStoreState()&& !prevStateStore){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotReset() && !prevStateResetSafety){\n\t\t\tnew ResetPivot().start();\n\t\t}\n\t\telse if (oi.driver.isDefenseShot() && prevStateDefenseShot){\n\t\t\tnew SetPivotPosition(ShooterPivotSubsystem.PivotPID.ANTI_DEFENSE_POSITION).start();\n\t\t}\n\t\n\t\t\n\t\tif (!semiAutoIsRunning){\n//\t\t\n\t\t\t//intake purging/running\n\t\t\tif(oi.operator.purgeIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_PURGE_SPEED, IntakeSubsystem.CENTERING_MODULE_PURGE_SPEED).start(); \n\t\t\t\tnew RunAllRollers(ShooterSubsystem.OUT, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else if (oi.operator.runIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_INTAKE_SPEED, IntakeSubsystem.CENTERING_MODULE_INTAKE_SPEED).start();\n\t\t\t\tnew RunAllRollers(ShooterSubsystem.IN, ShooterSubsystem.UNTIL_IR).start();\n//\t\t\t\tnew SemiAutoLoadBall().start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else {\n\t\t\t\t//just the intakes off here to avoid conflicts\n\t\t\t\tnew SetIntakeSpeed(IntakeSubsystem.INTAKE_OFF_SPEED, IntakeSubsystem.INTAKE_OFF_SPEED).start();\n\t\t\t\t//new EndSemiAuto(true).start();\n\t\t\t\t//new RunAllRollers(ShooterSubsystem.OFF, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = false;\n\t\t\t}\n\t\t\t\n\t\t\t//flywheel control\n\t\t\tif (!allIntakeRunning){\n//\t\t\t\tif(oi.operator.loadBallFlywheels()){\n//\t\t\t\t\tnew SetFlywheels(ShooterSubsystem.FLYWHEEL_INTAKE_POWER, -ShooterSubsystem.FLYWHEEL_INTAKE_POWER).start();;\n//\t\t\t\t\tflywheelShootRunning = true;\n//\t\t\t\t} else \n\t\t\t\tif(oi.operator.shootBallFlywheels()) {\n\t\t\t\t\t//new SetFlywheels(0.7, -0.7).start();\n\t\t\t\t\tnew BangBangFlywheels(true).start();\n\t\t\t\t\tflywheelShootRunning = true;\n\t\t\t\t} else {\n\t\t\t\t\t//new SetFlywheels(0, 0).start();//BangBangFlywheels(false).start();\n\t\t\t\t\tflywheelShootRunning = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tif(oi.operator.shoot()){\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kForward).start();\n//\t\t\t} else {\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kReverse).start();\n//\t\t\t}\n//\t\t\t\n\t\t\tif (!allIntakeRunning && !flywheelShootRunning){\n\t\t\t\tnew SetFlywheels(0, 0).start();\n\t\t\t}\n\t\t\t\n\t\t\t//DEFENSE STATE\n\t\t\tif (oi.operator.isDefenseState() && !prevStateDefenseMode){\n\t\t\t\tnew SetDefenseMode().start();\n\t\t\t}\n\t\t}\n\t\t//tells us if bang bang works\n\t\treadyToShoot = ((Math.abs(shooter.getRightFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance)\n\t\t\t\t&& (Math.abs(shooter.getLeftFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance));\n\t\t\n\t\t\n\t\tif (oi.operator.isManualFirePiston() && !prevStateManualFirePiston){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- manual\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\tif(oi.driver.isDrivetrainHighGearButtonPressed()){\n\t\t\tdrivetrain.shift(DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = DrivetrainSubsystem.HIGH_GEAR;\n\t\t} else {\n\t\t\tdrivetrain.shift(!DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = !DrivetrainSubsystem.HIGH_GEAR;\n\t\t}\n\t\t\n\t\tisManualPressed = oi.operator.isManualOverrideOperator();\n\t\t\n\t\tif (!shooterPIDIsRunning){\n\t\t\tif(isManualPressed) {\n\t\t\t\tdouble pivotPower = oi.operator.getManualPower()/2.0;\n\t\t\t\t//shooterPivot.engageBrake(false);\n\t\t\t\tif (pivotPower > 0 && shooterPivot.pastMax() || pivotPower < 0 && shooterPivot.lowerLimitsTriggered()){\n\t\t\t\t\tpivotPower = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnew SetPivotPower(pivotPower).start();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnew SetPivotPower(0).start();\n\t\t\t}\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"Left: \" + Robot.drivetrain.motors[2].get() + \", Right: \" + (-Robot.drivetrain.motors[0].get()));\n//\t\tSystem.out.println(\"Left V: \" + Robot.drivetrain.leftEncoder.getRate() + \", Right V: \" + Robot.drivetrain.rightEncoder.getRate());\n//\t\tSystem.out.println(\"Accel z: \" + Robot.drivetrain.accel.getZ());\n\t\t\n\t\t\n\t\t//PREV STATES\n\t\tprevStateIntakeUp = oi.operator.intakeUp();\n\t\tprevStateIntakeDeployed = oi.operator.intakeDeploy();\n\t\tprevStateDriveShifter = oi.driver.isDrivetrainHighGearButtonPressed();\n\t\tprevStateShootButton = oi.operator.shoot();\n\t\t\n\t\tprevStatePivotCloseShot = oi.operator.pivotCloseShot();\n\t\tprevStatePivotFarShot = oi.operator.pivotFarShot();\n\t\tprevStateStore = oi.operator.pivotStoreState();\n\t\tprevStateResetSafety = oi.operator.pivotReset();\n\t\t\n\t\tprevStateSemiAutoIntake = oi.operator.isSemiAutonomousIntakePressed();\n\t\tprevStateDefenseMode = oi.operator.isDefenseState();\n\t\t\n\t\tprevStateManualFirePiston = oi.operator.isManualFirePiston();\n\t\tprevStateCameraUp = oi.driver.isCameraUpPressed();\n\t\tprevStateAutoAim = oi.autoAim();\n\t\tprevStateDefenseShot = oi.driver.isDefenseShot();\n\n\t\t\n\t\t//********updating subsystem*******//\n\t\t\n\t\t//shooter hal effect counter\n\t\t//shooterPivot.updateHalEffect();\n\t\t\n\t\t//update the flywheel speed constants\n\t\tshooter.updateShooterConstants();\n\t\t\n\t\t\n\t\t//brake\n\t\tif (!isManualPressed){ //if manual override isn't running\n\t\t\tif (!shooterPIDIsRunning && shooterPivot.motorLeft.get() < DEAD_ZONE_TOLERANCE && shooterPivot.motorRight.get() < DEAD_ZONE_TOLERANCE){\n\t\t\t\t\n\t\t\t\tif (pivotTimer.get() > MIN_STOPPED_TIME){\n\t\t\t\t\tnew EngageBrakes().start();\n\t\t\t\t}\n\t\t\t\t//if motor is 0 for the first time, start the timer\n\t\t\t\tif (!prevStateMotorPowerIs0){\n\t\t\t\t\tpivotTimer.reset();\n\t\t\t\t\tpivotTimer.start();\n\t\t\t\t}\n\t\t\t\t//keep this at the end\n\t\t\t\tprevStateMotorPowerIs0 = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshooterPivot.engageBrake(false);\n\t\t\t\t//keep this at the end\n\t\t\t\tpivotTimer.reset();\n\t\t\t\tprevStateMotorPowerIs0 = false;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tshooterPivot.engageBrake(false);\n\t\t\tpivotTimer.reset();\n\t\t}\n\t\t//System.out.println(shooterPivot.motorLeft.get());\n\t\t\n\t\t//LOGGING AND DASHBOARD\n\t\tlogAndDashboard();\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 }", "protected void execute() {\n command.start();\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n\n }\n\n controllerMap.controllerMapPeriodic();\n }", "@Override\n public void teleopInit() {\n if (autonomousCommand != null) \n {\n autonomousCommand.cancel();\n }\n\n new ArcadeDrive().start();\n\n new BackElevatorControl().start();\n\n new IntakeControl().start();\n\n new FrontElevatorManual().start();\n\n new ElevatorAutomatic().start();\n }", "void doManualStart();", "public AutonomousCommand(LiftSubsystem m_lift, ArmSubsystem m_arm, Shooter m_shooter, DriveSubsystem m_drive,\n HopperSubsystem m_hopper, Intake m_intake) {\n // Add your commands in the super() call, e.g.\n // super(new FooCommand(), new BarCommand());\n // alongwith- birlikte çalıştırmak için // withtimeout-- girdigin sure kadar\n // yapar\n // (new RunShooter(m_shooter, 1).withTimeout(0.75),new RunLift(m_lift,\n // 0.5).raceWith(new RunHopper(m_hopper, 0.8)),\n // new AutonomousDrive(m_drive, 0.8, 300).withTimeout(3));\n\n super(new RunShooter(m_shooter, 0.8).withTimeout(0.75),\n new RunShooter(m_shooter, 0.8).raceWith(new RunHopper(m_hopper, 0.8)).withTimeout(2.5),\n new AutonomousDrive(m_drive, -0.8, -300).raceWith(new RunIntake(m_intake, 0.8)\n .raceWith(new RunHopper(m_hopper, 0.8).raceWith(new RunShooter(m_shooter, 0.3),\n new AutonomousDrive(m_drive, 0.8, 300), new RunShooter(m_shooter, 0.8).withTimeout(0.75),\n new RunShooter(m_shooter, 0.8).raceWith(new RunHopper(m_hopper, 0.8).withTimeout(2.5))))));\n\n }", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n // Elevator.getInstance().setPosition(10000, count);\n // System.out.println(\"COUNT IS: \" + count);\n // count += 0.0001;\n\n Scheduler.getInstance().run();\n\n // if(Math.abs(OI.getInstance().getForward()) > 0.2){\n // autonCommand.cancel();\n // mAutoCancelled = true;\n // }\n\n // if(mAutoCancelled){\n // if(mInitCalled){\n // teleopPeriodic();\n // }\n // }\n\n // System.out.println(Drivetrain.getInstance().getRobotPos().getHeading());\n\n // System.out.println(Drivetrain.getInstance().getLeftMaster().getClosedLoopError() + \"\\t\\t\\t\" + Drivetrain.getInstance().getRightMaster().getClosedLoopError());\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tlog();\n\t}", "public void autonomousPeriodic() {\n //Scheduler.getInstance().run();\n /** if(autoLoopCounter < 100) { //Checks to see if the counter has reached 100 yet\n myRobot.drive(-0.5, 0.0); //If the robot hasn't reached 100 packets yet, the robot is set to drive forward at half speed, the next line increments the counter by 1\n autoLoopCounter++;\n } else {\n myRobot.drive(0.0, 0.0); //If the robot has reached 100 packets, this line tells the robot to stop\n }*/\n }", "@Override\n public void autonomousPeriodic() {\n\t// updateDiagnostics();9\n\tScheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "protected void execute() {\n\t\tif(RobotMap.gearDoorExtended)\n\t\t\tgearSubsystem.retractPiston();\n\t\telse\n\t\t\tif(Robot.oi.getRightStick().getTrigger() || auton)\n\t\t\t\tgearSubsystem.extendPiston();\n\t\t\n\t}", "@Override\n public void robotPeriodic() {\n // Runs the Scheduler. This is responsible for polling buttons, adding newly-scheduled\n // commands, running already-scheduled commands, removing finished or interrupted commands,\n // and running subsystem periodic() methods. This must be called from the robot's periodic\n // block in order for anything in the Command-based framework to work.\n CommandScheduler.getInstance().run();\n getRobotContainer().getTecbotSensors().sensorsPeriodic();\n }", "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "@Override\n\tpublic void teleopInit() {\n\n\t\tSystem.out.println(\"Teleop init\");\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\tScheduler.getInstance().add(new DriveCommand());\n\n\t\t\n\t}", "public void teleopPeriodic() {\n \t//getInstance().run();;\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above\n \tScheduler.getInstance().run();\n\t\n }", "@Override\n\tpublic void teleopPeriodic() //runs the teleOp part of the code, repeats every 20 ms\n\t{\n\t\tScheduler.getInstance().run(); //has to be here, I think that this is looping the method\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the SmartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n//\t\tSmartDashboard.putBoolean(\"allOK\", Robot.driveFar.ultrasonicOK);\n\t\tdriveExecutor.execute(); //running the execute method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}", "@Override\n public void execute() {\n Time.sleep(3000);\n Starting.execute();\n }", "protected void execute() {\r\n if (machineState != 5) {\r\n shootAtBeginAutonomous();\r\n } else if (machineState == 5) {\r\n if (!lineFound()) {\r\n initalizeFeederAndShooter();\r\n Robot.chassis.driveMecanumNormalized(-0.5, 0, 0);\r\n } else {\r\n driveOnLine();\r\n shootOnce();\r\n }\r\n }\r\n }" ]
[ "0.7643098", "0.7372982", "0.7313", "0.7287944", "0.7261039", "0.7232339", "0.72221684", "0.7189703", "0.71843475", "0.7179614", "0.7177656", "0.71716505", "0.7142132", "0.6959022", "0.6922506", "0.68986493", "0.68929327", "0.6870796", "0.6870796", "0.6870796", "0.6870796", "0.6870796", "0.6870796", "0.6865332", "0.68204826", "0.67780197", "0.67753047", "0.67724633", "0.6765555", "0.6765555", "0.6765555", "0.6765555", "0.6691003", "0.66888446", "0.6634363", "0.6626538", "0.66216415", "0.6615253", "0.66122156", "0.65861493", "0.6577968", "0.65689087", "0.65480417", "0.65340096", "0.65277416", "0.65097237", "0.64965427", "0.6482855", "0.64816135", "0.6476233", "0.6462534", "0.64600015", "0.6450284", "0.6450284", "0.6450284", "0.6441722", "0.6441722", "0.64271545", "0.6421838", "0.6421838", "0.64199424", "0.64161724", "0.64146006", "0.6383247", "0.6346739", "0.6346739", "0.6346739", "0.6346739", "0.6326019", "0.63027275", "0.6258893", "0.6258893", "0.62114525", "0.6206562", "0.61988246", "0.6177231", "0.6167619", "0.61664623", "0.6159632", "0.6144348", "0.6144211", "0.6107192", "0.6104701", "0.61037517", "0.6092572", "0.60919315", "0.60889477", "0.6033659", "0.6032334", "0.6025665", "0.60079557", "0.60079557", "0.60079557", "0.59870166", "0.5986792", "0.5964492", "0.5961678", "0.59600806", "0.59581745", "0.59546137", "0.59418416" ]
0.0
-1
This function is called periodically during autonomous
public void autonomousPeriodic() { Scheduler.getInstance().run(); drive.updateAuto(); sensor.updateAuto(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n \n }", "public void autonomousPeriodic()\r\n {\r\n \r\n }", "public void autonomousPeriodic() {\r\n }", "public void autonomousPeriodic() {\r\n }", "public void autonomousPeriodic() {\n \n }", "public void autonomousPeriodic() {\n \tauto.autonomousPeriodic();\n\t}", "public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\n // RobotMap.helmsman.trackPosition();\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n\n }", "public void autonomousPeriodic() {\n\n }", "public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }", "public void autonomousPeriodic() {\r\n \r\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 }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }", "public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "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}", "@Override\n public void autonomousPeriodic() {\n\t// updateDiagnostics();9\n\tScheduler.getInstance().run();\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}", "public void autonomousPeriodic() {\n if (m_apFirstRun) {\n System.out.println(\"Default autonomousPeriodic() method... Override me!\");\n m_apFirstRun = false;\n }\n }", "@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@Override\npublic void autonomousPeriodic() {\n\n}", "@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\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}", "@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}", "@Override\n\tpublic void autonomousPeriodic() //runs the autonomous mode, repeating every 20ms\n\t{\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n\t\tdriveExecutor.execute(); //running the execute() method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}", "@Override\n public void autonomousPeriodic()\n {\n commonPeriodic();\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void periodic() {\n UpdateDashboard();\n }", "public void autonomousPeriodic() {\n //Scheduler.getInstance().run();\n /** if(autoLoopCounter < 100) { //Checks to see if the counter has reached 100 yet\n myRobot.drive(-0.5, 0.0); //If the robot hasn't reached 100 packets yet, the robot is set to drive forward at half speed, the next line increments the counter by 1\n autoLoopCounter++;\n } else {\n myRobot.drive(0.0, 0.0); //If the robot has reached 100 packets, this line tells the robot to stop\n }*/\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "@Override\n public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n log();\n }", "@Override\n\tpublic void robotPeriodic() {\n\t}", "@Override\n\tpublic void robotPeriodic() {\n\t}", "public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tlog();\n\t}", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\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 teleopPeriodic() {\n \t//getInstance().run();;\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above\n \tScheduler.getInstance().run();\n\t\n }", "@Override\n public void autonomousPeriodic() {\n \n //Switch is used to switch the autonomous code to whatever was chosen\n // on your dashboard.\n //Make sure to add the options under m_chooser in robotInit.\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n if (m_timer.get() < 2.0){\n m_driveTrain.arcadeDrive(0.5, 0); //drive forward at half-speed\n } else {\n m_driveTrain.stopMotor(); //stops motors once 2 seconds have elapsed\n }\n break;\n }\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Left Speed\", Robot.driveSubsystem.getLeftSpeed());\n\t\tSmartDashboard.putNumber(\"Right Speed\", Robot.driveSubsystem.getRightSpeed());\n\n\t\tScheduler.getInstance().run();\n\t}", "public void updatePeriodic() {\r\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 }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }" ]
[ "0.8242393", "0.8238804", "0.8235853", "0.8235853", "0.8235853", "0.820495", "0.8199907", "0.8194021", "0.8194021", "0.8151588", "0.8147766", "0.81250346", "0.81250346", "0.80807847", "0.8016792", "0.8016792", "0.79744554", "0.79655135", "0.7948241", "0.7948241", "0.7948241", "0.7948241", "0.7948241", "0.7948241", "0.7943544", "0.79032373", "0.78828543", "0.77641433", "0.77600986", "0.7759355", "0.77590984", "0.77569574", "0.7660986", "0.7649747", "0.76439685", "0.76273406", "0.7605097", "0.7603722", "0.758448", "0.75753826", "0.7555205", "0.7555205", "0.7555205", "0.7555205", "0.7537244", "0.75159377", "0.75070035", "0.75070035", "0.75070035", "0.75070035", "0.75070035", "0.75070035", "0.74829936", "0.7457939", "0.7456864", "0.74545246", "0.743304", "0.7385487", "0.7385487", "0.7343646", "0.7335342", "0.72733426", "0.72733426", "0.7264387", "0.72604746", "0.72574127", "0.72546506", "0.7238183", "0.722407", "0.7209448", "0.7209448", "0.7209448", "0.7209448", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939" ]
0.8177311
9
This makes sure that the autonomous stops running when teleop starts running. If you want the autonomous to continue until interrupted by another command, remove this line or comment it out. if (autonomousCommand != null) autonomousCommand.cancel();
public void teleopInit() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void teleopInit() {\n\t// This makes sure that the autonomous stops running when\n\t// teleop starts running. If you want the autonomous to\n\t// continue until interrupted by another command, remove\n\t// this line or comment it out.\n\tif (autonomousCommand != null) {\n\t autonomousCommand.cancel();\n\t}\n }", "@Override\n public void teleopInit() {\n if (m_autonomousCommand != null) {\n m_autonomousCommand.cancel();\n }\n }", "@Override\n public void teleopInit()\n {\n if (autonomousCommand != null)\n {\n autonomousCommand.cancel();\n }\n }", "public void teleopInit() {\n autonomousCommand.cancel();\n }", "public void teleopInit() {\n\t\tautonomousCommand.cancel();\r\n\t}", "public void teleopInit() {\n if (autonomousCommand != null) autonomousCommand.cancel();\n }", "public void teleopInit() {\n if (autonomousCommand != null) autonomousCommand.cancel();\n }", "@Override\n public void teleopInit() {\n if (autonomousCommand != null) autonomousCommand.cancel();\n \n\t\tprocessRobotModeChange(RobotMode.TELEOP);\n }", "@Override\n\tpublic void teleopInit() //initialization of the teleoperated code\n\t{\n\t\tif (m_autonomousCommand != null) //if we have any autonomous code, end it\n\t\t{\n\t\t\tm_autonomousCommand.cancel();\n\t\t}\n\n\t}", "@Override\n public void teleopInit() {\n if (autonomousCommand != null) \n {\n autonomousCommand.cancel();\n }\n\n new ArcadeDrive().start();\n\n new BackElevatorControl().start();\n\n new IntakeControl().start();\n\n new FrontElevatorManual().start();\n\n new ElevatorAutomatic().start();\n }", "protected void initialize() {\n \tRobot.autonomous_command_group.cancel();\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}", "@Override\n\tpublic void teleopInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.cancel();\n\t}", "public void teleopInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\t\n//\t\tif ((intake.intakeIsUp() || intake.intakeSolenoidIsOff()) && shooterArm.getAngle() > 45) {\n//\t\t\traiseArm90.start();\t\t\t\n//\t\t}\n\t\tshooterArm.setBrakeOff();\n\t\t\n\t\tvision.enableCameraSaving();\n\t\tvision.setCameraPeriod(1);\n\t}", "@Override\n\tpublic void teleopInit() {\n\n\t\tSystem.out.println(\"Teleop init\");\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\tScheduler.getInstance().add(new DriveCommand());\n\n\t\t\n\t}", "@Override\n\tpublic void testInit() {\n\t\tif (autonomousCommand != null)\n ((Command) autonomousCommand).cancel();\n \n\t\tprocessRobotModeChange(RobotMode.TEST);\n\t}", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n // Elevator.getInstance().setPosition(10000, count);\n // System.out.println(\"COUNT IS: \" + count);\n // count += 0.0001;\n\n Scheduler.getInstance().run();\n\n // if(Math.abs(OI.getInstance().getForward()) > 0.2){\n // autonCommand.cancel();\n // mAutoCancelled = true;\n // }\n\n // if(mAutoCancelled){\n // if(mInitCalled){\n // teleopPeriodic();\n // }\n // }\n\n // System.out.println(Drivetrain.getInstance().getRobotPos().getHeading());\n\n // System.out.println(Drivetrain.getInstance().getLeftMaster().getClosedLoopError() + \"\\t\\t\\t\" + Drivetrain.getInstance().getRightMaster().getClosedLoopError());\n }", "public void teleopInit()\n\t{\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\tif (secondAuton != null)\n\t\t\tsecondAuton.cancel();\n\t\tif (isAuton && auton == \"Left\")\t{\n\t\t\tpostAuton.start();\n\t\t\tisAuton = false;\n\t\t}\n\t\tconveyor.setPlate(true);\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t\t//SmartDashboard.getData(\"Driver File\");\n\t\t//SmartDashboard.getData(\"Operator File\");\n\t\tautonomousCommand = chooser.getSelected();\n\t\tisAutonomous = true;\n\t\tisTeleoperated = false;\n\t\tisEnabled = true;\n\t\tRobot.numToSend = 3;\n\t\tdrivebase.resetGyro();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tRobot.gearManipulator.gearManipulatorPivot.setPosition(0);\n\t\tRobot.gearManipulator.gearManipulatorPivot.setSetpoint(0);\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}", "public void teleopInit() {\n if (autonomousCommand != null) \n autonomousCommand.cancel();\n\n // RobotMap.enableUltrasonicTrigger(false);\n driveTrain.configForTeleopMode();\n }", "@Override\n public void teleopInit() {\n Robot.drive.setDefaultCommand(new DriveCommand());\n if (autonomousCommand != null) autonomousCommand.cancel();\n System.out.println(\"teleopInit being called\");\n \n }", "@Override\n public void autonomousInit() {\n //Diagnostics.writeString(\"State\", \"AUTO\");\n //m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\", \"Default\");\n * switch(autoSelected) { case \"My Auto\": autonomousCommand = new\n * MyAutoCommand(); break; case \"Default Auto\": default: autonomousCommand = new\n * ExampleCommand(); break; }\n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n\n teleopInit();\n }", "@Override\n public void autonomousInit() {\n //ds.set(Value.kForward);\n /*m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n * \n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n //new VisionProcess().start();\n //SmartDashboard.putNumber(\"heerer\", value)\n new TeleOpCommands().start();\n }", "@Override\n public void autonomousInit() {\n\tgameData.readGameData();\n\tautonomousCommand = (Command) chooserMode.getSelected();\n\tdriveSubsystem.resetEncoders();\n\televatorSubsystem.resetEncoder();\n\t// schedule the autonomous command\n\tif (autonomousCommand != null) {\n\t // SmartDashboard.putString(\"i\", \"nit\");\n\t autonomousCommand.start();\n\t}\n }", "public void autonomousInit() {\n\t\tswitch (autoMode) {\r\n\t\tcase 0:\r\n\t\t\tauto = new G_NoAuto();\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tauto = new G_Step();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tauto = new G_BlockThenFour();\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tauto = new G_BinTwoLeft();\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tauto = new G_StepBinCentre();\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tauto = new G_StepBinLeft();\t\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tauto = new G_Block();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t//Start the chosen Autonomous command. \r\n\t\tauto.start();\r\n\t\t//Cancel the tele-op command, in case it was running before autonomous began. \r\n\t\tteleop.cancel();\r\n\t\t// Start pushing sensor readings to the SD.\r\n\t\treadings.start();\r\n\r\n\t}", "public void teleopContinuous() {\n //feed the watchdog\n myDog.feed();\n\n //check safestop button\n /*safestop commented out\n if (joysticks.getRightButton(10))//Buttons on top of right stick stops robot\n {\n safeStop();\n //delay to allow driver to release button\n Timer.delay(.1);\n myDog.feed();\n //at this point driver should have released the butto\n while (!joysticks.getRightTop()) {\n myDog.feed();\n }\n //now the button is pressed again, indicating a restart- the program can continue\n\n //slight delay to allow driver to release the button before the next loop\n Timer.delay(.1);\n }\n */\n\n //if arm is in teleop mode, handles input accordingly\n if (armState == TELEOP) {\n handleArmInput();\n }\n\n //if arm is in auto mode, checks whether user is pressing button 1 to regain\n //control and stops the auto task if so\n\n /*\n arm never goes to auto mode, so this is commented out\n\n (armState == AUTO) {\n //if the driver is attempting to cancel the task OR the task is done, return control\n //to the driver\n if (armJoystick.getRawButton(7) || !armTask.isRunning()) {\n armTask.interrupt();\n armTask.stop();\n armState = TELEOP;\n }\n }\n */\n\n //if drive is in teleop mode, handles input accordingly\n if (driveState == TELEOP) {\n try {\n handleDriveInput();\n } catch (EnhancedIOException e) {\n }\n\n }\n\n //if drive is in auto mode, checks whether user is trying to regain control\n /*not used\n if (driveState == AUTO) {\n //if the driver is attempting to cancel the task OR the task is done, return control\n //to the driver\n if (joysticks.getLeftButton(1) || !driveTask.isRunning()) {\n driveTask.interrupt();\n driveTask.stop();\n driveState = TELEOP;\n }\n }\n */\n\n\n printToScreen(\"Gyro Angle: \" + arm.gyro.getAngle());\n printToScreen(\"Arm Angle: \" + arm.getArmAngle());\n }", "public void autonomousInit(){\n\t \t//resetAndDisableSystems();\n\t\t \n\t \tautonomousCommand = (Command) autoChooser.getSelected();\n\t \tautonomousCommand.start();\n\t \t\n\t \t\n\t }", "@Override\n\tpublic void autonomousInit() {\n\t\tautonomousCommand = new Auto();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}", "public void autonomous() {\n for (int i = 0; i < teleopControllers.size(); i++) {\n ((EventController) teleopControllers.elementAt(i)).disable();\n }\n for (int i = 0; i < autoControllers.size(); i++) {\n ((EventController) autoControllers.elementAt(i)).enable();\n }\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 }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tif (state.equals(\"teleop\")) {\n\t\t\tlastState = \"teleop\";\n\t\t}\n\t\tstate = \"teleop\";\n\n\t\tif (lastState.equals(\"auton\")) {\n\t\t\tNetworkTables.getControlsTable().putBoolean(\"auton\", false);\n\t\t\t\n\t\t\t//Changes the control Mode back to PercentVbus\n\t\t\t//Should only run once - first interation of teleop\n\t\t\t//And ends auton if running\n\t\t\tif(autonomousCommand != null){\n\t\t\t\tautonomousCommand.cancel();\n\t\t\t}\n\t\t\tActuators.getLeftDriveMotor().changeControlMode(TalonControlMode.PercentVbus);\n\t\t\tActuators.getLeftDriveMotor().set(Constants.MOTOR_STOP);\n\t\t\tActuators.getRightDriveMotor().changeControlMode(TalonControlMode.PercentVbus);\n\t\t\tActuators.getRightDriveMotor().set(Constants.MOTOR_STOP);\n\t\t}\n\n//\t\tNetworkTables.putStream(Gamepad.primary.getX() || Gamepad.secondary.getX());\n\t\t/*\n\t\t * Primary Controllers Controls\n\t\t */\n\t\t// TODO: confirm right trigger forward, left trigger reverse\n\t\t// Drive controls\n\t\tDrive.drive(-Gamepad.primary.getLeftX(), Gamepad.primary.getTriggers()); \n\t\tDrive.shift(Gamepad.primary.getA(), Gamepad.primary.getY()); // shifting with A low gear and Y high gear\n\t\tDrive.shiftToggle(Gamepad.primary.getLB());\n\t\tDrive.crab(Gamepad.primary.getDPadLeft(), Gamepad.primary.getDPadRight());\n\t\t\n//\t\tif (Gamepad.primary.getDPadLeft()){\n//\t\t\tDrive.goingLeft = true;\n//\t\t\tDrive.crab();\t\t\n//\t\t}else if( Gamepad.primary.getDPadRight()){\n//\t\t\tDrive.goingLeft = false;\n//\t\t\tDrive.crab();\t\t\t\n//\t\t}else if (Drive.crabState > 0){\n//\t\t\tDrive.crab();\n//\t\t}\n\n\t\t\n\t\t// Climb controls\n\t\tClimb.climbStopPrimary(Gamepad.primary.getDPadUp()); // runs climbStop using left on the DPad - Primary\n\t\t// Climb.climbSafetyTogglePrimary(Gamepad.primary.getBack()); //toggles safety if pressed 3 times\n\n\t\t// Gear controls\n\t\tScore.dispenseGear(Gamepad.primary.getB() || Gamepad.secondary.getDPadUp());\n\n\t\t/*\n\t\t * Secondary Controllers Controls\n\t\t */\n\t\t// Intake controls\n\t\tIntake.intake(Gamepad.secondary.getRightButton()); // runs intake with clicking in the Right Joystick on second controller\n\t\tIntake.intakeSpeed(Gamepad.secondary.getRightY()); // Override Y Button\n\t\tIntake.intakeDirection(Gamepad.secondary.getRightX()); // Override Y Button\n\t\tIntake.intakeJam(Gamepad.secondary.getLB()); // Runs the unjamming procedure for a max of 3 seconds per press\n\t\t// Intake.intakeSafety(Gamepad.secondary.getStart()); //Have to press 3 times to toggle the safety\n\t\tIntake.intakeIn(Gamepad.secondary.getA(), Gamepad.secondary.getB(), Gamepad.secondary.getX()); // Toggles Intake running into the robot at full speed\n\t\tIntake.intakeRun(Gamepad.secondary.getRB()); // Runs all stuff for intake in(conveyor and intake motor)\n//\t\tIntake.intakeOut(Gamepad.secondary.getB());\n\t\t// Climb controls\n\t\tClimb.climbStopSecondary(Gamepad.secondary.getDPadRight()); // runs climbStop using left on the DPad - Secondary\n\t\tClimb.climbStartSecondary(Gamepad.secondary.getDPadLeft()); // runs climbStart using right on the DPad Secondary\n\t\tClimb.climbSafetyToggleSecondary(Gamepad.secondary.getBack()); // Have to press 3 times to toggle the safety\n\n\t\t// Gear controls\n\t\t// Score.gearLock(Gamepad.secondary.getStart(),\n\t\t// Gamepad.secondary.getBack());\n\n\t\t// Outtake Controls\n\t\t// Score.outtakeToggle(Gamepad.secondary.getLB());\n\n\t\t// Conveyor Controls\n\n\t\tScore.conveyor(Gamepad.secondary.getLeftButton()); // runs conveyor with clicking in the Left Joystick on second controller\n\t\tScore.conveyorSpeed(Gamepad.secondary.getLeftY());\n\t\tScore.conveyorDirection(Gamepad.secondary.getLeftX());\n\t\tScore.conveyorIn(Gamepad.secondary.getY());\n\n\t\t// Sweeper\n\t\t// Sweeper.sweeperMotion(Gamepad.secondary.getTriggers());\n\n\t\tDash.driveMode();\n\n\t\tSmartDashboard.putString(\"Controls Table\", NetworkTables.getControlsTable().getKeys().toString());\n\t\tSmartDashboard.putString(\"Stream\", NetworkTables.getControlsTable().getString(\"stream\", \"nothing\"));\n\n\t}", "public void autonomousInit() {\n //autonomousCommand = (Command) chooser.getSelected();\n autoLoopCounter = 0; //This resets the loop counter to 0\n //if (autonomousCommand != null) autonomousCommand.start();\n }", "public void autonomousInit() {\n int sequenceNumber = (int)SmartDashboard.getNumber(\"Autonomous Sequence\");\n \n switch(sequenceNumber) {\n // Move into the Auto Zone\n case 0:\n autonomousCommand = new DirectionalDrive(0.0, -0.5, 1.25);\n break;\n \n // Grab a container and move into the Auto Zone\n case 1:\n autonomousCommand = new ContainerAutonomous();\n break;\n \n // If something else was supplied, do nothing for saftey reasons\n default:\n autonomousCommand = null;\n }\n // Start the autonomous command\n if (autonomousCommand != null) autonomousCommand.start();\n }", "@Override\n\tpublic void autonomousInit() //initialization of the autonomous code\n\t{\n\t\t//m_autonomousCommand = m_chooser.getSelected();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (m_autonomousCommand != null) //if we have any autonomous code, start it\n\t\t{\n\t\t\tm_autonomousCommand.start();\n\t\t}\n\t\tRobotMap.encoderLeft.reset(); //reset the values of the encoder\n\t\tRobotMap.encoderRight.reset(); //reset the values of the encoder\n\t\tultrasonic.getInitialDist(); //if nullPointerException, use \"first\" boolean inside the method and run in periodic()\n\t}", "public void autonomousInit() {\n\t\tautonomousCommand.start();\r\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tSmartDashboard.putString(\"DT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTER Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTERPIVOT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"INTAKE Current Command\", \" \");\n\t\t\n\t\tScheduler.getInstance().run();\n//\t\t\n//\t\tRobot.drivetrain.leftLED.set(true);\n//\t\tRobot.drivetrain.rightLED.set(false);\n\n\t\tif(!autoAiming) {\n\t\t\tnew DriveForwardRotate(correctForDeadZone(oi.driver.getForward()), correctForDeadZone(oi.driver.getRotation())).start();\n\t\t}\n\t\t//new DriveForwardRotate(oi.driver.getForward(), oi.driver.getRotation()).start();\n\t\t\n\t\tif(oi.autoAim() && !prevStateAutoAim){\n\t\t\t//new SetPivotPosition(PivotPID.AUTO_CAMERA_AIM_POSITION).start(\n//\t\t\tnew AutoAim().start();\n\t\t\tnew AutoAim(TurnConstants.AIM_VELOCITY).start(); //this is a press and hold button 3 on joystick\n\t\t\t\n\t\t}\n\t\t\n\t\tif (readyToShoot && oi.operator.shootBallFlywheels() && oi.operator.shoot()){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- ready to shoot\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\t//INTAKE ------2 button\n\t\tif (oi.operator.intakeUp() && !prevStateIntakeUp){\n\t\t\tnew SetIntakePosition(IntakeSubsystem.UP).start();\n\t\t}\n\t\tif (oi.operator.intakeDeploy() && !prevStateIntakeDeployed){\n\t\t\tnew SetIntakePosition(!IntakeSubsystem.UP).start();\n\t\t}\n\t\t\n\t\t//CAMERA PISTON\n\t\t\n\t\t//move up\n\t\tif (oi.driver.isCameraUpPressed()){\n\t\t\tnew SetCameraPiston(CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\telse{\n\t\t\tnew SetCameraPiston(!CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\t\n//\t\tif (oi.driver.isCameraUpPressed() && !prevStateCameraUp){\n//\t\t\tnew SetCameraPiston(cameraUp ? !CameraSubsystem.CAM_UP : CameraSubsystem.CAM_UP).start();\n//\t\t\tcameraUp = !cameraUp;\n//\t\t}\n//\t\telse{\n//\t\t\tnew SetCameraPiston(cameraUp ? CameraSubsystem.CAM_UP : !CameraSubsystem.CAM_UP).start();\n//\t\t}\n\t\t\n\t\t\n\t\tif (oi.operator.isSemiAutonomousIntakePressed() && !prevStateSemiAutoIntake){\n\t\t\tnew SemiAutoLoadBall().start();\n\t\t}\n//\t\t\n\t\t\n\t\t//pivot state\n//\t\tif (oi.operator.pivotShootState() && !prevStatePivotUp){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n//\t\t}\n//\t\telse if(oi.operator.resetPivot() && !prevStateResetButton) {\n//\t\t\t new ResetPivot().start();\n//\t\t}\n//\t\telse if (oi.operator.pivotStoreState() && !prevStatePivotMiddle){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n//\t\t}\n\t\t\n\t\t//PIVOT\n\t\t\n\t\t//if going up\n\t\tif (oi.operator.pivotCloseShot() && !prevStatePivotCloseShot){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.CLOSE_SHOOT_STATE).start();\t\t\n\t\t}\n\t\t//if going down\n\t\telse if(oi.operator.pivotFarShot() && !prevStatePivotFarShot) {\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotStoreState()&& !prevStateStore){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotReset() && !prevStateResetSafety){\n\t\t\tnew ResetPivot().start();\n\t\t}\n\t\telse if (oi.driver.isDefenseShot() && prevStateDefenseShot){\n\t\t\tnew SetPivotPosition(ShooterPivotSubsystem.PivotPID.ANTI_DEFENSE_POSITION).start();\n\t\t}\n\t\n\t\t\n\t\tif (!semiAutoIsRunning){\n//\t\t\n\t\t\t//intake purging/running\n\t\t\tif(oi.operator.purgeIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_PURGE_SPEED, IntakeSubsystem.CENTERING_MODULE_PURGE_SPEED).start(); \n\t\t\t\tnew RunAllRollers(ShooterSubsystem.OUT, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else if (oi.operator.runIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_INTAKE_SPEED, IntakeSubsystem.CENTERING_MODULE_INTAKE_SPEED).start();\n\t\t\t\tnew RunAllRollers(ShooterSubsystem.IN, ShooterSubsystem.UNTIL_IR).start();\n//\t\t\t\tnew SemiAutoLoadBall().start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else {\n\t\t\t\t//just the intakes off here to avoid conflicts\n\t\t\t\tnew SetIntakeSpeed(IntakeSubsystem.INTAKE_OFF_SPEED, IntakeSubsystem.INTAKE_OFF_SPEED).start();\n\t\t\t\t//new EndSemiAuto(true).start();\n\t\t\t\t//new RunAllRollers(ShooterSubsystem.OFF, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = false;\n\t\t\t}\n\t\t\t\n\t\t\t//flywheel control\n\t\t\tif (!allIntakeRunning){\n//\t\t\t\tif(oi.operator.loadBallFlywheels()){\n//\t\t\t\t\tnew SetFlywheels(ShooterSubsystem.FLYWHEEL_INTAKE_POWER, -ShooterSubsystem.FLYWHEEL_INTAKE_POWER).start();;\n//\t\t\t\t\tflywheelShootRunning = true;\n//\t\t\t\t} else \n\t\t\t\tif(oi.operator.shootBallFlywheels()) {\n\t\t\t\t\t//new SetFlywheels(0.7, -0.7).start();\n\t\t\t\t\tnew BangBangFlywheels(true).start();\n\t\t\t\t\tflywheelShootRunning = true;\n\t\t\t\t} else {\n\t\t\t\t\t//new SetFlywheels(0, 0).start();//BangBangFlywheels(false).start();\n\t\t\t\t\tflywheelShootRunning = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tif(oi.operator.shoot()){\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kForward).start();\n//\t\t\t} else {\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kReverse).start();\n//\t\t\t}\n//\t\t\t\n\t\t\tif (!allIntakeRunning && !flywheelShootRunning){\n\t\t\t\tnew SetFlywheels(0, 0).start();\n\t\t\t}\n\t\t\t\n\t\t\t//DEFENSE STATE\n\t\t\tif (oi.operator.isDefenseState() && !prevStateDefenseMode){\n\t\t\t\tnew SetDefenseMode().start();\n\t\t\t}\n\t\t}\n\t\t//tells us if bang bang works\n\t\treadyToShoot = ((Math.abs(shooter.getRightFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance)\n\t\t\t\t&& (Math.abs(shooter.getLeftFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance));\n\t\t\n\t\t\n\t\tif (oi.operator.isManualFirePiston() && !prevStateManualFirePiston){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- manual\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\tif(oi.driver.isDrivetrainHighGearButtonPressed()){\n\t\t\tdrivetrain.shift(DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = DrivetrainSubsystem.HIGH_GEAR;\n\t\t} else {\n\t\t\tdrivetrain.shift(!DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = !DrivetrainSubsystem.HIGH_GEAR;\n\t\t}\n\t\t\n\t\tisManualPressed = oi.operator.isManualOverrideOperator();\n\t\t\n\t\tif (!shooterPIDIsRunning){\n\t\t\tif(isManualPressed) {\n\t\t\t\tdouble pivotPower = oi.operator.getManualPower()/2.0;\n\t\t\t\t//shooterPivot.engageBrake(false);\n\t\t\t\tif (pivotPower > 0 && shooterPivot.pastMax() || pivotPower < 0 && shooterPivot.lowerLimitsTriggered()){\n\t\t\t\t\tpivotPower = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnew SetPivotPower(pivotPower).start();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnew SetPivotPower(0).start();\n\t\t\t}\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"Left: \" + Robot.drivetrain.motors[2].get() + \", Right: \" + (-Robot.drivetrain.motors[0].get()));\n//\t\tSystem.out.println(\"Left V: \" + Robot.drivetrain.leftEncoder.getRate() + \", Right V: \" + Robot.drivetrain.rightEncoder.getRate());\n//\t\tSystem.out.println(\"Accel z: \" + Robot.drivetrain.accel.getZ());\n\t\t\n\t\t\n\t\t//PREV STATES\n\t\tprevStateIntakeUp = oi.operator.intakeUp();\n\t\tprevStateIntakeDeployed = oi.operator.intakeDeploy();\n\t\tprevStateDriveShifter = oi.driver.isDrivetrainHighGearButtonPressed();\n\t\tprevStateShootButton = oi.operator.shoot();\n\t\t\n\t\tprevStatePivotCloseShot = oi.operator.pivotCloseShot();\n\t\tprevStatePivotFarShot = oi.operator.pivotFarShot();\n\t\tprevStateStore = oi.operator.pivotStoreState();\n\t\tprevStateResetSafety = oi.operator.pivotReset();\n\t\t\n\t\tprevStateSemiAutoIntake = oi.operator.isSemiAutonomousIntakePressed();\n\t\tprevStateDefenseMode = oi.operator.isDefenseState();\n\t\t\n\t\tprevStateManualFirePiston = oi.operator.isManualFirePiston();\n\t\tprevStateCameraUp = oi.driver.isCameraUpPressed();\n\t\tprevStateAutoAim = oi.autoAim();\n\t\tprevStateDefenseShot = oi.driver.isDefenseShot();\n\n\t\t\n\t\t//********updating subsystem*******//\n\t\t\n\t\t//shooter hal effect counter\n\t\t//shooterPivot.updateHalEffect();\n\t\t\n\t\t//update the flywheel speed constants\n\t\tshooter.updateShooterConstants();\n\t\t\n\t\t\n\t\t//brake\n\t\tif (!isManualPressed){ //if manual override isn't running\n\t\t\tif (!shooterPIDIsRunning && shooterPivot.motorLeft.get() < DEAD_ZONE_TOLERANCE && shooterPivot.motorRight.get() < DEAD_ZONE_TOLERANCE){\n\t\t\t\t\n\t\t\t\tif (pivotTimer.get() > MIN_STOPPED_TIME){\n\t\t\t\t\tnew EngageBrakes().start();\n\t\t\t\t}\n\t\t\t\t//if motor is 0 for the first time, start the timer\n\t\t\t\tif (!prevStateMotorPowerIs0){\n\t\t\t\t\tpivotTimer.reset();\n\t\t\t\t\tpivotTimer.start();\n\t\t\t\t}\n\t\t\t\t//keep this at the end\n\t\t\t\tprevStateMotorPowerIs0 = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshooterPivot.engageBrake(false);\n\t\t\t\t//keep this at the end\n\t\t\t\tpivotTimer.reset();\n\t\t\t\tprevStateMotorPowerIs0 = false;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tshooterPivot.engageBrake(false);\n\t\t\tpivotTimer.reset();\n\t\t}\n\t\t//System.out.println(shooterPivot.motorLeft.get());\n\t\t\n\t\t//LOGGING AND DASHBOARD\n\t\tlogAndDashboard();\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t\t\n\t\t// runs the autonomous smartdashboard display for auton\n\t\tActuators.getLeftDriveMotor().setEncPosition(0);\n\t\tActuators.getRightDriveMotor().setEncPosition(0);\n\t\tautonomousCommand = (Command) autoChooser.getSelected();\n\t\t\n//\t\tbackupCommand = (Command) backupChooser.getSelected();\n//\t\tActuators.getLeftDriveMotor().changeControlMode(TalonControlMode.MotionProfile);\n//\t\tActuators.getRightDriveMotor().changeControlMode(TalonControlMode.MotionProfile);\n//\t\tif (NetworkTables.getControlsTable().getBoolean(\"camera0\", false)) {//Auto for working camera\n\t\t\n\t\tif(autonomousCommand != null){\t\n\t\t\tSystem.out.println(autonomousCommand);\n\t\t\tautonomousCommand.start();\n\t\t}\n\t\t\n//\t\t\tSystem.out.println(\"I got here auto Command start\");\n//\t\t\t}\n//\t\telse{\n//\t\t\tbackupCommand.start();\t\t\t\n//\t\t}\n//\t\t\tDrive.driveWithPID(distance, distance);\n\n\t\tstate = \"auton\";\n\t\t// autoSelected = chooser.getSelected();\n\t\t// // autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t// // defaultAuto);\n\t\t// System.out.println(\"Auto selected: \" + autoSelected);\n\t\tNetworkTables.getControlsTable().putBoolean(\"auton\", true);\n\n\t}", "public void autonomousInit() {\n if (autonomousCommand != null) autonomousCommand.start();\n }", "@Override\n public void autonomousPeriodic() {\n \n //Switch is used to switch the autonomous code to whatever was chosen\n // on your dashboard.\n //Make sure to add the options under m_chooser in robotInit.\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n if (m_timer.get() < 2.0){\n m_driveTrain.arcadeDrive(0.5, 0); //drive forward at half-speed\n } else {\n m_driveTrain.stopMotor(); //stops motors once 2 seconds have elapsed\n }\n break;\n }\n }", "@Override\n public void autonomousInit()\n {\n autonomousCommand = chooser.getSelected();\n \n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n */\n \n // schedule the autonomous command (example)\n if (autonomousCommand != null) \n {\n autonomousCommand.start();\n }\n }", "@Override\n\tpublic void autonomousInit() {\n\t\tvision_.startGearLiftTracker(15);\n\t\tgyro_.reset();\n\t\tautoCommand = (Command) autoChooser.getSelected();\n\t\tif(autoCommand != null)\n\t\t{\n\t\t\tautoCommand.start();\n\t\t}\n\t}", "@Override\n public void autonomousInit() {\n\n autonomousCommand = new Autonomous(start.getSelected(), chooser.getSelected());\n \n autonomousCommand.start();\n }", "@Override\n\tpublic void autonomousPeriodic() //runs the autonomous mode, repeating every 20ms\n\t{\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n\t\tdriveExecutor.execute(); //running the execute() method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}", "@Override\n public void disabledInit() {\n\t// new SetElevator(0).start();\n\tif (autonomousCommand != null)\n\t autonomousCommand.cancel();\n\tScheduler.getInstance().removeAll();\n }", "@Override\n\tpublic void autonomousInit() {\n\t\tselectedAutonomousCommand = new AutoModeCommandGroup(autoChooser.getSelected());\n\t\tif (selectedAutonomousCommand!=null) {\n\t\t\tselectedAutonomousCommand.start();\n\t\t}\n\t}", "public void teleopInit() {\n\t\tauto.cancel();\r\n\t\t// Create the teleop command and start it.\r\n\t\tteleop.start();\r\n\t\t// Reset the drivetrain encoders\r\n\t\tDriveTrain.getInstance().resetEncoders();\r\n\t\t// Start pushing sensor readings to the SD.\r\n\t\treadings.start();\r\n\t}", "public void autonomousInit() {\n Jagbot.isAutonomous = true;\n int mode = (int)SmartDashboard.getNumber(RobotMap.Autonomous.MODE_KEY);\n switch (mode) {\n case 0:\n System.out.println(\"Standing still\");\n new StandStill().start();\n break;\n case 1:\n System.out.println(\"Driving forward\");\n new DriveStraight(1).start();\n break;\n \n case 2:\n System.out.println(\"Turning left and shooting to score\");\n new TurnAndScore(-1).start();\n break;\n case 3:\n System.out.println(\"Turning right and shooting to score\");\n new TurnAndScore(1).start();\n break;\n }\n }", "@Override\n\tpublic void teleopInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\ttry {\n\t\t\tdrivebase.initDriveBase(1);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tRobot.numToSend = 3;\n\t}", "@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\t//if (Settings.motorAAngle == -90) Settings.motorAAngle = -95;\n\n\t\tMotor.A.rotateTo(Settings.motorAAngle, true);\n\n\t\twhile (Motor.A.isMoving() && !Motor.A.isStalled() && !suppressed);\t\t\t\n\t\t\n\t\tMotor.A.stop();\n\t}", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }", "@Override\n\tpublic void autonomousInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.start();\n\t}", "@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 autonomousInit() {\n\n Robot.m_driveTrain.driveTrainLeftFrontMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainRightFrontMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainRightRearMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainLeftRearMotor.setSelectedSensorPosition(0);\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n */\n\n // schedule the autonomous command (example)\n }", "public void autonomousInit() {\n autonomousCommand = (Command) autoChooser.getSelected();\n autonomousCommand.start();\n// \n }", "public void teleopInit() {\n armTask.stop();\n driveTask.stop();\n armTask2.stop();\n getRobotDrive().stop();\n driveState = TELEOP;\n armState = TELEOP;\n\n }", "@Override\n\tprotected void execute() {\n\t\tRobot.arm.armDown();\n\t}", "public void autonomousPeriodic() {\n if (m_apFirstRun) {\n System.out.println(\"Default autonomousPeriodic() method... Override me!\");\n m_apFirstRun = false;\n }\n }", "public void autonomousInit() {\n\t\ttimer.start();\n\t\tautonomousCommand = autoChooser.getSelected();\n\t\t//This outputs what we've chosen in the SmartDashboard as a string.\n\t\tSystem.out.println(autonomousCommand);\n\t\tif (DriverStation.getInstance().isFMSAttached()) {\n\t\t\tgameData = DriverStation.getInstance().getGameSpecificMessage();\n\t\t}\n\t\telse {\n\t\t\tgameData=\"RLR\";\n\t\t}\n\t\t//armSwing.setAngle(90); //hopefully this will swing the arms down. not sure what angle it wants though\n\t}", "abstract protected void cancelCommands();", "@Override\n\tpublic void teleopInit() {\n\t\tif (m_autonomousCommand != null) {\n\t\t\tm_autonomousCommand.cancel();\n\t\t}\n\t\t\n\t\tSmartDashboard.putData(\"Stow Robot\", new PreMatchPresets());\n\t\t\n\t\tgetSwitchColor();\n\t\tchassis.chassisInit();\n\t\tintake.intakeInit();\n\t\tarm.armInit();\n\t\televator.elevatorInit();\n\t\tSmartDashboard.putNumber(\"Arm Pot Value\", Robot.arm.getArmPot());\n\n//\t\tSmartDashboard.putData(\"high\", new ShuttleHigh());\n\t}", "public AutonomousCommand() {\n \t\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=R\tEQUIRES\n \t\n }", "@Override\n public void teleopInit() {\n if (m_autonomousCommand != null) {\n m_autonomousCommand.cancel();\n }\n\n // Don't resume climbing\n IsHoldingBack = false;\n IsHoldingFront = false;\n\n safetyCount = 0;\n\n clearAllButtonStates();\n\n ArmsExtended = ArmsClosed = false;\n //ClimbFront.set(Value.kReverse);\n //ClimbBack.set(Value.kReverse);\n\n LiftSetpoint = Lifter.getSelectedSensorPosition();\n LiftRamp = new SRamp();\n LiftRamp.Rate = 300;\n LiftRamp.setOutput(Lifter.getSelectedSensorPosition());\n\n SpeedRamp = new SRamp();\n SpeedRamp.Rate = 0.06;\n SpeedRamp.setMaxAccelRate(0.004);\n\n VisionTable.getEntry(\"Tape\").setBoolean(true);\n\n Comp.start();\n }", "@Override\r\n\tpublic void autonomous() {\n\r\n\t\tint autoMode = -1;\r\n\t\t\r\n\t\tif (!switch1.get() && !switch2.get() && !switch3.get()) {\r\n\t\t\t//if all the switches are off\r\n\t\t\tautoMode = 0;\r\n\t\t} else if (switch1.get() && !switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 1;\r\n\t\t} else if (!switch1.get() && switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 2;\r\n\t\t} else if (switch1.get() && switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 3;\r\n\t\t}\r\n\r\n\t\tautotime.start();\r\n\r\n\t\t// double[] wheelSpeeds = new double[2];\r\n\t\t// double[] startCoords = {0, 0, Math.PI / 2};\r\n\t\t// double[] endCoords = {0, 1, Math.PI / 2};\r\n\t\t// AutoPath pathAuto = new AutoPath(startCoords, endCoords,\r\n\t\t// ahrs.getAngle());\r\n\t\t//\r\n\t\t// int i = 0;\r\n\t\t// boolean successfullyGrabbedRectangles = false;\r\n\t\t\r\n\t\tboolean shotGear = false;\r\n\t\t//boolean hasBackedUp = false;\r\n\t\twhile (isAutonomous() && isEnabled()) {\r\n\t\t\t// auto.drive(autoMode);\r\n\r\n\t\t\t// while(autotime.get() < 3) {\r\n\t\t\t// drive.drive(-0.9, -0.9);\r\n\t\t\t// }\r\n\r\n\t\t\t// grab the current switch status\r\n\r\n\t\t\tswitch (autoMode) {\r\n\t\t\tcase 0:\r\n\t\t\t\t//Mark: Drive forward\r\n\r\n\t\t\t\tif (autotime.get() < 3) {\r\n\t\t\t\t\tdrive.drive(-0.9, -0.9);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\t// Mark: Drive Forward, NO turning, and shoot gear onto peg\r\n\r\n\t\t\t\tif (autotime.get() < 3) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if(!shotGear) {\r\n\t\t\t\t\t// shoot the gear onto the peg\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 3.67) {\r\n\t\t\t\t\tdrive.drive(0.50, 0.50);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\t//Mark: start LEFT of center, drive forward, turn -60 degrees, drive forward, shoot gear on peg\r\n\t\t\t\tif (autotime.get() < 2) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if (autotime.get() < 2.5) {\r\n\t\t\t\t\tdrive.drive(1, 0);\r\n\t\t\t\t}else if(autotime.get() < 3.5) { \r\n\t\t\t\t\tdrive.drive(-.75,-.75);\r\n\t\t\t\t} else if (!shotGear) {\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 4.5) {\r\n\t\t\t\t\tdrive.drive(0.75, 0.75);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\t//Mark: start RIGHT of center, drive forward, turn 60 degrees, drive forward, shoot gear on peg\r\n\t\t\t\tif (autotime.get() < 2) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if (autotime.get() < 2.25) {\r\n\t\t\t\t\tdrive.drive(0, 1);\r\n\t\t\t\t}else if(autotime.get() < 4) { \r\n\t\t\t\t\tdrive.drive(-.75,-.75);\r\n\t\t\t\t} else if (!shotGear) {\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 4.5) {\r\n\t\t\t\t\tdrive.drive(0.75, 0.75);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// if(!successfullyGrabbedRectangles) {\r\n\t\t\t// Rectangle[] targets = grabRectangles();\r\n\t\t\t//\r\n\t\t\t//// System.out.println(\"-----\");\r\n\t\t\t//// for(Rectangle r : testing) {\r\n\t\t\t//// System.out.println(r.getArea());\r\n\t\t\t//// }\r\n\t\t\t//// System.out.println(\"-----\");\r\n\t\t\t//\r\n\t\t\t// if(targets[0].getArea() == 0) {\r\n\t\t\t// //since grabRectangles returns 1 rectangle with area of 0, so if\r\n\t\t\t// one of the area's\r\n\t\t\t// //equals 0, then it was a failed response\r\n\t\t\t// successfullyGrabbedRectangles = false;\r\n\t\t\t// }else{\r\n\t\t\t//\r\n\t\t\t// successfullyGrabbedRectangles = true;\r\n\t\t\t//\r\n\t\t\t// //call auto path to get the wheel speeds from the rectangle\r\n\t\t\t// pathAuto.makeNewPath(targets[0].getWidth(),\r\n\t\t\t// targets[1].getWidth(), targets[0].getXPos() - 240,\r\n\t\t\t// targets[1].getXPos() - 240, ahrs.getAngle());\r\n\t\t\t// //drive.drive(wheelSpeeds[0], wheelSpeeds[1]);\r\n\t\t\t//\r\n\t\t\t// }\r\n\t\t\t// }else{\r\n\t\t\t// //drive.drive(0,0);\r\n\t\t\t//\r\n\t\t\t// double[] wheelSpeedsFromPath = pathAuto.getWheelSpeeds(.4); //the\r\n\t\t\t// .4 doesn't mean anything at all; Beitel is just weird :^)\r\n\t\t\t// drive.drive(wheelSpeedsFromPath[0], wheelSpeedsFromPath[1]);\r\n\t\t\t// //System.out.println(\"Left:\" + wheelSpeedsFromPath[0]);\r\n\t\t\t// //System.out.println(\"Right: \" + wheelSpeedsFromPath[1]);\r\n\t\t\t// }\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n public void teleopPeriodic() {\n if (m_stick.getRawButton(12)){\r\n TestCompressor.setClosedLoopControl(true);\r\n System.out.println(\"??\");\r\n } \r\n if (m_stick.getRawButton(11)) {\r\n TestCompressor.setClosedLoopControl(false);\r\n }\r\n //// fireCannon(Solenoid_1, m_stick, 8);\r\n //// fireCannon(Solenoid_2, m_stick, 10);\r\n //// fireCannon(Solenoid_3, m_stick, 12);\r\n //// fireCannon(Solenoid_4, m_stick, 7);\r\n //// fireCannon(Solenoid_5, m_stick, 9);\r\n //// fireCannon(Solenoid_6, m_stick, 11);\r\n\r\n // Logic to control trigering is inside\r\n // DO: Move the logic out here, makes more sense. \r\n fireTrio(topSolonoids, m_stick, 5);\r\n fireTrio(bottomSolonoids, m_stick, 6);\r\n\r\n // Make robit go\r\n double[] movementList = adjustJoystickInput(-m_stick.getY(), m_stick.getX(), m_stick.getThrottle());\r\n m_myRobot.arcadeDrive(movementList[0], movementList[1]);\r\n //System.out.println(m_gyro.getAngle());\r\n }", "public void autonomousPeriodic() {\n \tauto.autonomousPeriodic();\n\t}", "@Override\r\n public void executeCommand() {\r\n shell.stopRunning();\r\n }", "public void autonomousPeriodic() {\n \tswitch(autoSelected) {\n \tcase customAuto:\n //Put custom auto code here \n break;\n \tcase defaultAuto:\n \tdefault:\n \t//Put default auto code here\n break;\n \t}\n }", "@Override\n public void execute() {\n if(!manipulatorController.getRawButton(button)){\n shooter.shooterMotorsOff();\n hopper.hopperMotorOff();\n isDone = true;\n end(false);\n }\n\n }", "public static void startAuto(){\n cancelAuto();\n //Turn our ID into a Command\n \tswitch(autonomousChooser.getSelected()){\n case 0:\n command = new BaseLine();\n break;\n default:\n\t\t\t\tSystem.out.println(\"No auto picked\");\n command = null;\n }\n //Run the Command\n\t\tif (command != null){\n\t\t\tcommand.start();\n\t\t}\n }", "@Override\n\tprotected void takeOff(){\n\t\tgvh.log.i(TAG, \"Drone taking off\");\n\t\tsetControlInput(0, 0, 0, 1);\n\t}", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }", "@Override\n public void runOpMode() {\n RobotMain main = new RobotMain(this,hardwareMap,telemetry);\n\n //initialize controls\n imuTeleOpDualGamepad control = new imuTeleOpDualGamepad(main,gamepad1,gamepad2);\n\n waitForStart();\n\n //Pull the tail back from autonomous\n main.JewelArm.setServo(.65);\n\n //Continually run the control program in the algorithm\n while (opModeIsActive()) control.run();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@Override\r\n\tpublic void execute() {\n\t\tlight.off();\r\n\t}", "public void m9978e() {\n if (this.f8226a != null) {\n this.f8226a.cancel();\n }\n }", "public void autonomousPeriodic() {\n \n }", "public void autonomousPeriodic() {\r\n }", "public void autonomousPeriodic() {\r\n }", "public void mo42332a() {\n this.f36204P.cancel();\n mo42330e();\n }", "@Override\n protected void execute() {\n Robot.elevator.elevatorDown();\n }", "@Override\n\tpublic void autonomousInit() {\n//\t\tm_autonomousCommand = m_chooser.getSelected();\n\t\t\n\t\tif(m_startPosition.getSelected().equals(\"Center\")) {\n\t\t\tif(getGameSpecificData(\"alliance\") == R) {\n\t\t\t\tm_autonomousCommand = new AUTO_centerRight();\n\t\t\t}else if(getGameSpecificData(\"alliance\") == L) {\n\t\t\t\tm_autonomousCommand = new AUTO_centerLeft();\n\t\t\t}else {\n\t\t\t\tm_autonomousCommand = null;\n\t\t\t}\n\t\t\t\n\t\t}else if(m_startPosition.getSelected().equals(\"Right\")) {\n\t\t\tif(m_gameElement.getSelected().equals(\"switch\")) {\n\t\t\t\tif(getGameSpecificData(\"alliance\") == R) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_rightSwitchRight();\n\t\t\t\t}else if(getGameSpecificData(\"alliance\") == L) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_rightSwitchLeft();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if(m_gameElement.getSelected().equals(\"scale\")) {\n\t\t\t\tif(getGameSpecificData(\"scale\") == R) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_rightScaleRight();\n\t\t\t\t}else if(getGameSpecificData(\"scale\") == L) {\n\t\t\t\t\tm_autonomousCommand = new HowToTestAutoPath();\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tm_autonomousCommand = null;\n\t\t\t}\n\t\t\t\n\t\t}else if(m_startPosition.getSelected().equals(\"Left\")) {\n\t\t\tif(m_gameElement.getSelected().equals(\"switch\")) {\n\t\t\t\tif(getGameSpecificData(\"alliance\") == R) {\n\t\t\t\t\tm_autonomousCommand = new HowToTestAutoPath();//AUTO_leftSwitchRight();\n\t\t\t\t}else if(getGameSpecificData(\"alliance\") == L) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_leftSwitchLeft();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if(m_gameElement.getSelected().equals(\"scale\")) {\n\t\t\t\tif(getGameSpecificData(\"scale\") == R) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_leftScaleRight();\n\t\t\t\t}else if(getGameSpecificData(\"scale\") == L) {\n\t\t\t\t\tm_autonomousCommand = new AUTO_leftScaleLeft();\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tm_autonomousCommand = null;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\tSmartDashboard.putData(\"auto command\",m_autonomousCommand);\n\t\t\n\t\t// schedule the autonomous command (example)\n\t\tif (m_autonomousCommand != null) {\n\t\t\tm_autonomousCommand.start();\n\t\t}\n\t\t\n\t\tgetSwitchColor();\n//\t\tSmartDashboard.putBoolean(\"Alliance_R\", alliance_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Alliance_L\", alliance_L_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"Scale_R\", R_scaleState);\n//\t\tSmartDashboard.putBoolean(\"Scale_L\", L_scaleState);\n//\t\tSmartDashboard.putBoolean(\"oppisite_R\", opposite_R_SwitchState);\n//\t\tSmartDashboard.putBoolean(\"opposite_L\", opposite_L_SwitchState);\n\t\t\n\t}", "public void teleopPeriodic() \r\n {\r\n Watchdog.getInstance().feed();\r\n Scheduler.getInstance().run();\r\n \r\n //Polls the buttons to see if they are active, if they are, it adds the\r\n //command to the Scheduler.\r\n if (mecanumDriveTrigger.get()) \r\n Scheduler.getInstance().add(new MechanumDrive());\r\n \r\n else if (tankDriveTrigger.get())\r\n Scheduler.getInstance().add(new TankDrive());\r\n \r\n else if (OI.rightJoystick.getRawButton(2))\r\n Scheduler.getInstance().add(new PolarMechanumDrive());\r\n \r\n resetGyro.get();\r\n \r\n //Puts the current command being run by DriveTrain into the SmartDashboard\r\n SmartDashboard.putData(DriveTrain.getInstance().getCurrentCommand());\r\n \r\n SmartDashboard.putString(ERRORS_TO_DRIVERSTATION_PROP, \"Test String\");\r\n \r\n \r\n }", "public void autonomousPeriodic() {\n //Scheduler.getInstance().run();\n /** if(autoLoopCounter < 100) { //Checks to see if the counter has reached 100 yet\n myRobot.drive(-0.5, 0.0); //If the robot hasn't reached 100 packets yet, the robot is set to drive forward at half speed, the next line increments the counter by 1\n autoLoopCounter++;\n } else {\n myRobot.drive(0.0, 0.0); //If the robot has reached 100 packets, this line tells the robot to stop\n }*/\n }", "protected void finalAction(){\n Robot.stop();\n requestOpModeStop();\n }", "public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\n }", "public void teleopPeriodic() {\r\n //Driving\r\n if (driveChooser.getSelected().equals(\"tank\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.tankDrive(leftJoystick.getY(), rightJoystick.getY());\r\n } \r\n else {\r\n drive.tankDrive(manipulator.getY(), manipulator.getThrottle());\r\n }\r\n }\r\n if (driveChooser.getSelected().equals(\"arcade1\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.arcadeDrive(leftJoystick.getY(), leftJoystick.getX());\r\n } \r\n else {\r\n drive.arcadeDrive(manipulator.getY(), manipulator.getX());\r\n }\r\n }\r\n if (driveChooser.getSelected().equals(\"arcade2\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.arcadeDrive(leftJoystick.getY(), rightJoystick.getX());\r\n }\r\n else{\r\n drive.arcadeDrive(manipulator.getY(), manipulator.getTwist());\r\n }\r\n }\r\n \r\n //Shooting\r\n if (shootButton1.get()||shootButton2.get()){\r\n frontShooter.set(-1);\r\n backShooter.set(1);\r\n }\r\n else{\r\n frontShooter.set(0);\r\n backShooter.set(0); \r\n }\r\n if (transportButton1.get()||transportButton2.get()){\r\n transport.set(-1);\r\n }\r\n else{\r\n transport.set(0); \r\n }\r\n \r\n //Intake\r\n if (intakeButton1.get()||intakeButton2.get()){\r\n //intakeA.set(-1);BROKEN\r\n intakeB.set(-1);\r\n }\r\n else{\r\n intakeA.set(0);\r\n intakeB.set(0); \r\n }\r\n \r\n //Turret\r\n if (toggleTurretButton.get()){\r\n turret.set(leftJoystick.getX());\r\n }\r\n else{\r\n turret.set(manipulator.getX());\r\n }\r\n }", "@Override\n protected void end() {\n Robot.climber.frontStop();\n Robot.climber.rearStop();\n Robot.isAutonomous = false;\n }", "public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}", "public Command getAutonomousCommand() \n {\n switch (m_autoChooser.getSelected())\n {\n case \"default\":\n return null;\n case \"test\":\n return new CommandGroupTemplate();\n case \"three_ball_forward\":\n return new AutonomousThreeBall(1, 2.0);\n case \"three_ball_backward\":\n return new AutonomousThreeBall(-1, 3.0);\n case \"six_ball\":\n return new AutonomousSixBall();\n default:\n System.out.println(\"\\nError selecting autonomous command:\\nCommand selected: \" + m_autoChooser.getSelected() + \"\\n\");\n return null;\n }\n }", "public static void noAutostart() {\n\t\tdefaultAutostartMode = NO_AUTOSTART;\n\t}", "@Override\n public final void stopMotor() {\n stop();\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 }", "void unsetAuto();" ]
[ "0.82523936", "0.8149221", "0.80942667", "0.76988226", "0.7637844", "0.7600895", "0.7600895", "0.7470235", "0.7218022", "0.70114815", "0.673181", "0.67221296", "0.6697145", "0.66199493", "0.6566748", "0.64997685", "0.6495776", "0.6487819", "0.64202064", "0.6392949", "0.63642555", "0.6350534", "0.6350091", "0.63419145", "0.63266206", "0.62856114", "0.62459785", "0.62397784", "0.6238177", "0.6237377", "0.623449", "0.6220746", "0.6214472", "0.6180303", "0.61334246", "0.6107468", "0.6066174", "0.6064262", "0.6035681", "0.5999758", "0.59969693", "0.596595", "0.5957263", "0.5945191", "0.59134746", "0.58911145", "0.58669364", "0.5849819", "0.58408487", "0.57868797", "0.5775183", "0.5756648", "0.5747919", "0.57271326", "0.57114714", "0.5705525", "0.5687846", "0.56825113", "0.56823564", "0.5654102", "0.565142", "0.5643778", "0.56323236", "0.56267077", "0.56250095", "0.5618853", "0.55855584", "0.5578035", "0.5569375", "0.5556423", "0.55550086", "0.55442584", "0.5522389", "0.5522389", "0.5522389", "0.5519722", "0.5519722", "0.5519722", "0.5519722", "0.55131996", "0.55094606", "0.55074745", "0.5497276", "0.5497276", "0.54962224", "0.5493613", "0.547873", "0.54727614", "0.5467304", "0.54610384", "0.54559696", "0.54559696", "0.5447278", "0.5446891", "0.54465854", "0.54438007", "0.5440619", "0.54379416", "0.5424203", "0.53969806", "0.5392475" ]
0.0
-1
This function is called when the disabled button is hit. You can use it to reset subsystems before shutting down.
public void disabledInit(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }", "public void onDisable() {\r\n }", "@Override\n public void onDisabled() {\n }", "@Override\r\n\tpublic void disable() {\n\t\tcurrentState.disable();\r\n\t}", "@Override\n public void onDisable() {\n }", "public void disable()\r\n\t{\r\n\t\tenabled = false;\r\n\t}", "@Override\n\tpublic void onDisable() {\n\t\t\n\t}", "public void onDisable() {\n }", "public void onDisable() {\n }", "public void disable ( ) {\r\n\t\tenabled = false;\r\n\t}", "@Override\r\n\tpublic void onDisable() {\n\t}", "protected void onDisabled() {\n // Do nothing.\n }", "public abstract void onDisable();", "public void onDisable()\n {\n }", "protected abstract void disable();", "public void disable() {\n operating = false;\n }", "public void onDisable() {\n }", "@Override\n\tpublic void onDisable() {\n\n\t}", "void disableMod();", "void disable() {\n }", "public abstract void wgb_onDisable();", "default void onDisable() {}", "public void disable() {\n \t\t\tsetEnabled(false);\n \t\t}", "public void onDisable()\n\t{\n\t\t//Tells the user that the plugin is shutting down.\n\t\tlog.info(\"Shut down.\");\n\t}", "@Override\n public void disabledInit() {\n //Diagnostics.writeString(\"State\", \"DISABLED\");\n }", "void disable();", "void disable();", "public void disable(){\n if(criticalStop) return;\n getModel().setStatus(false);\n }", "public void disable() {\n disabled = true;\n circuit.disable();\n updateSign(true);\n notifyChipDisabled();\n }", "public void disable();", "public abstract void Disabled();", "public void disable(){\r\n\t\tthis.activ = false;\r\n\t}", "public void disable() {\r\n m_enabled = false;\r\n useOutput(0, 0);\r\n }", "@Override\n public void onDisable() {\n getLogger().info(\"Successfully disabled.\");\n }", "@Override\n public void onDisable()\n {\n if (this.schedulerManager.getScheduler() != null)\n {\n try\n {\n this.schedulerManager.getScheduler().shutdown();\n } catch (SchedulerException e)\n {\n e.printStackTrace();\n }\n }\n }", "protected void onHardReset() {\n\t\tonReset();\n\t}", "public void setDisabled() {\n\t\tdisabled = true;\n\t}", "public void disable() {\n\t\tm_enabled = false;\n\t\tuseOutput(0);\n\t}", "@Override\n public void disabledInit() {\n\t\tprocessRobotModeChange(RobotMode.DISABLED);\n }", "@Override\n public void onDisabled(Context context) {\n // Enter relevant functionality for when the last widget is disabled\n }", "@Override\n public void disabledInit() {\n\t// new SetElevator(0).start();\n\tif (autonomousCommand != null)\n\t autonomousCommand.cancel();\n\tScheduler.getInstance().removeAll();\n }", "private void disableButtons()\r\n {\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 onDisable() {\n \tgetLogger().info(\"onDisable has been invoked!\");\n }", "@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 powerdown() {\n monitor.sendPowerdown();\n }", "@Override\n\tpublic void onDisable() {\n\t\tArduinoInstruction.getInst().disable();\n\t}", "protected void ACTION_B_DISABLE(ActionEvent arg0) {\n\r\n\t\tL_FilterStatusBox.setText(\"Disabled (All Ports)\");\r\n\t}", "@Override\n\tpublic void powerOff() {\n\t\tSystem.out.println(\"samsongTV powerOff\");\n\n\t}", "protected void whileDisable()\n\t{\n\n\t}", "void outOfTime() {\r\n\r\n disableOptionButtons();\r\n }", "@Override\n\tpublic void onDisabled(Context context) \n\t{\n\t\tPackageManager pm = context.getPackageManager();\n\t\tpm.setComponentEnabledSetting(\n\t\t\t\tnew ComponentName(\"de.fhe\", \"MyAppWidgetProvider\"),\n\t\t\t\tPackageManager.COMPONENT_ENABLED_STATE_DISABLED, \n\t\t\t\tPackageManager.DONT_KILL_APP );\n\t}", "@Override\r\n\tpublic void powerOff() {\n\r\n\t\tSystem.out.println(\"ig tv power off\");\r\n\r\n\t}", "@Override\r\n\tpublic void power() {\n\t\tSystem.out.println(\"Power off\");\r\n\t\t\r\n\t}", "public void disableProductionButtons(){\n for(int i = 0; i < 3; i++){\n Gui.removeAllListeners(productionButtons[i]);\n productionButtons[i].addActionListener(new ActivateProductionListener(gui,productionButtons[i],i));\n productionButtons[i].setEnabled(false);\n }\n\n baseProductionPanel.disableButton();\n }", "@Override\n protected void end() {\n drive.setEnabled(false);\n drive.setLeftPower(0);\n drive.setRightPower(0);\n }", "@Override\n\tpublic void disabled(AbstractHardware<? extends AbstractHardwareListener> hardware) {\n\t}", "@Override\r\n public void onDisabled(Context context) {\n }", "@Override\r\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n super.onDisabled(context);\n }", "@Override\r\n public void onDisable() {\r\n log.info(\"[SeattleSummer] plugin disabled.\");\r\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisable() {\n try {\n System.out.println(\"Cleaning Dynamic Server System Processes.\");\n for (MinigameServer minigameServer : dynamicServerSystemManager.getServers())\n minigameServer.deleteServer();\n\n // Clean the output directory.\n FileUtils.deleteDirectory(new File(\"../minigameservers\"));\n new File(\"../minigameservers\").mkdirs();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n plugin = null;\n }" ]
[ "0.70443255", "0.7026597", "0.6963652", "0.69619745", "0.6931237", "0.69273555", "0.6925242", "0.69249684", "0.69249684", "0.6918791", "0.6918778", "0.6915999", "0.6901217", "0.69003904", "0.68879694", "0.6879488", "0.6873872", "0.6873772", "0.6831916", "0.6827878", "0.67873013", "0.6729317", "0.6663911", "0.6642028", "0.6628843", "0.66246814", "0.66246814", "0.6618181", "0.6598722", "0.6598374", "0.6569614", "0.6550455", "0.6546489", "0.65418375", "0.65408206", "0.6517947", "0.65154475", "0.65132713", "0.6484074", "0.6476713", "0.6466621", "0.64495754", "0.6434836", "0.64220804", "0.64152193", "0.64118415", "0.6404941", "0.63990873", "0.63839525", "0.63734263", "0.6345153", "0.63445115", "0.63242203", "0.63224334", "0.62985206", "0.62958014", "0.62939286", "0.62929386", "0.62929386", "0.62792104", "0.62787575", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.62727565", "0.625808" ]
0.0
-1
This function is called periodically during operator control
public void teleopPeriodic() { Scheduler.getInstance().run(); drive.updateTeleop(); sensor.updateTeleop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void teleopPeriodic() {\n \t\n \twhile (isOperatorControl() && isEnabled()) {\n \t\tdebug();\n \t\tsmartDashboardVariables();\n \t\t//driver control functions\n \t\tdriverControl();\n \t//state machine\n \tterrainStates();\n \t//this function always comes last\n \t//armSlack();\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n \tTimer.delay(0.005);\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 teleopPeriodic() {\r\n Scheduler.getInstance().run();\r\n OI.poll();\r\n }", "public void operatorControl() {\n myRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tmyRobot.tankDrive(controller, 2, controller, 5);\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n }", "@Override\n public void teleopPeriodic() {\n try {\n mDriveController.update();\n mOperatorController.update();\n driverControl();\n \n } catch (Throwable t) {\n CrashTracker.logThrowableCrash(t);\n throw t;\n }\n \n }", "@Override\n public void teleopPeriodic() {\n }", "@Override\n public void teleopPeriodic() {\n }", "public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\r\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 operatorControl() {\n \tmyRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tdouble x = stick2.getRawAxis(0);\n \tdouble y = stick2.getRawAxis(1);\n \tdouble rot = stick.getRawAxis(0);\n \tSmartDashboard.putNumber(\"x1\", x);\n SmartDashboard.putNumber(\"y1\", y);\n SmartDashboard.putNumber(\"rot1\", rot);\n \tif(Math.abs(x) < .2)\n \t\tx = 0;\n \tif(Math.abs(y) < .2)\n \t\ty = 0;\n \tif(Math.abs(rot) < .2)\n \t\trot = 0;\n \tmyRobot.mecanumDrive_Cartesian(x*-1, y*-1,rot*-1, gyro.getAngle());\n double current1 = pdp.getCurrent(0);\n double current2 = pdp.getCurrent(13);\n double current3 = pdp.getCurrent(15);\n double current4 = pdp.getCurrent(12);\n SmartDashboard.putNumber(\"Front Left current\", current1);\n SmartDashboard.putNumber(\"back Left current\", current2);\n SmartDashboard.putNumber(\"Front right current\", current3);\n SmartDashboard.putNumber(\"back right current\", current4);\n SmartDashboard.putNumber(\"x\", x);\n SmartDashboard.putNumber(\"y\", y);\n SmartDashboard.putNumber(\"rot\", rot);\n SmartDashboard.putNumber(\"Gyro\", gyro.getAngle());\n \tTimer.delay(0.005);\t\t// wait for a motor update time\n }\n }", "public void teleopPeriodic() \r\n {\r\n Watchdog.getInstance().feed();\r\n Scheduler.getInstance().run();\r\n \r\n //Polls the buttons to see if they are active, if they are, it adds the\r\n //command to the Scheduler.\r\n if (mecanumDriveTrigger.get()) \r\n Scheduler.getInstance().add(new MechanumDrive());\r\n \r\n else if (tankDriveTrigger.get())\r\n Scheduler.getInstance().add(new TankDrive());\r\n \r\n else if (OI.rightJoystick.getRawButton(2))\r\n Scheduler.getInstance().add(new PolarMechanumDrive());\r\n \r\n resetGyro.get();\r\n \r\n //Puts the current command being run by DriveTrain into the SmartDashboard\r\n SmartDashboard.putData(DriveTrain.getInstance().getCurrentCommand());\r\n \r\n SmartDashboard.putString(ERRORS_TO_DRIVERSTATION_PROP, \"Test String\");\r\n \r\n \r\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}", "public void teleopPeriodic() {\n \tteleop.teleopPeriodic();\n }", "@Override\n public void teleopPeriodic() {\n\tupdateDiagnostics();\n\tScheduler.getInstance().run();\n }", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "public void teleopPeriodic() {\n driverScreen.updateLCD();\n }", "@Override\n public void teleopPeriodic() {\n teleop.periodic();\n toggleCompressor = toggleCompressor ^ robot.compressorToggle.get();\n robot.runCompressor.set(toggleCompressor);\n Watcher.update();\n\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "public void updatePeriodic() {\r\n }", "public void teleopPeriodic() {\n \t//getInstance().run();;\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above\n \tScheduler.getInstance().run();\n\t\n }", "@Override\n public void teleopPeriodic() {\n // drive.DrivePeriodic();\n controllerMap.controllerMapPeriodic();\n // intake.IntakePeriodic();\n // climb.ClimbPeriodic();\n\n }", "public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() //runs the teleOp part of the code, repeats every 20 ms\n\t{\n\t\tScheduler.getInstance().run(); //has to be here, I think that this is looping the method\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the SmartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n//\t\tSmartDashboard.putBoolean(\"allOK\", Robot.driveFar.ultrasonicOK);\n\t\tdriveExecutor.execute(); //running the execute method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}", "@Override\n public void teleopPeriodic()\n {\n commonPeriodic();\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\n\t\tif (oi.getRightTrig()) {\n\t\t\tshifter.set(Value.kForward);\n\t\t} else if (oi.getLeftTrig()) {\n\t\t\tshifter.set(Value.kReverse);\n\t\t}\n\t\tSystem.out.println(shifter.get());\n\t\t\t\n\t\tif(oi.getClimber()){\n\t\t\tclimber.set(1.0);\n\t\t\tSystem.out.println(\"climber running\");\n\t\t}else {\n\t\t\tclimber.set(0);\n\t\t\tSystem.out.println(\"climber not running\");\n\t\t}\n\t}", "@Override\n public void autonomousPeriodic() {\n \n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void autonomousPeriodic() {\n\n }", "@Override\n\tpublic void robotPeriodic() {\n\t}", "@Override\n\tpublic void robotPeriodic() {\n\t}", "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 }", "@Override\n public void robotPeriodic() {\n\n enabledCompr = pressBoy.enabled();\n //pressureSwitch = pressBoy.getPressureSwitchValue();\n currentCompr = pressBoy.getCompressorCurrent();\n //SmartDashboard.putBoolean(\"Pneumatics Loop Enable\", closedLoopCont);\n SmartDashboard.putBoolean(\"Compressor Status\", enabledCompr);\n //SmartDashboard.putBoolean(\"Pressure Switch\", pressureSwitch);\n SmartDashboard.putNumber(\"Compressor Current\", currentCompr);\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\r\n public void periodic() {\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putBoolean(\"Max Intake Extension: \", RobotMap.intakeLifted.get());\n\t\tSmartDashboard.putBoolean(\"Max Lift Extension:\", RobotMap.isAtTop.get());\n\t\tSmartDashboard.putBoolean(\"Min Lift Extension:\", RobotMap.isAtBottom.get());\n\t\tDriveTrain.driveWithJoystick(RobotMap.stick, RobotMap.rd); // Drive\n\t\tTeleOp.RaiseLift(RobotMap.liftTalon, RobotMap.controller); // Raise lift\n\t\tif(RobotMap.controller.getRawAxis(RobotMap.lowerLiftAxis) >= 0.2) {\n\t\tTeleOp.LowerLift(RobotMap.liftTalon, RobotMap.controller);\n\t\t}\n\t\tTeleOp.DropIntake(RobotMap.controller, RobotMap.intakeLifter);\n\t\tTeleOp.spinOut(RobotMap.intakeVictorLeft, RobotMap.controller);\n\t\t//TeleOp.spinnySpinny(RobotMap.intakeVictorLeft, RobotMap.stick);\n\t}", "public void autonomousPeriodic()\r\n {\r\n \r\n }", "@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}", "@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}", "public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void teleopPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n\tpublic void periodic()\n\t{\n\t}", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }" ]
[ "0.7665666", "0.73227316", "0.7286976", "0.72593725", "0.7255314", "0.71488637", "0.71488637", "0.71138996", "0.7093574", "0.7090445", "0.70560575", "0.7046668", "0.704289", "0.7039102", "0.7032054", "0.7023366", "0.6963418", "0.69623876", "0.69429386", "0.69309705", "0.69309705", "0.69309705", "0.69309705", "0.69309705", "0.69309705", "0.6899386", "0.68936527", "0.68753546", "0.687443", "0.6872987", "0.68692183", "0.6860374", "0.68447095", "0.6841578", "0.6841578", "0.6831749", "0.68232137", "0.68232137", "0.6814693", "0.6814693", "0.6814693", "0.6814693", "0.67941135", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.67706984", "0.67706984", "0.67706984", "0.6768479", "0.6764131", "0.6764131", "0.6764131", "0.6764131", "0.6757807", "0.67566633", "0.67341703", "0.67341703", "0.67341703", "0.67252094", "0.6721157", "0.67074573", "0.6701728", "0.66846615", "0.66846615", "0.66846615", "0.6682299", "0.6671709" ]
0.6882646
27
This function is called periodically during test mode
public void testPeriodic() { LiveWindow.run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void testPeriodic()\n {\n \n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n\n LiveWindow.updateValues();\n }", "@Override\n\tpublic void testPeriodic() {\n\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}", "public void testPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n\tpublic void testPeriodic() {\n\t\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\t\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\t\n\t}", "public void testPeriodic() {\n\t\tLiveWindow.run();\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tbeginPeriodic();\n\t\t//LiveWindow.run();\n\t\tendPeriodic();\n\t}", "@Override\r\n\tpublic void sssDoLwTestPeriodic() {\n\r\n\t}", "@Override\n\tpublic void testPeriodic() {}", "public void testPeriodic() {\n \n }", "public void testPeriodic() {\n \n }", "public void testPeriodic() {\n \n }", "public void testPeriodic() {\n\n\t}", "public void testPeriodic() {\n\t}", "@Override\n public void testPeriodic() {\n //Diagnostics.writeString(\"State\", \"TEST\");\n }", "public void testPeriodic() {\r\n }", "public void testPeriodic() {\n LiveWindow.run();\n //init.start();\n }", "public void testPeriodic() {\r\n \r\n }", "public void testPeriodic() {\r\n \r\n }", "protected void runEachSecond() {\n \n }", "@Override\n public void testPeriodic() {\n CommandScheduler.getInstance().run();\n\n SmartDashboard.putNumber(\"XCOUNT\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n\n }", "public void testPeriodic() \n {\n LiveWindow.run();\n }", "public void testPeriodic() {\n \t\n }", "public void testPeriodic() {\n \tterrainStates();\n \tdebug();\n }", "@Test\n public void testTimelyTest() {\n }", "public void testPeriodic() {\r\n \r\n }", "@SuppressWarnings(\"PMD.JUnit4TestShouldUseTestAnnotation\")\n public void testPeriodic() {\n if (m_tmpFirstRun) {\n System.out.println(\"Default testPeriodic() method... Override me!\");\n m_tmpFirstRun = false;\n }\n }", "protected void runEachMinute() {\n \n }", "@Test\n public void refresh() throws Exception {\n }", "@Override\r\n public void runTests() {\r\n getTemperature();\r\n }", "@Override\n public void simulationPeriodic() {\n }", "public void demoSchduleMethod() {\n log.info(\"Method executed at every 5 seconds. Current time is :: \" + new Date());\n }", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "private void dofakework() {\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Before\r\n\tpublic void doThisEveryTime() {\n\t}", "@Override\n public void simulationPeriodic() {\n }", "public void run() {\n\n long now = System.currentTimeMillis();\n //System.out.println(\"1: \" + this.getClass().getName() + \"#\" + id + \", \" + (System.currentTimeMillis()) + \" ms\");\n try {\n\n test.setUp();\n this.testReport = new TestReport(id, this.getClass().getName());\n while (alive.get()) {\n test.test(this.id);\n counter.incrementAndGet();\n }\n //long stop = System.currentTimeMillis();\n //System.out.println(\"2: \" + this.getClass().getName() + \"#\" + id + \", \" + stop + \" \" + (stop - now) + \" ms\");\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n test.tearDown();\n this.testReport.stopTimers();\n //testReport.printInfo();\n } catch (Exception e) {\n // ignore errors in tearDown for now\n }\n }\n\n }", "@Override\n public void autonomousPeriodic() {\n \n }", "public void run() {\n\t\t\t \t \n\t\t\t \t test.load2();\n\t\t\t \t //System.out.println(\"heart beat report\"+System.currentTimeMillis());\n\t\t\t }", "public void _testSandbox() throws InterruptedException{\n Thread.sleep(500000);\n }", "@Override\n public void autonomousPeriodic() {\n\n }", "public void run() {\n\t\t\t \t \n\t\t\t \t test.load1();\n\t\t\t \t //System.out.println(\"heart beat report\"+System.currentTimeMillis());\n\t\t\t }", "protected void runEach10Minutes() {\n try {\n saveHistoryData();\n if (isEnabledScheduler()) {\n boolean action = getLightSchedule().getCurrentSchedule();\n if (action) {\n if (!currentState) switchOn();\n } else {\n if (currentState) switchOff();\n }\n }\n } catch (RemoteHomeManagerException e) {\n RemoteHomeManager.log.error(44,e);\n } catch (RemoteHomeConnectionException e) {\n RemoteHomeManager.log.error(45,e);\n }\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n\tpublic void testPeriodic(IRobot robot) {\n\t}", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "protected void runEachHour() {\n \n }", "protected void runAfterTest() {}", "@Override\n public void periodic() {\n UpdateDashboard();\n }", "@Override\n\tpublic void sleep() {\n\t\t\n\t}", "public void runLastTime(){\n\t\t/*try {\n\t\t\tlong timeDiff = 100;\n\t\t\t\n\t\t\tFeatureListController controller = new FeatureListController(timeDiff);\n\t\t\tTestSensorListener listener1 = new TestSensorListener();\n\t\t\tcontroller.registerSensorListener(listener1);\n\t\t\tTestSensorListener listener2 = new TestSensorListener();\n\t\t\tcontroller.registerSensorListener(listener2);\n\t\t\t\n\t\t\t\n\t\t\t//20 samples in total\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\t\n\t\t\t\n\t\t\tfor(int i=0;i<2;++i){\n\t\t\t\tSensorListener listener;\n\t\t\t\tif(i==0)\n\t\t\t\t\tlistener = listener1;\n\t\t\t\telse \n\t\t\t\t\tlistener = listener2;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"LISTENER\" + (i+1));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Now:\" + new Date().getTime());\n\t\t\t\tList<FeatureList> featureLists = controller.getLastFeatureListsInMilliseconds(listener, -1);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"All feature lists with milliseconds method\");\n\t\t\t\tfor(FeatureList l : featureLists)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"All feature lists with n method\");\n\t\t\t\tList<FeatureList> featureLists2 = controller.getLastNFeatureList(listener, -1);\n\t\t\t\tfor(FeatureList l : featureLists)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Last milliseconds \" + 40);\n\t\t\t\tList<FeatureList> featureLists3 = controller.getLastFeatureListsInMilliseconds(listener, 40);\n\t\t\t\tfor(FeatureList l : featureLists3)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Last N Feature Lists \" + 6);\n\t\t\t\tList<FeatureList> featureLists4 = controller.getLastNFeatureList(listener, 6);\n\t\t\t\tfor(FeatureList l : featureLists4)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t}\n\t\t\t\n\n\t\t} catch (InterruptedException ex) {\n\t\t\tSystem.out.println(ex.getLocalizedMessage());\n//Logger.getLogger(CaseFeatureListController.class.getName()).log(Level.SEVERE, new double[10], ex);\n\t\t}*/\n\t\t\n\t}", "@Override\n\tpublic void homeTestRun() {\n\t\t\n\t}", "@Override\r\n\tpublic void run() {\r\n\t\ttimer = new Timer();\r\n\t\ttimer.schedule(new TimerTask() {\r\n\t\t\t@Override\r\n public void run() {\r\n Main.myIntegratedSensorSuite.reinitializeRainData();\r\n }\r\n\t\t}, 0, 20000); //runs once initially then again every 20 seconds\r\n\t}", "@Override\r\n\tpublic void perSecond() {\n\r\n\t}", "private void stressTest() {\n\t\t\n\t\tTimerTask task = new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tint count = 1;\n\t\t\t\tint len = 100;\n\t\t\t\tint maxCount = 1000000;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Start stress test...\");\n\t\t\t\twhile (count <= maxCount) {\n\t\t\t\t\t\n\t\t\t\t\tif ((count % 1000) == 0) {\n\t\t\t\t\t\tSystem.out.println(\"Count: \" + count + \" of \" + maxCount);\n\t\t\t\t\t\tSystem.gc();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlong larray[] = new long[len];\n\t\t\t\t\t\n\t\t\t\t\tlarray[0] = count;\n\t\t\t\t\tlarray[len-1] = count;\n\t\t\t\t\t\n\t\t\t\t\tMessage message = Message.createMessage(getId(), \"Triggers\");\n\t\t\t\t\tmessage.setPayload(larray);\n\t\t\t\t\tsend(message);\n\n\t\t\t\t\t\n//\t\t\t\t\ttry {\n//\t\t\t\t\t\tThread.sleep(25);\n//\t\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t}\n\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Done.\");\n\n\t\t\t}\n\n\t\t};\n\n\t\tTimer timer = new Timer();\n\t\t// one time schedule\n\t\ttimer.schedule(task, 2000L);\n\t}", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }" ]
[ "0.7800467", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.7513078", "0.7469104", "0.7374911", "0.7364876", "0.7364876", "0.7364876", "0.7364876", "0.73407346", "0.7327271", "0.73171455", "0.73171455", "0.7293993", "0.7293993", "0.72778416", "0.72312987", "0.7207229", "0.720396", "0.71983147", "0.716904", "0.716904", "0.716904", "0.713752", "0.7127215", "0.7124398", "0.71158797", "0.71140385", "0.7108927", "0.7108927", "0.7086685", "0.6976778", "0.6969408", "0.6967512", "0.6930725", "0.68409485", "0.67182064", "0.6617569", "0.6584265", "0.65554386", "0.65530086", "0.65268195", "0.64798206", "0.6477171", "0.6472228", "0.6443787", "0.6429172", "0.6394023", "0.63703555", "0.6364299", "0.63590497", "0.634407", "0.63261676", "0.63225466", "0.6301144", "0.6301144", "0.62885046", "0.6285774", "0.6285774", "0.6285774", "0.62847394", "0.6282452", "0.62705654", "0.6259278", "0.62195456", "0.6217139", "0.62130535", "0.6211397", "0.6197089", "0.61921287", "0.6189988", "0.6189988", "0.6189988", "0.6189988", "0.6185031", "0.6179041", "0.6179041", "0.6179041", "0.6179041", "0.6179041", "0.6179041", "0.6179041", "0.6179041", "0.6179041" ]
0.71142244
42
/////// ARRAYLIST UTILITIES /////////
public void clearFreeSlots() { AvailableSlots.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }", "@Test\n\tpublic void createListWithArraysUtil() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\tList<String> copy = Arrays.asList(\"AAPL\", \"MSFT\");\n\n\t\tassertTrue(list.equals(copy));\n\t}", "void mo9148a(int i, ArrayList<C0889x> arrayList);", "private void displayArrays(ArrayList list){}", "public static void main(String[] args) {\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\n\t\t// RSN NOTE -- ArrayList can grow in size, arrays can't\n\t\tlist.add(1);\n\t\tlist.add(2);\n\t\tSystem.out.println(\"Length \" + list.size());\n\t\t\n\t\t// RSN NOTE -- Elements can be inserted or deleted from any locaiton, NOT in array\n\t\tArrayList<String> sList = new ArrayList<String>();\n\t\tsList.add(\"ONE\");\n\t\tsList.add(\"TWO\");\n\t\tsList.add(\"THREE\");\n\t\tsList.remove(1); // ====NOTE=====>>> compare Arraylist remove with LinkedListDemo remove\n\t\tSystem.out.println(sList.toString());\n\t\t\n\t\tSystem.out.println(\"Contains \"+sList.contains(\"THREE\")); //====NOTE=====>>>SUPER IMP; compare contains of arrayList and Linked List\n\t\t\n\t\t/*\n\t\t * ArrayList class has methods to perform solo modifications ( add(), remove()Ö ), \n\t\t * bulk modifications ( addAll(), removeAll(), retainAll()Ö ), searching( indexOf(), lasIndexOf() ) and iterations( iterator() ).\n\t\t */\n\t\t\n\t\t// RSN NOTE -- If generics are not used, ARRAY list can hold any data type\n\t\t ArrayList listForAll = new ArrayList(); //ArrayList without generics\n\t listForAll.add(\"ZERO\"); //adding string type object\n\t listForAll.add(1); //adding primitive int type\n\t listForAll.add(20.24); //adding primitive double type\n\t listForAll.add(new Float(23.56)); //Adding Float wrapper type object\n\t listForAll.add(new Long(25)); //Adding Long wrapper type object\n\t \n\t System.out.println(listForAll); //Output : [ZERO, 1, 20.24, 23.56, 25]\n\t \n\t // RSN NOTE -- Array Insertion time\n\t arrayInserionTime();\n\t \n\t listIteratorMovesInBothDirections();\n\t \n\t reverseElementInList();\n\t \n\t convertBetweenArrayAndList();\n\n\t}", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "void arrayListToArray() {\n List<String> coolStringList = Arrays.asList( \"Java\", \"Scala\", \"Groovy\" ); //Declare &initialize o\n //coolStringList.add( \"Syed\" ); // Exception in thread \"main\" java.lang.UnsupportedOperationException\n coolStringList.set( 0, \"Syed\" );// works well\n System.out.println( coolStringList );\n/*\n /) Its not as fast as Arrays.asList() but more flexible.\n\n 2) This method actually copies the content of the underlying array into ArrayList provided.\n\n\n 3) Since you are creating copy of original array, you can add, modify and remove any element without affecting original one.*/\n\n List<String> assetList = new ArrayList();\n String[] asset = {\"equity\", \"stocks\", \"gold\", \"foriegn exchange\", \"fixed income\", \"futures\", \"options\"};\n Collections.addAll( assetList, asset );\n System.out.println( assetList );\n assetList.add( \"Mohammed\" );\n System.out.println( assetList );\n\n List newAssetList = new ArrayList();\n newAssetList.addAll( Arrays.asList( asset ) );\n System.out.println( newAssetList );\n newAssetList.add( \"YNS\" );\n System.out.println( newAssetList );\n /*String [] currency = {\"SGD\", \"USD\", \"INR\", \"GBP\", \"AUD\", \"SGD\"};\n System.out.println(\"Size of array: \" + currency.length);\n List<String> currencyList = CollectionUtils.arrayToList(currency);\n*/\n }", "@SuppressWarnings(\"unchecked\")\n public void testListToArray() throws Exception\n {\n List<PSKeyword> sourceList = new ArrayList<PSKeyword>();\n sourceList.add(createKeyword(\"1\"));\n sourceList.add(createKeyword(\"2\"));\n \n List<PSKeyword> targetList = roundTripListConversion(\n com.percussion.webservices.content.PSKeyword[].class, \n sourceList);\n\n assertTrue(sourceList.equals(targetList));\n }", "public void create() {\n String[] arrays = new String[100];\n ArrayList<String> list1 = new ArrayList(); //Object[10]\n list1.size(); //0\n list1.add(\"Vivek\"); //object[0] = \"Vivek\"\n list1.size(); //1\n list1.get(0);//\"Vivek\"\n\n list1.remove(1);\n\n list1.add(0, \"Vivek\");\n\n\n ArrayList<String> list3 = new ArrayList<String>(list1);\n\n ArrayList<Student> list = new ArrayList<Student>();\n\n\n\n }", "@Test\r\n\tpublic void testToArrayType() {\r\n\t\tMunitions[] sample1 = new Munitions[5];\r\n\t\tsample1 = list.toArray(sample1);\r\n\t\tAssert.assertEquals(15, sample1.length);\r\n\t\tfor (int i = 0; i < sample1.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t\tMunitions[] sample2 = new Munitions[20];\r\n\t\tsample2 = list.toArray(sample2);\r\n\t\tAssert.assertEquals(20, sample2.length);\r\n\t\tfor (int i = 0; i < sample2.length - list.size(); i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t}", "@Test public void getArrayShouldReturnCorrectArray() throws SQLException {\n\t\tList<String> list = new ArrayList<>();\n\t\tArray array = new ListArray(list, Types.VARCHAR);\n\t\tassertTrue(array.getArray() instanceof String[]);\n\t\tlist.add(\"test\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test\", ((String[])array.getArray())[0]);\n\t\tlist.add(\"test2\");\n\t\tarray = new ListArray(list, Types.VARCHAR);\n\t\tassertEquals(\"test2\", ((String[])array.getArray())[1]);\n\t}", "public static void arrayListSubtypeTest()\r\n\t{\r\n\t\tArrayList<Person> persons = new ArrayList<Person>();\r\n\t persons.add(new Person(\"twoa\"));\r\n\t persons.add(new Person(\"threea\"));\r\n\t PrintCollection(persons);\r\n\t // PrintCollection1(persons);\r\n\t PrintCollection2(persons);\r\n\t}", "public void arrayList(List<Student> list)\r\n\t{\r\n\t\tlist.add(s1);\r\n\t\tlist.add(s2);\r\n\t\tlist.add(s3);\r\n\t\tlist.add(s4);\r\n\t\tlist.add(s5);\r\n\t\tlist.add(s6);\r\n\t\tSystem.out.println(\"Objects of ArrayList\");\r\n\t\tfor(int i=0;i<list.size();i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testToArray() {\r\n\t\tObject[] sample = list.toArray();\r\n\t\tAssert.assertEquals(15, sample.length);\r\n\t\tfor (int i = 0; i < sample.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample[i]);\r\n\t\t}\r\n\t}", "public abstract ArrayList<String[]> toStrings();", "@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 }", "private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }", "private String[] toStringArray(ArrayList<String> list) {\n String[] tempStrings = new String[list.size()];\n tempStrings = list.toArray(tempStrings);\n\n return tempStrings;\n }", "public static void main(String[] args)\r\n\t{\nArrayList al = new ArrayList<>();\r\nal.add(10);\r\nal.add(\"manu\");\r\nal.add('m');\r\nObject [] ob=al.toArray();\r\nfor (int i = 0; i < ob.length; i++)\r\n{\r\n\tSystem.out.println(ob[i]);\r\n\t\r\n}\r\n\t}", "private TaskListItem[] getListArray() {\n return allLists.toArray(new TaskListItem[allLists.size()]);\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 ArrayList61B() {\n\t\tthis.size = 1;\n\t\tthis.arrayList = (E[]) new Object[this.size];\n\t}", "private Object arrayToSPLArray(String name, JSONArray jarr, Type ptype) throws Exception {\n\t\tif(l.isLoggable(TraceLevel.DEBUG)) {\n\t\t\tl.log(TraceLevel.DEBUG, \"Creating Array: \" + name);\n\t\t}\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tint cnt=0;\n\t\tString cname = \"List: \" + name;\n\n\t\tswitch(ctype.getElementType().getMetaType()) {\n\t\tcase INT8:\n\t\tcase UINT8: \n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tbyte[] arr= new byte[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Byte)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT16:\n\t\tcase UINT16:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tshort[] arr= new short[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Short)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT32:\n\t\tcase UINT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tint[] arr= new int[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Integer)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase INT64:\n\t\tcase UINT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tlong[] arr= new long[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Long)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase BOOLEAN:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tboolean[] arr= new boolean[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Boolean)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tfloat[] arr= new float[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Float)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tdouble[] arr= new double[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Double)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase USTRING:\n\t\t{\n\t\t\tList<String> lst = new ArrayList<String>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((String)obj);\n\t\t\t}\n\t\t\treturn lst.toArray(new String[lst.size()]);\n\t\t} \n\n\t\tcase BSTRING:\n\t\tcase RSTRING:\n\t\t{\n\t\t\tList<RString> lst = new ArrayList<RString>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((RString)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase TUPLE:\n\t\t{\n\t\t\tList<Tuple> lst = new ArrayList<Tuple>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Tuple)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase LIST:\n\t\tcase BLIST:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase SET:\n\t\tcase BSET:\n\t\t{\n\t\t\tSet<Object> lst = new HashSet<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase DECIMAL32:\n\t\tcase DECIMAL64:\n\t\tcase DECIMAL128:\n\t\t{\n\t\t\tList<BigDecimal> lst = new ArrayList<BigDecimal>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((BigDecimal)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase TIMESTAMP:\n\t\t{\n\t\t\tList<Timestamp> lst = new ArrayList<Timestamp>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Timestamp)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\n\t\t//TODO -- not yet supported types\n\t\tcase BLOB:\n\t\tcase MAP:\n\t\tcase BMAP:\n\t\tcase COMPLEX32:\n\t\tcase COMPLEX64:\n\t\tdefault:\n\t\t\tthrow new Exception(\"Unhandled array type: \" + ctype.getElementType().getMetaType());\n\t\t}\n\n\t}", "ListType createListType();", "public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }", "public static void clientFunc(){\n List list = new ArrayList(); //rawtype list\n list.add(10);\n list.add(\"jenkins\");\n list.add(new Object());\n\n //unsafe classcast exception at runtime\n //rawtypes are unsafe\n List<String> stringList = list;\n\n ListIterator listIterator = list.listIterator();\n while(listIterator.hasNext()){\n System.out.println(listIterator.next());\n }\n }", "public static void processArrayList(){\n ArrayList<String> newArray = new ArrayList<String>();\n newArray.addAll(groceryList.getGroceryList()); //Method 1: adds all items from the groceryList into the newArray\n\n ArrayList<String> newArray2 = new ArrayList<String>(groceryList.getGroceryList()); //Method 2: same as method 1 but the copying happens at the time of initialising the newArray2\n\n //if for some reason you want to save all the contents of an arrayList into an array\n String[] myArray = new String[groceryList.getGroceryList().size()]; //create the array to be equal to the size of the arraylist\n myArray = groceryList.getGroceryList().toArray(myArray); //convert an arraylist of strings (the outcome of getGroceryList()), and save it into our array\n }", "public static void main(String[] args) {\n ArrayList<Object> ar = new ArrayList<Object>();\n ar.add(100);\n ar.add(100);\n ar.add(\"testing\");\n ar.add('c');\n ar.add(12.36);\n ar.add(true);\n\n System.out.println(ar);\n System.out.println(ar.get(4));\n System.out.println(ar.size());\n System.out.println(\"LI = \"+ 0);\n System.out.println(\"HI = \" + (ar.size()-1));\n\n ar.add(500);\n ar.add(400);\n System.out.println(ar.size());\n\n }", "public abstract void mo56920a(List<C4122e> list);", "public static void main(String[] args) {\n\t\tArrayList ar=new ArrayList();\n\t\tar.add(100);\n\t\tar.add(200);\n\t\t\n\t\t ArrayList<Integer> arr=new ArrayList<Integer>();\n\t\t arr.add(10);\n\t\t arr.add(200);\n\t\t arr.add(400);\n\t\t \n\t\t \n\t\t System.out.println(arr.size());//length of arraylist\n\t\t \n\t\t //iteration\n\t\t for(int i=0;i<arr.size();i++) {\n\t\t\t System.out.println(i);\n\t\t }\n\t\t \n\t\t for(Integer e:arr) {\n\t\t\t System.out.println(e);\n\t\t }\n\t\t \n\t\t arr.stream().forEach(e->System.out.println(e));\n\t\t \n\t\t Iterator<Integer>it=arr.iterator();\n\t\t while(it.hasNext()) {\n\t\t\t System.out.println(it.next());\n\t\t }\n\t\tSystem.out.println(\"******************************************\");\n\n\t\t//create one arraylist with another\n\t\t\n\t\tArrayList<Integer> list= new ArrayList<Integer>(Arrays.asList(10,20,30,40,50));\n\t\t\n\t\t//arraylist methods\n\t\t//1.Add\n\t\tlist.add(90);\n\t\tSystem.out.println(list);\n\t\t\n\t\t//2.AddAll\n\t\tArrayList<String> ar1=new ArrayList<String>(Arrays.asList(\"Ruby\",\"Python\",\"Java\",\"C#\"));\n\t\t\n\t\tArrayList<String> ar2=new ArrayList<String>(Arrays.asList(\"Testing\",\"Devops\"));\n\n\t\tar1.addAll(ar2);\n\t\tar2.addAll(ar1);\n\t\tSystem.out.println(ar1);\n\t\tSystem.out.println(ar2);\n\t\t\n\t\t//3.clear\n\t\t//ar1.clear();\n\t\tSystem.out.println(ar1);\n\t\t\n\t\t//4.clone\n\t\tArrayList<String> clonelist=( ArrayList<String>)ar2.clone();\n\t\tSystem.out.println(clonelist);\n\n\t\t//5.contains\n\t\tSystem.out.println(ar2.contains(\"python\"));\n\t\t\n\t\t//6.index of\n\t\tSystem.out.println(ar1);\n\t\tSystem.out.println(ar1.indexOf(\"java\")>0);\n\t\t\n\t\t//7.last index of-returns inetegre\n\t\t\n\t\tArrayList<String> list1=new ArrayList<String>(Arrays.asList(\"Anu\",\"Naveen\",\"Tom\"));\n\t\tint i=list1.lastIndexOf(\"test\");\n\t\tSystem.out.println(i);\n\t\t\n\t\t//8.remove\n\t\tlist1.remove(1);\n\t\tlist1.remove(\"Anu\");\n\t\t\n\t\t//9.removeif\n\t\tArrayList<Integer> numbers=new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,10));\n\t\tnumbers.removeIf(num->num%2==0);//printing all odd numbers /elimnating even numbers\n\t\tSystem.out.println(numbers);\n\t\t\n\t\t//10.retain All\n\t\tArrayList<String> al=new ArrayList<String>(Arrays.asList(\"ANu\",\"Robin\",\"Sky\",\"Red\"));\n\t\tal.retainAll(Collections.singleton(\"ANu\"));\n\t\tSystem.out.println(al);\n\t\t\n\t\t//11.How to create a substring from arraylist\n\t\tArrayList<Integer> no=new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6,7,8,9,12,13,14));\n\t\t\n\t\tArrayList<Integer> substring=new ArrayList<Integer>(no.subList(3, 9));\n\t\tSystem.out.println(substring);\n\t\t\n\t\t//How to convert an arraylist to array\n\t\tObject arr1[]=no.toArray();\n\t\tSystem.out.println(Arrays.toString(arr1));\n\t\t\n\t\tfor(Object e:arr1) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\t/*How to synchronise arraylist\n\t\t * 1.collections.synchronisedlist()->returns a synchronised list\n\t\t * 2.CopyOnWriteArraylist-synchronised variant of arraylist\n\t\t*/\n\t\t\n\t\tList<String> namelist=(List<String>) Collections.synchronizedCollection(new ArrayList<String>());\n\t\t\n\t\t\n\t\t//How to remove duplicate elements using linkedhashset and streams\n\t\t\n\t\t//how to compare 2 arraylist\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "public void tacoArray() {\n\n\n ArrayList<String> tacos = new ArrayList<>();\n tacos.add(\"blah\");\n tacos.add(\"blah2\");\n tacos.add(\"blah3\");\n tacos.add(\"blah4\");\n tacos.add(\"blah5\");\n }", "private static String[] listToArray(List<String> list){\n\t\tString[] arr = new String[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++){\n\t\t\t\n\t\t\tarr[i] = list.get(i);\n\t\t}\n\t\t\n\t\treturn arr;\n\t}", "public abstract void mo56923b(List<C4122e> list);", "abstract void makeList();", "interface IList<T> extends Iterable<T> {\n // determines if list is empty\n boolean isEmpty();\n\n // returns the length of our list\n int len();\n\n // for iterating over the list\n Iterator<T> iterator();\n\n // adds an element to the list\n IList<T> add(T t);\n\n // gets data at index i\n T get(int i);\n\n // appends a list to the list\n IList<T> append(IList<T> l);\n\n // checks if list has another value left\n boolean hasNext();\n\n // gets data value at this point\n T getData();\n\n // gets the rest of the list\n IList<T> getNext();\n}", "@Test\n public void testToArray_0args() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Object[] result = instance.toArray();\n assertArrayEquals(expResult, result);\n\n }", "@Test public void asListSimple() {\n @SuppressWarnings(\"null\") final @NotNull List<Integer> is = as.list(new int @NotNull [] { 12, 13, 14 });\n azzert.that(is.get(0), is(fluent.ly.box.it(12)));\n azzert.that(is.get(1), is(fluent.ly.box.it(13)));\n azzert.that(is.get(2), is(fluent.ly.box.it(14)));\n azzert.that(is.size(), is(3));\n }", "private <T> void populateArrayFromList(T[] arr, ArrayList<T> arrayList) {\n\t\tSystem.out.println(\"Array size \" + arr.length);\n\t\tSystem.out.println(\"ArrayList size \" + arrayList.size());\n\t\tfor (int i = 0; i < arrayList.size(); i++) {\n\t\t\tsavedListModel.addElement(arrayList.get(i).toString());\n\t\t\tarr[i] = arrayList.get(i);\n\t\t}\n\t}", "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 }", "StringList createStringList();", "private void intListToArrayList(int[] list, ArrayList<Integer> arrayList){\n for(int integer: list){\n arrayList.add(integer);\n }\n }", "static /* synthetic */ List m17132a(List list) throws Exception {\n ArrayList arrayList = new ArrayList(list);\n Collections.sort(arrayList, f15631B0);\n return arrayList;\n }", "List<T> readList();", "@Test\r\n public void testGenericArray()\r\n {\r\n Type t0 = Types.create(List.class).withType(Number.class).build();\r\n Type arrayType = Types.createGenericArrayType(t0);\r\n test(arrayType);\r\n }", "public List_inArraySlots() {\n intElements = new int[INITIAL_CAPACITY];\n doubleElements = new double[INITIAL_CAPACITY];\n stringElements = new String[INITIAL_CAPACITY];\n\n typeOfElements = new int[INITIAL_CAPACITY];\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 BaselineList(ArrayList<float[]> list) {\n\t\tthis.listNum = list.size();\n\t\tthis.capacity = listNum * 2;\n\t\tthis.list = new ArrayList<float[]>(list);\n\t}", "public ArrayList() {\n\t\tthis.elements = new Object[5];\n\t\tthis.last = -1;\n\t}", "void mo54419a(List<String> list);", "public MyArrayList() {\n this.IntList = new int[10];\n this.CharList = new Character[10];\n this.StringList = new String[5];\n \n // fill all 3 arrays with data\n for(int i = 0; i < IntList.length; i++) {\n IntList[i] = (int) (Math.random()*52);\n }\n\t \n // Populate char array\n for(int i = 0; i < CharList.length; i++) {\n \n Random random = new Random();\n CharList[i] = (char)(random.nextInt(26) + 'a');\n }\n\t \n // Populate String array\n StringList[0] = \"joe\";\n StringList[1] = \"mark\";\n StringList[2] = \"abbey\";\n StringList[3] = \"tony\";\n StringList[4] = \"kevin\"; \n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) {\n\t\t\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tArrayList ar = new ArrayList();\n\t\tar.add(1);\n\t\tar.add(2);\n\t\tar.add(3);\n\t\tar.add(\"Tom\");\n\t\tar.add(12.33);\n\t\t\n\t\tfor(int i=0; i<ar.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(ar.get(i));\n\t\t}\n\t\t\n\t // 2. dynamic generic array\n\t\t\n\t\tArrayList <Integer> ar1 = new ArrayList <Integer>();\n\t\t\n\t\tar1.add(89);\n\t\tar1.add(56);\n\t\tfor(int i=0; i<ar1.size(); i++)\n\t\t{\n\t\t System.out.println(ar1.get(i));\n\t\t}\n\tSystem.out.println(\"******************\");\t\n\t\n\tArrayList <Integer> ar2 = new ArrayList <Integer>();\n\t\n\tar2.add(55);\n\tar2.add(88);\n\tfor(int i=0; i<ar2.size(); i++)\n\t{\n\t System.out.println(ar2.get(i));\n\t}\n\tSystem.out.println(\"*********************\");\n\t\n\t//3. adding two generic array values, ensure the type of both array should be same\n\t\n\t\tar1.addAll(ar2);\n\t\t\n\t\tSystem.out.println(ar1.size());\n\t\t\n\t\tfor(int i=0; i<ar1.size(); i++)\n\t\t{\n\t\t System.out.println(ar1.get(i));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"***************************\");\n\t\t\n\t\t//4. Initializing arraylist of objects\n\t\t\n\t\tArrayList<Employee> ar3 = new ArrayList<Employee>();\n\t\t\n\t\tEmployee e1 = new Employee(1, \"pretty\", 5000);\n\t\tEmployee e2 = new Employee(2, \"renault\", 7000);\n\t\tEmployee e3 = new Employee(3, \"java\", 8000);\n\t\tEmployee e4 = new Employee(4, \"divya\", 9000);\n\t\t\n\t\tar3.add(e1);\n\t\tar3.add(e2);\n\t\tar3.add(e3);\n\t\tar3.add(e4);\n\t\t\n\t\tSystem.out.println(ar3.size());\n\t\t\n\t\tIterator<Employee> it = ar3.iterator();\n\t\t\n\t\twhile(it.hasNext())\n\t\t{\n\t\t Employee emp = it.next();\n\t\t\tSystem.out.print(emp.empno + \" \");\n\t\t\tSystem.out.print(emp.empname + \" \");\n\t\t\tSystem.out.print(emp.empsalary + \" \");\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t}", "@Test\n public void test13() throws Throwable {\n // Undeclared exception!\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1333,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test13\");\n try {\n IteratorUtils.arrayListIterator((Object) \"\", 978);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Argument is not an array\n //\n }\n }", "@org.junit.jupiter.api.Test\r\n void toArray() {\n mll.add(\"A\");\r\n Object [] backDoor = mll.toArray();\r\n backDoor[0] = \"HAHHA\";\r\n\r\n assertEquals(\"A\", mll.get(0));\r\n }", "public static void main (String args[]) {\n\tArrayList<String> arrayCol = new ArrayList<String>();\n\tarrayCol.add(\"C\");\n\tarrayCol.add(\"A\");\n\tarrayCol.add(\"B\");\n\tarrayCol.add(\"D\");\n\tarrayCol.add(\"F\");\n\tarrayCol.add(1,\"A1\");\n\t\n\tSystem.out.println(\"Array size:\" + arrayCol.size());\n\tSystem.out.println(\"contents of Array:\" + arrayCol);\n\n\tarrayCol.remove(2);\n\tarrayCol.remove(\"D\");\n\n\t//allocating capacity\n\tarrayCol.ensureCapacity(1);\n\tarrayCol.trimToSize();\n\t\n\tSystem.out.println(\"Array size:\" + arrayCol.size());\n\tSystem.out.println(\"contents of Array:\" + arrayCol);\n\n\n\t//using iterator\n\tIterator<String> iter = arrayCol.iterator();\n\t\n\twhile (iter.hasNext()) {\n\t\t\n\t\tSystem.out.println(iter.next());\n\t}\n\t\n\n\t//converting into array\n\tString arr[] = new String[arrayCol.size()];\n\tarrayCol.toArray(arr);\n\t\n\tSystem.out.println(\"printing from Array\");\n\tfor (String val : arr) {\n\t\tSystem.out.println(val);\n\t}\n\t\n\t\n\t}", "@Test\n\tpublic void testAddList() {\n\t\tarrayList = new ArrayListImplementation<String>();\n\t\tarrayList.addItem(\"1\");\n\t\tarrayList.addItem(\"2\");\n\t\tArrayListImplementation<String> tempArrayList = new ArrayListImplementation<String>();\n\t\ttempArrayList.addItem(\"4\");\n\t\ttempArrayList.addItem(\"5\");\n\t\ttempArrayList.addItem(\"6\");\n\t\tint sizeBeforeListAdded = arrayList.getActualSize();\n\t\tarrayList.addList(tempArrayList);\n\t\tint sizeAfterListAdded = arrayList.getActualSize();\n\t\tassertNotEquals(sizeBeforeListAdded, sizeAfterListAdded);\n\t}", "public void testingArrayList() {\r\n\t\tSystem.err\r\n\t\t\t\t.println(\"Class NewFeatures, method testingArrayList called!\");\r\n\t\t// we don't need to write data type two times\r\n\t\t// ArrayList<String> list = new ArrayList<String>();\r\n\t\tArrayList<String> list = new ArrayList<>();\r\n\t\tlist.add(\"hey\");\r\n\t\tlist.add(\"kello\");\r\n\t\tlist.add(\"labas\");\r\n\t\tSystem.out.println(\"\\nValue in list:\" + list.get(0));\r\n\t\tSystem.out.println(\"Printing out the ArrayList: \" + list);\r\n\t\tSystem.out.println(\"Class NewFeatures, method testingArrayList done!\");\r\n\t}", "Object getTolist();", "void mo100444b(List<C40429b> list);", "public interface IList<T> {\n \n public boolean isEmpty();\n \n public T getFirst();\n \n public T getLast();\n \n public T get(int i); // a[3] a.get(3)\n \n public void set(T p, int i);\n \n public int size(); // a.length a.size()\n \n public LinkedList<T> addLast(T p);\n \n public LinkedList<T> add(T p, int i);\n \n public void remove(T p);\n \n public void remove(int i);\n \n public boolean contains(T p);\n \n}", "void testListMethods(Tester t) {\n IList<Integer> mt = new Empty<Integer>();\n IList<Integer> l1 = new Cons<Integer>(1,\n new Cons<Integer>(2, new Cons<Integer>(3, \n new Cons<Integer>(4, mt))));\n\n t.checkExpect(mt.len(), 0);\n t.checkExpect(l1.len(), 4);\n\n t.checkExpect(mt.append(l1), l1);\n t.checkExpect(l1.append(mt), l1);\n\n t.checkExpect(mt.getData(), null);\n t.checkExpect(l1.getData(), 1);\n\n t.checkExpect(l1.getNext(), new Cons<Integer>(2 , new Cons<Integer>(3 , \n new Cons<Integer>(4 , mt))));\n }", "IList<T> append(IList<T> l);", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = new FileInputStream(\"G:\\\\Prog\\\\arraylist.txt\");\n\t\t\tint i;\n\t\t\twhile((i = fileInputStream.read()) != -1)\n\t\t\t{\n\t\t\t\tSystem.out.print((char)i);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfileInputStream.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t\n\tList l = new ArrayList();\n\t l.toArray();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private static double[] toArray(ArrayList<Double> dbls) {\n double[] r = new double[dbls.size()];\n int i = 0;\n for( double d:dbls ) r[i++] = d;\n return r;\n }", "Array createArray();", "private static <T> List<T> singletonArrayList(@Nullable T value) {\n @SuppressWarnings(\"unchecked\")\n T[] singleArray = (T[]) new Object[1];\n singleArray[0] = value;\n return Arrays.asList(singleArray);\n }", "private void arrayToCollection(String name, Collection<Object>lst, JSONArray jarr, Type ptype) throws Exception {\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tString cname = lst.getClass().getSimpleName() + \": \" + name;\n\t\tfor(Object jsonObj : jarr) {\n\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\tif(obj!=null)\n\t\t\t\tlst.add(obj);\n\t\t}\n\t}", "public List<String> remake_array(List<String> lists){\n List<String> listItemtemp = new ArrayList<>();\n for (int i = 0; i < lists.size(); i++) {\n listItemtemp.add(i + 1 + \". \" + lists.get(i).substring(3).trim());\n }\n return listItemtemp;\n\n }", "private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }", "public static void m2(ArrayList<?> al)\n\t{\n\t\t//al.add(\"Marshal Mathers\");\n\t\t//al.add(\"Slim Shady\");\n\t\t//al.add(10);\n\t\t//al.add(10.5f);\n\t\tal.add(null);\t// null is allowed, because it is valid value for any type\n\t}", "public int[] getIntList();", "abstract protected Object newList( int capacity );", "public static final ArrayList list (Object ... items) {\r\n ArrayList sequence = new ArrayList();\r\n for (int i=0; i<items.length; i++) {\r\n sequence.add(items[i]);\r\n }\r\n return sequence;\r\n }", "ArrayValue createArrayValue();", "public static <T> T[] listToArray (Object list) {\n\tif (! (list instanceof Collection)) {\n\t\treturn (T[]) new Object[0];\n\t}\n\treturn (T[]) ((Collection) list).toArray();\n }", "public abstract TIntArrayList select(TIntArrayList input);", "public interface QList<D extends QData> extends QData, Iterable<D> {\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model dataType=\"org.smeup.sys.il.data.DataArray\" required=\"true\"\n\t * @generated\n\t */\n\tD[] asArray();\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model indexRequired=\"true\"\n\t * @generated\n\t */\n\tD get(Number index);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model indexRequired=\"true\"\n\t * @generated\n\t */\n\tD get(QNumeric index);\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model required=\"true\"\n\t * @generated\n\t */\n\tint capacity();\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model required=\"true\"\n\t * @generated\n\t */\n\tint count();\n\n\t/**\n\t * <!-- begin-user-doc --> <!-- end-user-doc -->\n\t *\n\t * @model valueRequired=\"true\"\n\t * @generated\n\t */\n\tvoid eval(QList<D> value);\n\n}", "private Object[] buildList(int size) {\n list.clear();\n int expectedSize = ArrayList.INITIAL_CAPACITY;\n while (expectedSize < size) {\n expectedSize *= 2;\n }\n Object[] expected = new Object[expectedSize];\n\n for (int i = 0; i < size; i++) {\n String data = i + \"a\";\n list.addToBack(data);\n expected[i] = data;\n }\n return expected;\n }", "public interface List<T> extends Collection<T> {\n\t\n\t/**\n\t * Returns the object that is stored in the list at position <code>index</code>.\n\t * @param index position from which the object will be returned\n\t * @return the object that is stored at position <code>index</code>\n\t * @throws IndexOutOfBoundsException index must be between 0 and size-1\n\t */\n\tT get(int index);\n\t\n\t/**\n\t * Inserts the object at the specified position. It does not overwrite the given value at the given position, \n\t * it shifts the elements at greater positions one place toward the end.\n\t * @param value object to be inserted\n\t * @param position index where the object should be inserted\n\t * @throws NullPointerException <code>null</code> object will not be inserted into the list\n\t * @throws IndexOutOfBoundsException index must be between 0 and size\n\t */\n\tvoid insert(T value, int position);\n\t\n\t/**\n\t * Searches the collection and returns the index of the first occurrence of the given value\n\t * or -1 if the value is not found.\n\t * @param value object that will be searched\n\t * @return index of the first occurrence of the given object or -1 if the value is not found\n\t */\n\tint indexOf(Object value);\n\t\n\t/**\n\t * Removes element at specified index from collection. \n\t * Element that was previously at location index+1 after this operation is on location index , etc.\n\t * @param index index at which the element should be removed\n\t * @throws IndexOutOfBoundsException index must be between 0 and size-1\n\t */\n\tvoid remove(int index);\n}", "public T[] items();", "public static void main(String[] args) {\n\t\tArrayList emp =new ArrayList();\n\t\t\n\t\temp.add(\"Avinash\"); \n\t\temp.add(001);\t\t\n\t\temp.add(\"Admin\");\t\n\t\temp.add(12.7);\t\n\t\t\n\t\tSystem.out.println(emp);\n\n\t\t//Generic Array list\n\t\tArrayList emp1 =new ArrayList();\n\t\temp1.add(\"Vaibhav\"); \n\t\temp1.add(002);\t\t\n\t\temp1.add(\"CEO\");\t\n\t\temp1.add(1.7);\t\n\t\t\n\t\tSystem.out.println(emp1);\n\n\t}", "public abstract ArrayList<Cell> getSelfArray();", "@Test\n\tpublic void test1() {\n\t\t// toArray()\n\t\tDoubleLinkedList dll = new DoubleLinkedList(getList(10));\n\t\tObject[] a = new Object[] {21, 22, 23, 24, 25};\n\t\tassertArrayEquals(dll.toArray(a), getList(10).toArray());\n\t\t\n\t\tdll = new DoubleLinkedList(getList(4));\n\t\tassertEquals(dll.toArray(a)[4], null);\n\t\t\n\t\t// addBefore()\n\t\tdll.addBefore(101, dll.header);\n\t\t\n\t\t// remove()\n\t\ttry{\n\t\t\tdll.remove(dll.header);\n\t\t}catch(NoSuchElementException e){\n\t\t\tassertEquals(e.getMessage(), null);\n\t\t}\n\t\t\n\t\tdll.remove(dll.header.next);\n\t\t\n\t\t\n\t}", "private static void printArray(ArrayList<Integer> list) {\n for (int i : list) {\n System.out.println(i * 3);\n }\n\n }", "void mo100443a(List<String> list);", "private static List<Node> arrayToList(Node[] n) {\n List<Node> listItems = new ArrayList<>();\n for (Node n1 : n) {\n listItems.add(n1);\n }\n return listItems;\n }", "@Test public void getListTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n \n Assert.assertArrayEquals(pArray, pList.getList());\n }", "public interface ISimpleList<Type> extends Iterable<Type> {\n /**\n * Add a value to the end of this list.\n * \n * @param t is the value added to this list\n */\n public void add(Type t);\n\n /**\n * Add a value at a specified index in the list, shifting other values to\n * make room.\n * \n * @param index is the index at which new value added\n * @param t the new value added\n * @throws IndexOutOfBoundsException\n * if index is greater than size of list or less than zero\n */\n public void add(int index, Type t);\n\n /**\n * Returns an iterator over this list's values, the iterator supports\n * remove.\n * \n * @return iterator (supporting remove))\n */\n public Iterator<Type> iterator();\n\n /**\n * Remove and return the value at the specified index, shifting other values\n * \n * @param index of value to remove\n * @return the removed value\n * @throws IndexOutOfBoundsException\n * if index < 0 or >= size()\n */\n public Type remove(int index);\n\n /**\n * Remove first occurrence of a value, and return true iff removal succeeds.\n * \n * @param t is value removed\n * @return true if a value is removed, false otherwise\n */\n public boolean remove(Type t);\n\n /**\n * Return the value at the specified index.\n * \n * @param index of value to return\n * @return value at specified index\n * @throws IndexOutOfBoundsException\n * if index < 0 or >= size()\n */\n public Type get(int index);\n\n /**\n * Return index of first occurrence of a value, or -1 if not found.\n * \n * @param t is valuel searched for\n * @return index of first occurrence of t, or -1 if t not found\n */\n public int indexOf(Type t);\n\n /**\n * Returns number of elements in this list.\n * \n * @return number of elements in list\n */\n public int size();\n}", "public abstract ArrayList<Integer> getSudokuNumbersList();", "public static void main(String[] args) {\n\t\tArrayList al = new ArrayList(); // support heterogeneous data main any type of value\r\n\t\t// add new element\r\n\t\tal.add(15);\r\n\t\tal.add(\"welocome\");\r\n\t\tal.add(2020);\r\n\t\tal.add(15.5);\r\n\t\tal.add(\"A\");\r\n\r\n\t\tSystem.out.println(al);\r\n\t\t// size of Arrylist\r\n\t\tSystem.out.println(\"no of index \" + al.size());\r\n\t\t\r\n\t\t// remove method\r\n\t\tal.remove(2);\r\n \tSystem.out.println(al);\r\n\r\n\t\t// Inert a data\r\n\t\tal.add(2, 2021);\r\n\t\tSystem.out.println(\"add the data in array list\" + al);\r\n\t\t// Retried the specific element\r\n\t\r\n \tSystem.out.println(al.get(2));\r\n\t\t// change and replace the element\r\n\t\tal.set(2, 2022);\r\n\t\tSystem.out.println(al);\r\n\t\t\r\n\t\t// search // contains\r\n\t\tSystem.out.println(al.contains(\"welocome\")); \r\n\t\t\r\n\t\t// is empty\r\n\t\tSystem.out.println(al.isEmpty());\r\n\r\n\t\tIterator it = al.iterator();\r\n\t\t\r\n\t\twhile (it.hasNext()) {\r\n\t\tSystem.out.println(it.next());\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t/*\r\n\t\tInteger[] l1 = {1,3};\r\n\t\tInteger[] l2 = {2,4};\r\n\t\tInteger[] l3 = {4,6};\r\n\t\tList<Integer[]> testlist = new ArrayList<Integer[]>();\r\n\t\t\r\n\t\ttestlist.add(l1);\r\n\t\ttestlist.add(l2);\r\n\t\ttestlist.add(l3);\r\n\t\tInteger[][] test1 = new Integer[3][2];\r\n\t\ttest1[0] = l3;\r\n\t\ttest1[1] = l1;\r\n\t\ttest1[2] = l2;\r\n\t\tComparator<Integer[]> c = new MyComparator();\r\n\t\tArrays.sort(test1,c );\t\r\n\t\tint a = 3;\r\n\t\ta = 4;\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tList<Integer> testl = new ArrayList<Integer>();\r\n\t\ttestl.add(1);\r\n\t\ttestl.add(3);\r\n\t\ttestl.add(9);\r\n\t\ttestl.add(6);\r\n\t\t\r\n\t\tint maxtest = Collections.max(testl);\r\n\t\tSystem.out.println(testl.indexOf(maxtest));\r\n\t\tfloat a = (float)40/16;\r\n\t\tSystem.out.println(a);\r\n\t\t\t\t\r\n\t\t*/\r\n\t\t/*\r\n\t\tList<Integer> testlist = new ArrayList<Integer>();\r\n\t\ttestlist.add(2);\r\n\t\ttestlist.add(4);\r\n\t\ttestlist.add(6);\r\n\t\t\r\n\t\tList<Integer> testlist1 = new ArrayList<Integer>(testlist);\r\n\t\t\r\n\t\t//int[] testarray = new int[3]{3,4,5};\r\n\t\t\r\n\t\ttestlist.set(0, 10);\r\n\t\ttestlist1.set(0, 55);\r\n\t\t\r\n\t\t//System.out.println(testlist.get(0));\r\n\t\t//System.out.println(testlist1.get(0));\r\n\t\t\r\n\t\tList<ArrayList> mytestlist = new ArrayList<ArrayList>();\r\n\t\t\r\n\t\tmytestlist.add(new ArrayList<Integer>());\r\n\t\t\r\n\t\t//mytestlist.get(0).a\r\n\t\tArrayList[] mylist = new ArrayList[5];\r\n\t\tmylist[0] = new ArrayList<Integer>();\r\n\t\tmylist[0].add(2);\r\n\t\t\r\n\t\tmylist[0].add(4);\r\n\t\t\r\n\t\tmylist[0].add(6);\r\n\t\t\r\n\t\tif(mylist[0].contains(2)){\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"hahaha\");\r\n\t\t}\r\n\t\tif(mylist[0].contains(\"a\")){\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"ddddd\");\r\n\t\t}\r\n\t\t*/\r\n\t\t/*\r\n\t\tList<Integer> testm = new ArrayList<Integer>();\r\n\t\tfor(int i=0;i<10;i++){\r\n\t\t\ttestm.add(5);\r\n\t\t}\r\n\t\t\r\n\t\tList<Integer> mylist1 = testm.subList(0, 5);\r\n\t\t\r\n\t\tSystem.out.println(mylist1.size());\r\n\t\t\r\n\t\t\r\n\t\tList<Integer> testm1 = new ArrayList<Integer>();\r\n\t\tSystem.out.println(Collections.max(testm1));\r\n\t\t*/\r\n\t\t\r\n\t\t/*\r\n\t\tList<FMData> testlist = new ArrayList<FMData>();\r\n\t\tfor(int i=0;i<10;i++){\r\n\t\t\tFMData fm = new FMData(i,i,i,(float)i,i);\r\n\t\t\ttestlist.add(fm);\r\n\t\t}\r\n\t\t\r\n\t\tList<FMData> testlist1 = new ArrayList<FMData>(testlist);\r\n\t\t\r\n\t\tfor(int i=0;i<10;i++){\r\n\t\t\t\r\n\t\t\tif(testlist.get(i).fmstart==5){\r\n\t\t\t\ttestlist1.set(i, 55);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(testlist.size());*/\r\n\t\t\r\n\t\tList<Integer> l1 = new ArrayList<Integer>();\r\n\t\tfor(int i=0;i<10;i++){\r\n\t\t\t\r\n\t\t\tl1.add(i);\r\n\t\t}\r\n\t\t\r\n\t\tList<Integer> l2 = l1.subList(0, 6);//new ArrayList<Integer>(l1);\r\n\r\n\t\tl2.set(2, 55);\r\n\t\t\r\n\t\tSystem.out.println(l1.get(2));\r\n\t\tSystem.out.println(l2.get(2));\r\n\t\t\r\n\t}", "public static String[] listToStringArray(java.util.List list) {\n if (list == null)\n return null;\n String[] result = new String[list.size()];\n ListIterator iterator = list.listIterator();\n int i = 0;\n while (iterator.hasNext()) {\n result[i] = (String) iterator.next();\n i++;\n }\n return result;\n }", "public static void main(String[] args) {\nArrayList<String> al = new ArrayList<String>();\r\nal.add(\"h\");\r\nal.add(\"hello\");//\r\nal.add( \"hai\");//adding element in particular index.\r\nal.add(\"h\");\r\nal.add(null);\r\nal.add(null);\r\nal.add(\"simple\");\r\nSystem.out.println(al.size());\r\n//how to iterate arraylist.\r\n//for (String a : al)//advanced for loop- for(Datatype varname = obj name/array/collection)\r\n //{\r\n\t//System.out.println(a);\r\n\t//}\r\n/*below code is for iterating the Array using iterator*/\r\nArrayList<Integer> a = new ArrayList<Integer>();\r\na.add(7);\r\na.add(8);\r\n\ta.add(1);\r\na.add(40);\r\na.add(5);\r\na.add(null);\r\nListIterator<Integer> af = a.listIterator();//here we can use both iterator and listiterator\r\nwhile (af.hasNext()){\r\n\tint s = af.next();\r\n\tSystem.out.println(s);\r\n}\r\n\r\n\r\n\t}", "public interface List<T> extends Collection<T> {\n\n public void insert(T element, int index);\n public T replace(T element, int index);\n public T remove(int index);\n public T removeFirst();\n public T removeLast();\n public int indexOf(T element);\n public T get(int index);\n public T first();\n public T last();\n \n}", "public MyArrayList ()\r\n {\r\n \tlist = new Object[100];\r\n \tnumElements = 0;\r\n }", "public abstract List<T> getList();", "public SystemRecord[][] List(ArrayList<SystemRecord> list){\n\t\tif(list == null){\n\t\t\treturn null;\n\t\t}\n\t\telse{\n\t\t\tSystemRecord[][] nlist = new SystemRecord[(int)Math.ceil((double)list.size()/(double)5)][5];\n\t\t\tint i;\n\t\t\tint j = 0;\n\t\t\tint count = 0;\n\t\t\tSystem.out.println(\"length: \" + list.size());\n\t\t\tfor(i = 0 ; i < list.size() ; i++){\n\t\t\t\tif( i < 5 ){\n\t\t\t\t\tnlist[j][i] = (SystemRecord)list.get(i);\n\t\t\t\t\tif(i == 4){\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tnlist[j][i % 5] = list.get(i);\n\t\t\t\t\tcount++;\n\t\t\t\t\tif( count == 5){\n\t\t\t\t\t\tj++;\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn nlist;\t\n\t\t}\n\t\n\t}", "public ArrayList<String> sampleArrayList(){\n ArrayList<String> myArrayListString = new ArrayList<String>();\n myArrayListString.add(\"dog\");\n myArrayListString.add(\"cat\");\n myArrayListString.add(null);\n myArrayListString.add(\"anotherDog\");\n myArrayListString.add(null);\n myArrayListString.add(\"catty43\");\n myArrayListString.add(\"test14.22\");\n return myArrayListString;\n }", "@Test\n public void test9() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1355,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test9\");\n LinkedList<String>[] linkedListArray0 = (LinkedList<String>[]) Array.newInstance(LinkedList.class, 8);\n // Undeclared exception!\n try {\n IteratorUtils.arrayListIterator(linkedListArray0, 536);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // Start index must not be greater than the array length\n //\n }\n }", "public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }", "@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}", "public static void main(String[] args) {\n\t\tString [] str = {\"aaa\",\"bbb\",\"ccc\"};\n\t\tArrayList<String> a1 = new ArrayList<String>(Arrays.asList(str));\n\t\ta1.add(\"ddd\");\n\t\ta1.add(\"eee\");\n\t\tSystem.out.println(a1);\n\t\t\n\t\t//generic Collection to arrays\n\t\tArrayList<String> a2 = new ArrayList<String>();\n\t\ta2.add(\"xxx\");\n\t\ta2.add(\"yyy\");\n\t\ta2.add(\"zzz\");\n\t\t\n\t\tString[] s1= new String[a2.size()];\n\t\ta2.toArray(s1);\n\t\tSystem.out.println(a2);\n\t\t\n\t\t//non-generic collection to arrays\n\t\tArrayList a3 = new ArrayList();\n\t\ta3.add(\"p\");\n\t\ta3.add(10);\n\t\ta3.add(12.2);\n\t\t\n\t\tObject[] o = a3.toArray();\n\t\tfor(Object oo:o)\n\t\t{\n\t\t\tSystem.out.println(oo);\n\t\t}\n\t\t}" ]
[ "0.67609745", "0.66684353", "0.65688396", "0.64371663", "0.6314764", "0.6297094", "0.62668645", "0.61917424", "0.6168048", "0.6153859", "0.61061764", "0.60933185", "0.60821104", "0.60451984", "0.603046", "0.602421", "0.5967937", "0.59638697", "0.5931533", "0.59303474", "0.59240234", "0.5921181", "0.58926886", "0.5890335", "0.58642876", "0.5858106", "0.58507115", "0.5847449", "0.58309436", "0.58201313", "0.58121103", "0.5786936", "0.576005", "0.5744812", "0.5740868", "0.5731127", "0.57134855", "0.5693905", "0.5693002", "0.5688951", "0.56877935", "0.56864184", "0.56832194", "0.56819314", "0.5677806", "0.5676964", "0.5673116", "0.5671492", "0.5669086", "0.5667948", "0.5644817", "0.5640241", "0.5637877", "0.5617071", "0.56166", "0.5614067", "0.5602123", "0.5591666", "0.5578275", "0.55711144", "0.55690217", "0.5563259", "0.55433685", "0.5542024", "0.553835", "0.55342466", "0.55267507", "0.5519615", "0.55190736", "0.55170727", "0.5508921", "0.55005485", "0.5495947", "0.54932946", "0.5489724", "0.5489068", "0.5477793", "0.54770726", "0.54754597", "0.54735315", "0.54718894", "0.54699606", "0.54698116", "0.54696167", "0.5467919", "0.5467762", "0.5466323", "0.5462352", "0.5457627", "0.54568535", "0.5455356", "0.5455307", "0.5452903", "0.5451025", "0.5449807", "0.54479593", "0.5447354", "0.54440784", "0.5430294", "0.5421759", "0.54195446" ]
0.0
-1
////////// NORMAL GETTERS & SETTERS ///////////////
public Integer getFreeSlots() { return AvailableSlots.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void get() {}", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "protected abstract Set method_1559();", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "@Override\n String get();", "public void get() {\n }", "public Object get()\n {\n return m_internalValue;\n }", "public abstract String get();", "public Value makeGetter() {\n Value r = new Value(this);\n r.getters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "public String get();", "String setValue();", "public Value makeSetter() {\n Value r = new Value(this);\n r.setters = object_labels;\n r.object_labels = null;\n return canonicalize(r);\n }", "public int\t\tget() { return value; }", "public V get() {\n return value;\n }", "@Override\n Derived get();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\r\n\tpublic void unsetGetValue() {\n\t\t\r\n\t}", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "public int get () { return rating; }", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "public void setdat()\n {\n }", "@Test\n\tpublic void get_test()\n\t{\n\t\tb.set(1,2,'x');\n\t\tassertEquals(b.get(1,2),'x');\n\t}", "@Override\n public Object getValue()\n {\n return value;\n }", "@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}", "public Object getValue() { return _value; }", "public int getSet() {\n return set;\n }", "@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}", "public int getAge() {return age;}", "@Override\r\n public Object getValue() {\r\n return value;\r\n }", "public void setAge(int age) { this.age = age; }", "@Test\n public void testSongGettersSetters() {\n Integer id = 4;\n String title=\"title\",uri = \"uri\";\n\n Song song = new Song();\n song.setId(id);\n song.setTitle(title);\n song.setUri(uri);\n\n assertEquals(\"Problem with id\",id, song.getId());\n assertEquals(\"Problem with title\",title, song.getTitle());\n assertEquals(\"Problem with uri\",uri, song.getUri());\n }", "public String get()\n {\n return this.string;\n }", "public Object getValue(){\n \treturn this.value;\n }", "@Override\n\tpublic String get() {\n\t\treturn null;\n\t}", "@Override\n public int getValue() {\n return super.getValue();\n }", "public Value restrictToGetterSetter() {\n checkNotPolymorphicOrUnknown();\n if (!isMaybePrimitive() && !isMaybeObjectOrSymbol())\n return this;\n Value r = new Value(this);\n r.flags &= ~PRIMITIVE;\n r.num = null;\n r.str = null;\n r.object_labels = null;\n r.excluded_strings = r.included_strings = null;\n return canonicalize(r);\n }", "public int value() { \n return this.value; \n }", "@Override\n //Method for getting output from String declaration\n //First set of accessor/mutator that returns value as String\n public String toString(){\n return \"[\"+name+\",\"+type+\",\"+value+\"]\";\n }", "String get();", "String get();", "private ReadProperty()\r\n {\r\n\r\n }", "public Object getValue() { return this.value; }", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "@Test\r\n\tpublic void gettersSettersTest() {\r\n\t\tItem item = new Item();\r\n\t\titem.setCount(NUMBER);\r\n\t\tassertEquals(item.getCount(), NUMBER);\r\n\t\titem.setDescription(\"word\");\r\n\t\tassertEquals(item.getDescription(), \"word\");\r\n\t\titem.setId(NUMBER);\r\n\t\tassertEquals(item.getId(), NUMBER);\r\n\t\titem.setName(\"word\");\r\n\t\tassertEquals(item.getName(), \"word\");\r\n\t\titem.setPicture(\"picture\");\r\n\t\tassertEquals(item.getPicture(), \"picture\");\r\n\t\titem.setPrice(FLOATNUMBER);\r\n\t\tassertEquals(item.getPrice(), FLOATNUMBER, 0);\r\n\t\titem.setType(\"word\");\r\n\t\tassertEquals(item.getType(), \"word\");\r\n\t\titem.setSellerId(NUMBER);\r\n\t\tassertEquals(item.getSellerId(), NUMBER);\r\n\t\titem.setDeleted(false);\r\n\t\tassertEquals(item.isDeleted(), false);\r\n\t\titem.setDeleted(true);\r\n\t\tassertEquals(item.isDeleted(), true);\t\t\r\n\t}", "public Object getNewValue()\n {\n return newValue;\n }", "public Object getValue()\n {\n\treturn value;\n }", "public String get() {\n return value;\n\t}", "public final Object get() {\n return getValue();\n }", "private void assignment() {\n\n\t\t\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}", "public int getAge(){\n return age;\n }", "@Override\n\tpublic void initValue() {\n\t\t\n\t}", "public String get()\n {\n return val;\n }", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public void setX(int x) { this.x=x; }", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "public S getValue() { return value; }", "@Override\n public int get()\n { \n return this.pr;\n }", "@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}", "@Override\n\tpublic void get() {\n\t\tSystem.out.println(\"this is get\");\n\t}", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "protected V getValue() {\n return this.value;\n }", "public void testGetterAndSetter() {\n UDDIOperationInput uddiOperationInput = new UDDIOperationInput();\n\n //Test Get and Set ElementType\n QName qName = new QName(UDDI_NS_URI, \"input\");\n assertNotNull(\"getElementType was null\",\n uddiOperationInput.getElementType());\n assertTrue(\"getElementType was incorrect\",\n uddiOperationInput.getElementType().equals(qName));\n\n //Test Get and Set Required\n uddiOperationInput.setRequired(isRequired);\n assertFalse(\"getRequired returned true\",\n uddiOperationInput.getRequired());\n isRequired = true;\n uddiOperationInput.setRequired(isRequired);\n assertTrue(\"getRequired returned false\",\n uddiOperationInput.getRequired());\n\n //Test Get and Set BusinessName\n uddiOperationInput.setBusinessName(businessName);\n assertTrue(\"getBusinessName incorrect\",\n uddiOperationInput.getBusinessName().equals(businessName));\n\n //Test Get and Set ServiceName\n uddiOperationInput.setServiceName(serviceName);\n assertTrue(\"getServiceName incorrect\",\n uddiOperationInput.getServiceName().equals(serviceName));\n }", "private Get() {}", "private Get() {}", "@Override\n\tpublic T somme() {\n\t\treturn val;\n\t}", "public int getlife(){\r\n return life;\r\n}", "public Value restrictToGetter() {\n checkNotPolymorphicOrUnknown();\n if (getters == null)\n return theNone;\n Value r = new Value();\n r.getters = getters;\n return canonicalize(r);\n }", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "public void setPrice(double price){this.price=price;}", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "public int getAge()\r\n {\r\n return age;\r\n }", "public int getNumber(){return number;}", "public String get() {\n return this.value;\n }", "@Override\r\n\tpublic <T> T get() {\n\t\treturn null;\r\n\t}", "V getValue() {\n return value;\n }", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}", "int getBlue(){\n\n return this.blue;\n }", "@Override\r\n\tpublic T get() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public byte[] get(){\n return this.value;\n }", "@Override\npublic void setAttributes() {\n\t\n}", "public abstract void set(M newValue);", "@Override\n\tpublic void set(T e) {\n\t\t\n\t}", "@Override\r\npublic int getNumber() {\n\treturn super.getNumber();\r\n}", "public Value getValue(){\n return this.value;\n }", "public int getArmadura(){return armadura;}", "public Student getStudent() { return student; }", "public int getValue(){\n return this.value;\n }", "private interface Valuable extends Base {\n\t\tString getValue();\n\t\tvoid setValue(String value);\n\t}", "@Test\n public void setAndGetTest() {\n GameEntity t2 = new GameEntity(new Rectangle(10.0, 10.0));\n\n //Set and getting temp node\n t2.getView().setTranslateX(5.0);\n t2.getView().setTranslateY(5.0);\n Circle temp = new Circle(4);\n t2.setView(temp);\n assertEquals(\"Expected view to be changed\", temp, t2.getView());\n\n //Testing the alive and dead of the object\n t2.setAlive(false);\n assertEquals(\"Expected the object state to be set to dead.\", false, t2.isAlive());\n assertEquals(\"Expected the reverse of object state to be set to alive.\", true, t2.isDead());\n }" ]
[ "0.68573207", "0.68433404", "0.6794346", "0.64473844", "0.64473844", "0.6444429", "0.64363575", "0.63332295", "0.6306677", "0.627259", "0.62610847", "0.6223647", "0.6196103", "0.61801124", "0.6160915", "0.6158433", "0.6137138", "0.61110777", "0.6099284", "0.6042947", "0.6027166", "0.6017181", "0.60141605", "0.5999217", "0.599622", "0.5986024", "0.5983609", "0.5962679", "0.5955894", "0.59558713", "0.5940461", "0.59390736", "0.59277314", "0.5906948", "0.5906311", "0.5896139", "0.58949476", "0.58719474", "0.58708626", "0.5868127", "0.5854714", "0.58499223", "0.5846062", "0.5846062", "0.5831525", "0.582927", "0.5828897", "0.5828232", "0.58262265", "0.58131504", "0.580963", "0.5807869", "0.5804787", "0.57586044", "0.57586044", "0.5754178", "0.57407683", "0.5734146", "0.57339877", "0.5731119", "0.57284814", "0.5724328", "0.5722674", "0.5722656", "0.57206917", "0.5719016", "0.5719016", "0.5719016", "0.5712928", "0.57128847", "0.5710723", "0.5710723", "0.5710573", "0.57021904", "0.5698482", "0.5697578", "0.56868213", "0.56854", "0.5667873", "0.56592155", "0.56574035", "0.5647183", "0.5645239", "0.56419945", "0.56384724", "0.5637926", "0.56352746", "0.5633454", "0.5622324", "0.5622058", "0.561998", "0.56165946", "0.5611343", "0.56086147", "0.5591803", "0.5588469", "0.55815655", "0.55812544", "0.5580818", "0.5577967", "0.557628" ]
0.0
-1
broken hash: F4D489D0E889F3A8156655DEF91AB90F8BD01EF019B0756CEAA91B0F979C985E 277120, [0, 0, 0, 10, 0, 32, 0, 0, 0, 64, 0, 33, 0, 0, 0, 96, .....
@Test public void testSearchNastyCases() { RpkiObjectCoder coder = new RpkiObjectCoder(); AtomicInteger brokenCounter = new AtomicInteger(0); lmdb.readTx0(tx -> { lmdbRpkiObject.forEach(tx, (k, bb) -> { byte[] bytes = Bytes.toBytes(bb); try { RpkiObject rpkiObject = coder.fromBytes(bytes); assertEquals(rpkiObject.key(), k); assertArrayEquals(Sha256.hash(rpkiObject.getEncoded()), rpkiObject.getSha256()); } catch (Exception e) { brokenCounter.incrementAndGet(); e.printStackTrace(); } }); }); assertEquals(0, brokenCounter.get()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "private String getOldPasswordHash(String password) {\n\t\tWhirlpool hasher = new Whirlpool();\n hasher.NESSIEinit();\n\n // add the plaintext password to it\n hasher.NESSIEadd(password);\n\n // create an array to hold the hashed bytes\n byte[] hashed = new byte[64];\n\n // run the hash\n hasher.NESSIEfinalize(hashed);\n\n // this stuff basically turns the byte array into a hexstring\n java.math.BigInteger bi = new java.math.BigInteger(hashed);\n String hashedStr = bi.toString(16); // 120ff0\n if (hashedStr.length() % 2 != 0) {\n // Pad with 0\n hashedStr = \"0\"+hashedStr;\n }\n return hashedStr;\n\t}", "private byte[] SHA256hash(byte[] tobeHashed){\r\n\t\tSHA256Digest digester=new SHA256Digest(); \r\n\t\tbyte[] retValue=new byte[digester.getDigestSize()]; \r\n\t\tdigester.update(tobeHashed, 0, tobeHashed.length); \r\n\t\tdigester.doFinal(retValue, 0);\r\n\t return retValue; \r\n}", "java.lang.String getHashData();", "int getHash();", "long hash(Block block, int position);", "String getHash();", "String getHash();", "private static String pasarAHexadecimal(byte[] digest){\n String hash = \"\";\n for(byte aux : digest) {\n int b = aux & 0xff;\n if (Integer.toHexString(b).length() == 1) hash += \"0\";\n hash += Integer.toHexString(b);\n }\n return hash;\n }", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "private String calchash() {\r\n String a0 = String.valueOf(bindex);\r\n a0 += String.valueOf(bdate);\r\n a0 += bdata;\r\n a0 += String.valueOf(bonce);\r\n a0 += blasthash;\r\n String a1;\r\n a1 = \"\";\r\n try {\r\n a1 = sha256(a0);\r\n } catch (NoSuchAlgorithmException ex) {\r\n Logger.getLogger(Block.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return a1;\r\n\r\n }", "private int hash(String str, int h){\n int v=0;\n\n /* FILL IN HERE */\n v = Math.floorMod(MurmurHash.hash32(str, seeds[h]) >>> h, 1 << logNbOfBuckets);\n\n return v;\n }", "private byte[] RIPEMD160(byte[] tobeHashed){\r\n\tRIPEMD160Digest digester = new RIPEMD160Digest();\r\n\tbyte[] retValue=new byte[digester.getDigestSize()]; \r\n\tdigester.update(tobeHashed, 0, tobeHashed.length); \r\n\tdigester.doFinal(retValue, 0);\t \r\n\tbyte[] version = new byte[]{0x00};\r\n\treturn concateByteArray(version,retValue);\t\r\n}", "private static String HashIt(String token) {\n\t\tStringBuffer hexString = new StringBuffer();\n\t\ttry {\n\t\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n\t\t\tbyte[] hash = digest.digest(token.getBytes(StandardCharsets.UTF_8));\n\t\t\t\n\t\t\t// Convert to hex\n\t\t for (int i = 0; i < hash.length; i++) {\n\t\t\t String hex = Integer.toHexString(0xff & hash[i]);\n\t\t\t if(hex.length() == 1) {\n\t\t\t \thexString.append('0');\n\t\t\t }\n\t\t\t hexString.append(hex);\n\t\t }\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t\thexString.setLength(0);\n\t\t}\n\t return hexString.toString();\t\t\n\t}", "static String crackSha256(String hash, String chars) throws NoSuchAlgorithmException {\n char[] ch = chars.toCharArray();\n for (int i = (int) Math.log10(ch.length); i < (int) Math.log10(ch.length + 1) - 1; i++) {\n\n }\n return null;\n }", "private static int computeHash(int par0)\n {\n par0 ^= par0 >>> 20 ^ par0 >>> 12;\n return par0 ^ par0 >>> 7 ^ par0 >>> 4;\n }", "private String hash(){\r\n return Utility.SHA512(this.simplify());\r\n }", "private static BigInteger Hash(String term, int printBits)\n {\n BigInteger baseHash = new BigInteger(\"14695981039346656037\");\n Long seed = 1099511628211L;\n long hash_mod = (long)java.lang.Math.pow(2, printBits);\n for(int i = 0; i < term.length(); i++) {\n baseHash = baseHash.multiply(new BigInteger(seed.toString())).remainder(new BigInteger(hash_mod+\"\"));\n baseHash = baseHash.xor(BigInteger.valueOf((long)term.charAt(i)));\n }\n return baseHash;\n }", "public int hash2 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal = (37 * hashVal) + key.charAt(i);\n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0;\n }\n }", "private static void smallHash(long[] src, int offset, int lengthBytes, long[] seedResult) {\n\t\t\n\t\t/*\n\t\t * Most of the awkwardness in this code, such as the use of\n\t\t * individual local variables for the internal state vector\n\t\t * (h0, h1, h2, h3) rather than an array, is the result of performance tuning.\n\t\t * \n\t\t * See Bob Jenkins' description for discussion of the computation itself.\n\t\t */\n\t\tlong h0, h1, h2, h3;\n\t\th0 = seedResult[0];\n\t\th1 = seedResult[1];\n\t\th2 = ARBITRARY_BITS;\n\t\th3 = ARBITRARY_BITS;\n\t\t\n\t\tint remainingBytes = lengthBytes;\n\t\tint pos = offset;\n\n\t\t/*\n\t\t * Consume any complete 32-byte blocks\n\t\t */\n\t\twhile (remainingBytes >= 32) {\n\t\t\th2 += src[pos++];\n\t\t\th3 += src[pos++];\n\t\t\t\n\t h2 = (h2 << 50) | (h2 >>> 14); h2 += h3; h0 ^= h2;\n\t h3 = (h3 << 52) | (h3 >>> 12); h3 += h0; h1 ^= h3;\n\t h0 = (h0 << 30) | (h0 >>> 34); h0 += h1; h2 ^= h0;\n\t h1 = (h1 << 41) | (h1 >>> 23); h1 += h2; h3 ^= h1;\n\t h2 = (h2 << 54) | (h2 >>> 10); h2 += h3; h0 ^= h2;\n\t h3 = (h3 << 48) | (h3 >>> 16); h3 += h0; h1 ^= h3;\n\t h0 = (h0 << 38) | (h0 >>> 26); h0 += h1; h2 ^= h0;\n\t h1 = (h1 << 37) | (h1 >>> 27); h1 += h2; h3 ^= h1;\n\t h2 = (h2 << 62) | (h2 >>> 2); h2 += h3; h0 ^= h2;\n\t h3 = (h3 << 34) | (h3 >>> 30); h3 += h0; h1 ^= h3;\n\t h0 = (h0 << 5) | (h0 >>> 59); h0 += h1; h2 ^= h0;\n\t h1 = (h1 << 36) | (h1 >>> 28); h1 += h2; h3 ^= h1;\t\n\t\t\t\n\t\t\th0 += src[pos++];\n\t\t\th1 += src[pos++];\n\t\t\tremainingBytes -= 32;\n\t\t}\n\t\t\n\t\tif (remainingBytes >= 16) {\n\t\t\th2 += src[pos++];\n\t\t\th3 += src[pos++];\n\t\t\tremainingBytes -= 16;\n\n\t h2 = (h2 << 50) | (h2 >>> 14); h2 += h3; h0 ^= h2;\n\t h3 = (h3 << 52) | (h3 >>> 12); h3 += h0; h1 ^= h3;\n\t h0 = (h0 << 30) | (h0 >>> 34); h0 += h1; h2 ^= h0;\n\t h1 = (h1 << 41) | (h1 >>> 23); h1 += h2; h3 ^= h1;\n\t h2 = (h2 << 54) | (h2 >>> 10); h2 += h3; h0 ^= h2;\n\t h3 = (h3 << 48) | (h3 >>> 16); h3 += h0; h1 ^= h3;\n\t h0 = (h0 << 38) | (h0 >>> 26); h0 += h1; h2 ^= h0;\n\t h1 = (h1 << 37) | (h1 >>> 27); h1 += h2; h3 ^= h1;\n\t h2 = (h2 << 62) | (h2 >>> 2); h2 += h3; h0 ^= h2;\n\t h3 = (h3 << 34) | (h3 >>> 30); h3 += h0; h1 ^= h3;\n\t h0 = (h0 << 5) | (h0 >>> 59); h0 += h1; h2 ^= h0;\n\t h1 = (h1 << 36) | (h1 >>> 28); h1 += h2; h3 ^= h1;\t\n\n\t\t}\n\t\t\n\t\tassert remainingBytes < 16;\n\t\t/*\n\t\t * Incorporate the buffer length into the hash result.\n\t\t */\n\t\th3 += ((long)(lengthBytes)) << 56;\n\n\t\tif (remainingBytes >= 8) {\n\t\t\th2 += src[pos++];\n\t\t\tremainingBytes -= 8;\n\t\t\tif (remainingBytes > 0) {\n\t\t\t\t/*\n\t\t\t\t * Mask off (zero-fill) the bytes that aren't payload.\n\t\t\t\t */\n\t\t\t\tlong mask = (1L << (remainingBytes << 3)) - 1;\n\t\t\t\th3 += src[pos] & mask;\n\t\t\t}\n\t\t} else if (remainingBytes > 0) {\n\t\t\t/*\n\t\t\t * Mask off (zero-fill) the bytes that aren't payload.\n\t\t\t */\n\t\t\tlong mask = (1L << (remainingBytes << 3)) - 1;\n\t\t\th2 += src[pos] & mask;\n\t\t} else {\n\t\t\th2 += ARBITRARY_BITS;\n\t\t\th3 += ARBITRARY_BITS;\t\t\t\n\t\t}\n\n h3 ^= h2; h2 = (h2 << 15) | (h2 >>> 49); h3 += h2;\n h0 ^= h3; h3 = (h3 << 52) | (h3 >>> 12); h0 += h3;\n h1 ^= h0; h0 = (h0 << 26) | (h0 >>> 38); h1 += h0;\n h2 ^= h1; h1 = (h1 << 51) | (h1 >>> 13); h2 += h1;\n h3 ^= h2; h2 = (h2 << 28) | (h2 >>> 36); h3 += h2;\n h0 ^= h3; h3 = (h3 << 9) | (h3 >>> 55); h0 += h3;\n h1 ^= h0; h0 = (h0 << 47) | (h0 >>> 17); h1 += h0;\n h2 ^= h1; h1 = (h1 << 54) | (h1 >>> 10); h2 += h1;\n h3 ^= h2; h2 = (h2 << 32) | (h2 >>> 32); h3 += h2;\n h0 ^= h3; h3 = (h3 << 25) | (h3 >>> 39); h0 += h3;\n h1 ^= h0; h0 = (h0 << 63) | (h0 >>> 1); h1 += h0;\n\t\t\n seedResult[0] = h0;\n seedResult[1] = h1;\n\t}", "public HASH256 getHash1(){return hash1;}", "private int rehash(int hash) {\n final int h = hash * 0x9E3779B9;\n return h ^ (h >> 16);\n }", "public long ELFHash(String str) {\n\t\tlong hash = 0;\n\t\tlong x = 0;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = (hash << 4) + str.charAt(i);\n\n\t\t\tif ((x = hash & 0xF0000000L) != 0) {\n\t\t\t\thash ^= (x >> 24);\n\t\t\t}\n\t\t\thash &= ~x;\n\t\t}\n\n\t\treturn hash;\n\t}", "int hash(String makeHash, int mod);", "public abstract int getHash();", "int _hash(int maximum);", "public int hash3 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ ){\n hashVal = (37 * hashVal) + key.charAt(i);}\n hashVal %= tableSize;\n if(hashVal<0)\n hashVal += tableSize; \n if(hashVal != 0)\n return hashVal;\n else\n return 0;\n }\n else\n {\n //System.out.println(\"Key is null\");\n return 0;\n }\n }", "static int getHash(long key) {\n int hash = (int) ((key >>> 32) ^ key);\n // a supplemental secondary hash function\n // to protect against hash codes that don't differ much\n hash = ((hash >>> 16) ^ hash) * 0x45d9f3b;\n hash = ((hash >>> 16) ^ hash) * 0x45d9f3b;\n hash = (hash >>> 16) ^ hash;\n return hash;\n }", "public static void main(String[] args) throws UnsupportedEncodingException {\n var res2 = old.MD4.MD4.hash(\"The quick brown fox jumps over the lazy dogshdkasjhflksdjhflkasjhdflkjshdfkljasdhlfkjajhjhhldfkjashldf\".getBytes());\n// var res1 = cyph.digest(\"\".getBytes());\n\n System.out.println(encodeHexString(res2));\n// System.out.println(new BitUtils(res1).getNextLong(25) + \"\\n\");\n\n System.exit(0);\n\n var secPreimg8 = secondPreimage(\"test\", 8, 1000);\n System.out.println(\"Second preimage avg over 8 bits: \" + secPreimg8);\n dumpData(\"preimg.txt\", true, \"8 \" + secPreimg8 + \"\\n\");\n\n var secPreimg12 = secondPreimage(\"test\", 12, 1000);\n System.out.println(\"Second preimage avg over 12 bits: \" + secPreimg12);\n dumpData(\"preimg.txt\", false, \"12 \" + secPreimg12 + \"\\n\");\n\n var secPreimg16 = secondPreimage(\"test\", 16, 500);\n System.out.println(\"Second preimage avg over 16 bits: \" + secPreimg16);\n dumpData(\"preimg.txt\", false, \"16 \" + secPreimg16 + \"\\n\");\n\n var secPreimg20 = secondPreimage(\"test\", 20, 50);\n System.out.println(\"Second preimage avg over 20 bits: \" + secPreimg20);\n dumpData(\"preimg.txt\", false, \"20 \" + secPreimg20 + \"\\n\");\n\n var secPreimg24 = secondPreimage(\"test\", 24, 10);\n System.out.println(\"Second preimage avg over 24 bits: \" + secPreimg24);\n dumpData(\"preimg.txt\", false, \"24 \" + secPreimg24 + \"\\n\");\n\n var coll8 = collisions(8, 1000);\n System.out.println(\"\\nCollisions for 8 bits: \" + coll8);\n dumpData(\"coll.txt\", true, \"8 \" + coll8 + \"\\n\");\n\n var coll12 = collisions(12, 1000);\n System.out.println(\"Collisions for 12 bits: \" + coll12);\n dumpData(\"coll.txt\", false, \"12 \" + coll12 + \"\\n\");\n\n var coll16 = collisions(16, 1000);\n System.out.println(\"Collisions for 16 bits: \" + coll16);\n dumpData(\"coll.txt\", false, \"16 \" + coll16 + \"\\n\");\n\n var coll20 = collisions(20, 1000);\n System.out.println(\"Collisions for 20 bits: \" + coll20);\n dumpData(\"coll.txt\", false, \"20 \" + coll20 + \"\\n\");\n\n var coll24 = collisions(24, 1000);\n System.out.println(\"Collisions for 24 bits: \" + coll24);\n dumpData(\"coll.txt\", false, \"24 \" + coll24 + \"\\n\");\n }", "byte[] digest();", "private static String m29107b(byte[] bArr) throws Exception {\n Mac instance = Mac.getInstance(\"HmacSHA1\");\n instance.init(new SecretKeySpec(\"d6fc3a4a06adbde89223bvefedc24fecde188aaa9161\".getBytes(), instance.getAlgorithm()));\n return C6797b.encodeToString(instance.doFinal(bArr), 2);\n }", "int getClientHashLength();", "@Override\n public int hashCode ()\n {\n int hash = 7;\n hash = 53 * hash + Arrays.hashCode (this.bytes);\n return hash;\n }", "public static String hash(String password){\r\n\t\t try {\r\n\t MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\r\n\t md.update(password.getBytes(\"UTF-8\")); \r\n\t byte[] digest = md.digest();\r\n\t \r\n\t BigInteger bigInt = new BigInteger(1, digest);\r\n\t StringBuffer sb = new StringBuffer();\r\n\t for (int i = 0; i < digest.length; i++) {\r\n\t String hex = Integer.toHexString(0xff & digest[i]);\r\n\t if (hex.length() == 1) sb.append('0');\r\n\t sb.append(hex);\r\n\t }\r\n\t System.out.println(sb.toString());\r\n\t return sb.toString();\r\n\t \r\n\t } catch (Exception ex) {\r\n\t System.out.println(ex.getMessage());\r\n\t \r\n\t }\r\n\t\t return null;\r\n\t}", "public static final int nextHashCodeEntropy() {\n\t\tint hash = 17;\n\t\tfor (int i = 0; i < 11; i++) {\n\t\t\thash = 37 * hash + new Object().hashCode();\n\t\t}\n\t\treturn hash = 37 * hash + new Object().hashCode();\n\t}", "protected Sha256Hash readHash() throws ProtocolException {\n return Sha256Hash.wrapReversed(readBytes(32));\n }", "private int hash2(T key) { //first two char length\r\n\r\n if(key.toString().length() ==1){ //in the case that the key is only one char long\r\n return key.toString().charAt(0)%newTable.length;\r\n }\r\n return (26 * key.toString().charAt(0)+key.toString().charAt(1))% newTable.length;\r\n\r\n }", "public String getHash(String str) throws Exception{\n\t\t\n\t\tMessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(str.getBytes());\n \n byte byteData[] = md.digest();\n \n //convert the byte to hex format method 1\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < byteData.length; i++) {\n sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1));\n }\n \n String hex = sb.toString();\n System.out.println(hex);\n return hex; \n}", "public static String hash(String st) {\r\n MessageDigest messageDigest = null;\r\n byte[] digest = new byte[0];\r\n\r\n try {\r\n messageDigest = MessageDigest.getInstance(\"SHA-256\");\r\n messageDigest.reset();\r\n messageDigest.update(st.getBytes());\r\n digest = messageDigest.digest();\r\n } catch (NoSuchAlgorithmException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n BigInteger bigInt = new BigInteger(1, digest);\r\n StringBuilder hex = new StringBuilder(bigInt.toString(16));\r\n\r\n while (hex.length() < 32) {\r\n hex.insert(0, \"0\");\r\n }\r\n\r\n return hex.toString();\r\n }", "@Test\n public void testHash() \n\t{\n\tLaboonCoin l = new LaboonCoin();\n\t\tint hash = l.hash(\"boo\");\n\t\tint result = 1428150834;\n\t\tassertEquals(result, hash);\n }", "private static void generateHashkey(byte[] id, int[] hash_key) {\n MessageDigest sha;\n try {\n sha = MessageDigest.getInstance(\"md5\");\n sha.update(id);\n byte[] out = sha.digest();\n int offset = 0;\n for (int i = 0; i < 4; i++) {\n int temp = ByteArrayUtility.toInteger(out, offset);\n offset += 4;\n if (temp < 0) {\n temp = (-1) * temp + 2 ^ 31;\n }\n hash_key[i] = temp % (DIGEST_SIZE * 32);\n }\n } catch (NoSuchAlgorithmException e) {\n throw new HyperCastFatalRuntimeException(e);\n }\n }", "private int hasher() {\n int i = 0;\n int hash = 0;\n while (i != length) {\n hash += hashableKey.charAt(i++);\n hash += hash << 10;\n hash ^= hash >> 6;\n }\n hash += hash << 3;\n hash ^= hash >> 11;\n hash += hash << 15;\n return getHash(hash);\n }", "public byte[] mo9455n() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n return new byte[20];\n }\n return Utils.sha256hash160(bArr);\n }", "public long DEKHash(String str) {\n\t\tlong hash = str.length();\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = ((hash << 5) ^ (hash >> 27)) ^ str.charAt(i);\n\t\t}\n\n\t\treturn hash;\n\t}", "public String toString()\r\n/* 438: */ {\r\n/* 439:522 */ return \"Luffa-\" + (getDigestLength() << 3);\r\n/* 440: */ }", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "@Test\n public void stringFromBytesArray() {\n byte[] input = new byte[]{\n 12,\n -68,\n 102,\n 17,\n -11,\n 84,\n 11,\n -48,\n -128,\n -102,\n 56,\n -115,\n -55,\n 90,\n 97,\n 91\n };\n\n assertEquals(\n \"0cbc6611f5540bd0809a388dc95a615b\",\n JdkHashTools.getStringFromByteArray(input)\n );\n }", "private byte[] generateNewHash() { \n\t\t// Build the final hash to be compared with the one on the database.\n\t\tbyte[] firstHash = getGeneratedHash();\n\t\tbyte[] randomSalt = getRandomSalt();\n\t\tbyte[] finalHash = new byte[TOTAL_LENGTH];\n\n\t\t// initial index where the salt will start\n\t\tint j = getSaltStartIndex(); \n\n\t\tfor( int i = 0; i < TOTAL_LENGTH; i++ ) {\n\t\t\t// First index for the salt is not yet here\n\t\t\tif ( j > i ) finalHash[i] = firstHash[i];\n\t\t\telse {\n\t\t\t\tif ( (i - j) < SALT_LENGTH ) finalHash[i] = randomSalt[i-j];\n\t\t\t\telse finalHash[i] = firstHash[i-SALT_LENGTH];\n\t\t\t}\n\t\t}\n\t\treturn finalHash;\n\t}", "public static long FNVhash64(long val) {\n // from http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash\n long hashval = FNV_offset_basis_64;\n\n for (int i = ZERO_UNDEF; i < 8; i++) {\n long octet = val & 0x00ff;\n val = val >> 8;\n\n hashval = hashval ^ octet;\n hashval = hashval * FNV_prime_64;\n // hashval = hashval ^ octet;\n }\n return Math.abs(hashval);\n }", "@Test\n public void testHash() {\n // the hash function does sha256, but I guess I don't care about implementation\n // test if two things hash to same value\n logger.trace(\"Equal strings hash to same value\");\n String hash1 = Util.hash(\"foobar\");\n String hash2 = Util.hash(\"foobar\");\n Assert.assertEquals(hash1, hash2);\n\n // test if different things hash to different value\n logger.trace(\"Unequal strings hash to different value\");\n hash1 = Util.hash(\"foobar\");\n hash2 = Util.hash(\"barfoo\");\n Assert.assertNotEquals(hash1, hash2);\n\n // test if hash length > 5 (arbitrary)\n logger.trace(\"Hash is of sufficient length to avoid collisions\");\n hash1 = Util.hash(\"baz\");\n final int length = hash1.length();\n Assert.assertTrue(length > 5);\n }", "static String hash(String motDePasse) {\n\t\tString encoded = null;\n\t\ttry {\n\t MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n\t byte[] hashInBytes = md.digest(motDePasse.getBytes(StandardCharsets.UTF_8));\n\n\t\t\t// bytes to hex\n\t StringBuilder sb = new StringBuilder();\n\t for (byte b : hashInBytes) {\n\t sb.append(String.format(\"%02x\", b));\n\t }\n\t encoded = sb.toString();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn encoded;\n\n\t\t\n\t}", "public long BPHash(String str) {\n\t\tlong hash = 0;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = hash << 7 ^ str.charAt(i);\n\t\t}\n\n\t\treturn hash;\n\t}", "public HASH512 getHash2(){return hash2;}", "static int hash(int h) {\n\t\t // This function ensures that hashCodes that differ only by constant \n\t\t // multiples at each bit position have a bounded number of collisions \n\t\t // (approximately 8 at default load factor).\n\t\th ^= (h >>> 20) ^ (h >>> 12);\n\t\treturn h ^ (h >>> 7) ^ (h >>> 4);\n\t}", "@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}", "public long Time33Hash(String key) {\n\t\tlong hash = 0;\n\t\tchar[] cArr = key.toCharArray();\n\n\t\tfor (int i = 0; i < cArr.length; ++i) {\n\t\t\thash = (hash * 33) + cArr[i];\n\t\t}\n\n\t\treturn hash;\n\t}", "String hash(String input) throws IllegalArgumentException, EncryptionException;", "public static String hashLogin () {\r\n String log = LoginWindow.login.getText();\r\n int hashLogin = 0;\r\n byte[] logByte = log.getBytes();\r\n for (int i=0; i<logByte.length; i++){\r\n hashLogin = logByte[i]*10;\r\n //System.out.print(logByte[i]);\r\n //System.out.print(hashLogin);\r\n }\r\n\r\n return String.valueOf(hashLogin);\r\n\r\n }", "public static void main(String[] args) {\n SecureRandom random = new SecureRandom();\n random.nextBytes(hash);\n data = new byte[hash.length + 1];\n System.arraycopy(hash, 0, data, 0, hash.length);\n long c = 0;\n while (true) {\n recalculateData();\n byte[] dataHash = crc32AsByteArray(data);\n if (c % 10000000 == 0) {\n System.out.println(\"Calculated \" + c + \" hashes\");\n System.out.println(\"Data: \" + byteArrayToHex(data));\n System.out.println(\"Original hash: \" + byteArrayToHex(hash) + \" new hash: \" + byteArrayToHex(dataHash));\n\n }\n if (Arrays.equals(hash, dataHash)) {\n System.out.println(\"Found a match!\");\n System.out.println(\"Data: \" + byteArrayToHex(data));\n System.out.println(\"Original hash: \" + byteArrayToHex(hash) + \" new hash: \" + byteArrayToHex(dataHash));\n break;\n }\n c++;\n }\n }", "public void mo9453l() {\n byte[] bArr = this.byteArr;\n if (bArr == null || bArr.length == 0) {\n this.f401c = 0;\n } else {\n this.f401c = Arrays.hashCode(bArr);\n }\n }", "private static String CalHash(byte[] passSalt) throws NoSuchAlgorithmException, UnsupportedEncodingException {\n //get the instance value corresponding to Algorithm selected\n MessageDigest key = MessageDigest.getInstance(\"SHA-256\");\n //Reference:https://stackoverflow.com/questions/415953/how-can-i-generate-an-md5-hash\n //update the digest using specified array of bytes\n key.update(passSalt);\n String PassSaltHash = javax.xml.bind.DatatypeConverter.printHexBinary(key.digest());\n return PassSaltHash;\n }", "private static String getHash(byte[] dataBuffer, MessageDigest dgst) throws Exception{\n\t\tdgst.update(dataBuffer);\n\t\t\n\t\tbyte[] dgstByte = dgst.digest();\n\n\t\tStringBuffer sb = new StringBuffer();\n\t\tfor(int i=0; i<dgstByte.length; i++){\n\t\t\tsb.append(Integer.toString((dgstByte[i] & 0xff) + 0x100, 16).substring(1));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"dgstByteString HEXString is: \" + sb.toString());\t\t\n\t\treturn sb.toString();\n\t\t\n\t\t/*\n\t\t * Uncomment below lines to return the message digest with base64 encoded string\n\t\t * */\n\t\t\n\t\t// System.out.println(\"dgstByteString B64 of HEX is: \" + Base64.encode(sb.toString().getBytes()));\n\t\t// return Base64.encode(sb.toString().getBytes());\n\t}", "public static void main(String[] args) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new FileReader(\"3.in\"));\n\t\tint base = 26;\n\t\tlong subHash = 0;\n\t\tstring = br.readLine();\n\t\tsubstring = br.readLine();\n\t\tSystem.out.println(substring.length());\n\t\tfor (int i = 0; i < substring.length(); i++)\n\t\t{\n\t\t\tstring = \"`\" + string;\n\t\t\tsubHash += Math.pow(base, substring.length()-1-i)*(substring.charAt(i)-96);\n\t\t}\n\t\thashes = new long[string.length()];\n\t\t//rolling hash\n\t\tlong prevHash = 0;\n\t\tlong hash;\n\t\tlong subtract;\n\t\tfor (int i = 0; i < string.length()-substring.length(); i++)\n\t\t{\n\t\t\tsubtract = (long) ((string.charAt(i)-96)*Math.pow(base, substring.length()-1));\n\t\t\thash = (long) (26*(prevHash - subtract) + (string.charAt(i + substring.length())-96));\n\t\t\thashes[i+1] = hash;\n\t\t\tif (hash == subHash)\n\t\t\t{\n\t\t\t\tstring = string.substring(0, i+1) + string.substring(i+1+substring.length());\n\t\t\t\ti -= substring.length();\n\t\t\t\tif (i < 0) i = -1;\n\t\t\t}\n\t\t\tprevHash = hashes[i+1];\n\t\t\tSystem.out.println(hash);\n\t\t}\n\t\t\n\t\t/*for (long el: hashes)\n\t\t\tSystem.out.println(el);\n\t\tSystem.out.println(subHash);*/\n\t\tSystem.out.println(string.substring(substring.length()));\n\t\t\n\t\t\n\t\t//PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"censor.out\")));\n\t\t//pw.println(string.substring(substring.length()));\n\t\t//pw.close();\n\t}", "public void printHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(\"com.lostfind\", PackageManager.GET_SIGNATURES);\n for (Signature signature : info.signatures) {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", \"KEYHASH::::\"+Base64.encodeToString(md.digest(), Base64.DEFAULT));\n }\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n }", "com.google.protobuf.ByteString getFileHash();", "com.google.protobuf.ByteString getFileHash();", "@Test\n public void testSomeMethod() throws Exception {\n String test= Hash.getSaltedHash(\"UND123\");\n \n System.out.println(\"------------------------------------\");\n System.out.println(\"Hash code \\n\");\n System.out.println(test +\"\\n\");\n assertEquals(true,Hash.check(\"UND123\", \"P1Rlnnlc9wJZXmieTCsZwFs0ppnQpOXjLPIuju0BaFE=$WuRG4kAGPpkR2XxRMH4Dz7T39iHttGzCrDIMaEMYvhA=\"));\n }", "private UInteger[] getHashValues() {\n int hashWindowSize = 48;\n UInteger[] hashValues = new UInteger[this.fileContent.length];\n int shiftAmount = this.getShiftAmount(hashWindowSize);\n int i = 0;\n\n int[] lookupTable =\n {0x5e3f7c48, 0x796a0d2b, 0xbecd4e32, 0x6f16159c, 0x687312bc, 0x12a6f30a, 0x8fca2662,\n 0x79b83d14, 0x3fab3f30, 0x984d6ca2, 0x4df5fe6c, 0x4acd3196, 0x6245ad21,\n 0x3a15e5ba, 0x90db6499, 0x05aacb6b, 0x791cf724, 0x504cd910, 0x98093570,\n 0x090392df, 0xf193e5b8, 0x42023c5b, 0x80a95c6a, 0x11e676be, 0xc70f2117,\n 0xeed4587f, 0x6479e9bd, 0x1b0c427c, 0x410486ba, 0x30f5b837, 0xf957d307,\n 0x1535f121, 0xabe45e90, 0x7a1ab8f0, 0x1c6887e4, 0x4170b7ba, 0x8b491bed,\n 0x5c920e73, 0x1b1ed791, 0x7a0ed482, 0xcce86619, 0x45dc7290, 0x57e71362,\n 0x2e24f01c, 0x0a0637f3, 0x0e8c5565, 0x15944012, 0x34f7eeea, 0xbc628141,\n 0x1e200874, 0xe9244379, 0x3e63aeca, 0x7a3b3cce, 0x73f8a245, 0xd734e215,\n 0x834fa434, 0xf96a0904, 0xfb39a424, 0x0bfa963a, 0x9b236ee2, 0xa2131005,\n 0x3eb70acf, 0x2907bcd8, 0x3f685f3a, 0x3765fd37, 0x1c1c34d2, 0x03a95179,\n 0x024be6c3, 0x06128960, 0x844e7490, 0xe2b371a3, 0x3382909c, 0x3d519a77,\n 0x90971ec9, 0x6ea745e5, 0x490b3a5c, 0x7f3916f7, 0xbc150351, 0x241a7ba0,\n 0xec93c2bb, 0x6c7083aa, 0xf3937751, 0xe6aa1df1, 0x129fc001, 0xb90709b9,\n 0x7e59a4fc, 0x4509e58a, 0x8a93ed43, 0x6934ce62, 0x8ec6af1a, 0xf36581a9,\n 0x53d01d93, 0xb34eef69, 0x08494a84, 0x0f6dff34, 0x74729aa3, 0x48b5475f,\n 0xb986dc84, 0xd0424c8d, 0xb72ad089, 0x0adbbdb8, 0x824fdbe8, 0x99ad1058,\n 0x98faec38, 0xe746242b, 0x2b7ee7fc, 0x2e151fa7, 0x6413270f, 0x68ed7239,\n 0x7729e2d3, 0x5697b3a5, 0x0b90a6c3, 0xdf7cefcf, 0xded46a48, 0x46956888,\n 0xb3bb6dc4, 0xe987578f, 0xf82e74b7, 0xc8eeeba4, 0xdd960ff9, 0x482ed28d,\n 0x4f343078, 0x563ab8a4, 0x3ec7aa0d, 0x2481d448, 0x5fe98704, 0x5aafc580,\n 0x841d81ec, 0xae7fe8fd, 0x6b31ccb6, 0x911ebdd4, 0x75f4703d, 0xe6855a0f,\n 0x6184b42e, 0x147a4a95, 0x39528e48, 0xe975b416, 0x3cba13d3, 0x1e23e544,\n 0xf7955286, 0xa5f96b7f, 0xaaa697aa, 0x29e794e3, 0x87628c09, 0xfeebf5f1,\n 0xf8b070cd, 0xe361b627, 0x8c7a8682, 0x69cab331, 0xca867ad1, 0xd0151a96,\n 0xfc19a6b9, 0x6d7439e7, 0x64cd62ac, 0x4a650747, 0x9ddbfa28, 0x337c8bed,\n 0xf12a6860, 0x3767ffd3, 0x13559ced, 0x71ac2011, 0xc11dc687, 0x260b7105,\n 0xc13bca0c, 0xcd0af893, 0x793b54e6, 0x89d27fc3, 0xc6bd1c88, 0xe3337313,\n 0x387bc671, 0x61280de4, 0x76941a36, 0xaa52a2b9, 0x6d7cb52c, 0x18ff4d70,\n 0x8987cf38, 0x306e47ed, 0xf7df8135, 0x18a8e024, 0xc9eb085f, 0xc1a7c769,\n 0xd5667a12, 0x9c8be93a, 0x028781b1, 0x6213dada, 0x07fef4f5, 0x5e6bf91d,\n 0x469ea798, 0xb9654a37, 0x1cb5e74e, 0x525d502d, 0xe805ec68, 0xdd8c4320,\n 0x7890848f, 0x61e59c8e, 0x1d99f9ef, 0x25b60b20, 0x2f198088, 0xe01b6926,\n 0xffa4917f, 0xb2fa0f22, 0xee8ac924, 0x18a1c5a7, 0xb76d8d7f, 0x88ad5e0d,\n 0x7b3fb12b, 0xc8a91add, 0x762a6f4e, 0x056fad31, 0xebecfab8, 0xea54cd17,\n 0x71f5af9f, 0xfaececa1, 0x08a52f4d, 0xbb5efebe, 0x5bcb04c2, 0xcb2530b0,\n 0x01bb862b, 0xbb5d54f0, 0x404deb4b, 0x038658bd, 0x09399005, 0xddd862c8,\n 0x8985776f, 0xcfcfd717, 0xbec756cb, 0x52aecc5a, 0x09ac3f62, 0x62c1c6fb,\n 0x76cc3221, 0xcde6d028, 0x844d9291, 0xc143eeac, 0x0ea5e772, 0x8855456e,\n 0xeb03a426, 0x3398475d, 0x73dc8107, 0x681605d0, 0xd18b6264, 0x934e43eb,\n 0x59e76d21, 0xd3ce2b77, 0x4ccfee1c, 0x2f4af76d, 0x8b12a309, 0x849bb415,\n 0xf45ad809, 0xc7bccae7, 0xac891c35, 0x59db2274, 0xbcd71393, 0x2c9b1705,\n 0xcb536a69, 0xb2800f00, 0x111313fc};\n\n while (i < this.fileContent.length) {\n UInteger hashValue = i == 0 ? uint(0) : hashValues[i - 1];\n int trailingEdgeData = i < hashWindowSize ? ubyte(0).intValue() :\n ubyte(this.fileContent[i - hashWindowSize]).intValue();\n int leadingEdgeData = ubyte(this.fileContent[i]).intValue();\n UInteger val = hashValue.xor(uint(lookupTable[trailingEdgeData]))\n .xor(uint(lookupTable[leadingEdgeData]));\n hashValues[i] =\n val.leftShift(2).inclusiveOr(val.rightShift(Integer.SIZE - shiftAmount));\n i++;\n }\n\n return hashValues;\n }", "private Hasher update(int bytes) {\n/* */ try {\n/* 86 */ update(this.scratch.array(), 0, bytes);\n/* */ } finally {\n/* 88 */ this.scratch.clear();\n/* */ } \n/* 90 */ return this;\n/* */ }", "String getHashAlgorithm();", "protected String hashBuffer(Buffer buffer) {\n\t\treturn FileUtils.generateSha512Sum(buffer);\n\t}", "static String sha256(String in) throws NoSuchAlgorithmException {\r\n MessageDigest encrypt = MessageDigest.getInstance(\"SHA-256\");\r\n byte[] encrypt0 = encrypt.digest(in.getBytes());\r\n StringBuffer a;\r\n String r0;\r\n a = new StringBuffer();\r\n int bytelength = encrypt0.length;\r\n int i = 0;\r\n while (i < bytelength) {\r\n a.append(Integer.toString((encrypt0[i] & 0xff) + 0x100, 16).substring(1));\r\n i++;\r\n }\r\n r0 = a.toString();\r\n return r0;\r\n }", "public int hash1 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal += key.charAt(i);\n \n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0 ;\n }\n\n }", "private String hashKey(String key) throws NoSuchAlgorithmException {\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n byte[] hashInBytes = md.digest(key.getBytes(StandardCharsets.UTF_8));\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < hashInBytes.length; i++) {\n sb.append(Integer.toString((hashInBytes[i] & 0xff) + 0x100, 16).substring(1));\n }\n String s = sb.toString();\n return s;\n }", "public String getRandomSHA256Hash(int quantity) throws Exception { \n\t\tRandom randomno = new Random();\n\n byte[] nbyte = new byte[quantity];\n\n byte[] encodedhash = null;\n StringBuffer hexString = new StringBuffer();\n\n randomno.nextBytes(nbyte);\n\n try {\n MessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n encodedhash = digest.digest(nbyte);\n\n for (int i = 0; i < encodedhash.length; i++) {\n String hex = Integer.toHexString(0xff & encodedhash[i]);\n if(hex.length() == 1) hexString.append('0');\n hexString.append(hex);\n }\n\n } catch (Exception e) {\n \t e.printStackTrace();\n }\n\n return hexString.toString();\n\t}", "@Override\r\n\tpublic String hashFunction(String saltedPass) throws NoSuchAlgorithmException\r\n\t{\r\n\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\r\n\t\tbyte[] byteHash = digest.digest(saltedPass.getBytes(StandardCharsets.UTF_8));\r\n\t\thash = DatatypeConverter.printBase64Binary(byteHash);\r\n\t\treturn hash;\r\n\t}", "byte[] getDigest();", "public byte[] hash(byte[] message){\n System.arraycopy(initHashValue, 0, h, 0, initHashValue.length);\n\n // initialize all words\n int[] words = byte2intArray(pad(message));\n\n // enumerate all blocks (each containing 16 words)\n for (int i = 0, n = words.length / 16; i < n; ++i) {\n\n // initialize W from the block's words\n System.arraycopy(words, i * 16, w, 0, 16);\n for (int t = 16; t < w.length; ++t) {\n w[t] = smallSig1(w[t - 2]) + w[t - 7] + smallSig0(w[t - 15])\n + w[t - 16];\n }\n\n // let TEMP = H\n System.arraycopy(h, 0, temp, 0, h.length);\n\n // operate on TEMP\n for (int t = 0; t < w.length; ++t) {\n int t1 = temp[7] + bigSig1(temp[4])\n + choose(temp[4], temp[5], temp[6]) + k[t] + w[t];\n int t2 = bigSig0(temp[0]) + majority(temp[0], temp[1], temp[2]);\n System.arraycopy(temp, 0, temp, 1, temp.length - 1);\n temp[4] += t1;\n temp[0] = t1 + t2;\n }\n\n // add values in TEMP to values in H\n for (int t = 0; t < h.length; ++t) {\n h[t] += temp[t];\n }\n\n }\n\n return int2byteArray(h);\n\n }", "public static byte[] generateHashValue(String plainText, int offset) throws UnsupportedEncodingException {\n\t\t\n\t\tString paddedPlainText = padBitsForHashing(plainText); //Padding the bits.\n\t\tString[] arrayOfPaddeMsg = Divider.divide(paddedPlainText);//Dividing the padded message to messages of size 512bit\n\t\tbyte[] M1 = arrayOfPaddeMsg[0].getBytes();\n\t\tRC4 rc4Utility = new RC4(M1, false);\n\t\tbyte[] state = rc4Utility.KeySchedule(M1);\n\t\tbyte[] StateM1 = rc4Utility.prgaStar(state, offset);//Performing PRGA operation.\n\t\tbyte[] compressedOutput = Compressor.compress(StateM1, arrayOfPaddeMsg,0, false,offset,rc4Utility);\n\t//\tSystem.out.println(\" compressedOutput size :: \"+compressedOutput.length);\n\t\tbyte[] afterFirstOutputStep = ProjectUtility.firstOutputStep(compressedOutput);\n\t//\tSystem.out.println(\" afterFirstOutputStep size :: \"+afterFirstOutputStep.length);\n\t\tbyte[] afterSecondOutputStep = ProjectUtility.secondOutputStep(afterFirstOutputStep);\n\t//\tSystem.out.println(\" afterSecondOutputStep size :: \"+afterSecondOutputStep.length);\n\t\treturn afterSecondOutputStep;\n\n\t}", "@Override\n public long applyAsLong(BytesStore bytes, @NonNegative long length) throws IllegalStateException, BufferUnderflowException {\n long hash;\n long remaining = length;\n long off = bytes.readPosition();\n\n if (remaining >= 32) {\n long v1 = seed + P1 + P2;\n long v2 = seed + P2;\n long v3 = seed;\n long v4 = seed - P1;\n\n do {\n v1 += fetch64(bytes, off) * P2;\n v1 = Long.rotateLeft(v1, 31);\n v1 *= P1;\n\n v2 += fetch64(bytes, off + 8) * P2;\n v2 = Long.rotateLeft(v2, 31);\n v2 *= P1;\n\n v3 += fetch64(bytes, off + 16) * P2;\n v3 = Long.rotateLeft(v3, 31);\n v3 *= P1;\n\n v4 += fetch64(bytes, off + 24) * P2;\n v4 = Long.rotateLeft(v4, 31);\n v4 *= P1;\n\n off += 32;\n remaining -= 32;\n } while (remaining >= 32);\n\n hash = Long.rotateLeft(v1, 1)\n + Long.rotateLeft(v2, 7)\n + Long.rotateLeft(v3, 12)\n + Long.rotateLeft(v4, 18);\n\n v1 *= P2;\n v1 = Long.rotateLeft(v1, 31);\n v1 *= P1;\n hash ^= v1;\n hash = hash * P1 + P4;\n\n v2 *= P2;\n v2 = Long.rotateLeft(v2, 31);\n v2 *= P1;\n hash ^= v2;\n hash = hash * P1 + P4;\n\n v3 *= P2;\n v3 = Long.rotateLeft(v3, 31);\n v3 *= P1;\n hash ^= v3;\n hash = hash * P1 + P4;\n\n v4 *= P2;\n v4 = Long.rotateLeft(v4, 31);\n v4 *= P1;\n hash ^= v4;\n hash = hash * P1 + P4;\n } else {\n hash = seed + P5;\n }\n\n hash += length;\n\n while (remaining >= 8) {\n long k1 = fetch64(bytes, off);\n k1 *= P2;\n k1 = Long.rotateLeft(k1, 31);\n k1 *= P1;\n hash ^= k1;\n hash = Long.rotateLeft(hash, 27) * P1 + P4;\n off += 8;\n remaining -= 8;\n }\n\n if (remaining >= 4) {\n hash ^= fetch32(bytes, off) * P1;\n hash = Long.rotateLeft(hash, 23) * P2 + P3;\n off += 4;\n remaining -= 4;\n }\n\n while (remaining != 0) {\n hash ^= fetch8(bytes, off) * P5;\n hash = Long.rotateLeft(hash, 11) * P1;\n --remaining;\n ++off;\n }\n\n return finishUp(hash);\n }", "public int hash(String w){\n return (Math.abs(w.hashCode()) % hashTable.length);\n }", "public long FNVHash(String str) {\n\t\tlong fnv_prime = 0x811C9DC5;\n\t\tlong hash = 0;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash *= fnv_prime;\n\t\t\thash ^= str.charAt(i);\n\t\t}\n\n\t\treturn hash;\n\t}", "private int hash1(T key) {\n return (key.toString().charAt(0) + key.toString().length())%newTable.length;\r\n }", "String getSaltedHash();", "private String getHash(String text) {\n\t\ttry {\n\t\t\tString salt = new StringBuffer(this.email).reverse().toString();\n\t\t\ttext += salt;\n\t\t\tMessageDigest m = MessageDigest.getInstance(\"MD5\");\n\t\t\tm.reset();\n\t\t\tm.update(text.getBytes());\n\t\t\tbyte[] digest = m.digest();\n\t\t\tBigInteger bigInt = new BigInteger(1, digest);\n\t\t\tString hashedText = bigInt.toString(16);\n\t\t\twhile (hashedText.length() < 32) {\n\t\t\t\thashedText = \"0\" + hashedText;\n\t\t\t}\n\t\t\treturn hashedText;\n\t\t} catch (Exception e) {\n\t\t\te.getStackTrace();\n\t\t\treturn text;\n\t\t}\n\t}", "public static long[] splitHash(byte[] hash) {\n if (hash == null || hash.length != 16) {\n return new long[]{0L, 0L};\n }\n\n ByteBuffer buffer = ByteBuffer.wrap( hash );\n long[] ret = new long[2];\n ret[0] = buffer.getLong();\n ret[1] = buffer.getLong();\n\n\n return ret;\n }", "public void calcularHash() {\n\t\tLocalDateTime agora = LocalDateTime.now();\n\t\t\n\t\t// coverção da string data/hora atual para o formato de 13 digitos\n\t\tDateTimeFormatter formatterData = DateTimeFormatter.ofPattern(\"ddMMuuuuHHmmss\");\n\t\tString dataFormatada = formatterData.format(agora);\n\t\t\n\t\tSystem.out.println(dataFormatada);\n\t\ttimestamp = Long.parseLong(dataFormatada);\n\t\t\n\t\tSystem.out.println(\"Informe o CPF: \");\n\t\tcpf = sc.nextLong();\n\t\t\n\t\t// calculos para gerar o hash\n\t\thash = cpf + (7*89);\n\t\thash = (long) Math.cbrt(hash);\n\t\t\n\t\thash2 = timestamp + (7*89);\n\t\thash2 = (long) Math.cbrt(hash2);\n\t\t\n\t\tsoma_hashs = hash + hash2;\n\t\t// converção para hexadecimal\n\t String str2 = Long.toHexString(soma_hashs);\n\t\t\n\t\tSystem.out.println(\"\\nHash: \"+ hash + \" \\nHash Do Timestamp: \" + hash2 + \"\\nSoma total do Hash: \" + str2);\n\t\t\n\t}", "private static byte[] m14295fl(String str) {\n try {\n MessageDigest instance = MessageDigest.getInstance(\"MD5\");\n if (instance == null) {\n return str.getBytes();\n }\n instance.update(str.getBytes());\n return instance.digest();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n return str.getBytes();\n }\n }", "private int hash(Handle[] myTable,\n String toHash) {\n\n int intLength = toHash.length() / 4;\n long sum = 0;\n for (int j = 0; j < intLength; j++) {\n char[] c = toHash.substring(j * 4, (j * 4) + 4)\n .toCharArray();\n long mult = 1;\n for (int k = 0; k < c.length; k++) {\n sum += c[k] * mult;\n mult *= 256;\n } // end inner for\n } // end outer for\n char[] c = toHash.substring(intLength * 4).toCharArray();\n long mult = 1;\n for (int k = 0; k < c.length; k++) {\n sum += c[k] * mult;\n mult *= 256;\n }\n return (int) (Math.abs(sum) % myTable.length);\n }", "private int hash1(K key) {\n int h = 0;\n int seed = 31;//素数\n String s = key.toString();\n for (int i = 0; i != s.length(); ++i) {\n h = seed * h + s.charAt(i);\n }\n return h % length;\n }", "public long SDBMHash(String str) {\n\t\tlong hash = 0;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = str.charAt(i) + (hash << 6) + (hash << 16) - hash;\n\t\t}\n\n\t\treturn hash;\n\t}", "public long DJBHash(String str) {\n\t\tlong hash = 5381;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = ((hash << 5) + hash) + str.charAt(i);\n\t\t}\n\n\t\treturn hash;\n\t}", "private static String hashSHA256(String input) throws TokenManagementException {\n\t\t\n\t\tMessageDigest md;\n\t\ttry {\n\t\t\tmd = MessageDigest.getInstance(\"SHA-256\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\tthrow new TokenManagementException(ErrorMessage.sha256AlgorithmNotFound);\n\t\t}\n\t\t\n\t\t\n\t\tmd.update(input.getBytes(StandardCharsets.UTF_8));\n\t\tbyte[] digest = md.digest();\n\n\t\t// Beware the hex length. If MD5 -> 32:\"%032x\", but for instance, in SHA-256 it should be \"%064x\" \n\t\tString result = String.format(\"%64x\", new BigInteger(1, digest));\n\t\t\n\t\treturn result;\n\t\t\n\t}", "public static int nullSafeHashCode(byte[] array) {\r\n if (array == null) {\r\n return 0;\r\n }\r\n int hash = INITIAL_HASH;\r\n int arraySize = array.length;\r\n for (int i = 0; i < arraySize; i++) {\r\n hash = MULTIPLIER * hash + array[i];\r\n }\r\n return hash;\r\n }", "private int calculateHash(int id, String uri) {\n\t\treturn uri.hashCode() * Constants.HASH_PRIMES[0]\n\t\t\t\t+ Integer.toString(id).hashCode() * Constants.HASH_PRIMES[1];\n\t}", "protected static void endPartial(long[] h) {\n h[11] += h[1]; \n h[2] ^= h[11]; \n h[1] = (h[1] << 44) | (h[1] >>> 20);\n h[0] += h[2]; \n h[3] ^= h[0]; \n h[2] = (h[2] << 15) | (h[2] >>> 49);\n h[1] += h[3]; \n h[4] ^= h[1]; \n h[3] = (h[3] << 34) | (h[3] >>> 30);\n h[2] += h[4]; \n h[5] ^= h[2]; \n h[4] = (h[4] << 21) | (h[4] >>> 43);\n h[3] += h[5]; \n h[6] ^= h[3]; \n h[5] = (h[5] << 38) | (h[5] >>> 26);\n h[4] += h[6]; \n h[7] ^= h[4]; \n h[6] = (h[6] << 33) | (h[6] >>> 31);\n h[5] += h[7]; \n h[8] ^= h[5]; \n h[7] = (h[7] << 10) | (h[7] >>> 54);\n h[6] += h[8]; \n h[9] ^= h[6]; \n h[8] = (h[8] << 13) | (h[8] >>> 51);\n h[7] += h[9]; \n h[10] ^= h[7]; \n h[9] = (h[9] << 38) | (h[9] >>> 26);\n h[8] += h[10]; \n h[11] ^= h[8]; \n h[10] = (h[10] << 53) | (h[10] >>> 11);\n h[9] += h[11]; \n h[0] ^= h[9]; \n h[11] = (h[11] << 42) | (h[11] >>> 22);\n h[10] += h[0]; \n h[1] ^= h[10]; \n h[0] = (h[0] << 54) | (h[0] >>> 10);\t\t\n\t}", "private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }", "private void rehash()\n {\n int hTmp = 37;\n\n if ( isHR != null )\n {\n hTmp = hTmp * 17 + isHR.hashCode();\n }\n\n if ( id != null )\n {\n hTmp = hTmp * 17 + id.hashCode();\n }\n\n if ( attributeType != null )\n {\n hTmp = hTmp * 17 + attributeType.hashCode();\n }\n \n h = hTmp;\n }", "private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}", "private long convertHash(long hash) {\n final long offset = 4294967296L;\n if ((hash & (offset / 2)) != 0) {\n return hash - offset;\n } else {\n return hash;\n }\n }" ]
[ "0.69276845", "0.661075", "0.6605296", "0.646341", "0.63968235", "0.63707757", "0.6311957", "0.6311957", "0.6310796", "0.63057923", "0.63057923", "0.62880933", "0.6264472", "0.6256039", "0.62367624", "0.61998624", "0.6197383", "0.6180457", "0.6166361", "0.61562276", "0.61343145", "0.6111044", "0.6109049", "0.6108462", "0.6104502", "0.6081983", "0.60444736", "0.6031682", "0.6021888", "0.6016892", "0.6009321", "0.6002454", "0.5998432", "0.5997294", "0.5985051", "0.59728324", "0.59709245", "0.5966411", "0.59655327", "0.5948788", "0.5947842", "0.594569", "0.5944161", "0.5940927", "0.59319735", "0.59311706", "0.5919991", "0.5916937", "0.58999944", "0.5894713", "0.58784515", "0.5877604", "0.58740705", "0.58706844", "0.5847591", "0.58439934", "0.5830325", "0.58260095", "0.582582", "0.5820237", "0.58198804", "0.5819697", "0.58149344", "0.5813462", "0.5811365", "0.5808893", "0.5808893", "0.580193", "0.58006424", "0.5796281", "0.5791762", "0.5786703", "0.5783736", "0.5777419", "0.5767918", "0.5762953", "0.57612133", "0.5757987", "0.57459366", "0.5743941", "0.57376254", "0.5733974", "0.5731913", "0.5720506", "0.57204616", "0.5714571", "0.57130265", "0.5707246", "0.5706883", "0.5696056", "0.5693343", "0.5690431", "0.56893474", "0.5686507", "0.56860137", "0.5685961", "0.56794655", "0.5679058", "0.5678597", "0.5676046", "0.56718254" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_kick_testing); InitializeViews(); initCheckBox(); Checkvalidation(check); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { int id=buttonView.getId(); RadioButton[] checbox=new RadioButton[3]; checbox[0]=less_thirty_check; checbox[1]=thirty_fourty_check; checbox[2]=great_fourty_check; RadioButton[] checkbox1=new RadioButton[3]; checkbox1[0]=health_check; checkbox1[1]=diabetes_check; checkbox1[2]=other_check; RadioButton[] checkbox2=new RadioButton[6]; checkbox2[0]=guy_check; checkbox2[1]=dad_check; checkbox2[2]=girl_check; checkbox2[3]=mom_check; checkbox2[4]=grandad_check; checkbox2[5]=grand_ma; switch (id) { case R.id.less_thirty_check: if(isChecked){ RadioButton check=(RadioButton) findViewById(id); checkCondition(check, checbox); } break; case R.id.thirty_fourty_check: if(isChecked){ RadioButton check1=(RadioButton) findViewById(id); checkCondition(check1, checbox); } break; case R.id.great_fourty_check: if(isChecked){ RadioButton check2=(RadioButton) findViewById(id); checkCondition(check2, checbox); } break; case R.id.health_check: if(isChecked){ RadioButton check3=(RadioButton) findViewById(id); checkCondition(check3, checkbox1); } break; case R.id.diabetes_check: if(isChecked){ RadioButton check4=(RadioButton) findViewById(id); checkCondition(check4, checkbox1); } break; case R.id.other_check: if(isChecked){ RadioButton check5=(RadioButton) findViewById(id); checkCondition(check5, checkbox1); } break; case R.id.guy_check: if(isChecked){ RadioButton check6=(RadioButton) findViewById(id); checkCondition(check6, checkbox2); } break; case R.id.dad_check: if(isChecked){ RadioButton check7=(RadioButton) findViewById(id); checkCondition(check7, checkbox2); } break; case R.id.girl_check: if(isChecked){ RadioButton check8=(RadioButton) findViewById(id); checkCondition(check8, checkbox2); } break; case R.id.mom_check: if(isChecked){ RadioButton check9=(RadioButton) findViewById(id); checkCondition(check9, checkbox2); } break; case R.id.grandad_check: if(isChecked){ RadioButton check10=(RadioButton) findViewById(id); checkCondition(check10, checkbox2); } break; case R.id.grand_ma: if(isChecked){ RadioButton check11=(RadioButton) findViewById(id); checkCondition(check11, checkbox2); } break; default: // CheckBox check12=(CheckBox) findViewById(id); // checkCondition(check12, this.check); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { RadioButton[] checbox=new RadioButton[3]; checbox[0]=less_thirty_check; checbox[1]=thirty_fourty_check; checbox[2]=great_fourty_check; RadioButton[] checkbox1=new RadioButton[3]; checkbox1[0]=health_check; checkbox1[1]=diabetes_check; checkbox1[2]=other_check; RadioButton[] check2=new RadioButton[6]; check2[0]=guy_check; check2[1]=dad_check; check2[2]=girl_check; check2[3]=mom_check; check2[4]=grandad_check; check2[5]=grand_ma; if(Checkvalidation(checbox)){ RadioButton checkbox=SelectedCheckBox(checbox); int check_id=checkbox.getId(); switch (check_id) { case R.id.less_thirty_check: Log.d("sun","less thirty check"); // AppsConstant.user_age="<30"; break; case R.id.thirty_fourty_check: Log.d("sun","thirty fourty check"); // AppsConstant.user_age="30-45"; break; case R.id.great_fourty_check: Log.d("sun","great fourty check"); // AppsConstant.user_age=">45"; break; default: break; } } else{ Toast.makeText(getApplicationContext(), "please select age", Toast.LENGTH_SHORT).show(); return; } if(Checkvalidation(checkbox1)){ RadioButton checkbox=SelectedCheckBox(checkbox1); int check_id=checkbox.getId(); switch (check_id) { case R.id.health_check: Log.d("sun","health_check"); // AppsConstant.user_health="health"; break; case R.id.diabetes_check: Log.d("sun","diabetes_check"); // AppsConstant.user_health="diabetes"; break; case R.id.other_check: Log.d("sun","other_check"); // AppsConstant.user_health="other"; break; default: break; } } else{ Toast.makeText(getApplicationContext(), "please Select the health Problem", Toast.LENGTH_SHORT).show(); return; } if(Checkvalidation(check2)){ RadioButton checkbox=SelectedCheckBox(check2); int check_id=checkbox.getId(); switch (check_id) { case R.id.guy_check: Log.d("sun","Gender:-Guy"); // AppsConstant.user_gender="guy"; break; case R.id.dad_check: Log.d("sun","Gender:-Dad"); // AppsConstant.user_gender="dad"; break; case R.id.girl_check: Log.d("sun","Gender:-Girl"); // AppsConstant.user_gender="girl"; break; case R.id.mom_check: Log.d("sun","Gender:-Mom"); // AppsConstant.user_gender="mom"; break; case R.id.grandad_check: Log.d("sun","Gender:-GrandDad"); // AppsConstant.user_gender="granddad"; break; case R.id.grand_ma: Log.d("sun","Gender:-GrandMaa"); // AppsConstant.user_gender="grandmaa"; break; default: Log.d("sun","Gender:-Guy"); // AppsConstant.user_gender="guy"; break; } } else{ Toast.makeText(getApplicationContext(), "Please Select Your Gender", Toast.LENGTH_SHORT).show(); return; } }
{ "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
Test of getOrDefault method, of class SimpleStyleableMap.
@Test public void testGetOrDefault() { System.out.println("getOrDefault"); // GIVEN SimpleStyleableMap instance = new SimpleStyleableMap(); // WHEN getOrDefault and no value has been put Object key = "dummyKey"; Object defaultValue = "defaultValue"; Object result = instance.getOrDefault(key, defaultValue); // THEN must return default value assertEquals(defaultValue, result); // WHEN getOrDefault and a value has been put Object putValue="putValue"; instance.put(key, putValue ); result = instance.getOrDefault(key, defaultValue); // THEN must return put value assertEquals(putValue, result); // WHEN key is removed instance.remove(key); result = instance.getOrDefault(key, defaultValue); // THEN must return default value assertEquals(defaultValue, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testContainsKey() {\n System.out.println(\"containsKey\");\n \n // GIVEN\n SimpleStyleableMap instance = new SimpleStyleableMap();\n \n // WHEN getOrDefault and no value has been put\n Object key = \"dummyKey\";\n boolean result = instance.containsKey(key);\n \n // THEN must return false\n assertEquals(false, result);\n \n // WHEN getOrDefault and a value has been put\n Object putValue=\"putValue\";\n instance.put(key, putValue );\n result = instance.containsKey(key);\n \n // THEN must returnt rue\n assertEquals(true, result);\n \n // WHEN key is removed\n instance.remove(key);\n result = instance.containsKey(key);\n // THEN must return default value\n assertEquals(false, result);\n }", "public static final <K,V> V ccGetOrDefault(\n HashMap<K,V> pxMap,K pxKey, V pxDefault\n ){\n if(pxMap==null){return pxDefault;}\n if(pxKey==null){return pxDefault;}\n if(pxMap.containsKey(pxKey)){\n return pxMap.get(pxKey);\n }else{\n return pxDefault;\n }//..?\n }", "public Object get(Map<Prop, Object> map) {\n Object o = map.get(this);\n return o != null ? o : defaultValue;\n }", "public SimpleMap getSimpleSolidMap() {\n\t\treturn m;\n\t}", "boolean hasSimpleMap();", "@org.junit.Test\n public void mapGet021() {\n final XQuery query = new XQuery(\n \"map:get(map:new(map{\\\"su\\\":=\\\"Sunday\\\",\\\"mo\\\":=\\\"Monday\\\",\\\"tu\\\":=\\\"Tuesday\\\",\\\"we\\\":=\\\"Wednesday\\\",\\\"th\\\":=\\\"Thursday\\\",\\\"fr\\\":=\\\"Friday\\\",\\\"sa\\\":=\\\"Saturday\\\"}, \\n\" +\n \" \\\"http://www.w3.org/2005/xpath-functions/collation/codepoint\\\"), \\\"TH\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "@org.junit.Test\n public void mapGet006() {\n final XQuery query = new XQuery(\n \"map:get(map:entry(\\\"foo\\\", \\\"bar\\\"), xs:untypedAtomic(\\\"foo\\\"))\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertStringValue(false, \"bar\")\n );\n }", "@org.junit.Test\n public void mapGet015() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",number('NaN'):=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, number('NaN'))\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "@org.junit.Test\n public void mapGet005() {\n final XQuery query = new XQuery(\n \"map:get(map:entry(\\\"foo\\\", \\\"bar\\\"), \\\"foo\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertStringValue(false, \"bar\")\n );\n }", "@Override\n\tpublic GenericMapInfo get(PK id) {\n\t\treturn null;\n\t}", "@org.junit.Test\n public void mapGet003() {\n final XQuery query = new XQuery(\n \"map:get(map{}, 23)\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "int getInfoOrDefault(\n int key,\n int defaultValue);", "@org.junit.Test\n public void mapGet901() {\n final XQuery query = new XQuery(\n \"map:contains(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",number('NaN'):=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, (1 to 5)[10])\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n error(\"XPTY0004\")\n );\n }", "Object get(Object key) throws NullPointerException;", "@org.junit.Test\n public void mapGet007() {\n final XQuery query = new XQuery(\n \"map:get(map:entry(xs:untypedAtomic(\\\"foo\\\"), \\\"bar\\\"), \\\"foo\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertStringValue(false, \"bar\")\n );\n }", "@org.junit.Test\n public void mapGet008() {\n final XQuery query = new XQuery(\n \"map:get(map:entry(xs:untypedAtomic(\\\"12\\\"), \\\"bar\\\"), 12)\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "@org.junit.Test\n public void mapGet001() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",4:=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, 4)\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertStringValue(false, \"Wednesday\")\n );\n }", "@org.junit.Test\n public void mapGet002() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",4:=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, 23)\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "@org.junit.Test\n public void mapGet009() {\n final XQuery query = new XQuery(\n \"map:get(map:entry(12, \\\"bar\\\"), xs:untypedAtomic(\\\"12\\\"))\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "@org.junit.Test\n public void mapGet004() {\n final XQuery query = new XQuery(\n \"map:get(map:entry(\\\"foo\\\", \\\"bar\\\"), \\\"baz\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "public void testMapGet() {\r\n }", "@Test\n public void test1 ()\n {\n MyMap m = new MyMap();\n assertEquals(0, m.size());\n assertNull(m.get(\"a\"));\n }", "@Test\r\n public void testAllowNulls() {\r\n MapJsonRenderer renderer = new MapJsonRenderer(true);\r\n JSONStringer jsonWriter = new JSONStringer();\r\n jsonWriter.addRenderer(renderer);\r\n Map<String, Object> map = new LinkedHashMap<String, Object>();\r\n map.put(\"ff\", null);\r\n jsonWriter.value(map);\r\n\r\n assertEquals(jsonWriter.toString(), \"{\\\"ff\\\":null}\");\r\n }", "@org.junit.Test\n public void mapGet902() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",number('NaN'):=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, (1 to 5)[. mod 2 = 0])\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n error(\"XPTY0004\")\n );\n }", "@Test\n public void test2 ()\n {\n MyMap m = new MyMap();\n m.put(\"a\", \"1\");\n m.put(\"b\", \"2\");\n m.put(\"a\", \"3\");\n assertEquals(2, m.size());\n assertEquals(\"3\", m.get(\"a\"));\n assertEquals(\"2\", m.get(\"b\"));\n assertNull(m.get(\"c\"));\n }", "@java.lang.Override\n\n public double getSpecialSamplingProbabilityMapOrDefault(\n java.lang.String key,\n double defaultValue) {\n if (key == null) { throw new java.lang.NullPointerException(); }\n java.util.Map<java.lang.String, java.lang.Double> map =\n internalGetSpecialSamplingProbabilityMap().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@java.lang.Override\n\n public double getSpecialSamplingProbabilityMapOrDefault(\n java.lang.String key,\n double defaultValue) {\n if (key == null) { throw new java.lang.NullPointerException(); }\n java.util.Map<java.lang.String, java.lang.Double> map =\n internalGetSpecialSamplingProbabilityMap().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@org.junit.Test\n public void mapGet011() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",4.0e0:=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, 4)\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertStringValue(false, \"Wednesday\")\n );\n }", "@org.junit.Test\n public void mapGet010() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",4:=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, 4.0e0)\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertStringValue(false, \"Wednesday\")\n );\n }", "@org.junit.Test\n public void mapGet012() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",\\\"urn:weds\\\":=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, xs:anyURI(\\\"urn:weds\\\"))\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertStringValue(false, \"Wednesday\")\n );\n }", "@org.junit.Test\n public void mapGet904() {\n final XQuery query = new XQuery(\n \"map:get((), \\\"a\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n error(\"XPTY0004\")\n );\n }", "@org.junit.Test\n public void mapGet020() {\n final XQuery query = new XQuery(\n \"map:get(map{\\\"su\\\":=\\\"Sunday\\\",\\\"mo\\\":=\\\"Monday\\\",\\\"tu\\\":=\\\"Tuesday\\\",\\\"we\\\":=\\\"Wednesday\\\",\\\"th\\\":=\\\"Thursday\\\",\\\"fr\\\":=\\\"Friday\\\",\\\"sa\\\":=\\\"Saturday\\\"}, \\\"TH\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "@org.junit.Test\n public void mapGet014() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",xs:anyURI(\\\"urn:weds\\\"):=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, number('NaN'))\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "@org.junit.Test\n public void mapGet906() {\n final XQuery query = new XQuery(\n \"map:get((map{}, map{\\\"a\\\":=\\\"b\\\"}), \\\"a\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n error(\"XPTY0004\")\n );\n }", "@org.junit.Test\n public void get() throws Exception {\n assertEquals(null, hashTable.get(\"savon\"));\n assertEquals(\"camp\", hashTable.get(\"math\"));\n hashTable.put(\"math\", \"club\");\n assertEquals(\"club\", hashTable.get(\"math\"));\n }", "public V get(Object key) { return _map.get(key); }", "@Test\n public void testGet() throws Exception {\n map.set(\"key-1\", \"value-1\", 10);\n \n Assert.assertEquals(map.get(\"key-1\"), \"value-1\");\n \n map.set(\"key-1\", \"value-2\", 10);\n \n Assert.assertEquals(map.get(\"key-1\"), \"value-2\");\n \n map.set(\"key-2\", \"value-1\", 10);\n \n Assert.assertEquals(map.get(\"key-2\"), \"value-1\");\n }", "@org.junit.Test\n public void mapGet019() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",4:=(),5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, 4)\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertEmpty()\n );\n }", "@Test\n public void testGet()\n {\n SsOhMap m = new SsOhMap();\n m.put(\"a\", \"1\");\n m.put(\"b\", \"2\");\n m.put(\"a\", \"3\");\n\n assertEquals(\"3\", m.get(\"a\"));\n m.free();\n }", "private static void optionalMapBasic() {\n Optional<String> nonEmptyGender = Optional.of(\"male\");\n Optional<String> emptyGender = Optional.empty();\n \n // optional.map here mapping the value of obj \"male\" temporarily and executing the method toUppercase \n // \"MALE\" \n System.out.println(\"Non-Empty Optional:: \"+nonEmptyGender.map((t) -> {\n return t.toUpperCase();\n }));\n // object's main value won't affected for operation during in lamda's\n System.out.println(\"\"+nonEmptyGender);\n \n // for empty object value nothing will map or creates exception. will return empty result\n System.out.println(\"Empty Optional :: \" + emptyGender.map(String::toUpperCase));\n }", "@org.junit.Test\n public void mapGet013() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",xs:anyURI(\\\"urn:weds\\\"):=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, \\\"urn:weds\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertStringValue(false, \"Wednesday\")\n );\n }", "@SuppressWarnings(\"rawtypes\")\n @Factory\n public static Matcher<Map> rawMapHasEntry(Object key, Object value)\n {\n return MapHasEntry.rawMapHasEntry(key, value);\n }", "V getOrDefault(final K key, final V defaultValue);", "public T caseMapType(MapType object)\n {\n return null;\n }", "public <T> T convertGet(T value, T standard)\n\t{\n\t\treturn value != null ? value : standard;\n\t}", "@java.lang.Override\n public /* nullable */\n java.lang.String getDetailsOrDefault(\n java.lang.String key,\n /* nullable */\n java.lang.String defaultValue) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map =\n internalGetDetails().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@java.lang.Override\n public /* nullable */\n java.lang.String getDetailsOrDefault(\n java.lang.String key,\n /* nullable */\n java.lang.String defaultValue) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map =\n internalGetDetails().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@Override\n\n public String getOptionsOrDefault(\n String key,\n String defaultValue) {\n if (key == null) { throw new NullPointerException(); }\n java.util.Map<String, String> map =\n internalGetOptions().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@Override\n\n public String getOptionsOrDefault(\n String key,\n String defaultValue) {\n if (key == null) { throw new NullPointerException(); }\n java.util.Map<String, String> map =\n internalGetOptions().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@Override\n\n public String getOptionsOrDefault(\n String key,\n String defaultValue) {\n if (key == null) { throw new NullPointerException(); }\n java.util.Map<String, String> map =\n internalGetOptions().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "public int getInfoOrDefault(\n int key,\n int defaultValue) {\n \n java.util.Map<java.lang.Integer, java.lang.Integer> map =\n internalGetInfo().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@org.junit.Test\n public void mapGet905() {\n final XQuery query = new XQuery(\n \"map:get(abs#1, \\\"a\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n error(\"XPTY0004\")\n );\n }", "@Test\n public void testCreateSafeMap() {\n Map safeMap = safeCreator.createMap('S',mapSize);\n int size = safeMap.getSize();\n String type = safeMap.getType();\n assertEquals(10,size);\n assertEquals(\"Safe\",type);\n }", "@Test\n\tvoid testEdgesNull() {\n\t\tmap.put(\"Boston\", null);\n\t\tAssertions.assertNull(map.get(\"Boston\"));\n\n\t}", "@java.lang.Override\n public /* nullable */\n java.lang.String getPropertiesOrDefault(\n java.lang.String key,\n /* nullable */\n java.lang.String defaultValue) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map =\n internalGetProperties().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@Override\n\n public String getOptionsOrDefault(\n String key,\n String defaultValue) {\n if (key == null) { throw new NullPointerException(); }\n java.util.Map<String, String> map =\n internalGetOptions().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@Override\n\n public String getOptionsOrDefault(\n String key,\n String defaultValue) {\n if (key == null) { throw new NullPointerException(); }\n java.util.Map<String, String> map =\n internalGetOptions().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@Override\n\n public String getOptionsOrDefault(\n String key,\n String defaultValue) {\n if (key == null) { throw new NullPointerException(); }\n java.util.Map<String, String> map =\n internalGetOptions().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "public final <T> T getProperty(String key, T defaultValue) {\n/* 72 */ Object value = Launch.blackboard.get(key);\n/* 73 */ return (value != null) ? (T)value : defaultValue;\n/* */ }", "@java.lang.Override\n public /* nullable */\n java.lang.String getPropertiesOrDefault(\n java.lang.String key,\n /* nullable */\n java.lang.String defaultValue) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map =\n internalGetProperties().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "@Test\n public void testCreateHazardousMap2() {\n Map safeMap = safeCreator.createMap('s',mapSize);\n int size = safeMap.getSize();\n String type = safeMap.getType();\n assertEquals(10,size);\n assertEquals(\"Safe\",type);\n }", "@org.junit.Test\n public void mapGet018() {\n final XQuery query = new XQuery(\n \"map:get(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",function-name(abs#1):=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, xs:QName('fn:abs'))\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertStringValue(false, \"Wednesday\")\n );\n }", "protected abstract S get(E entry);", "public int getInfoOrDefault(\n int key,\n int defaultValue) {\n \n java.util.Map<java.lang.Integer, java.lang.Integer> map =\n internalGetInfo().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }", "java.lang.String getDetailsOrDefault(\n java.lang.String key,\n java.lang.String defaultValue);", "@Override\n\tpublic T get(MatrixCoordinate coordIn) {\n\t\tMatrixValidator.throwIfNotOnMatrix(this, coordIn);\n\t\treturn this.valueMap.getOrDefault(coordIn, this.defaultValue);\n\t}", "@org.junit.Test\n public void mapGet903() {\n final XQuery query = new XQuery(\n \"map:get((\\\"a\\\", \\\"b\\\", \\\"c\\\"), \\\"a\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n error(\"XPTY0004\")\n );\n }", "@Override\n\tpublic T get(S key) throws Exception {\n\t\treturn null;\n\t}", "public Object objectAt(Position position){\n return mapElement.get(position);\n }", "public Rule simpleMapType()\n \t{\n \t\treturn sequence(nonSimpleMapTypes(), noNl(), SP_COL, noNl(), nonSimpleMapTypes(),\n \t\t\t\toptional(\n \t\t\t\t// Not enforcing [] because of problems with maps like this Str:int[\"\":5]\n \t\t\t\tsequence(noNl(), optional(SP_QMARK), noNl(), SQ_BRACKET_L, SQ_BRACKET_R)), // list of '?[]'\n \t\t\t\toptional(sequence(noNl(), SP_QMARK))); // nullable\n \t}", "ISObject forceGet(String key);", "public Object get(String aName, Object aDefault)\n{\n Object value = get(aName);\n return value!=null? value : aDefault;\n}", "public TopicMapObject getTopicMapObject(TopicMap tm, JellyContext ctx)\n throws JellyTagException{\n\n TopicMapObject reference;\n\n if ((reference = identifyByVariable(ctx)) != null)\n return reference;\n if ((reference = identifyByID(tm)) != null)\n return reference;\n if ((reference = identifyBySourceLocator(tm)) != null)\n return reference;\n\n return null;\n }", "@Test\n @Override\n public void testMapGet() {\n }", "@Override\n public T get(int key) {\n T value = _map.get(key, noFound);\n if (value == noFound) {\n value = _supplier.apply(key);\n if (value == noFound) {\n throw new UnsupportedOperationException(\"Invalid return for supplier function\");\n }\n _map.put(key, value);\n }\n\n return value;\n }", "java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue);", "java.lang.String getDetailsOrDefault(\n java.lang.String key,\n /* nullable */\n java.lang.String defaultValue);", "public Object get(Object oKey)\n {\n Map.Entry entry = getEntry(oKey);\n return (entry == null ? null : entry.getValue());\n }", "@Override\n\tpublic Map<String, Object> findOne(Long arg0) {\n\t\treturn null;\n\t}", "@Override\n\tpublic V get(Object key) {\n\t\treturn map.get(key);\n\t}", "@Override\n\tpublic Object selectOne2(Object map) {\n\t\treturn null;\n\t}", "public <T extends IConstruct> T byIdentity(Map<ILocator, T> map, ILocator l) {\r\n\t\tif (map == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn map.get(l);\r\n\t}", "default boolean isPresent() {\n return get() != null;\n }", "default boolean isPresent() {\n return get() != null;\n }", "public void testNormalPutNullValues()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkPutNullValues(pmf,\r\n HashMap1.class,\r\n ContainerItem.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }", "@Override\n\tpublic Map<String, String> get(int id) {\n\t\treturn null;\n\t}", "public T caseMapChart(MapChart object)\n {\n return null;\n }", "public void setInstanceOfMapForTesting(){\n instanceOfMap = null;\n }", "@Override\n\tpublic <T> Map<String, T> get(Collection<String> arg0)\n\t\t\tthrows TimeoutException, InterruptedException, MemcachedException {\n\t\treturn null;\n\t}", "@Override\n\tpublic Social getSocial() {\n\t\treturn (Social)map.get(SOCIAL);\n\t}", "private static void testMap(final OurMap<Integer, String> map) {\n System.out.printf(\"%n%s%n\", map.getClass());\n assert map.size() == 0;\n assert !map.containsKey(117);\n assert !map.containsKey(-2);\n assert map.get(117) == null;\n assert map.put(117, \"A\") == null;\n assert map.containsKey(117);\n assert map.get(117).equals(\"A\");\n assert map.put(17, \"B\") == null;\n assert map.size() == 2;\n assert map.containsKey(17);\n assert map.get(117).equals(\"A\");\n assert map.get(17).equals(\"B\");\n assert map.put(117, \"C\").equals(\"A\");\n assert map.containsKey(117);\n assert map.get(117).equals(\"C\");\n assert map.size() == 2;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n assert map.remove(117).equals(\"C\");\n assert !map.containsKey(117);\n assert map.get(117) == null;\n assert map.size() == 1;\n assert map.putIfAbsent(17, \"D\").equals(\"B\");\n assert map.get(17).equals(\"B\");\n assert map.size() == 1;\n assert map.containsKey(17);\n assert map.putIfAbsent(217, \"E\") == null;\n assert map.get(217).equals(\"E\");\n assert map.size() == 2;\n assert map.containsKey(217);\n assert map.putIfAbsent(34, \"F\") == null;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n }", "DUserDiscourseMapItem get(DUserDiscourseMapId id);", "@Test\n public void testLenientDeserializeFromEmptyString() throws Exception {\n\n String key = \"zoneDateTime\";\n ObjectMapper mapper = newMapper();\n ObjectReader objectReader = mapper.readerFor(MAP_TYPE_REF);\n\n String valueFromNullStr = mapper.writeValueAsString(asMap(key, null));\n Map<String, ZonedDateTime> actualMapFromNullStr = objectReader.readValue(valueFromNullStr);\n ZonedDateTime actualDateFromNullStr = actualMapFromNullStr.get(key);\n assertNull(actualDateFromNullStr);\n\n String valueFromEmptyStr = mapper.writeValueAsString(asMap(key, \"\"));\n Map<String, ZonedDateTime> actualMapFromEmptyStr = objectReader.readValue(valueFromEmptyStr);\n ZonedDateTime actualDateFromEmptyStr = actualMapFromEmptyStr.get(key);\n assertEquals(\"empty string failed to deserialize to null with lenient setting\", null, actualDateFromEmptyStr);\n }", "private static String getPropertyValueOrDefault(String value) {\n return value != null ? value : \"\";\n }", "@Override\n public V get(Object key) {\n if (key == null) {\n return null;\n } else {\n // Treat the keys to this map by uppercassing the keys\n // Verify that the uppercased key is in the map and return if so\n if (caseInsensitive && key instanceof String && super.get(key.toString().toUpperCase()) != null) {\n return super.get(key.toString().toUpperCase());\n }\n return super.get(key);\n }\n }", "public void test_findMapBySqlMap() {\r\n\t\t// step 1:\r\n\t\tMap personMap = this.persistenceService.findMapBySqlMap(FIND_PERSON_BY_SQLMAP, NAME_PARAM[0], RETURN_MAP_KEY);\r\n\t\tassertForFindMapGoogle(personMap);\r\n\t\t\r\n\t\t// init again\r\n\t\tpersonMap = null;\r\n\t\t// step 2:\r\n\t\tpersonMap = this.persistenceService.findMapBySqlMap(FIND_PERSON_BY_SQLMAP, NAME_PARAM[0], RETURN_MAP_KEY, RETURN_MAP_VALUE);\r\n\t\tassertForFindMapGoogle(personMap);\r\n\t}", "public T getIfPresent()\n\t{\n\t\treturn cache.getIfPresent(KEY);\n\t}", "public String get(Position pos){\n\t\t// return the cell at the specified position pos \n\t\t// if invalid position: return null\n\t\t// if empty cell, return null\n\t\t// assuming HashMap overhead constant, O(1)\n\t\t\n\t\tif(isValidPosition(pos) == false) { //If the position is not valid then it will return false\n\t\t\treturn null;\n\t\t}\n\t\treturn grid.get(pos); //else it will get the symbol mapped with the position\n\t}", "public void test6(){\n User user = null;\n\n String name = Optional.ofNullable(user).map(User :: getName).orElse(\"taotao\");\n\n System.out.println(name);\n }", "public T caseMapping(Mapping object) {\n\t\treturn null;\n\t}" ]
[ "0.63259745", "0.62858385", "0.60999656", "0.6006031", "0.5920945", "0.5790706", "0.5721352", "0.5711441", "0.57071036", "0.566418", "0.5660913", "0.5658313", "0.5656336", "0.56421816", "0.5600083", "0.55910754", "0.5588702", "0.5581296", "0.5555501", "0.5528104", "0.5516346", "0.5510795", "0.5507906", "0.550665", "0.55032796", "0.54655737", "0.5447074", "0.5434231", "0.5424114", "0.54151785", "0.5413774", "0.5413392", "0.54132617", "0.5393373", "0.5313413", "0.53102374", "0.52740115", "0.5270273", "0.52686495", "0.5261057", "0.5225689", "0.52164394", "0.5195729", "0.5185797", "0.5183016", "0.5181504", "0.5180653", "0.51434064", "0.51434064", "0.51434064", "0.51354885", "0.5115978", "0.5112865", "0.5098183", "0.5086035", "0.50837934", "0.50837934", "0.50837934", "0.5078359", "0.5064393", "0.50374657", "0.5032282", "0.5025298", "0.5011526", "0.5010265", "0.50064707", "0.50039434", "0.49938858", "0.49937406", "0.49923196", "0.49858275", "0.49793875", "0.49785122", "0.49726546", "0.49721512", "0.4970182", "0.49699736", "0.49689072", "0.496807", "0.4957474", "0.49444464", "0.49439687", "0.49230534", "0.49230534", "0.4920285", "0.49165863", "0.49162024", "0.49144623", "0.49110135", "0.49049082", "0.4904609", "0.49018317", "0.49017495", "0.49000508", "0.48928675", "0.48914406", "0.48826548", "0.48761305", "0.4863214", "0.48603404" ]
0.7978547
0
Test of containsKey method, of class SimpleStyleableMap.
@Test public void testContainsKey() { System.out.println("containsKey"); // GIVEN SimpleStyleableMap instance = new SimpleStyleableMap(); // WHEN getOrDefault and no value has been put Object key = "dummyKey"; boolean result = instance.containsKey(key); // THEN must return false assertEquals(false, result); // WHEN getOrDefault and a value has been put Object putValue="putValue"; instance.put(key, putValue ); result = instance.containsKey(key); // THEN must returnt rue assertEquals(true, result); // WHEN key is removed instance.remove(key); result = instance.containsKey(key); // THEN must return default value assertEquals(false, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean containsKey(Key key) ;", "public abstract boolean containsKey(K key);", "boolean containsKey(CoreLabel key);", "@Override\n\t\t\tpublic boolean containsKey(Object key) {\n\t\t\t\treturn false;\n\t\t\t}", "public boolean contains(Key key);", "@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn map.containsKey(key);\n\t}", "boolean containsKey(String keyLabel);", "@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn false;\n\t}", "public boolean containsKey(String key);", "boolean hasKey();", "boolean hasKey();", "boolean hasKey();", "boolean hasKey();", "boolean hasKey();", "boolean containsKey(Object key) throws NullPointerException;", "@Override\n\tpublic boolean contains(K key) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean containsKey(Object arg0) {\n\t\treturn false;\n\t}", "boolean containsKey(K key);", "boolean containsKey(K key);", "@Test\n public void testCoh3710_keySetContains()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().contains(Integer.valueOf(1)));\n validateIndex(cache);\n }\n });\n }", "@org.junit.Test\n public void contains() throws Exception {\n assertEquals(true, hashTable.contains(\"Blue\"));\n assertEquals(false, hashTable.contains(\"blue\"));\n }", "boolean hasSimpleMap();", "public boolean contains (String key)\n {\n use (key);\n return map.containsKey (key);\n }", "@Override\n\t\t\tpublic boolean contains(String key) {\n\t\t\t\treturn false;\n\t\t\t}", "public boolean containsKey(Object key) {\n\t\treturn false;\r\n\t}", "public boolean existsKey(String inKey);", "public boolean contains(String key);", "@Request(id = 6, retryable = true, response = ResponseMessageConst.BOOLEAN)\n Object containsKey(String name, Data key);", "@Override\n\tpublic boolean containsKey(Object key) {\n\t\tString uKey = key.toString().toUpperCase();\n\t\treturn super.containsKey(uKey);\n\t}", "public boolean contains(K key);", "boolean containsInfo(\n int key);", "@Override\n public boolean contains(Object o) {\n return theMap.keySet().contains(o);\n }", "public boolean containsKey(String s){\r\n return this.get(s) != 0;\r\n }", "boolean contains(KeyType key);", "public boolean contains(K key){\r\n int loc = find(key);\r\n if((hashTable[loc]!= null) && hashTable[loc].equals(key))\r\n return true;\r\n else\r\n return false;\r\n }", "@Override\n public boolean containsKey(Object key) {\n return entries.containsKey(key);\n }", "public abstract boolean lookup(Key key);", "boolean containsClassIdXyPairsMap(\n int key);", "@Override\n public synchronized boolean containsKey(Object key) {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n if (this.ignoreCase) {\n return this.keyMap.containsKey(key.toString().toLowerCase());\n }\n return super.containsKey(key.toString());\n }", "boolean hasKey(String key);", "boolean containsKey(long key);", "@Override\r\n\tpublic boolean containsKey(Object key) {\r\n\t\tif (key == null) throw new NullPointerException();\r\n\t\treturn get(key) != null;\r\n\t}", "public MapAssertion<K, V> containsKey(final K expected) {\n toKeys().contains(expected);\n return this;\n }", "public boolean containsKey(Object key)\r\n/* 386: */ {\r\n/* 387:556 */ return this.headers.containsKey(key);\r\n/* 388: */ }", "boolean contains(String key);", "boolean contains(String key);", "@Override\n public boolean containsKey(Object key) {\n int index = key.hashCode() % table.length;\n if (index < 0) {\n index += table.length;\n }\n if (table[index] == null) {\n return false;\n }\n for (Entry<K,V> entry : table[index]) {\n if (entry.getKey().equals(key)) {\n return true;\n }\n }\n return false;\n }", "public boolean isKeyInMap(String key) {\r\n\t\treturn wikiList.containsKey(key);\r\n\t}", "public boolean containsKey(Object key) {\n return map.containsKey(key);\n }", "public boolean containsKey(Object key) {\n return map.containsKey(key);\n }", "public static boolean checkKeyMapping(HashMap<Integer, String> students, int key) {\n\t\treturn students.containsKey(key);\n\t}", "@Test\n public void mapContains() {\n check(MAPCONT);\n query(MAPCONT.args(MAPNEW.args(), 1), false);\n query(MAPCONT.args(MAPENTRY.args(1, 2), 1), true);\n }", "@Override\n public boolean containsKey(K key) {\n return containsKeyHelper(root, key);\n }", "@Override\r\n\tpublic boolean CXT_containsKey(String jsk)\r\n\t{\n\t\treturn false;\r\n\t}", "public Boolean isKeyInMap() {\n questionFourAnswer = \"Brunch\";\n\t\treturn hashMap.containsKey(questionFourAnswer);\n\t}", "public boolean contains(String key)\r\n { return get(key) != null; }", "public native Boolean has(K key);", "public static Boolean isContains(String key){\r\n return scenarioContext.containsKey(key.toString());\r\n }", "boolean hasKey(String collection, String hkey);", "public boolean containsKey(int key) {\n return getElement(key) != null;\n }", "private static <T> boolean containsInMap(Map<Class, Set<T>> map, Class key, T element) {\n Set<T> set = map.get(key);\n\n if (set == null) {\n return false;\n }\n\n return set.contains(element);\n }", "@Override\n public boolean contains(Object o) {\n return map.containsKey(o);\n }", "@Test\n public void keySetTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.keySet());\n }", "@java.lang.Override\n public boolean containsClassIdXyPairsMap(\n int key) {\n\n return internalGetClassIdXyPairsMap().getMap().containsKey(key);\n }", "boolean containsKey(int key) throws ContentStoreException;", "@Test\t//annotation\n\tpublic void testContainsTrue() throws FileNotFoundException {\n\t\tScrabbleDictionary dictionary = new ScrabbleDictionary();\n\t\t\n\t\tAssert.assertTrue(\n\t\t\t\tdictionary.contains(\"HELLO\"));\n\t}", "private boolean contains(String key) {\n return contains(dict, key);\n }", "@Override\n public boolean containsKey(K key) {\n if (key == null) {\n throw new IllegalArgumentException(\"argument to containsKey() is null\");\n }\n return get(key) != null;\n }", "public boolean contains(int key) {\n return map.containsKey(key);\n }", "public boolean containsKey(K key) {\n\t\t\n\t\t\n\t\treturn keySet.contains(key);\n }", "public boolean definesKey( final String key ) {\n return values.containsKey( key );\n }", "@Override\n\tpublic boolean containsKey(Key k) {\n\t\treturn bst.has(k);\n\t}", "boolean has(String key);", "public boolean containsInfo(\n int key) {\n \n return internalGetInfo().getMap().containsKey(key);\n }", "@java.lang.Override\n public boolean containsClassIdXyPairsMap(\n int key) {\n\n return internalGetClassIdXyPairsMap().getMap().containsKey(key);\n }", "public void testNormalKeySet()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkKeySet(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }", "@Test\n void shouldBeInsideMap()\n {\n assertTrue(map.isInsideMap(new Vector2(0,0)));\n\n assertTrue(map.isInsideMap(new Vector2(4,0)));\n\n assertTrue(map.isInsideMap(new Vector2(4,4)));\n\n assertTrue(map.isInsideMap(new Vector2(1,3)));\n }", "public boolean containsKey (String key)\n\t{\n\t\treturn properties.containsKey(key);\n\t}", "boolean hasCompoundKey();", "public boolean containsKey(String id){\r\n return messageMap.containsKey(id);\r\n }", "@Test\n public void testGet() throws Exception {\n map.set(\"key-1\", \"value-1\", 10);\n \n Assert.assertEquals(map.get(\"key-1\"), \"value-1\");\n \n map.set(\"key-1\", \"value-2\", 10);\n \n Assert.assertEquals(map.get(\"key-1\"), \"value-2\");\n \n map.set(\"key-2\", \"value-1\", 10);\n \n Assert.assertEquals(map.get(\"key-2\"), \"value-1\");\n }", "@java.lang.Override\n public boolean containsSpecialSamplingProbabilityMap(\n java.lang.String key) {\n if (key == null) { throw new java.lang.NullPointerException(); }\n return internalGetSpecialSamplingProbabilityMap().getMap().containsKey(key);\n }", "public static void main(String[] args) {\n HashMap<Integer, String> map = new HashMap<>();\n map.put(1, \"Red\");\n map.put(2, \"Green\");\n map.put(3, \"Black\");\n map.put(4, \"White\");\n map.put(5, \"Blue\");\n\n\n ///////TOTALLY WRONG SOLUTION/////////// you may use this way with par2\n\n// String value = \"Black\";\n// if (map.containsValue(value)){\n// System.out.println(\"It has black on \" + map.get(value));\n// }else {\n// System.out.println(\"it has not\");\n// }\n\n\n /////////////////////////////////\n String value = \"Black\";\n if (map.containsValue(value)){\n System.out.println(\"It has Black\");\n }else {\n System.out.println(\"it is not working\");\n }\n\n\n System.out.println(\"Part2---------------------------------------------\");\n //part2, try to check it using loop, without .containsValue method\n // print key if you have value in map\n\n for (Map.Entry<Integer, String> entry : map.entrySet()) {\n Integer entryKey = entry.getKey();\n String entryValue = entry.getValue();\n\n if (entryValue.equals(\"White\")) {\n System.out.println(\"key is:\" + entryKey);\n }\n }\n\n //10. Write a Java program to get the\n // value of a specified key in a map.\n System.out.println(\"--------------\");\n\n System.out.println(map.get(3));\n\n //11. Write a Java program to get a set view of the keys contained in this map.\n\n System.out.println(\"__---------------\");\n// for (Map.Entry<Integer, String> entry : map.entrySet()) { // my way right\n// Integer keys = entry.getKey();\n//\n// System.out.println(\"keys is \" + keys + \" \");\n// }\n System.out.println(\"all keys in map \" + map.keySet()); // correct way\n\n HashMap<Character, Boolean> maps = new HashMap<>();\n maps.put('A', true);\n maps.put('B', true);\n maps.put('C', false);\n\n //print => A B C\n //1.way\n Set<Character> characters = maps.keySet();\n System.out.println(characters);\n // 2.way\n for (Character character : characters) {\n System.out.println(character);\n }\n\n\n // 12. to get colection view of the values contained in this map\n\n // 1.way\n\n System.out.println(\"Values are \" + map.values());\n\n //2. way\n\n for (Map.Entry<Integer, String> entry : map.entrySet()) {\n String value4 = entry.getValue();\n\n System.out.println(\"value is \" + value4);\n }\n\n\n }", "@Override\n public boolean containsKey(Object key) {\n LinkedList<Entry> tempBucket = chooseBucket(key);\n \n for(int i=0;i<tempBucket.size();i++) {\n \t\tEntry tempEntry = tempBucket.get(i);\n \t\t\n \t\tif(tempEntry.getKey() == key) {\n \t\t\treturn true;\n \t\t}\n \t}\n \n return false;\n }", "public boolean containsKey(K key) {\r\n\t\tif (get(key) == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "boolean containsLabels(java.lang.String key);", "boolean containsLabels(java.lang.String key);", "boolean containsLabels(java.lang.String key);", "boolean containsLabels(java.lang.String key);", "public boolean containsKey(String key) throws Exception {\n //return properties.containsKey(key);\n if (config != null) {\n Configuration[] props = config.getChildren(\"property\");\n for (int i = 0; i < props.length; i++) {\n if (props[i].getAttribute(\"name\") != null && props[i].getAttribute(\"name\").equals(key)) return true;\n }\n }\n return false;\n }", "@java.lang.Override\n public boolean containsSpecialSamplingProbabilityMap(\n java.lang.String key) {\n if (key == null) { throw new java.lang.NullPointerException(); }\n return internalGetSpecialSamplingProbabilityMap().getMap().containsKey(key);\n }", "public boolean existsKey(String bucket, String inKey);", "public boolean existsKeyInS3(String inKey);", "public boolean containsKey(Comparable key) { return this.store.containsKey(key); }", "boolean contains(KeyType key, ValueType value);", "public boolean contains(int key) {\n return s.contains(key);\n }", "public boolean contains( T key )\n {\n if (key == null) return false;\n for ( int i=0 ; i < size() ; ++i )\n if ( get(i).equals( key ) ) \n return true;\n \n return false;\n }", "@Override\n\tpublic boolean contains(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn true;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean isKeyInCache(Object key);", "public boolean containsKey(String key) {\n if (!index.containsKey(key)) return false;\n else if (index.get(key).isEmpty()) return false;\n else return true;\n }" ]
[ "0.7173415", "0.6968093", "0.691128", "0.6862091", "0.6845912", "0.6841973", "0.679535", "0.6792492", "0.6738047", "0.6687515", "0.6687515", "0.6687515", "0.6687515", "0.6687515", "0.6625117", "0.6583815", "0.6574659", "0.65719575", "0.65719575", "0.6562413", "0.6550558", "0.6522483", "0.64903414", "0.6484001", "0.6478899", "0.64569455", "0.6443907", "0.64378357", "0.6436566", "0.6435628", "0.6427599", "0.6396024", "0.6379742", "0.6364898", "0.6364499", "0.63536596", "0.6341905", "0.6328804", "0.63229287", "0.63068014", "0.6296952", "0.6288014", "0.62850696", "0.62636805", "0.62578917", "0.62578917", "0.6234708", "0.62262136", "0.62115085", "0.62115085", "0.62052", "0.6167046", "0.616262", "0.6158014", "0.61538", "0.61511266", "0.6141829", "0.6132058", "0.6126364", "0.6124637", "0.6110982", "0.6091324", "0.6083024", "0.6064974", "0.60590404", "0.60440594", "0.6037873", "0.60308826", "0.6029458", "0.6026487", "0.60226", "0.6013477", "0.60114795", "0.6007741", "0.59595615", "0.595637", "0.59469724", "0.5939338", "0.59225476", "0.59200877", "0.5895846", "0.5886418", "0.5885336", "0.5883327", "0.5882213", "0.5878209", "0.5878209", "0.5878209", "0.5878209", "0.5875779", "0.58687246", "0.5866371", "0.58646923", "0.58606863", "0.5857282", "0.58516043", "0.5848214", "0.58480203", "0.5841471", "0.5838924" ]
0.75132495
0
Creates a new instance of EcologicaExcepciones
public ExceptionSubVersion() { this("EcologicaExcepciones"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Exercicio(){\n \n }", "public ProductoNoElaborado() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "private IOferta buildOfertaEjemplo3() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tnew PredicadoDiaSemana(Calendar.SATURDAY),\n\t\t\t\tnew ExtraerFechaCreacion());\n\t\tFunction<Compra, Float> descuento = new DescuentoFijo<>(10.0f);\n\t\treturn new OfertaDinero(\"10$ descuento sabados\", condicion,\n\t\t\t\tdescuento);\n\t}", "@Override\n\tpublic void addExperiencia(\n\t\t\tsimulaSAAB.modeloSimulacion.comunicacion.Experiencia e) {\n\t\t\n\t}", "private IOferta buildOfertaEjemplo7() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoEnSegundoProducto(\"11-111-1111\", \"11-111-1112\", 50);\n\t\treturn new OfertaDinero(\"50% en Sprite, comprando 1 Coca\", condicion,\tdescuento);\n\t}", "public static void instanciarCreencias() {\n\t\tfor(int i =0; i < GestorPartida.getContJugadores(); i++) {\n\t\t\t\n\t\t\tGestorPartida.jugadores[i].setCreencias(new Creencias(GestorPartida.jugadores, GestorPartida.objetoJugador, GestorPartida.objetoSala, i)); \n\t\t}\n\t}", "@Test\n\tpublic void testCrearEjercicio1(){\n\t\tEjercicio ej = new Ejercicio(1, true, Plataforma.getFechaActual().plusDays(1), Plataforma.getFechaActual().plusDays(4),\n\t\t\t\ttema1, \"Ejercicio1\", true, mates);\n\t\t\n\t\tassertTrue(tema1.getSubcontenido().contains(ej));\n\t\tassertEquals(ej.getAsignatura(), mates);\n\t\tassertEquals(ej.getEstado(), EstadoEjercicio.ESPERA);\n\t\tassertEquals(ej.getFechaFin(), Plataforma.getFechaActual().plusDays(4));\n\t\tassertEquals(ej.getFechaIni(), Plataforma.getFechaActual().plusDays(1));\n\t\tassertTrue(ej.getNotaMedia() == 0);\n\t\tassertTrue(ej.getNumTerminados() == 0);\n\t\tassertTrue(ej.getPadre() == tema1);\n\t\tassertTrue(ej.getPeso() == 1);\n\t\tassertEquals(ej.getTitulo(), \"Ejercicio1\");\n\t}", "public Funcionalidad() {\n Cajero cajero1 = new Cajero(\"Pepe\", 2);\n empleados.put(cajero1.getID(), cajero1);\n Reponedor reponedor1 = new Reponedor(\"Juan\", 3);\n empleados.put(reponedor1.getID(), reponedor1);\n Producto producto1 = new Producto(\"Platano\", 10, 8);\n productos.add(producto1);\n Perecedero perecedero1 = new Perecedero(LocalDateTime.now(), \"Yogurt\", 10, 8);\n }", "private IOferta buildOfertaEjemplo4() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoLlevaXPagaY(\"11-111-1111\", 3, 2);\n\t\treturn new OfertaDinero(\"Lleva 3 paga 2 en Coca-Cola\", condicion,\n\t\t\t\tdescuento);\n\t}", "private IOferta buildOfertaEjemplo1() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tPredicates.equalTo(MedioPago.EFECTIVO),\n\t\t\t\tnew ExtraerMedioPago());\n\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoPorcentual(5.0f),\n\t\t\t\tnew ExtraerTotalBruto());\n\n\t\treturn new OfertaDinero(\"5% descuento pago en efectivo\", condicion, descuento);\n\t}", "public CorreoElectronico() {\n }", "private IOferta buildOfertaEjemplo2() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tnew PredicadoDiaSemana(Calendar.THURSDAY),\n\t\t\t\tnew ExtraerFechaCreacion());\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoPorcentual(10.0f), \n\t\t\t\tnew ExtraerTotalBrutoProductos(new PredicadoRubro(\"11\")));\n\t\treturn new OfertaDinero(\"10% descuento comida los jueves\", condicion,\n\t\t\t\tdescuento);\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public Examen generarExamenTest() {\r\n\r\n\t\tPregunta pregunta;\r\n Ejercicio ejercicio;\r\n\t\tMateria materia = new Materia(\"Disenio\");\r\n\t\tExamen ex;\r\n\r\n\t\t// Creo lotes de prueba de Unidades Tematicas\r\n\t\tSet<String> unidadesAbarcadas = new HashSet<String>();\r\n\t\r\n\t\tunidadesAbarcadas.add(\"Patrones\");\r\n\t\tunidadesAbarcadas.add(\"Ciclos de Vida\");\r\n\t\tunidadesAbarcadas.add(\"Estructurado\");\r\n\t\tunidadesAbarcadas.add(\"DFDTR\");\t\r\n\t\r\n\t\tpregunta = new ADesarrollar(\"Patrones\", 75, \"Por que necesitamos a los patrones en las estancias?\", ItemExamen.TiposItem.TEORICO); \r\n\t\tmateria.addItem(pregunta);\r\n\r\n\t\tpregunta = new ADesarrollar(\"Estructurado\", 10, \"Alguien usa estructurado hoy en Dia?\", ItemExamen.TiposItem.TEORICO); \r\n\t\tmateria.addItem(pregunta);\r\n\r\n\t\tpregunta = new ADesarrollar(\"Estructurado\", 40, \"Cuantos modos de Cohesion Existe?\", ItemExamen.TiposItem.TEORICO); \r\n\t\tmateria.addItem(pregunta);\r\n\r\n\t\tejercicio = new Ejercicio(\"Estructurado\", 75, \"Que es un trampolin de datos?\", ItemExamen.TiposItem.PRACTICO); \r\n\t\tmateria.addItem(ejercicio);\r\n\r\n\t\tejercicio = new Ejercicio(\"Ciclos de Vida\", 10, \"Alguien usa estructurado hoy en Dia?\", ItemExamen.TiposItem.PRACTICO); \r\n\t\tmateria.addItem(ejercicio);\r\n\t \r\n\t\tejercicio = new Ejercicio(\"Ciclos de Vida\", 75, \"Indique los pasos que aplicaria con que ciclo de vida para implementar un Sistema Contable\", ItemExamen.TiposItem.PRACTICO); \r\n\t\tmateria.addItem(ejercicio);\r\n \r\n \r\n\t\tPrototipoItem<Pregunta> protoPregunta = new PrototipoItem<Pregunta>(Pregunta.class);\r\n\t\tprotoPregunta.setTipo(TiposItem.TEORICO);\r\n\t\tPrototipoItem<Ejercicio> protoEjercicio = new PrototipoItem<Ejercicio>(Ejercicio.class);\r\n\t\tprotoEjercicio.setTipo(TiposItem.PRACTICO);\r\n\t\tExamenBuilder builder = new ExamenBuilder(materia,unidadesAbarcadas,Calendar.getInstance());\r\n\t\tbuilder.putPrototipo(protoPregunta, 3);\r\n\t\tbuilder.putPrototipo(protoEjercicio, 3);\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tex = builder.generarExamen();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// No se controlan errores de creacion ya que se genera el examen para el Test\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\treturn ex;\r\n\r\n\t}", "public Equipas() {\r\n\t\t\r\n\t}", "public Ficha_epidemiologia_n13 obtenerFichaEpidemiologia() {\n\t\t\t\t\n\t\t\t\tFicha_epidemiologia_n13 ficha_epidemiologia_n13 = new Ficha_epidemiologia_n13();\n\t\t\t\tficha_epidemiologia_n13.setCodigo_empresa(empresa.getCodigo_empresa());\n\t\t\t\tficha_epidemiologia_n13.setCodigo_sucursal(sucursal.getCodigo_sucursal());\n\t\t\t\tficha_epidemiologia_n13.setCodigo_ficha(tbxCodigo_ficha.getValue());\n\t\t\t\tficha_epidemiologia_n13.setIdentificacion(tbxIdentificacion.getValue());\n\t\t\t\tficha_epidemiologia_n13.setFecha_creacion(new Timestamp(dtbxFecha_creacion.getValue().getTime()));\n\t\t\t\tficha_epidemiologia_n13.setCodigo_diagnostico(\"Z000\");\n\t\t\t\tficha_epidemiologia_n13.setFiebre(chbFiebre.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setMialgias(chbMialgias.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setCefalea(chbCefalea.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setArtralgias(chbArtralgias.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setVomito(chbVomito.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setNausea(chbNausea.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setDolor_retrocular(chbDolor_retrocular.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setHiperemia_conjuntival(chbHiperemia_conjuntival.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setSecrecion_conjuntival(chbSecrecion_conjuntival.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setDolor_pantorrillas(chbDolor_pantorrillas.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setDiarrea(chbDiarrea.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setDolor_abdominal(chbDolor_abdominal.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setHemoptisis(chbHemoptisis.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setMelenas(chbMelenas.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setEpistaxis(chbEpistaxis.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setErupcion(chbErupcion.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setHematuria(chbHematuria.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setTomiquete_postiva(chbTomiquete_postiva.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setEsplenomegalia(chbEsplenomegalia.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setSignos_meningeos(chbSignos_meningeos.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setDisnea(chbDisnea.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setTos(chbTos.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setInsuficiencia_respiratoria(chbInsuficiencia_respiratoria.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setHepatomeglia(chbHepatomeglia.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setIctericia(chbIctericia.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setInsuficiencia_hepatica(chbInsuficiencia_hepatica.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setInsuficiencia_renal(chbInsuficiencia_renal.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setVacuna_fiebre_amarilla(rdbVacuna_fiebre_amarilla.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setDosis_fiebre_amarilla(ibxDosis_fiebre_amarilla.getValue()!=null ? ibxDosis_fiebre_amarilla.getValue() + \"\" : \"\");\n\t\t\t\tficha_epidemiologia_n13.setVacuna_hepatitis_a(rdbVacuna_hepatitis_a.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setDosis_hepatitis_a(ibxDosis_hepatitis_a.getValue()!=null?ibxDosis_hepatitis_a.getValue() + \"\" : \"\");\n\t\t\t\tficha_epidemiologia_n13.setVacuna_hepatitis_b(rdbVacuna_hepatitis_b.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setDosis_hepatitis_b(ibxDosis_hepatitis_b.getValue()!=null?ibxDosis_hepatitis_b.getValue() + \"\" : \"\");\n\t\t\t\tficha_epidemiologia_n13.setVacuna_leptospirosis(rdbVacuna_leptospirosis.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setDosis_leptospirosis(ibxDosis_leptospirosis.getValue()!=null?ibxDosis_leptospirosis.getValue() + \"\" : \"\");\n\t\t\t\tficha_epidemiologia_n13.setPerros(chbPerros.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setGatos(chbGatos.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setBovinos(chbBovinos.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setEquinos(chbEquinos.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setPorcions(chbPorcions.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setNinguno(chbNinguno.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setOtros_animal(chbOtros_animal.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setCual_otro(tbxCual_otro.getValue());\n\t\t\t\tficha_epidemiologia_n13.setContacto_animales(rdbContacto_animales.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setRatas_domicilio(rdbRatas_domicilio.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setRatas_trabajo(rdbRatas_trabajo.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setAcueducto(chbAcueducto.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setPozo(chbPozo.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setRio(chbRio.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setTanque_almacenamiento(chbTanque_almacenamiento.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setAlcantarillas(rdbAlcantarillas.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setInundaciones(rdbInundaciones.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setContacto_aguas_estancadas(rdbContacto_aguas_estancadas.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setAntecedentes_deportivos(rdbAntecedentes_deportivos.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setDisposicion_residuos(rdbDisposicion_residuos.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setTiempo_almacenamiento(rdbTiempo_almacenamiento.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setPersonas_sintomatologia(rdbPersonas_sintomatologia.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setLeucocitosis(chbLeucocitosis.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setLeucopenia(chbLeucopenia.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setNeutrofilia(chbNeutrofilia.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setNeutropenia(chbNeutropenia.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setLinfocitocis(chbLinfocitocis.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setTrombocitosis(chbTrombocitosis.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setTrombocitopenia(chbTrombocitopenia.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setHemoconcentracion(chbHemoconcentracion.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setAlteracion_trasaminasas(chbAlteracion_trasaminasas.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setAlteracion_bilirrubinas(chbAlteracion_bilirrubinas.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setAlteracion_bun(chbAlteracion_bun.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setAlteracion_creatinina(chbAlteracion_creatinina.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setCpk_elevada(chbCpk_elevada.isChecked());\n\t\t\t\tficha_epidemiologia_n13.setDengue(rdbDengue.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setMalaria(rdbMalaria.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setHepatitis_a(rdbHepatitis_a.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setHepatitis_b(rdbHepatitis_b.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setHepatitis_c(rdbHepatitis_c.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setFiebre_amarilla(rdbFiebre_amarilla.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setTipo_muestra(rdbTipo_muestra.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setDestino_muestra(rdbDestino_muestra.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setOtra_muestra(tbxOtra_muestra.getValue());\n\t\t\t\tficha_epidemiologia_n13.setCultivo(rdbCultivo.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setHistoquimica(rdbHistoquimica.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setPcr(rdbPcr.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setElisa(rdbElisa.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setMicroaglutinacion(rdbMicroaglutinacion.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setPareadas(rdbPareadas.getSelectedItem().getValue().toString());\n\t\t\t\t\n\t\t\t\tif (dtbxFecha_muestra1.getValue() != null) {\n\t\t\t\t\tficha_epidemiologia_n13.setFecha_muestra1(new Timestamp(dtbxFecha_muestra1.getValue().getTime()));\n\t\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tficha_epidemiologia_n13.setFecha_muestra1(null);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tif (dtbxFecha_muestra2.getValue() != null) {\n\t\t\t\t\tficha_epidemiologia_n13.setFecha_muestra2(new Timestamp(dtbxFecha_muestra2.getValue().getTime()));\n\t\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tficha_epidemiologia_n13.setFecha_muestra2(null);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tficha_epidemiologia_n13.setIdentificacion_serogrupos(rdbIdentificacion_serogrupos.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setTitulo_muestra1(tbxTitulo_muestra1.getValue());\n\t\t\t\tficha_epidemiologia_n13.setTitulo_muestra2(tbxTitulo_muestra2.getValue());\n\t\t\t\tficha_epidemiologia_n13.setTratamiento(rdbTratamiento.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n13.setCual_tratamiento(tbxCual_tratamiento.getValue());\n\t\t\t\tficha_epidemiologia_n13.setTratamiento_antibiotico(tbxTratamiento_antibiotico.getValue());\n\t\t\t\tficha_epidemiologia_n13.setDosis(ibxDosis.getValue()!=null?ibxDosis.getValue() + \"\" : \"\");\n\t\t\t\tficha_epidemiologia_n13.setTiempo(ibxTiempo.getValue()!=null?ibxTiempo.getValue() + \"\" : \"\");\n\t\t\t\tficha_epidemiologia_n13.setCodigo_medico(tbxCodigo_medico.getValue());\n\t\t\t\tficha_epidemiologia_n13.setCreacion_date(new Timestamp(new GregorianCalendar().getTimeInMillis()));\n\t\t\t\tficha_epidemiologia_n13.setUltimo_update(new Timestamp(new GregorianCalendar().getTimeInMillis()));\n\t\t\t\tficha_epidemiologia_n13.setCreacion_user(usuarios.getCodigo().toString());\n\t\t\t\tficha_epidemiologia_n13.setDelete_date(null);\n\t\t\t\tficha_epidemiologia_n13.setUltimo_user(usuarios.getCodigo().toString());\n\t\t\t\tficha_epidemiologia_n13.setDelete_user(null);\n\t\t\t\tficha_epidemiologia_n13.setOtro_serogrupo(tbxOtro_serogrupo.getValue());\n\n\t\t\t\treturn ficha_epidemiologia_n13;\n\t\t\t \n\t}", "private void criarConexao(){\n try{\n testeOpenHelper = new TesteOpenHelper(this);\n conexao = testeOpenHelper.getWritableDatabase();\n Toast.makeText(this,\"Conexao executada com sucesso\", Toast.LENGTH_SHORT).show();\n produtoRepositorio = new ProdutoRepositorio(conexao);\n }catch(SQLException e){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Erro\");\n dlg.setMessage(e.getMessage());\n dlg.setNeutralButton(\"Ok\", null);\n dlg.show();\n Toast.makeText(this,\"ERRO na conexao\", Toast.LENGTH_LONG).show();\n }\n }", "private IOferta buildOfertaEjemplo6() {\n\t\tPredicate<Compra> condicion = new PredicadoCupon(\"11111\");\n\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoFijo<>(10.0f),\n\t\t\t\tnew ExtraerTotalBruto());\n\n\t\treturn new OfertaDinero(\"$10 cupon\", condicion, descuento);\n\t}", "public Excellon ()\n {}", "public void annuler(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }", "public ProductosInventario(String codigoDeBarras, String nombre, Empresa empresa, int presentacion, int iva, int costo, int cantidad, String tipo, int precio) {\n\t\tthis.producto = new Producto(codigoDeBarras, nombre, empresa, presentacion, iva, costo,precio);\n\t\tthis.cantidad = 0;\n\t\tsetCantidad(cantidad);\n\t\tthis.tipo = tipo;\n\t}", "public Equipos() {\n\t\tthis(\"equipos\", null);\n\t}", "public Empleado() { }", "public static void crearPartida() throws FileNotFoundException, IOException, ExcepcionesFich {\n\t\tLecturaFicheros.AllLecture(\"C:\\\\Users\\\\Erick\\\\pruebaPOO.txt\");\n\t\tinterfaz = new GUI(0);\t\t\n\t}", "private void registrarAnexoExcepcion(RegistroRadicarExcepcionDTO registroRadicarExcepcionDTO)\n throws CirculemosAlertaException {\n logger.debug(\"CoactivoEJB.registrarAnexoExcepcion(RegistroRadicarExcepcionDTO)\");\n // Calculo de ruta: anno/mes/proceso\n String ruta = \"c2/anexosExcepcion/\" + Calendar.getInstance().get(Calendar.YEAR) + \"/\"\n + Calendar.getInstance().get(Calendar.MONTH) + \"/Proceso-\"\n + registroRadicarExcepcionDTO.getRadicarExcepcionDTO().getCoactivoDTO().getProceso().getId();\n\n for (RegistroArchivoExcepcionDTO registroArchivoExcepcionDTO : registroRadicarExcepcionDTO\n .getRegistroArchivoExcepcionDTOs()) {\n ArchivoExcepcion archivoExcepcion = new ArchivoExcepcion();\n archivoExcepcion.setFechaRegistro(Calendar.getInstance().getTime());\n archivoExcepcion.setNombreArchivo(registroArchivoExcepcionDTO.getArchivoTransportableDTO().getNombre());\n archivoExcepcion.setFalloExcepcion(registroArchivoExcepcionDTO.isFalloExcepcion());\n\n registroArchivoExcepcionDTO.getArchivoTransportableDTO().setRuta(ruta);\n OpcionGestorFileSystem ogfs = new OpcionGestorFileSystem();\n ogfs.setUbicacion(ruta);\n\n archivoExcepcion.setNumeroArchivo(irRepositorioArchivo.registrarDocumento(null,\n registroArchivoExcepcionDTO.getArchivoTransportableDTO(), ogfs));\n\n RadicarExcepcion radicarExcepcion = new RadicarExcepcion();\n radicarExcepcion.setIdRadicarExcepcion(\n registroRadicarExcepcionDTO.getRadicarExcepcionDTO().getIdRadicarExcepcion());\n archivoExcepcion.setRadicarExcepcion(radicarExcepcion);\n em.persist(archivoExcepcion);\n }\n\n }", "public Hipermercado(){\r\n this.clientes = new CatalogoClientes();\r\n this.produtos = new CatalogoProdutos();\r\n this.numFiliais = 3;\r\n this.faturacao = new Faturacao(this.numFiliais);\r\n this.filial = new ArrayList<>(this.numFiliais);\r\n for (int i = 0; i < this.numFiliais; i++){\r\n this.filial.add(new Filial());\r\n }\r\n \r\n this.invalidas = 0;\r\n }", "public Exposicao() {\n obras = new TreeSet<Obra>();\n }", "public void inicializaValoresAsignacionCentrosDeCosto() throws Exception {\n cntEntidad = new CntEntidad();\n cntEntidad.setDescripcion(descripcion);\n if (mascaraNuevoOpcion.equals(\"N\")) {\n cntEntidad.setMascaraGenerada(concatenaNuevaMascaraDatosVista(mascaraNivelPosicionUno, nivelIn, mascaraNivelPosicionDos));\n } else {\n cntEntidad.setMascaraGenerada(concatenaNuevaMascaraDatosVista(mascaraSubNivelPosicionUno, subNivelIn, mascaraSubNivelPosicionDos));\n }\n }", "public AgenteEstAleatorio() {\r\n }", "public InventarioFile(){\r\n \r\n }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public Empresa() {\n super();\n this.nif = 0;\n this.raio = 0.0;\n this.precoPorKm = 0.0;\n this.precoPorPeso = 0.0;\n this.precoPorHora = 0.0;\n this.available = false;\n this.certificado = false;\n this.historico = new Historico();\n this.pe = null;\n }", "Vaisseau_estAbscisseCouverte createVaisseau_estAbscisseCouverte();", "public Profesor (String apellidos, String nombre, String nif, Persona.sexo genero, int edad, int expediente){\n this.apellidos = apellidos;\n this.nombre = nombre;\n this.nif = nif;\n this.genero = genero;\n this.edad = edad;\n this.expediente = expediente;\n }", "Compuesta createCompuesta();", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "public Prova() {}", "@Test(expected = Exception.class)\n public void testCSesionAgregarLiena2() throws Exception {\n System.out.println(\"testCSesionAgregarLiena Es Proveedor\");\n CSesion instance = new CSesion();\n instance.inicioSesion(\"[email protected]\", \"tim123\");\n instance.agregaLinea(1, 2);\n }", "public GestioneApplicazione() {\n }", "public void nouveau(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }", "public Profesional(int aniosExperiencia, String departamento,\n\t\t\tString titulo, String fechaIngreso) {\n\t\tsuper();\n\t\tthis.aniosExperiencia = aniosExperiencia;\n\t\tthis.departamento = departamento;\n\t\tthis.titulo = titulo;\n\t\tthis.fechaIngreso = fechaIngreso;\n\t}", "@Test\n\tpublic void testCrearEjercicio3(){\n\t\tEjercicio ej = new Ejercicio(1, true, Plataforma.getFechaActual().minusDays(3), Plataforma.getFechaActual().plusDays(2),\n\t\t\t\ttema1, \"Ejercicio1\", true, mates);\n\t\t\n\t\tassertEquals(ej.getFechaIni(), ej.getFechaIniDefecto());\n\t\tassertEquals(ej.getFechaFin(), ej.getFechaFinDefecto());\n\t\tassertTrue(tema1.getSubcontenido().contains(ej));\n\t}", "Compleja createCompleja();", "@Test\n\tpublic void testCrearEjercicio2(){\n\t\tEjercicio ej = new Ejercicio(1, true, Plataforma.getFechaActual().plusDays(3), Plataforma.getFechaActual().plusDays(2),\n\t\t\t\ttema1, \"Ejercicio1\", true, mates);\n\t\t\n\t\tassertEquals(ej.getFechaIni(), ej.getFechaIniDefecto());\n\t\tassertEquals(ej.getFechaFin(), ej.getFechaFinDefecto());\n\t\tassertTrue(tema1.getSubcontenido().contains(ej));\n\t}", "OperacionColeccion createOperacionColeccion();", "public Facturacion() {\n }", "public Alojamiento() {\r\n\t}", "public BaseDatosProductos iniciarProductos() {\n\t\tBaseDatosProductos baseDatosProductos = new BaseDatosProductos();\n\t\t// construcion datos iniciales \n\t\tProductos Manzanas = new Productos(1, \"Manzanas\", 8000.0, 65);\n\t\tProductos Limones = new Productos(2, \"Limones\", 2300.0, 15);\n\t\tProductos Granadilla = new Productos(3, \"Granadilla\", 2500.0, 38);\n\t\tProductos Arandanos = new Productos(4, \"Arandanos\", 9300.0, 55);\n\t\tProductos Tomates = new Productos(5, \"Tomates\", 2100.0, 42);\n\t\tProductos Fresas = new Productos(6, \"Fresas\", 4100.0, 3);\n\t\tProductos Helado = new Productos(7, \"Helado\", 4500.0, 41);\n\t\tProductos Galletas = new Productos(8, \"Galletas\", 500.0, 8);\n\t\tProductos Chocolates = new Productos(9, \"Chocolates\", 3500.0, 806);\n\t\tProductos Jamon = new Productos(10, \"Jamon\", 15000.0, 10);\n\n\t\t\n\n\t\tbaseDatosProductos.agregar(Manzanas);\n\t\tbaseDatosProductos.agregar(Limones);\n\t\tbaseDatosProductos.agregar(Granadilla);\n\t\tbaseDatosProductos.agregar(Arandanos);\n\t\tbaseDatosProductos.agregar(Tomates);\n\t\tbaseDatosProductos.agregar(Fresas);\n\t\tbaseDatosProductos.agregar(Helado);\n\t\tbaseDatosProductos.agregar(Galletas);\n\t\tbaseDatosProductos.agregar(Chocolates);\n\t\tbaseDatosProductos.agregar(Jamon);\n\t\treturn baseDatosProductos;\n\t\t\n\t}", "Exploitation createExploitation();", "private static void teste01 () {\n\t\tEstoque e = new Estoque();\n\t\n\t\te.setCodigo(1);\n\t\te.setPreco(new Float(10));\n\t\te.setQuantidade(1);\n\t\te.setFornecedor(\"provider\");\n\t\n\t\te.insert();\n\n\t\tlog.debug(\"Estoque inserido.\");\n\t}", "public Ficha_Ingreso_Egreso() {\n initComponents();\n limpiar();\n bloquear();\n \n }", "public Empleado(String nombre, String departamento, String posicion, int salario)\n {\n // initialise instance variables\n this.nombre=nombre;\n this.departamento=departamento;\n this.posicion=posicion;\n this.salario=salario;\n \n }", "public Ficha_epidemiologia_n3 obtenerFichaEpidemiologia() {\n\t\t\n\t\t\t\tFicha_epidemiologia_n3 ficha_epidemiologia_n3 = new Ficha_epidemiologia_n3();\n\t\t\t\tficha_epidemiologia_n3.setCodigo_empresa(empresa.getCodigo_empresa());\n\t\t\t\tficha_epidemiologia_n3.setCodigo_sucursal(sucursal.getCodigo_sucursal());\n\t\t\t\tficha_epidemiologia_n3.setCodigo(\"Z000\");\n\t\t\t\tficha_epidemiologia_n3.setCodigo_ficha(tbxCodigo_ficha\n\t\t\t\t\t\t.getValue());\n\t\t\t\tficha_epidemiologia_n3.setFecha_ficha(new Timestamp(dtbxFecha_ficha.getValue().getTime()));\n\t\t\t\tficha_epidemiologia_n3.setNro_identificacion(tbxNro_identificacion.getValue());\n\t\t\t\n\t\t\t\t//ficha_epidemiologia_n3\n\t\t\t\t\t//\t.setNro_identificacion(tbxNro_identificacion.getValue());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setConoce_y_o_ha_sido_picado_por_pito(rdbConoce_y_o_ha_sido_picado_por_pito\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setTransfuciones_sanguineas(rdbTransfuciones_sanguineas\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setSometido_transplante(rdbSometido_transplante\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setHijo_de_madre_cero_positiva(rdbHijo_de_madre_cero_positiva\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setEmbarazo_actual(rdbEmbarazo_actual\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setHa_sido_donante(rdbHa_sido_donante\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setTipo_techo(rdbTipo_techo\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setTipo_paredes(rdbTipo_paredes\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setEstrato_socio_economico(rdbEstrato_socio_economico\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setEstado_clinico(rdbEstado_clinico\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setClasificacion_de_caso(rdbClasificacion_de_caso\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setFiebre(chbFiebre.isChecked() ? \"S\"\n\t\t\t\t\t\t: \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setDolor_toracico_cronico(chbDolor_toracico_cronico\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setDisnea(chbDisnea.isChecked() ? \"S\"\n\t\t\t\t\t\t: \"N\");\n\t\t\t\tficha_epidemiologia_n3.setPalpitaciones(chbPalpitaciones\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setMialgias(chbMialgias.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setArtralgias(chbArtralgias.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setEdema_facial(chbEdema_facial\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setEdema_miembros_inferiores(chbEdema_miembros_inferiores\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setDerrame_pericardico(chbDerrame_pericardico\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setHepatoesplenomegalia(chbHepatoesplenomegalia\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setAdenopatias(chbAdenopatias\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setChagoma(chbChagoma.isChecked() ? \"S\"\n\t\t\t\t\t\t: \"N\");\n\t\t\t\tficha_epidemiologia_n3.setFalla_cardiaca(chbFalla_cardiaca\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setPalpitacion_taquicardia(chbPalpitacion_taquicardia\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setDolor_toracico_agudo(chbDolor_toracico_agudo\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setBrandicardia(chbBrandicardia\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setSincope_o_presincope(chbSincope_o_presincope\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setHipotension(chbHipotension\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setDisfagia(chbDisfagia.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setGota_gruesa_frotis_de_sangre_periferica(rdbGota_gruesa_frotis_de_sangre_periferica\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setMicrohematocrito_examen_fresco(rdbMicrohematocrito_examen_fresco\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setStrout(rdbStrout.getSelectedItem()\n\t\t\t\t\t\t.getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setElisa_igg_chagas(rdbElisa_igg_chagas\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setIfi_igg_chagas(rdbIfi_igg_chagas\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setHai_chagas(rdbHai_chagas\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setElectrocardiograma(rdbElectrocardiograma\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setEcocardiograma(rdbEcocardiograma\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setRayos_x_de_torax_indice_toracico(rdbRayos_x_de_torax_indice_toracico\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setHolter(rdbHolter.getSelectedItem()\n\t\t\t\t\t\t.getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setTratamiento_etiologico(rdbTratamiento_etiologico\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setTratamiento_sintomatico(rdbTratamiento_sintomatico\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setPosible_via_transmision(rdbPosible_via_transmision\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setRomana(chbRomana.isChecked() ? \"S\"\n\t\t\t\t\t\t: \"N\");\n\t\t\t\t\n\t\t\t\tficha_epidemiologia_n3.setCodigo_empresa(empresa\n\t\t\t\t\t\t.getCodigo_empresa());\n\t\t\t\t\n\t\t\t\tficha_epidemiologia_n3.setCodigo_sucursal(sucursal\n\t\t\t\t\t\t.getCodigo_sucursal());\n\t\t\t\t// ficha_epidemiologia_n3.setCodigo(tbxCodigo.getValue());\n\t\t\t\tficha_epidemiologia_n3.setResultado1(tbxResultado1.getValue());\n\t\t\t\tficha_epidemiologia_n3.setResultado2(tbxResultado2.getValue());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setSemanas_de_embarazo((ibxSemanas_de_embarazo\n\t\t\t\t\t\t\t\t.getValue() != null ? ibxSemanas_de_embarazo\n\t\t\t\t\t\t\t\t.getValue() : 0));\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setNumero_familiares_con_changa((ibxNumero_familiares_con_changa\n\t\t\t\t\t\t\t\t.getValue() != null ? ibxNumero_familiares_con_changa\n\t\t\t\t\t\t\t\t.getValue() : 0));\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setConstipacion_cronica(chbConstipacion_cronica\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setCreacion_date(new Timestamp(\n\t\t\t\t\t\tnew GregorianCalendar().getTimeInMillis()));\n\t\t\t\tficha_epidemiologia_n3.setUltimo_update(new Timestamp(\n\t\t\t\t\t\tnew GregorianCalendar().getTimeInMillis()));\n\t\t\t\tficha_epidemiologia_n3.setCreacion_user(usuarios.getCodigo()\n\t\t\t\t\t\t.toString());\n\t\t\t\tficha_epidemiologia_n3.setDelete_date(null);\n\t\t\t\tficha_epidemiologia_n3.setUltimo_user(usuarios.getCodigo()\n\t\t\t\t\t\t.toString());\n\t\t\t\tficha_epidemiologia_n3.setDelete_user(null);\n\t\t\t\tficha_epidemiologia_n3.setOtro_tipo_techo(tbxotro_tipo_techo.getValue());\n\n\t\t\t\t\n\t\treturn ficha_epidemiologia_n3;\n\t\t}", "public Comercial(String nombre ,int edad,double salario,double comision){\r\n\t\tsuper(nombre,edad,salario);\r\n\t\tthis.Comision=comision;\r\n\t}", "public Productos() {\n super();\n // TODO Auto-generated constructor stub\n }", "Operacion createOperacion();", "public Echec() {\n initComponents();\n chargerImages();\n IAAbstraite ia = choixModeJeu();\n String config = chargerConfiguration();\n \n if(config == null)\n {\n this.partie = new Partie(ia);\n }\n else\n {\n try\n {\n this.partie = new Partie(config, ia);\n }\n catch(Exception e)\n {\n e.printStackTrace();\n JOptionPane.showMessageDialog(null, \"Impossible de charger la configuration : \" + e.getMessage(), \"Erreur de lecture de la configuration\", JOptionPane.ERROR_MESSAGE);\n this.partie = new Partie(ia);\n }\n }\n \n updatePlateau();\n }", "public void GenerarAnexos() throws FileNotFoundException, DocumentException {\r\n\t\t\tSystem.out.println(\"Metodo generar anexos\");\r\n\t\t\tTestConexion conexionbbdd = new TestConexion();\r\n\t\t\t\r\n\t\t\tAlumno selectedAlumno = Tabla.getSelectionModel().getSelectedItem();\r\n\t\t\t\r\n\t\t\tAnexoI anexoI = conexionbbdd.ConsultaAnexoI(selectedAlumno.dni_alum);\r\n\t\t\tAnexoII anexoII =conexionbbdd.ConsultaAnexoII(selectedAlumno.dni_alum);\r\n\t\t\tanexoI.generarAnexoI(\"AnexoI\", \"C:\\\\Users\\\\Laura\\\\Desktop\\\\DAW1\\\\PROYECTO\\\\ANEXOS\\\\\");\r\n\t\t\tanexoII.generarAnexoII(\"AnexoII\", \"C:\\\\Users\\\\Laura\\\\Desktop\\\\DAW1\\\\PROYECTO\\\\ANEXOS\\\\\");\r\n\r\n\t\t}", "public ProyectoInfraestructura crearProyectoInfraestructura(Proponente p,String nombre, String descrL, String descC , double cost,String croquis ,String imagen,HashSet<String> distritos){\r\n\t\tProyectoInfraestructura proyecto;\r\n\t\t\r\n\t\tif(p.getClass().getSimpleName().equals(\"Colectivo\")) {\r\n\t\t\tColectivo c = (Colectivo) p;\r\n\t\t\tproyecto = new ProyectoInfraestructura(p,c.getUsuarioRepresentanteDeColectivo() , nombre, descrL, descC , cost , croquis , imagen,distritos);\r\n\t\t\t\r\n\t\t}else {//Usuario\r\n\t\t\tUsuario u = (Usuario) p;\r\n\t\t\tproyecto = new ProyectoInfraestructura(u,u , nombre, descrL, descC , cost , croquis , imagen,distritos);\t\t\t\r\n\t\t}\r\n\t\tp.proponerProyecto(proyecto);\r\n\t\t\r\n\t\tthis.proyectos.add(proyecto);\r\n\t\tthis.lastProjectUniqueID++;\r\n\t\treturn proyecto;\r\n\t\t\r\n\t}", "Negacion createNegacion();", "public abstract Anuncio creaAnuncioTematico();", "public LecturaPorEvento() \r\n {\r\n }", "public Veiculo() {\r\n\r\n }", "public CrearQuedadaVista() {\n }", "public Factura() {\r\n }", "public Factura() {\r\n }", "Vaisseau_estOrdonneeCouverte createVaisseau_estOrdonneeCouverte();", "public Comercial(String nombre, String apellido, int edad, double salario, double comision)\n {\n \tsuper(nombre, apellido, edad, salario);\n \tthis.comision=comision;\n }", "public Elemento crearElementos(String contenido) {\n\t\tTitulo unTitulo = new Titulo();\n\t\tSubTitulo unSubTitulo = new SubTitulo();\n\t\tImagen unaImagen = new Imagen();\n\t\tSeccion unaSeccion = new Seccion();\n\t\tLista unaLista = new Lista();\n\t\tTextoPlano textoPlano = new TextoPlano();\n\n\t\t// Se agregan los elementos a la cadena\n\t\tthis.setSiguiente(unTitulo);\n\t\tunTitulo.setSiguiente(unSubTitulo);\n\t\tunSubTitulo.setSiguiente(unaImagen);\n\t\tunaImagen.setSiguiente(unaSeccion);\n\t\tunaSeccion.setSiguiente(unaLista);\n\t\tunaLista.setSiguiente(textoPlano);\n\n\t\tElemento elemento = this.siguiente.crearElemento(contenido);\n\n\t\treturn elemento;\n\t}", "public Espacio() {\n dib=new Dibujo(\"Simulacion de satelites\", 800,800);\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta();\n }", "public Vehiculo() {\r\n }", "public Estado() {\n }", "@Test(expected = Exception.class)\n public void testCSesionComentarCF1() throws Exception {\n System.out.println(\"testCSesionComentarCF No logue\");\n CSesion instance = new CSesion();\n instance.ComentarioConFecha(1, \"hola\", new Date());\n }", "public interface ExceInte {\n /**\n * \n * Se crea este metodo para realizar la escritura de un archivo en excel, \n * apartir de un formato o plantilla existente en la hoja de EXCEL\n * @param pathPlan ruta de la plantilla\n * @param pathDeex ruta destino donde se va almacenar la plantilla. \n * @param pathFida ruta del archivo de datos\n * @param separato separador que se usa para identificar las columnas en el\n * archivo de datos\n * \n * @throws Exception indica que el metodo genera excepciones que deben\n * ser capturadas para identificar cuando la misma no funcione bien.\n */\n public void writExce(String pathPlan,String pathDeex,String pathFida,String separato) throws Exception;\n \n}", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "public InventarioControlador() {\n }", "private void criarConexao(){\n\n try {\n\n clientOpenHelper = new ClientOpenHelper(this);\n\n conexao = clientOpenHelper.getWritableDatabase();\n\n Snackbar.make(layoutMain, R.string.Aviso, Snackbar.LENGTH_SHORT)\n .setAction(R.string.ok,null)\n .show();\n clienteRepositorio = new ClienteRepositorio(conexao);\n }catch (SQLException ex){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Error\");\n dlg.setMessage(ex.getMessage());\n dlg.setNeutralButton(\"OK\",null);\n dlg.show();\n }\n }", "Nexo createNexo();", "private void setUpFrom(){\n\t\tEPVentanaTemporal ven = new EPVentanaTemporal();\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\t//setemamos la ventana.\n\t\tven.setNombre(\"time_batch\");\n\t\tven.setValor(\"10\");\n\t\tven.setUnidadTemporal(\"seconds\");\n\t\tven.setPseudonombre(\"a1\");\n\t\tpro.setNombre(\"p4\");\n\t\tpro.setPseudonombre(\"\");\n\t\tpro.setVentana(ven);\n\t\texpresionesFrom.add(pro);\n\t}", "public Estado() {\r\n }", "public Estudiante() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public Contato() {\n }", "public CalculadoraException() {\r\n }", "public ElFicheroNoExisteException() {\n }", "public Equipo(String nombre, int presupuesto, int puntos) {\r\n this.nombre = nombre;\r\n this.presupuesto = presupuesto;\r\n this.puntos = puntos;\r\n }", "private Nota criarNota(){\n\n Nota nota = new Nota();\n nota.setTitulo(edtTituloNota.getText().toString());\n nota.setValor(Float.parseFloat(edtNotaAluno.getText().toString()));\n\n return nota;\n }", "private static Empleado generarDatosEmpleado(boolean nuevo) throws EmpleadoException, DireccionException {\n String codigoEmpleado = null;\n\n if (!nuevo) {\n System.out.print(\"Introduzca el valor de el codigo del empleado \");\n codigoEmpleado = teclado.nextLine();\n }\n\n System.out.print(\"Introduzca el valor de dni: \");\n String dni = teclado.nextLine();\n\n System.out.print(\"Introduzca el valor de nombre: \");\n String nombre = teclado.nextLine();\n\n System.out.print(\"Introduzca el valor de apellidos: \");\n String apellidos = teclado.nextLine();\n\n System.out.print(\"Introduzca el valor de fechaNacimiento: \");\n String fechaNacimiento = teclado.nextLine();\n\n System.out.print(\"Introduzca el valor de telefono: \");\n String telefono = teclado.nextLine();\n\n System.out.print(\"Introduzca el rango del empleado: \");\n String rango = teclado.nextLine();\n\n System.out.print(\"Introduzca el valor de contraseña: \");\n String contrasenia = teclado.nextLine();\n\n Empleado empleado = new Empleado(codigoEmpleado, nombre, apellidos, dni, fechaNacimiento, telefono, generarDatosDireccion(dni), rango, contrasenia);\n empleadoController.validarEmpleado(empleado);\n\n return empleado;\n }", "public static Expediente createEntity(EntityManager em) {\n Expediente expediente = new Expediente()\n .horarioEntrada(DEFAULT_HORARIO_ENTRADA)\n .horarioSaida(DEFAULT_HORARIO_SAIDA)\n .diaSemana(DEFAULT_DIA_SEMANA);\n return expediente;\n }", "public static Factura insertFactura(Date fecha_inicio_factura,\n float tiene_costo_plan,\n float monto_total,\n ArrayList<String> comentarios_factura,\n Producto producto){\n \n Factura miFactura = new Factura(fecha_inicio_factura,tiene_costo_plan, \n 0,comentarios_factura,producto);\n \n //factura.registrarFactura();\n \n return miFactura;\n }", "@Test\n public void testGetListaExposicoes() {\n System.out.println(\"getListaExposicoes\");\n List<Exposicao> listaExposicoes = new ArrayList<>();\n listaExposicoes.add(new Exposicao());\n RegistoExposicoes instance = new RegistoExposicoes(listaExposicoes);\n List<Exposicao> expResult = listaExposicoes;\n List<Exposicao> result = instance.getListaExposicoes();\n assertEquals(expResult, result);\n }", "public abstract Anuncio creaAnuncioIndividualizado();", "public AfiliadoVista() {\r\n }", "@Test(expected = Exception.class)\n public void testCSesionAgregarLiena3() throws Exception {\n System.out.println(\"testCSesionAgregarLiena cantidad Negativa\");\n CSesion instance = new CSesion();\n instance.inicioSesion(\"Dan\", \"danr\");\n instance.agregaLinea(-1, 2);\n }", "public EspacioXCultivos() {\n initComponents();\n }", "private IOferta buildOfertaEjemplo5() {\n\t\tPredicate<Compra> condicion = new PredicadoJubilado();\n\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoPorcentual(10.0f),\n\t\t\t\tnew ExtraerTotalBruto());\n\n\t\treturn new OfertaDinero(\"10% descuento jubilados\", condicion, descuento);\n\t}", "private Productos(int codigo, String descripcion, double precio) {\n this.codigo = codigo;\n this.descripcion = descripcion;\n this.precio = precio;\n }", "public void crearAtracciones(){\n \n //Añado atracciones tipo A\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new A();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo B\n for (int i = 0; i < 6 ; i++){\n Atraccion atraccion = new B();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo C\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new C();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo D\n for (int i = 0; i < 3 ; i++){\n Atraccion atraccion = new D();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo E\n for (int i = 0; i < 7 ; i++){\n Atraccion atraccion = new E();\n atracciones.add(atraccion);\n }\n \n }", "public PersistenciaCMT() {\n\n }", "public Esfinxe(char Id, Xogador xogador, Taboleiro taboleiro, InterfazGrafica interfaz) {\n super(Id, xogador, taboleiro, interfaz);\n\n this.historial = new ArrayList<>();\n this.interfaz = interfaz;\n }", "private void inizia() throws Exception {\n try { // prova ad eseguire il codice\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }" ]
[ "0.6503945", "0.584556", "0.58341", "0.5815336", "0.5807734", "0.5767613", "0.57621026", "0.5754809", "0.5719564", "0.5710972", "0.57033044", "0.56746805", "0.5664832", "0.56445634", "0.5643991", "0.56233454", "0.5569636", "0.5560335", "0.5556129", "0.5550098", "0.55426866", "0.5530235", "0.5520785", "0.5498189", "0.54975563", "0.54972064", "0.5496754", "0.54889286", "0.5486919", "0.5469634", "0.54579985", "0.5457869", "0.5457439", "0.54515976", "0.54430825", "0.54354054", "0.5431296", "0.5430225", "0.54237634", "0.5421415", "0.54183567", "0.5415796", "0.5380991", "0.537311", "0.53721344", "0.53711283", "0.53421223", "0.53411573", "0.5339215", "0.53251684", "0.53218275", "0.53181505", "0.5315575", "0.53153867", "0.53103447", "0.52935547", "0.52884144", "0.52877235", "0.5283998", "0.52834976", "0.5283291", "0.52825457", "0.52822816", "0.52804494", "0.52651167", "0.52651167", "0.526158", "0.5258837", "0.52576536", "0.52523357", "0.5242823", "0.5242688", "0.52422833", "0.5239434", "0.5237001", "0.52362454", "0.5225178", "0.5224062", "0.5221711", "0.5218529", "0.5200977", "0.5200052", "0.51994133", "0.5195794", "0.51853496", "0.5183963", "0.51801807", "0.5179226", "0.5169241", "0.5169046", "0.5166604", "0.51626736", "0.516147", "0.5155375", "0.5153873", "0.5145699", "0.51425546", "0.5132339", "0.5122555", "0.51192874" ]
0.5932808
1
This constructor is used to define a new client and handles all the methods for sending and receiving messages
public Client(ClientConfiguration conf) { clientMessages = new Stack<>(); serverMessages = new Stack<>(); this.conf = conf; encryptionSessionHashMap = new HashMap<>(); savedMessage = new HashMap<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Client() {}", "public Client() {\n }", "public Client() {\r\n\t// TODO Auto-generated constructor stub\r\n\t \r\n }", "public Client() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "ClientMessageSender() {\n\n\t}", "public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }", "public ChatClient() {\n\n }", "public Cliente() {\n\t\tsuper();\n\t}", "public Client( int id)\r\n\t\t{\r\n\t\t\r\n\t\tsuper( \"Client \"+id);\r\n\t\t\r\n\t\t//some configuration here\r\n\t\tc_id = id; //client's id\r\n\t\tseq_number = 1; //message sequence number\r\n\t\tserverPort = 1020; //server port\r\n\t\tserverAddress = \"localhost\"; // server IP address\r\n\t\t\r\n\t\t\r\n\t\tenterField = new JTextField( \"Type message here\" );\r\n\t\tenterField.addActionListener(\r\n\t\tnew ActionListener()\r\n\t\t\t{\r\n\t\t\t\tpublic void actionPerformed( ActionEvent event )\r\n\t\t\t\t{\r\n\t\t\t\t\t//sent request\r\n\t\t\t\t\tString message = event.getActionCommand();\r\n\t\t\t\t\tsendRequest(message);\r\n\t\t\t\t} // end actionPerformed\r\n\t\t\t} // end inner class\r\n\t\t); // end call to addActionListener\r\n\t\t\r\n\t\tadd( enterField, BorderLayout.NORTH );\r\n\t\t\t\r\n\t\tdisplayArea = new JTextArea();\r\n\t\tadd( new JScrollPane( displayArea ), BorderLayout.CENTER );\r\n\t\tsetSize( 400, 300 ); // set window size\r\n\t\tsetVisible( true ); // show window\r\n\t\t\t\r\n\t\ttry // create DatagramSocket for sending and receiving packets\r\n\t\t{\r\n\t\t\tsocket = new DatagramSocket();\r\n\t\t} // end try\r\n\t\tcatch ( SocketException socketException )\r\n\t\t{\r\n\t\t\tsocketException.printStackTrace();\r\n\t\t\tSystem.exit( 1 );\r\n\t\t} // end catch\r\n\t\t//msgSender.start(); //starts automatic message sender\r\n\t\tthis.waitForPackets(); //starts listening\r\n\t}", "public Cliente() {\n }", "public ClientTSap() {\n socketFactory = SocketFactory.getDefault();\n }", "public AbaloneClient() {\n server = new AbaloneServer();\n clientTUI = new AbaloneClientTUI();\n }", "public Client(){\r\n\t\t// ask the user for a host, port, and user name\r\n\t\tString host = JOptionPane.showInputDialog(\"Host address:\");\r\n\t\t\r\n\t\tString port = JOptionPane.showInputDialog(\"Host port:\");\r\n\t\tboolean shouldRepeat = true;\r\n\t\tint portNum = 0;\r\n\t\twhile(shouldRepeat){\r\n\t\t\ttry{\r\n\t\t\tportNum = Integer.parseInt(port);\r\n\t\t\tshouldRepeat = false;\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e){\r\n\t\t\t\tport = JOptionPane.showInputDialog(\"Host port:\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tclientName = JOptionPane.showInputDialog(\"User name:\");\r\n\t\t\r\n\t\tif (host == null || port == null || clientName == null)\r\n\t\t\treturn;\r\n\t\t\r\n\t\ttry{\r\n\t\t\t// Open a connection to the server\r\n\t\t\tserver = new Socket(host, portNum);\r\n\t\t\tout = new ObjectOutputStream(server.getOutputStream());\r\n\t\t\tin = new ObjectInputStream(server.getInputStream());\r\n\t\t\t\r\n\t\t\tout.writeObject(clientName);\r\n\t\t\t\r\n\t\t\tsetupGUI();\r\n\t\t\t\r\n\t\t\t// start a thread for handling server events\r\n\t\t\tnew Thread(new ServerHandler()).start();\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public Client(Client client) {\n\n }", "public TcpClient(OnMessageReceived listener) {\n\n messageListener = listener;\n }", "public GameClient() {\r\n super(new Client(Config.WRITE_BUFFER_SIZE, Config.OBJECT_BUFFER_SIZE), null, null);\r\n }", "public TCPMessengerServer() {\n initComponents();\n customInitComponents();\n listenForClient(); \n }", "ClientHandler(Socket socket) {\n this.client = socket;\n }", "public EchoClientHandler() {\n firstMessage = Unpooled.buffer(EchoClient.SIZE);\n for (int i = 0; i < firstMessage.capacity(); i ++) {\n firstMessage.writeByte((byte) i);\n }\n }", "public ServiceClient() {\n\t\tsuper();\n\t}", "public Client(String id, String serverHost, int serverPort)\n {\n this.id = id;\n sender = new Sender(serverHost, serverPort);\n }", "public UDPclient()\n\t{\n\t}", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "public Chat(Client _client, long _id) {\n\t\tclient = _client;\n\t\tFid = _id;\n\t\tinitComponents();\n\t}", "Client(String host, int port) {\n super(host, port);\n }", "public Client(String host) {\n super(\"Client\");\n\n chatServer = host; // set server to which this client connects\n\n enterField = new JTextField(); // create enterField\n enterField.setEditable(false);\n enterField.addActionListener(\n new ActionListener() {\n // send message to server\n public void actionPerformed(ActionEvent event) {\n sendData(event.getActionCommand());\n enterField.setText(\"\");\n } // end method actionPerformed\n } // end anonymous inner class\n ); // end call to addActionListener\n\n add(enterField, BorderLayout.NORTH);\n displayArea = new JTextArea(); // create displayArea\n add(new JScrollPane(displayArea), BorderLayout.CENTER);\n\n setSize(300, 150); // set size of window\n setVisible(true); // show window\n }", "public Client() {\n // Naming the client window Player\n super(\"Player\");\n\n // Setting up the textField. Must press enter to start the game.\n textField = new JTextField(\"Please press enter to start...\");\n\n // Adding the ActionListener\n textField.addActionListener(\n event -> {\n try // create and send packet\n {\n // get message from textfield\n String message = event.getActionCommand();\n\n // convert to bytes\n byte[] data = message.getBytes();\n\n // create sendPacket\n DatagramPacket sendPacket = new DatagramPacket(data,\n data.length, InetAddress.getLocalHost(), 5000);\n\n // sending packet to Server\n socket.send(sendPacket);\n\n // Displaying the message in \"Player: Message\" Format\n displayArea.setCaretPosition(\n displayArea.getText().length());\n } catch (IOException ioException) {\n displayMessage(ioException + \"\\n\");\n ioException.printStackTrace();\n }\n }\n );\n add(textField, BorderLayout.NORTH);\n\n // Creating and Adding the Display Area text box.\n displayArea = new JTextArea();\n add(new JScrollPane(displayArea), BorderLayout.CENTER);\n\n // Making the Window for Client\n setSize(400, 300); // set window size\n setVisible(true); // show window\n\n try // create DatagramSocket for sending and receiving packets\n {\n socket = new DatagramSocket();\n } catch (SocketException socketException) {\n socketException.printStackTrace();\n System.exit(1);\n }\n }", "private MatterAgentClient() {}", "private CorrelationClient() { }", "public TcpClient(OnMessageReceived listener, String ip) {\n this.serverIp = ip;\n this.messageListener = listener;\n }", "public LocalClient() {\n\t\tsuper(\"SERVER\", Arrays.asList(new String[] {\"*\"}), null, null);\n\t\tinputThread = new Thread(this);\n\t\tinputThread.start();\n\t}", "public GameServerClient(){\r\n\t\tinitComponents();\r\n\t\t}", "public NMQModuleClient() {\r\n }", "public TelemetryClientClient()\n {\n TelemetryClient tc = new TelemetryClient();\n if (!tc.getOnlineStatus())\n tc.connect(\"a connection string\");\n\n tc.send(\"some message\");\n\n String response = tc.receive();\n\n tc.disconnect();\n\n }", "public Client(ClientEvents event) throws UnknownHostException, IOException {\n\t\t// TODO Auto-generated constructor stub\n\t\t//super(\"83.52.33.147\", 3553);\n\t\tmIp = \"85.53.66.42\";\n\t\tmPort = 3553;\n\t\tthis.event = event;\n\t\tmInstance = this;\n\t\t\n\t\t//startConection();\n\t}", "public HGDClient() {\n \n \t}", "public ClientLoginService(){\n this(MessageConnection.CHANNEL_DEFAULT_RELIABLE);\n }", "public Client() {\n _host_name = DEFAULT_SERVER;\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }", "private void createClient() {\n tc = new TestClient();\n }", "public EO_ClientsImpl() {\n }", "Client(String destination, int sendPort, int myPort, String myIP) {\n\t\tthis.destination = destination;\n\t\tthis.sendPort = sendPort;\n\t\tthis.myPort = myPort;\n\t\tthis.myIP = myIP;\n\t}", "private NotificationClient() { }", "private SocketMessage() {\n initFields();\n }", "public LpsClient() {\n super();\n }", "public Server(){\r\n \r\n this.m_Clients = new TeilnehmerListe();\r\n this.m_Port = 7575;\r\n }", "private TcpClient()\n {\n socket = null;\n writer = null;\n connected = false;\n \n connect(\"localhost\", 7778);\n }", "public TurnoVOClient() {\r\n }", "public UPKClient() {\n connectToServer(BASE_URL);\n }", "public TCPClient(){\n \t lengthStr=\"\";\n inFromUser = null;\n outToServer = null;\n inFromServer = null;\n clientSocket = null;\n }", "private ClientController() {\n }", "public void createClient() {\n client = new UdpClient(Util.semIp, Util.semPort, this);\n\n // Le paso true porque quiero que lo haga en un hilo nuevo\n client.connect(true);\n }", "Client(String server, int port, String username, ClientGUI cg) {\n\t\tthis.server = server;\n\t\tthis.port = port;\n\t\tthis.username = username;\n\t\tthis.cg = cg; // Saved if in GUI mode or not\n\t}", "public ClienteServicio() {\n }", "public Gateway() {\n genClient = new GenericClient<Gateway>(this);\n }", "public TcpClient() {\n connector = new NioSocketConnector();\n connector.setHandler(this);\n connector.getFilterChain().addLast(\"codec\", \n new ProtocolCodecFilter(new TextLineCodecFactory(Charset.forName(\"UTF-8\")))); \n ConnectFuture connFuture = connector.connect(new InetSocketAddress(\"localhost\", TcpServer.PORT));\n connFuture.awaitUninterruptibly();\n session = connFuture.getSession();\n }", "public ClientHandler(Socket s){\r\n mySocket = s;\r\n }", "Cliente(){}", "public Client() throws IOException\n {\n socket = new Socket(\"127.0.0.1\", 1234);\n\n socket2 = new Socket(\"127.0.0.1\", 1235);\n \n out = new ObjectOutputStream(socket.getOutputStream());\n in = new ObjectInputStream(socket.getInputStream());\n \n in2 = new ObjectInputStream(socket2.getInputStream());\n }", "public Client(int myNodeId, int myPortNo, Quorumclients quorum, Requestque msgQueue, Socket client, Fileinput file, Clock clock){\n\t\tthis.myNodeId = myNodeId;\n\t\tthis.myPortNo = myPortNo;\n\t\tthis.quorum = quorum;\n\t\tthis.q = msgQueue;\n\t\tthis.client = client;\n\t\tthis.file = file;\n\t\tthis.clock = clock;\n\t\tmsgFromClient = null;\n\t\t\n\t\t//Thread creation\n\t\tt = new Thread(this, \"Client-\"+threadNo++);\n\t\tt.start();\n\t}", "public DmaiClient() {\r\n\t\tthis.mainView = new MainView();\r\n\t\tconnexionServeur();\r\n\r\n\t}", "public ClientController() {\n }", "public Communicator() {\n\t}", "public Client(String[] args) {\r\n\t\t// Default states\r\n\t\tverbose = true;\r\n\r\n\t\t// Change states based on args\r\n\t\t/*this.args = args;\r\n\t\tif (this.args.length >= 1) {\r\n\t\t\tfor (String arg: args) {\r\n\t\t\t\tswitch(arg) {\r\n\t\t\t\tcase \"-v\":\r\n\t\t\t\t\tverbose = true;\r\n\t\t\t\t\tSystem.out.println(\"Verbose mode is on.\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"-t\": \r\n\t\t\t\t\tsendPort = ERRSIM_PORT; \r\n\t\t\t\t\tSystem.out.println(\"The client is being routed through the error simulator.\"); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"Invalid command line arugment received. Exiting client...\");\r\n\t\t\t\t\tSystem.exit(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}*/\r\n\t\t// Create data socket for communicating with server\r\n\t\ttry {\r\n\t\t\tsendReceiveSocket = new DatagramSocket();\r\n\t\t\t\r\n\t\t\t//Maximum time to wait for response before timeout and re-send packet: 2 seconds (2000)\r\n\t\t\tsendReceiveSocket.setSoTimeout(2000);\t\t\r\n\t\t} catch(Exception se) {\r\n\t\t\tse.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "public static Client createClient() {\n JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();\n provider.setAnnotationsToUse(new Annotations[]{Annotations.JACKSON});\n\n ClientConfig config = new ClientConfig(provider);\n //Allow delete request with entity\n config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);\n //It helps to handle cookies\n config.property(ClientProperties.FOLLOW_REDIRECTS, Boolean.FALSE);\n //Allow PATCH\n config.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);\n\n Logger logger = Logger.getLogger(\"Client\");\n Feature feature = new LoggingFeature(logger, Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY,\n null);\n\n //Allow self trusted certificates\n SSLContext sslcontext;\n try {\n sslcontext = SSLContext.getInstance(\"TLS\");\n sslcontext.init(null, new TrustManager[]{new X509TrustManager() {\n public void checkClientTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public void checkServerTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[0];\n }\n }}, new java.security.SecureRandom());\n } catch (KeyManagementException | NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n\n return ClientBuilder\n .newBuilder()\n .withConfig(config)\n .sslContext(sslcontext)\n .build()\n .register(feature)\n .register(MultiPartFeature.class);\n }", "public Communicator() {\n }", "public Communicator() {\n }", "public CommunicatorClientImpl(String serverString, Integer portNumber) throws IOException {\n super(new EventDispatcherClient());\n this.serverString = serverString;\n this.portNumber = portNumber;\n ((EventDispatcherClient) getEventDispatcher()).setCommClient(this);\n int retinit = init();\n }", "public ClientHandle(Socket cs) {\r\n \t\r\n this.threadSocket = cs;\r\n\r\n }", "public CommunicationManager(ArduinoClientModel arduinoClientModel) {\n\t\tsuper();\n\t\tthis.arduinoClientModel = arduinoClientModel;\n\t\tloadCommunications();\n\t}", "public Communicator() {\n\t\tmutex = new Lock();\n\t\tmessage = null;\n\t\tspeakers = new Condition2(mutex);\n\t\tlisteners = new Condition2(mutex);\n\t\tacknowledge = new Condition2(mutex);\n\t}", "public ChatClient() {\r\n\r\n // Layout GUI\r\n textField.setEditable(false);\r\n messageArea.setEditable(false);\r\n frame.getContentPane().add(textField, \"North\");\r\n frame.getContentPane().add(new JScrollPane(messageArea), \"Center\");\r\n frame.pack();\r\n\r\n // Add Listeners\r\n textField.addActionListener(new ActionListener() {\r\n /**\r\n * Responds to pressing the enter key in the textfield by sending the contents of the text\r\n * field to the server. Then clear the text area in preparation for the next message.\r\n */\r\n public void actionPerformed(ActionEvent e)\r\n {\r\n out.println(textField.getText());\r\n textField.setText(\"\");\r\n }\r\n });\r\n }", "public frmClient() {\n initComponents();\n clientside=new Client(this);\n \n }", "public Client() {\n initComponents();\n play = new Play(SIZE);\n sendButton.setEnabled(false);\n moveButton.setEnabled(false);\n reprintField();\n }", "public abstract Client getClient();", "private ClientLoader() {\r\n }", "public EchoClientHandler()\n {\n String data = \"hello zhang kylin \" ;\n firstMessage = Unpooled.buffer(2914) ;\n firstMessage.writeBytes(data.getBytes()) ;\n }", "public Connection(Socket client_socket) {\r\n client = client_socket;\r\n try {\r\n in = new DataInputStream(client.getInputStream());\r\n out = new PrintStream(client.getOutputStream());\r\n }\r\n catch (IOException e) {\r\n try { client.close(); } catch (IOException e2) { ; }\r\n System.err.println(\"Exception while getting socket streams: \" + e);\r\n return;\r\n }\r\n this.start();\r\n }", "protected ClientStatus() {\n }", "ServerClient(ChatServer serv, Socket cl, String user){\n this.server = serv;\n this.client = cl;\n this.username = user;\n this.clientConnected = true;\n this.room = serv.name;\n }", "public Ctacliente() {\n\t}", "public ClientMenu(String host, int port, Client c) {\n\n\t\tsuper(\"Chat Client\");\n\t\tdefaultPort = port;\n\t\tdefaultHost = host;\n\t\tclient = c;\n\n\t\t// The NorthPanel with:\n\t\tJPanel northPanel = new JPanel(new GridLayout(3, 1));\n\t\t// the server name and the port number\n\t\tJPanel serverAndPort = new JPanel(new GridLayout(1, 5, 1, 3));\n\t\t// the two JTextField with default value for server address and port number\n\t\ttfServer = new JTextField(host);\n\t\ttfPort = new JTextField(\"\" + port);\n\t\ttfPort.setHorizontalAlignment(SwingConstants.RIGHT);\n\n\t\tserverAndPort.add(new JLabel(\"Server Address: \"));\n\t\tserverAndPort.add(tfServer);\n\t\tserverAndPort.add(new JLabel(\"Port Number: \"));\n\t\tserverAndPort.add(tfPort);\n\t\t// serverAndPort.add(new JLabel(\"\"));\n\t\t// adds the Server an port field to the GUI\n\t\t// northPanel.add(serverAndPort);\n\n\t\t// the Label and the TextField\n\t\tlabel = new JLabel(\"Username:\", SwingConstants.CENTER);\n\t\tserverAndPort.add(label);\n\t\tun = new JTextField(\"Anonymous\");\n\t\ttf = new JTextField(\"\");\n\t\ttf.setBackground(Color.WHITE);\n\t\tun.setBackground(Color.WHITE);\n\t\tserverAndPort.add(un);\n\t\tnorthPanel.add(serverAndPort);\n\n\t\tadd(northPanel, BorderLayout.NORTH);\n\n\t\t// The CenterPanel which is the chat room\n\t\tta = new JTextArea(\"Welcome to the Chat room\\n\", 80, 80);\n\t\tJPanel centerPanel = new JPanel(new GridLayout(1, 1));\n\t\tcenterPanel.add(new JScrollPane(ta));\n\t\tta.setEditable(false);\n\t\tadd(centerPanel, BorderLayout.CENTER);\n\n\t\t// the 3 buttons\n\t\tlogin = new JButton(\"Connect\");\n\t\tlogin.setActionCommand(\"Connect\");\n\t\tlogin.addActionListener(this);\n\t\tsend = new JButton(\"Send\");\n\t\tsend.setActionCommand(\"Send\");\n\t\tsend.addActionListener(this);\n\t\t// logout = new JButton(\"Logout\");\n\t\t// logout.addActionListener(this);\n\t\t// logout.setEnabled(false); // you have to login before being able to logout\n\n\t\tJPanel southPanel = new JPanel(new GridLayout(1, 3, 5, 5));\n\t\tserverAndPort.add(login);\n\t\t// southPanel.add(logout);\n\t\tsouthPanel.add(tf);\n\t\tsouthPanel.add(send);\n\t\tadd(southPanel, BorderLayout.SOUTH);\n\n\t\tuserListModel = new DefaultListModel<String>();\n\t\tuserList = new JList<String>(userListModel);\n\t\tuserList.setPreferredSize(new Dimension(100, 400));\n\t\tuserList.addListSelectionListener(this);\n\t\tusers_label = new JLabel(\"Users:\");\n\n\t\tJPanel eastPanel = new JPanel();\n\t\teastPanel.setPreferredSize(new Dimension(100, 50));\n\t\tusers_label.setPreferredSize(new Dimension(100, 20));\n\t\teastPanel.add(users_label);\n\t\teastPanel.add(userList);\n\t\tadd(eastPanel, BorderLayout.EAST);\n\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tsetSize(600, 600);\n\t\tsetVisible(true);\n\t\ttf.requestFocus();\n\n\t}", "private Client buildClient() {\n\t\tClient client = new Client();\n\t\tclient.setName(clientNameTextBox.getValue());\n\t\tclient.setAddress(clientAddressTextBox.getValue());\n\t\tclient.setTelephone(clientTelephoneTextBox.getValue());\n\t\treturn client;\n\t}", "public PublishingClientImpl() {\n this.httpClientSupplier = () -> HttpClients.createDefault();\n this.requestBuilder = new PublishingRequestBuilderImpl();\n }", "public AbstractClient(String host, int port) {\n // Initialize variables\n this.host = host;\n this.port = port;\n }", "public Echange_Client() throws UnknownHostException, IOException {\n start_Connexion(); \n }", "public Server () {\n\t\t\n\t\tsuper(\"The best messager ever! \");\n\t\t//This sets the title. (Super - JFrame).\n\t\t\n\t\tuserText = new JTextField();\n\t\tuserText.setEditable(false);\n\t\tuserText.addActionListener(\n\t\t\t\tnew ActionListener() {\n\t\t\t\t\t\n\t\t\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tsendMessage(event.getActionCommand());\n\t\t\t\t\t\t//This returns whatever event was performed in the text field i.e the text typed in.\n\t\t\t\t\t\tuserText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t);\n\t\t\n\t\tadd(userText,BorderLayout.NORTH);\n\t\tchatWindow = new JTextArea();\n\t\tadd(new JScrollPane (chatWindow));\n\t\tsetSize(800,600);\n\t\tsetVisible(true);\n\t\t\n\t\t\n\t\n\t\n\t}", "public Client(String serverName, int serverPort, int messageRate)\n\t{\n\t\tthis.serverName = serverName;\n\t\tthis.serverPort = serverPort;\n\t\tthis.messageRate = messageRate;\n\t\t\t\n\t\ttry\n\t\t{\n\t\t\tthis.selector = Selector.open();\n\t\t\tthis.serverChannel = SocketChannel.open();\n\t\t\tthis.serverChannel.configureBlocking(false);\n\t\t\tthis.serverChannel.connect(new InetSocketAddress(this.serverName, this.serverPort));\n\t\t\t\n\t\t\tthis.serverChannel.register(this.selector, SelectionKey.OP_CONNECT);\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\tthis.sentCounter = 0;\n\t\tthis.receivedCounter = 0;\n\t\t\n\t\tthis.hashRecords = new LinkedList<String>();\n\t}", "public ClientSocket(String serverAddress, int serverPort, DumbModel.UpdatesHandler updatesHandler) {\n this.serverAddress = serverAddress;\n this.serverPort = serverPort;\n this.renderablePublisher = new SubmissionPublisher<>();\n this.renderablePublisher.subscribe(updatesHandler);\n this.logger = Logger.getLogger(getClass().getSimpleName());\n }", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "public Factory() {\n this(getInternalClient());\n }", "public ClientConfiguration() {\n serverIp = DEFAULT_SERVER_IP;\n serverPort = DEFAULT_SERVER_PORT;\n }", "public MultiChannelMessageImpl() {\n }", "public Client(String nickname) throws RemoteException {\n\t\n\tthis.nickname=nickname;\n\n\t\t\t\t\t\t\t\t}", "private ClientController(){\n\n }", "public CluelessClient(String username, String hostAddress) {\n\t\tclient = new Client();\n\t\tclient.start();\n\n\t\t// Registers the client class so we can send it over the network\n\t\tNetwork.register(client);\n\n\t\t// Gets the player from the other end of the connection for rmi\n\t\tconsolePlayer = ObjectSpace.getRemoteObject(client, Network.CONSOLE_PLAYER, ConsolePlayerInterface.class);\n\t\tRemoteObject remoteConsolePlayerObject = (RemoteObject) consolePlayer;\n\t\tremoteConsolePlayerObject.setResponseTimeout(Network.reponseTime);\n\n\t\tclient.addListener(new Listener() {\n\t\t\t@Override\n\t\t\tpublic void disconnected(Connection connection) {\n\t\t\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tconsoleTextArea.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t// ask user for host\n//\t\tString userInput = (String) JOptionPane.showInputDialog(null, \"Host:\", \"Connect to Clueless Server\",\n//\t\t JOptionPane.QUESTION_MESSAGE, null, null, \"localhost\");\n//\t\tif (userInput == null || userInput.trim().length() == 0) {\n//\t\t\tSystem.exit(1);\n//\t\t}\n//\t\tfinal String host = userInput.trim();\n\t\tfinal String host = hostAddress.trim();\n\n\t\t// ask for user name\n//\t\tuserInput = (String) JOptionPane.showInputDialog(null, \"Name:\", \"Connect to Clueless Server\",\n//\t\t JOptionPane.QUESTION_MESSAGE, null, null, \"YourUsername\");\n//\t\tif (userInput == null || userInput.trim().length() == 0) {\n//\t\t\tSystem.exit(1);\n//\t\t}\n//\t\tfinal String userName = userInput.trim();\n\t\tfinal String userName = username.trim();\n\n\t\tconsoleTextArea = new ConsoleFrame(host);\n\t\tnew ObjectSpace(client).register(Network.CONSOLE_TEXT_AREA, consoleTextArea);\n\t\tconsoleTextArea.setSendListener(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\t// Create a cheat mode to show case file\n\t\t\t\tif (consoleTextArea.getConsoleText().equals(\"CHEAT\")) {\n\t\t\t\t\tconsolePlayer.cheatMode();\n\t\t\t\t} else {\n\t\t\t\t\tswitch (consolePlayer.getGameState().getGameState()) {\n\t\t\t\t\t// addPlayer(1)\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tconsolePlayer.addPlayer(userName, consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waitingForStartGame(2)\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tconsolePlayer.startGame(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// gameStarted(3)\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// moving(4)\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\tconsolePlayer.movePlayer(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// chooseAction(5),\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\tconsolePlayer.chooseAction(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// suggesting(6)\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\tconsolePlayer.makeSuggestion(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// accussing(7)\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\tconsolePlayer.makeAccusation(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waiting(8)\n\t\t\t\t\tcase 8:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// showCard(9)\n\t\t\t\t\tcase 9:\n\t\t\t\t\t\tconsolePlayer.showCard(consoleTextArea.getConsoleText());\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// waitingSeeCard(10)\n\t\t\t\t\tcase 10:\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tconsoleTextArea.setCloseListener(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tclient.stop();\n\t\t\t}\n\t\t});\n\t\tconsoleTextArea.setVisible(true);\n\n\t\t// connecting on a new thread. This allows a progress bar to be shown if\n\t\t// connection is slow enough.\n\t\tnew Thread(\"Connect\") {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tclient.connect(Network.reponseTime, host, Network.port);\n\t\t\t\t\tconsolePlayer.registerUserName(userName);\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}", "public Client(Configuration config) {\n if (config == null)\n throw new IllegalArgumentException(\"Null argument supplied\");\n this.config = config;\n connectivityStatus = ConnectivityStatus.Initial;\n lastInteraction = new Date(0l);\n recentPeers = new PeerList();\n refreshInterval = 30000l;\n randomizedRefreshInterval = (int)(refreshInterval * (1 - 0.25 * new Random ().nextDouble()));\n myLinkLocalAdress = Inet6Address.getByAddress(,, LINKLOCAL)\n }", "public Conversation(Connection _client, ResponseListener _listener)\n\t{\n\t\tmListener = _listener;\n\t\tmClient = _client;\n\t}", "public Communicator() {\n\t\tcommlock = new Lock ();\n\t\tspeaker = new Condition(commlock);\n\t\tlistener = new Condition(commlock);\n\n }", "public Client(String h, int p) {\n\t\thost = h;\n\t\tport = p;\n\t}", "public MessageService()\n {\n messages.put(1L, new Message(1, \"Hello World!\", \"Marc\"));\n messages.put(2L, new Message(2, \"Hello Embarc!\", \"Kevin\"));\n messages.put(3L, new Message(3, \"Hello Luksusowa!\", \"Sid\"));\n messages.put(4L, new Message(4,\n \"I think Sid might have a bit too much blood in his alcohol-stream...\", \"Craig\"));\n }" ]
[ "0.7756394", "0.77385134", "0.7688179", "0.7672166", "0.750252", "0.74006957", "0.7321463", "0.73115927", "0.7254352", "0.72149473", "0.71585673", "0.7144338", "0.713254", "0.7103662", "0.7039184", "0.69605327", "0.6918486", "0.6890398", "0.68644696", "0.6817928", "0.680657", "0.67487174", "0.6744591", "0.67379045", "0.67308843", "0.6725518", "0.6725017", "0.6705847", "0.6679126", "0.6677394", "0.6671367", "0.6654713", "0.6638768", "0.6632686", "0.6632096", "0.6623643", "0.66234785", "0.6622125", "0.6577481", "0.65572226", "0.65532744", "0.6541534", "0.6538223", "0.6536888", "0.6504729", "0.6504229", "0.6495928", "0.6489772", "0.64416355", "0.643933", "0.6420631", "0.641884", "0.6415712", "0.6402609", "0.63929635", "0.6389964", "0.6381994", "0.63796186", "0.63731277", "0.63708043", "0.6370577", "0.63502985", "0.63488424", "0.6340198", "0.63323015", "0.63323015", "0.6330385", "0.6312199", "0.6309636", "0.63049906", "0.6292502", "0.6281166", "0.62803894", "0.62682366", "0.625732", "0.6253544", "0.6251984", "0.62417877", "0.6241412", "0.623752", "0.6231131", "0.62217945", "0.6219601", "0.62165105", "0.62069666", "0.62002736", "0.6199372", "0.6189249", "0.618842", "0.61855936", "0.61829734", "0.61732566", "0.61709404", "0.61679274", "0.6162751", "0.6158824", "0.6157887", "0.6150507", "0.61502963", "0.6145006" ]
0.74000883
6
This method starts a connection from the client to the server
public void start() { try { Socket socket = new Socket(conf.getServerIp(), conf.getServerPort()); java.io.InputStream is = socket.getInputStream(); BufferedReader reader = new BufferedReader(new java.io.InputStreamReader(is)); readerThread = new MessageReader(reader); new Thread(readerThread).start(); java.io.OutputStream os = socket.getOutputStream(); PrintWriter writer = new PrintWriter(os); writerThread = new MessageWriter(writer); new Thread(writerThread).start(); while (serverMessages.empty()) { //Do nothing } ServerMessage serverMessage = serverMessages.pop(); if (!serverMessage.getMessageType().equals(ServerMessage.MessageType.HELO)) { System.out.println("Expecting a HELO message but received: " + serverMessage.toString()); } else { System.out.println("Please fill in your username: "); Scanner scanner = new Scanner(System.in); String username = scanner.nextLine(); ClientMessage heloMessage = new ClientMessage(ClientMessage.MessageType.HELO, username); clientMessages.push(heloMessage); while (serverMessages.empty()) { } isConnected = validateServerMessage(heloMessage, serverMessages.pop()); if (!isConnected) { System.out.println("Error logging into server"); } else { System.out.println("Successfully connected to server."); System.out.println("(Type '/quit' to close connection and stop application.)"); System.out.println("Type a broadcast message: "); nonblockReader = new NonblockingBufferedReader(new BufferedReader(new java.io.InputStreamReader(System.in))); while (isConnected) { String line = nonblockReader.readLine(); if (line != null) { ClientMessage clientMessage; if (line.equals("/quit")) { clientMessage = new ClientMessage(ClientMessage.MessageType.QUIT, username + " left the server"); isConnected = false; Thread.sleep(500L); } else if (line.startsWith("/msg") && line.split(" ").length > 1) { //Split the message first String[] splittedline = line.split(" "); String senderUsername = splittedline[1].toLowerCase(); if (!senderUsername.equalsIgnoreCase(username)) { line = line.replace("/msg " + splittedline[1] + " ", ""); //Check if we have an encryptionsession with the user or not if (encryptionSessionHashMap.containsKey(senderUsername)) { //We have an encryptionsession, so we can just send the message String encryptedLine = encryptionSessionHashMap.get(senderUsername).encryptMessage(line); clientMessage = new ClientMessage(ClientMessage.MessageType.ENCR, senderUsername + " " + encryptedLine); System.out.println("(You -> " + senderUsername + "): " + line); } else { //We don't have an encryptionsession yet, so we create one EncryptionSession encryptionSession = new EncryptionSession(); encryptionSessionHashMap.put(senderUsername, encryptionSession); clientMessage = new ClientMessage(ClientMessage.MessageType.KEYS, senderUsername + " " + encryptionSession.getPublicKey()); savedMessage.put(senderUsername, line); } } else { System.out.println("You cannot send a message to yourself"); clientMessage = null; } } else if (line.startsWith("/file") && line.split(" ").length == 3) { //Split the message first String[] splitLine = line.split(" "); String senderUsername = splitLine[1].toLowerCase(); if (!senderUsername.equalsIgnoreCase(username)) { String fileBase64String = new FileTransfer(splitLine[2], senderUsername).sendFile(); clientMessage = new ClientMessage(ClientMessage.MessageType.FILE, fileBase64String); System.out.println("You have send " + splitLine[2] + " to " + senderUsername); } else { System.out.println("You cannot send a file to yourself"); clientMessage = null; } } else { clientMessage = new ClientMessage(ClientMessage.MessageType.BCST, line); System.out.println(line); } if (clientMessage != null) { clientMessages.push(clientMessage); } } if (!serverMessages.empty()) { ServerMessage received = serverMessages.pop(); if (received.getMessageType().equals(ServerMessage.MessageType.BCST)) { System.out.println(received.getPayload()); } //Check if we received an encrypted message else if (received.getMessageType().equals(ServerMessage.MessageType.ENCR)) { //Split the message first String[] splitMessage = received.getPayload().split(" "); String sender = splitMessage[0].toLowerCase(); String encryptedMessage = splitMessage[1]; //If we have a session with this user, we can decrypt the message if (encryptionSessionHashMap.containsKey(sender)) { System.out.println("(" + sender + " -> You): " + encryptionSessionHashMap.get(sender).decryptMessage(encryptedMessage)); } } //If this is the first time, we have to share keys else if (received.getMessageType().equals(ServerMessage.MessageType.KEYS)) { //Split the message first String[] splitMessage = received.getPayload().split(" "); String sender = splitMessage[0].toLowerCase(); String encryptedKey = splitMessage[1]; //Check if we send the first message or not if (encryptionSessionHashMap.containsKey(sender)) { encryptionSessionHashMap.get(sender).decryptKey(encryptedKey); //After saving the aes key, we have to resend our first message String msg = savedMessage.get(sender); if (msg != null) { String encryptedLine = encryptionSessionHashMap.get(sender).encryptMessage(msg); ClientMessage responseMessage = new ClientMessage(ClientMessage.MessageType.ENCR, sender + " " + encryptedLine); clientMessages.push(responseMessage); System.out.println("(You -> " + sender + "): " + msg); savedMessage.remove(sender); } } //We send our aes key when we didn't send the message first else { EncryptionSession encryptionSession = new EncryptionSession(); encryptionSessionHashMap.put(sender, encryptionSession); String aesKey = encryptionSession.encryptKey(encryptedKey); ClientMessage responseMessage = new ClientMessage(ClientMessage.MessageType.KEYS, sender + " " + aesKey); clientMessages.push(responseMessage); } } //Check if the message is a file else if (received.getMessageType().equals(ServerMessage.MessageType.FILE)) { String[] splitMessage = received.getPayload().split(" "); String sender = splitMessage[0].toLowerCase(); String base64String = splitMessage[2]; new FileTransfer(base64String, splitMessage[0], true).readFile(); System.out.println("You have received " + splitMessage[1] + " from " + sender); } } } } disconnect(); System.out.println("Client disconnected!"); } } catch (IOException e) { System.out.println("Ouch! Could not connect to server!"); } catch (InterruptedException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startClientConnection() {\r\n\t\t\t\r\n\t//\tStringBuilder sbreq = new StringBuilder();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*making connection request*/\r\n\t\t\tclientsoc = new Socket(ip,port);\r\n\t\t\t\r\n\t\t\t/*Input and output streams for data sending and receiving through client and server sockets.*/\r\n\t\t\tdis = new DataInputStream(clientsoc.getInputStream());\t\r\n\t\t\tdos = new DataOutputStream(clientsoc.getOutputStream());\r\n\t\t\t\r\n\t\t\tStringBuilder sbconnreq = new StringBuilder();\r\n\r\n\t\t\t/*Building the Http Connection Request and passing Client name as body. Thus the Http Header\r\n\t\t\tare encoded around the client name data.*/\r\n\t\t\tsbconnreq.append(\"POST /\").append(\"{\"+clientname+\"}\").append(\"/ HTTP/1.1\\r\\n\").append(host).append(\"\\r\\n\").\r\n\t\t\tappend(userAgent).append(\"\\r\\n\").append(contentType).append(\"\\r\\n\").append(contentlength).append(clientname.length()).append(\"\\r\\n\").\r\n\t\t\tappend(date).append(new Date()).append(\"\\r\\n\");\r\n\t\t\t\r\n\t\t\tdos.writeUTF(sbconnreq.toString());\r\n\r\n\t\t\totherusers = new ArrayList<>(10);\r\n\t\t\tusertimestamp = new HashMap<>(10);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"You have logged in. You can start Chatting: \" + clientname);\r\n\t\t\tconnected = true;\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\t\r\n\t}", "public void Connect() {\n run = new Thread(\"Connect\") {\n @Override\n public void run() {\n running = true;\n try {\n server = new ServerSocket(9080);\n waitingForConnection();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class\n .getName()).log(Level.SEVERE, null, ex);\n }\n }\n };\n run.start();\n }", "private void startKlient() {\n\t\tSystem.out.println(\"Trying to connect\");\r\n\t\ttry (Socket serverkontakt = new Socket(\"127.0.0.1\", 8000);\r\n\t\t// Step 2 - obtaining input/output streams\r\n\t\t\t\tObjectOutputStream output = new ObjectOutputStream(\r\n\t\t\t\t\t\tserverkontakt.getOutputStream())) {\r\n\t\t\toutput.flush();\r\n\t\t\tSystem.out.println(\"Connected\");\r\n\t\t\tsendObject(output);\r\n\t\t} catch (EOFException eofException) {\r\n\t\t\tSystem.out.println(\"Server closing connection\\n\");\r\n\t\t} catch (IOException ioException) {\r\n\t\t\tSystem.out.println(\"Problem with server connection\\n\");\r\n\t\t}\r\n\t}", "protected void startConnect() {\n if (tcp) {\n connection = new TCPConnection(this);\n } else {\n connection = new UDPConnection(this, udpSize);\n }\n connection.connect(remoteAddr, localAddr);\n }", "private void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(Server.ADDRESS, Server.PORT_NUMBER);\n\t\t\tthis.oos = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tthis.ois = new ObjectInputStream(socket.getInputStream());\n\t\t\tServerListener serverlistener = new ServerListener();\n\t\t\tserverlistener.start();\n\t\t\tRequest request = new Request(RequestCode.START_DOCUMENT_STREAM);\n\t\t\trequest.setUsername(user.getUsername());\n\t\t\toos.writeObject(request);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public synchronized void startConnection ()\r\n\t{\r\n \t\tsynchronized (this)\r\n \t\t{\r\n \t\t\tif (_roboCOM!=null) return;\r\n\t\t\t\r\n\t\t\tuitoken++;\r\n\t\t\t_roboCOM = new TCPClient (MsgQueue,cm,uitoken);\r\n\r\n\t\t\t// debug parameters\r\n\t\t\t_roboCOM.msgHello=\"Start Connection ACCE\";\r\n\t\t\t\t\t\t\t\r\n\t \t \tnew Thread (_roboCOM).start();\r\n \t\t}\r\n\t}", "private void startServer() throws IOException {\n while (true) {\n System.out.println(\"[1] Waiting for connection...\");\n\n client = server.accept();\n System.out.println(\"[2] Connection accepted from: \" + client.getInetAddress());\n\n in = new BufferedReader(new InputStreamReader(client.getInputStream()));\n out = new PrintStream(client.getOutputStream(), true);\n\n while (!in.ready()) ;\n\n String line = in.readLine();\n ManageConnections connection = new ManageConnectionsFactory().getConnection(line);\n\n connection.goConnect(client, in, out);\n }\n }", "public void initiateConnection() {\n\t\tif (Settings.getRemoteHostname() != null) {\n\t\t\ttry {\n\t\t\t\toutgoingConnection(new Socket(Settings.getRemoteHostname(), Settings.getRemotePort()));\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.error(\"failed to make connection to \" + Settings.getRemoteHostname() + \":\"\n\t\t\t\t\t\t+ Settings.getRemotePort() + \" :\" + e);\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t}", "private void connectToServer() {\n\t\ttry {\n\t\t\tsocket = new Socket(InetAddress.getLocalHost(), Server.SERVER_PORT);\n\t\t\tin = new BufferedReader(new InputStreamReader(\n\t\t\tsocket.getInputStream()));\n\t\t\tout = new PrintWriter(socket.getOutputStream());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot connect to server\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "public void connect() {\n try {\n socket = connectToBackEnd();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public void start()\n {\n isRunning = true;\n try\n {\n //metoden opretter en ny socket for serveren på den valgte port\n ServerSocket serverSocket = new ServerSocket(port);\n //mens serveren kører venter den på en client\n while (isRunning)\n {\n serverDisplay(\"Serveren venter på clienter på port: \" + port);\n //accepterer clienten på socketen\n Socket socket = serverSocket.accept();\n\n if (!isRunning)\n {\n break;\n }\n // laver en ny thread til clienten med socketen der er blevet accepteret\n HandleClientThread handleClientThread = new HandleClientThread(socket);\n\n // her blever tråden tilføjet til arryet af clienter\n clientThreadArrayList.add(handleClientThread);\n // Starer handleclient tråden som håndtere clienter\n handleClientThread.start();\n }\n try\n {\n //Her lukker serveren socketen\n serverSocket.close();\n for (int i = 0; i < clientThreadArrayList.size() ; i++)\n {\n HandleClientThread hct = clientThreadArrayList.get(i);\n try\n {\n hct.inputStream.close();\n hct.outputStream.close();\n hct.socket.close();\n }\n catch (IOException e)\n {\n System.out.println(\"Uknowen command \" + e);\n }\n }\n }\n catch (Exception e)\n {\n serverDisplay(\"Kunne ikke lukke serveren og clienterne pga. \" + e);\n }\n }\n catch (IOException e)\n {\n String message = dateFormat.format(new Date()) + \"Fejl på ny server socket\" + e + \"\\n\";\n serverDisplay(message);\n }\n }", "public void connect() {\n synchronized (globalLock) {\n if (isRunning) {\n throw new IllegalStateException(\"WebSocketClient is not reusable\");\n }\n\n this.isRunning = true;\n createAndStartConnectionThread();\n }\n }", "public void startClientServer() {\n try {\n this.server_socket = new ServerSocket( port );\n this.start();\n } catch (IOException e ) {\n System.err.println( \"Failure: Socket couldn't OPEN! -> \" + e );\n } finally {\n System.out.println( \"Success: Server socket is now Listening on port \" + port + \"...\" );\n }\n }", "public static void doConnect() {\r\n\t\tlogger.info(\"Connecting to server......\");\r\n\t\tChannelFuture future = null;\r\n\t\ttry {\r\n\t\t\tfuture = bootstrap.connect(new InetSocketAddress(host, port));\r\n\t\t\tfuture.addListener(channelFutureListener);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t// future.addListener(channelFutureListener);\r\n\t\t\tlogger.warn(\"Closed connection.\");\r\n\t\t}\r\n\r\n\t}", "public void startServer() {\n\r\n try {\r\n echoServer = new ServerSocket(port);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n // Whenever a connection is received, start a new thread to process the connection\r\n // and wait for the next connection.\r\n while (true) {\r\n try {\r\n clientSocket = echoServer.accept();\r\n numConnections++;\r\n ServerConnection oneconnection = new ServerConnection(clientSocket, numConnections, this);\r\n new Thread(oneconnection).start();\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n\r\n }", "public void startServer()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t}\r\n\t\tcatch (IOException e1)\r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Waiting for client connection.\");\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tSocket socket = serverSocket.accept();\r\n\t\t\tSystem.out.println(\"Client connects.\");\r\n\r\n\t\t\tObjectInputStream ois = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tois = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));\r\n\t\t\t\tObject o = ois.readObject();\r\n\t\t\t\tif (!(o instanceof Message))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception(\"Received information is not message. Skip.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmessage = (Message) o;\r\n\t\t\t\tSystem.out.println(\"Message received: \" + message);\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcatch (ClassNotFoundException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tCloseUtil.closeAll(ois, socket, serverSocket);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "ClientConnection connection();", "private void startConnection() throws IOException {\n bos = new BufferedOutputStream(socket.getOutputStream(), 65536);\n\n byte[] key = new byte[16];\n Random random = new Random();\n random.nextBytes(key);\n String base64Key = Base64.encodeBase64String(key);\n\n byte[] handshake = createHandshake(base64Key);\n bos.write(handshake);\n bos.flush();\n\n InputStream inputStream = socket.getInputStream();\n verifyServerHandshake(inputStream, base64Key);\n\n writerThread.start();\n\n notifyOnOpen();\n\n bis = new BufferedInputStream(socket.getInputStream(), 65536);\n read();\n }", "private void start() {\n windowForCommunication.append(\"Awaiting client connection...\" + \"\\n\");\n\n //check if client is connected, if yes, add the following text to the chat window, then enable communication\n if (clientSocket.isConnected()) {\n windowForCommunication.append(\"Connection is established. Type 'stopconnection' to stop connection\" + \"\\n\");\n textField.setEditable(true);\n }\n\n //Begin communication, end if \"stopconnection\" is typed by Server/Client. If it is, call closeStreams method.\n try {\n String userInput;\n\n while((userInput = input.readLine()) != null) {\n if(userInput.contains(\"stopconnection\")){\n closeStreams();\n break;\n }\n\n displayMessage(userInput + \"\\n\");\n\n }\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }", "final public void openConnection() throws IOException {\n // Do not do anything if the connection is already open\n if (isConnected())\n return;\n\n // Create the sockets and the data streams\n try {\n clientSocket = new Socket(host, port);\n output = new DataOutputStream(clientSocket.getOutputStream());\n // input =\n // new BufferedReader(new InputStreamReader(clientSocket.getInputStream(), \"Big5_HKSCS\"));\n input = new DataInputStream(clientSocket.getInputStream());\n } catch (IOException ex)\n // All three of the above must be closed when there is a failure\n // to create any of them\n {\n try {\n closeAll();\n } catch (Exception exc) {\n }\n\n throw ex; // Rethrow the exception.\n }\n\n clientReader = new Thread(this); // Create the data reader thread\n readyToStop = false;\n clientReader.start(); // Start the thread\n }", "public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }", "public void makeConnection() {\n\t\ttry {\n\t\t\tif(sock != null) {\n\t\t\t\ttable.printMsg(\"Cannot join a server twice! You've already connected.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsock = new Socket(serverIP, serverPort);\n\t\t\toos = new ObjectOutputStream(sock.getOutputStream());\n\t\t\tois = new ObjectInputStream(sock.getInputStream());\n\t\t\tThread thread = new Thread(new ServerHandler());\n\t\t\tthread.start();\n\t\t} catch(Exception e) {\n\t\t\ttable.printMsg(\"Cannot Join Server.\");\n\t\t\tsock = null;\n\t\t\ttable.repaint();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void start()\r\n\t\t{\r\n\t\tDebug.assert(serverSocket != null, \"(Server/123)\");\r\n\r\n \t// flag the server as running\r\n \tstate = RUNNING;\r\n\r\n // Loop while still listening, accepting new connections from the server socket\r\n while (state == RUNNING)\r\n \t{\r\n // Get a connection from the server socket\r\n\t\t\tSocket socket = null;\r\n\t\t\ttry {\r\n socket = serverSocket.accept();\r\n \tif (state == RUNNING) \r\n \t createLogin(socket);\r\n }\r\n \r\n // The socket timeout allows us to check if the server has been shut down.\r\n // In this case the state will not be RUNNING and the loop will end.\r\n\t\t catch ( InterruptedIOException e )\r\n\t\t \t{\r\n\t\t \t// timeout happened\r\n\t\t \t}\r\n\t\t \r\n\t\t // This shouldn't happen...\r\n \t catch ( IOException e )\r\n \t \t{\r\n log(\"Server: Error creating Socket\");\r\n \t \tDebug.printStackTrace(e);\r\n \t }\r\n\t }\r\n\t \r\n\t // We've finished, clean up\r\n disconnect();\r\n\t\t}", "public void onStart() {\n\t\tnew Thread() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tinitConnection();\n\t\t\t\treceive();\n\t\t\t}\n\t\t}.start();\n\t}", "public void connect() {\n try {\n socket = new Socket(serverAddress, serverPort);\n outputStream = new ObjectOutputStream(socket.getOutputStream());\n inputStream = new ObjectInputStream(socket.getInputStream());\n //A thread which will constantly listen for updates from the server and forward them to Client\n new Thread(() -> {\n while (socket.isConnected()) {\n try {\n Renderable message = (Renderable) inputStream.readObject();\n if(message != null) {\n //logger.info(\"Received \" + message.getClass().getSimpleName() + \" from server.\");\n renderablePublisher.submit(message);\n }\n } catch (IOException | ClassNotFoundException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n break;\n }\n }\n }).start();\n } catch (IOException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n }\n }", "public void start() throws NotAvailableConnectionsException{\r\n \r\n ServerSocket server = null; \r\n Socket client = null; \r\n\t\t\r\n //Asks the IDAOFactory for a DAO object\r\n IDAO dao = IDAOFactory.getDAO();\r\n\t\ttry{ \r\n getData();\r\n server = new ServerSocket(port);\r\n //the server keeps waiting for connections \r\n while(true){\r\n \r\n LOGGER.info(\"Awaiting for client connection on port: \" + port);\r\n client = server.accept();\r\n LOGGER.info(\"Client connected to the application.\");\r\n \r\n //when a client connects, a thread is created and it \r\n //takes charge of the execution\r\n if(connections<maxThreads){\r\n Thread thread = new Thread(\r\n new LogicThread(client, (DAO) dao));\r\n threadsnum++;\r\n thread.start();\r\n threadsnum--;\r\n }else\r\n throw new NotAvailableConnectionsException();\r\n }\r\n \r\n \r\n \r\n \r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t} finally{\r\n try{\r\n \r\n if(client!=null){\r\n client.close();\r\n }\r\n if(server!=null){\r\n server.close();\r\n }\r\n } catch(IOException ex){\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }", "public void makeConnection() {\n\t\t// make a socket, output stream, and try connecting to the server\n\t\twhile (!connection) {\n\t\t\ttry {\n\t\t\t\tsocket = new Socket(address, port);\n\t\t\t\toutStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\t\tconnection = true;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void startServer() throws Exception\n {\n\t\t\tString SERVERPORT = \"ServerPort\";\n\t\t\tint serverport = Integer.parseInt(ConfigurationManager.getConfig(SERVERPORT));\n\t\t\t\n \n Srvrsckt=new ServerSocket ( serverport );\n while ( true )\n {\n Sckt =Srvrsckt.accept();\n new Thread ( new ConnectionHandler ( Sckt ) ).start();\n }\n \n \n\n\n }", "public void run() {\n // Initial connect request comes in\n Request request = getRequest();\n\n if (request == null) {\n closeConnection();\n return;\n }\n\n if (request.getConnectRequest() == null) {\n closeConnection();\n System.err.println(\"Received invalid initial request from Remote Client.\");\n return;\n }\n\n ObjectFactory objectFactory = new ObjectFactory();\n Response responseWrapper = objectFactory.createResponse();\n responseWrapper.setId(request.getId());\n responseWrapper.setSuccess(true);\n responseWrapper.setConnectResponse(objectFactory.createConnectResponse());\n responseWrapper.getConnectResponse().setId(id);\n\n // Return connect response with our (statistically) unique ID.\n if (!sendMessage(responseWrapper)) {\n closeConnection();\n System.err.println(\"Unable to respond to connect Request from remote Client.\");\n return;\n }\n\n // register our thread with the server\n Server.register(id, this);\n\n // have handler manage the protocol until it decides it is done.\n while ((request = getRequest()) != null) {\n\n Response response = handler.process(this, request);\n\n if (response == null) {\n continue;\n }\n\n if (!sendMessage(response)) {\n break;\n }\n }\n\n // client is done so thread can be de-registered\n if (handler instanceof IShutdownHandler) {\n ((IShutdownHandler) handler).logout(Server.getState(id));\n }\n Server.unregister(id);\n\n // close communication to client.\n closeConnection();\n }", "public void openConnection() {\n System.out.println(\"Opening connection...\");\n\n try {\n String HOST = \"192.168.4.1\";\n int PORT = 2323;\n connectionSocket = new Socket(HOST, PORT);\n connectionSocket.setTcpNoDelay(true);\n\n writer = new BufferedWriter(new OutputStreamWriter(new BufferedOutputStream(connectionSocket.getOutputStream())));\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n\n System.out.println(\"openConnection(): Success\");\n return;\n } catch (UnknownHostException e) {\n System.out.println(\"UnknownHostException at openConnection()\");\n } catch (IOException e) {\n System.out.println(\"IOException at openConnection()\");\n } catch (Exception e) {\n System.out.println(\"Exception at openConnection()\");\n System.out.println(e.toString());\n }\n\n System.out.println(\"Failed to connect\");\n }", "public void start() {\n gateway.openConnection();\n }", "public void startConnection(String ip, int port) {\n try {\n clientSocket = new Socket(ip, port);\n Debugger.logConnect(String.format(\"Client bind to IP:%s PORT:%d\",ip,port));\n out = new ObjectOutputStream(clientSocket.getOutputStream());\n in = new ObjectInputStream(clientSocket.getInputStream());\n this.gameLoop();\n }\n catch (IOException e)\n {\n Debugger.logError(e.getMessage());\n } catch (InterruptedException e) {\n Debugger.logError(e.getMessage());\n } catch (ClassNotFoundException e) {\n Debugger.logError(e.getMessage());\n }\n finally {\n\n }\n\n }", "public void connect()\n {\n System.out.println(\"CLIENT partito in esecuzione\");\n try\n {\n //Initialize socket variables and json formatter\n socket = new Socket(serverIP, serverPort);\n outputStream = new DataOutputStream(socket.getOutputStream());\n inputStream = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n gson = new Gson();\n \n receiverThread = new ClientReceiver(this);\n } \n catch (UnknownHostException e)\n {\n System.out.println(e.getMessage());\n System.out.println(\"Host sconosciuto\");\n System.exit(1);\n }\n catch (ConnectException e)\n {\n System.out.println(e.getMessage());\n System.out.println(\"Non c'è posto per te, mi spiace\");\n System.exit(1);\n }\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }", "private void connection() {\n boolean connect;\n try {\n connect = true;\n this.jTextArea1.setText(\"Server starts...\");\n server = new MultiAgentServer(this);\n String ip = \"\";\n int errorBit = 256;\n for (int i = 0; i < server.getIpAddr().length; i++) {\n int currentIP = server.getIpAddr()[i];\n if (currentIP < 0) {\n currentIP += errorBit;\n }\n ip += currentIP + \".\";\n }\n ip = ip.substring(0, ip.length() - 1);\n System.out.println(ip);\n Naming.rebind(\"//\" + ip + \"/server\", server);\n this.jTextArea1.setText(\"Servername: \" + ip);\n this.jTextArea1.append(\"\\nServer is online\");\n } catch (MalformedURLException | RemoteException e) {\n this.jTextArea1.append(\"\\nServer is offline, something goes wrong!!!\");\n connect = false;\n }\n if (dialog.getMusicBox().isSelected()) {\n sl = new SoundLoopExample();\n }\n reconnectBtn.setEnabled(!connect);\n }", "private void startServer(){\n clients = new ArrayList<ClientThread>();\n ServerSocket ClientSocket = null;\n try {\n ClientSocket = new ServerSocket(ClientPort);\n ClientSocketConnection(ClientSocket);\n } catch (IOException e){\n e.printStackTrace();\n System.exit(1);\n }\n }", "public synchronized boolean start(){\n \n\t\t/**\n\t\t * CONNECT TO SERVER\n\t\t */\n\t\tboolean connection = connectToServer(oml_server);\n \n\t\t/**\n\t\t * CREATE THE HEADER\n\t\t */\n\t\tcreate_head();\n \n\t\t/**\n\t\t * SEND THE HEADER\n\t\t */\n\t\tboolean injection = inject_head();\n\t\t\n\t\tif( connection && injection ){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public void getConnection() throws Exception {\n\t\ttry {\n\t\t\tSystem.out.println(\"Waiting for new client!\");\n\n\n\n\t\t\tclient = serverSocket.accept();\n\t\t\tis = client.getInputStream();\n\t\t\tisr = new InputStreamReader(is);\n\t\t\tbr = new BufferedReader(isr);\n\t\t\tos = client.getOutputStream();\n\t\t\tosw = new OutputStreamWriter(os);\n\t\t\tpw = new PrintWriter(osw, true);\n\t\t\tsleep(500);\n\t\t\t//clientkey = getClientKey();\n\t\t\tSystem.out.println(\"Client has connected!\");\n\t\t\t\n\t\t\tGetTimestamp(\"Client Publickey is being stored: \" ) ;\n\t\t\t\n\t\t\tpublicKey = getClientPublicKey();\n\t\t\t\n\t\t\tGetTimestamp(\"Client Publickey is stored: \" ) ;\n\t\t\t\n\t\t\tString tosend = encrypt1(getSharedKey(), getClientPublicKey());\n\t\t\t\n\t\t\tGetTimestamp(\"Client sharedkey is being encrypted: \") ;\n\t\t\t\n\t\t\tGetTimestamp(\"Waiting for Authorization Request from Client: \");\n\t\t\t\n\t\t\t//getclientpublickey();\n\t\t\tgetAUTH_REQUEST();\n\t\t\t//getMessage();\n\n\t\t} catch (IOException | InterruptedException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t}", "public void clientStart()\n\t{\n\t\tint cnt = 0;\n\t\tfor(ConnectionThread i : connectionPool)\n\t\t{\n\t\t\ti.sendMessage(\"Rock and Roll\");\n\t\t\taddText(\"send start signal to Player\" + cnt++);\n\t\t}\n\t\tchangePicture();\n\t}", "public void startConnection(String ip, int port) throws IOException {\n clientSocket = new Socket(ip, port);\n // Return an output stream of this socket.\n dOut = new DataOutputStream(clientSocket.getOutputStream());\n // Return an input stream of this socket.\n dIn = new DataInputStream(clientSocket.getInputStream());\n }", "public static void openConnection() {\n\t\tarcade.startConnection();\n\t}", "public boolean start() {\n\t\t\n\t\t// Try to connect to the server\n\t\t\n\t\ttry {\n\t\t\tsocket = new Socket(server, port);\n\t\t}\n\t\t\n\t\t// If failed can only display the error\n\t\t\n\t\tcatch(Exception ec) {\n\t\t\tdisplay(\"Error connectiong to server:\" + ec);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString msg = \"Connection accepted \" + socket.getInetAddress() + \" : \" + socket.getPort();\n\t\tdisplay(msg);\n\t\n\t\t// Creating I/O data streams\n\t\t\n\t\ttry\n\t\t{\n\t\t\tsInput = new ObjectInputStream(socket.getInputStream());\n\t\t\tsOutput = new ObjectOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Exception creating new Input/output Streams: \" + eIO);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Creates Server listener Thread \n\t\t\n\t\tnew ListenFromServer().start();\n\t\t\n\t\t// Send username to the server as a string - all chat messages will be sent as objects\n\t\t\n\t\ttry {\n\t\t\tsOutput.writeObject(username);\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Exception during login : \" + eIO);\n\t\t\tdisconnect();\n\t\t\treturn false;\n\t\t}\n\t\treturn true; // Inform caller it worked\n\t}", "private boolean start() {\n // Create a socket\n try {\n socket = new Socket(server, port);\n } catch (IOException e) {\n //e.printStackTrace();\n System.out.println(\"Could not connect. Server is not on!\");\n return false;\n }\n\n // Attempt to create output stream\n try {\n sOutput = new ObjectOutputStream(socket.getOutputStream());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n // Attempt to create input stream\n try {\n sInput = new ObjectInputStream(socket.getInputStream());\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n\n // Create client thread to listen from the server for incoming messages\n Runnable r = new ListenFromServer();\n Thread t = new Thread(r);\n t.start();\n\n // After starting, send the clients username to the server.\n try {\n sOutput.writeObject(username);\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n\n return true;\n }", "private void start_Connexion()throws UnknownHostException, IOException{\n \tsocket = new Socket(IP,num_Socket);\n \tout = new ObjectOutputStream(socket.getOutputStream());\n \tin = new ObjectInputStream(socket.getInputStream());\n \t\n }", "public void doConnect() {\n Debug.logInfo(\"Connecting to \" + client.getServerURI() + \" with device name[\" + client.getClientId() + \"]\", MODULE);\n\n IMqttActionListener conListener = new IMqttActionListener() {\n\n public void onSuccess(IMqttToken asyncActionToken) {\n Debug.logInfo(\"Connected.\", MODULE);\n state = CONNECTED;\n carryOn();\n }\n\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n ex = exception;\n state = ERROR;\n Debug.logError(\"connect failed\" + exception.getMessage(), MODULE);\n carryOn();\n }\n\n public void carryOn() {\n synchronized (caller) {\n donext = true;\n caller.notifyAll();\n }\n }\n };\n\n try {\n // Connect using a non-blocking connect\n client.connect(conOpt, \"Connect sample context\", conListener);\n } catch (MqttException e) {\n // If though it is a non-blocking connect an exception can be\n // thrown if validation of parms fails or other checks such\n // as already connected fail.\n state = ERROR;\n donext = true;\n ex = e;\n }\n }", "private synchronized void doConnect() {\n try {\n String host = agent.getHost();\n int port = agent.getPort();\n log.fine(\"Connecting to server \" + host + ':' + port);\n socket = new Socket(host, port);\n input = socket.getInputStream();\n output = new OutputStreamWriter(socket.getOutputStream());\n disconnected = false;\n new Thread(this).start();\n\n // Automatically login! -> give an auth to the agent...\n TACMessage msg = new TACMessage(\"auth\");\n msg.setParameter(\"userName\", agent.getUser());\n msg.setParameter(\"userPW\", agent.getPassword());\n msg.setMessageReceiver(agent);\n sendMessage(msg);\n\n } catch (Exception e) {\n disconnected = true;\n log.log(Level.SEVERE, \"connection to server failed:\", e);\n socket = null;\n }\n }", "public void connect() {\n\t\ttry {\n\t\t\tconnection = new Socket(ip, serverPort); // 128.39.83.87 // 127.0.0.1\n\t\t\t\n\t\t\toutput = new BufferedWriter(new OutputStreamWriter(\n connection.getOutputStream()));\n\t\t\tinput = new BufferedReader(new InputStreamReader(\n connection.getInputStream()));\n\t\t\t\n\t\t\tif (hostName.equals(Constants.IDGK + Main.userName))\n\t\t\t\tsendText(\"1\" + Main.userName);\n\t\t\telse\n\t\t\t\tsendText(\"2\" + Main.userName);\n\t\t\t\n\t\t} catch (UnknownHostException e) {\n\t\t\tMain.LOGGER.log(Level.SEVERE, \"Error connecting server\", e);\n\t\t} catch (IOException e) {\n\t\t\tMain.LOGGER.log(Level.WARNING, \"Error making output/input\", e);\n\t\t}\n\t}", "public void start() throws Exception {\n ServerSocket socket = new ServerSocket(0);\n port = socket.getLocalPort();\n socket.close();\n\n final String[] localArgs = {\"-inMemory\", \"-port\", String.valueOf(port)};\n server = ServerRunner.createServerFromCommandLineArgs(localArgs);\n server.start();\n url = \"http://localhost:\" + port;\n\n // internal client connection so we can easily stop, cleanup, etc. later\n this.dynamodb = getClient();\n }", "public TcpClient() {\n connector = new NioSocketConnector();\n connector.setHandler(this);\n connector.getFilterChain().addLast(\"codec\", \n new ProtocolCodecFilter(new TextLineCodecFactory(Charset.forName(\"UTF-8\")))); \n ConnectFuture connFuture = connector.connect(new InetSocketAddress(\"localhost\", TcpServer.PORT));\n connFuture.awaitUninterruptibly();\n session = connFuture.getSession();\n }", "public void startRunning(){\r\n\t\ttry{\r\n\t\t\twhile( true ){\r\n\t\t\t\tserver = new ServerSocket(PORT);\r\n\t\t\t\ttry{\r\n\t\t\t\t\twaitForClient(1);\r\n\t\t\t\t\twaitForClient(2);\r\n\t\t\t\t\tnew ServerThread(connectionClient1, connectionClient2, this).start();\r\n\t\t\t\t}\r\n\t\t\t\tcatch( EOFException e ){\r\n\t\t\t\t\tshowMessage(\"\\nServer ended the connection\");\r\n\t\t\t\t}\r\n\t\t\t\tfinally {\r\n\t\t\t\t\tserver.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch( IOException e ){\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void start() {\n\t\tscavenger.start();\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (!serverSocket.isClosed()) {\r\n\t\t\t\t\tSocket socket = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsocket = serverSocket.accept();\r\n\t\t\t\t\t\tscavenger.addSocket(socket);\r\n\t\t\t\t\t\tnew SynchronousSocketThread(socket).start();\r\n\t\t\t\t\t} catch (Exception e) {\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}.start();\r\n\t}", "public void connect() {}", "private boolean start() {\n // Create a socket\n try {\n socket = new Socket(server, port);\n } catch (IOException e) {\n System.out.println( \"Don't try to connect before the server starts!\");\n return false;\n //e.printStackTrace();\n }\n\n // Create your input and output streams\n try {\n sInput = new ObjectInputStream(socket.getInputStream());\n sOutput = new ObjectOutputStream(socket.getOutputStream());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // This thread will listen from the server for incoming messages\n Runnable r = new ListenFromServer();\n Thread t = new Thread(r);\n t.start();\n\n // After starting, send the clients username to the server.\n try {\n sOutput.writeObject(username);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return true;\n }", "private void connectToServer() throws IOException {\n\t\tna.message(\"Connecting to \" + serverAddress.getHostAddress()\n\t\t\t\t+ \" at port#: \" + portNumber);\n\t\tclientSocket = new Socket(serverAddress, portNumber);\n\t}", "private void connectToServer() {\n\t\ttry {\n\n\t\t\tSystem.out.println(\"Attempting connection to server at port: 5555\");\n\t\t\tsocket = new Socket(\"localhost\", 5554);\n\t\t\tSystem.out.println(\"Connected to server at port: 5555\");\n\n\t\t\tobjectOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tobjectInputStream = new ObjectInputStream(socket.getInputStream());\n\t\t\t\n\t\t\t// sending client object to server\n\t\t\tobjectOutputStream.writeInt(Main.getUser().getUserId());\n\t\t\tobjectOutputStream.flush();\n\t\t} catch (UnknownHostException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "public static void connect() {\n \t\tconnPool.start();\n \t}", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "private void start(String[] args){\n\t\tServerSocket listenSocket;\n\n\t\ttry {\n\t\t\tlistenSocket = new ServerSocket(Integer.parseInt(args[0])); //port\n\t\t\tSystem.out.println(\"Server ready...\");\n\t\t\twhile (true) {\n\t\t\t\tSocket clientSocket = listenSocket.accept();\n\t\t\t\tSystem.out.println(\"Connexion from:\" + clientSocket.getInetAddress());\n\t\t\t\tClientThread ct = new ClientThread(this,clientSocket);\n\t\t\t\tct.start();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error in EchoServer:\" + e);\n\t\t}\n\t}", "public void start()\r\n {\r\n System.out.print(\"Server host? [localhost]: \");\r\n String host = scanner.nextLine().trim();\r\n if(host.length() == 0)\r\n {\r\n host = \"localhost\";\r\n }\r\n \r\n System.out.print(\"Server port? [2345]: \");\r\n String portString = scanner.nextLine().trim();\r\n if(portString.length() == 0)\r\n {\r\n portString = \"2345\";\r\n }\r\n int port = Integer.parseInt(portString);\r\n //trying to establish connection through the socket\r\n try(Socket socket = new Socket(host, port))\r\n {\r\n //creating i/o streams\r\n outputStream = new ObjectOutputStream(socket.getOutputStream());\r\n HelloRequest request = new HelloRequest();\r\n request.setName(\"world\");\r\n outputStream.writeObject(request);\r\n inputStream = new ObjectInputStream(socket.getInputStream());\r\n inputStream.readObject();\r\n System.out.println(\"Server connected.\");\r\n \r\n // login.\r\n while(!this.login())\r\n {\r\n ;\r\n }\r\n \r\n // Executing users input\r\n options:\r\n while(true)\r\n {\r\n try\r\n {\r\n int option = this.readOption(\"1. Create a game 2. Set commands 3. Get high scores 4. Delete a game 5. Start a game 6. Show a game 7. Logout : \", 1, 7);\r\n switch(option)\r\n {\r\n case 1: this.createGame(); break;\r\n case 2: this.setCommands(); break;\r\n case 3: this.getHighScores(); break;\r\n case 4: this.deleteGame(); break;\r\n case 5: this.startGame(); break;\r\n case 6: this.showGame(); break;\r\n case 7: this.logout(); break options;\r\n }\r\n }catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n }catch(Exception e)\r\n {\r\n throw new RuntimeException(e);\r\n }\r\n }", "public void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(host, port);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error connecting: \" + e.getMessage());\n\t\t}\n\t}", "public boolean connect(){\r\n\r\n\t\t// Connect to server via TCP socket\r\n\t\ttry {\r\n\r\n\t\t\tclient = new Socket(host, port);\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"[EXCEPTION] connecting to server\");\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Connection to server could not be made. Try again later.\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\r\n\t\t// Get input and output Streams\r\n\t\ttry {\r\n\r\n\t\t\tpw = new PrintWriter(client.getOutputStream());\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(client.getInputStream()));\r\n\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"[EXCEPTION] creating streams\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Connection to server SUCESSFULL\");\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void run() \n\t{\n\t\tcommunicator = com.zeroc.Ice.Util.initialize();\n GameServerPrx clientPrx = GameServerPrx.checkedCast(\n communicator.stringToProxy(\"client:default -h 58.167.142.74 -p 10002\")).ice_twoway().ice_secure(false).ice_collocationOptimized(false).ice_compress(true);\n\n if(clientPrx == null)\n {\n //If connection is failed due to server problems\n System.err.println(\"SB Connect: \" + \"Invalid proxy\");\n return;\n }\n System.out.println(\"SB Connect: \" + \"Connected\");\n Server server = new Server();\n server.address = ServerInfo.ADDRESS;\n server.UUID = ServerInfo.UUID;\n server.port = ServerInfo.PORT;\n server.name = ServerInfo.NAME;\n server.players = (short) players;\n\t\tclientPrx.sendServerDetails(server);\n\t\tSystem.out.println(\"SB Connect: \" + \"Data sent\");\n\t}", "public void establishSocketConnection() {\n\t\ttry {\n\t\t\tsocket = new Socket(serverIP, serverPort);\n\t\t\tlogger.info(\"Connection with JSON-RPC server opened at local endpoint \" + socket.getLocalAddress().getHostAddress() + \":\" + socket.getLocalPort());\n\t\t\t// create a writer to send JSON-RPC requests to the JSON-RPC server\n\t\t\twriter = new OutputStreamWriter(socket.getOutputStream(), \"utf-8\");\n\t\t\t// create a JsonReader object to receive JSON-RPC response\n\t\t\tjsonReader = new JsonReader(new InputStreamReader(socket.getInputStream(), \"utf-8\"));\n\t\t} catch (UnknownHostException e) {\n\t\t\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void openConnection () {\n String[] labels = {\"Host :\", \"Port :\"};\n String[] initialValues = {\"localhost\", \"1111\"};\n StandardDialogClient openHandler = new StandardDialogClient () {\n\t@Override\n\tpublic void dialogDismissed (StandardDialog d, int code) {\n\t try {\n\t InputDialog inputD = (InputDialog)d;\n\t if (inputD.wasCancelled ()) return;\n\t String[] results = inputD.getResults ();\n\t String host = results[0];\n\t String port = results[1];\n\t TwGateway connection =\n\t (TwGateway)TwGateway.openConnection (host, port);\n\t // The following call will fail if the G2 is secure.\n\t connection.login();\n\t setConnection (connection);\n\t } catch (Exception e) {\n\t new WarningDialog (null, \"Error During Connect\", true, e.toString (), null).setVisible (true);\n\t }\n\t}\n };\t \n\n new ConnectionInputDialog (getCurrentFrame (), \"Open Connection\",\n\t\t\t\t true, labels, initialValues,\n\t\t\t\t (StandardDialogClient) openHandler).setVisible (true);\n }", "public void run() {\n try {\n // accepts the connection request.\n SelectableChannel peerHandle = this._handle.accept();\n if (peerHandle != null) {\n // now, create a service handler object to serve the\n // the client.\n ServiceHandler handler =\n this._factory.createServiceHandler(\n this._reactor,\n peerHandle);\n if (handler != null)\n // give the service handler object a chance to initialize itself.\n handler.open();\n }\n } catch (IOException ex) {\n MDMS.ERROR(ex.getMessage());\n }\n }", "public synchronized void start() {\n\t\trunning=true;\n\t\tnew Thread(this).start();\n\t\t\n\t\tif(JOptionPane.showConfirmDialog(this, \"Do you want to run the server\")==0){\n\t\t\tsocketServer = new GameServer(this);\n\t\t\tsocketServer.start();\n\t\t\t\n\t\t}\n\t\tsocketClient=new GameClient(this, \"localhost\");\n\t\tsocketClient.start();\n\t}", "public void connect();", "public void connect();", "public void connect();", "public boolean start() {\n\t\ttry {\n\t\t\tsocket = new Socket(server, port);\n\t\t} \n\t\t\n\t\tcatch(Exception ec) {\n\t\t\tdisplay(\"Bląd podczas łaczenia z serwerem:\" + ec);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString msg = \"Połączono \" + socket.getInetAddress() + \":\" + socket.getPort();//popatrzyc\n\t\tdisplay(msg);\n\t\n\t\t\n\t\ttry\n\t\t{\n\t\t\tinput = new ObjectInputStream(socket.getInputStream());\n\t\t\toutput = new ObjectOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Exception creating new Input/output Streams: \" + eIO);\n\t\t\treturn false;\n\t\t}\n\n\t\t\n\t\tnew ListenFromServer().start();\n\t\t\n\t\ttry\n\t\t{\n\t\t\toutput.writeObject(username);\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Exception doing login : \" + eIO);\n\t\t\tdisconnect();\n\t\t\treturn false;\n\t\t}\t\n\t\treturn true;\n\t}", "public Connection(Socket client_socket) {\r\n client = client_socket;\r\n try {\r\n in = new DataInputStream(client.getInputStream());\r\n out = new PrintStream(client.getOutputStream());\r\n }\r\n catch (IOException e) {\r\n try { client.close(); } catch (IOException e2) { ; }\r\n System.err.println(\"Exception while getting socket streams: \" + e);\r\n return;\r\n }\r\n this.start();\r\n }", "@ Override\r\n\tpublic void start(Connection connection)\r\n\t{\n\r\n\t}", "@Override\n public void start() throws IOException\n {\n try\n {\n InetSocketAddress address = new InetSocketAddress(config.getHost(), config.getPort());\n sock = new Socket();\n sock.setSoTimeout(config.getReadTimeout());\n sock.connect(address, config.getReadTimeout());\n out = new ObjectOutputStream(new BufferedOutputStream(sock.getOutputStream()));\n out.flush();\n in = new ObjectInputStream(new BufferedInputStream(sock.getInputStream()));\n }\n catch (ConnectException ce)\n {\n log.info(\"Unable to connect to TCP socket on interface \" + config.getHost() + \" and port \" + config.getPort());\n throw ce;\n }\n }", "private void connectToServer() {\n\n try {\n this.socket = new Socket(InetAddress.getByName(serverIP), this.port);\n\n oos = new ObjectOutputStream(socket.getOutputStream());\n oos.flush();\n ois = new ObjectInputStream(socket.getInputStream());\n\n Message connectMessage = new Message(Message.CLIENT_CONNECT);\n connectMessage.setMessage(userName);\n sendToServer(connectMessage);\n\n Message message;\n while (true){// wait for welcome message\n message = (Message) ois.readObject();\n if(message != null && message.getType() == Message.WELCOME){\n handleMessage(message);\n break;\n }\n }\n\n } catch (UnknownHostException e) {\n e.printStackTrace();\n System.exit(0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void connect() throws Exception\n {\n if(connected)\n return;\n connectionSocket = new Socket(address, CommonRegister.DEFAULT_PORT);\n localPeerID = ++localPeerIDCount;\n initListener();\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n writer = new PrintWriter(connectionSocket.getOutputStream(),true);\n connected = true;\n }", "public void startListeningForConnection() {\n startInsecureListeningThread();\n }", "public void start() throws IOException {\n ThreadExecutor.registerClient(this.getClass().getName());\n tcpServer.startServer();\n }", "public void start(String ip, int port) throws IOException {\n if (client != null && !client.isClosed()) client.close();\n this.ip = ip;\n this.port = port;\n client = new Socket(ip, port);\n\n runConnectionEvent(new ClientConnectEvent(this, ConnectionType.CLIENT_SERVER_CONNECT));\n startInThread();\n }", "protected void connect() {\n\t\treadProperties();\n\t\tif (validateProperties())\n\t\t\tjuraMqttClient = createClient();\n\t}", "public void connect() {\n BotConnector newBot = new BotConnector();\n newBot.setEmail(this.email);\n newBot.setAuthenticationKey(key);\n newBot.setBotName(name);\n newBot.setRoom(room);\n //Start Listener Thread\n this.serverListener = new Thread(newBot, \"serverListener\");\n this.serverListener.start();\n }", "public void toThread() {\n\t\t// TODO Auto-generated method stub\n\t\tnew Thread(this).start();\n\t\tclient.start();\n\t}", "public static void runClient() {\n try // connect to server, get streams, process connection\n {\n connectToServer(); // create a Socket to make connection\n getStreams(); // get the input and output streams\n loginframe = new LoginFrame();\n loginframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n loginframe.setVisible(true);\n\n processConnection(); // process connection\n } // end try\n catch (EOFException eofException) {\n displayMessage(\"\\nClient terminated connection\");\n } // end catch\n catch (IOException ioException) {\n ioException.printStackTrace();\n } // end catch\n finally {\n closeConnection(); // close connection\n } // end finally\n }", "public void start() {\n // set player number\n playerNumber = clientTUI.getInt(\"set player number (2-4):\");\n while (true) {\n try {\n game = new Game();\n game.setPlayerNumber(playerNumber - 1);\n host = this.clientTUI.getString(\"server IP address:\");\n port = this.clientTUI.getInt(\"server port number:\");\n clientName = this.clientTUI.getString(\"your name:\");\n player = clientTUI.getBoolean(\"are you human (or AI): (true/false)\") ?\n new HumanPlayer(clientName) : new ComputerPlayer(clientName);\n game.join(player);\n // initialize the game\n game.init();\n while (clientName.indexOf(' ') >= 0) {\n clientName = this.clientTUI.getString(\"re-input your name without space:\");\n }\n this.createConnection();\n this.sendJoin(clientName);\n this.handleJoin();\n if (handshake) {\n run();\n } else {\n if (!this.clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n } catch (ServerUnavailableException e) {\n clientTUI.showMessage(\"A ServerUnavailableException error occurred: \" + e.getMessage());\n if (!clientTUI.getBoolean(\"Do you want to open a new connection?\")) {\n shutdown();\n break;\n }\n }\n }\n clientTUI.showMessage(\"Exiting...\");\n }", "public static void openConnection() {\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\t\tconexion = DriverManager.getConnection(\"jdbc:mysql://192.168.1.51:9090?useTimeone=true&serverTimezone=UTC\",\n\t\t\t\t\t\"remote\", \"Password123\");// credenciales temporales\n\t\t\tSystem.out.print(\"Server Connected\");\n\n\t\t} catch (SQLException | ClassNotFoundException ex) {\n\t\t\tSystem.out.print(\"No se ha podido conectar con mi base de datos\");\n\t\t\tSystem.out.println(ex.getMessage());\n\n\t\t}\n\n\t}", "public void start() {\n System.out.println(\"server started\");\n mTerminalNetwork.listen(mTerminalConfig.port);\n }", "public boolean start() {\n\t\t// Tenta se conectar ao servidor\n\t\ttry {\n\t\t\tsocket = new Socket(server, port); //assimila o socket e busca conexão caso a porta esteja aberta\n\t\t} \n\t\tcatch(Exception ec) {\n\t\t\tdisplay(\"Não foi possível estabelecer a conexão com o servidor\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString msg = \"Conexão estabelecida com servidor [\" + socket.getInetAddress() + \":\" + socket.getPort()+\"]\";\n\t\tdisplay(msg);\n\t\n\t\t\n\t\t\n\t\t//\tCria canal de entrada e canal de saida com servidor\n\t\ttry\n\t\t{\n\t\t\tsInput = new ObjectInputStream(socket.getInputStream());\n\t\t\tsOutput = new ObjectOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch (IOException eIO) {\n\t\t\tdisplay(\"Não foi possível criar canais de comunicação\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// INCIA THREAD ( escuta o servidor ) \n\t\tnew ListenFromServer().start();\n\t\t\n\t\t\n\t\t// tenta enviar a primeira mensagem\n\t\ttry\t{\n\t\t\tsOutput.writeObject(username);\n\t\t} catch (IOException eIO) {\n\t\t\tdisplay(\"A comunicação não foi estabelecida por completo, a conexão será desfeita\");\n\t\t\tdisconnect();\n\t\t\treturn false;\n\t\t}\n\n\t\t//retorna true para validar a conexão estabelecida\n\t\treturn true;\n\t}", "public void start() {\n\t\tconnection.start((sender, message) -> message.accept(new Visitor(sender)));\n\t\tloadData();\n\t}", "public void startClient() throws RemoteException {\n\t\t\n\t\t// object to be passed to server\n\t\tString[] details = { name, dob, country, clientServiceName, hostName };\n\n\t\t// creating server stub \n\t\ttry {\n\t\t\tNaming.rebind(\"rmi://\" + hostName + \"/\" + clientServiceName, this);\n\t\t\tIServer = (IChatServer) Naming.lookup(\"rmi://\" + hostName + \"/\" + serviceName);\n\t\t} catch (ConnectException e) {\n\t\t\tJOptionPane.showMessageDialog(chatGUI.frame, \"The server seems to be unavailable\\nPlease try later\",\n\t\t\t\t\t\"Connection problem\", JOptionPane.ERROR_MESSAGE);\n\t\t\tconnectionProblem = true;\n\t\t\te.printStackTrace();\n\t\t} catch (NotBoundException | MalformedURLException me) {\n\t\t\tconnectionProblem = true;\n\t\t\tme.printStackTrace();\n\t\t}\n\t\t// if no problem sends details object to the server to be processed\n\t\tif (!connectionProblem) {\n\t\t\tIServer.initiateRegister(details);\n\n\t\t}\n\t\t// print this if it was able to reach this point\n\t\tSystem.out.println(\"Client Listen RMI Server is running...\\n\");\n\t}", "void toConnect() throws Exception {\n\t\tnameField.setVisible(false);\n\t\tf.setTitle(nameField.getText());\n\t\tsocketToServer = new Socket(\"127.0.0.1\", 5050);\n\t\tmyOutputStream = new ObjectOutputStream(socketToServer.getOutputStream());\n\t\tmyInputStream = new ObjectInputStream(socketToServer.getInputStream()); \n\t\tconnected();\n\t\tstart();\n\t}", "public void startConnection(ObjectOutputStream out, ObjectInputStream in, InetAddress clientInetAddress){\r\n\t\tMessengerHandler chat = new MessengerHandler(out, in, clientInetAddress);\r\n\t\tchat.start();\r\n\t}", "public ControlCenter(){\n serverConnect = new Sockets();\n serverConnect.startClient(\"127.0.0.1\", 5000);\n port = 5000;\n }", "public void start() {\n System.err.println(\"Server will listen on \" + server.getAddress());\n server.start();\n }", "public void startThread(){\n String message = \"Connecting to RescueNet...Please Wait\";\n showProgressDialog(message);\n connectionThread = new ConnectionThread(mwifiAdmin, handlerMain);\n connectionThread.start();\n }", "void startConnectionReader()\n {\n if (! synchronousMode)\n {\n connectionReader.start();\n }\n }", "public void run() {\n sendMessageToClient(\"Connexion au serveur réussie\");\n\n while (isActive) {\n try {\n String input = retrieveCommandFromClient();\n handleCommand(input);\n } catch (ServerException e) {\n System.out.println(e.getMessage());\n sendMessageToClient(e.getMessage());\n } catch (ClientOfflineException e) {\n System.out.println(\"Client # \" + clientId + \" deconnecte de facon innattendue\");\n deactivate();\n }\n }\n\n close();\n }", "@ReactMethod\n public void start() {\n ChirpError error = chirpConnect.start();\n if (error.getCode() > 0) {\n onError(context, error.getMessage());\n } else {\n isStarted = true;\n }\n }", "public void conectServer() {\n\n\t}", "public void connect() {\n if (isShutdown)\n return;\n\n setNewConnection(reconnectInternal());\n }", "public void connectToServer() throws IOException {\n\t\t\tString serverAddress = \"localhost\";\r\n\r\n\t\t\t// Make connection and initialize streams\r\n\t\t\tsocket = new Socket(serverAddress, 9898);\r\n\t\t\tin = new BufferedReader(\r\n\t\t\t\t\tnew InputStreamReader(socket.getInputStream()));\r\n\t\t\tout = new PrintWriter(socket.getOutputStream(), true);\r\n\t\t}", "public void init(){\n taskClient.connect(\"127.0.0.1\", 9123);\n }", "public void createConnection() throws ServerUnavailableException {\n clearConnection();\n while (serverSock == null) {\n try {\n // try to open a Socket to the server\n InetAddress addr = InetAddress.getByName(host);\n System.out.println(\"attempting to connect to \" + addr + \":\" + port + \"...\");\n serverSock = new Socket(addr, port);\n in = new BufferedReader(new InputStreamReader(serverSock.getInputStream()));\n out = new BufferedWriter(new OutputStreamWriter(serverSock.getOutputStream()));\n } catch (IOException e) {\n throw new ServerUnavailableException(\"Unable to connect to the server\");\n }\n }\n }", "public void start() {\n\n // ask information\n String address = JOptionPane.showInputDialog(null, \"Connect to server:\", \"Input\", JOptionPane.QUESTION_MESSAGE);\n String ac = JOptionPane.showInputDialog(null, \"Username:\", \"Input\", JOptionPane.QUESTION_MESSAGE);\n String pw = JOptionPane.showInputDialog(null, \"Password:\", \"Input\", JOptionPane.QUESTION_MESSAGE);\n\n try {\n\n // connect to server\n Socket s = new Socket(address, 9000);\n\n ObjectOutputStream w = new ObjectOutputStream(s.getOutputStream());\n ObjectInputStream r = new ObjectInputStream(s.getInputStream());\n\n Hash h = new Hash(); // hash password\n w.writeObject(new Message(ac, \"Teacher\", \"LOGIN\", 0, h.getHashCode(pw), null)); // check login status\n w.flush();\n Message m = (Message) r.readObject();\n if (m.command.equals(\"LOGIN_FAILED\")) { // display message and exit if fail\n\n JOptionPane.showMessageDialog(null, \"Login fail\", \"Message\", JOptionPane.INFORMATION_MESSAGE);\n System.exit(1);\n\n }\n\n server = address;\n peerList = (PeerList) m.peerList;\n port = (int) m.data;\n\n new Thread(new GUI()).start();\n while (initialized == false){ // wait until setup all GUI components\n\n Thread.sleep(500);\n\n }\n\n new Thread(new upload()).start();\n new Thread(new updateList()).start();\n new Thread(new download(address, 9001)).start(); // try to connect server by port 9001, 9002, 9003...\n\n } catch (Exception e) {\n\n System.exit(1);\n\n }\n\n }" ]
[ "0.7604471", "0.7504551", "0.7471868", "0.7366922", "0.7336662", "0.7329941", "0.7119226", "0.70696485", "0.70515615", "0.7045348", "0.70395505", "0.7008087", "0.7001322", "0.69844145", "0.6967239", "0.69420296", "0.69323516", "0.69268674", "0.6913081", "0.6906004", "0.6905094", "0.6902172", "0.68820685", "0.6878777", "0.685495", "0.6845714", "0.6845486", "0.68155026", "0.68126565", "0.68089205", "0.67964315", "0.6786112", "0.6768859", "0.67658734", "0.676559", "0.6762513", "0.6742429", "0.6738847", "0.6707141", "0.67061764", "0.66946536", "0.667758", "0.6677566", "0.6675185", "0.6668547", "0.66620463", "0.6629676", "0.66283816", "0.66236484", "0.6612458", "0.6586833", "0.65751845", "0.6570274", "0.65597343", "0.65589195", "0.6552312", "0.65496117", "0.654255", "0.65407944", "0.653845", "0.65258664", "0.65105546", "0.6506408", "0.6498076", "0.6491491", "0.6475731", "0.6475731", "0.6475731", "0.6466623", "0.64592624", "0.6454559", "0.6445926", "0.6438772", "0.64366454", "0.6436219", "0.6435683", "0.6433996", "0.64324653", "0.64299417", "0.6412679", "0.6410425", "0.6405162", "0.6395144", "0.6395139", "0.6393067", "0.6369594", "0.63689286", "0.6361978", "0.63558406", "0.63477117", "0.6337875", "0.6328677", "0.6322879", "0.63144225", "0.6313735", "0.63131434", "0.6297975", "0.6293005", "0.62925315", "0.628953", "0.62889487" ]
0.0
-1
This method will validate the +OK message received from the server when entering an username
private boolean validateServerMessage(ClientMessage clientMessage, ServerMessage serverMessage) { boolean isValid = false; try { byte[] hash = java.security.MessageDigest.getInstance("MD5").digest(clientMessage.toString().getBytes()); String encodedHash = new String(java.util.Base64.getEncoder().encode(hash)); if ((serverMessage.getMessageType().equals(ServerMessage.MessageType.OK)) && (encodedHash.equals(serverMessage.getPayload()))) { isValid = true; } } catch (java.security.NoSuchAlgorithmException e) { e.printStackTrace(); } return isValid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkUsername() {\n if(getUsername.getText().compareTo(\"\") != 0) { return true; }\n else {\n errorMessage.setText(\"Please enter a username.\");\n return false;\n }\n }", "private void handleUser(String username) {\n if (username.toLowerCase().equals(validUser)) {\n sendMsgToClient(\"331 User name okay, need password\");\n currentUserStatus = userStatus.ENTEREDUSERNAME;\n } else if (currentUserStatus == userStatus.LOGGEDIN) {\n sendMsgToClient(\"530 User already logged in\");\n } else {\n sendMsgToClient(\"530 Not logged in\");\n }\n }", "public boolean checkUsername(String user) {\n\n }", "private boolean validateUsername() {\n // Get doctor's username\n EditText doctorUsername = (EditText) rootView.findViewById(R.id.doctorField);\n String doctorUsernameString = doctorUsername.getText().toString();\n // Query on server using that username\n try {\n String query = String.format(\"select `username` from `user` inner join `doctor` on user.id=doctor.userid where username='%s'\", doctorUsernameString); // query to check username existence\n Document document = Jsoup.connect(Constants.SERVER + query).get();\n String queryJson = document.body().html();\n if (queryJson.equals(\"0\")) { // Username not existed\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Get patient's username\n EditText patientUsername = (EditText) rootView.findViewById(R.id.patientField);\n String patientUsernameString = patientUsername.getText().toString();\n // Query on server using that username\n try {\n String query = String.format(\"select `username` from `user` inner join `patient` on user.id=patient.userid where username='%s'\", patientUsernameString); // query to check username existence\n Document document = Jsoup.connect(Constants.SERVER + query).get();\n String queryJson = document.body().html();\n if (queryJson.equals(\"0\")) { // Username not existed\n return false;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return true;\n }", "private void validate(String name) {\r\n /*\r\n Check to make sure that name is not blank and as a size of at least three characters and does not contain any spaces\r\n constant for min username chars.\r\n */\r\n final int MIN_USERNAME_CHARS = 3;\r\n if (name.isEmpty() || name.length() < MIN_USERNAME_CHARS || name.contains(\" \")) {\r\n // if so, show error message box\r\n showError(\"You must have a name at least \" + MIN_USERNAME_CHARS + \" characters long and have no spaces.\", \"Error\");\r\n } else {\r\n // set the host name\r\n Preferences.getInstance().setHostName(name);\r\n Preferences.getInstance().save();\r\n // close the window\r\n close();\r\n }\r\n }", "@Override\n\tpublic int validateUsername(User u) {\n\t\treturn 0;\n\t}", "@When(\"^user should enter the valid username in the loginpage$\")\n\tpublic void user_should_enter_the_valid_username_in_the_loginpage() throws Throwable {\n\t inputValuestoElement(pa.getAp().getUsernamedisplay(), \"Srini1010\");\n\t}", "public boolean askForUsername()\r\n\t{\r\n\t\tboolean nameEntered = true;\r\n\r\n\t\tTextInputDialog dialog = new TextInputDialog();\r\n\t\tdialog.setTitle(\"Nom d'utilisateur\");\r\n\t\tdialog.setHeaderText(null);\r\n\t\tdialog.setContentText(\"Entrer un nom d'utilisateur:\");\r\n\t\tOptional<String> result = dialog.showAndWait();\r\n\t\tif (result.isPresent())\r\n\t\t{\r\n\t\t\ttextFieldNomUtilisateur.setText(result.get());\r\n\t\t} else\r\n\t\t{\r\n\t\t\tnameEntered = false;\r\n\t\t}\r\n\r\n\t\treturn nameEntered;\r\n\t}", "public void checkUsername(ActionEvent actionEvent) {\n String temp= ClientAPI.getForgetPassword(username.getText());\n if(temp==null){\n userExist.setVisible(true);\n } else{\n userExist.setVisible(false);\n question.setText(temp.substring(0, temp.indexOf(\"|\")));\n help=temp.substring(temp.indexOf(\"|\")+1, temp.lastIndexOf(\"|\"));\n password.setText(temp.substring(temp.lastIndexOf(\"|\")+1));\n question.setVisible(true);\n }\n }", "public void validateUsername() throws InvalidUserException\n\t{\n\t\tif (username.length() < MIN_USERNAME_LENGTH)\n\t\t\tthrow new InvalidUserException(\"Username must be \" + MIN_USERNAME_LENGTH + \" characters long\");\n\t\tif (!validateCharacters(username, VALID_CHARS_USERNAME))\n\t\t\tthrow new InvalidUserException(\"Invalid characters in username.\");\n\t\tif (username.equalsIgnoreCase(GAMEMANAGER))\n\t\t\tthrow new InvalidUserException(GAMEMANAGER + \" cannot be a player.\");\n\n\t}", "private Boolean isValidUsername(String username){\n return (username != null) && (username.length() >= 5 && username.length() <= 16);\n }", "public boolean validateUserName(String name)\n\t{\n\t\tif (username.getText().length() < MIN_USERNAME_LENGTH)\n\t\t{\n\t\t\tsetWarning(\"username too short\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!name.matches(\"^[a-zA-Z0-9]*$\"))\n\t\t{\n\t\t\tsetWarning(\"invalid username\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private boolean checkChangeUsernameValidity(String newUsername)\n {\n return (!newUsername.equals(\"\") && !newUsername.equals(controllerComponents.getAccount().getUsername()));\n }", "public static Boolean checkUsername(String username){\n\t\t//String username = txtUsername.getText();\n\t\t//System.out.println(username);\n\t\treturn (username.equals(\"Admin\"));\n\t}", "public void validateUserName(String name) {\n\t\ttry {\n\t\t\tAssert.assertTrue(userName.getText().equalsIgnoreCase(\"Hi \"+name),\"Username is correctly displayed\");\n\t\t\tLog.addMessage(\"Username correctly displayed\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Validation of User Login is failed\");\n\t\t\tLog.addMessage(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to validate User Login\");\n\t\t}\n\t}", "private boolean isUserNameValid(String username) {\n if (username == null) {\n return false;\n } else {\n return !username.trim().isEmpty();\n }\n }", "public boolean testUser(){\n VallidateUserName validator = new VallidateUserName();\n return validator.isValidUser(UserName);\n }", "private void validationUsername( String name ) throws Exception {\n\t\t\t if ( name != null && name.trim().length() < 3 ) {\n\t\t\t throw new Exception( \"Le nom d'utilisateur doit contenir au moins 3 caractères.\" );\n\t\t\t }\n\t\t\t}", "private boolean checkUsername(String newUsername, Label label)\n {\n label.setText(\"\");\n\n if(newUsername.length() == 0){\n label.setText(\"Please choose a username \");\n return false;\n }\n for(Account account : getListOfAccounts()){\n if(newUsername.equals(account.getUsername())){\n label.setText(\"This field is already taken by another account. Please choose another username\");\n return false;\n }\n }\n return true;\n }", "private void validationUsername( String username ) throws Exception {\n\n if ( username.length() < 4 ) {\n throw new Exception( \"Longueur du nom d'utilisateur invalide.\" );\n }\n if ( username == null ) {\n throw new Exception( \"Merci de saisir un nom d'utilisateur valide.\" );\n }\n }", "private boolean handleRegister(String serverMessage){\r\n\t\t// Separating the message STATUS + OTHER\r\n\t\tString[] messageParts = serverMessage.split(SEPARATOR);\r\n\r\n\t\t// Get status code from message\r\n\t\tint messageStatus = Integer.parseInt(messageParts[0]);\r\n\r\n\t\t// Process status\r\n\t\tswitch (messageStatus) {\r\n\t\tcase REQUEST_OK:\r\n\r\n\t\t\tSystem.out.println(\"Register request OK\");\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Username is crated now you can Sign in!\", \"Register successful\",\r\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn true;\r\n\r\n\t\tcase INCORRECT_REQUEST_FORMAT:\r\n\r\n\t\t\tSystem.err.println(\"Oups! \\nSomethin went wrong!\\n Request format was invalid\");\r\n\t\t\tbreak;\t\t\r\n\r\n\t\tcase USER_NAME_ALREADY_EXIST:\r\n\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Username alredy exists!\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public boolean verifyFields()\n\t{\n\t\t// check name first\n\t\tif (!validateUserName(username.getText()))\n\t\t\treturn false;\n\n\t\t// check address if name is valid\n\t\tif (!validateIP(address.getText()))\n\t\t{\n\t\t\tsetWarning(\"invalid address\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// only check port if name and address are okay\n\t\ttry\n\t\t{\n\t\t\tInteger.parseInt(port.getText());\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\tsetWarning(\"invalid port number\");\n\t\t\treturn false;\n\t\t}\n\n\t\tstatus.setTextFill(GREEN);\n\t\tstatus.setText(\"attempting connection\");\n\n\t\treturn true;\n\t}", "private void requestUserName() {\n // Show an alert to ask for the name\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Enter name:\");\n\n final EditText input_field = new EditText(this);\n\n builder.setView(input_field);\n\n // If a name is provided, let the user pass after pressing Ok\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n name = input_field.getText().toString();\n }\n });\n // If a no name is provided, prompt again\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n requestUserName();\n }\n });\n\n builder.show();\n }", "public boolean nameValidation(String username){\n return !(username.isEmpty() || !username.matches(\"[a-zA-Z0-9_-]+\"));\n }", "private boolean validateLogin() {\n final String userName = userText.getText().toString();\n final String userPass = passwordText.getText().toString();\n if (\"\".equals(userName)) {\n userText.setError(\"You must enter a username\");\n return false;\n }\n if (\"\".equals(userPass)) {\n passwordText.setError(\"You must enter a password\");\n return false;\n }\n return true;\n }", "private boolean validInput() throws SQLException {\n if (userNameField.getText().length() == 0) {\n displayMessage(messagePane, \"Name cannot be empty\", true);\n return false;\n }\n else if (userNameField.getText().length() == 1) {\n displayMessage(messagePane, \"Name cannot be empty\", true);\n return false;\n }\n else if (!isAllLetters(userNameField.getText())) {\n displayMessage(messagePane, \"Names must be all letters\", true);\n return false;\n }\n else if (!(userNameField.getText().contains(\" \")) || userNameField.getText().charAt(0) == ' ') {\n displayMessage(messagePane, \"Name must consist of two words\", true);\n return false;\n }\n else if (!(emailField.getText().contains(\"@\"))) {\n displayMessage(messagePane, \"Invalid email\", true);\n return false;\n }\n else if (DatabaseManager.isEmailTaken(user.getDatabaseConnection(), emailField.getText()) && !(emailField.getText().equals(user.getUser().getEmail()))){\n displayMessage(messagePane, \"Email is used before\", true);\n return false;\n }\n else {\n displayMessage(messagePane,\"Changes are saved\", false);\n return true;\n }\n }", "protected void validateJitterUsername(final String username) {\n Assert.notNull(username, VALUE_NOT_NULL);\n Assert.isTrue((username.length() >= VALIDATION_USERNAME_SIZE_MIN) &&\n (username.length() <= VALIDATION_USERNAME_SIZE_MAX), VALIDATE_NOTE_USERNAME_SIZE);\n }", "void askUsername();", "public abstract boolean checkUser(String username);", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "boolean hasUsername();", "public static String checkUsername(String in) {\n\t\tif (in.isEmpty())\r\n\t\t\treturn \"Username is empty\";\r\n\t\telse {\r\n\t\t\tPattern passPat = Pattern.compile(\"\\\\w*\");\r\n\t\t\tMatcher matchpass = passPat.matcher(in);\r\n\t\t\tif (!matchpass.matches()) {\r\n\t\t\t\treturn \"The username must only contain character and numeric\";\r\n\t\t\t} else\r\n\t\t\t\treturn null;\r\n\t\t}\r\n\t}", "public static boolean CheckUsernameAvailable(String username) {\n JSONObject obj = new JSONObject();\n try {\n obj.put(\"type\", \"checkUsernameAvailable\");\n obj.put(\"username\", username);\n outWriter.println(obj);\n return Boolean.parseBoolean(inReader.readLine().toString());\n } catch (Exception exc) {\n //TODO: Raise exceptions through the ExceptionHandler class.\n System.out.println(\"Connection check username available error: \" + exc.toString());\n }\n return false;\n }", "public boolean validateUser() throws IOException {\r\n\r\n JPanel panel = new JPanel(new BorderLayout(5, 5));\r\n\r\n JPanel label = new JPanel(new GridLayout(0, 1, 2, 2));\r\n label.add(new JLabel(\"Username\", SwingConstants.RIGHT));\r\n label.add(new JLabel(\"Password\", SwingConstants.RIGHT));\r\n panel.add(label, BorderLayout.WEST);\r\n\r\n JPanel controls = new JPanel(new GridLayout(0, 1, 2, 2));\r\n JTextField username = new JTextField();\r\n controls.add(username);\r\n JPasswordField password = new JPasswordField();\r\n controls.add(password);\r\n\r\n panel.add(controls, BorderLayout.CENTER);\r\n\r\n int showConfirmDialog = JOptionPane.showConfirmDialog(null, panel, \"Pladipus Login\", JOptionPane.OK_CANCEL_OPTION);\r\n\r\n if (showConfirmDialog == JOptionPane.CANCEL_OPTION) {\r\n return false;\r\n }\r\n\r\n String user = username.getText();\r\n String pass = new String(password.getPassword());\r\n\r\n if (login(user, pass)) {\r\n writeWorkerBash(user, pass);\r\n return true;\r\n } else {\r\n throw new SecurityException(\"User credentials are incorrect!\");\r\n }\r\n }", "private boolean validateInput() {\n String username = editUsername.getText().toString().trim();\n String email = editEmail.getText().toString().trim();\n String password = editPassword.getText().toString().trim();\n String repeatPassword = editRepeatPassword.getText().toString().trim();\n if (!password.equals(repeatPassword)) {\n ShowMessageUtil.tosatSlow(\"Enter passwords differ\", EmailRegisterActivity.this);\n return false;\n } else if (username.equals(\"\") || email.equals(\"\") || password.equals(\"\")) {\n ShowMessageUtil.tosatSlow(\"every item can not be empty!\", EmailRegisterActivity.this);\n return false;\n }\n if (username.length()>10){\n ShowMessageUtil.tosatSlow(\"the character length of the username can't be over than 10\", EmailRegisterActivity.this);\n return false;\n }\n return true;\n }", "@Override\n\tpublic void validateUserName(String name) throws UserException {\n\t\t\n\t}", "@Override\n public void displayInvalidUser() {\n Toast.makeText(this, \"Username cannot be blank or contain $\", Toast.LENGTH_LONG).show();\n }", "private boolean validateUser(HttpServletResponse resp, HttpServletRequest req, String username) throws IOException {\n\n SessionHandler session = (SessionHandler) req.getSession().getAttribute(\"authorized\");\n\n String sessionUsername = session.getUsername();\n\n if((!sessionUsername.equalsIgnoreCase(\"admin\")\n && !username.equalsIgnoreCase(sessionUsername))\n || !session.isAuthorized()\n ){\n page.redirectTo(\"/account\", resp, req,\n \"errorMessage\", \"Action not permitted!\");\n return false;\n }\n return true;\n }", "public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }", "public boolean isUserNameValid(String username) {\n return TextUtils.isEmpty(username);\n }", "public void userNameInput()\n {\n if(forgotPasswordModel.userExists(textBox1.getText())) {\n\n user = forgotPasswordModel.getUser(textBox1.getText());\n userName = false;\n secQuestion = true;\n String txt = \"Your secret question is: \" + user.getSecretQ();\n labelHeader.setText(txt);\n textBox1Label.setText(\"Answer\");\n textBox1.promptTextProperty().set(\"Security Question Answer\");\n textBox1.setText(\"\");\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(\"Username does not exist!\");\n alert.show();\n }\n }", "private void login() {\n\t\t \tetUserName.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etUserName);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t \t\n\t\t \t // TextWatcher would let us check validation error on the fly\n\t\t \tetPass.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etPass);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t }", "private boolean isUserNameValid(String username) {\r\n if (username == null) {\r\n return false;\r\n }\r\n if (username.contains(\"@\")) {\r\n return Patterns.EMAIL_ADDRESS.matcher(username).matches();\r\n } else {\r\n return !username.trim().isEmpty();\r\n }\r\n }", "public void getUsername(ActionEvent event) {\n GuiManager.setConnectionType(connectionType);\n try {\n GuiManager.getInstance().startRefresh();\n boolean isValid = GuiManager.getInstance().getConnectionController().restore(username.getText());\n if (isValid) {\n GuiManager.getInstance().setUsernameMainPlayer(username.getText());\n loginToLobby(event);\n } else\n usernameNotValid.setText(GUIParameters.LOGIN_ERROR);\n } catch (NoSuchElementException | ConnectException e) {\n usernameNotValid.setText(GUIParameters.SERVER_ERROR);\n }\n }", "public boolean onOkClicked() {\n try {\n if (form.isValid()) {\n String userName = form.getFieldValue(SysUser.USER_NAME_PROPERTY);\n String userAccount = form.getFieldValue(SysUser.USER_ACCOUNT_PROPERTY);\n String passWord = form.getFieldValue(SysUser.USER_PASSWORD_PROPERTY);\n String cPassWord = form.getFieldValue(\"cPassWord\");\n if (!passWord.equals(cPassWord)) {\n form.getField(SysUser.USER_PASSWORD_PROPERTY).setValue(\"\");\n form.getField(\"cPassWord\").setValue(\"\");\n form.getField(SysUser.USER_PASSWORD_PROPERTY).setFocus(true);\n addModel(\"msg\", \"密码不一致\");\n } else if (SysUserDao.getInstance().canCreate(getSysUser().getObjectContext(), userAccount)) {\n if (SysUserDao.getInstance().createSysUser(getSysUser().getObjectContext(), userName, userAccount, passWord)) {\n setRedirect(UserListPage.class);\n } else {\n addModel(\"msg\", \"失败\");\n }\n } else {\n form.getField(SysUser.USER_ACCOUNT_PROPERTY).setFocus(true);\n addModel(\"msg\", \"账号已存在\");\n }\n }\n } catch (Exception e) {\n logger.error(e.getLocalizedMessage(), e);\n }\n return true;\n }", "private boolean isValidInput() {\n if (null == mUsername || mUsername.length() <= 0) {\n return false;\n } else if (null == mPassword || mPassword.length() <= 0) {\n return false;\n }\n return true;\n }", "void checkUserName() {\n usernameChecked = false;\n signInUpController.checkUserName(userNameText.getText().toString(), new OnTaskListeners.Bool() {\n @Override\n public void onSuccess(Boolean result) {\n usernameChecked = true;\n if (result)\n uniqueUsername = false;\n else\n uniqueUsername = true;\n\n\n }\n });\n }", "private boolean isValidUsername(EditText edtDisplayName) {\n boolean isValid = edtDisplayName.getText().length() != 0;\n\n if (!isValid) {\n edtDisplayName.setError(getString(R.string.required_field));\n }\n\n return isValid;\n }", "@When(\"^The user enter the username$\")\n\tpublic void the_user_enter_the_username() throws Throwable {\n\t\t\n\t lpw.username_textbox();\n\t}", "private boolean isUserNameValid(String username) {\n if (username == null) {\n return false;\n }\n if (username.contains(\"@\")) {\n return Patterns.EMAIL_ADDRESS.matcher(username).matches();\n } else {\n return !username.trim().isEmpty();\n }\n }", "public void validateUserName(FacesContext context, UIComponent validate, Object value){\n\t\tcheckHibernateAnnotations(context, validate, value);\t\t\t\t\n\t\tString username=(String)value;\n\t\tif (!isUsernameAvailable(username)) {\n\t\t\tFacesMessage msg = new FacesMessage(\"ice username already taken\");\n\t\t\tcontext.addMessage(validate.getClientId(context), msg);\n\t\t\tusernameValid=false;\n\t\t}else usernameValid=true;\n\t}", "public void checkUsernameAvailability(final Context context, final UsernameValidityListener listener) {\n if (getLoginRestClient() != null) {\n // Trigger a fake registration (without password) to know whether the user name is available or not.\n RegistrationParams params = new RegistrationParams();\n params.username = mUsername;\n\n // Note: We do not pass sessionId here, this is not necessary.\n\n register(context, params, new InternalRegistrationListener() {\n @Override\n public void onRegistrationSuccess() {\n // The registration could not succeed without password.\n // Keep calling listener (the error case) as a fallback,\n listener.onUsernameAvailabilityChecked(false);\n }\n\n @Override\n public void onRegistrationFailed(String message) {\n listener.onUsernameAvailabilityChecked(!TextUtils.equals(MatrixError.USER_IN_USE, message));\n }\n\n @Override\n public void onResourceLimitExceeded(MatrixError e) {\n // Should not happen, consider user is available, registration will fail later on\n listener.onUsernameAvailabilityChecked(true);\n }\n });\n }\n }", "private boolean isInputValid() {\n\t\tString errorMessage = \"\";\n\t\t\n\t\tif(userNameField.getText() == null || userNameField.getText().length() == 0) {\n\t\t\terrorMessage += \"Üres a felhasználó név mező!\\n\";\n\t\t}\n\t\tif(passwordField.getText() == null || passwordField.getText().length() == 0) {\n\t\t\terrorMessage += \"Üres a jelszó mező!\";\n\t\t}\n\t\t\n\t\tif(errorMessage.length() == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// show the error message\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Érvénytelen mezők\");\n\t\t\talert.setHeaderText(\"Kérlek töltsd ki az összes mezőt!\");\n\t\t\talert.setContentText(errorMessage);\n\t\t\t\n\t\t\talert.showAndWait();\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t}", "private static Boolean testUsername(String username){\n\t\t//Setting Up Regex -> All Numbers and Letters maximum 14 signs\n\t\tString pattern =\"[A-z1-9]{2,14}\";\n\t\tPattern p = Pattern.compile(pattern);\n\t\tMatcher m = p.matcher(username);\n\t\t\t\n\t\tif(m.matches() && !username.isEmpty()){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "void setErrorUsername();", "public String validateUser(String un) {\n\t\tUser checkForUser = userDao.findByUsername(un);\n\t\tif (checkForUser != null) {\t\t\t\t\t//user exists\n\t\t\treturn \"That username already exists\";\n\t\t}\n\t\telse {\n\t\t\t//validate username\n\t\t\tif(!User.isValidUsername(un)) {\n\t\t\t\treturn \"Username must be between 5 and 11 characters and contain 1 alpha\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Test\r\n\tpublic void testUserNameEmpty() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(\"\");\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(VALID_SENDER_ACCOUNT_NUMBER);\r\n\t\taccountTransferRequest.setReceiverAccount(VALID_RECEIVER_ACCOUNT_NUMBER);\r\n\t\taccountTransferRequest.setTransferAmount(400.0);\t\t\r\n\t\ttry {\r\n\t\t\ttransferValidationUnit.validate(accountTransferRequest);\r\n\t\t\tAssert.fail(\"Exception_Expected\");\r\n\t\t} catch (ValidationException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t\tAssert.assertEquals(\"UserName_Cannot_Be_Null_Or_Empty\", exception.getMessage());\r\n\r\n\t\t}\r\n\t}", "public void testvalidateUserName0001()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertFalse(loginCheckTest.validateUserName(\"usrnm\"));\n\t}", "@Test\n void returnsTrueIfOnlyLetters() {\n Assertions.assertTrue(new UserValidator().isValidUsername(null));\n }", "public static String createUsername() {\r\n\t\tboolean complete = false;\r\n\t\tString username = \"\";\r\n\t\t\r\n\t\twhile(complete == false) {\r\n\t\t\tSystem.out.println(\"Please type a username (no spaces):\");\r\n\t\t\tusername = scan.nextLine();\r\n\t\t\t//us.checkExit(username);\r\n\t\t\t\r\n\t\t\tif(us.checkUniqueUsername(username) == false) {\r\n\t\t\t\tSystem.out.println(\"Username is taken, try again, partner.\");\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if(username.contains(\" \")) {\r\n\t\t\t\tSystem.out.println(\"Invalid username - contains space(s)\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tcomplete = true;\r\n\t\t}//While1\r\n\t\t\r\n\t\treturn username;\r\n\t}", "private boolean checkUserInput(String userName, String roundLimitInput) {\n\n boolean userNameAccepted = false;\n boolean roundLimitAccepted = false;\n\n String notification = \"\";\n\n if (userName.length() > 8) {\n notification += \"- Wow! Try using a shorter name!\\n(Up to 8 characters)\\n\";\n nameInputField.setText(\"\");\n } else if (userName.length() == 0) {\n notification += \"- You have to input a name!\\n\\n\";\n nameInputField.setText(\"\");\n } else {\n userNameAccepted = true;\n }\n\n\n // Check if user round limit input is an integer\n try {\n int roundLimit;\n roundLimit = Integer.parseInt(roundLimitInput);\n if (roundLimit <= 0) {\n notification += \"- You have to enter a number > 0 \\nas a round limit!\\n\";\n pointLimitInputField.setText(\"\");\n } else {\n roundLimitAccepted = true;\n }\n } catch (NumberFormatException e) {\n notification += \"- You have to enter an integer \\nfor the number of rounds!\\n\";\n }\n\n notificationMsg.setText(notification);\n\n return userNameAccepted && roundLimitAccepted;\n }", "public String checkUsername() {\n String username = \"\"; // Create username\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n username = checkEmpty(\"Account\"); // Call method to check input of username\n boolean isExist = false; // Check exist username\n for (Account acc : accounts) {\n // If username is exist, print out error\n if (username.equals(acc.getUsername())) {\n System.out.println(\"This account has already existed\");\n System.out.print(\"Try another account: \");\n isExist = true;\n }\n }\n // If username not exist then return username\n if (!isExist) {\n return username;\n }\n }\n return username; // Return username\n }", "@Test\n public void testInvalidUserName() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(INVALID_USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n\n }", "public static boolean validateUsername(String username) {\n CharSequence inputStr = username;\n Pattern pattern = Pattern.compile(\"^[a-zA-Z0-9_-]*$\");\n Matcher matcher = pattern.matcher(inputStr);\n return matcher.matches();\n }", "public UsernameOkResponse( IFieldsContainer container) throws Exception{\n\t\tthis(container.getFieldValue(UsernameMessageFieldValue.class).getUsername());\n\t}", "public void actionPerformed(ActionEvent e) {\n if (textField.getText().trim().equals(\"\")) {\r\n // prompt to user and do nothing\r\n JOptionPane.showMessageDialog(null, \"Please input a valid username\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n textField.setText(\"\");\r\n } else {\r\n // if checkbox for room drop down is selected meaning we are\r\n // connecting to a room\r\n if (chckbxNewCheckBox.isSelected() == true) {\r\n\r\n // if no tab exist with a chosen room name continue\r\n if (tabbedPane.indexOfTab(comboBox.getSelectedItem().toString()) == -1) {\r\n\r\n // get the room members\r\n Set<LongInteger> roomMembers = sock.getPresenceManager().membersOf(\r\n new LongInteger(comboBox.getSelectedItem().toString()));\r\n // initialize field to store room member names\r\n String[] roomMemberNames = new String[roomMembers.size()];\r\n // using for loop convert long to string and store\r\n // in room member name array\r\n int i = 0;\r\n for (LongInteger member : roomMembers) {\r\n roomMemberNames[i] = member.toString();\r\n i++;\r\n }\r\n\r\n // connect to room below and based on return type\r\n // add tab\r\n try {\r\n sock.executeCommand(new PresenceCommand(new LongInteger(comboBox.getSelectedItem()\r\n .toString()), true));\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n // add tab based on return type above\r\n // once you connect successfully disable the\r\n // username textfield\r\n textField.setEnabled(false);\r\n // add tab for Room to user chat\r\n addTab(comboBox.getSelectedItem().toString(), roomMemberNames, 1);\r\n } else {\r\n // prompt user and ensures that one does not open\r\n // multiple tabs to the same room\r\n JOptionPane.showMessageDialog(null, \"You are already connected to \"\r\n + comboBox.getSelectedItem().toString(), \"alert\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n // if checkbox for user is selected meaning we are\r\n // connecting to a user\r\n else if (chckbxNewCheckBox_1.isSelected() == true) {\r\n\r\n if (tabbedPane.indexOfTab(\"Chat with \" + textField_3.getText()) == -1) {\r\n // one does not connect to a user so the tab is\r\n // automatically created\r\n // once you connect successfully disable the\r\n // username textfield\r\n // disable the textfield for usernname\r\n textField.setEnabled(false);\r\n // add tab for User to user chat\r\n addTab(\"Chat with \" + textField_3.getText(), new String[] { textField_3.getText() }, 2);\r\n } else {\r\n // prompt user and ensures that one does not open\r\n // multiple tabs to the same user\r\n JOptionPane.showMessageDialog(null, \"You are already connected to \" + \"Chat with \"\r\n + textField_3.getText(), \"alert\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n }\r\n }", "@Override\n public void setUsername() {\n try {\n JCheckBox botCheckBox = (JCheckBox) logIn.getComponent(5);\n bot = botCheckBox.isSelected();\n if(bot) {\n try {\n int thinkingTime = Integer.parseInt((String) JOptionPane.showInputDialog(frame, \"Please enter the AI thinking time in seconds\", \"Thinking time\", JOptionPane.INFORMATION_MESSAGE, null, null, 0));\n client.setThinkintTime(thinkingTime);\n } catch (NumberFormatException e) {\n JOptionPane.showMessageDialog(frame, \"Set thinking time to 0\", \"Illegal input\", JOptionPane.ERROR_MESSAGE);\n client.setThinkintTime(0);\n }\n }\n username = ((JTextField) logIn.getComponent(3)).getText();\n client.setName(username);\n if(serverBrowser == null) {\n serverList();\n } else {\n frame.setContentPane(serverBrowser);\n ((JLabel)((JPanel) serverBrowser.getComponent(0)).getComponent(0)).setText(username);\n }\n } catch (IllegalNameException e) {\n JOptionPane.showMessageDialog(frame, \"Invalid name, please do not use ';' in your name.\", \"Ilegal username\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"am in Validate click\");\n\t\t\t\t\n\t\t\t\tString u=user.getText();\n\t\t\t\n\t\t\t\tString p=pwd.getText();\n\t\t\t\tif(u.equals(\"seed\")&&p.equals(\"infotech\"))\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"You are a Valid user\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"You are a InValid user\");\n\t\t\t\n\t\t\t\t\n\t\t\t}", "@FXML protected void handleSignUpButtonAction() {\n \tboolean bexit = false;\n \tif(passwordField.getText().equals(passwordField2.getText()))\n \t{\n \t\t\n \t\tString signUpUsername = username.getText();\n \t\tString signUpPassword = passwordField.getText();\n \t\t\n if(username.getText().toString().length() >= 6 && passwordField.getText().toString().length() >= 6)\n {\n\t \t\tUser user = new User(signUpUsername, \"Unknown\", null, \"Unknown\", signUpPassword);\n\t \t\t\n\t \t\ttry {\n\t\t\t\t\tuser = client.createUser(user);\n\t \t\t\n\t \t\t} catch (WebApplicationException e) {\n\t \t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t \t\t\tif (e.getResponse().getStatus() == 409) {\n\t \t\t\t\tactiontarget.setText(\"Sign up error: Username already exists\");\n\t \t\t\t} else {\n\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t} catch (JsonProcessingException e) {\n\t \t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t\t\t\t}\n\t \t\t\n\t \t\t// Go back to Login view\n\t \t\t\n\t \t\tLoginVistaNavigator.loadVista(LoginVistaNavigator.LOGIN);\n }\n else\n {\n \tactiontarget.setText(\"username/password \\nlength must be 6 number\");\n }\n \t}\n \telse\n \t{\n \t\tactiontarget.setText(\"password not consistent.\");\n \t}\n }", "private boolean userInfoCheck(){\n boolean isValid = true;\n EditText et_user_name = findViewById(R.id.et_client_fName);\n EditText et_user_location = findViewById(R.id.et_client_sName);\n if(et_user_name.getText().toString().trim().isEmpty()){\n et_user_name.setError(\"Name Cannot Be Empty\");\n isValid = false;\n }\n if (et_user_location.getText().toString().trim().isEmpty()){\n et_user_location.setError(\"Location Cannot Be Empty\");\n isValid = false;\n }\n return isValid;\n }", "@Test\n\tpublic void testingLoginUsername() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tusername.sendKeys(\"validUsername\");\n\t\tpassword.sendKeys(\"validPassword\");\n\t\tusername.submit();\n\t\t\n\t\tString welcomeUser = driver.findElement(By.className(\"dashwidget_label\")).getText();\n\t\tassertEquals(\"Welcome to Humanity!\", welcomeUser);\n\t\t\n\t}", "public void testvalidateUserName0002()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertTrue( loginCheckTest.validateUserName(\"username test\"));\n\t}", "public boolean validateuser(){\n if(fname.getText().toString().isEmpty()){\n fname.setError(\"Enter your first name\");\n fname.requestFocus();\n return false;\n }\n if(lname.getText().toString().isEmpty()){\n lname.setError(\"Enter your last name\");\n lname.requestFocus();\n return false;\n }\n if(username.getText().toString().isEmpty()){\n username.setError(\"Enter your last name\");\n username.requestFocus();\n return false;\n }\n if(password.getText().toString().isEmpty()||password.getText().toString().length()<6){\n password.setError(\"Enter your password with digit more than 6\");\n password.requestFocus();\n return false;\n }\n return true;\n }", "private boolean handleServerMessage(String serverMessage){\r\n\t\t// Separating the message STATUS + OTHER\r\n\t\tString[] messageParts = serverMessage.split(SEPARATOR);\r\n\r\n\t\t// Get status code from message\r\n\t\tint messageStatus = Integer.parseInt(messageParts[0]);\r\n\r\n\t\t// Process status\r\n\t\tswitch (messageStatus) {\r\n\t\tcase REQUEST_OK:\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Send Request OK\");\t\t\t\r\n\t\t\treturn true;\r\n\r\n\t\tcase INCORRECT_REQUEST_FORMAT:\r\n\t\t\t\t\t\t\r\n\t\t\tSystem.err.println(\"Oups! \\nSomethin went wrong!\\n Request format was invalid\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase INCORRECT_USER_OR_PASSWOROD:\r\n\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Username or password is incorrect!\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tbreak;\r\n\r\n\t\tcase USER_NAME_ALREADY_EXIST:\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Username alredy exists!\", \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void validateNameField() {\n\t\tif (nameField.getText().length() > 0) {\n\t\t\ttimeToPick.setEnabled(true);\n\t\t\tif (nameField.getText().length() > 24) {\n\t\t\t\tnameField.setText(nameField.getText().substring(0, 24));\n\t\t\t}\n\t\t\ttimeToPick.putClientProperty(\"playerName\", nameField.getText());\n\t\t} else {\n\t\t\ttimeToPick.setEnabled(false);\n\t\t}\n\t}", "private void serchUser() {\n if (!userNameTextField.getText().isEmpty() && !passwordPasswordField.getText().isEmpty()) {\n try {\n User user = UserController.searchUserByUserName(userNameTextField.getText());\n if (user != null) {\n if (passwordPasswordField.getText().equals(user.getPassword())) {\n closeFadeOut();\n Hi hi = new Hi();\n hi.setUser(user);\n hi.setVisible(true);\n dispose();\n } else {\n JOptionPane.showMessageDialog(this, \"Incorrect username or password !\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Incorrect username or password !\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Please enter username and password\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n\n }", "public boolean userNameExist(String username);", "private boolean validate(String username, String password) {\n\t\tif(username.equals(\"Venkat\") && password.equals(\"kumar\")) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void pedirNickname() {\n\t\tTextInputDialog dialog = new TextInputDialog(\"walter\");\n\t\tdialog.setTitle(\"Usuario\");\n\t\tdialog.setHeaderText(null);\n\t\tdialog.setContentText(\"Please enter your nickname:\");\n\t\tOptional<String> result = dialog.showAndWait();\n\t\tresult.ifPresent(name -> {\n\t\t\ttry {\n\t\t\t\tMain.getPartida().agregar(dialog.getContentText());\n\t\t\t\tMain.getPartida().guardar();\n\t\t\t\n\t\t\t} catch (JugadorYaRegistradoException | JugadorNoEncontradoException e) {\n\t\t\t\t\n\t\t\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\t\t\talert.setTitle(\"Pokemon Training\");\n\t\t\t\talert.setHeaderText(null);\n\t\t\t\talert.setContentText(e.getMessage());\n\t\t\t\tStage stage = (Stage) alert.getDialogPane().getScene().getWindow();\n\t\t\t\tstage.getIcons().add(new Image(\"data/pokeBall.png\"));\n\t\t\t\tButtonType butthole = new ButtonType(\"Suck my dick\");\n\t\t\t\talert.getButtonTypes().setAll(butthole);\n\t\t\t\tOptional<ButtonType>asshole=alert.showAndWait();\n\t\t\t\tasshole.ifPresent(f-> pedirNickname());\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "public boolean hasUsername() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasUsername() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public UsernameOkResponse( Username username ) throws Exception{\n\t\taddField(username);\n\t\taddField(ResponseMessageType.UsernameOk);\n\t}", "public boolean hasUsername() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasUsername() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public static void printUsername() {\n\t\tSystem.out.println(\"Enter the username\");\n\t\tString username = Utility.SCANNER.nextLine();\n\t\tint length = username.length();\n\t\tif(length > 3) {\n\t\t\tSystem.out.println(\"Hello \"+username+\", How are you?\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Invalid username\");\n\t\t}\n\t}", "private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a new one.\");\n dialog.button(\"OK\", true);\n dialog.show(stage);\n }", "private boolean usernameAvailable(String username) throws ParseException {\n ParseQuery<TipperUser> query = ParseQuery.getQuery(\"TipperUser\");\n query.whereEqualTo(\"username\", username);\n List<TipperUser> result = query.find();\n if (result.isEmpty()) {\n return true;\n } else return false;\n }", "public void testvalidateUserName0003()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertFalse(loginCheckTest.validateUserName(\"username test greater than\"));\n\t}", "public Boolean isUsernameExist(String username);", "public boolean checkUserName(TextField userName) {\n String userNameSQL = \"SELECT * FROM user WHERE user_name = ? \";\n ResultSet rsUser;\n boolean username_exists = false;\n\n\n try {\n\n PreparedStatement userPST = connection.prepareStatement(userNameSQL);\n userPST.setString(1, userName.getText());\n rsUser = userPST.executeQuery();\n\n if (rsUser.next()) {\n username_exists = true;\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Username Already Exists\");\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n return username_exists;\n\n }", "public boolean checkGoodName(Object bean, ValidatorAction va, Field field,\r\n\t\t\tActionMessages messages, HttpServletRequest request) {\r\n\r\n\t\tMemberForm memForm = (MemberForm)bean;\r\n\t\tString username = memForm.getMemberUserName();\r\n\r\n\r\n\t\ttry {\r\n\t\t\tStringUtil.checkGoodName(username);\r\n\t\t} catch (BadInputException e) {\r\n\t\t\tmessages.add(field.getKey(), Resources.getActionMessage(request,\r\n\t\t\t\t\tva, field));\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t}\r\n\r\n\t\tString unActivatePattern = sysProp.getValue(\"DEFAULT_USERNAME_PATTERN\");\r\n\r\n\t\tboolean validName = true;\r\n\t\tStringTokenizer st = new StringTokenizer(unActivatePattern, \",\");\r\n\t\twhile (st.hasMoreTokens()) {\r\n\t\t\tif (username.startsWith(st.nextToken())) {\r\n\t\t\t\tvalidName = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!validName) {\r\n\t\t\tmessages.add(field.getKey(), Resources.getActionMessage(request,\r\n\t\t\t\t\tva, field));\r\n\t\t}\r\n\r\n\t\treturn messages.isEmpty();\r\n\t}", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please type in the License Server\");\n else {\n \t//TODO add more checks\n \tok();\n }\n }", "public boolean hasUsername() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasUsername() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasUsername() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasUsername() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "private boolean validateInput() {\n boolean isValid = true;\n Alert errMsg = Util.getAlert(Alert.AlertType.ERROR);\n if (connectionsCB.getEditor().getText() == null || !Util.isValidAddress(connectionsCB.getEditor().getText())) {\n errMsg.setContentText(\"Invalid TRex Host Name or IP address\");\n isValid = false;\n } else if (!Util.isValidPort(rpcPort.getText())) {\n errMsg.setContentText(\"Invalid TRex Sync Port Number(\" + rpcPort.getText() + \")\");\n isValid = false;\n } else if (!Util.isValidPort(asyncPort.getText())) {\n errMsg.setContentText(\"Invalid Async Port Number(\" + asyncPort.getText() + \")\");\n isValid = false;\n } else if (Util.isNullOrEmpty(nameTF.getText())) {\n errMsg.setContentText(\"Name should not be empty\");\n isValid = false;\n }\n\n if (!isValid) {\n errMsg.show();\n }\n return isValid;\n }" ]
[ "0.754129", "0.7067024", "0.6936676", "0.67887956", "0.6784802", "0.6773584", "0.673128", "0.6708285", "0.6693184", "0.6693007", "0.6670489", "0.6665751", "0.66218674", "0.6610484", "0.6603897", "0.6567159", "0.65565634", "0.6535981", "0.65154636", "0.6512865", "0.651022", "0.64521945", "0.64291406", "0.6418541", "0.6418359", "0.64119846", "0.6391903", "0.63812834", "0.63652533", "0.6349474", "0.6349474", "0.6349474", "0.6349474", "0.6349474", "0.6349474", "0.63431996", "0.6337601", "0.63263035", "0.63074493", "0.630016", "0.6288474", "0.6273032", "0.6272496", "0.62482744", "0.62458736", "0.6243807", "0.62061334", "0.6196583", "0.61878836", "0.6182543", "0.61757565", "0.6174821", "0.61689657", "0.6151645", "0.6148716", "0.61343884", "0.6131457", "0.6127695", "0.61234814", "0.6120228", "0.6109759", "0.60371375", "0.60343266", "0.6030915", "0.60274935", "0.60270905", "0.6025737", "0.6011923", "0.6004631", "0.60009813", "0.59990144", "0.59958476", "0.59845823", "0.59834427", "0.5972286", "0.5966501", "0.5959932", "0.59586644", "0.595512", "0.59491605", "0.5942358", "0.5936823", "0.59250575", "0.59220064", "0.59220064", "0.5918923", "0.59110916", "0.59110916", "0.5908883", "0.59076273", "0.5905661", "0.5899026", "0.589491", "0.58910835", "0.58894074", "0.5887711", "0.5886536", "0.5886536", "0.58785826", "0.58785826", "0.5877803" ]
0.0
-1
This method will disconnect you from the server
private void disconnect() { if (readerThread != null) readerThread.kill(); if (writerThread != null) writerThread.kill(); if (nonblockReader != null) { nonblockReader.close(); } isConnected = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}", "public void disconnect() {}", "public void disconnect( ) {\n disconnect( \"\" );\n }", "public void disconnect();", "public void disconnect();", "public void disconnect();", "public void disconnect();", "public void disconnect()\n {\n isConnected = false;\n }", "void disconnect();", "void disconnect();", "public void disconnect() {\n\t\t\n\t}", "public void disconnect() {\n\t\tdisconnect(true);\n\t}", "public void disconnect() {\n SocketWrapper.getInstance(mContext).disConnect();\n }", "public void disconnect() {\n\t\tif (con.isConnected()) {\n\t\t\tcon.disconnect();\n\t\t}\n\t}", "void disconnect() throws Exception;", "public void disconnect() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tSystem.out.println(\"切断された/Disconnected\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"接続エラーが発生しました/Connection Close Error Occured\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public synchronized void disconnect()\r\n\t\t{\r\n\t\tif (state == RUNNING)\r\n\t\t stop();\r\n\t\tif (state == CLOSING_DOWN)\r\n\t\t {\r\n // Close the server socket\t\t \r\n try {\r\n \t\tserverSocket.close();\r\n \t}\r\n catch (IOException e)\r\n {\r\n }\r\n \r\n \t\t// flag the server as stopped\r\n \t\tstate = STOPPED;\r\n\t\t }\r\n\t\t}", "public void disconnect() {\n try {\n Socket socket = new Socket(\"127.0.0.1\",33333);\n ObjectOutputStream outputStream = new ObjectOutputStream(socket.getOutputStream());\n clientMain.clientData[1] = \"no\";\n outputStream.writeObject(clientMain.clientData);\n\n clientMain.showConnectionPage();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void disconnectFromServer() {\n\t\ttry {\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot disconnect from server\");\n\t\t}\n\t}", "public void disconnect()\r\n\t{\r\n\t\ttry {\r\n\t\t\tconnection_.close();\r\n\t\t} catch (IOException e) {} // How can closing a connection fail?\r\n\t\t\r\n\t}", "@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t}", "public void disconnect() {\n if (serverSocket != null) {\n try {\n serverSocket.close();\n Log.i(TAG, \"ServerSocket closed\");\n } catch (IOException e) {\n Log.e(TAG, \"Error closing the serverSocket\");\n }\n }\n\n sendDisconnectionMessage();\n\n // FIXME - Change this into a message sent it listener\n // Wait 2 seconds to disconnection message was sent\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n WiFiDirectUtils.clearServiceRequest(wiFiP2PInstance);\n WiFiDirectUtils.stopPeerDiscovering(wiFiP2PInstance);\n WiFiDirectUtils.removeGroup(wiFiP2PInstance);\n\n serverSocket = null;\n isRegistered = false;\n clientsConnected.clear();\n }\n }, 2000);\n }", "public static void disconnect() {\r\n if (isConnected()) {\r\n listener.interrupt();\r\n timerThread.interrupt();\r\n keepAliveThread.interrupt();\r\n db.writeDatabase();\r\n ObjectIO.writeObjectToFile(cmdPath, cmd);\r\n tc.stopCommands();\r\n ObjectIO.writeObjectToFile(tcPath, tc);\r\n try {\r\n irc.close();\r\n }\r\n catch (IOException e) { /* Shouldn't happen */ }\r\n }\r\n irc = null;\r\n }", "public void disconnect() {\n\t\tdisconnect(null);\n\t}", "private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }", "public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}", "public void disconnect ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"disconnect\", true);\n $in = _invoke ($out);\n return;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n disconnect ( );\n } finally {\n _releaseReply ($in);\n }\n }", "public static void disconnect() {\n \t\tconnPool.stop();\n \t}", "@Override\r\n\tpublic void disconnect();", "public void disconnect()\n {\n this.uri = null;\n this.userAddress = null;\n this.password = null;\n connected = false;\n }", "public void disconnect(){\n\t\tfor (NodeInfo peerInfo : peerList) {\r\n\t\t\t// send leave to peer\r\n\t\t\tsend(\"0114 LEAVE \" + ip + \" \" + port, peerInfo.getIp(), peerInfo.getPort());\r\n\t\t\t\r\n\t\t\tfor (NodeInfo peerInfo2 : peerList) {\r\n\t\t\t\tif (!peerInfo.equals(peerInfo2)) {\r\n\t\t\t\t\tString joinString = \"0114 JOIN \" + peerInfo2.getIp() + \" \" + peerInfo2.getPort();\r\n\t\t\t\t\t\r\n\t\t\t\t\tsend(joinString, peerInfo.getIp(), peerInfo.getPort());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tunRegisterBootstrapServer(serverIp, serverPort, ip, port, username);\r\n\t\t\tapp.printInfo(\"Node disconnected from server....\");\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//socket = null;\r\n\t}", "public void disconnect()\n\t{\n\t\tif (isConnected)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tvimPort.logout(serviceContent.getSessionManager());\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlogger.trace(\"Failed to logout esx: \" + host, e);\n\t\t\t}\n\t\t}\n\t\tisConnected = false;\n\t}", "@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\n\t\t\t\t\tSystem.out.println(\"CONNECTION HAS BEEN LOST.\");\r\n\t\t\t\t}", "void disconnect(String reason);", "public void disconnect() {\t\n\t\t\n\t\ttry {\n\t\t\tconnection.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Disconnected\");\n\t}", "public void disconnect() {\r\n\t\tif (connected.get()) {\r\n\t\t\tserverConnection.getConnection().requestDestToDisconnect(true);\r\n\t\t\tconnected.set(false);\r\n\t\t}\r\n\t}", "public void disconnect() {\n try {\n client.disconnect(null, null);\n } catch (MqttException e) {\n Debug.logError(e, MODULE);\n }\n }", "public void disconnectedFromHost();", "private void disconnect() {\n\t\t\n\t\ttry { \n\t\t\tif(sInput != null) sInput.close();\n\t\t} catch(Exception e) {} \n\t\t\n\t\t\n\t\ttry {\n\t\t\tif(sOutput != null) sOutput.close();\n\t\t} catch(Exception e) {} \n\t\t\n\t\t\n try{\n\t\t\tif(socket != null) socket.close();\n\t\t} catch(Exception e) {}\n\t\t\n // informa ao Gui\n if(clientGui != null) clientGui.connectionFailed();\n\t\t\t\n\t}", "public void disconnect() {\n try {\n if (socket != null)\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n isConnected = false;\n }", "public void disconnect() {\n try {\n telnet.disconnect();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void disconnect() {\r\n\t\tsuper.disconnect();\r\n\t}", "public void disconnect() throws OOBException {\n \t\tsession.disconnect();\n \t}", "private void disconnect() {\n\n if (inStream != null) {\n try {inStream.close();} catch (Exception e) { e.printStackTrace(); }\n }\n\n if (outStream != null) {\n try {outStream.close();} catch (Exception e) { e.printStackTrace(); }\n }\n\n if (socket != null) {\n try {socket.close();} catch (Exception e) { e.printStackTrace(); }\n }\n }", "public void disconnect() {\n\t\tif (_connection != null) {\n\t\t\ttry {\n\t\t\t\twhile (!_connection.isClosed()) {\n\t\t\t\t\t_connection.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) { /* ignore close errors */\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "protected void onDisconnect() {}", "@Override\n\tpublic void disconnect() {\n\t\t\n\t}", "@Override\n\tpublic void disconnect() {\n\t\t\n\t}", "public void disconnect() throws IOException;", "void onDisconnect();", "void onDisconnect();", "@Override\n\tpublic void disconnect() {\n\n\t}", "@Override\n\tpublic void disconnect() {\n\n\t}", "@Override\n public abstract void disconnect();", "@Override\n public void Disconnect() {\n bReConnect = true;\n }", "public void disconnect() {\n\t\tMessage quitMessage = Message.makeQuitMessage(getUserName());\n\t\tsocketConnection.print(quitMessage);\n\t\tKeyboardScanner.close();\n\t}", "void disconnect() throws IOException;", "public synchronized void close() {\n\t\t/**\n\t\t * DISCONNECT FROM SERVER\n\t\t */\n\t\tsrvDisconnect();\n\t}", "void disconnect() throws TransportException;", "public void disconnect()\t{\n try {\n doStream.close();\n }\tcatch (IOException\t|\tNullPointerException\te)\t{\n System.err.println(\"[DISCONNECT]\t\" + e.getMessage());\n }\n try {\n diStream.close();\n }\tcatch (IOException\t|\tNullPointerException\te)\t{\n System.err.println(\"[DISCONNECT]\t\" + e.getMessage());\n }\n try {\n sServidor.close();\n }\tcatch (IOException\t|\tNullPointerException\te)\t{\n System.err.println(\"[DISCONNECT]\t\" + e.getMessage());\n }\n }", "public void disconnect(){\n\t\tif(player!=null){\n\t\t\tplayer.getConnection().close();\n\t\t\t\n\t\t\t// we get no disconnect signal if we close the connection ourself\n\t\t\tnotifyHandlers(MessageFlag.DISCONNECTED);\n\t\t}\n\t}", "public void disconnect() throws IOException {\r\n socket.close();\r\n System.out.println(\"Disconnected\");\r\n }", "public void disconnect() {\n\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n\n if (outputStream != null) {\n outputStream.close();\n }\n\n if (socket != null ) {\n socket.close();\n connected = socket.isClosed();\n }\n } catch (IOException e) {\n logger.error(\"S7Client error [disconnect]: \" + e);\n }\n }", "public CompletionStage<Void> disconnect() {\n\t\treturn this.finConnection.sendMessage(\"disconnect-from-channel\", FinBeanUtils.toJsonObject(this.routingInfo)).thenAccept(ack->{\n\t\t\tif (!ack.isSuccess()) {\n\t\t\t\tthrow new RuntimeException(\"error disconnecting channel client, reason: \" + ack.getReason());\n\t\t\t}\n\t\t});\n\t}", "public void disconnect(ClientAddress clientAddress);", "public void disconnect() {\n\t\tif (sock != null) {\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t} catch (IOException ioe) {\n\t\t\t} finally {\n\t\t\t\tsock = null;\n\t\t\t}\n\t\t}\n\t\toutStream.reset();\n\t\tdisconnected();\n\t}", "@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t}", "private void disconnect()\r\n\t{\r\n\t\tif (theSocket != null)\r\n\t\t{\r\n\t\t\ttheSocket.transmit(\"Disconnecting\");\r\n\t\t\twriteLine(\"Disconnecting...\", 0);\r\n\t\t\twriteLine(\"Closing socket\", 0);\r\n\t\t\ttheSocket.close();\r\n\t\t\ttheSocket = null;\r\n\t\t}\r\n\t\tif (theSocket == null)\r\n\t\t{\r\n\t\t\twriteLine(\"The Socket is null\", 0);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twriteLine(\"We have now disconnected\", 0);\r\n\t\t}\r\n\t\trunning = false;\r\n\t}", "private void disconnect() {\n\t\ttry { \n\t\t\tif(sInput != null) sInput.close();\n\t\t}\n\t\tcatch(Exception e) {}\n\t\ttry {\n\t\t\tif(sOutput != null) sOutput.close();\n\t\t}\n\t\tcatch(Exception e) {}\n try{\n\t\t\tif(socket != null) socket.close();\n\t\t}\n\t\tcatch(Exception e) {}\n\t\t\n\t\t// Notify the GUI\n \n\t\tif(cg != null)\n\t\t\tcg.connectionFailed();\n\t\t\t\n\t}", "private void Disconnect() {\n //If the btSocket is busy\n if (btSocket!=null) {\n try {\n btSocket.close(); //close connection\n }\n catch (IOException e) {\n msg(\"Error\");\n }\n }\n finish(); //return to the first layout\n\n }", "public void disconnect()\n {\n \tLog.d(TAG, \"disconnect\");\n\n \tif(this.isConnected) {\n \t\t// Disable the client connection if have service\n \t\tif(mLedService != null) {\n \t\t\tthis.disable();\n \t\t}\n \t\t\n \t\t// Unbind service\n mContext.unbindService(mServiceConnection);\n \n this.isConnected = false;\n \t}\n }", "public void disconnect() throws IOException {\n sendMessageToServer(\"#Close connection#\");\n outputStream.close();\n inputStream.close();\n clientSocket.close();\n }", "private void shutdown() {\n clientTUI.showMessage(\"Closing the connection...\");\n try {\n in.close();\n out.close();\n serverSock.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void disconnect()\n\t{\n\t\tTASK_LIST.add(ArduinoComms::disconnectInternal);\n\t\tTASK_LIST.add(ArduinoComms::notifyDisconnected);\n\t\t//TODO if waiting at socket.connect from connect() notify the tread\n\t}", "public boolean disconnect() {\r\n\t\t\r\n\t\tString message;\r\n\t\t//ENTER YOUR CODE TO DISCONNECT\r\n\t\tif (isChatSessionOpened()){\r\n\t\t\tsendChatClosure();\r\n\t\t}\r\n\t\t\r\n\t\tmessage= \"106\";\r\n\t\tsendDatagramPacket(message);\r\n\t\t\r\n\t\tthis.connectedUser = null;\r\n\t\tthis.chatReceiver = null;\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "protected final void disconnect() {\n\t\trunning = false;\n\t\ttry {\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t\tif (in != null)\n\t\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {e.printStackTrace();}\n\t}", "void disconnect( String name )\n throws Exception;", "public void disconnectFromServer(boolean sendDisconnectToServer) {\n if (chatClientMainReceiver == null & sendDisconnectToServer){\n JOptionPane.showMessageDialog(null, \"You are not connected to a server\", Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n if (sendDisconnectToServer) {\n sendDisconnectToServer();\n }\n try {\n socket.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n socket = null;\n try {\n chatClientMainReceiver.socket.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n chatClientMainReceiver.socket = null;\n try {\n chatClientMainReceiver.stop();\n }catch (Exception ex){\n ex.printStackTrace();\n }\n chatClientMainReceiver = null;\n chatClientController.appendToPane(new Date(System.currentTimeMillis()) + \": Disconnected from server\", \"RED\", null);\n }", "public static void logout() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.logoutUser());\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void disconnectSSH(){\n\t log.info(\"Trying to disconnect to device \"+deviceIP+\" ...\\n\");\n\t session.disconnect();\n\t if(!session.isConnected())\n\t\t log.info(\"Successfully disconnected from device \"+deviceIP+\"\\n\");\n\t else\n\t\t log.error(\"Unable to disconnect to the device \"+deviceIP+\"\\n\");\n\t if(FETCHING_DATA_VIA_DATABASE){\n\t\t dbConnect.closeConnection();\n\t\t log.info(\"Successfully closed the database. \");\n\t }\n }", "private void disconnect() {\n System.out.println(String.format(\"連線中斷,%s\",\n clientSocket.getRemoteSocketAddress()));\n final int delete = thisPlayer.id - 1;\n player[delete] = null;\n empty.push(delete);\n }", "protected void kill() {\n disconnect = true;\n }", "public void disconnect() {\r\n\t\trunning = false;\r\n\t}", "@Override\n public void disconnect() {\n\n }", "public void disconnectConvo() {\n convo = null;\n setConnStatus(false);\n }", "public void Stop_Connection(){\n keepWalking = false; //gia na stamatisei to chat alliws to thread dn ginete interrupt gt dn stamataei i liturgeia tou.\n Chat_Thread.interrupt();\n try {\n if(oos != null) oos.close();\n if(ois != null) ois.close();\n } catch (IOException ex) {\n Logger.getLogger(ChatWithCC.class.getName()).log(Level.SEVERE, null, ex);\n }\n try {\n if(socket !=null) socket.close();\n } catch (IOException ex) {\n Logger.getLogger(ChatWithCC.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void disconnect() throws Exception\n {\n if(!connected)\n return;\n connectionSocket.close();\n reader.close();\n writer.close();\n listenerTimer.cancel();\n connected = false;\n\n }", "public void serverStop() {\n\t\tJOptionPane.showMessageDialog(dlg, \"与服务器失去连接\");\n\t\tserver = null;\n\t\tconnectAction.setEnabled(false);\n\t\t\n\t}", "public Reply\tdisconnect() throws ThingsException, InterruptedException ;", "public void disconnect() {\n \ttry {\n \t\tctx.unbindService(apiConnection);\n } catch(IllegalArgumentException e) {\n \t// Nothing to do\n }\n }", "public void handleDisconnect(){\r\n consoleAppend(this.getName() + \" disconnected.\");\r\n clientThreads.remove(getIndex(this.getName()));\r\n sendToAll(this.getName() + \" disconnected.\");\r\n sendCTToAll(new ControlToken(ControlToken.REMOVECODE, this.getName()));\r\n }", "public void disconnect(String message);", "public void disconnectedFrom(ServerDescriptor desc);", "void clientDisconnected(Client client, DisconnectInfo info);", "public static void disconnect() {\n if (AppSettings.bluetoothConnection != null) \n \tAppSettings.bluetoothConnection.stop();\n\t}", "@Override\n public void disconnect() {\n if(!isConnected)\n return;\n\n if(out!=null)\n out.close();\n\n if(in!=null) {\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void disconnect() {\n if (logger.isActivated()) {\n logger.info(\"Network access disconnected\");\n }\n ipAddress = null;\n }", "@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}", "protected void disconnect() {\n\t\tif (false == DOM.getElementPropertyBoolean(this.getFrame(), \"__connected\")) {\r\n\t\t\tthis.onUnableToConnect();\r\n\t\t} else {\r\n\t\t\tthis.restart();\r\n\t\t}\r\n\t}", "public void disconnect() {\n\t\ttry { \n\t\t\tif(loginInput != null) loginInput.close();\n\t\t\tif(registerInput != null) registerInput.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n\t\ttry {\n\t\t\tif(loginOutput != null) loginOutput.close();\n\t\t\tif(registerOutput != null) registerOutput.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n try{\n\t\t\tif(loginSocket != null) loginSocket.close();\n\t\t\tif(registerSocket != null) registerSocket.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n\n\t\tcg.connectionFailed();\n\t\t\t\n }", "public void disconnect() {if(mEnable) mBS.disconnect();}" ]
[ "0.85472995", "0.79801506", "0.7944128", "0.7875981", "0.7875981", "0.7875981", "0.7875981", "0.7784653", "0.77097946", "0.77097946", "0.77004623", "0.7647881", "0.7567827", "0.7564876", "0.75539446", "0.7535899", "0.7534336", "0.7525135", "0.75211", "0.7510092", "0.74977916", "0.748278", "0.74790204", "0.7475863", "0.74753964", "0.74509585", "0.74475694", "0.7418309", "0.73839396", "0.7381011", "0.7374792", "0.73742455", "0.7368215", "0.7353114", "0.7350367", "0.73344314", "0.7330972", "0.7283202", "0.7282498", "0.72784793", "0.7262214", "0.72573763", "0.72376275", "0.7224272", "0.72174793", "0.7208917", "0.7208397", "0.7208397", "0.7181949", "0.7181941", "0.7181941", "0.716373", "0.716373", "0.7139769", "0.71367663", "0.7133843", "0.7132604", "0.71312964", "0.7118738", "0.7096383", "0.70819986", "0.7077675", "0.70695764", "0.7067522", "0.7054637", "0.70541877", "0.70538986", "0.70446813", "0.70387363", "0.70348144", "0.70183825", "0.70068383", "0.70067805", "0.69970095", "0.6994247", "0.69898367", "0.69890934", "0.69886565", "0.69662106", "0.6953527", "0.6952811", "0.6929842", "0.6927536", "0.6924785", "0.69242805", "0.69120425", "0.6880586", "0.688001", "0.6869277", "0.68653846", "0.68647087", "0.686178", "0.684464", "0.68358094", "0.68335176", "0.6820546", "0.68164647", "0.6807067", "0.6805378", "0.680501", "0.6800547" ]
0.0
-1
declaration of a String array
public static void main(String[] args) { int[] ages; // declaration of an int array char[] characters; // declaration of a char array //NOT preferred ways of creating arrays String [] lastNames; String addresses []; //Giving a size to array String[] names = new String[3]; names[0] = "Kaan"; names[2] = "Mbappe"; System.out.println(names[0]); System.out.println(names[2]); System.out.println(names[1]); //null }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getStringArray();", "public void setStringArray(String[] value);", "private String[] toArray(String str) { String arr[] = new String[1]; arr[0] = str; return arr; }", "public JsArrayString generateArray(String[] array){\r\n\t\tif ( array==null||array.length==0)\r\n\t\t\treturn null ;\r\n\t\t\r\n\t\tJsArrayString retval = (JsArrayString)JavaScriptObject.createArray();\r\n\t\tfor ( String scn : array){\r\n\t\t\tretval.push(scn);\r\n\t\t}\r\n\t\treturn retval;\r\n\t\t\r\n\t}", "public static PropertyDescriptionBuilder<String[]> arrayOfStringsProperty(String name) {\n return PropertyDescriptionBuilder.start(name, String[].class, Parsers.parseArray(String.class, Parsers::parseString));\n }", "public void setArrString(java.lang.String[] arrString) {\n this.arrString = arrString;\n }", "private void declareArray() {\n\t\twriter.println();\n\t\twriter.println(\"; array of 52 for variables:\");\n\t\twriter.print(variables + \" dw\");\n\t\tfor (int i = 0; i < 51; i++) {\n\t\t\twriter.print(\" 0,\");\n\t\t}\n\t\twriter.println(\" 0\");\n\t}", "public static void initializeArr(String[] arr){\n\t for(int i = 0; i < arr.length; i++){\n\t arr[i] = \"\";\n\t }\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "public String[] getString();", "public String[] getArrayValue();", "private static void standardPopulate(String[] s) {\n\t\tfor(/*int i = 0; i<s.length;i++*//* String z: s*/ int i = 0;i<s.length;i++){\r\n\t\t\t//s[i] = \"String #\"+(i+1);\r\n\t\t\t/*i++;\r\n\t\t\tz = \"String #\"+(i+1); */\r\n\t\t\tString string= \"String #\"+(i+1);\r\n\t\t\ts[i] = string; // setting position i into string\r\n\t\t\t\r\n\t\t}\r\n\t}", "public StrArrayConverter()\n {\n this.defaultValue = null;\n this.useDefault = false;\n }", "public static String[] strings() {\n\tString[]update = new String[MAX];\n\tfor (int i = 0; i < MAX; i++) {\n\t update[i] = new String (\"george\");\n\t}\n\n\treturn update;\n }", "void setData(String[] data);", "public void genericStringArray() {\n\t\tArrayList<String> b1 = new ArrayList<String>();\n\t\tb1.add(\"ABC\");\n\t\tb1.add(\"sdfsdfs\");\n\t\tSystem.out.println(\"String generic ArrayList b1: \" + b1);\n\n\t}", "public void putArray(String str, A1e a1e) {\n boolean z;\n if (a1e != null) {\n z = false;\n }\n z = true;\n AnonymousClass0FY.A03(z, \"Illegal type provided\");\n putNativeArray(str, (WritableNativeArray) a1e);\n }", "private void testStringArray() {\n\t\tMessage message = Message.createMessage(getId(), \"Triggers\");\n\t\tString array[] = { \"Gimme\", \"a\", \"break\", \"dude\" };\n\t\tmessage.setPayload(array);\n\t\tsend(message);\n\t}", "public void testConstructorWithStringTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_FULL_STRING, \"1\", \"{\\\"string1\\\", \\\"string2\\\"}\"));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be String.\", TYPE_FULL_STRING, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n ObjectSpecification string1 = (ObjectSpecification) array1[0];\r\n ObjectSpecification string2 = (ObjectSpecification) array1[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertTrue(\"SpecType of array elements should be simple.\", string1.getSpecType().equals(\r\n ObjectSpecification.SIMPLE_SPECIFICATION)\r\n && string2.getSpecType().equals(ObjectSpecification.SIMPLE_SPECIFICATION));\r\n assertTrue(\"Elements should be 'String'.\", string1.getType().equals(TYPE_FULL_STRING)\r\n && string2.getType().equals(TYPE_FULL_STRING));\r\n assertEquals(\"Element should be \\\"string1\\\".\", \"string1\", string1.getValue());\r\n assertEquals(\"Element should be \\\"string2\\\".\", \"string2\", string2.getValue());\r\n }", "String[][] packData();", "public void set(String[] as);", "@Override\n\tpublic String[][] generateArrayStringXML(String source, String destination) {\n\t\treturn null;\n\t}", "public void displayData(String[] str);", "private void createArray()\r\n\t{\r\n\t\tscorers = new String[NUMBER_OF_ENTRIES];\r\n\t\tfor(int i = 0; i < NUMBER_OF_ENTRIES; i += 2)\r\n\t\t{\r\n\t\t\tscorers[i] = \"[NULL]\";\r\n\t\t\tscorers[i + 1] = String.valueOf(-1);\r\n\t\t}\r\n\t}", "@Test\n public void testArrayCreation() {\n final String[] array = ArrayUtils.toArray(\"foo\", \"bar\");\n assertEquals(2, array.length);\n assertEquals(\"foo\", array[0]);\n assertEquals(\"bar\", array[1]);\n }", "public ArrayAccessor() {\r\n super(\"<array>\");\r\n }", "public java.lang.String[] getArrString() {\n return arrString;\n }", "public void stringObject(){\n\n String s1[] = new String[5];\n\n s1[0] = \"A1\";\n s1[1] = \"A2\";\n s1[2] = \"A3\";\n s1[3] = \"A4\";\n s1[4] = \"A5\";\n\n for(int i=0; i < s1.length; i++){\n System.out.println(\"s1[\" + i + \"] = \" + s1[i]);\n\n }\n }", "public String[] getStringArray() {\r\n\t\tString[] a = value.getStringArray();\r\n\t\tif (a == null)\r\n\t\t\treturn null;\r\n\t\tint n = a.length;\r\n\t\tString[] b = new String[n];\r\n\t\tfor (int i = 0; i < n; i++)\r\n\t\t\tb[i] = substitution(a[i]);\r\n\t\treturn (b);\r\n\t}", "@Override\n\tpublic void VisitArrayLiteralNode(BunArrayNode Node) {\n\n\t}", "String[] mo1153c();", "public abstract void init(ArrayList<String> ary);", "private void jetNewArrayExpr(){\n\t\t//put the length of array into exprStr\n\t\tNewArrayExpr newArrayExpr = (NewArrayExpr) rExpr;\n\t\tValue sizeValue = newArrayExpr.getSize();\n\t\tif(sizeValue instanceof Constant){\n\t\t\tthis.exprStr = sizeValue.toString();\n\t\t}else{\n\t\t\tthis.exprStr = fileGenerator.getRenameOf(sizeValue, false, this.stmtIdx);\n\t\t}\n\t}", "private static void initialise( String booth[] ) {\n\r\n for (int x = 0; x < 6; x++ ) { //Assigning all the 6 booths as \"empty\"\r\n booth[x] = \"empty\";\r\n }\r\n }", "public void fixmetestPositiveStringArray() {\n\n fail(\"Array conversions not implemented yet.\");\n\n Object value;\n final String[] stringArray = {};\n final String[] stringArray1 = { \"abc\" };\n final String[] stringArray2 = { \"abc\", \"de,f\" };\n\n value = LocaleConvertUtils.convert(\"\", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\" \", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\"{}\", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\"{ }\", stringArray.getClass());\n checkStringArray(value, stringArray);\n\n value = LocaleConvertUtils.convert(\"abc\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{abc}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"\\\"abc\\\"\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{\\\"abc\\\"}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"'abc'\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{'abc'}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n\n value = LocaleConvertUtils.convert(\"abc 'de,f'\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{abc, 'de,f'}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"\\\"abc\\\",\\\"de,f\\\"\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{\\\"abc\\\" 'de,f'}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"'abc' 'de,f'\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{'abc', \\\"de,f\\\"}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n\n }", "public String[] getStringList();", "public String choseRep(){\n return \"array\";\n }", "public static void arrayDemo() {\n\t}", "private Function1<Seq<String>, String[]> arrayFunction() {\n return new AbstractFunction1<Seq<String>, String[]>() {\n @Override\n public String[] apply(Seq<String> v1) {\n String[] array = new String[v1.size()];\n v1.copyToArray(array);\n return array;\n }\n };\n }", "public void assignString(String[] msg) {\n if (msg.length > 0) {\n msg[0] = new String(\"Ali\");\n }\n }", "@Override\n protected List<String> initialize(int size) {\n String[] ia = Generated.array(String.class,\n new RandomGenerator.String(), size);\n return Arrays.asList(ia);\n }", "public String[] setInputArray(String input) {\n IInputStream input_array = new InputStream();\n// if (input.contains(\".txt\")) {\n// input = input_array.inputFile(input);\n// }\n return input_array.inputArray(input);\n }", "public native java.lang.String[] __StringArrayMethod( long __swiftObject, java.lang.String[] arg );", "public void testConstructorWithNullStringTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_FULL_STRING, \"1\", \"{\\\"string1\\\", null}\"));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be String.\", TYPE_FULL_STRING, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n ObjectSpecification string1 = (ObjectSpecification) array1[0];\r\n ObjectSpecification string2 = (ObjectSpecification) array1[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertEquals(\"SpecType of array1[0] should be simple.\",\r\n ObjectSpecification.SIMPLE_SPECIFICATION, string1.getSpecType());\r\n assertEquals(\"SpecType of array1[1] should be null.\",\r\n ObjectSpecification.NULL_SPECIFICATION, string2.getSpecType());\r\n }", "public static String[] m66064a(String[] strArr, String str) {\n String[] strArr2 = new String[(strArr.length + 1)];\n System.arraycopy(strArr, 0, strArr2, 0, strArr.length);\n strArr2[strArr2.length - 1] = str;\n return strArr2;\n }", "public XmlsonArray(String name) {\n\t\tsuper(name);\n\t}", "public void testConstructorWithStringTypeArrayWithReferences() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_FULL_STRING, \"1\", \"{str1, \\\"string2\\\"}\"));\r\n\r\n ConfigurationObject object = createObject(\"str1\", TYPE_FULL_STRING);\r\n ConfigurationObject params = new DefaultConfigurationObject(\"params\");\r\n params.addChild(createParam(1, TYPE_FULL_STRING, \"string1\"));\r\n object.addChild(params);\r\n root.addChild(object);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be String.\", TYPE_FULL_STRING, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n ObjectSpecification string1 = (ObjectSpecification) array1[0];\r\n ObjectSpecification string2 = (ObjectSpecification) array1[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertTrue(\"Elements should be 'String'.\", string1.getType().equals(TYPE_FULL_STRING)\r\n && string2.getType().equals(TYPE_FULL_STRING));\r\n assertEquals(\"Element should be str1.\", specificationFactory.getObjectSpecification(\"str1\",\r\n null), string1);\r\n assertEquals(\"Element should be \\\"string2\\\".\", \"string2\", string2.getValue());\r\n }", "public abstract String[] createTablesStatementStrings();", "public static void main(String[] args) {\n\t\tint[] x = { 10, 20, 30, 40 };\n\t\tSystem.out.println(x);\n\t\tSystem.out.println(x[0]);\n\t\tSystem.out.println(x[1]);\n\t\tSystem.out.println(x[2]);\n\t\tSystem.out.println(x[3]);\n\n\t\t// array declaration.initialization and creation in a single line.(char array)\n\t\tchar[] ch = { 'a', 'e', 'i', 'o', 'u' };\n\t\tSystem.out.println(ch);\n\t\tSystem.out.println(ch.toString());\n\t\tSystem.out.println(ch[0]);\n\t\tSystem.out.println(ch[1]);\n\t\tSystem.out.println(ch[2]);\n\t\tSystem.out.println(ch[3]);\n\t\tSystem.out.println(ch[4]);\n\n\t\t// array declaration.initialization and creation in a single line.(String Array)\n\t\tString[] s = { \"Babu\", \"Rahul\", \"Riju\", \"Buni\", \"Shaan\" };\n\t\tSystem.out.println(s);\n\t\tSystem.out.println(s.length);\n\t\tSystem.out.println(s.toString());\n\t\tSystem.out.println(s[0]);\n\t\tSystem.out.println(s[1]);\n\t\tSystem.out.println(s[2]);\n\t\tSystem.out.println(s[3]);\n\t\tSystem.out.println(s[4]);\n\t\t\n\n\t}", "StringArraySetting(Properties defaultProps, Properties props, String key, \n String[] defaultValue) {\n\t\tsuper(defaultProps, props, key, decode(defaultValue), null);\n\t}", "public boolean genStringAsCharArray();", "public void writeStringArrayNullable(String[] array) throws IOException {\n\t\tif (array == null) {\n\t\t\twriteVInt(0);\n\t\t} else {\n\t\t\twriteVInt(array.length);\n\t\t\tfor (String s : array) {\n\t\t\t\twriteString(s);\n\t\t\t}\n\t\t}\n\t}", "protected String[] getStringTable() {\n/* 199 */ return myStringTable;\n/* */ }", "String[] getData();", "C11998c mo41081a(String str, C11999d dVar, String... strArr);", "protected abstract void initPatternRepresentation(String[] paramArrayOfString)\n/* */ throws IllegalArgumentException;", "C11996a mo41080a(String str, C11997b bVar, String... strArr);", "public static void main (String[] args) {\n\t\r\n\t\tString[] StringArray = {\"Ryan\", \"Paul\", \"\", \"\", \"Patrick\"};\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(StringArray.length);\r\n\t\tSystem.out.println(StringArray);\r\n\t\tSystem.out.println(StringArray[0]);\r\n\t}", "public void readArray(String s){\r\n\t\tString[] s1=s.split(\"\");\r\n\t\tSystem.out.println(\"reading string array:-\");\r\n\t\tfor(int i=0;i<s1.length;i++){\r\n\t\t\tSystem.out.print(s1[i]);\r\n\t\t}System.out.println();\r\n\t}", "public static String[] setStringArrayToEmpty(String[] arr) {\n for (int i = 0; i < arr.length; i++) {\n arr[i] = \"empty\";\n }\n return arr;\n }", "public static String[] toArray(String input) {\n if (input != null && input.length() > 0) {\n String[] result = new String[1];\n result[0] = input;\n return result;\n } else {\n return new String[0];\n }\n }", "private static ArrayList<String> transmit(String[] array){\n\n\t\tArrayList<String> ret= new ArrayList<String>();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tret.add(array[i]);\n\t\t}\n\t\treturn ret;\t\n\t}", "public String[] getStringArray(String key);", "static void writearray(String[]array) {\n\t\t for (int i = 0; i < array.length; i++) {\n\t\t\tSystem.out.println(array[i]);\n\t\t}\n\t}", "@Test\n public void whenCreateContainerShouldReturnTheStringType() {\n SimpleArray<String> arr = new SimpleArray<>(2);\n arr.add(\"first\");\n arr.add(\"second\");\n\n assertThat(arr.get(0), is(\"first\"));\n assertThat(arr.get(1), is(\"second\"));\n }", "@Override\n public String visit(ArrayCreationExpr n, Object arg) {\n return null;\n }", "public native java.lang.String[][] __String2dArrayMethod( long __swiftObject, java.lang.String[][] arg );", "Array createArray();", "public void setElement(java.lang.String[] element) {\n this.element = element;\n }", "public String[] asStringArray() {\n\t\tString array[] = new String[4];\n\t\tarray[0] = \"Name: \" + this.name;\n\t\tarray[1] = \"Money: \" + Double.toString(this.money);\n\t\tarray[2] = \"On table: \" + Double.toString(onTable);\n\t\tif (this.getBlind() == Blind.NONE) {\n\t\t\tarray[3] = \"\";\n\t\t} else {\n\t\t\tarray[3] = \"Blind \" + this.blind.name();\n\t\t}\n\t\treturn array;\n\t}", "public String[] uses() { return new String[0]; }", "public static String[] initializeQuestionName() {\n\n File ques_name = new File(\"Files/Question/question_name.txt\"); // creating file object\n\n try {\n Scanner que_name = new Scanner(ques_name); // creating Scanner for file\n\n while (que_name.hasNext()) { // iteration untill EOF\n String n = que_name.nextLine();\n t_que_name_o.add(n);\n }\n\n } catch (FileNotFoundException ex) {\n \n }\n\n String[] questionName = new String[t_que_name_o.size()]; // declaring and creating String[]\n t_que_name_o.toArray(questionName); // from arrayList to -> Array\n\n return questionName;\n\n }", "public String[] inStringtoCheck(String[] stringArray) {\n\t\t\n\t\tstringCheck = stringArray;\n\t\toutArr = new String[stringCheck.length];\n\t\t\n\t\t//System.out.print(\"\\n\");\n\t\t\n\t\t/* Check the Local String Array */\n\t\tfor (int i = 0; i < stringCheck.length; i++) {\n\t\t\tint j = i - 1;\n\t\t\tint k = i - 2;\n\t\t\tint l = i - 3;\n\t\t\t\n\t\t\texitCheck = false; \n\t\t\tpariralaCheck = true;\n\t\t\tpackageCheck = true;\n\t\t\tkomentoCheck = true;\n\t\t\t\n\t\t\tif (searchValue(stringCheck[i])) {\n\t\t\t\t\n\t\t\t\t// String append\n\t\t\t\tif(stringCheck[i].equals(op_parirala_dagdag[0]) && !exitCheck && \n\t\t\t\t\t\t(outArr[j].equals(\"String Declarator (End)\") || outArr[k].equals(\"Append\") || outArr[l].equals(\"Keyword\")/*|| *//* outArr[j].equals(\"Identifier\")\n\t\t\t\t\t\t\t\t||*/ /*outArr[k].equals(\"Delimiter Parenthesis (Start)\")*/)) {\n\t\t\t\t\toutArr[i] = \"Append\";\n\t\t\t\t\texitCheck = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t \t\n\n\n \n\t\t\t \t\n\t\t\t\t\n\t\t\t\t// Keywords\n \t\tfor (int a = 0; a < abakada_mahalaga.length; a++) {\n \t\t\tif (stringCheck[i].equals(abakada_mahalaga[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"isulat\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Pre-defined Function)\";\n \t\t\t\t}\n \t\t\t\telse if (stringCheck[i].equals(\"basahin\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Pre-defined Function)\";\n \t\t\t\t}\n \t\t\t\telse if (stringCheck[i].equals(\"kawalan\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Modifier)\";\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\toutArr[i] = \"Keyword\";\n \t\t\t\t}\n \t\t\t\texitCheck = true;\n \tbreak;\n \t\t\t}\n \t\t}\n \t\t\n \t\t// Reserved Words\n \t\tfor (int a = 0; a < abakada_nakalaan.length; a++) {\n \t\t\tif (stringCheck[i].equals(abakada_nakalaan[a]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Reserved Word\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t\n \t\t// Noise Words\n \t\tif (stringCheck[i].equals(abakada_ingay[0]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Noise Word\";\n \t\t\t\texitCheck = true;\n \t//break;\n }\n \t\t \n \t\t// Data Type\n \t\tfor (int a = 0; a < pang_uri.length; a++) {\n \t\t\tif (stringCheck[i].equals(pang_uri[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"pambuo\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Integer)\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"hatimbuo\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Float)\";\n \t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"bulyan\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (Booleanr)\";\t\t\t\t\n\t\t\t\t\t\t \t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"titik\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (Character)\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"parirala\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (String)\";\n\t\t\t\t\t\t\t}\n\t \t\t\t\t\n \t\t\t\t//outArr[i] = \"Keyword (Data Type)\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t// Boolean\n \t\tfor (int a = 0; a < bulyan.length; a++) {\n \t\t\tif (stringCheck[i].equals(bulyan[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"tama\")) {\n \t\t\t\t\toutArr[i] = \"Boolean (True)\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"mali\")) {\n \t\t\t\t\toutArr[i] = \"Boolean (False)\";\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\toutArr[i] = \"Boolean\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t // Operators\n \t\t for (int a = 0; a < op_takda.length; a++) {\t\t\t// Assignment Operator\n \t\t\t if (stringCheck[i].equals(op_takda[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Assignment Operator\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n \t\t\t }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < op_palatuusan.length; a++) {\t\t// Arithmetic Operator\n \t\t\tif (stringCheck[i].equals(op_palatuusan[a]) && !exitCheck) {\n \t\t\t\tif(stringCheck[i].equals(\"+\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Plus\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"-\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Minus\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"*\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Multiplication\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"/\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Division\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"%\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Modulo\";\n \t\t\t\t}\n \t\t\t\t//outArr[i] = \"Arithmetic Operator\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t for (int a = 0; a < op_yunari.length; a++) {\t\t\t// Unary Operator\n \t\t\t if (stringCheck[i].equals(op_yunari[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Unary Operator\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n \t\t\t }\n \t\t }\n \t\t\n \t\t \n \t\t for (int a = 0; a < op_relasyunal.length; a++) {\t\t// Relational Operator\n \t\t\t if (stringCheck[i].equals(op_relasyunal[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\t if(stringCheck[i].equals(\"@\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(EQUALS)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"$\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(NOT EQUALS)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\">\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(GREATER THAN)\";\n \t\t\t\t } \n \t\t\t\t else if(stringCheck[i].equals(\"<\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(LESS THAN)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Relational Operator\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_lohikal.length; a++) {\t\t\t// Logical Operator\n \t\t\t if (stringCheck[i].equals(op_lohikal[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"at\")) {\n \t\t\t\t\t outArr[i] = \"Logical Operator(AND)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"odikaya\")){\n \t\t\t\t\t outArr[i] = \"Logical Operator(OR)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"hindi\")) {\n \t\t\t\t\t outArr[i] = \"Logical Operator(INVERSE)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Logical Operator\";\n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_kondisyunal.length; a++) {\t\t// Conditional Operator\n \t\t\t if (stringCheck[i].equals(op_kondisyunal[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"?\")) {\n \t\t\t\t\t outArr[i] = \"Conditional Operator(?)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\":\")) {\n \t\t\t\t\t outArr[i] = \"Conditional Operator(:)\";\n \t\t\t\t }\n \t\t\t\t// outArr[i] = \"Conditional Operator\";\n \t\t\t\t exitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_pirasong_pantas.length; a++) {\t// Bitwise Operator\n \t\t\t if (stringCheck[i].equals(op_pirasong_pantas[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"&\")) {\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(&)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"^\")){\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(^)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"|\")) {\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(|)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Bitwise Operator\";\n \t\t\t\t exitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t// Comments\n \t\tfor (int a = 0; a < kom_marami_check.length; a++) {\n \t\t\t if (stringCheck[i].equals(kom_marami_check[0]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t outArr[i] = \"Multiple-line Comment (Start)\";\n \t\t\t\t \n \t\t\t\t while(komentoCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\n \t\t\t\t\t if(stringCheck[i].equals(kom_marami_check[0])) {\n \t\t\t\t\t\t outArr[i] = \"Multiple-line Comment (End)\";\n \t\t\t\t\t\t komentoCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"Comment\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t\n \t\t\n \t//[package\n \tfor (int a = 0; a < kom_marami_check.length; a++) {\n \t\tif (stringCheck[i].equals(abakada_angkat[0]) && !exitCheck) {\n \t\t\t\t \n \t\t\t outArr[i] = \"Keyword (PACKAGE)\";\n \t\t\t\t \n \t\t\t\twhile(packageCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\n \t\t\t\t\t if(stringCheck[i].equals(\";\")) {\n \t\t\t\t\t\t outArr[i] = \"Delimiter Semicolon\";\n \t\t\t\t\t\t packageCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if(stringCheck[i].equals(\".\")) {\n \t\t\t\t\t\t outArr[i] = \"Period\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if(stringCheck[i-1].equals(\".\") && !stringCheck[i].equals(\".\")) {\n \t\t\t\t\t\t outArr[i] = \"Package Extension\";\n \t\t\t\t\t }\n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"Package\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t \n \t\t // Delimiters and Brackets\n \t\t for (int a = 0; a < tuldok_kuwit.length; a++) {\t\t// Semicolon\n \t\t\t if (stringCheck[i].equals(tuldok_kuwit[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Semicolon\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_separator.length; a++) {\t\t// Separator\n \t\t\t if (stringCheck[i].equals(del_separator[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Separator\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n\n \t\t // Character Declarator\n \t\t for (int a = 0; a < del_titik.length; a++) {\t\n \t\t\t oneTitik = false;\n \t\t\t if (stringCheck[i].equals(del_titik[a]) && !exitCheck) {\n \t\t\n \t\t\t\t outArr[i] = \"Character Declarator (Start)\";\n \t\t\t\t \n \t\t\t\t while(pariralaCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\t\t\t\t \n \t\t\t\t\t if(stringCheck[i].equals(del_titik[a])) {\n \t\t\t\t\t\t outArr[i] = \"Character Declarator (End)\";\n \t\t\t\t\t\t pariralaCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if (!oneTitik ){\n \t\t\t\t\t\t if(stringCheck[i].length() == 1) {\n \t\t\t\t\t\t\t oneTitik = true;\n \t\t\t\t\t\t outArr[i] = \"titik\";\n \t\t\t\t\t\t }\n \t\t\t\t\t\t \n \t\t\t\t\t\t else {\n \t\t\t\t\t\t\toutArr[i] = \"Invalid Token\";\n \t\t\t\t\t\t }\n \t\t\t\t\t\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t // String Declarator\n \t\t for (int a = 0; a < del_parirala.length; a++) {\n \t\t\t if (stringCheck[i].equals(del_parirala[a]) && !exitCheck) {\n \t\t\n \t\t\t\t outArr[i] = \"String Declarator (Start)\";\n \t\t\t\t \n \t\t\t\t while(pariralaCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\t\t\t\t System.out.println(stringCheck[i]+\" value of i: \"+i);\n \t\t\t\t\t if(stringCheck[i].equals(del_parirala[a])) {\n \t\t\t\t\t\toutArr[i] = \"String Declarator (End)\";\n \t\t\t\t\t\t pariralaCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"String\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_saklong_una.length; a++) {\t\t// Parenthesis\n \t\t\t if (stringCheck[i].equals(del_saklong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Parenthesis (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_saklong_huli.length; a++) {\t\t \n \t\t\t if (stringCheck[i].equals(del_saklong_huli[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Parenthesis (End)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_kulong_una.length; a++) {\t\t// Curly Bracket\n \t\t\t if (stringCheck[i].equals(del_kulong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Curly Bracket (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_kulong_huli.length; a++) {\t\t \n \t\t\t if (stringCheck[i].equals(del_kulong_huli[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Curly Bracket (End)\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_palong_una.length; a++) {\t\t// Bracket\n \t\t\t if (stringCheck[i].equals(del_palong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Bracket (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_palong_huli.length; a++) {\t\t\t \n \t\t\t if (stringCheck[i].equals(del_palong_huli[a]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Bracket (End)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t\n \t\t// Pre-defined Functions\n \t\tfor (int a = 0; a < abakada_pdf_basa.length; a++) {\t\t// Read Function \n \t\t\t if (stringCheck[i].equals(abakada_pdf_basa[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Read function\";\n \t\t\t\t exitCheck = true;\n \t break;\n \t\t\t }\n \t\t }\n \t\t\n \t\tfor (int a = 0; a < abakada_pdf_sulat.length; a++) {\t// Write Function\t \n \t\t\tif (stringCheck[i].equals(abakada_pdf_sulat[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Write function\";\n \t\t\t\texitCheck = true;\n \t break;\n \t\t\t}\n \t\t}\n \t\t\n \t\tif(!exitCheck) {\n \t\t\toutArr[i] = \"Constant Number\"; // next line if ever\n \t\t\t\n \t\t}\n \t\t\t\n \t \t}\n \t\n\t\t\telse if (checkConNum(stringCheck[i])) {\n outArr[i] = \"Constant Number\";\n\t\t\t}\n\t\t\t\n\t\t\telse if (checkVar(stringCheck[i])) {\n outArr[i] = \"Identifier\";\n\t\t\t}\n \n\t\t\telse {\n outArr[i] = \"Invalid Identifier\";\n\t\t\t}\n \n\t\t} // for loop\n\t\t\n\t\treturn outArr;\n\t}", "public static String m36404a(String[] strArr, String str) {\n StringBuffer stringBuffer = new StringBuffer();\n for (int i = 0; i < strArr.length; i++) {\n if (i != 0) {\n stringBuffer.append(str);\n }\n stringBuffer.append(strArr[i]);\n }\n return stringBuffer.toString();\n }", "@Override\n public String visit(ArrayCreationLevel n, Object arg) {\n return null;\n }", "public String[][] get();", "public final Bindings stringProperty(String name, boolean array) {\n addProp(name, array, \"''\");\n return this;\n }", "public static String[] set(String[] strArray) {\n return unique(strArray);\n }", "@Override\n public void visit(ArrayDeclaration node) {\n }", "public abstract void mo27380a(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr);", "@Override\n public int[][] getIntArray(String str) {\n return null;\n }", "public boolean canUseCharArrays()\n/* */ {\n/* 405 */ return true;\n/* */ }", "public static String[] m36411a(String[] strArr) {\n return m36412a(strArr, strArr.length << 1);\n }", "@Test\n public void testIndirectArrayCreation() {\n final String[] array = toArrayPropagatingType(\"foo\", \"bar\");\n assertEquals(2, array.length);\n assertEquals(\"foo\", array[0]);\n assertEquals(\"bar\", array[1]);\n }", "public Object[] fromStringRepresentation(String... value);", "protected void setArray(Expression expr)\n {\n setExpression(expr);\n }", "public final EObject ruleStringTypeSpecifier() throws RecognitionException {\n EObject current = null;\n\n EObject lv_dimensions_3_0 = null;\n\n EObject lv_dimensions_5_0 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2217:6: ( ( () 'string' ( '[' ( (lv_dimensions_3_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_5_0= ruleArrayDimensionSpecification ) ) )* ']' )? ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2218:1: ( () 'string' ( '[' ( (lv_dimensions_3_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_5_0= ruleArrayDimensionSpecification ) ) )* ']' )? )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2218:1: ( () 'string' ( '[' ( (lv_dimensions_3_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_5_0= ruleArrayDimensionSpecification ) ) )* ']' )? )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2218:2: () 'string' ( '[' ( (lv_dimensions_3_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_5_0= ruleArrayDimensionSpecification ) ) )* ']' )?\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2218:2: ()\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2219:5: \n {\n \n temp=factory.create(grammarAccess.getStringTypeSpecifierAccess().getStringTypeSpecifierAction_0().getType().getClassifier());\n current = temp; \n temp = null;\n CompositeNode newNode = createCompositeNode(grammarAccess.getStringTypeSpecifierAccess().getStringTypeSpecifierAction_0(), currentNode.getParent());\n newNode.getChildren().add(currentNode);\n moveLookaheadInfo(currentNode, newNode);\n currentNode = newNode; \n associateNodeWithAstElement(currentNode, current); \n \n\n }\n\n match(input,39,FOLLOW_39_in_ruleStringTypeSpecifier3870); \n\n createLeafNode(grammarAccess.getStringTypeSpecifierAccess().getStringKeyword_1(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2233:1: ( '[' ( (lv_dimensions_3_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_5_0= ruleArrayDimensionSpecification ) ) )* ']' )?\n int alt35=2;\n int LA35_0 = input.LA(1);\n\n if ( (LA35_0==33) ) {\n alt35=1;\n }\n switch (alt35) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2233:3: '[' ( (lv_dimensions_3_0= ruleArrayDimensionSpecification ) ) ( ',' ( (lv_dimensions_5_0= ruleArrayDimensionSpecification ) ) )* ']'\n {\n match(input,33,FOLLOW_33_in_ruleStringTypeSpecifier3881); \n\n createLeafNode(grammarAccess.getStringTypeSpecifierAccess().getLeftSquareBracketKeyword_2_0(), null); \n \n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2237:1: ( (lv_dimensions_3_0= ruleArrayDimensionSpecification ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2238:1: (lv_dimensions_3_0= ruleArrayDimensionSpecification )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2238:1: (lv_dimensions_3_0= ruleArrayDimensionSpecification )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2239:3: lv_dimensions_3_0= ruleArrayDimensionSpecification\n {\n \n \t currentNode=createCompositeNode(grammarAccess.getStringTypeSpecifierAccess().getDimensionsArrayDimensionSpecificationParserRuleCall_2_1_0(), currentNode); \n \t \n pushFollow(FOLLOW_ruleArrayDimensionSpecification_in_ruleStringTypeSpecifier3902);\n lv_dimensions_3_0=ruleArrayDimensionSpecification();\n _fsp--;\n\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getStringTypeSpecifierRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t }\n \t try {\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"dimensions\",\n \t \t\tlv_dimensions_3_0, \n \t \t\t\"ArrayDimensionSpecification\", \n \t \t\tcurrentNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t currentNode = currentNode.getParent();\n \t \n\n }\n\n\n }\n\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2261:2: ( ',' ( (lv_dimensions_5_0= ruleArrayDimensionSpecification ) ) )*\n loop34:\n do {\n int alt34=2;\n int LA34_0 = input.LA(1);\n\n if ( (LA34_0==14) ) {\n alt34=1;\n }\n\n\n switch (alt34) {\n \tcase 1 :\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2261:4: ',' ( (lv_dimensions_5_0= ruleArrayDimensionSpecification ) )\n \t {\n \t match(input,14,FOLLOW_14_in_ruleStringTypeSpecifier3913); \n\n \t createLeafNode(grammarAccess.getStringTypeSpecifierAccess().getCommaKeyword_2_2_0(), null); \n \t \n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2265:1: ( (lv_dimensions_5_0= ruleArrayDimensionSpecification ) )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2266:1: (lv_dimensions_5_0= ruleArrayDimensionSpecification )\n \t {\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2266:1: (lv_dimensions_5_0= ruleArrayDimensionSpecification )\n \t // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:2267:3: lv_dimensions_5_0= ruleArrayDimensionSpecification\n \t {\n \t \n \t \t currentNode=createCompositeNode(grammarAccess.getStringTypeSpecifierAccess().getDimensionsArrayDimensionSpecificationParserRuleCall_2_2_1_0(), currentNode); \n \t \t \n \t pushFollow(FOLLOW_ruleArrayDimensionSpecification_in_ruleStringTypeSpecifier3934);\n \t lv_dimensions_5_0=ruleArrayDimensionSpecification();\n \t _fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = factory.create(grammarAccess.getStringTypeSpecifierRule().getType().getClassifier());\n \t \t associateNodeWithAstElement(currentNode.getParent(), current);\n \t \t }\n \t \t try {\n \t \t \t\tadd(\n \t \t \t\t\tcurrent, \n \t \t \t\t\t\"dimensions\",\n \t \t \t\tlv_dimensions_5_0, \n \t \t \t\t\"ArrayDimensionSpecification\", \n \t \t \t\tcurrentNode);\n \t \t } catch (ValueConverterException vce) {\n \t \t\t\t\thandleValueConverterException(vce);\n \t \t }\n \t \t currentNode = currentNode.getParent();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop34;\n }\n } while (true);\n\n match(input,34,FOLLOW_34_in_ruleStringTypeSpecifier3946); \n\n createLeafNode(grammarAccess.getStringTypeSpecifierAccess().getRightSquareBracketKeyword_2_3(), null); \n \n\n }\n break;\n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public Record(String[] input){\r\n\t\tsetData(input);\r\n\t}", "public static void arrayDeclarationInitialization() {\n\n double[] arrayOfDoubles = new double[] { 12.56, 45.87, 14.85 };\n\n // This is also ok.\n\n int[] arrayOfInts = { 12, 21, 0, 5, 7 };\n\n int[] i = new int[10 + 5]; // Array size can be an expression resulting an integer\n\n int[] i1 = new int[(byte) 10]; // byte is auto-widened to int\n\n // int i3 = new int[10.25]; //Compile Time Error : size can not be double\n }", "private void encodeStringDataType(Encoder encoder, int size) throws IOException {\n\t\tencoder.openElement(ELEM_TYPE);\n\t\tencoder.writeString(ATTRIB_NAME, \"\");\n\t\tencoder.writeString(ATTRIB_METATYPE, \"array\");\n\t\tencoder.writeSignedInteger(ATTRIB_SIZE, size);\n\t\tencoder.writeSignedInteger(ATTRIB_ARRAYSIZE, size);\n\t\tencodeCharTypeRef(encoder, dataOrganization.getCharSize());\n\t\tencoder.closeElement(ELEM_TYPE);\n\t}", "@Test\n public void testArrayCreationWithGeneralReturnType() {\n final Object obj = ArrayUtils.toArray(\"foo\", \"bar\");\n assertTrue(obj instanceof String[]);\n }", "public static MekString[] getMekStringArray(){\n\t\treturn setOfStrings;\n\t}", "public static void main(String[] args) {\n String [] names = new String[3];\n System.out.println(names);\n System.out.println(names.length);\n\n names[0] = \"ram\";\n names[1] = \"shyam\";\n names[2] = \"hari\";\n// names[3] = \"krishna\";\n System.out.println(names[0]);\n System.out.println(names[1]);\n System.out.println(names[2]);\n// System.out.println(names[3]);\n }", "private String[] getNodeStringArray(){\n String[] nodes = new String[truss.getNodeModel().size()];\n for(int i =0;i<truss.getNodeModel().size();i++){\n nodes[i] = \"Node\" + truss.getNodeModel().get(i).getNumber();\n }\n return nodes;\n }", "public ArrayADT() \r\n\t{\r\n\t\tbookArray = new String[MAXSIZE];\r\n\t\tnumItems = 0;\r\n\t}", "public ArrayBackedList(String ... strings) {\n insertArray(Arrays.asList(strings));\n }", "private static String compileArray(float[] array) {\n String arrayString = \"\\\"\";\n for (float number : array) {\n arrayString += Model.formatFloat(number) + \", \";\n }\n arrayString = arrayString.substring(0, arrayString.length() - 2);\n arrayString += \"\\\"\";\n return arrayString;\n }", "abstract CharArraySet build();", "public String[] getStringArr() {\n String[] tasks = new String[USER_TASKS.size() + 1];\n for (int i = 0; i < USER_TASKS.size(); i++) {\n int tempNum = i + 1;\n tasks[tempNum] = tempNum + \". \" + USER_TASKS.get(i);\n }\n return tasks;\n }", "private static void printEmptyArray() {\n // String = sir de caractere\n // \"temp\" -> 't' 'e' 'm' 'p'\n\n // create empty array with size 3\n String[] names = new String[3];\n names[0] = \"ana\";\n names[1] = \"alex\";\n names[2] = \"paul\";\n// names[3] = \"gabi\"; // index out of bounds\n\n // CTRL + D = duplicate line\n System.out.println(names[0]);\n System.out.println(names[1]);\n System.out.println(names[2]);\n\n // save alex from the array to a variable\n // array name [ index of alex]\n String alexName = names[1];\n System.out.println(\"item at index 1 = \" + alexName);\n }", "public static void main(String[] args) {\n\n\t\tString myStrings[] = { \"Apple\", \"Orange\", \"Lemon\" };\n\n\t\tSystem.out.println(myStrings[0]);\n\t\tSystem.out.println(myStrings[1]);\n\t\tSystem.out.println(myStrings[2]);\n\n\t\tString[] newArray = new String[10]; // (0 to 9) I can add 10 array value\n\n\t\tSystem.out.println(\"\\n\");\n\n\t\tnewArray[0] = \"Zero\";\n\t\tnewArray[1] = \"One\";\n\t\tnewArray[2] = \"Two\";\n\t\tnewArray[3] = \"Three\";\n\n\t\tSystem.out.println(newArray[0]);\n\t\tSystem.out.println(newArray[1]);\n\t\tSystem.out.println(newArray[2]);\n\t\tSystem.out.println(newArray[3]);\n\n\t}" ]
[ "0.68112236", "0.67842424", "0.6718177", "0.64938986", "0.64760095", "0.6467344", "0.64427227", "0.637582", "0.62245613", "0.6222398", "0.62221295", "0.6193616", "0.61617017", "0.6142931", "0.608906", "0.6088485", "0.6071163", "0.6063462", "0.60627985", "0.6053926", "0.60022664", "0.60012186", "0.5978708", "0.59627193", "0.59536123", "0.5946966", "0.5922343", "0.5900771", "0.5894061", "0.58292544", "0.5816167", "0.58147085", "0.581179", "0.579729", "0.5789768", "0.57846934", "0.5760773", "0.57529557", "0.5718548", "0.57015085", "0.5693969", "0.56821114", "0.5633947", "0.56295896", "0.56109667", "0.55941147", "0.55936325", "0.5572391", "0.55646425", "0.55623215", "0.5549637", "0.5542783", "0.5539194", "0.5531995", "0.5525211", "0.55052996", "0.5490291", "0.54618245", "0.5448678", "0.5441179", "0.5428918", "0.5419498", "0.54183334", "0.5408628", "0.5407824", "0.5404969", "0.5395171", "0.53869873", "0.538524", "0.5383498", "0.5382114", "0.53801847", "0.5374805", "0.5369324", "0.53635234", "0.5351604", "0.5351427", "0.5337634", "0.5337622", "0.5337505", "0.5330468", "0.53249615", "0.5324807", "0.5321881", "0.53187424", "0.5312752", "0.5312319", "0.53097236", "0.53081894", "0.53055346", "0.5302284", "0.5300351", "0.5295341", "0.5293132", "0.52903736", "0.52900624", "0.5290062", "0.52886635", "0.52812225", "0.52761245", "0.5266046" ]
0.0
-1
Find price of item
@Override public double findPrice(DatabaseItem item) { this.item = item; this.dialog = new ProgressDialog(ctx); this.execute(); return this.currentPrice; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double findItemPrice(String item){\n\t\t//TODO\n\t\t\n\t\tdouble price=0.0;\n\t\tfor(int i=0; i<ITEMS.length;i++) {\n\t\t\t\n\t\t\tif(ITEMS[i].equalsIgnoreCase(item)) {\n\t\t\t\tprice=PRICES[i];\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}return price;\n\t}", "public double getDiscountedPrice(double itemPrice);", "public double getItemPrice(){\n\t\t\t String priceStr;\n\t\t\t double price;\n\t\t\t String elemVal = driver.findElement(productPrice).getText();\n\t Reporter.log(\"==========Item Price is \" + elemVal + \"=======\", true);\n\t priceStr = elemVal.substring(1, elemVal.length());\n\t //return double as it is a price\n\t price = Double.parseDouble(priceStr);\n\t return price;\n\t }", "public int getPrice()\r\n\t{\r\n\t\treturn theItem.getPrice();\r\n\t}", "double getPrice();", "double getPrice();", "double getPrice();", "private String getShippingPrice(Document item) {\n String result;\n result = item.select(\"span[class^=shippingPrice]\").html();\n return result;\n }", "protected int queryPrice(int id, String key) {\n Trace.info(\"RM::queryCarsPrice(\" + id + \", \" + key + \") called\" );\n ReservableItem curObj = (ReservableItem) readData( id, key);\n int value = 0; \n if ( curObj != null ) {\n value = curObj.getPrice();\n } // else\n Trace.info(\"RM::queryCarsPrice(\" + id + \", \" + key + \") returns cost=$\" + value );\n return value; \n }", "public double getPricePerItem()\r\n {\r\n return pricePerItem;\r\n }", "public double getPriceForItem(Item i)\n\t{\n\t\tdouble price = 0.0;\n\t\tprice = strDAO.getPriceForStorenameAndItem(name, i);\n\t\treturn price;\t\t\t\n\t}", "long getPrice();", "protected Double getItemPrice() {\n return itemPrice;\n }", "int getPrice();", "public void findByPrice() {\n boolean validate = true;\n price = 0;\n System.out.print(\"Enter price you want to find: \");\n while (validate) {\n price = Validation.validateDoubleNumber(price);\n validate = false;\n }\n tree.findByPrice(price);\n }", "public int getPrice() {\n for (Item item : items) {\n price +=item.getPrice();\n }\n return price;\n }", "public Items[] findWherePriceEquals(double price) throws ItemsDaoException;", "public double getPrice();", "String getPrice();", "public float getItemPrice()\n\t{\n\t\treturn itemPrice;\n\t}", "Price getPrice() throws Exception;", "abstract public double getPrice();", "public Double getPrice();", "public int getPrice();", "List<PriceInformation> getPriceForProduct(ProductModel product);", "public static double getItemPrice(String item) {\n\t\tdouble price;\t\n\t\tswitch(item) {\n\t\tcase \"bread\":\n\t\t\tprice = 4.99;\n\t\t\tbreak;\n\t\tcase \"water\":\n\t\t\tprice = 2.99;\n\t\t\tbreak;\n\t\tcase \"apple\":\n\t\t\tprice = 1.50;\n\t\t\tbreak;\n\t\tcase \"bear\":\n\t\t\tprice = 7.90;\n\t\t\tbreak;\n\t\tcase \"red bull\":\n\t\t\tprice = 2.59;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tprice = 0.00;\n\t\t\tbreak;\t\n\t\t}\n\t\t\n\t\treturn price;\n\t}", "public double price() {\n return price;\n }", "public int getVehiclePrice() {\n return itemPrice;\n }", "public String getPriceOfArticle(Document document) {\n\t\tString price = \"\";\n\t\t// <p class=\"price\" itemprop=\"offers\" itemscope \n\t\t// \titemtype=\"http://schema.org/Offer\"><span data-currency=\"EUR\" itemprop=\"price\">€1,698</span></p>\n\t\t// Peut etre sélectionner la div \"details\" avant de chercher les p ? \n\t\tElements priceElements = document.getElementsByClass(\"price\");\n\t\tfor (Element priceElement : priceElements) {\n\t\t\t// Get the name if the item\n\t\t\t// <p class=\"style protect\" itemprop=\"model\">White</p>\n\t\t\tif (priceElement.attr(\"itemprop\").equals(\"price\")) {\n\t\t\t\t// get the inner text of the html tag if we are on the item name \n\t\t\t\treturn price = priceElement.text(); \n\t\t\t}\n\t\t}\n\t\treturn price;\n\t}", "double calculatePrice();", "@Override\n\tpublic double getItemPrice(String itemCode) {\n\n\t\treturn 100.00;\n\t}", "public AmountType getItemPrice() {\n\t return this.itemPrice;\n\t}", "public int getPrice() {\n return price_;\n }", "double getPricePerPerson();", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice(){\r\n\t\treturn price;\r\n\t}", "public double getPrice()\r\n {\r\n return price;\r\n }", "public double getPrice() {\n return price;\n }", "public String getIndividualProductPrice(String itemName)\n\t{\n\n\t\tString fixedString = fixString(itemName);\n\t\tString price = NO_PRICE_FOUND;\n\t\ttry {\n\t\t\tScanner scanner = getScanner(fixedString);\n\t\t\tprice = getPriceFromScanner(scanner);\n\n\t\t}catch ( Exception ex ) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn price;\n\t}", "@Test\n\tpublic void getCostForItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(2, fc) == 0);\n\n\t}", "public Integer getPrice() {\r\n return price;\r\n }", "public Integer getPrice() {\r\n return price;\r\n }", "public Double getPrice() {\r\n return price;\r\n }", "ItemPriceDTO findOne(Long id);", "public int getPrice ( ) {\n return price;\n }", "BigDecimal getPrice();", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "public double getPrice() {\n return price;\n }", "TickerPrice getPrice(String symbol);", "public double getPrice() {\n return price_;\n }", "public double getPrice(){\n\t\treturn price;\n\t}", "public double getPrice(){\n\t\treturn this.price;\n\t}", "public double getPrice()\r\n {\r\n return this.price;\r\n }", "public int getPrice() {\r\n return price;\r\n }", "public double getPrice()\n {\n \treturn price;\n }", "public int getPrice() {\n return price;\n }", "public Integer getPrice() {\n return price;\n }", "public Integer getPrice() {\n return price;\n }", "public Integer getPrice() {\n return price;\n }", "public Integer getPrice() {\n return price;\n }", "double purchasePrice();", "public double getPrice(){\n\t\t\treturn price;\n\t\t}", "public BigDecimal getPriceEntered();", "public double getPrice()\n {\n return this.price;\n }", "public long getPrice() {\n return price;\n }", "public int getPrice() {\n\t\tString regex = \"\\\"price\\\":(.*?)},\\\"\";\n\t\tPattern p = Pattern.compile(regex);\n\t\tMatcher m = p.matcher(line);\n\t\tif(m.find()) {\n\t\t\treturn new Integer(m.group(1));\n\t\t}\n\t\treturn 0;\n\t}", "public int getPrice() {\n return price;\n }", "public double getPrice() {\n return this.price;\n }", "public java.lang.Integer getPrice()\n {\n return price;\n }", "public double getPrice() {\n return price_;\n }", "public Double getPrice() {\n return price;\n }", "public Double getPrice() {\n return price;\n }", "@Override\n\tpublic int getPrice(int itemNumber) {\n\t\treturn inventory.getItemPrice(itemNumber);\n\t}", "public void testFindByPrice() {\n System.out.println(\"findByPrice\");\n Double[] prices = null;\n ItemDAO instance = null;\n List expResult = null;\n List result = instance.findByPrice(prices);\n assertEquals(expResult, result);\n fail(\"The test case is a prototype.\");\n }", "public int getPrice() {\n return price_;\n }", "public double getPrice()\n {\n return price;\n }", "Money getItemValue();", "public double getPrice() \n\t{\n\t\treturn price;\n\t}", "public double getPrice() \n\t{\n\t\treturn price;\n\t}", "public double getPrice(){\n\t\t\n\t\treturn price;\n\t}", "public double getPotatoesPrice();", "public float getPrices(Integer id);", "Price getTradePrice();", "cosmos.base.v1beta1.CoinOuterClass.Coin getPrice(int index);", "public int getPrice() {\n return price;\n }", "public int getPrice() {\n return price;\n }", "static BigDecimal Find(String productId){\n\n\t\tBigDecimal price=null;\n\n\t\tLong key=Long.parseLong(productId);\n\n\t\tif(!productListOnID.containsKey(key)){\n\t\t\tprice=new BigDecimal(\"0\");\n\t\t}else{\n\n\t\t\tdxm116130Product product=productListOnID.get(key);\n\t\t\tprice=product.getProductPrice();\n\n\t\t}\n\t\t\n\t\treturn price;\n\n\n\t}", "Price find(Object id);" ]
[ "0.778325", "0.713403", "0.711773", "0.711675", "0.70416164", "0.70416164", "0.70416164", "0.7028325", "0.6937437", "0.69251996", "0.69066507", "0.68951684", "0.68912315", "0.68529606", "0.6813411", "0.67967576", "0.67787504", "0.67761743", "0.6748222", "0.6744361", "0.67417693", "0.6710974", "0.67077225", "0.6701552", "0.66770166", "0.66726893", "0.66693544", "0.6658975", "0.6653023", "0.6639081", "0.66162384", "0.6613633", "0.66101015", "0.65991503", "0.6568843", "0.6568843", "0.6568843", "0.6568843", "0.65627563", "0.65502954", "0.65502167", "0.65469515", "0.6541209", "0.6535649", "0.6535649", "0.65302485", "0.65150595", "0.6512986", "0.65117127", "0.65008986", "0.65008986", "0.65008986", "0.65008986", "0.65008986", "0.65008986", "0.65008986", "0.65008986", "0.65008986", "0.65008986", "0.65008986", "0.6496318", "0.64945316", "0.649382", "0.64928085", "0.64913034", "0.6486318", "0.64863026", "0.64807343", "0.6479191", "0.6479191", "0.6479191", "0.6479191", "0.6477292", "0.6476074", "0.64755625", "0.64751846", "0.6473643", "0.6471799", "0.64712095", "0.6463128", "0.6455952", "0.64545584", "0.64522934", "0.64522934", "0.6445228", "0.6444786", "0.64432186", "0.6442487", "0.6434488", "0.6433271", "0.6433271", "0.64296776", "0.642853", "0.6423446", "0.6419837", "0.640431", "0.64037895", "0.64037895", "0.64013875", "0.6392771" ]
0.74309915
1
Looks for item prices
@Override protected Void doInBackground(Void... voids) { Document document; Elements elements = null; try{ String url = item.getUrl(); if(url.contains(HOME_DEPOT)){ document = Jsoup.connect(url).cookie("zip","79902").get(); elements = document.select("#ajaxPrice"); //Homedepot this.textPrice = elements.text(); elements = document.select(".pStrikeThru"); this.initTextPrice = elements.text(); } else if (url.contains(AMAZON)){ document = Jsoup.connect(url).timeout(0).get(); elements = document.select("#priceblock_ourprice");//amazon this.textPrice = elements.text(); } else if (url.contains(WALMART)){ document = Jsoup.connect(url).timeout(0).get(); elements = document.select(".price-group");//bestbuy this.textPrice = elements.text(); } else{ this.textPrice = ""; } } catch(IOException e){ e.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double findItemPrice(String item){\n\t\t//TODO\n\t\t\n\t\tdouble price=0.0;\n\t\tfor(int i=0; i<ITEMS.length;i++) {\n\t\t\t\n\t\t\tif(ITEMS[i].equalsIgnoreCase(item)) {\n\t\t\t\tprice=PRICES[i];\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}return price;\n\t}", "public Items[] findWherePriceEquals(double price) throws ItemsDaoException;", "public void UpdatePFStorePrices()\n {\n PlayFabClientModels.GetStoreItemsRequest req = new PlayFabClientModels.GetStoreItemsRequest();\n req.StoreId = cStoreId;\n\n PlayFabErrors.PlayFabResult<PlayFabClientModels.GetStoreItemsResult> result = PlayFabClientAPI.GetStoreItems(req);\n\n String errors = CompileErrorsFromResult(result);\n Log.d(TAG, \"GetStoreItems: \" + (errors == null? \"success\" : errors));\n\n if(result.Result != null)\n {\n for(PlayFabClientModels.StoreItem item : result.Result.Store)\n {\n Log.d(TAG, \"Store Item ID: \" + item.ItemId);\n\n if(item.VirtualCurrencyPrices.containsKey(cVC))\n {\n mStorePrices.put(item.ItemId, Objects.requireNonNull(item.VirtualCurrencyPrices.get(cVC)));\n }\n }\n }\n }", "@Override\r\n\tpublic List<ProductRaw_Price> findprices(String text, PageRequest pageable) {\n\t\treturn productRaw_PriceDao.findProductRawPrices(text, pageable);\r\n\t}", "public void testFindByPrice() {\n System.out.println(\"findByPrice\");\n Double[] prices = null;\n ItemDAO instance = null;\n List expResult = null;\n List result = instance.findByPrice(prices);\n assertEquals(expResult, result);\n fail(\"The test case is a prototype.\");\n }", "public void findByPrice() {\n boolean validate = true;\n price = 0;\n System.out.print(\"Enter price you want to find: \");\n while (validate) {\n price = Validation.validateDoubleNumber(price);\n validate = false;\n }\n tree.findByPrice(price);\n }", "List<PriceInformation> getPriceForProduct(ProductModel product);", "public double getItemPrice(){\n\t\t\t String priceStr;\n\t\t\t double price;\n\t\t\t String elemVal = driver.findElement(productPrice).getText();\n\t Reporter.log(\"==========Item Price is \" + elemVal + \"=======\", true);\n\t priceStr = elemVal.substring(1, elemVal.length());\n\t //return double as it is a price\n\t price = Double.parseDouble(priceStr);\n\t return price;\n\t }", "public ReservedInstancePriceItem [] getPrices() {\n return this.Prices;\n }", "@Override\n public double findPrice(DatabaseItem item) {\n this.item = item;\n this.dialog = new ProgressDialog(ctx);\n this.execute();\n return this.currentPrice;\n }", "public float getPrices(Integer id);", "private void getAllItems() {\n\n try {\n double sellingPrice = 0;\n ArrayList<Item> allItems = ItemController.getAllItems();\n for (Item item : allItems) {\n double selling_margin = item.getSelling_margin();\n if (selling_margin > 0) {\n sellingPrice = item.getSellingPrice() - (item.getSellingPrice() * selling_margin / 100);\n } else {\n sellingPrice = item.getSellingPrice();\n }\n Object row[] = {item.getItemCode(), item.getDescription(), Validator.BuildTwoDecimals(item.getQuantity()), Validator.BuildTwoDecimals(sellingPrice)};\n tableModel.addRow(row);\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public double getPricePerItem()\r\n {\r\n return pricePerItem;\r\n }", "private static void findPrice(){\n Document document;\n String newURL = getLink(broadWebsite)[0];\n\n try{\n document = Jsoup.connect(website +newURL).userAgent(USER_AGENT).get();\n }\n catch(IOException e){\n return;\n }\n System.out.println(\"hi\");\n //System.out.println(link);\n Elements elements = document.getElementsByClass(\"vehicle-info__price-display\");\n\n // for(Element e : elements){\n // System.out.println(e);\n // for(DataNode node : e.dataNodes()){\n // //If the key does not exist, then create a new one and add value to it\n // if(map.get(link) == null){\n // map.put(link, new ArrayList<String>());\n // map.get(link).add(\"Price: \"+ node.attr(\"price\")+\"\\n\");\n // }\n // //If it is there already, then just add\n // else{\n // map.get(link).add(\"Price: \"+ node.attr(\"price\")+\"\\n\");\n // }\n // }\n\n // }\n\n for(Element e : elements){\n System.out.println(e);\n System.out.println(\"---\");\n }\n }", "public double getDiscountedPrice(double itemPrice);", "protected Double getItemPrice() {\n return itemPrice;\n }", "@Override\r\n public long priceBasket(List<String> items) throws UnrecognisedItemException {\n Order order = orderService.createOrder(items);\r\n\r\n //NOTE - in real world, offers are expected to change very frequently and hence its best\r\n //to encapsulate it into a separate service.\r\n List<Offer> offers = orderService.getOffers(order);\r\n\r\n long discount = orderService.calculateDiscount(order, offers);\r\n\r\n return order.getTotalOriginalPriceInPence() - discount;\r\n }", "private double[] getMenuItemPrices() {\n double[] prices = new double[menuItemPrices.size()];\n for (int i = 0; i < menuItemPrices.size(); i ++) {\n prices[i] = menuItemPrices.get(i).doubleValue();\n }\n return prices;\n }", "@Override\r\n\tpublic List<ProductRaw_Price> getPrices(PageRequest pageable) {\n\t\treturn productRaw_PriceDao.getProductRawPrices(pageable);\r\n\t}", "List<PriceRow> getPriceInformationsForProduct(ProductModel model);", "public List<List<?>> getItemsWithHigherPrice(double price) {\n\t\tSqlFieldsQuery query = new SqlFieldsQuery(\"SELECT * FROM Item WHERE attr(22) > 0\");\n\n\t\t// Executing the query.\n\t\treturn ignite.getOrCreateCache(\"ItemCache\").query(query).getAll();\n\t}", "private String getShippingPrice(Document item) {\n String result;\n result = item.select(\"span[class^=shippingPrice]\").html();\n return result;\n }", "public synchronized WebElement productPrice() throws Exception {\n\n\t\treturn utils.findElementByLocator(driver, \"PDP_priceRange\", \"| Mark down price not present\");\n\t}", "public ItemPrice getItemsPriceByCartons(Item itm) {\n ItemPrice itmPrice = new ItemPrice();\n itmPrice.calculateTotalByCarton(itm);\n return itmPrice;\n }", "@Override\n\tpublic double getItemPrice(String itemCode) {\n\n\t\treturn 100.00;\n\t}", "protected int queryPrice(int id, String key) {\n Trace.info(\"RM::queryCarsPrice(\" + id + \", \" + key + \") called\" );\n ReservableItem curObj = (ReservableItem) readData( id, key);\n int value = 0; \n if ( curObj != null ) {\n value = curObj.getPrice();\n } // else\n Trace.info(\"RM::queryCarsPrice(\" + id + \", \" + key + \") returns cost=$\" + value );\n return value; \n }", "public double getPriceForItem(Item i)\n\t{\n\t\tdouble price = 0.0;\n\t\tprice = strDAO.getPriceForStorenameAndItem(name, i);\n\t\treturn price;\t\t\t\n\t}", "public float getItemPrice()\n\t{\n\t\treturn itemPrice;\n\t}", "Price[] getTradePrices();", "public void scanNameAndgetPriceValue(WebDriver driver){\n\t\tList<String> price;\n\t\t\t\n\t\t\n\t\tdo{\t\t\t\n\t\t\tList<WebElement>rows = driver.findElements(By.xpath(\"//td[1]\"));\n\t\t\tprice = rows.stream().filter(s -> s.getText().contains(\"Rice\")).map(s ->getPriceVegi(s)).collect(Collectors.toList());\n\t\t\tprice.stream().forEach(s -> System.out.println(s));\t\t\t\n\t\t\tif(price.size()<1){\n\t\t\t\tdriver.findElement(By.cssSelector(\"[aria-label='Next']\")).click();\n\t\t\t}\t\t\t\n\t\t}while(price.size()<1);\t\t\n\t}", "private void calcPrice() {\n double itemPrice = 0;\n \n //get price of burger (base)\n if (singleRad.isSelected())\n {\n itemPrice = 3.50;\n }\n else \n {\n itemPrice = 4.75;\n }\n \n //check options add to item price\n if(cheeseCheckbox.isSelected())\n itemPrice = itemPrice += 0.50;\n if(baconCheckbox.isSelected())\n itemPrice = itemPrice += 1.25;\n if(mealCheckbox.isSelected())\n itemPrice = itemPrice += 4.00;\n \n //include the quantity for the item price\n int quantity= 1;\n if (quantityTextField.getText().equals(\"\"))\n quantityTextField.setText(\"1\");\n quantity = Integer.parseInt(quantityTextField.getText());\n itemPrice = itemPrice * quantity;\n\n \n //show the price no $ symbol\n \n itemPriceTextField.setText(d2.format(itemPrice));\n }", "public String getIndividualProductPrice(String itemName)\n\t{\n\n\t\tString fixedString = fixString(itemName);\n\t\tString price = NO_PRICE_FOUND;\n\t\ttry {\n\t\t\tScanner scanner = getScanner(fixedString);\n\t\t\tprice = getPriceFromScanner(scanner);\n\n\t\t}catch ( Exception ex ) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn price;\n\t}", "public static String[] getItemPrice(String type, String entity, String item, String uom, String curr) {\n\r\n String[] TypeAndPrice = new String[2]; \r\n String Type = \"none\";\r\n String price = \"0\";\r\n String pricecode = \"\";\r\n\r\n try{\r\n Connection con = null;\r\n if (ds != null) {\r\n con = ds.getConnection();\r\n } else {\r\n con = DriverManager.getConnection(url + db, user, pass); \r\n }\r\n Statement st = con.createStatement();\r\n ResultSet res = null;\r\n try{\r\n \r\n // customer based pricing\r\n if (type.equals(\"c\")) {\r\n res = st.executeQuery(\"select cm_price_code from cm_mstr where cm_code = \" + \"'\" + entity + \"'\" + \";\");\r\n while (res.next()) {\r\n pricecode = res.getString(\"cm_price_code\");\r\n } \r\n // if there is no pricecode....it defaults to billto\r\n if (! pricecode.isEmpty()) {\r\n entity = pricecode;\r\n }\r\n\r\n res = st.executeQuery(\"select cpr_price from cpr_mstr where cpr_cust = \" + \"'\" + entity + \"'\" + \r\n \" AND cpr_item = \" + \"'\" + item + \"'\" +\r\n \" AND cpr_uom = \" + \"'\" + uom + \"'\" +\r\n \" AND cpr_curr = \" + \"'\" + curr + \"'\" +\r\n \" AND cpr_type = 'LIST' \"+ \";\");\r\n while (res.next()) {\r\n price = res.getString(\"cpr_price\").replace('.', defaultDecimalSeparator);\r\n Type = \"cust\";\r\n\r\n }\r\n }\r\n\r\n // vendor based pricing\r\n if (type.equals(\"v\")) {\r\n res = st.executeQuery(\"select vd_price_code from vd_mstr where vd_addr = \" + \"'\" + entity + \"'\" + \";\");\r\n while (res.next()) {\r\n pricecode = res.getString(\"vd_price_code\");\r\n } \r\n // if there is no pricecode....it defaults to billto\r\n if (! pricecode.isEmpty()) {\r\n entity = pricecode;\r\n }\r\n\r\n res = st.executeQuery(\"select vpr_price from vpr_mstr where vpr_vend = \" + \"'\" + entity + \"'\" + \r\n \" AND vpr_item = \" + \"'\" + item + \"'\" +\r\n \" AND vpr_uom = \" + \"'\" + uom + \"'\" +\r\n \" AND vpr_curr = \" + \"'\" + curr + \"'\" + \r\n \" AND vpr_type = 'LIST' \"+ \";\");\r\n while (res.next()) {\r\n price = res.getString(\"vpr_price\").replace('.', defaultDecimalSeparator);\r\n Type = \"vend\";\r\n\r\n }\r\n }\r\n\r\n\r\n // if there is no customer specific price...then pull price from item master it_sell_price\r\n if ( price.equals(\"0\") ) {\r\n if (type.equals(\"c\")) { \r\n res = st.executeQuery(\"select it_sell_price as itemprice from item_mstr where it_item = \" + \"'\" + item + \"'\" + \";\");\r\n } else {\r\n res = st.executeQuery(\"select it_pur_price as itemprice from item_mstr where it_item = \" + \"'\" + item + \"'\" + \";\"); \r\n }\r\n while (res.next()) {\r\n price = res.getString(\"itemprice\").replace('.', defaultDecimalSeparator); \r\n Type = \"item\";\r\n }\r\n }\r\n\r\n TypeAndPrice[0] = Type;\r\n TypeAndPrice[1] = String.valueOf(price);\r\n\r\n }\r\n catch (SQLException s){\r\n MainFrame.bslog(s);\r\n } finally {\r\n if (res != null) {\r\n res.close();\r\n }\r\n if (st != null) {\r\n st.close();\r\n }\r\n con.close();\r\n }\r\n }\r\n catch (Exception e){\r\n MainFrame.bslog(e);\r\n }\r\n return TypeAndPrice;\r\n\r\n }", "public void setPrice(float itemPrice) \n {\n price = itemPrice;\n }", "public ItemPrice getItemsPriceByUnits(Item itm) {\n ItemPrice itmPrice = new ItemPrice();\n itmPrice.calculateTotalByUnits(itm);\n return itmPrice;\n }", "boolean hasPrice();", "boolean hasPrice();", "boolean hasPrice();", "public String getPriceOfArticle(Document document) {\n\t\tString price = \"\";\n\t\t// <p class=\"price\" itemprop=\"offers\" itemscope \n\t\t// \titemtype=\"http://schema.org/Offer\"><span data-currency=\"EUR\" itemprop=\"price\">€1,698</span></p>\n\t\t// Peut etre sélectionner la div \"details\" avant de chercher les p ? \n\t\tElements priceElements = document.getElementsByClass(\"price\");\n\t\tfor (Element priceElement : priceElements) {\n\t\t\t// Get the name if the item\n\t\t\t// <p class=\"style protect\" itemprop=\"model\">White</p>\n\t\t\tif (priceElement.attr(\"itemprop\").equals(\"price\")) {\n\t\t\t\t// get the inner text of the html tag if we are on the item name \n\t\t\t\treturn price = priceElement.text(); \n\t\t\t}\n\t\t}\n\t\treturn price;\n\t}", "public int getPrice()\r\n\t{\r\n\t\treturn theItem.getPrice();\r\n\t}", "public int getPrice() {\n for (Item item : items) {\n price +=item.getPrice();\n }\n return price;\n }", "public BigDecimal getPriceListEntered();", "@Test\n\tpublic void getCostForItem() {\n\t\tfinal BasketItemImpl bi = new BasketItemImpl();\n\t\tbi.addBasketItem(\"banana\", 2);\n\t\tbi.addBasketItem(\"lemon\", 3);\n\n\t\tfinal int fc = bi.getAllBasketItems().get(\"banana\");\n\t\tassertTrue(Integer.compare(2, fc) == 0);\n\n\t}", "double getPrice();", "double getPrice();", "double getPrice();", "public ArrayList<Double> GetPrices()\r\n\t{\r\n\t\treturn dayStockPrices;\r\n\t}", "Price getPrice() throws Exception;", "double calculateTotalPrice(Map<String, Item> itemMap, List<String> itemList);", "public AmountType getItemPrice() {\n\t return this.itemPrice;\n\t}", "public BigDecimal getPriceList();", "public static double getItemPrice(String item) {\n\t\tdouble price;\t\n\t\tswitch(item) {\n\t\tcase \"bread\":\n\t\t\tprice = 4.99;\n\t\t\tbreak;\n\t\tcase \"water\":\n\t\t\tprice = 2.99;\n\t\t\tbreak;\n\t\tcase \"apple\":\n\t\t\tprice = 1.50;\n\t\t\tbreak;\n\t\tcase \"bear\":\n\t\t\tprice = 7.90;\n\t\t\tbreak;\n\t\tcase \"red bull\":\n\t\t\tprice = 2.59;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tprice = 0.00;\n\t\t\tbreak;\t\n\t\t}\n\t\t\n\t\treturn price;\n\t}", "public void priceCheck() {\n\t\tnew WLPriceCheck().execute(\"\");\n\t}", "@Override\n\tpublic int getPrice(int itemNumber) {\n\t\treturn inventory.getItemPrice(itemNumber);\n\t}", "boolean examinePaidItems(){\n\t\t\tint count = 0;\n\t\t\tif (!this.items.isEmpty()){\n\t\t\t\tfor (int i = 0; i < this.items.size(); i++){\n\t\t\t\t\tif (this.items.get(i).montaryValue != 0){\n\t\t\t\t\t\tSystem.out.print(this.items.get(i).itemName + \" ($\" + (this.items.get(i).montaryValue * -1) + \"), \");\n\t\t\t\t\t\tcount++;}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!this.receptacle.isEmpty()){//if the location has containers.\n\t\t\t\tfor (int k = 0; k < this.receptacle.size(); k++){//loops through the containers in the location\n\t\t\t\t\tif (!(this.receptacle.get(k) instanceof SpecialtyContainer)){//some containers are hidden, like the depths of the cove. \n\t\t\t\t\t\tfor (int j = 0; j < this.receptacle.get(k).contents.size(); j++){//looks for the items in the non hidden containers\n\t\t\t\t\t\t\tif (this.receptacle.get(k).contents.get(j).montaryValue < 0){//if the item needs to be bought\n\t\t\t\t\t\t\t\tSystem.out.print(this.receptacle.get(k).contents.get(j).itemName + \" ($\" + \n\t\t\t\t\t\t\t\t\t\t(this.receptacle.get(k).contents.get(j).montaryValue * -1) + \"), \");\n\t\t\t\t\t\t\t\tcount++;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif (count == 0){//it didn't find any items you need to pay for.\n\t\t\t\tSystem.out.println(\"There's nothing here that costs money.\");\n\t\t\t\treturn false;}\n\t\t\treturn true;\n\t\t}", "List<ItemPriceDTO> findAll();", "public int checkout(String items) throws ProductNotFoundException {\n Integer totalPrice = 0;\n\n HashMap<Character, Product> productTotalList = new HashMap<Character, Product>();\n for (Character c : items.toCharArray()) {\n if (productList.containsKey(c)) {\n Product product = (Product)productList.get(c);\n if (productTotalList.containsKey(c)) {\n Product totalProduct = productTotalList.get(c);\n totalProduct.setTotalNumberOfProducts(product.getTotalNumberOfProducts() + 1);\n }\n else {\n product.setTotalNumberOfProducts(product.getTotalNumberOfProducts() + 1);\n productTotalList.put(c, product);\n }\n }\n else {\n throw new ProductNotFoundException(\"Product '\" + c + \"' not found.\");\n }\n }\n\n for (Map.Entry<Character,Product> entry : productTotalList.entrySet()) {\n Product product = entry.getValue();\n totalPrice += product.calculateTotalPrice();\n }\n\n return totalPrice;\n }", "protected String getFormattedItemPrice() {\n return formattedItemPrice;\n }", "List<Price> findAll();", "double calculatePrice();", "Optional<BigDecimal> getDiscountedTotalPrice(List<Item> items) throws CheckoutProcessingException;", "public void setPrices(ReservedInstancePriceItem [] Prices) {\n this.Prices = Prices;\n }", "public double getPotatoesPrice();", "public double getPrice();", "public static Vector<Company> getAllPrices(){\n\t\treturn all_prices;\n\t}", "public void listBooksByPrice(int price) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE Price = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setInt(1, price);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "abstract public double getPrice();", "@Override\n public double calculatePrice() {\n return getVolume() * (1.0 + (getAlcoholPercent() / 100.0)) * this.liquids.size();\n }", "private void insertItemPrice(final Price price) {\n try {\n boolean isItemExisting = false;\n ItemEntity knownItem = mDatabaseAccess.itemsDAO().selectItem(price.getId());\n // item is not known yet. Load the item via the REST API\n if (knownItem == null) {\n Item newItem = mItemAccess.getItemWithWifi(price.getId());\n if (newItem != null) {\n mDatabaseAccess.itemsDAO().insertItems(new ItemEntity(newItem));\n isItemExisting = true;\n }\n } else {\n isItemExisting = true;\n }\n\n // add the price only if the item reference is known and exists\n if (isItemExisting) {\n ItemPriceEntity newPrice = new ItemPriceEntity(\n price.getId(),\n price.getBuys().getUnitPrice(),\n price.getSells().getUnitPrice(),\n System.currentTimeMillis());\n mDatabaseAccess.itemsDAO().insertItemPrice(newPrice);\n } else {\n Log.w(TAG, String.format(\n \"The Item to the price id '%d' doesn't exist. the price will be skipped\",\n price.getId()));\n }\n } catch (Exception ex) {\n Log.e(TAG, \"Failed to process the item price with the ID: \" + price.getId(), ex);\n }\n }", "public static void setPrice() {\n double summe = 0.0;\n for (Object obj : dlm.getDisplayedArtikel()) {\n if (obj instanceof Article) {\n Article art = (Article) obj;\n if (!art.isIsAbfrage()) {\n if (((art.isJugendSchutz() && art.isJugendSchutzOk())) || !art.isJugendSchutz()) {\n if (art.isEloadingAmmountOk() && !art.isPriceZero()) {\n summe += ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n }\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe += card.getAufladung() / 100;\n }\n }\n for (Object obj : dlm.getRemovedObjects()) {\n if (obj instanceof Article) {\n if (!((Article) ((obj))).isStorno_error()) {\n summe -= ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe -= card.getAufladung() / 100;\n }\n }\n if (Math.round(summe) == 0) {\n summe = 0;\n }\n if (GUIOperations.isTraining()) {\n summe += 1000;\n }\n tfSumme.setText(String.format(\"%.2f\", summe));\n }", "public List<Share> getPrices()\r\n\t{\r\n\t\treturn this.prices;\r\n\t}", "@Override\n public USMoney calculatePrice() {\n USMoney sumPrice = new USMoney();\n for (int i = 0; i < curArrayIndex; i++) {\n sumPrice = sumPrice.add(items[i].getPrice());\n if (items[i].isFragile()) {\n sumPrice.addTo(10, 0);\n }\n }\n sumPrice.addTo(100, 0);\n return sumPrice;\n }", "public Double getPrice();", "String getPrice();", "public static Map<String,String> getPrice() throws MalformedURLException, IOException {\n Map<String,String>priceMap = new HashMap();\n String price;\n URL url = new URL(\"https://api.independentreserve.com/Public/GetMarketSummary?primaryCurrencyCode=xbt&secondaryCurrencyCode=aud\");\n try (InputStream is = url.openStream();\n JsonParser parser = Json.createParser(is)) {\n while (parser.hasNext()) {\n JsonParser.Event e = parser.next();\n if (e == JsonParser.Event.KEY_NAME) {\n switch (parser.getString()) {\n case \"DayHighestPrice\":\n parser.next();\n price=parser.getString();\n priceMap.put(\"DayHighestPrice\",price);\n break;\n case \"DayLowestPrice\":\n parser.next();\n System.out.print(\"DayLowestPrice: \");\n price=parser.getString();\n System.out.println(price);\n System.out.println(\"---------\");\n priceMap.put(\"DayLowestPrice\", price);\n break;\n case \"CurrentLowestOfferPrice\":\n parser.next();\n System.out.print(\"CurrentLowestOfferPrice: \");\n price=parser.getString();\n System.out.println(price);\n System.out.println(\"---------\");\n priceMap.put(\"CurrentLowestOfferPrice\", price);\n break;\n case \"CurrentHighestBidPrice\":\n parser.next();\n price=parser.getString();\n System.out.print(\"CurrentHighestBidPrice: \");\n System.out.println(price);\n priceMap.put(\"CurrentHighestBidPrice\", price);\n break;\n case \"LastPrice\":\n parser.next();\n System.out.print(\"LastPrice: \");\n price=parser.getString();\n System.out.println(price);\n System.out.println(\"---------\");\n priceMap.put(\"LastPrice\", price);\n break;\n }\n }\n }\n }\n \n return priceMap; \n}", "public double getItemPrice(String itemBarCode) {\n double itemPrice = 0 ;\n Map<String,GroceryItem> itemsMap = readItemsFromFile();\n GroceryItem groceryItem = itemsMap.get(itemBarCode.trim());\n\n\n itemPrice = groceryItem.getPrice();\n return itemPrice;\n }", "public void setItemPrice(float itemPrice)\n\t{\n\t\tthis.itemPrice = itemPrice;\n\t}", "List<Item> findByPriceBetween(double minPrice, double maxPrice);", "private String marketPrices() {\r\n\t\tdouble[] prices=market.getPrices();\r\n\t\tString out = \"Prices Are: \";\r\n\t\tfor(int i=0; i<prices.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+String.format(\"%.2f\", prices[i])+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "TickerPrice getPrice(String symbol);", "List<SpotPrice> getAll();", "public int getVehiclePrice() {\n return itemPrice;\n }", "public static void listItems(String [] products, double [] prices, int [] amount)\r\n\t{\r\n\t\tproductAmounts = new double [answer];\r\n\t\tfor(int i = 0; i < productAmounts.length; i++)\r\n\t\t{\r\n\t\t\tif(amount[i] > 0)\r\n\t\t\t{\r\n\t\t\t\tproductAmounts[i] = amount[i] * prices[i];\r\n\t\t\t\tSystem.out.println(amount[i] + \" counts of \" + products[i] + \" @ \" + prices[i] + \" = $\" + productAmounts[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setItemPrice(AmountType itemPrice) {\n\t this.itemPrice = itemPrice;\n\t}", "public boolean sortByPrice()\n\t{\n\t\tlistings = driver.findElements(By.xpath(listingsXpath));\n\t\tlistingsIterator = listings.iterator();\n\t\tprices = new ArrayList<BigDecimal>();\n\t\tlistsEqual = false;\n\n\t\twhile(listingsIterator.hasNext())\n\t\t{\n\t\t\t\n\t\t\tlistingElement = listingsIterator.next();\n\t\t\tlistingPrices = new ArrayList<BigDecimal>();\n\t\t\tlistingPriceElements = listingElement.findElements(By.xpath(listingPriceXpath));\n\t\t\tpriceIterator = listingPriceElements.iterator();\n\t\t\tString priceText;\n\t\t\t\n\t\t\twhile(priceIterator.hasNext())\n\t\t\t{\n\t\t\t\tpriceElement = priceIterator.next();\n\t\t\t\tpriceText = priceElement.getText().replaceAll(\"[€a-zA-Z\\\\t\\\\s]+\",\"\");\n\t\t\t\tprice = new BigDecimal(priceText);\n\t\t\t\tlistingPrices.add(price);\n\t\t\t}\n\t\t\tprices.add(Collections.min(listingPrices));\n\t\t}\n\t\t\n\t\tsortedPrices = prices;\n\t\tCollections.sort(sortedPrices);\n\t\t\n\t if(prices.equals(sortedPrices))\n\t {\n\t \tlistsEqual = true;\n\t }\n\t\t\n\t\treturn listsEqual;\n\t}", "java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> \n getPriceList();", "public String callSubTotalValueCommonLogicShoppingCart() {\n\n //get count of CNC item price listed\n List<WebElement> listcountCNC = getDriver().findElements(By.xpath(\"//*[@id='productGroup_1']//*[@class='prodDtlSalePriceDollars']\"));\n System.out.println(\"=== Price list count CNC Items : \" + listcountCNC.size());\n\n //get count of SPO item price listed\n List<WebElement> listcountSPO = getDriver().findElements(By.xpath(\"//*[@id='productGroup_2']//*[@class='prodDtlSalePriceDollars']\"));\n System.out.println(\"=== Price list count SPO Items: \" + listcountSPO.size());\n\n //get count of CNC item price listed\n List<WebElement> listcountSTH = getDriver().findElements(By.xpath(\"//*[@id='productGroup_8']//*[@class='prodDtlSalePriceDollars']\"));\n System.out.println(\"=== Price list count STH Items: \" + listcountSTH.size());\n\n //to add price of items\n try {\n for (int k = 1; k <= listcountCNC.size(); k++) {\n String itempriceCNC = getDriver().findElement(By.xpath(\"//*[@id='productGroup_1']/li[\" + k + \"]//*[@class='prodDtlSalePriceDollars']\")).getText();\n System.out.println(\"=== Price List of CNC is: \" + itempriceCNC);\n PriceList.add(itempriceCNC.replaceAll(\"[^0-9.]\", \"\"));\n }\n } catch (Exception e) {\n System.out.println(\"=== Item doesn't contain CNC item\");\n }\n\n\n try {\n for (int k = 1; k <= listcountSPO.size(); k++) {\n String itempriceSPO = getDriver().findElement(By.xpath(\"//*[@id='productGroup_2']/li[\" + k + \"]//*[@class='prodDtlSalePriceDollars']\")).getText();\n //PriceList.add(itemprice.replaceAll(\"\\\\$+\\\\s+\\\\/(ea|bag)\", \"\"));\n System.out.println(\"=== Price List of SPO is: \" + itempriceSPO);\n PriceList.add(itempriceSPO.replaceAll(\"[^0-9.]\", \"\"));\n }\n } catch (Exception e) {\n System.out.println(\"=== Item doesn't contain SPO item\");\n }\n\n try {\n for (int k = 1; k <= listcountSTH.size(); k++) {\n String itempriceSTH = getDriver().findElement(By.xpath(\"//*[@id='productGroup_8']/li[\" + k + \"]//*[@class='prodDtlSalePriceDollars']\")).getText();\n //PriceList.add(itemprice.replaceAll(\"\\\\$+\\\\s+\\\\/(ea|bag)\", \"\"));\n System.out.println(\"=== Price List of STH is: \" + itempriceSTH);\n PriceList.add(itempriceSTH.replaceAll(\"[^0-9.]\", \"\"));\n }\n } catch (Exception e) {\n System.out.println(\"=== Item doesn't contain STH item\");\n }\n\n //Qty for CNC\n try {\n for (int j = 1; j <= listcountCNC.size(); j++) {\n String qtyCNC = getDriver().findElement(By.xpath(\"//*[@id='productGroup_1']/li[\" + j + \"]//*[@class='mjr-input-field mjr-qtyInput form-control quantity']\")).getAttribute(\"value\");\n System.out.println(\"=== Qty of CNC item(s) is: \" + qtyCNC);\n QtyList.add(qtyCNC);\n }\n } catch (Exception e) {\n System.out.println(\"=== Item doesn't contain CNC item\");\n }\n\n //QTY for SPO\n try {\n for (int j = 1; j <= listcountSPO.size(); j++) {\n String qtySPO = getDriver().findElement(By.xpath(\"//*[@id='productGroup_2']/li[\" + j + \"]//*[@class='mjr-input-field mjr-qtyInput form-control quantity']\")).getAttribute(\"value\");\n System.out.println(\"=== Qty od SPO item(s) is: \" + qtySPO);\n QtyList.add(qtySPO);\n }\n } catch (Exception e) {\n System.out.println(\"=== Item doesn't contain SPO item editable\");\n }\n\n //Qty for STH\n try {\n for (int j = 1; j <= listcountSTH.size(); j++) {\n String qtySTH = getDriver().findElement(By.xpath(\"//*[@id='productGroup_8']/li[\" + j + \"]//*[@class='mjr-input-field mjr-qtyInput form-control quantity']\")).getAttribute(\"value\");\n System.out.println(\"=== Qty is: \" + qtySTH);\n QtyList.add(qtySTH);\n }\n } catch (Exception e) {\n System.out.println(\"=== Item doesn't contain STH item\");\n }\n\n\n //convert string array to float array for Price\n List<Float> PriceListflt = new ArrayList<Float>(PriceList.size());\n\n for (String mypriceInt : PriceList) {\n PriceListflt.add(Float.valueOf(mypriceInt));\n }\n System.out.println(\"=== value of pricelist array \" + PriceListflt);\n\n //convert string array to float array for Qty\n List<Float> QtyListflt = new ArrayList<Float>(QtyList.size());\n\n for (String myqtyInt : QtyList) {\n QtyListflt.add(Float.valueOf(myqtyInt));\n }\n System.out.println(\"=== value of pricelist array \" + QtyListflt);\n\n String formattedSubtotal;\n float finalitemPrice = 0;\n float subtotal = 0;\n {\n for (int z = 0; z < PriceListflt.size(); z++) {\n finalitemPrice = PriceListflt.get(z) * QtyListflt.get(z);\n System.out.println(\"=== finalitemPrice in for loop: \" + finalitemPrice);\n subtotal = subtotal + finalitemPrice;\n System.out.println(\"=== Subtotal Price in forloop: \" + subtotal);\n }\n DecimalFormat df = new DecimalFormat(\"#.00\");\n formattedSubtotal = df.format(subtotal);\n System.out.println(\"=== Return subtotal value is: \" + formattedSubtotal);\n }\n return formattedSubtotal;\n\n }", "public Double getPrice() {\r\n return price;\r\n }", "public double getPrice(){\r\n\t\treturn price;\r\n\t}", "public boolean hasPrice() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "public BigDecimal getItemPrice(Item item) {\n\t\tif (item instanceof BarcodedItem) {\n\t\t\tBarcodedItem barcodedItem = (BarcodedItem) item;\n\t\t\tBarcode code = barcodedItem.getBarcode();\n\n\t\t\tBarcodedProduct product;\n\t\t\t// look up the price in the database\n\t\t\ttry {\n\t\t\t\tproduct = productDatabase.getProductByBarcode(code);\n\t\t\t} catch (NonexistentBarcodeException e) {\n\t\t\t\tthrow new ControlSoftwareException(\"a purchased BarcodedItem does not exist\");\n\t\t\t}\n\t\t\treturn product.getPrice().setScale(2, BigDecimal.ROUND_HALF_DOWN);\n\t\t} else if (item instanceof PLUCodedItem) {\n\t\t\tPLUCodedItem pluItem = (PLUCodedItem) item;\n\t\t\tPriceLookupCode code = pluItem.getPLUCode();\n\t\t\tPLUCodedProduct pluProduct;\n\t\t\tBigDecimal itemWeight;\n\t\t\ttry {\n\t\t\t\tpluProduct = productDatabase.getProductByPLUCode(code);\n\t\t\t} catch (NonexistentPLUCodeException e) {\n\t\t\t\tthrow new ControlSoftwareException(\"a purchased PLUCodedItem does not exist\");\n\t\t\t}\n\t\t\titemWeight = BigDecimal.valueOf(pluItem.getWeight());\n\t\t\treturn pluProduct.getPrice().multiply(itemWeight).setScale(2, BigDecimal.ROUND_HALF_DOWN);\n\t\t} else if (!(item instanceof BagItem)) {\n\t\t\t// if the item is a bag, it is the customer's bag and doesn't\n\t\t\t// cost anything\n\t\t\tthrow new ControlSoftwareException(\"Couldn't find price of item.\");\n\t\t}\n\t\treturn new BigDecimal(\"0.00\");\n\t}", "public double totalPrices()\r\n {\r\n double total = 0;\r\n //Write a loop here to total the book prices. Each object in the ArrayList bookList is a Book, so you can\r\n //use the getter as you loop through and add the price to total\r\n if(bookList != null){\r\n for(Book book: bookList){\r\n total += book.getPrice();\r\n }\r\n }\r\n return total;\r\n }", "private void calculatePrice() {\r\n int price = 0;\r\n int day = show.getDateTime().getDayOfMonth();\r\n int month = show.getDateTime().getMonthValue();\r\n \r\n for (int i = 0; i < seats.size(); i++) {\r\n String option = seats.get(i);\r\n \r\n if (Arrays.stream(sectionNames).parallel().anyMatch(option::contains)) {\r\n String section = option.replaceAll(\"\\\\d\",\"\");\r\n int number = Integer.parseInt(option.replaceAll(\"\\\\D+\",\"\"));\r\n \r\n if (section.equals(\"m\")) {\r\n if (number <= 100) {\r\n price += mainFloorPrice;\r\n } else {\r\n price += mainFloorPremium;\r\n }\r\n } else if (section.equals(\"sb\")) {\r\n if (number <= 25) {\r\n price += southBalconyPrice;\r\n } else {\r\n price += southBalconyPremium;\r\n }\r\n } else if (section.equals(\"wb\")) {\r\n price += westBalconyPrice;\r\n } else if (section.equals(\"eb\")) {\r\n price += eastBalconyPrice;\r\n }\r\n }\r\n }\r\n \r\n if (seats.size() >= 5 && seats.size() <= 10 && !(month == 12 && (day == 26 || day == 27))) {\r\n price -= (2 * seats.size());\r\n }\r\n \r\n if (seats.size() >= 11 && seats.size() <= 20 && !(month == 12 && (day == 26 || day == 27))) {\r\n price -= (5 * seats.size());\r\n }\r\n \r\n if (month == 12 && (day == 26 || day == 27)) {\r\n price = seats.size() * 20;\r\n }\r\n \r\n totalPrice = price;\r\n }", "public BigDecimal getPriceEntered();", "double getPricePerPerson();", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public double getPrice() {\r\n return price;\r\n }", "public float getItemPriceSearchVAT()\n\t{\n\t\treturn itemPriceSearchVAT;\n\t}", "@Test\n\tpublic void findPricingPrice() throws Exception{\n\t\tmvc.perform(get(new URI(\"/services/price?vehicleId=2\"))\n\t\t\t\t.accept(MediaType.APPLICATION_JSON_UTF8))\n\t\t\t\t.andExpect(status().isOk())\n\t\t\t\t.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))\n\t\t\t\t.andExpect(jsonPath(\"vehicleId\",is(2)));\n\t}" ]
[ "0.7115591", "0.66838753", "0.64810526", "0.6436164", "0.6432752", "0.640252", "0.63925403", "0.6268024", "0.6267291", "0.6214901", "0.62109333", "0.61691445", "0.61657375", "0.6160559", "0.61099404", "0.6075554", "0.60633284", "0.6048084", "0.60474354", "0.6038264", "0.60274905", "0.6022473", "0.59902984", "0.5965865", "0.59592575", "0.5944516", "0.59392136", "0.59386724", "0.5935697", "0.5927998", "0.59165114", "0.5901962", "0.58904517", "0.58871114", "0.58823526", "0.58818346", "0.58818346", "0.58818346", "0.5878687", "0.5876956", "0.5875337", "0.58725744", "0.5868556", "0.58651924", "0.58651924", "0.58651924", "0.58494747", "0.58473784", "0.5842885", "0.5835264", "0.58250046", "0.5806369", "0.58049303", "0.5804317", "0.5782959", "0.57739896", "0.5768231", "0.57668954", "0.57405514", "0.5723238", "0.5721342", "0.57175267", "0.5706001", "0.5660924", "0.5660208", "0.5654746", "0.56399596", "0.5634502", "0.5631805", "0.5623802", "0.562071", "0.5612795", "0.5610638", "0.5597864", "0.5592621", "0.5586768", "0.55797", "0.5575916", "0.55711854", "0.5564273", "0.55618584", "0.55581975", "0.5553042", "0.55416", "0.5524545", "0.5521163", "0.55127", "0.55125976", "0.5502326", "0.54986197", "0.54939985", "0.5493203", "0.54922265", "0.5489913", "0.5487794", "0.5485973", "0.5485973", "0.5485973", "0.5485973", "0.54833484", "0.54791033" ]
0.0
-1
Updates item prices and refresh GUI
@Override protected void onPostExecute(Void aVoid){ super.onPostExecute(aVoid); this.dialog.dismiss(); String url = this.item.getUrl(); if(url.contains(HOME_DEPOT)){ String[] values = this.textPrice.split(" "); double dollars = Double.parseDouble(values[1]); double cents = Double.parseDouble(values[2])/100; this.currentPrice = dollars + cents; this.initTextPrice = this.initTextPrice.replace(",",("")); this.initialPrice = Double.parseDouble(initTextPrice.substring(1)); Toast.makeText(ctx,"Done updating",Toast.LENGTH_LONG).show(); } else if (url.contains(AMAZON)){ this.currentPrice = Double.parseDouble(this.textPrice.substring(1));//amazon Toast.makeText(ctx,"Done updating",Toast.LENGTH_LONG).show(); } else if (url.contains(WALMART)){ String[] values = this.textPrice.split(" "); this.currentPrice = Double.parseDouble(values[0].substring(1)); this.initialPrice = Double.parseDouble(values[2].substring(1)); Toast.makeText(ctx,"Done updating",Toast.LENGTH_LONG).show(); } else{ Toast.makeText(ctx,"Store Not supported",Toast.LENGTH_LONG).show(); this.currentPrice = 0.0; } if(this.initTextPrice == null){ this.initialPrice = this.currentPrice; } item.setInitialPrice(this.initialPrice); item.setCurrentPrice(this.currentPrice); item.calculatePercentageChange(); item.setChange(); DatabaseItemManager d = new DatabaseItemManager(ctx); d.updateItem(item); adapter.notifyDataSetChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void refreshButtonClicked(ActionEvent event) {\n\n PriceFinder refreshedPrice = new PriceFinder(); // generates a new price to set as a temp item's new price\n\n itemView.testItem.setPrice(refreshedPrice.returnNewPrice());\n configureUI(); // essentially pushes the new item information to the panel\n\n showMessage(\"Item price updated! \");\n }", "public void updatePrice(){\n\t\tprice = 0;\n\t\tfor (ParseObject selectedItem : selectedItems){\n\t\t\tprice += selectedItem.getInt(\"price\");\n\t\t}\n\n\t\tTextView orderTotal = (TextView) findViewById(R.id.orderTotal);\n\t\torderTotal.setText(\"$\" + price + \".00\");\n\t}", "private void refreshButtonClicked(ActionEvent event) {\n //--\n //-- WRITE YOUR CODE HERE!\n //--\n\n itemView.getItem().setPreviousPrice(itemView.getItem().getItemPrice());\n //itemView.getItem().setItemPrice(randPrice.getRandomPrice());\n itemView.getItem().setItemPrice(randPrice.getRandomPrice(itemView.getItem()));\n itemView.getItem().setItemChange();\n super.repaint();\n showMessage(\"Refresh clicked!\");\n }", "private void updatePriceView() {\n int subTotal = 0;\n int cartQuantity = 0;\n int calculatedDiscount = 0;\n\n DecimalFormat decimalFormatter = new DecimalFormat(\"₹#,##,###.##\");\n\n for (CartItem cartItem : cartList) {\n cartQuantity += cartItem.getQuantity();\n subTotal += cartItem.getQuantity() * cartItem.getPrice();\n }\n\n switch (discountType) {\n case AMOUNT:\n calculatedDiscount = discount;\n break;\n case PERCENTAGE:\n calculatedDiscount = (subTotal * discount) / 100;\n break;\n }\n\n subTotalView.setText(decimalFormatter.format(subTotal));\n\n String count = \"(\" + cartQuantity;\n\n if (cartQuantity < 2) {\n count += \" Item)\";\n } else {\n count += \" Items)\";\n }\n\n textNumberItems.setText(count);\n discountView.setText(decimalFormatter.format(calculatedDiscount));\n total = subTotal - calculatedDiscount;\n totalView.setText(decimalFormatter.format(total));\n updateCartNotification(cartQuantity);\n }", "private void refreshData() {\n\t\tif (error == null) {\n\t\t\terror = \"\";\n\t\t}\n\t\terrorLabel.setText(error);\n\t\tif (error.trim().length() > 0) {\n\t\t\terror = \"\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Get instance of system\n\t\tFoodTruckManagementSystem ftms = FoodTruckManagementSystem.getInstance();\n\t\t\n\t\t// Populate info\n\t\tlblItemname.setText(item.getName());\n\t\tlblItemPrice.setText(String.format(\"$%.2f\", item.getPrice()/100.0));\n\t\t\n\t\t\n\t\t// Populate list\n\t\tString prev = supplyList.getSelectedValue();\n\t\tlistModel.clear();\n\t\tIterator<Supply> its = item.getSupplies().iterator();\n\t\tSupply current;\n\t\twhile(its.hasNext()) {\n\t\t\tcurrent = its.next();\n\t\t\tlistModel.addElement(String.format(\"%.20s %.2f\", current.getSupplyType().getName(), current.getQuantity()));\n\t\t}\n\t\tif(prev != null) supplyList.setSelectedValue(prev, true);\n\t\t\n\t\t// Populate combo box\n\t\tprev = (String) ingredientsComboBox.getSelectedItem();\n\t\tingredientsComboBox.removeAllItems();\n\t\tIterator<SupplyType> itst = ftms.getSupplyTypes().iterator();\n\t\twhile(itst.hasNext()) {\n\t\t\tingredientsComboBox.addItem(itst.next().getName());\n\t\t}\n\t\tif(prev != null) ingredientsComboBox.setSelectedItem(prev);\n\t\t\n\t\t// Reset text field\n\t\tqtyTextField.setText(\"\");\n\t}", "public void changePrices()\n {\n String publisher = (String) publishers.getSelectedItem();\n if (publisher.equals(\"Any\"))\n {\n result.setText(\"I am sorry, but I cannot do that.\");\n return;\n }\n try\n { \n if (priceUpdateStmt == null)\n priceUpdateStmt = conn.prepareStatement(priceUpdate);\n priceUpdateStmt.setString(1, priceChange.getText());\n priceUpdateStmt.setString(2, publisher);\n int r = priceUpdateStmt.executeUpdate();\n result.setText(r + \" records updated.\"); \n } \n catch (SQLException e)\n {\n result.setText(\"\");\n while (e != null)\n {\n result.append(\"\" + e);\n e = e.getNextException();\n }\n }\n }", "@FXML\n private void updatePrice()\n {\n running = true;\n scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();\n\n scheduledExecutorService.scheduleAtFixedRate(() ->\n {\n try {\n currentPrice.setText(api.getPrice(selectedComboBoxPairing));\n } catch (BinanceApiException e) {\n e.printStackTrace();\n }\n\n }, 0, 4, TimeUnit.SECONDS);\n }", "private void update()\n {\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"UPDATE\");\n updateHumanPlayerMoney();\n updateListViewDoctorItems();\n updateListViewHospitalItems();\n updateListViewLogWindow();\n updateListViewComputerPlayer();\n load_figure();\n updateComputerPlayerMoney();\n }\n });\n }", "public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}", "private void updatePriceAndSaving() {\n movieOrder = new MovieOrder(movie, Weekday.weekdayForValue(selectedDay), flagsApplied, numberOfTickets);\n\n tvTotalPriceNewTickets.setText(getResources().getString(\n R.string.total_price_new_tickets,\n movieOrder.getTotalPriceAfterDiscount(),\n movieOrder.getNumberOfTicketsAfterOfferIsApplied())\n );\n\n tvSavingsNewTickets.setText(getResources().getString(\n R.string.today_saving_new_tickets,\n movieOrder.getTotalSaving()\n ));\n }", "private void updateContent() {\n if (product != null) {\n etProductName.setText(product.getName());\n etPrice.setText(product.getPrice().toString());\n }\n }", "public void actionPerformed(ActionEvent e) {\n if(e.getActionCommand().equals(\"Update\")){\n httpmethods httpmethods = new httpmethods();\n\n //Store textfield text in string\n String itemID = txtItemID.getText();\n String itemName = txtItemName.getText();\n String itemType = txtItemType.getText();\n String itemPrice = txtItemPrice.getText();\n String itemStock = txtItemStock.getText();\n\n //Read method\n Item it = httpmethods.findItem(itemID);\n\n //booleans for checking valid input\n boolean nameCheck, priceCheck, stockCheck, typecheck;\n\n if(itemType==null || !itemType.matches(\"[a-zA-Z]+\")){\n typecheck = false;\n txtItemType.setText(\"Invalid Type Input\");\n }\n else{\n typecheck = true;\n }\n\n if(!itemName.matches(\"[a-zA-Z0-9]+\")){\n nameCheck = false;\n txtItemName.setText(\"Invalid Name Input\");\n }\n else{\n nameCheck = true;\n }\n\n if(GenericHelper.validNumber(itemPrice)){\n priceCheck = true;\n }\n else{\n priceCheck = false;\n txtItemPrice.setText(\"Invalid Price Input\");\n }\n\n if(GenericHelper.validNumber(itemStock)){\n stockCheck = true;\n }\n else{\n stockCheck = false;\n txtItemStock.setText(\"Invalid Stock Input\");\n }\n\n //If all are valid then call update httpmethod\n if(nameCheck && typecheck && priceCheck && stockCheck){\n double ditemPrice = Double.parseDouble(itemPrice);\n double ditemStock = Double.parseDouble(itemStock);\n item = new Item.Builder().copy(it).itemName(itemName).itemType(itemType).itemPrice(ditemPrice).itemStock(ditemStock).builder();\n httpmethods.updateItem(item);\n txtItemName.setText(\"\");\n txtItemType.setText(\"\");\n txtItemPrice.setText(\"\");\n txtItemStock.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Item Updated\");\n }\n\n\n }\n\n //When Get Info Button is clicked\n if(e.getActionCommand().equals(\"Get Info\")){\n boolean idCheck;\n\n //Use read method of readitemgui\n String id = txtItemID.getText();\n httpmethods httpmethods = new httpmethods();\n Item it = httpmethods.findItem(id);\n txtItemName.setText(it.getItemName());\n txtItemType.setText(it.getItemType());\n\n //Doubles are stored in string without decimals\n String price = String.valueOf(it.getItemPrice()).split(\"\\\\.\")[0];;\n String stock = String.valueOf(it.getItemStock()).split(\"\\\\.\")[0];\n txtItemPrice.setText(price);\n txtItemStock.setText(stock);\n }\n\n //When Clear Button is clicked\n if(e.getActionCommand().equals(\"Clear\")){\n txtItemID.setText(\"\");\n txtItemName.setText(\"\");\n txtItemType.setText(\"\");\n txtItemPrice.setText(\"\");\n txtItemStock.setText(\"\");\n }\n\n //When Exit Button is clicked\n if(e.getActionCommand().equals(\"Exit\")){\n UpdateItemFrame.dispose();\n }\n }", "private void updateTotal()\n {\n if(saleItems != null)\n {\n double tempVal = 0;\n\n for(int i = 0; i < saleItems.size(); i++)\n {\n if(saleItems.get(i) != null)\n {\n tempVal += saleItems.get(i).getPrice() * saleItems.get(i).getQuantity();\n }\n }\n totalText.setText(moneyFormat(String.valueOf(tempVal)));\n }\n }", "public void setPrice(float itemPrice) \n {\n price = itemPrice;\n }", "public void UpdatePFStorePrices()\n {\n PlayFabClientModels.GetStoreItemsRequest req = new PlayFabClientModels.GetStoreItemsRequest();\n req.StoreId = cStoreId;\n\n PlayFabErrors.PlayFabResult<PlayFabClientModels.GetStoreItemsResult> result = PlayFabClientAPI.GetStoreItems(req);\n\n String errors = CompileErrorsFromResult(result);\n Log.d(TAG, \"GetStoreItems: \" + (errors == null? \"success\" : errors));\n\n if(result.Result != null)\n {\n for(PlayFabClientModels.StoreItem item : result.Result.Store)\n {\n Log.d(TAG, \"Store Item ID: \" + item.ItemId);\n\n if(item.VirtualCurrencyPrices.containsKey(cVC))\n {\n mStorePrices.put(item.ItemId, Objects.requireNonNull(item.VirtualCurrencyPrices.get(cVC)));\n }\n }\n }\n }", "@Override\r\n\t\t\t\t\tprotected void updateItem(Object arg0, boolean arg1) {\n\t\t\t\t\t\tsuper.updateItem(arg0, arg1);\r\n\t\t\t\t\t\tif (arg1) {\r\n\t\t\t\t\t\t\tsetGraphic(null);\r\n\t\t\t\t\t\t\tsetText(null);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tbtn.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void handle(ActionEvent arg0) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getItems().get(getIndex());\r\n\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\t\t\t\t\t\tif(ConnectionManager.queryInsert(conn, \"DELETE FROM dbo.product WHERE id=\"+data.getId())>0) {\r\n\t\t\t\t\t\t\t\t\t\ttxt_cost.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_date.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_name.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_price.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_qty.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_search.clear();\r\n\t\t\t\t\t\t\t\t\t\tfetchData(FETCH_DATA);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tsetGraphic(btn);\r\n\t\t\t\t\t\t\tsetText(null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "public void update() {\r\n\t\tremoveAll();\r\n\t\tdrawGrid();\r\n\t\tplotDecades();\r\n\t\tgetEntries();\r\n\t}", "@FXML\n\t private void updateProductPrice (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.updateProdPrice(prodIdText.getText(),newPriceText.getText());\n\t resultArea.setText(\"Price has been updated for, product id: \" + prodIdText.getText() + \"\\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while updating price: \" + e);\n\t }\n\t }", "public void update() \n\t{\n\t\tString inst = \"\";\n\t\tfloat cash = getCash();\n\t\tfloat quantity = getPosition(inst);\n\t\tfloat price = getPrice(inst);\n\n\t\t_data.add(new Float(price));\n\t\t\n\t\tif (_data.size() > _period)\n\t\t{\n\t\t\t_data.remove(0);\n\t\t\n\t\t\tfloat min = Float.MAX_VALUE;\n\t\t\tfloat max = Float.MIN_VALUE;\n\t\t\t\n\t\t\tfor (int i = 0; i < _data.size(); i++)\n\t\t\t{\n\t\t\t\tFloat value = (Float)_data.get(i);\n\t\t\t\t\n\t\t\t\tif (value.floatValue() > max)\n\t\t\t\t{\n\t\t\t\t\tmax = value.floatValue();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (value.floatValue() < min)\n\t\t\t\t{\n\t\t\t\t\tmin = value.floatValue();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfloat buylevel = min + (min * _minwin);\n\t\t\tfloat sellevel = max - (max * _maxloss);\n\t\t\tfloat sellevel2 = min + (min * _maxwin);\n\t\t\t\n\t\t\t// if price has risen by min win\n\t\t\t// but is below maximum win and\n\t\t\t// below maximum loss then buy\n\t\t\tif (price > buylevel && \n\t\t\t\t\tprice < sellevel2 &&\n\t\t\t\t\tbuylevel < sellevel &&\n\t\t\t\t\tprice > _previous)\n\t\t\t{\n\t\t\t\tif (cash > 0) \n\t\t\t\t{\n\t\t\t\t\taddAmountOrder(inst, cash);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (price < sellevel &&\n\t\t\t\t\tbuylevel > sellevel &&\n\t\t\t\t\tprice < _previous)\n\t\t\t{\n\t\t\t\tif (quantity > 0)\n\t\t\t\t{\n\t\t\t\t\taddQuantityOrder(inst, -quantity);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (price > sellevel2 &&\n\t\t\t\t\tprice > _previous)\n\t\t\t{\n\t\t\t\tif (quantity > 0)\n\t\t\t\t{\n\t\t\t\t\taddQuantityOrder(inst, -quantity);\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t_data.remove(0);\n\t\t}\n\t\t\n\t\t_previous = price;\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n itemName = new javax.swing.JLabel();\n itemDate = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n updateBtn = new javax.swing.JButton();\n deleteBtn = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jButton8 = new javax.swing.JButton();\n jLabel10 = new javax.swing.JLabel();\n jButton10 = new javax.swing.JButton();\n jButton12 = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n itemPrice = new javax.swing.JLabel();\n jLabel12 = new javax.swing.JLabel();\n itemQty = new javax.swing.JLabel();\n jLabel14 = new javax.swing.JLabel();\n discRate = new javax.swing.JLabel();\n retriveBtn = new javax.swing.JButton();\n itemCat = new javax.swing.JComboBox<String>();\n itemID = new javax.swing.JTextField();\n itemNameNew = new javax.swing.JTextField();\n itemDateNew = new com.toedter.calendar.JDateChooser();\n itemPriceNew = new javax.swing.JTextField();\n itemQtyNew = new javax.swing.JTextField();\n discRateNew = new javax.swing.JTextField();\n jLabel37 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(25, 77, 25));\n\n jLabel2.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Item ID :\");\n\n jLabel4.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Item Description :\");\n\n itemName.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n itemName.setForeground(new java.awt.Color(255, 255, 255));\n\n itemDate.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n itemDate.setForeground(new java.awt.Color(255, 255, 255));\n itemDate.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n\n jLabel6.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Pruchase Date :\");\n\n updateBtn.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n updateBtn.setText(\"Update Profile\");\n updateBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n updateBtnActionPerformed(evt);\n }\n });\n\n deleteBtn.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n deleteBtn.setText(\"Delete Profile\");\n deleteBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteBtnActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"Item Profile\");\n\n jButton8.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 11)); // NOI18N\n jButton8.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\USER\\\\Desktop\\\\cwms_sherry\\\\project icons\\\\Exit_26px.png\")); // NOI18N\n jButton8.setText(\"Exit\");\n\n jLabel10.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n jLabel10.setForeground(new java.awt.Color(255, 255, 255));\n jLabel10.setText(\"Item Category :\");\n\n jButton10.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\USER\\\\Desktop\\\\cwms_sherry\\\\project icons\\\\Back Arrow_26px.png\")); // NOI18N\n\n jButton12.setIcon(new javax.swing.ImageIcon(\"C:\\\\Users\\\\USER\\\\Desktop\\\\cwms_sherry\\\\project icons\\\\Home_26px.png\")); // NOI18N\n jButton12.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton12ActionPerformed(evt);\n }\n });\n\n jLabel8.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n jLabel8.setForeground(new java.awt.Color(255, 255, 255));\n jLabel8.setText(\"Unit Price :\");\n\n itemPrice.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n itemPrice.setForeground(new java.awt.Color(255, 255, 255));\n itemPrice.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n\n jLabel12.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n jLabel12.setForeground(new java.awt.Color(255, 255, 255));\n jLabel12.setText(\"Quantity :\");\n\n itemQty.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n itemQty.setForeground(new java.awt.Color(255, 255, 255));\n itemQty.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n\n jLabel14.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n jLabel14.setForeground(new java.awt.Color(255, 255, 255));\n jLabel14.setText(\"Discount Rate (%) :\");\n\n discRate.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n discRate.setForeground(new java.awt.Color(255, 255, 255));\n discRate.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n\n retriveBtn.setFont(new java.awt.Font(\"Microsoft JhengHei\", 0, 14)); // NOI18N\n retriveBtn.setText(\"Retrive Profile\");\n retriveBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n retriveBtnActionPerformed(evt);\n }\n });\n\n itemCat.setFont(new java.awt.Font(\"SansSerif\", 0, 12)); // NOI18N\n itemCat.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n itemCatActionPerformed(evt);\n }\n });\n\n itemID.setFont(new java.awt.Font(\"SansSerif\", 0, 12)); // NOI18N\n itemID.setPreferredSize(new java.awt.Dimension(6, 25));\n itemID.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n itemIDActionPerformed(evt);\n }\n });\n\n itemNameNew.setFont(new java.awt.Font(\"SansSerif\", 0, 12)); // NOI18N\n itemNameNew.setPreferredSize(new java.awt.Dimension(6, 25));\n\n itemDateNew.setDateFormatString(\"dd-MMM-yyyy\");\n itemDateNew.setFont(new java.awt.Font(\"SansSerif\", 0, 12)); // NOI18N\n itemDateNew.setMaxSelectableDate(new java.util.Date(4102428682000L));\n itemDateNew.setMinSelectableDate(new java.util.Date(946666882000L));\n\n itemPriceNew.setFont(new java.awt.Font(\"SansSerif\", 0, 12)); // NOI18N\n itemPriceNew.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n itemPriceNew.setPreferredSize(new java.awt.Dimension(6, 25));\n itemPriceNew.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n itemPriceNewActionPerformed(evt);\n }\n });\n\n itemQtyNew.setFont(new java.awt.Font(\"SansSerif\", 0, 12)); // NOI18N\n itemQtyNew.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n itemQtyNew.setPreferredSize(new java.awt.Dimension(6, 25));\n\n discRateNew.setFont(new java.awt.Font(\"SansSerif\", 0, 12)); // NOI18N\n discRateNew.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n discRateNew.setPreferredSize(new java.awt.Dimension(6, 25));\n\n jLabel37.setFont(new java.awt.Font(\"Microsoft JhengHei\", 1, 14)); // NOI18N\n jLabel37.setForeground(new java.awt.Color(255, 255, 255));\n jLabel37.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel37.setText(\"%\");\n jLabel37.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(itemCat, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jLabel2)\n .addGap(10, 10, 10)\n .addComponent(itemID, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jLabel4)\n .addGap(10, 10, 10)\n .addComponent(itemName, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(60, 60, 60)\n .addComponent(itemNameNew, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(itemDate, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(62, 62, 62)\n .addComponent(itemDateNew, javax.swing.GroupLayout.PREFERRED_SIZE, 257, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jLabel14)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(303, 303, 303)\n .addComponent(discRateNew, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(353, 353, 353)\n .addComponent(jLabel37, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(188, 188, 188)\n .addComponent(retriveBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(updateBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(deleteBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel12)\n .addGap(10, 10, 10)\n .addComponent(itemQty, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(itemPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 230, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(2, 2, 2))\n .addComponent(discRate, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(60, 60, 60)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(itemPriceNew, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(itemQtyNew, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton8)\n .addContainerGap())\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(5, 5, 5)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(19, 19, 19))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(43, 43, 43)\n .addComponent(jLabel1))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(16, 16, 16)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel10)\n .addComponent(itemCat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(1, 1, 1)\n .addComponent(jLabel2))\n .addComponent(itemID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4)\n .addComponent(itemNameNew, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(itemName, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(itemDateNew, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(1, 1, 1)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(itemDate, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel8)\n .addComponent(itemPriceNew, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel12)\n .addComponent(itemQtyNew, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(itemQty, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel14)\n .addComponent(discRateNew, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel37)\n .addComponent(discRate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(34, 34, 34)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(retriveBtn)\n .addComponent(updateBtn)\n .addComponent(deleteBtn))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)\n .addComponent(jButton8))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(itemPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void calcPrice() {\n double itemPrice = 0;\n \n //get price of burger (base)\n if (singleRad.isSelected())\n {\n itemPrice = 3.50;\n }\n else \n {\n itemPrice = 4.75;\n }\n \n //check options add to item price\n if(cheeseCheckbox.isSelected())\n itemPrice = itemPrice += 0.50;\n if(baconCheckbox.isSelected())\n itemPrice = itemPrice += 1.25;\n if(mealCheckbox.isSelected())\n itemPrice = itemPrice += 4.00;\n \n //include the quantity for the item price\n int quantity= 1;\n if (quantityTextField.getText().equals(\"\"))\n quantityTextField.setText(\"1\");\n quantity = Integer.parseInt(quantityTextField.getText());\n itemPrice = itemPrice * quantity;\n\n \n //show the price no $ symbol\n \n itemPriceTextField.setText(d2.format(itemPrice));\n }", "public void priceUpdate(){\n \n double attractionPrices = 0;\n Attraction attraction;\n for(int i=0; i< getAttractionsList().size();i++)\n {\n attraction = (Attraction) getAttractionsList().get(i);\n attractionPrices += attraction.getPrice();\n }\n hotelPrice = diff(getEndDate(), getStartDate());\n price = getTravel().getPrice() + getHotel().getPrice()*(hotelPrice) \n + getTransport().getPrice()*getTravel().getDistance()\n + attractionPrices;\n }", "private void updateItems()\n\t{\t\n\t\tupdatePizzaTypes(items);\n\t\tupdateSidesTypes(items);\n\t\tupdateDrinksTypes(items);\n\t}", "public void doChangeTicketPrices();", "public void update() {\r\n\t\tScanner sc = new Scanner(System.in); // maybe can implement a while loop\r\n\t\tSystem.out.println(\"What would you like to update?\");\r\n\t\tSystem.out.println(\"1. Description 2. name 3. price 4. add items to Package 5. delete items from package\");\r\n\t\tint choice = sc.nextInt();\r\n\t\tsc.nextLine();\r\n\t\tswitch(choice){\r\n\t\t\tcase 1:\r\n\t\t\tSystem.out.println(\"What is the new description?\");\r\n\t\t\tthis.description = sc.nextLine();\r\n\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\tSystem.out.println(\"What is the new name?\");\r\n\t\t\tthis.name = sc.nextLine();\r\n\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\tSystem.out.println(\"What is the new price?\");\r\n\t\t\tthis.price = sc.nextDouble();\r\n\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\taddPromoItem();\r\n\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\tif (this.promo.isEmpty()){\r\n\t\t\t\tSystem.out.println(\"error\"); \r\n\t\t\t\treturn;\r\n\t\t\t} \r\n\t\t\tthis.print();\r\n\t\t\tSystem.out.println(\"Which item would you like to delete?\");\r\n\t\t\tint promoIndex = sc.nextInt();\r\n\t\t\tsc.nextLine();\r\n\t\t\tthis.promo.remove(promoIndex - 1); //delete the index - 1 promoItem from promoPackage\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tSystem.out.println(\"Promo Set Package updated, printing updated item...\");\r\n\t\tthis.print();\r\n\t}", "@Override\n\tpublic Item update() {\n\t\t\n\t\treadAll();\n\t\n\t\tLOGGER.info(\"State the shoe name you wish to update\");\n\t\tString name = util.getString().toLowerCase();;\n\t\tLOGGER.info(\"State the size you wish to update\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Change price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Change amount in stock\");\n\t\tlong stock = util.getLong();\n\t\tLOGGER.info(\"\\n\");\n\t\treturn itemDAO.update(new Item(name,size,price,stock));\n\t\t\n\t\t\n\t\t\n\t}", "void loadCurrentPrices() {\n for(SecurityRow row : allSecurities) {\n row.updateCurrentPrice();\n }\n fireTableRowsUpdated(0, allSecurities.size()-1);\n }", "private void updateOverview() {\n\t\t\n\t\t//check if anything is selected\n\t\tif (!listView.getSelectionModel().isEmpty()) {\n\t\t\tItemBox itemBox = listView.getSelectionModel().getSelectedItem();\n\n\t\t\tnameLabel.setText(itemBox.getName());\n\t\t\tamountLabel.setText(String.valueOf(itemBox.getAmount()) + \"x\");\n\t\t\tgtinLabel.setText(itemBox.getGtin());\n\t\t\tcategoriesLabel.setText(itemBox.getCategoriesText(\"long\"));\n\t\t\tattributesLabel.setText(itemBox.getAttributes());\n\t\t\tlog.info(\"Overview set to \" + itemBox.getName());\n\t\t}\t\n\t}", "public void updateComponents(){\n adapter.updateItems();\n }", "private void refreshCoins() {\n\t\t meCoinLabel.setText(\"硬币:\"+me_coin);\n\t\t leftCoinLabel.setText(\"硬币:\"+left_coin);\n\t\t rightCoinLabel.setText(\"硬币:\"+right_coin);\n\t\t \n\t}", "public void onStockpriceChanged();", "private JPanel updateInventoryPanel() {\n for (int i = 0; i < productValues.length; i++) {\n productValues[i] = i;\n }\n populateHashMap(productValues);\n JPanel update = new JPanel();\n update.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n update.setLayout(new BoxLayout(update,BoxLayout.Y_AXIS));\n for (String prod : updateInv.keySet()) {\n JPanel row = new JPanel();\n row.add(new JLabel(prod + \":\"));\n row.add(Box.createHorizontalStrut(15));\n row.add(updateInv.get(prod));\n update.add(row);\n }\n JPanel buttonPanel = new JPanel();\n buttonPanel.setLayout(new BorderLayout());\n JButton updateInv = new JButton(\"Update Inventory\");\n updateInv.addActionListener(new updateInventoryListener());\n buttonPanel.add(updateInv, BorderLayout.EAST);\n update.add(buttonPanel);\n return update;\n }", "void updateItem(E itemElementView);", "protected void _updateWidgets()\n\t{\n\t\t// Show the title\n\t\tString title = _spItem.getTitleAttr() ;\n\t\tif( title != null )\n\t\t\t_obsTitle.setText( title ) ;\n\t\telse\n\t\t\t_obsTitle.setText( \"\" ) ;\n\n\t\tString state = _avTab.get( \"state\" ) ;\n\t\tif( state == null )\n\t\t\t_obsState.setText( \"Not in Active Database\" ) ;\n\t\telse\n\t\t\t_obsState.setText( state ) ;\n\n\t\tignoreActions = true ; // MFO\n\n\t\tSpObs obs = ( SpObs )_spItem ;\n\t\t\n\t\t// Set the priority\n\t\tint pri = obs.getPriority() ;\n\t\t_w.jComboBox1.setSelectedIndex( pri - 1 ) ;\n\n\t\t// Set whether or not this is a standard\n\t\t_w.standard.setSelected( obs.getIsStandard() ) ;\n\n\t\t// Added for OMP (MFO, 7 August 2001)\n\t\t_w.optional.setValue( obs.isOptional() ) ;\n\n\t\tint numberRemaining = obs.getNumberRemaining();\n\t\t_w.setRemainingCount(numberRemaining);\n\n\t\t_w.unSuspendCB.addActionListener( this ) ;\n\n\t\tignoreActions = false ;\n\n\t\t_w.estimatedTime.setText( OracUtilities.secsToHHMMSS( obs.getElapsedTime() , 1 ) ) ;\n\n\t\t_updateMsbDisplay() ;\n\t}", "public void updateCurrentPriceAndValue (Double newPrice) {\n\t\t\n\t\tcurrentPrice = newPrice;\n\t\tcurrentValue = currentPrice * quantity;\n\t\t\n\t\t\n\t}", "protected void updateCartInfoUI() {\n SharedPref.putCartitesmQty(getContext(), mCartInfo.getSummaryQty());\n this.updateCartTotal();\n// updateMenu();\n }", "public void increasePrice() {\n //price doubled\n itemToSell.setBuyPrice(itemToSell.getBuyPrice() * 2);\n }", "public void updateProducts()\n {\n ObservableList<Product> inventoryProducts = this.inventory.getAllProducts();\n\n // Configure product table and bind with inventory products\n productIDColumn.setCellValueFactory(new PropertyValueFactory<Product, String>(\"id\"));\n productNameColumn.setCellValueFactory(new PropertyValueFactory<Product, String>(\"name\"));\n productInventoryColumn.setCellValueFactory(new PropertyValueFactory<Product, String>(\"stock\"));\n productPriceColumn.setCellValueFactory(new PropertyValueFactory<Product, String>(\"price\"));\n\n productTable.setItems(inventoryProducts);\n // Unselect parts in table after part is updated\n productTable.getSelectionModel().clearSelection();\n productTable.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\n }", "@Override\n\tpublic void updateData() {\n\t\tSpendPage spend = new SpendService().getSpendPage();\n\t\tvMonthSpend.setText(spend.monthSpend);\n\t\tvTodaySpend.setText(spend.todaySpend);\n\t\tvAvgSpendPerDay.setText(spend.avgSpendPerDay);\n\t\tvMonthAvailable.setText(spend.monthAvailable);\n\t\tvDayAvgAvailable.setText(spend.avgAvailablePerDay);\n\t\tvMonthLeftDay.setText(spend.leftDay);\n\t\t\n\t\tbar.setProgress(spend.usagePercentage);\n\t\tif (spend.isOverSpend) {\n\t\t\tvMonthAvailable.setForeground(ColorUtil.warningColor);\n\t\t\tvMonthSpend.setForeground(ColorUtil.warningColor);\n\t\t\tvTodaySpend.setForeground(ColorUtil.warningColor);\n\t\t} else {\n\t\t\tvMonthAvailable.setForeground(ColorUtil.grayColor);\n vMonthSpend.setForeground(ColorUtil.blueColor);\n vTodaySpend.setForeground(ColorUtil.blueColor);\n\t\t}\n\t\tbar.setForegroundColor(ColorUtil.getByPercentage(spend.usagePercentage));\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}", "private void setInitial_itemPrice()\n {\n\n calcTotalPrice(selectedItemQuantity, itemPrice);\n if(label_totalPrice.getText().equals(\"\"))\n {\n label_totalPrice.setText(\"\" + itemPrice);\n }\n\n }", "private void RptStockItem() {\n try {\n pnUmum.removeAll();\n pnUmum.repaint();\n pnUmum.revalidate();\n String sql = \"SELECT `ProdName`,`SellPrice`,`CostPrice`,`Netto`,`Stock`,ProdUnit.UnitName AS Unit FROM `Products` \"\n + \"INNER JOIN ProdUnit ON Products.UnitID = ProdUnit.UnitID ORDER BY Products.ProductID ASC\";\n JRDesignQuery jQuery = new JRDesignQuery();\n jQuery.setText(sql);\n JasperDesign jDesign = JRXmlLoader.load(System.getProperty(\"user.dir\") + \"/src/com/resources/jrxml/RptStokBarang.jrxml\");\n jDesign.setQuery(jQuery);\n JasperReport jReport = JasperCompileManager.compileReport(jDesign);\n JasperPrint jPrint = JasperFillManager.fillReport(jReport, null, new ConfigDB().getConnection());\n JRViewer jView = new JRViewer(jPrint);\n pnUmum.setLayout(new BorderLayout());\n jView.setFitPageZoomRatio();\n jView.setFont(new java.awt.Font(\"Arial\", 0, 14));\n pnUmum.add(jView);\n } catch (JRException ex) {\n JOptionPane.showMessageDialog(null, \"Terjadi Error Pada:\\n\" + ex.toString(), \"Kesalahan\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void updateResults() {\n\t\t// Do not update when there is no amount entered\n\t\tif (amountEdit.getText().toString().equalsIgnoreCase(\"\"))\n\t\t\treturn;\n\t\t\n\t\t// Transform .42 to 0.42\n\t\tif (amountEdit.getText().toString().equalsIgnoreCase(\".\")) {\n\t\t\tamountEdit.setText(\"0.\");\n\t\t\tamountEdit.setSelection(amountEdit.getText().length());\n\t\t}\n\t\t\t\n\t\tint from = (int) fromSpinner.getSelectedItemId();\n\t\tint to = (int) toSpinner.getSelectedItemId();\n\t\tDouble amount = Double.parseDouble(amountEdit.getText().toString());\n\t\tDouble result = exchangeRates.convert(from, to, amount);\n\t\t\n\t\t// Build results string and update the view\n\t\tString text = \"\";\n\t\ttext += exchangeRates.getCurrency(from) + \" \";\n\t\ttext += amount + \"\\n\";\n\t\ttext += exchangeRates.getCurrency(to) + \" \";\n\t\ttext += result.toString();\n\t\tresultsText.setText(text);\n\t}", "public allProductUpdate() {\n initComponents();\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tListSelectionModel lsm = list.getSelectionModel();\r\n\t\t\tint selected = lsm.getMinSelectionIndex();\r\n\r\n\t\t\tItemView itemView = (ItemView) list.getModel().getElementAt(selected);\r\n\r\n\t\t\t// change item\r\n\t\t\tJOptionPane options = new JOptionPane();\r\n\t\t\tObject[] addFields = { \"Name: \", nameTextField, \"Price: \", priceTextField, \"URL: \", urlTextField, };\r\n\t\t\tint option = JOptionPane.showConfirmDialog(null, addFields, \"Edit item\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\t\tString name = nameTextField.getText();\r\n\t\t\t\tString price = priceTextField.getText();\r\n\t\t\t\tString url = urlTextField.getText();\r\n\r\n\t\t\t\tdouble doublePrice = Double.parseDouble(price);\r\n\r\n\t\t\t\titemView.getItem().setName(name);\r\n\t\t\t\titemView.getItem().setCurrentPrice(doublePrice);\r\n\t\t\t\titemView.getItem().setUrl(url);\r\n\t\t\t\t// clear text fields\r\n\t\t\t\tnameTextField.setText(\"\");\r\n\t\t\t\tpriceTextField.setText(\"\");\r\n\t\t\t\turlTextField.setText(\"\");\r\n\t\t\t}\r\n\t\t}", "public void updateTotalPrice(){\n\t\tBigDecimal discount = currentOrder.getDiscount();\n\t\tBigDecimal subtotal = currentOrder.getSubtotal();\n\t\tthis.subtotal.text.setText(CURR+subtotal.add(discount).toString());\n\t\tthis.discount.text.setText(CURR + discount.toString());\n\t\tthis.toPay.text.setText(CURR+subtotal.toString());\n\t}", "@Override\n public void updateItem(P_CK t) {\n \n }", "@Override\n public void update(float price) {\n float newPriceForBidding = Math.round(price + (Math.random() * 100) + (Math.random() * 100));\n display(newPriceForBidding);\n }", "private void updateUI() {\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n updateText();\n updateChart();\n }", "protected void setItemPrice(Double itemPrice) {\n this.itemPrice = itemPrice;\n }", "void editTakingPrice() throws PresentationException {\n\t\tTakingPrice tp = null;\n\t\tint codebar_item;\n\t\tint code_supermarket;\n\t\tint newCodeItem;\n\n\t\tprinter.printMsg(\"Digite o código do item a ser alterado? \");\n\t\tcodebar_item = reader.readNumber();\n\n\t\tprinter.printMsg(\"Digite o código do supermercado a ser alterado? \");\n\t\tcode_supermarket = reader.readNumber();\n\n\t\tprinter.printMsg(\n\t\t\t\t\" Digite a data da tomada de preço do item: (Ex.Formato: '2017-12-16 10:55:53' para 16 de dezembro de 2017, 10 horas 55 min e 53 seg)\");\n\t\tString dateTP = reader.readText();\n\t\tdateTP = reader.readText();\n\n\t\tString pattern = \"yyyy-mm-dd hh:mm:ss\";\n\t\tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\t\tDate dateTPF = null;\n\t\ttry {\n\t\t\tdateTPF = simpleDateFormat.parse(dateTP);\n\t\t} catch (ParseException e) {\n\t\t\tthrow new PresentationException(\"Não foi possível executar a formatação da data no padrão definido\", e);\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\t// pensando em cadastrar o novo preço sem editar o preço antigo. Senão terei que\n\t\t// controlar por muitos atributos.\n\n\t\tif (tpm.checksExistence(codebar_item, code_supermarket, dateTPF)) {\n\t\t\ttp = tpm.getTakingPrice(codebar_item, code_supermarket, dateTPF);\n\t\t\tint codeSupermarket = tp.getCodeSupermarket();\n\t\t\tdouble priceItem = tp.getPrice();\n\t\t\tDate dateTPE = tp.getDate();\n\t\t\tint respEdit = 0;\n\n\t\t\ttpm.deleteTakingPrice(codebar_item, code_supermarket, dateTPE);\n\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\trespEdit = this.askWhatEdit(tp);\n\n\t\t\t\t} catch (NumeroInvalidoException e) {\n\t\t\t\t\tthrow new PresentationException(\"A opção digitada não é uma opção válida\", e);\n\t\t\t\t}\n\n\t\t\t\tif (respEdit == 1) {\n\t\t\t\t\tprinter.printMsg(\" Digite o novo código do item: \");\n\t\t\t\t\tnewCodeItem = reader.readNumber();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(newCodeItem, priceItem, codeSupermarket, dateTPE);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else if (respEdit == 2) {\n\t\t\t\t\tprinter.printMsg(\" Digite o novo código do supermercado: \");\n\t\t\t\t\tint newCodeSupermarket = 0;\n\t\t\t\t\tnewCodeSupermarket = reader.readNumber();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(codebar_item, priceItem, newCodeSupermarket, dateTPE);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else if (respEdit == 3) {\n\t\t\t\t\tprinter.printMsg(\" Digite o novo preço do item: \");\n\t\t\t\t\tdouble newPriceItem = 0;\n\t\t\t\t\tnewPriceItem = reader.readNumberDouble();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(codebar_item, newPriceItem, codeSupermarket, dateTPE);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else if (respEdit == 4) {\n\t\t\t\t\tprinter.printMsg(\n\t\t\t\t\t\t\t\" Digite a nova data da tomada de preço do item: (Ex.Formato: '2017-12-16 10:55:53' para 16 de dezembro de 2017, 10 horas 55 min e 53 seg)\");\n\t\t\t\t\tString date = reader.readText();\n\t\t\t\t\tdate = reader.readText();\n\n\t\t\t\t\t// String pattern = \"yyyy-mm-dd hh:mm:ss\";\n\t\t\t\t\t// SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\t\t\t\t\tDate newDateTP = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnewDateTP = simpleDateFormat.parse(date);\n\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\tthrow new PresentationException(\"A opção digitada não é uma opção válida\", e);\n\t\t\t\t\t\t// e.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Date:\" + date);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(codebar_item, priceItem, codeSupermarket, newDateTP);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} while (respEdit != 1 & respEdit != 2 & respEdit != 3 & respEdit != 4);\n\n\t\t} else\n\n\t\t{\n\t\t\tprinter.printMsg(\"Não existe tomada de preço com estes códigos cadastrados.\");\n\t\t}\n\n\t}", "private void updatePrice() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tfor(int i = first;i<last;i++){\r\n\t\t\tProduct product = products.get(i);\r\n\t\t\tproduct.setPrivce(product.getPrivce()*(1+increment));\r\n\t\t}\r\n\t\t\r\n\t}", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "private void displayItem(){\n synchronized(this){\n for(ClientHandler client : clientArray){\n client.getOutput().println(\"\" + currentItem.getItem() +\n \" price starts at \" + currentItem.getStartingPrice() +\n \".\\n\");\n }\n }\n }", "public void update() {\n String foodName, description;\n int stockAvailable, calories, price;\n Boolean isVegan, isDiabetic, isGluttenFree;\n\n menuItems.clear();\n\n databaseGargoyle.createConnection();\n ResultSet rs = databaseGargoyle.executeQueryOnDatabase(\"SELECT * FROM MENUITEM\");\n try {\n while (rs.next()){\n foodName = rs.getString(\"FOODNAME\");\n description = rs.getString(\"DESCRIPTION\");\n stockAvailable = rs.getInt(\"STOCKAVAILABLE\");\n calories = rs.getInt(\"CALORIES\");\n if (rs.getString(\"ISVEGAN\").equalsIgnoreCase(\"true\")){\n isVegan = true;\n } else isVegan = false;\n if (rs.getString(\"ISDIABETIC\").equalsIgnoreCase(\"true\")){\n isDiabetic = true;\n } else isDiabetic = false;\n if (rs.getString(\"ISGLUTTENFREE\").equalsIgnoreCase(\"true\")){\n isGluttenFree = true;\n } else isGluttenFree = false;\n price = rs.getInt(\"PRICE\");\n menuItems.add(new MenuItem(foodName, description, stockAvailable, calories, isVegan, isDiabetic, isGluttenFree, price));\n }\n } catch (SQLException e) {\n System.out.println(\"Failed to get Menu Items from database!\");\n e.printStackTrace();\n }\n databaseGargoyle.destroyConnection();\n }", "public static void main(String[] args){\n UnitPriceConverter item;//create new object item\n item = new UnitPriceConverter();//initialize all values to 0\n Scanner input;// declare new scanner input\n int choice = 1;// declare and initilize variables for user to continue entering new data, price of an item, weight in pounds\n double price = 0;\n double weight = 0;\n \n while(choice == 1){//loop that continues if user wants to enter in new values for price or weight\n input = new Scanner(System.in); //initialize input scanner\n System.out.println(\"Enter a new price: \");//ask user for price\n price = input.nextDouble();//take input from user and assign to variable price\n item.setPriceOfItem(price);//change item object value for price\n System.out.println(item.toString());// display changes to object\n System.out.println(\"Enter a new weight in pounds: \");//ask user to enter in weight\n weight = input.nextDouble();//take input from user and assign to variable weight\n item.setWeightInPounds(weight);//change item object value for weight\n System.out.println(item.toString());//display changes to object\n System.out.println(\"Would you like to reset the price and/or the weight in pounds?(Enter 1 for yes, 0 for no): \");//ask user would he like to make more changes\n choice = input.nextInt();//get user choice\n }\n System.out.println(item.toString());//display final values for object\n System.out.println(\"Goodbye\");//goodbye message\n }", "private void updatePriceLabel(double aPrice) {\n price = aPrice;\n String out = String.format(\"<html><b>Price</b><br>$%.2f</html>\", price);\n priceLabel.setText(out);\n }", "public static void setPrice() {\n double summe = 0.0;\n for (Object obj : dlm.getDisplayedArtikel()) {\n if (obj instanceof Article) {\n Article art = (Article) obj;\n if (!art.isIsAbfrage()) {\n if (((art.isJugendSchutz() && art.isJugendSchutzOk())) || !art.isJugendSchutz()) {\n if (art.isEloadingAmmountOk() && !art.isPriceZero()) {\n summe += ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n }\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe += card.getAufladung() / 100;\n }\n }\n for (Object obj : dlm.getRemovedObjects()) {\n if (obj instanceof Article) {\n if (!((Article) ((obj))).isStorno_error()) {\n summe -= ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe -= card.getAufladung() / 100;\n }\n }\n if (Math.round(summe) == 0) {\n summe = 0;\n }\n if (GUIOperations.isTraining()) {\n summe += 1000;\n }\n tfSumme.setText(String.format(\"%.2f\", summe));\n }", "private void updateTotal() {\n int total = table.getTotal();\n vip.setConsumption(total);\n if (total > 0)\n payBtn.setText(PAY + RMB + total);\n else if (total == 0)\n payBtn.setText(PAY);\n }", "public void updateJList() {\n list.setModel(toListModel(auctionItemList));\n }", "void stockPriceChanged(Stock stock, double oldValue, double newValue);", "@FXML\n\tpublic void useItem(ActionEvent event){\n\t\t\tString itemName=\"\";\n\t\t\titemName = itemselect.getText();\n\t\t\n\t\t\tif(itemName.equals(\"\")) {\t// Checks if selected item is blank\n\t\t\t\n\t\t\t\tevents.appendText(\"Select an item from the Inventory box before clicking this button!\\n\");\t\n\t\t\t\treturn;\n\t\t\t\n\t\t\t} else {\t// Begins getting item information\n\t\t\t\tItem i;\n\t\t\t\tint x;\n\t\t\t\ti=Item.getItem(ItemList, itemName);\t// Get item from the item list\n\t\t\t\t\n\t\t\t\tif(i == null) {\t// Check if the item isnt found in the item list\n\t\t\t\t\t\n\t\t\t\t\tevents.appendText(\"Item not Found!\\n\");\n\t\t\t\t\titemselect.setText(\"\");\n\t\t\t\t\titemStats.setText(\"\");\n\t\t\t\t} else {\t// Check what type of item was used\n\t\t\t\t\tif(i.getStat().equals(\"HP\")) {\n\t\t\t\t\t\tint y=p.getHP()+i.getChange();\n\t\t\t\t\t\tif(y>p.getMaxHP()) {\n\t\t\t\t\t\t\tp.setHP(p.getMaxHP());\n\t\t\t\t\t\t\tevents.appendText(\"Health Restored to Full!\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp.setHP(y);\n\t\t\t\t\t\tevents.appendText(\"Health Restored by \" + i.getChange()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tcurrentHp.setText(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t\t}else if(i.getStat().equals(\"DMG\")) {\n\t\t\t\t\tp.setDMG(p.getDMG()+i.getChange());\n\t\t\t\t\tgdmg.setText(\"\"+p.getDMG());\n\t\t\t\t\tevents.appendText(\"Damage Increased by \" + i.getChange()+\"\\n\");\n\t\t\t\t}else {\n\t\t\t\t\tif(p.getEV()+i.getChange()>100) {\n\t\t\t\t\t\tevents.appendText(\"EV Increased by \" + (100-p.getEV())+\", Max Evasion is 100\\n\");\n\t\t\t\t\t\tp.setEV(100);\n\t\t\t\t\t\tgev.setText(\"\"+p.getEV());\n\t\t\t\t\t}else {\n\t\t\t\t\t\tp.setEV(p.getEV()+i.getChange());\n\t\t\t\t\t\tgev.setText(\"\"+p.getEV());\n\t\t\t\t\t\tevents.appendText(\"EV Increased by \" + i.getChange()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Remove the item from the inventory\n\t\t\t\tx=Inventory.indexOf(i);\n\t\t\t\tInventory.remove(x);\n\t\t\t\tinventoryList.getItems().remove(x);\n\t\t\t\titemselect.setText(\"\");\n\t\t\t\titemStats.setText(\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}", "@Override\n public double findPrice(DatabaseItem item) {\n this.item = item;\n this.dialog = new ProgressDialog(ctx);\n this.execute();\n return this.currentPrice;\n }", "public void refreshData(float price) {\n if (price <= 0 || price == mLastPrice) {\n return;\n }\n mLastPrice = price;\n CombinedData data = mChartPrice.getData();\n if (data == null) return;\n LineData lineData = data.getLineData();\n if (lineData != null) {\n ILineDataSet set = lineData.getDataSetByIndex(0);\n if (set.removeLast()) {\n set.addEntry(new Entry(set.getEntryCount(), price));\n }\n }\n\n mChartPrice.notifyDataSetChanged();\n mChartPrice.invalidate();\n }", "public void updateMoney()\n\t\t{\n\t\t\t\n\t\t\tFPlayer p1 = this.viewer;\n\t\t\tFPlayer p2 = (p1.equals(this.t.p1)) ? this.t.p2 : this.t.p1;\n\t\t\t\n\t\t\tItemStack om = new ItemStack(Material.GREEN_WOOL,1);\n\t\t\tItemMeta it = om.getItemMeta();\n\t\t\tit.setDisplayName(ChatColor.DARK_GREEN+ChatColor.BOLD.toString()+\"Money in trade:\");\n\t\t\tit.setLore(Arrays.asList(new String[] {\"\",Util.getMoney(this.t.getMoneyTraded(p1)),\"\",\"Click to add/remove money from trade\"}));\n\t\t\tom.setItemMeta(it);\n\t\t\t\n\t\t\tif (this.canAdd()) super.contents.put(0,new ItemSwapMenu(this,om,new MenuMoney(super.viewer,this.t)));\n\t\t\telse super.contents.put(0,new ItemDummy(this,om));\n\t\t\t\n\t\t\t// Trader money in trade\n\t\t\tItemStack tm = new ItemStack(Material.GREEN_WOOL,1);\n\t\t\tit = tm.getItemMeta();\n\t\t\tit.setDisplayName(ChatColor.DARK_GREEN+ChatColor.BOLD.toString()+\"Money in trade:\");\n\t\t\tit.setLore(Arrays.asList(new String[] {\"\",Util.getMoney(this.t.getMoneyTraded(p2))}));\n\t\t\ttm.setItemMeta(it);\n\t\t\tsuper.contents.put(8,new ItemDummy(this,tm));\n\t\t\tthis.composeInv();\n\t\t}", "public abstract void refreshItem();", "public void updateView()\n {\n // Get width and height of display\n DisplayMetrics metrics = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(metrics);\n int width = metrics.widthPixels;\n int height = metrics.heightPixels;\n \n // Get details widgets from layout \n ImageView productImage = findViewById(R.id.product_image);\n TextView productTitle = findViewById(R.id.product_title);\n TextView productDescription = findViewById(R.id.product_description); \n RatingBar productRating = findViewById(R.id.product_rating);\n TextView productNumReviews = findViewById(R.id.product_num_reviews);\n TextView productPrice = findViewById(R.id.product_price);\n productQuantityTextView = findViewById(R.id.product_quantity);\n\n // Setup quantity\n productQuantity = 1;\n productQuantityTextView.setText(Integer.toString(productQuantity));\n Button incrementQuantityButton = findViewById(R.id.quantity_plus);\n incrementQuantityButton.setOnClickListener(new addButtonOnClickListener());\n Button decrementQuantityButton = findViewById(R.id.quantity_minus);\n decrementQuantityButton.setOnClickListener(new subtractButtonOnClickListener());\n\n // Resize image view\n productImage.setMinimumWidth(width);\n productImage.setMaxHeight(height / 2);\n\n // Display product details\n productTitle.setText(activeProduct.getName());\n productImage.setImageBitmap(activeProduct.getImage());\n productDescription.setText(activeProduct.getDescription());\n productRating.setRating((float) activeProduct.getRating());\n productNumReviews.setText(Integer.toString(activeProduct.getNumReviews()));\n DecimalFormat decimalFormat = new DecimalFormat(\"$#,##0.00\");\n productPrice.setText(String.valueOf(decimalFormat.format(activeProduct.getPrice())));\n\n // Add on click listener for add item to cart push button\n Button addItemButton = findViewById(R.id.add_to_cart);\n addItemButton.setOnClickListener(new ViewButtonHandler());\n }", "private void updateUI() {\n // Remove all views from shovelsList and BackgroundsList\n // and set the score.\n shovelsList.removeAllViews();\n backgroundsList.removeAllViews();\n shopScoreText.setText(Integer.toString(GameActivity.getScore()));\n\n //Create the list of shovels and backgrounds to buy.\n //Iterate through the list of shovels.\n for (Shovel shovel : SHOVELS) {\n //Setup all necessary parts of the item UI.\n View shovelChunk = getLayoutInflater()\n .inflate(R.layout.chunk_shop_item,\n shovelsList, false);\n TextView itemName = shovelChunk.findViewById(R.id.itemName);\n TextView itemDescription = shovelChunk\n .findViewById(R.id.itemDescription);\n Button buyButton = shovelChunk.findViewById(R.id.buyButton);\n\n //Set the text of the textViews and the button.\n //Set button onClickListeners.\n itemName.setText(shovel.getName());\n itemDescription.setText(shovel.getDescription());\n if (shovel.getState() == ItemStatusID.FORSALE) {\n buyButton.setText(Integer.toString(shovel.getPrice()));\n buyButton.setOnClickListener(unused ->\n buyButtonClicked(shovel));\n } else if (shovel.getState() == ItemStatusID.BOUGHT) {\n buyButton.setText(\"Equip\");\n buyButton.setOnClickListener(unused ->\n equipButtonClicked(shovel));\n } else if (shovel.getState() == ItemStatusID.EQUIPPED) {\n buyButton.setText(\"In Use\");\n //Set the current shovel power.\n currentShovel = shovel;\n }\n\n //Add the shovelChunk to the shovelsList.\n shovelsList.addView(shovelChunk);\n }\n //Iterate through the list of backgrounds.\n for (Background background : BACKGROUNDS) {\n View backgroundChunk = getLayoutInflater()\n .inflate(R.layout.chunk_shop_item,\n backgroundsList, false);\n TextView itemName = backgroundChunk.findViewById(R.id.itemName);\n TextView itemDescription = backgroundChunk\n .findViewById(R.id.itemDescription);\n Button buyButton = backgroundChunk.findViewById(R.id.buyButton);\n\n //Set the text of the textViews and the button.\n //Set button onClickListeners.\n itemName.setText(background.getName());\n itemDescription.setText(background.getDescription());\n if (background.getState() == ItemStatusID.FORSALE) {\n buyButton.setText(Integer.toString(background.getPrice()));\n buyButton.setOnClickListener(unused ->\n buyButtonClicked(background));\n } else if (background.getState() == ItemStatusID.BOUGHT) {\n buyButton.setText(\"Equip\");\n buyButton.setOnClickListener(unused ->\n equipButtonClicked(background));\n } else if (background.getState() == ItemStatusID.EQUIPPED) {\n buyButton.setText(\"In Use\");\n //Set the current background resource file.\n currentBackground = background;\n }\n\n //Add the background chunk to the backgroundsList.\n backgroundsList.addView(backgroundChunk);\n }\n }", "@Override\n\tdouble updateTotalPrice() {\n\t\treturn 0;\n\t}", "public void updateUI(){}", "@Override\r\n\tpublic void update() {\r\n\t\t// get the first element and set the values according to its\r\n\t\t// information\r\n\t\tIqmDataBox iqmDataBox = (IqmDataBox) this.workPackage.getSources().get(0);\r\n\t\tPlanarImage pi = iqmDataBox.getImage();\r\n\r\n\t\tjFormattedTextFieldOldWidth.setValue(pi.getWidth());\r\n\t\tjFormattedTextFieldOldHeight.setValue(pi.getHeight());\r\n\r\n\t\tint left = ((Number) jSpinnerLeft.getValue()).intValue();\r\n\t\tint right = ((Number) jSpinnerRight.getValue()).intValue();\r\n\t\tint top = ((Number) jSpinnerTop.getValue()).intValue();\r\n\t\tint bottom = ((Number) jSpinnerBottom.getValue()).intValue();\r\n\r\n\t\t// Set image dependent initial values;\r\n\t\tjSpinnerNewWidth.removeChangeListener(this);\r\n\t\tjSpinnerNewWidth.setValue(pi.getWidth() + left + right);\r\n\t\tjSpinnerNewWidth.addChangeListener(this);\r\n\t\tjSpinnerNewHeight.removeChangeListener(this);\r\n\t\tjSpinnerNewHeight.setValue(pi.getHeight() + top + bottom);\r\n\t\tjSpinnerNewHeight.addChangeListener(this);\r\n\t\t\r\n\t\tif (buttConst.isSelected()){\r\n\t\t\ttbConst.setTitleColor(Color.BLACK);\r\n\t\t\tjLabelConst.setEnabled(true);\r\n\t\t\tjSpinnerConst.setEnabled(true);\r\n\t\t} else {\r\n\t\t\ttbConst.setTitleColor(Color.GRAY);\r\n\t\t\tjLabelConst.setEnabled(false);\r\n\t\t\tjSpinnerConst.setEnabled(false);\r\n\t\t}\r\n\t\tthis.repaint(); //because of tb TitledBorder cahnge of color\r\n\t\t\r\n\r\n\t\tthis.updateParameterBlock();\r\n\t\tthis.setParameterValuesToGUI();\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n descriptionTextField = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n nameTextField = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n priceTextField = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n availNumTextField = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n updateBtn = new javax.swing.JButton();\n SName_JTextField = new javax.swing.JTextField();\n SLocation_JTextField = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n descriptionTextField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n descriptionTextFieldActionPerformed(evt);\n }\n });\n add(descriptionTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 155, 241, -1));\n\n jLabel1.setFont(new java.awt.Font(\"宋体\", 0, 24)); // NOI18N\n jLabel1.setText(\"Update Your Product\");\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 11, -1, -1));\n\n jLabel2.setText(\"Name:\");\n add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 65, -1, -1));\n\n nameTextField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nameTextFieldActionPerformed(evt);\n }\n });\n add(nameTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 62, 241, -1));\n\n jLabel3.setText(\"Price:\");\n add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 96, -1, -1));\n\n priceTextField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n priceTextFieldActionPerformed(evt);\n }\n });\n add(priceTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 93, 241, -1));\n\n jLabel4.setText(\"Availabity Number:\");\n add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 127, 129, -1));\n\n availNumTextField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n availNumTextFieldActionPerformed(evt);\n }\n });\n add(availNumTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(149, 124, 241, -1));\n\n jLabel5.setText(\"Description:\");\n add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 158, -1, -1));\n\n updateBtn.setText(\"Update\");\n updateBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n updateBtnActionPerformed(evt);\n }\n });\n add(updateBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 257, -1, -1));\n add(SName_JTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 193, 241, -1));\n add(SLocation_JTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(148, 224, 241, -1));\n\n jLabel6.setText(\"Supplier Name:\");\n add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 196, -1, -1));\n\n jLabel7.setText(\"Supplier Location:\");\n add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 227, -1, -1));\n }", "public void refreshGUI() {\n try {\n // get all clerk theough the DAO to a tempory List\n List<Clerk> clerkList = clerkDAO.getAllClerk();\n\n // create the model and update the \"table\"\n ClerkTableModel model = new ClerkTableModel(clerkList);\n table.setModel(model);\n\n } catch (Exception exc) {\n JOptionPane.showMessageDialog(ClerkViewer.this, \"Error: \" + exc, \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void update()\n {\n for (Container container : containers)\n container.update(false);\n\n Gui.update(BanksGUI.class);\n Gui.update(BankGUI.class);\n Gui.update(ItemsGroupsGUI.class);\n }", "private void updateSoldProductInfo() { public static final String COL_SOLD_PRODUCT_CODE = \"sells_code\";\n// public static final String COL_SOLD_PRODUCT_SELL_ID = \"sells_id\";\n// public static final String COL_SOLD_PRODUCT_PRODUCT_ID = \"sells_product_id\";\n// public static final String COL_SOLD_PRODUCT_PRICE = \"product_price\";\n// public static final String COL_SOLD_PRODUCT_QUANTITY = \"quantity\";\n// public static final String COL_SOLD_PRODUCT_TOTAL_PRICE = \"total_price\";\n// public static final String COL_SOLD_PRODUCT_PENDING_STATUS = \"pending_status\";\n//\n\n for (ProductListModel product : products){\n soldProductInfo.storeSoldProductInfo(new SoldProductModel(\n printInfo.getInvoiceTv(),\n printInfo.getInvoiceTv(),\n product.getpCode(),\n product.getpPrice(),\n product.getpSelectQuantity(),\n printInfo.getTotalAmountTv(),\n paymentStatus+\"\"\n ));\n\n }\n }", "void updateList() throws Exception {\n\t\tlist.getItems().clear();\n\t\tfor(Plant p : plantsInBasket) {\n\t\t\tAnchorPane ap = new AnchorPane();\n\t\t\tLabel sname = new Label(p.getScientificName() + \" |\");\n\t\t\tLabel cname = new Label(p.getCommonName());\n\t\t\tsname.setFont(Font.loadFont(getClass().getResourceAsStream(\"/fonts/Roboto-Italic.ttf\"), 21));\n\t\t\tcname.setFont(Font.loadFont(getClass().getResourceAsStream(\"/fonts/Roboto-Italic.ttf\"), 21));\n HBox hBox = new HBox();\n hBox.setAlignment(Pos.CENTER_LEFT);\n \n \t\tImageView iv = new ImageView();\n \t\tiv.setImage(p.getPlantPic());\n \t\tiv.setPreserveRatio(true);\n \t iv.setFitHeight(PLANT_WD_HT);\n \t iv.setFitWidth(PLANT_WD_HT);\n \n \t Tooltip tooltip = new Tooltip(\"Common Name: \" + p.getCommonName() + System.lineSeparator()\n \t\t+ \"Spread: \" + p.getSpread() + \" ft.\" + System.lineSeparator() + \n \t\t\"Soil type: \" + p.getSoilType() + System.lineSeparator() +\n \t\t\"Sun level: \" + p.getSun() + System.lineSeparator() + \n \t\t\"Moisture: \" + p.getMoisture() + System.lineSeparator() +\"Lep Species Supported: \" + p.getLep().getNumLeps() + System.lineSeparator() +\n \t\t\"Most common lep: \" + p.getLep().getSpecies());\n \t ImageView ivLep = new ImageView(p.getLepPic());\n \t ivLep.setFitHeight(LEP_WD_HT);\n \t ivLep.setFitWidth(LEP_WD_HT);\n \t tooltip.setGraphic(ivLep);\n \t tooltip.setPrefWidth(TOOLTIP_SIZE);\n \n \t tooltip.setWrapText(true);\n \t Tooltip.install(iv, tooltip);\n // Add the values from our piece to the HBox\n hBox.getChildren().addAll(iv, sname, cname);\n \n \tImageView compost = new ImageView(new Image(getClass().getResourceAsStream(\"/img/compost.png\")));\n \tcompost.setFitHeight(COMPOST_SIZE);\n compost.setFitWidth(COMPOST_SIZE);\n \n Button b = new Button();\n b.setGraphic(compost);\n b.setStyle(\"-fx-background-color: #99B898;\");\n \n ap.getChildren().addAll(hBox, b);\n AnchorPane.setLeftAnchor(hBox, root.getWidth() / 3);\n AnchorPane.setRightAnchor(b, COMPOST_RIGHT);\n AnchorPane.setTopAnchor(b, COMPOST_TOP);\n \n b.setOnAction(e -> {\n \ttry {\n\t\t\t\t\tView.getGarden().removeFromBasket(p);\n\t\t\t\t\tupdateList();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n \t\n \t\n });\n list.getItems().add(ap);\n\t\t}\n\t}", "@Override\n\t\t\tpublic void handle(long now) {\n\t\t\t\tif (pricesContainer.getLockObject().tryLock()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLabel bitcoinLabel = cryptoLabel.get(\"BTC\");\n\t\t\t\t\t\tbitcoinLabel.setText(String.valueOf(pricesContainer.getBitcoinPrice()));\n\n\t\t\t\t\t\tLabel etherLabel = cryptoLabel.get(\"ETH\");\n\t\t\t\t\t\tetherLabel.setText(String.valueOf(pricesContainer.getEtherPrice()));\n\n\t\t\t\t\t\tLabel litecoingLabel = cryptoLabel.get(\"LTH\");\n\t\t\t\t\t\tlitecoingLabel.setText(String.valueOf(pricesContainer.getLitecoinPrice()));\n\n\t\t\t\t\t\tLabel bitcoinCashLabel = cryptoLabel.get(\"BCH\");\n\t\t\t\t\t\tbitcoinCashLabel.setText(String.valueOf(pricesContainer.getBitcoinCashPrice()));\n\n\t\t\t\t\t\tLabel rippleLabel = cryptoLabel.get(\"XRP\");\n\t\t\t\t\t\trippleLabel.setText(String.valueOf(pricesContainer.getRipplePrice()));\n\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tpricesContainer.getLockObject().unlock();\n\t\t\t\t\t\t;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}", "public static String updatePrice(final double price, final int argItemId) {\r\n String msg = \"Update Unsuccessful\";\r\n\r\n int res = dao().updateItemPrice(price, argItemId);\r\n if (res > 0) {\r\n msg = \"Price updated successfully\";\r\n }\r\n return msg;\r\n }", "private void refreshTableForUpdate()\n {\n //Was updating the values but don't believe this is necessary, as like budget items\n //a loss amount will stay the same unless changed by the user (later on it might be the\n //case that it can increase/decrease by a percentage but not now...)\n /*\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n for (MoneyLoss loss : bbd.getLosses())\n {\n TextView valueView = valueViews.get(loss.expenseDescription());\n valueView.setText(BadBudgetApplication.roundedDoubleBB(loss.lossAmount()));\n }\n */\n }", "@Override\r\n\t\t\tpublic void handle(CellEditEvent<Products, String> arg0) {\n\t\t\t\targ0.getTableView().getItems().get(arg0.getTablePosition().getRow()).setCost(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 cost='\"+data.getCost()+\"' 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}", "private void Qty_Rate_Edit() {\r\n\r\n double dblQty = 0;\r\n double dTaxPercent = 0,dServiceTaxPercent = 0, dDiscPercent = 0, dDiscAmt = 0, dTempAmt = 0, dTaxAmt = 0,dServiceTaxAmt =0;\r\n double dRate,dIGSTAmt=0, dcessAmt=0,dcessAmtPerUnit=0,dcessRate=0,dCessAmountPerUnit=0;\r\n double dCessAdditionalAmount =0,dTotalCessAmount=0;\r\n try {\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n TableRow Row = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n // Check against item number present in table\r\n if (Row.getChildAt(0) != null) {\r\n\r\n CheckBox Number = (CheckBox) Row.getChildAt(0);\r\n TextView ItemName = (TextView) Row.getChildAt(1);\r\n\r\n\r\n // Quantity\r\n EditText Qty = (EditText) Row.getChildAt(3);\r\n //Qty.setSelectAllOnFocus(true);\r\n dblQty = Double.parseDouble(\r\n Qty.getText().toString().equalsIgnoreCase(\"\") ? \"0\" : Qty.getText().toString()); // Temp\r\n if (BillwithStock == 1) {\r\n Cursor ItemCrsr = db.getItemDetail(ItemName.getText().toString());\r\n if(ItemCrsr!=null && ItemCrsr.moveToFirst())\r\n {\r\n double availableStock = ItemCrsr.getDouble(ItemCrsr.getColumnIndex(\"Quantity\"));\r\n if ( availableStock < dblQty) {\r\n MsgBox.Show(\"Warning\", \"Stock is less, present stock quantity is \"\r\n + String.valueOf(availableStock));\r\n Qty.setText(String.format(\"%.2f\", availableStock));\r\n\r\n return;\r\n }\r\n }\r\n\r\n }\r\n // Amount\r\n EditText Rate = (EditText) Row.getChildAt(4);\r\n //Rate.setSelectAllOnFocus(true);\r\n TextView Amount = (TextView) Row.getChildAt(5);\r\n dRate = Double.parseDouble(\r\n Rate.getText().toString().equalsIgnoreCase(\"\") ? \"0\" : Rate.getText().toString()); // Temp\r\n\r\n\r\n // Tax and Discount Amount\r\n TextView TaxPer = (TextView) Row.getChildAt(6);\r\n TextView TaxAmt = (TextView) Row.getChildAt(7);\r\n TextView DiscPer = (TextView) Row.getChildAt(8);\r\n TextView DiscAmt = (TextView) Row.getChildAt(9);\r\n TextView ServiceTax = (TextView) Row.getChildAt(15);\r\n TextView ServiceTaxAmt = (TextView) Row.getChildAt(16);\r\n TextView IGSTRate = (TextView) Row.getChildAt(23);\r\n TextView IGSTAmt = (TextView) Row.getChildAt(24);\r\n TextView cessRate = (TextView) Row.getChildAt(25);\r\n TextView cessAmtPerUnit = (TextView) Row.getChildAt(26);\r\n TextView tvTaxableValue = (TextView) Row.getChildAt(28);\r\n TextView tvOriginalRate = (TextView) Row.getChildAt(27);\r\n TextView additionalCessAmount = (TextView) Row.getChildAt(29);\r\n TextView tvTotalCessAmount = (TextView) Row.getChildAt(30);\r\n\r\n dTaxPercent = Double.parseDouble(TaxPer.getText().toString().equalsIgnoreCase(\"\") ? \"0\"\r\n : TaxPer.getText().toString()); // Temp\r\n dServiceTaxPercent = Double.parseDouble(ServiceTax.getText().toString().equalsIgnoreCase(\"\") ? \"0\"\r\n : ServiceTax.getText().toString()); // Temp\r\n double dIGSTRate = Double.parseDouble(IGSTRate.getText().toString().equalsIgnoreCase(\"\") ? \"0\"\r\n : IGSTRate.getText().toString()); // Temp\r\n dcessRate = Double.parseDouble(cessRate.getText().toString().equalsIgnoreCase(\"\") ? \"0\"\r\n : cessRate.getText().toString()); // Temp\r\n dCessAmountPerUnit = Double.parseDouble(cessAmtPerUnit.getText().toString().equalsIgnoreCase(\"\") ? \"0\"\r\n : cessAmtPerUnit.getText().toString()); // Temp\r\n dCessAdditionalAmount = Double.parseDouble(additionalCessAmount.getText().toString().equalsIgnoreCase(\"\") ? \"0\"\r\n : additionalCessAmount.getText().toString()); // Temp\r\n dTotalCessAmount = Double.parseDouble(tvTotalCessAmount.getText().toString().equalsIgnoreCase(\"\") ? \"0\"\r\n : tvTotalCessAmount.getText().toString()); // Temp\r\n dDiscPercent = Double.parseDouble(DiscPer.getText().toString().equalsIgnoreCase(\"\") ? \"0\"\r\n : DiscPer.getText().toString()); // Temp\r\n\r\n if (crsrSettings.getInt(crsrSettings.getColumnIndex(\"Tax\")) == 1) { // forward tax\r\n // Discount\r\n dDiscAmt = dRate * (dDiscPercent / 100);\r\n dTempAmt = dDiscAmt;\r\n dDiscAmt = dDiscAmt * dblQty;\r\n\r\n // Tax\r\n dTaxAmt = (dRate - dTempAmt) * (dTaxPercent / 100);\r\n dTaxAmt = dTaxAmt * dblQty;\r\n\r\n dServiceTaxAmt = (dRate - dTempAmt) * (dServiceTaxPercent / 100);\r\n dServiceTaxAmt = dServiceTaxAmt * dblQty;\r\n\r\n dIGSTAmt = (dRate - dTempAmt) * (dIGSTRate / 100);\r\n dIGSTAmt = dIGSTAmt * dblQty;\r\n\r\n if (dcessRate > 0)\r\n dcessAmtPerUnit = (dRate - dTempAmt) * (dcessRate / 100) * dblQty;\r\n else\r\n dcessAmtPerUnit = dCessAmountPerUnit * dblQty;\r\n\r\n dCessAdditionalAmount = dCessAdditionalAmount * dblQty;\r\n\r\n dTotalCessAmount = dcessAmtPerUnit + dCessAdditionalAmount;\r\n\r\n TaxAmt.setText(String.format(\"%.2f\", dTaxAmt));\r\n DiscAmt.setText(String.format(\"%.2f\", dDiscAmt));\r\n ServiceTaxAmt.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n// cessAmtPerUnit.setText(String.format(\"%.2f\", dcessAmtPerUnit));\r\n// additionalCessAmount.setText(String.format(\"%.2f\", dCessAdditionalAmount));\r\n tvTotalCessAmount.setText(String.format(\"%.2f\", dTotalCessAmount));\r\n IGSTAmt.setText(String.format(\"%.2f\", dIGSTAmt));\r\n Amount.setText(String.format(\"%.2f\", (dblQty * (dRate-dTempAmt))));\r\n tvTaxableValue.setText(String.format(\"%.2f\", (dblQty * (dRate-dTempAmt))));\r\n tvOriginalRate.setText(String.format(\"%.2f\", (dRate)));\r\n\r\n } else {// reverse tax\r\n\r\n TextView originalRate = (TextView) Row.getChildAt(27);\r\n dRate = Double.parseDouble(originalRate.getText().toString().equalsIgnoreCase(\"\") ? \"0\"\r\n : originalRate.getText().toString()); //\r\n // Discount\r\n dDiscAmt = dRate * (dDiscPercent / 100);\r\n dTempAmt = dDiscAmt;\r\n dDiscAmt = dDiscAmt * dblQty;\r\n\r\n double dBasePrice = 0;\r\n dBasePrice = (dRate-dTempAmt) / (1 + (dTaxPercent / 100)+(dServiceTaxPercent/100)+ (dcessRate/100));\r\n\r\n // Tax\r\n dTaxAmt = (dBasePrice ) * (dTaxPercent / 100);\r\n dTaxAmt = dTaxAmt *dblQty;;\r\n\r\n dIGSTAmt = (dBasePrice ) * (dIGSTRate/ 100);\r\n dIGSTAmt = dIGSTAmt * dblQty;\r\n\r\n// dcessAmt = (dBasePrice ) * (dcessRate / 100);\r\n// dcessAmt = dcessAmt * dblQty;;\r\n\r\n dCessAmountPerUnit = 0.00;\r\n dCessAdditionalAmount = 0.00;\r\n dTotalCessAmount = dCessAmountPerUnit + dCessAdditionalAmount;\r\n\r\n //Service tax\r\n dServiceTaxAmt = (dBasePrice) * (dServiceTaxPercent / 100);\r\n dServiceTaxAmt = dServiceTaxAmt * dblQty;\r\n\r\n double amount = (dblQty * (dRate-dTempAmt));\r\n double taxVal = (dblQty * dBasePrice);\r\n\r\n dServiceTaxAmt = Double.parseDouble(df_3.format(dServiceTaxAmt));\r\n dTaxAmt = Double.parseDouble(df_3.format(dTaxAmt));\r\n dDiscAmt = Double.parseDouble(df_3.format(dDiscAmt));\r\n// dcessAmt = Double.parseDouble(df_3.format(dcessAmt));\r\n dIGSTAmt = Double.parseDouble(df_3.format(dIGSTAmt));\r\n amount = Double.parseDouble(df_2.format(amount));\r\n taxVal = Double.parseDouble(df_2.format(taxVal));\r\n\r\n Pattern p = Pattern.compile(\"^(-?[0-9]+[\\\\.\\\\,][0-9]{1,2})?[0-9]*$\");\r\n Matcher m = p.matcher(String.valueOf(taxVal));\r\n boolean matchFound = m.find();\r\n if (matchFound) {\r\n System.out.println(Double.valueOf(m.group(1)));\r\n }\r\n\r\n\r\n ServiceTaxAmt.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n TaxAmt.setText(String.format(\"%.2f\", dTaxAmt));\r\n DiscAmt.setText(String.format(\"%.2f\", dDiscAmt));\r\n// cessAmtPerUnit.setText(String.format(\"%.2f\", dcessAmtPerUnit));\r\n// additionalCessAmount.setText(String.format(\"%.2f\", dCessAdditionalAmount));\r\n tvTotalCessAmount.setText(String.format(\"%.2f\", dTotalCessAmount));\r\n IGSTAmt.setText(String.format(\"%.2f\", dIGSTAmt));\r\n Amount.setText(String.format(\"%.2f\",amount ));\r\n tvTaxableValue.setText(String.format(\"%.2f\",taxVal ));\r\n }\r\n // // delete\r\n // Delete.setText(\"Hi\");\r\n\r\n // Clear all variables and set ItemExists to TRUE\r\n // and break from the loop\r\n dRate = 0;\r\n dTaxPercent = 0;\r\n dDiscPercent = 0;\r\n dTaxAmt = 0;\r\n dDiscAmt = 0;\r\n dTempAmt = 0;\r\n //bItemExists = true;\r\n\r\n }\r\n\r\n }\r\n CalculateTotalAmount();\r\n } catch (Exception e) {\r\n MsgBox.setMessage(\"Error while changing quantity directly :\" + e.getMessage()).setPositiveButton(\"OK\", null).show();\r\n e.printStackTrace();\r\n }\r\n }", "public void reUpdate() {\n\t\tnumFloorsInBuilding = buildingModel.getNumFloors();\n\t\tPlatform.runLater(() -> label_floors_text.setText(numFloorsInBuilding.toString()));\n\t\t\n\t\tclearAndFillElevatorListView();\n\t}", "public void update() {\n\t\tthis.quantity = item.getRequiredQuantity();\n\t}", "public void update() {\n\t\tremoveAll();\n\t\tdrawGraph();\n\t\tplotEntries();\n\t}", "public Update_info() {\n initComponents();\n display_data();\n }", "public void updateParts()\n {\n ObservableList<Part> inventoryParts = this.inventory.getAllParts();\n\n // Configure part table and bind with inventory parts\n partIDColumn.setCellValueFactory(new PropertyValueFactory<Part,String>(\"id\"));\n partNameColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"name\"));\n partInventoryColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"stock\"));\n partCostColumn.setCellValueFactory(new PropertyValueFactory<Part, String>(\"price\"));\n\n partTable.setItems(inventory.getAllParts());\n // Unselect parts in table after part is deleted\n partTable.getSelectionModel().clearSelection();\n partTable.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t\tload(CustomersList.table);\n\t\t\t\tCustomersList.setTotalCompanyDemand();\n\t\t\t\tCustomersList.setTotalResive();\n\t\t\t\tCustomersList.setTotalShopping();\n\t\t\t\tCustomerPaidCheck();\n\t\t\t\tdispose();\n\n\t\t\t}", "public void defaultSetup() {\n\t\tthis.cart = this.endUser.getCart();\n\t\tLinkedList<Integer> prices = cart.getPrices();\n\t\tLinkedList<Integer> units = cart.getUnits();\n\t\tallProducts = FXCollections.observableList(cart.getProducts());\n\t\tallPrices = FXCollections.observableList(cart.getPrices());\n\t\tallUnits = FXCollections.observableList(cart.getUnits());\n\t\tlsvProduct.setItems(allProducts);\n\t\tlsvPrice.setItems(allPrices);\n\t\tlsvUnit.setItems(allUnits);\n\t\tint total_value = 0;\n\t\tfor (int i=0; i<prices.size();i++) {\n\t\t\ttotal_value += prices.get(i)*units.get(i);\n\t\t}\n\t\tlblTotal.setText(Integer.toString(total_value));\n\t}", "private void calculatePrice() {\n\t\tint temp = controller.getQualityPrice(hotel.getText(), quality.getText());\n\n\t\ttemp *= getDays();\n\n\t\tif (discountChoice > 0) {\n\t\t\tdouble discountTmp = (double) discountChoice / 100;\n\t\t\ttemp *= (1.00 - discountTmp);\n\t\t}\n\n\t\tprice.setText(Integer.toString(temp));\n\n\t}", "@Override\n\tpublic void viewPrice() {\n\t\t\n\t}", "private void updatePriceStats(double newPrice) {\n this.currentPrice = newPrice;\n this.currentAvgPrice = Double.parseDouble(decimalFormat.format(computeSMA(newPrice, currentAvgPrice, priceHistory)));\n this.priceChangePCT = Double.parseDouble(decimalFormat.format(computeDifferentialPCT(newPrice, currentAvgPrice)));\n }", "void setUpdatedProduct(ObservableList<MotorCycleProduct> productSelected, String updatedPartNumber, String updatedName, Integer updatedQuantity, Double updatedPrice, String updatedCategory, String updatedDate);", "@Override\n public void onClick(View view) {\n helper.increaseQty(item);\n holder.mQuantity.setText(String.valueOf(String.valueOf(helper.getQuantityFromTable(item))));\n holder.mPrice.setText(\"$\" + getNewPrice(item, holder));\n// holder.mTotal.setText(\"$\"+total);\n\n }", "private void updateSubtotal() {\n subtotal = entreePrice + drinkPrice + dessertPrice;\n subtotalEdtTxt.setText(String.format(\"$%.2f\", subtotal));\n }", "public void priceUpdate(String security, double price) {\n logger.debug(\"There is a price update for stock: \" + security + \" :: updated price: \" + price);\n stockMap.get(security).setPricePerUnit(price);\n for (Map.Entry<String, PersonalStock> entrySet : personalStockMap.entrySet()) {\n entrySet.getValue().priceUpdate(security, price);\n }\n }", "private void update(JComboBox combo)\n\t{\n\t\tif(check() && table.getSelectedRow() != -1)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tConnection con = Connector.DBcon();\n\t\t\t\tString query=\"update items set it_name=?, it_id=?, it_quantity=?, it_price=? where it_ID=?\";\n\t\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\t\t\n\t\t\t\tpst.setString(1, txtiname.getText().trim());\n\t\t\t\tpst.setString(2, txticode.getText().trim());\n\t\t\t\tpst.setString(3, txtstock.getText().trim());\n\t\t\t\tpst.setString(4, txtprice.getText().trim());\n\t\t\t\t\n\t\t\t\tString sec = combo.getSelectedItem().toString();\n\t\t\t\tint sec_num = sec.equals(\"Kitchen Essentials\")? 347: sec.equals(\"Fashion Store\")? 357: sec.equals(\"Kids Section\")? 367: sec.equals(\"Electronics\")? 377: 387;\n\t\t\t\tpst.setString(5, sec_num+\"\");\n\t\t\t\t\n\t\t\t\tpst.setString(6, txticode.getText());\n\t\t\t\t\n\t\t\t\tpst.execute();\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Updated Successfully\", \"RESULT\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t\n\t\t\t\tpst.close();\n\t\t\t\tcon.close();\n\t\t\t} \n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(check() && table.getSelectedRow() == -1)\n\t\t\tJOptionPane.showMessageDialog(null, \"Select the field to be updated!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t\t\n\t\telse\n\t\t\tJOptionPane.showMessageDialog(null, \"Fill all fields!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t}", "private void setDiscountedPrice() {\n seekbarNewprice.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n tvDiscountPerc.setText(progress * 5 + \"%\");\n try {\n double originalPrice = Double.parseDouble(etOriginalPrice.getText().toString());\n double sp = (progress * 5 * originalPrice) / 100;\n\n tvNewPrice.setText(String.format(Locale.US, \"%.2f\", originalPrice - sp));\n } catch (NumberFormatException ne) {\n ne.printStackTrace();\n }\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n\n }\n });\n }", "public void update() {\n\n\t\tdisplay();\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.WHITE);\n\t\tframe.setBounds(100, 100, 636, 378);\n\t\tframe.setTitle(\"CHANGE RENTAL PRICE\");\n\t\tframe.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblChangeRentalPrice = new JLabel(\"Change Rental Price -\");\n\t\tlblChangeRentalPrice.setFont(new Font(\"Dialog\", Font.BOLD, 23));\n\t\tlblChangeRentalPrice.setBounds(23, 12, 287, 33);\n\t\tframe.getContentPane().add(lblChangeRentalPrice);\n\t\t\n\t\tJLabel label_1 = new JLabel(\"Search By -\");\n\t\tlabel_1.setBounds(33, 92, 85, 15);\n\t\tframe.getContentPane().add(label_1);\n\t\t\n\t\tJComboBox<String> comboBox = new JComboBox<String>();\n\t\tcomboBox.setBounds(136, 87, 217, 24);\n\t\tframe.getContentPane().add(comboBox);\n\t\tcomboBox.addItem(\"DVD ID\");\n\t\tcomboBox.addItem(\"DVD NAME\");\n\t\t\n\t\tJLabel label = new JLabel(\"*Enter \"+comboBox.getSelectedItem()+\" -\");\n\t\tlabel.setBounds(33, 151, 132, 31);\n\t\tframe.getContentPane().add(label);\n\t\t\n\t\ttxtdvd = new JTextField();\n\t\ttxtdvd.setColumns(10);\n\t\ttxtdvd.setBounds(226, 157, 284, 19);\n\t\tframe.getContentPane().add(txtdvd);\n\t\t\n\t\tJButton button = new JButton(\"Change\");\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(txtdvd.getText().trim().length()==0 || txtprice.getText().trim().length()==0 )\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, comboBox.getSelectedItem()+\" OR PRICE FIELD CAN NOT BE EMPTY !\",\"Error !\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t@SuppressWarnings(\"unused\")\n\t\t\t\tdouble d =Double.parseDouble(txtprice.getText());\n\t\t\t\ttry {\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\tConnection con =DriverManager.getConnection(\"jdbc:mysql://localhost:3306/rental_sys\",\"root\",\"vector\");\n\t\t\t\t\tString sid;\n\t\t\t\t\tif(comboBox.getSelectedItem().equals(\"DVD ID\"))\n\t\t\t\t\t\tsid = \"select * from dvd where dvd_id = ? and rented ='No' \";\n\t\t\t\t\telse\n\t\t\t\t\t\tsid = \"select * from dvd where name = ? and rented ='No' \";\n\t\t\t\t\tPreparedStatement ps =con.prepareStatement(sid);\n\t\t\t\t\tps.setString(1,txtdvd.getText().toString());\n\t\t\t\t\tResultSet rs=ps.executeQuery();\n\t\t\t\t\tif(rs.next())\n\t\t\t\t\t{\n\t\t\t\t\t\tJFrame frame1 = new JFrame(\"Rental Price\");\n\t\t\t\t\t\tif(JOptionPane.showConfirmDialog(frame1,\"Confirm if you want to Change Rental Price of DVD ?\",\"Change Price\",JOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString did;\n\t\t\t\t\t\t\tif(comboBox.getSelectedItem().equals(\"DVD ID\"))\n\t\t\t\t\t\t\t\tdid = \"update dvd set price = ? where dvd_id = ? \";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tdid = \"update dvd set price = ? where name = ? \";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tPreparedStatement ps1 =con.prepareStatement(did);\n\t\t\t\t\t\t\tdouble rp = Double.parseDouble(txtprice.getText());\n\t\t\t\t\t\t\tps1.setDouble(1,rp);\n\t\t\t\t\t\t\tps1.setString(2,txtdvd.getText().toString());\n\t\t\t\t\t\t\tps1.executeUpdate();\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"DVD PRICE IS UPDATED !\",\"Done !\",JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"DVD NOT FOUND !\",\"Error !\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t}\n\t\t\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttxtdvd.setText(null);\n\t\t\t\ttxtprice.setText(null);\n\t\t\t}\n\t\t\tcatch(NumberFormatException a)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null,\"PLEASE ENTER VALID PRICE !\",\"Error !\",JOptionPane.ERROR_MESSAGE);\n\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbutton.setForeground(Color.RED);\n\t\tbutton.setBounds(33, 279, 114, 25);\n\t\tframe.getContentPane().add(button);\n\t\t\n\t\tJButton button_1 = new JButton(\"Reset\");\n\t\tbutton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttxtdvd.setText(null);\n\t\t\t\ttxtprice.setText(null);\n\t\t\t}\n\t\t});\n\t\tbutton_1.setBounds(270, 279, 114, 25);\n\t\tframe.getContentPane().add(button_1);\n\t\t\n\t\tJButton button_2 = new JButton(\"Cancel\");\n\t\tbutton_2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tframe.setVisible(false);\n\t\t\t}\n\t\t});\n\t\tbutton_2.setBounds(482, 279, 114, 25);\n\t\tframe.getContentPane().add(button_2);\n\t\t\n\t\tJLabel lblEnterRentalPrice = new JLabel(\"*Enter Rental Price -\");\n\t\tlblEnterRentalPrice.setBounds(33, 209, 159, 31);\n\t\tframe.getContentPane().add(lblEnterRentalPrice);\n\t\t\n\t\ttxtprice = new JTextField();\n\t\ttxtprice.setColumns(10);\n\t\ttxtprice.setBounds(226, 215, 284, 19);\n\t\tframe.getContentPane().add(txtprice);\n\t\t\n\t\tJLabel label_2 = new JLabel(\"logo\");\n\t\tlabel_2.setIcon(new ImageIcon(change_price.class.getResource(\"/image/PicsArt_09-15-02.34.27.jpg\")));\n\t\tlabel_2.setBounds(490, 12, 134, 112);\n\t\tframe.getContentPane().add(label_2);\n\t\t\n\t\tcomboBox.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tlabel.setText(\"*Enter \"+comboBox.getSelectedItem()+\" -\");\n\t\t\t}\n\t\t}\n\t\t);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n booksNumber = new javax.swing.JTextField();\n bkSold = new javax.swing.JTextField();\n bkPrice = new javax.swing.JTextField();\n bkRemaining = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n listItems = new javax.swing.JTextArea();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n location = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n lblAmount = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 51, 0)));\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n jLabel1.setText(\"No. of Books\");\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n jLabel2.setText(\"Price of each book\");\n\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n jLabel3.setText(\"Books remaining\");\n\n jLabel4.setFont(new java.awt.Font(\"Times New Roman\", 1, 14)); // NOI18N\n jLabel4.setText(\"Books Sold\");\n\n booksNumber.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n booksNumber.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n booksNumberActionPerformed(evt);\n }\n });\n\n bkSold.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n bkSold.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bkSoldActionPerformed(evt);\n }\n });\n\n bkPrice.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n bkPrice.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n bkPriceActionPerformed(evt);\n }\n });\n\n bkRemaining.setFont(new java.awt.Font(\"Times New Roman\", 0, 14)); // NOI18N\n\n listItems.setColumns(20);\n listItems.setFont(new java.awt.Font(\"Monospaced\", 0, 11)); // NOI18N\n listItems.setLineWrap(true);\n listItems.setRows(5);\n listItems.setWrapStyleWord(true);\n jScrollPane2.setViewportView(listItems);\n\n jButton1.setText(\"Generate Receit\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Print\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Times New Roman\", 1, 12)); // NOI18N\n jLabel5.setText(\"Location/Event:\");\n\n location.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n locationActionPerformed(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Times New Roman\", 1, 12)); // NOI18N\n jLabel6.setText(\"Amount\");\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(87, 87, 87)\n .addComponent(jButton1)\n .addGap(105, 105, 105)\n .addComponent(jButton2))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING))\n .addGap(60, 60, 60))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(90, 90, 90)))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addGap(68, 68, 68)))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(location, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)\n .addComponent(booksNumber)\n .addComponent(bkPrice)\n .addComponent(bkRemaining, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(bkSold)\n .addComponent(lblAmount, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addGap(13, 13, 13)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 382, Short.MAX_VALUE)\n .addContainerGap())))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(booksNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(14, 14, 14)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)\n .addComponent(bkPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)))\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(bkSold, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addGap(18, 18, 18)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(lblAmount, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(location, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(26, 26, 26)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(bkRemaining, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(60, 60, 60))\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jScrollPane2)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton2)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 1, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }" ]
[ "0.7294122", "0.72119194", "0.70782095", "0.6954084", "0.69138104", "0.6913605", "0.688206", "0.67948204", "0.6766417", "0.6630692", "0.6417273", "0.6391401", "0.63679093", "0.6311437", "0.6305892", "0.63009053", "0.6291642", "0.6281813", "0.6274678", "0.6269852", "0.6236551", "0.6217917", "0.61969095", "0.61559623", "0.6144405", "0.6118095", "0.61049896", "0.6096684", "0.6092917", "0.60732317", "0.6070443", "0.60620475", "0.6056944", "0.6047013", "0.6045161", "0.6030091", "0.6027743", "0.60260266", "0.6016879", "0.5994722", "0.5978224", "0.5963151", "0.59618145", "0.5947737", "0.59423745", "0.5937269", "0.59335464", "0.5916494", "0.590664", "0.5905765", "0.5884387", "0.58710223", "0.58691347", "0.586798", "0.5860773", "0.58466285", "0.5833381", "0.58294106", "0.5819561", "0.5818616", "0.580949", "0.5800502", "0.5799314", "0.5786949", "0.5785602", "0.5772723", "0.57703394", "0.5769493", "0.5769293", "0.57670367", "0.57656443", "0.5764967", "0.5762947", "0.5753036", "0.5750065", "0.57497823", "0.5741903", "0.5706169", "0.5700154", "0.5689574", "0.5687102", "0.5686486", "0.5686425", "0.56841046", "0.5674347", "0.5671513", "0.5670966", "0.56686026", "0.5668125", "0.56652987", "0.5664746", "0.5659826", "0.56537485", "0.5642622", "0.5640557", "0.5640467", "0.563969", "0.56343186", "0.5633963", "0.5627853" ]
0.63540244
13
Get the Topn From the Current and Next Population
private static Solution[] getTopSolutions(Solution[] current, Solution[] generated, int popAmount){ // Both Solution Array is Sorted // Set Pointer to Each Array int currPointer = 0; int genPointer = 0; // Create the output Solution[] result = new Solution[popAmount]; // Fill into the result for (int index = 0; index < popAmount; index++) { if(current[currPointer].distance <= generated[genPointer].distance){ // Prevent the Duplicated Solution: Create Again if have Duplicated if (haveDuplicated(result, current[currPointer])) { // Skip Current Solution & Continue currPointer++; index--; }else{ result[index] = current[currPointer++]; } }else{ // Prevent the Duplicated Solution: Create Again if have Duplicated if (haveDuplicated(result, generated[genPointer])) { // Skip Current Solution & Continue genPointer++; index--; }else{ result[index] = generated[genPointer++]; } } // Prevent the IndexOutOfBound if (genPointer >= generated.length) { System.arraycopy(current, currPointer, result, index + 1, popAmount - 1 - index); return result; } if (currPointer >= current.length) { System.arraycopy(generated, genPointer, result, index + 1, popAmount - 1 - index); return result; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int top();", "public int top() {\n return p.val;\n }", "public int top() { return 0; }", "public int top() {\n return top.value;\n }", "public int top() {\n return One.peek();\n }", "public int top() {\n return q1.getFirst();\n }", "public int top() {\n return (int) one.peek();\n \n }", "public String getTopnum() {\n return topnum;\n }", "public int top() {\r\n return top;\r\n }", "public int top() {\r\n return top;\r\n }", "public int top() {\n return top;\n }", "public Integer getTop() {\n return top;\n }", "int top();", "public int top() {\n Integer poll = q1.peek();\n return poll == null ? -1 : poll;\n }", "public int getTop() {\n return top;\n }", "public int top() {\n \treturn list.get(list.size()-1);\n }", "public int getTop() {\n\treturn top;\n }", "public int top() {\n\t\treturn count == 0? -1 : st[count-1];\r\n\t}", "public int top() {\n if(!q1.isEmpty())return q1.peek();\n else return -1;\n }", "public int top() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n int value = q.peek();\n q.offer(q.poll());\n \n return value;\n }", "public int top() {\n return q1.peek();\n }", "public int top() {\n\t\treturn list.get(list.size() - 1);\n\t}", "E top();", "public int top() {\n return list.peek();\n }", "public int top() {\n if(q1.size() > 0){\n return q1.peek();\n } else {\n return q2.peek();\n }\n }", "public int top() {\n return q.peek();\n }", "public int top() {\n\t return q.peek();\n\t }", "public int top() {\n if(q1.size() > 0) {\n return q1.peek();\n } else {\n return q2.peek();\n }\n }", "public int getTop() {\n\t\treturn this.top;\n\t}", "public int top() {\n return objects.peek();\n }", "public int top() {\n return topElem;\n }", "public E top() {\n return head.prev.data;\n }", "public T top();", "public float getTop() {\n return internalGroup.getTop();\n }", "public T getTop( );", "public int getTop() {\n return position[0] - (size - 1) / 2;\n }", "public int top(int index){\n if (!isEmpty() && index == 1)\n return this.oddArray[this.index1];\n else\n return this.evenArray[this.index2];\n }", "public int top() {\n\t\treturn stack.peek();\n \n }", "public int top() {\r\n int value = this.pop();\r\n this.stack.offer(value);\r\n return value;\r\n }", "public int topla() {\n\t\treturn SayiIslemleri.topla(sayi1, sayi2);\n\t}", "public String top(){\n if(!(pilha.size() == 0)){\n return pilha.get(pilha.size()-1);\n }else{\n return null;\n }\n }", "public int top() {\n return stack1.peek();\n }", "public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}", "public int top() {\r\n int size = this.queueMain.size();\r\n if(size == 1) return this.queueMain.element();\r\n // 转移n-1\r\n while(size != 1){\r\n this.queueHelp.offer(this.queueMain.poll());\r\n size--;\r\n }\r\n // 然后取出第n个元素\r\n int res = this.queueHelp.element();\r\n // 转移到辅助队列\r\n this.queueHelp.offer(this.queueMain.poll());\r\n // 再调换\r\n Queue<Integer> temp = this.queueMain;\r\n this.queueMain = this.queueHelp;\r\n this.queueHelp = temp;\r\n\r\n return res;\r\n }", "public int top() {\n move();\n return reverseQueue.peek();\n }", "int top() {\n if (data.size() > 0) {\r\n if (data.peek() < min)\r\n return min;\r\n return data.peek();\r\n }\r\n else {\r\n System.out.println(\"Stack underflow\");\r\n return -1;\r\n }\r\n }", "public double getTop() {\n return this.yT;\n }", "public T top() {\n \treturn stack.get(stack.size() - 1);\n }", "public int topCardVal(){\n if(pile.size() == 0)\n return 0;\n int val = pile.get(pile.size() - 1).getVal();\n return val;\n }", "public K topValue() {\n\t\tif(top!=null)\r\n\t\t\treturn top.data;\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public int topElement() {\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\treturn heap.get(0).element;\n\t\t\n\t\t}\n\t}", "public E top()\n {\n E topVal = stack.peekFirst();\n return topVal;\n }", "public Integer getTopbs() {\n return topbs;\n }", "public Card top() {\n\t\treturn firstCard;\n\t}", "@Nullable\n public DpProp getTop() {\n if (mImpl.hasTop()) {\n return DpProp.fromProto(mImpl.getTop());\n } else {\n return null;\n }\n }", "public E top() {\n return !isEmpty() ? head.item : null;\n }", "public double Top(){\n\t\treturn (y);\n\t}", "public int top(int stackNo){\n\t\tif(!isEmpty(stackNo)){\n\t\t\tint value = stacks[stackStarts[stackNo-1]+stackTops[stackNo-1] -1];\n\t\t\tstackTops[stackNo-1] = stackTops[stackNo-1]-1;\n\t\t\treturn value;\n\t\t}\n\t\treturn -1;\n\t}", "public int getTopCard() {\n return this.topCard;\n }", "public int top() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n Integer poll = queue.poll();\n queue.offer(poll);\n return poll;\n }", "public abstract Object top();", "public int top() {\n return queue.peekLast();\n }", "public int top() {\n if(!stack2.isEmpty()) {\n Integer k = stack2.pop();\n stack2.push(k);\n return k;\n }\n else {\n while(!stack1.isEmpty()) {\n stack2.push(stack1.pop());\n }\n Integer k = stack2.pop();\n stack2.push(k);\n return k;\n }\n }", "public int top() {\n return queue1.peek();\n }", "public Card top() {\r\n\t\treturn cards.get(cards.size() - 1);\r\n\t}", "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public static Interval topInterval(){\n\t\treturn top;\n\t}", "public String getTop_actif() {\r\n\t\treturn top_actif;\r\n\t}", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public T top() throws StackUnderflowException;", "public int stackTop() {\r\n\t return array[top];\r\n\t }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\r\n Queue<Integer> temp=new LinkedList<Integer>();\r\n int counter=0;\r\n while(!stack.isEmpty()){\r\n temp.add((Integer) stack.poll());\r\n counter++;\r\n \r\n }\r\n while(counter>1)\r\n {\r\n \r\n stack.add(temp.poll());\r\n counter--;\r\n }\r\n int topInteger=temp.poll();\r\n stack.add(topInteger);\r\n return topInteger;\r\n \r\n }", "public int top() {\n if (data.size() != 0) {\n return data.get(data.size() - 1);\n }\n throw new RuntimeException(\"top: 栈为空,非法操作\");\n }", "public String getTop5() {\n\t\tboolean boo = false;\n\t\tArrayList<String> keys = new ArrayList<String>();\n\t\tkeys.addAll(getConfig().getConfigurationSection(\"player.\").getKeys(false));\n\t\tArrayList<Integer> serious = new ArrayList<Integer>();\n\t\tHashMap<Integer, String> seriousp = new HashMap<Integer, String>();\n\t\tfor (int i = 0; i < keys.size(); i++) {\n\t\t\tserious.add(getConfig().getInt(\"player.\" + keys.get(i) + \".gp\"));\n\t\t\tseriousp.put(getConfig().getInt(\"player.\" + keys.get(i) + \".gp\"), keys.get(i));\n\t\t}\n\t\tComparator<Integer> comparator = Collections.<Integer> reverseOrder();\n\t\tCollections.sort(serious, comparator);\n\t\tString retstr = \"\";\n\t\tfor (int i = 0; i < serious.size(); i++) {\n\t\t\tretstr += serious.get(i).toString() + \" - \" + seriousp.get(serious.get(i)) + \"\\n\";\n\t\t\tif (i == 6) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn retstr;\n\t}", "public int top() {\n \tint x = 0;\n if(q1.isEmpty()){\n \t\n while(!q2.isEmpty()){\n x=q2.deq();\n System.out.println(\" q2 top = \"+x);\n\n q1.enq(x);\n }\n \n return x;\n }\n else{\n while(!q1.isEmpty())\n {\n x = q1.deq();\n System.out.println(\" q1 top = \"+x);\n q2.enq(x);\n }\n \n return x;\n }\n }", "public int top() {\n return queue.getLast();\n }", "public Disc top()\n\t{\n\t\tint poleSize = pole.size();\n\n\t\t// If the pole is empty, return nothing\n\t\tif(poleSize == 0)\n\t\t\treturn null;\n\n\t\t// Otherwise return the top disc\n\t\treturn pole.get(poleSize - 1);\n\t}", "public int top() {\n // Write your code here\n int ret = 0;\n if (!queue1.isEmpty()) {\n while (queue1.size() > 1) {\n queue2.offer(queue1.poll());\n }\n ret = queue1.peek();\n queue2.offer(queue1.poll());\n } else if (!queue2.isEmpty()) {\n while (queue2.size() > 1) {\n queue1.offer(queue2.poll());\n }\n ret = queue2.peek();\n queue1.offer(queue2.poll());\n }\n return ret;\n }", "public int peek()\r\n\t{\r\n\t\treturn (int) pq[lowestCurrentPriority].getHead();\r\n\t}", "public int top() {\n return queue.element();\n }", "public String getEstimateItemNumber(){\r\n\t\treturn getEstimateItemViewTop(0);\r\n\t}", "public int top() {\n if (!queue1.isEmpty()){\n int count=queue1.size();\n while (count>1){\n queue2.offer(queue1.poll());\n count--;\n }\n int result=queue1.peek();\n queue2.offer(queue1.poll());\n return result;\n }\n if (!queue2.isEmpty()){\n int count=queue2.size();\n while (count>1){\n queue1.offer(queue2.poll());\n count--;\n }\n int result=queue2.peek();\n queue1.offer(queue2.poll());\n return result;\n }\n return -1;\n }", "public Card getTopCard() {\r\n\t\tthis.sort();\r\n\t\treturn this.getCard(2); //Center card will always be part of quad after sorting, so has to be highest card\r\n\t}", "public List<Integer> getTopSpacings() {\n return topSpacings;\n }", "public int top() {\n int size=queue.size();\n for (int i = 0; i < size-1; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n int top=queue.poll();\n queue.add(top);\n return top;\n }", "public Node top() {\r\n\t\treturn start;\r\n\t}", "public TakPiece getTop(Point p){\n return stacks[p.x][p.y].top();\n }", "public Integer peek() {\n if (hasTop)\n return top;\n top = it.next();\n hasTop = true;\n return top;\n }", "private int getPR(IntRepList.OpNode current) {\n if (PRStack.empty())\n return this.Spill(current);\n return PRStack.pop();\n }", "public int topPriority() {\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\treturn heap.get(0).priority;\n\t\t\n\t\t}\n\t}", "@Override\n public Integer next() {\n if (hasTop) {\n hasTop = false;\n return top;\n }\n return it.next();\n }", "public String getTop(){\n StringBuilder htmlTop = new StringBuilder(\"<h2>\");\n for (int i = 0; i<10; i++){\n if (i >= this.highscores.size()){\n htmlTop.append(\" ----<br>\");\n } else {\n htmlTop.append(String.valueOf(this.highscores.get(i))).append(\"<br>\");\n }\n }\n htmlTop.append(\"</h2>\");\n return htmlTop.toString();\n }", "public String getTopEight() {\n return TopEight;\n }", "public int viewTop(){\r\n\t\treturn queue[0];\r\n\t}", "private int indexOfTop(int stackNum) {\n\t\tint offset = stackNum * stackCapacity;\r\n\t\tint size = sizes[stackNum];\r\n\t\treturn offset+size-1;\r\n\t}", "public void setTopnum(String topnum) {\n this.topnum = topnum;\n }", "public int getLenghtPop () {\r\n return long_poblacion;\r\n }", "public int queue_top() {\n\t\tif (isEmpty()) error(\"Queue is Empty!\");\n\t\treturn data[(front + 1) % MAX_QUEUE_SIZE];\n\t}" ]
[ "0.7067787", "0.7010968", "0.6947552", "0.6871131", "0.6847385", "0.68425304", "0.6805118", "0.68023086", "0.6757425", "0.6757425", "0.67479354", "0.66860676", "0.66730803", "0.6668934", "0.66523033", "0.66480297", "0.66224855", "0.66024613", "0.6583227", "0.65817845", "0.6573053", "0.6553391", "0.6547548", "0.6509355", "0.6473016", "0.6443634", "0.6429985", "0.6424741", "0.64156413", "0.63878614", "0.63617194", "0.6361718", "0.6319505", "0.63078487", "0.62955016", "0.62750196", "0.6202715", "0.618744", "0.61736166", "0.61581784", "0.6135234", "0.6134604", "0.6125891", "0.60953164", "0.6078613", "0.6076569", "0.60760874", "0.6072123", "0.6060994", "0.6031402", "0.6024141", "0.60191816", "0.6004734", "0.59884953", "0.5978503", "0.59761804", "0.5963982", "0.59599924", "0.5942924", "0.5937588", "0.593366", "0.5931395", "0.5920209", "0.5903383", "0.58778805", "0.5875988", "0.58747923", "0.5871879", "0.5849793", "0.5849793", "0.5839102", "0.58375716", "0.58342195", "0.58342195", "0.58273375", "0.5822695", "0.5812039", "0.5811431", "0.58062774", "0.579747", "0.5793929", "0.5786771", "0.5753655", "0.57447416", "0.5740993", "0.572194", "0.572125", "0.57186013", "0.57169956", "0.57163954", "0.56939465", "0.5683714", "0.56792855", "0.5673084", "0.56617373", "0.56610775", "0.5650587", "0.56379694", "0.5633237", "0.5628975", "0.5604353" ]
0.0
-1
Selection: RankBased Selection Return Two Parents Based On
public static Solution[] rankSelection(Solution[] currPop){ // Get the City Amount int popAmount = currPop.length; int totalWeight = (1 + popAmount) * popAmount / 2; // Get 2 Parents int parentIndex_1 = rankParentIndex(popAmount, totalWeight); int parentIndex_2; // Make Sure Two Parents are Different do { parentIndex_2 = rankParentIndex(popAmount, totalWeight); } while(parentIndex_1 == parentIndex_2); return new Solution[]{currPop[parentIndex_1], currPop[parentIndex_2]}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ArrayList<Chromosome> selectParentsTournament() {\n ArrayList<Chromosome> parents = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n ArrayList<Chromosome> matingPool = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n\n // Run tournaments to select parents - for each parent\n for (int parentIdx = 0; parentIdx < Defines.crossoverParentCt; parentIdx++) {\n\n // Run tournaments - get random contestants (run.getPaTournamentSize())\n for (int tournIdx = 0; tournIdx < Defines.tournamentSize; tournIdx++) {\n int contestantID = Defines.randNum(0, this.chromosomes.size() - 1);\n matingPool.add(this.chromosomes.get(contestantID));\n }\n Collections.sort(matingPool);\n parents.add(matingPool.get(0));\n }\n\n return parents;\n }", "private PMCGenotype[] selectParents()\n\t{\n\t\tPMCGenotype[] bestGenes = new PMCGenotype[parentsToSelect];\n\n\t\tint lowestFitnessOfSelectedIndex = 0;\n\t\tdouble lowestFitnessOfSelected = -1;\n\n\t\t// Select initial set of parents.\n\t\tbestGenes[0] = population[0];\n\t\tlowestFitnessOfSelectedIndex = 0;\n\t\tlowestFitnessOfSelected = bestGenes[0].getFitness();\n\t\tfor (int i = 1; i < this.parentsToSelect; i++)\n\t\t{\n\t\t\tbestGenes[i] = population[i];\n\n\t\t\tif (bestGenes[i].getFitness() < lowestFitnessOfSelected)\n\t\t\t{\n\t\t\t\tlowestFitnessOfSelectedIndex = i;\n\t\t\t\tlowestFitnessOfSelected = bestGenes[i].getFitness();\n\t\t\t}\n\t\t}\n\n\t\t// Select candidates with the highest fitness, replacing those with lowest fitness.\n\t\tfor (int i = parentsToSelect; i < population.length; i++)\n\t\t{\n\t\t\tPMCGenotype pmcg = population[i];\n\t\t\tif (pmcg.getFitness() > lowestFitnessOfSelected)\n\t\t\t{\n\t\t\t\tbestGenes[lowestFitnessOfSelectedIndex] = pmcg;\n\n\t\t\t\tlowestFitnessOfSelectedIndex = 0;\n\t\t\t\tlowestFitnessOfSelected = bestGenes[0].getFitness();\n\n\t\t\t\tfor (int j = 1; j < parentsToSelect; j++)\n\t\t\t\t{\n\t\t\t\t\tif (bestGenes[j].getFitness() < lowestFitnessOfSelected)\n\t\t\t\t\t{\n\t\t\t\t\t\tlowestFitnessOfSelectedIndex = j;\n\t\t\t\t\t\tlowestFitnessOfSelected = bestGenes[j].getFitness();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn bestGenes;\n\t}", "public void selectParents() {\n // Create a new parent list for this reproductive cycle. Let the garbage\n // handler dispose of the old list, if there was one.\n switch (Defines.parentAlgo) {\n case Defines.PA_RANDOM:\n this.parents = this.selectParentsRandom();\n break;\n\n case Defines.PA_ROULETTE:\n this.parents = this.selectParentsRoulette();\n break;\n\n case Defines.PA_TOURNAMENT:\n this.parents = this.selectParentsTournament();\n break;\n }\n// this.howGoodAreParents();\n }", "public void selectParents1() {\n // Create a new parent list for this reproductive cycle. Let the garbage\n // handler dispose of the old list, if there was one.\n switch (Defines.parentAlgo) {\n case Defines.PA_RANDOM:\n this.parents = this.selectParentsRandom();\n break;\n\n case Defines.PA_ROULETTE:\n this.parents = this.selectParentsRoulette();\n break;\n\n case Defines.PA_TOURNAMENT:\n this.parents = this.selectParentsTournament();\n break;\n }\n// this.howGoodAreParents();\n }", "private static int chooseParent() {\n\t\tint parent = 0;\n\t\tChromosome thisChromo = null;\n\t\tboolean done = false;\n\n\t\twhile (!done) {\n\t\t\t// Randomly choose an eligible parent.\n\t\t\tparent = getRandomNumber(0, population.size() - 1);\n\t\t\tthisChromo = population.get(parent);\n\t\t\tif (thisChromo.selected() == true) {\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\n\t\treturn parent;\n\t}", "private ArrayList<Chromosome> selectParentsRoulette() {\n ArrayList<Chromosome> parents = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n double sumGH = 0.0; // sums GH for all chromosomes in this pop\n Random randgen = new Random(); // random number generator\n for (Chromosome chromo : this.chromosomes) {\n sumGH += chromo.getTotalGH();\n }\n for (int i = 0; i < Defines.crossoverParentCt; i++) {\n double parentRandomizer = randgen.nextDouble() * sumGH; // get random #\n double aggGH = 0.0; // aggregate the GH until we reach our random #\n int chromoIdx = 0; // identifies the chromosome in the pop\n Chromosome parentCandidate;\n do {\n parentCandidate = this.chromosomes.get(chromoIdx++);\n aggGH += parentCandidate.getTotalGH();\n } while (aggGH < parentRandomizer);\n parents.add(parentCandidate);\n }\n return parents;\n }", "Genome chooseParent();", "public GAIndividual selectParent(Vector pop);", "public int getParent();", "private int parent(int i){return (i-1)/2;}", "private void rouletteSelection() {\n parentChromosomes = new Chromosome[2];\n parentIndices = new int[2];\n Arrays.fill(parentChromosomes, null);\n parentIndices[0] = getFittestChromosomeIndex();\n parentChromosomes[0] = chromosomes[parentIndices[0]];\n parentIndices[1] = getFittestChromosomeIndex();\n parentChromosomes[1] = chromosomes[parentIndices[1]];\n System.out.println(\"Individuals selected from Roulette Wheel for crossover: \\n\" +\n Arrays.toString(parentChromosomes[0].getGenes()) + \"\\n\" +\n Arrays.toString(parentChromosomes[1].getGenes()));\n }", "private ArrayList<Chromosome> selectParentsRandom() {\n ArrayList<Chromosome> parents = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n\n for (int i = 0; i < Defines.crossoverParentCt; i++) {\n // Generate random index into chromosomes in range [0..size-1]\n int randomParent = Defines.randNum(0, chromosomes.size() - 1);\n // Remember the new parent\n parents.add(chromosomes.get(randomParent));\n }\n return parents;\n }", "private void tournament_selection() {\r\n\r\n individual[] temp_pop = new individual[this.pop_size];\r\n\r\n for (int i = 0; i < this.pop_size; i++) {\r\n\r\n // pick 2 random ints to for indices of parents\r\n int parent1 = new Random().nextInt(this.pop_size);\r\n int parent2 = new Random().nextInt(this.pop_size);\r\n\r\n individual p1 = new individual(main_population.getPopulation()[parent1].getGenes(), solutions, output);\r\n individual p2 = new individual(main_population.getPopulation()[parent2].getGenes(), solutions, output);\r\n\r\n if (p1.getFitness() >= p2.getFitness()) {\r\n temp_pop[i] = p1;\r\n } else {\r\n temp_pop[i] = p2;\r\n }\r\n }\r\n this.main_population.setPopulation(temp_pop);\r\n this.main_population.update_population();\r\n }", "void Union(subset [] subsets, int x , int y ){ \n\t\tint xroot = find(subsets, x); \n\t int yroot = find(subsets, y); \n\t \n\t\tif (subsets[xroot].rank < subsets[yroot].rank) \n\t\t\tsubsets[xroot].parent = yroot; \n\t\telse if (subsets[yroot].rank < subsets[xroot].rank) \n\t\t\tsubsets[yroot].parent = xroot; \n\t\telse{ \n\t\t\tsubsets[xroot].parent = yroot; \n\t\t\tsubsets[yroot].rank++; \n\t\t} \n\t}", "private int get_parent(int index){\r\n return (index-1)/2;\r\n }", "private void union(int node1, int node2, int[] parent, int[] rank) {\n int node1Parent = find(node1, parent);\n int node2Parent = find(node2, parent);\n\n if (node1Parent == node2Parent) {\n return;\n }\n\n if (rank[node1Parent] < rank[node2Parent]) {\n parent[node1Parent] = node2Parent;\n }else if (rank[node1Parent] > rank[node2Parent]) {\n parent[node2Parent] = node1Parent;\n } else {\n parent[node1Parent] = node2Parent;\n rank[node2Parent]++;\n }\n }", "public int getParentTwo()\n\t{\n\t\treturn parentSetTwo;\n\t}", "int find(subset [] subsets , int i){ \n\t\n\t\tif (subsets[i].parent != i) \n\t\t\tsubsets[i].parent = find(subsets, subsets[i].parent); \n\t\t\treturn subsets[i].parent; \n\t}", "public ArrayList<ArrayList<Integer>> classify(ArrayList<Integer> selection) {\n\t\tObject[] objs = new Object[objects.size()];\n\n\t\tfor(int c = 0; c < objs.length; c++){\n\t\t\t\n\t\t\tobjs[c] = getClasses(objects.get(c),c);\n\t\t}\n\n\t\tSuperClass[] superClasses = new SuperClass[selection.size()];\n\t\t\n\t\tfor(int s = 0; s < selection.size(); s++){\n\t\t\t\n\t\t\tsuperClasses[s] = new SuperClass(objs[selection.get(s)]);\n\t\t}\n\t\t\n\t\tfor(int b = 0; b < objs.length; b++){\n\t\t\tint maxScore = Integer.MIN_VALUE;\n\t\t\tint choice = 0;\n\t\t\t//System.out.println(\"Start!!!\");\n\t\t\tfor(int r = 0; r < superClasses.length; r++){\n\t\t\t\t\n\t\t\t\tint score = superClasses[r].scoreObj(objs[b]);\n\t\t\t\t//System.out.println(score + \" \" + maxScore);\n\t\t\t\tif(score > maxScore){\n\t\t\t\t\t\n\t\t\t\t\tmaxScore = score;\n\t\t\t\t\tchoice = r;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(\"End!!!\");\n\t\t\tsuperClasses[choice].addObj(objs[b]);\n\t\t}\n\t\t\n\t\tArrayList<ArrayList<Integer>> superClassChoices = new ArrayList<ArrayList<Integer>>();\n\t\t\n\t\tfor(int s = 0; s < superClasses.length; s++){\n\t\t\t\n\t\t\tSystem.out.println(superClasses[s].getSize());\n\t\t\tsuperClassChoices.add(superClasses[s].getBackObjsNos());\n\t\t}\n\t\t\n\t\treturn superClassChoices;\n\t\t\n\t}", "public java.lang.Integer getParentId();", "public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {\n TreeNode cur = root;\n while (true) {\n if (cur.val > p.val && cur.val > q.val) cur = cur.left;\n else if (cur.val < p.val && cur.val < q.val) cur = cur.right;\n else return cur;\n }\n}", "private Node select(Node x, int k) {\n if (x == null) return null;\n int t = size(x.left);\n// TODO:根据size和rank的关系,进行定位,右子树需要用k-t-1,\n if (t > k) return select(x.left, k);\n else if (t < k) return select(x.right, k - t - 1);\n else return x;\n }", "protected int parent(int i) { return (i - 1) / 2; }", "public ResultSet leesParentIdLijst() {\n String sql = \"select distinct f2.id parent_id\\n\" +\n \" from bookmarkfolders f1\\n\" +\n \" join bookmarkfolders f2 on f1.parent_id = f2.id\\n\" +\n \" order by f2.id;\";\n ResultSet rst = execute(sql);\n\n ResultSet result = null;\n try {\n result = rst;\n } catch(Exception e) {\n System.out.println(e.getMessage() + \" - \" + sql);\n }\n\n return result;\n }", "public NCRPNode select() {\n\t\t\t\n\t\t\t//dim number of children + 1 (unallocated mass) \n\t\t\tdouble[] weights = new double[children.size() + 1];\n\t \n\t\t\t//weight of unallocated probability mass\n\t\t\tweights[0] = gamma / (gamma + customers);\n\t\t\t\n\t\t\t//calc weight for each child based on the number of customers on them\n\t\t\tint i = 1;\n\t\t\tfor (NCRPNode child: children) {\n\t\t\t\tweights[i] = (double) child.customers / (gamma + customers);\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\t//sample a child with higher weight\n\t\t\tint choice = random.nextDiscrete(weights);\n\t\t\t//if unallocated mass is sampled, create a new child\n\t\t\tif (choice == 0) {\n\t\t\t\treturn(addChild());\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn children.get(choice - 1);\n\t\t\t}\n\t\t}", "private static int rankParentIndex(int popAmount, int totalWeight) {\n // Randomly Generate the Weight\n double randomWeight = Math.random() * (totalWeight + 1);\n // Find out the Living Range\n for (int rankWeight = popAmount; rankWeight > 0; rankWeight--) {\n // Reduce the rankWeight\n randomWeight = randomWeight - rankWeight;\n // Meet the Rank\n if (randomWeight <= 0) {\n return popAmount - rankWeight;\n }\n }\n return popAmount - 1;\n }", "private static int chooseParent(final int parentA) {\n\t\tint parent = 0;\n\t\tChromosome thisChromo = null;\n\t\tboolean done = false;\n\n\t\twhile (!done) {\n\t\t\t// Randomly choose an eligible parent.\n\t\t\tparent = getRandomNumber(0, population.size() - 1);\n\t\t\tif (parent != parentA) {\n\t\t\t\tthisChromo = population.get(parent);\n\t\t\t\tif (thisChromo.selected() == true) {\n\t\t\t\t\tdone = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn parent;\n\t}", "private static BitVectorSolution chooseChild(\r\n\t\t\tBitVectorSolution parent1,\r\n\t\t\tBitVectorSolution parent2, \r\n\t\t\tBitVectorSolution child1,\r\n\t\t\tBitVectorSolution child2, \r\n\t\t\tdouble compFactor) {\r\n\t\t\r\n\t\tdouble fitnessTreshold = \r\n\t\t\t\tMath.min(parent1.fitness, parent2.fitness) + \r\n\t\t\t\tMath.abs(parent1.fitness - parent2.fitness) * compFactor;\r\n\t\t\r\n\t\tevaluateSingle(child2);\r\n\t\tevaluateSingle(child1);\r\n\t\t\r\n\t\tif (child1.fitness >= child2.fitness && child1.fitness > fitnessTreshold) {\r\n\t\t\treturn child1;\r\n\t\t\t\r\n\t\t} else if (child2.fitness > child1.fitness && child2.fitness > fitnessTreshold) {\r\n\t\t\treturn child2;\r\n\t\t\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t}", "Object getParent();", "public List<Map.Entry<Chromosome, BigDecimal>> Tournament()\r\n\t{\n\t\tint parentsAdded=0;\r\n\t\tList<Map.Entry<Chromosome, BigDecimal>> listParents= new ArrayList();\r\n\t\tList<Map.Entry<Chromosome, BigDecimal>> listCandidates = new ArrayList<Map.Entry<Chromosome, BigDecimal>>(p.getChromosomes().entrySet());\r\n\t\twhile(parentsAdded<ConfigurationsGA.SIZE_PARENTSFORCROSSOVER)\r\n\t\t{\r\n\t\t\t//here we randomize the list in order to select k random elements for the tournament\r\n\t\t\tCollections.shuffle(listCandidates);\r\n\t\t\tMap.Entry<Chromosome, BigDecimal> best=null;\r\n\r\n\t\t\tfor(int i=0; i<ConfigurationsGA.K_TOURNMENT; i++)\r\n\t\t\t{\r\n\r\n\t\t\t\tif(best==null || listCandidates.get(i).getValue().intValue()>best.getValue().intValue())\r\n\t\t\t\t{\r\n\t\t\t\t\tbest=listCandidates.get(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//here we add the champion as a parent\r\n\t\t\tlistParents.add(best);\r\n\t\t\tparentsAdded++;\r\n\t\t}\r\n\t\treturn listParents;\r\n\t}", "private int parent(int index) {\n return index / 2;\n }", "private int parent(int index) {\n return index / 2;\n }", "public int getParent(int currIndex)\n {\n return (int)currIndex/2; \n }", "public void candidateSelection(int n, int k, int m) //method that gives political selectors the amount of people (nodes) to go\n {\n Node forward; //node that represents the selector going clockwise \n Node backward; //node that represents the selector going counter-clockwise\n forward = Head; //clockwise selector starts at the first node\n backward = Tail; //counter-clockwise selector starts at the last node\n writer.println(\" \");\n writer.println(\"N = \" + n + \", \" + \"k = \" + k + \", \" + \"m = \" + m);\n writer.println(\" \");\n writer.println(\"Output\");\n writer.println(\"------\");\n if (m > n) //if so that the counter-clockwise selector doesn't waste time circling\n { \n m = m % n;\n }\n if (k > n) //if so that the clockwise selector doesn't waste time circling\n { \n k = k % n;\n }\n while (cand > 0) //as long as the candidates in the circle are > 0\n {\n for (int x = n - 1; x > (n - m); x--) //iterates until backward is on the person m away\n {\n backward = backward.getPrev();\n }\n for (int x = 1; x < k; x++) //iterates until forward is on the the person k away\n {\n forward = forward.getNext();\n }\n if (forward.getData() == backward.getData()) //if the selectors end\n { //on the same person\n writer.println(forward.getData()); //only print once, for\n delete(forward.getData()); //they are worthy\n backward = backward.getPrev(); //but still remove them\n forward = forward.getNext(); //from the circle and set\n } //the selectors on the next candidates\n else \n {\n writer.println(forward.getData() + \" \" + backward.getData());\n delete(backward.getData()); //if the selectors aren't on the\n delete(forward.getData()); //same candidate, remove both\n forward = forward.getNext(); //for they are not worthy,\n backward = backward.getPrev(); //then move the selectors to the\n if (cand == 2) //next candidates\n {\n backward = backward.getPrev(); //resloves an error that I was suffering\n } //with the last 2 lines of output\n }\n }\n }", "private int parentIdx(int idx) {\r\n // TODO\r\n return -1;\r\n }", "@Override\n\tpublic int chooseNum(TreeSet<Integer> avail) {\n\t\tIterator<Integer> iter = avail.descendingIterator();\n\t\t\n\t\tint i = iter.next();\n\t\t\n\t\t//Find a number which we previous have not chosen yet\n\t\twhile(prevChosen.contains(i)){\n\t\t\ti = iter.next();\n\t\t}\n\t\t\n\t\t//Add our chosen number to the list of chosen numbers\n\t\tprevChosen.add(i);\n\t\t\n\t\t//Return the chosen number\n\t\treturn i;\n\t}", "private int parent(int pos)\n {\t\n return (int)Math.ceil((double)Math.max(0, pos-2)/2);\n }", "int getParentIdCount();", "public TreeNode getParent() { return par; }", "private ArrayList<int[]> selectionRank(int[][] chromosomes, float percentToSelect) {\n\n\t\tArrayList<int[]> selectedChromosomes = new ArrayList<int[]>();\n\n\t\t//get fitnesses and ranks of chromosomes, save in array to avoid recalculating\n\t\tint[] fitnesses = new int[chromosomes.length];\n\t\tArrayList<Integer> ranks = new ArrayList<Integer>(); //holds indices of chromosomes, position in arraylist indicates rank\n\n\t\tfor (int i = 0; i < chromosomes.length; i++) { //set up list of fitnesses and ranks\n\t\t\tfitnesses[i] = getFitness(chromosomes[i]);\n\n\n\t\t\tboolean added = false;\n\t\t\tfor (int keyIndex = 0; keyIndex < ranks.size(); keyIndex++) { //only search the second half\n\t\t\t\tif (fitnesses[ranks.get(keyIndex)] > fitnesses[i]) { //if this one is worse\n\t\t\t\t\tranks.add(keyIndex, i); //inverted rank\n\t\t\t\t\tadded = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!added) {\n\t\t\t\tranks.add(i);\n\t\t\t}\n\n\t\t}// end fitness ranking (low fitness is best, last index is worst)\n\n\n\t\t//spin the roulette wheel\n\t\tfor (int i = 0; i < chromosomes.length * percentToSelect; i++) {\n\t\t\tint currentFitnessTotal = 0;\n\t\t\tint fitSelector = rand.nextInt(chromosomes.length); //where the wheel stops\n\t\t\tint fitnessCutoff = (fitSelector * (fitSelector + 1)) / 2;\n\n\t\t\tfor (int j = 0; j < ranks.size(); j++) { //go through all ranks to see who is selected this spin\n\t\t\t\tif (currentFitnessTotal < fitnessCutoff)\n\t\t\t\t\tcurrentFitnessTotal += chromosomes.length - ranks.get(j); //reorder fitness properly\n\n\t\t\t\tif (currentFitnessTotal >= fitnessCutoff) { //if this rank pushed us over the edge, save it\n\t\t\t\t\tselectedChromosomes.add(chromosomes[ranks.get(j)]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end roulette spinning\n\n\t\treturn selectedChromosomes;\n\t}", "private Node select(Node x, int k) {\n\t if (x == null) return null; \n\t int t = size(x.left); \n\t if (t > k) return select(x.left, k); \n\t else if (t < k) return select(x.right, k-t-1); \n\t else return x; \n\t }", "public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {\n\n int BOTH_DONE = 0;\n int LEFT_DONE = 1;\n int BOTH_PENDING = 2;\n\n Stack<Pair<TreeNode, Integer>> stack = new Stack<>();\n TreeNode LCA = null;\n stack.push(new Pair<>(root, BOTH_PENDING));\n\n while (!stack.isEmpty()) {\n Pair<TreeNode, Integer> topPair = stack.peek();\n if (topPair.second != BOTH_DONE) {\n //mark LCA on first entry, on back track , if reprocess then we'd send LCA incorrectly because\n //same p or q will be repeated when back tracking for example from left path\n if ((topPair.second == BOTH_PENDING) && (topPair.first == p || topPair.first == q)) {\n //node matched\n if (LCA != null) {\n return LCA;\n } else {\n LCA = topPair.first;\n }\n }\n\n //move left or right based on the state of the node\n TreeNode child;\n if (topPair.second == LEFT_DONE) {\n child = topPair.first.right;\n } else {\n child = topPair.first.left;\n }\n stack.pop();\n stack.push(new Pair<>(topPair.first, topPair.second - 1));\n if (child != null)\n stack.push(new Pair<>(child, BOTH_PENDING));\n\n } else {\n //if both childs visited, pop the element and move the LCA to the prior node which\n //was parent of the current node with LCA\n if (LCA == topPair.first) {\n stack.pop();\n LCA = stack.peek().first;\n } else {\n stack.pop();\n }\n }\n }\n return null;\n }", "SelectSubSet createSelectSubSet();", "@Override\r\n\tpublic final Genome chooseParent() {\r\n\t\tGenome baby;\r\n\r\n\t\t// If there is a single member, then choose that one.\r\n\t\tif (this.members.size() == 1) {\r\n\t\t\tbaby = this.members.get(0);\r\n\t\t} else {\r\n\t\t\t// If there are many, then choose the population based on survival\r\n\t\t\t// rate\r\n\t\t\t// and select a random genome.\r\n\t\t\tfinal int maxIndexSize \r\n\t\t\t= (int) (this.population.getSurvivalRate() * this.members\r\n\t\t\t\t\t.size()) + 1;\r\n\t\t\tfinal int theOne = (int) RangeRandomizer.randomize(0, maxIndexSize);\r\n\t\t\tbaby = this.members.get(theOne);\r\n\t\t}\r\n\r\n\t\treturn baby;\r\n\t}", "private int leftChild(int i){return 2*i+1;}", "public SqlFromSubSelect getParent() {\n return parent;\n }", "public int[] mRtreeFromSource(int s,int k){\n double INFINITY = Double.MAX_VALUE;\n boolean[] SPT = new boolean[intersection];\n double[] d = new double[intersection];\n int[] parent = new int[intersection];\n\n for (int i = 0; i <intersection ; i++) {\n d[i] = INFINITY;\n parent[i] = -1;\n }\n\n d[s] = 0;\n parent[s]=s;\n\n MinHeap minHeap = new MinHeap(k);\n for (int i = 0; i <intersection ; i++) {\n minHeap.add(i,d[i]);\n }\n while(!minHeap.isEmpty()){\n\n int extractedVertex = minHeap.extractMin();\n\n if(d[extractedVertex]==INFINITY)\n break;\n\n SPT[extractedVertex] = true;\n\n LinkedList<Edge> list = g.adjacencylist[extractedVertex];\n for (int i = 0; i <list.size() ; i++) {\n Edge edge = list.get(i);\n int destination = edge.destination;\n if(SPT[destination]==false ) {\n\n double newKey = edge.weight ; //the different part with previous method\n double currentKey = d[destination];\n if(currentKey>=newKey){\n if(currentKey==newKey){\n if(extractedVertex<parent[destination]){\n minHeap.updateKey(newKey, destination, d[destination]);\n parent[destination] = extractedVertex;\n d[destination] = newKey;\n }\n }\n else {\n minHeap.updateKey(newKey, destination, d[destination]);\n parent[destination] = extractedVertex;\n d[destination] = newKey;\n }\n }\n }\n }\n }\n return parent;\n }", "public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) {\n if (root.val < p.val && root.val < q.val) return lowestCommonAncestor(root.right, p, q);\n else if (root.val > p.val && root.val > q.val) return lowestCommonAncestor(root.left, p, q);\n return root;\n}", "public TaskGroup getSelectedTaskParent()\n {\n boolean first = true;\n TaskGroup allParent = null;\n\n // Examine the parent task group for each selected undertaking\n Iterator<AUndertaking> taskIt = getSelectedTaskIterator();\n\n while (taskIt.hasNext()) {\n AUndertaking item = taskIt.next();\n\n TaskGroup parentOfItem = item.getTaskGroup();\n\n // If the selected item represents a top-level undertaking,\n // then null is the only possible response.\n if (parentOfItem == null) {\n return null;\n }\n\n // Remember first parent to compare against the remaining ones\n if (first) {\n first = false;\n allParent = parentOfItem;\n }\n else if (parentOfItem != allParent) {\n // If a subsequent parent is different from the remembered one,\n // return null\n return null;\n }\n }\n\n // If there is no selected undertaking, return null\n if (allParent == null) {\n return null;\n }\n\n // Otherwise, return the shared parent task group\n return allParent;\n }", "protected LambdaTerm getParent() { return parent; }", "private int getParentOf(int index) {\n // TODO: YOUR CODE HERE\n return index / 2;\n }", "private int Parent(int position) {\r\n\t\treturn position/2;\r\n\t}", "public TreeNode getParentNode();", "Node findParent(Node N, Node R){\n Node P = null;;\n if( N!=R ){\n P = R;\n while( P.left != N && P.right !=N ){\n if(N.item.key.compareToIgnoreCase(P.item.key)<0)\n P = P.left;\n else\n P = P.right;\n }\n }\n return P;\n }", "public Node getParent();", "void union(int x,int y){\n int xRoot=find(x),yRoot=find(y);\n if(xRoot==yRoot)return;\n if(rank[xRoot]<rank[yRoot])\n parent[xRoot]=yRoot;\n else if(rank[xRoot]>rank[yRoot])\n parent[yRoot]=xRoot;\n else{\n parent[yRoot]=xRoot;\n rank[xRoot]=rank[xRoot]+1;\n }\n --totalSets;\n }", "public Chromosome crossover(Chromosome firstParent, Chromosome secondParent);", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "@Override\n\t// Select individuals for crossover\n\tprotected Individual tournamentSelection(Population pop) {\n\t\tSortingIndividual baseIndiv = (SortingIndividual) pop.individuals[0];\n\t\tPopulation tournament = new SortingPopulation(tournamentSize, baseIndiv.getBase(), false);\n\t\t// For each place in the tournament get a random individual\n\t\tfor (int i = 0; i < tournamentSize; i++) {\n\t\t\tint randomId = (int) (Math.random() * pop.size());\n\t\t\ttournament.saveIndividual(i, pop.getIndividual(randomId));\n\t\t}\n\t\t// Get the fittest\n\t\tIndividual fittest = tournament.getFittest();\n\t\treturn fittest;\n\t}", "public String pickFork() {\r\n\t\t\tString fork = \"right-fork\";\r\n\t\t\t// pick random fork if don't have any\r\n\t\t\tif (!forks[0] && !forks[1]) {\r\n\t\t\t\tRandom r = new Random();\r\n\t\t\t\tif (r.nextInt(9) + 1 <= 5) {\r\n\t\t\t\t\tfork = \"left-fork\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfork = \"right-fork\";\r\n\t\t\t\t}\r\n\t\t\t} else if (!forks[0]) {\r\n\t\t\t\tfork = \"left-fork\";\r\n\t\t\t}\r\n\t\t\treturn fork;\r\n\t\t}", "private int getParent(int index) {\r\n return (index - 1) / 2;\r\n }", "private Node select(Node x, int k) {\n if (x == null) return null; \n int t = size(x.left); \n if (t > k) return select(x.left, k); \n else if (t < k) return select(x.right, k-t-1); \n else return x; \n }", "private int parent ( int pos )\n\t{\n\t\treturn -1; // replace this with working code\n\t}", "static int parent(int i)\n {\n return (i-1)/2;\n }", "protected static int parent(int i){\n return (i-1)/2;\n }", "public TaskGroup[] getSelectedTaskParents()\n {\n int selectedItemCount = getSelectedTaskCount();\n TaskGroup[] parents = new TaskGroup[selectedItemCount];\n\n Iterator<AUndertaking> selectedTasks = getSelectedTaskIterator();\n int i = 0;\n\n while (selectedTasks.hasNext()) {\n AUndertaking task = selectedTasks.next();\n\n parents[i++] = task.getTaskGroup();\n }\n\n return parents;\n }", "public interface NextGenSelector {\n public List<Individual> getNextGenPopulation(List<Individual> parentGen, List<Individual> childGen);\n}", "private int parentIndex(int i) {\n return i / 2;\n }", "TreeNode commonAncestor(TreeNode p, TreeNode q) {\n\t// find depths of the two nodes \n\tint depthP = depth(p);\n\tint depthQ = depth(q);\n\t// find difference in depths \n\tint diffDepths = depthP - depthQ;\n\t// q is more shallow\n\tTreeNode first = diffDepths > 0 ? q : p; \n\t// p is more deep\n\tTreeNode second = diffDepths > 0 ? p : q; \n\t// Bring the second one up \n\tsecond = goUpBy(second, Math.abs(delta));\n\n\t// FIND INTERSECTING PATH BY GOING UP ONE AT A TIME\n\t// WHILE THEY ARE NOT THE SAME AND BOTH NOT NULL \n\twhile (first != second && first != null && second != null) {\n\t\tfirst = first.parent;\n\t\tsecond = second.parent; \n\t}\n\t// if either is null, no common, therefore return null\n\t// else we can return one of the two bc they are the same\n\treturn first == null || second == null ? null : first; \n\n}", "private int parent(int child) {\n\t\treturn (child-1)/2;\n\t}", "@VTID(7)\r\n void getParent();", "private int getParentOf(int i) {\n \t\t// TODO Complete this method!\n \t\treturn i / 2;\n \t}", "public NodeD getSelecPrev(){\n if (this.selec == this.head){\n return this.head;\n }else{\n this.selec = this.selec.getPrev();\n return selec;\n }\n }", "private int parent(int i) {\r\n\t\tif (i % 2 == 0) {\r\n\t\t\treturn i / 2 - 1;\r\n\t\t}\r\n\t\treturn i / 2;\r\n\t}", "private static int parent(int i) {\n\t\treturn (i-1)/2;\n\t}", "private static int parent(int i) {\n\t\treturn (i-1)/2;\n\t}", "public Vector choose(Population population, int x) {\n Vector v = new Vector();\n if( x >= 0 && x < population.size() ){\n v.add( population.get(x) );\n }else{\n int m = population.size();\n // The parent is the first individual in the population\n Individual p = population.get( 0 );\n // determining the closest offspring to the parent\n Individual c = population.get(1);\n double d = metric.distance(p,c);\n for( int i=2; i<m; i++ ){\n double d2 = metric.distance(p, population.get(i));\n if( d2 < d ){\n d = d2;\n c = population.get(i);\n }\n }\n // determining if the parent can be replaced with the child\n if( can_replace( c, p ) ){ v.add( c ); }\n else{ v.add( p ); }\n }\n return v;\n }", "private Node select(Node x, int k) {\n if (x == null) return null;\n int t = size(x.left);\n if (t > k) return select(x.left, k);\n else if (t < k) return select(x.right, k - t - 1);\n else return x;\n }", "public TreeNode lowestCommonAncestor2(TreeNode root, TreeNode p, TreeNode q) {\n \n //base\n if(root == null || p == root || q == root){\n return root;\n }\n \n //Logic\n TreeNode left = lowestCommonAncestor2(root.left, p, q);\n TreeNode right = lowestCommonAncestor2(root.right, p, q);\n \n if(left != null && right != null){\n return root; \n }\n else if(left != null){\n return left;\n }\n else \n return right;\n }", "java.lang.String getParentId(int index);", "private Stack<Select> selectionPathAux(JoinPointClass current, String joinPointName,\n ArrayList<JoinPointClass> visitedList, Set<JoinPointClass> ignoreSet, SelectionPathV2 selPath) {\n\n Stack<Select> path = new Stack<>();\n\n if (ignoreSet.contains(current) || visitedList.contains(current)) {\n\n return path;\n }\n\n final Select selected = select(current, joinPointName);\n if (selected != null) {\n\n path.push(selected);\n return path;\n }\n\n visitedList.add(current);\n\n // System.out.println(\"SELECTS: \" + current.getSelects());\n for (final Select select : current.getSelects()) {\n final JoinPointClass next = getJoinPoint(select);\n Stack<Select> pathAux = selectionPathAux(next, joinPointName, visitedList, ignoreSet, selPath);\n if (!pathAux.isEmpty()) {\n pathAux.add(select);\n if (selPath.hasSecondaryPath()) {\n selPath.getSecondaryPath().get().add(select);\n }\n if (!path.isEmpty()) {\n if (!alreadyFound) {\n selPath.setSecondaryPath(pathAux);\n selPath.setTieBreakReason(\"use the first path found (from a depth first search)\");\n // System.out.println(\n // \"More than one path for inital join point '\" + joinPointName + \"'. Two of then are: \");\n // Function<Pair<String, String>, String> converted = p -> {\n // if (p.getLeft().equals(p.getRight())) {\n // return p.getLeft();\n // }\n // return \"(\" + p.getRight() + \" as \" + p.getLeft() + \")\";\n // };\n //\n // System.out.println(\"\\t1. \" + StringUtils.join(path, converted, \".\"));\n // System.out.println(\"\\t2. \" + StringUtils.join(pathAux, converted, \".\"));\n //\n // System.out.println(\"Select uses a depth first search. Will use 1.\");\n alreadyFound = true;\n }\n break;\n }\n path = pathAux;\n } else {\n ignoreSet.add(next);\n }\n }\n visitedList.remove(current);\n\n return path;\n }", "public abstract T getParent(T anItem);", "public abstract OperatorImpl getParent();", "private int first_leaf() { return n/2; }", "void setParentsFirst( int parentsFirst );", "public TreeNode lowestCommonAncestor2(TreeNode root, TreeNode p, TreeNode q) {\r\n\t\t if(root == null || p == root || q == root)\r\n\t return root;\r\n\t \r\n\t TreeNode left = lowestCommonAncestor(root.left, p, q);\r\n\t TreeNode right = lowestCommonAncestor(root.right, p, q);\r\n\t \r\n\t if(left == null && right != null) { // both on right\r\n\t return right;\r\n\t }\r\n\t if(right == null && left != null) { // both on left\r\n\t return left;\r\n\t }\r\n\t if(right == null && left == null) { // not in left and right\r\n\t return null;\r\n\t }\r\n\t return root; // right != null && left != null, one in left, one in right\r\n\t }", "private static int parent(int i) {\n\t\treturn (i - 1) / 2;\n\t}", "Node<T> parent();", "public int getParent(int v){\n\t\t\treturn parent[v];\n\t\t}", "long getToRank();", "MenuEntry getParent();", "TreeNodeValueModel<T> parent();", "TreeNode<T> getParent();", "public int getParentOne()\n\t{\n\t\treturn parentSetOne;\n\t}", "public SelectItem[] parentFils() {\n if (selected.getEtatCommande().getRang() == 0) {\n\n // i will not use request => i will use the parent son instead\n List<EtatCommande> etatCommandes = new ArrayList<EtatCommande>();\n etatCommandes.addAll(selected.getEtatCommande().getListEtatCommandesFils());\n etatCommandes.add(selected.getEtatCommande());\n return JsfUtil.getSelectItems(etatCommandes, true);\n\n //return JsfUtil.getSelectItems(ejbFacadeEtatCommande.findAllNative(\" where ( o.ECm_Rang = 1 OR o.ECm_Rang = 0 )\" ), true);\n } else if (selected.getEtatCommande().isDernierRang() == true) {\n // int rangFils = selected.getEtatCommande().getRang() - 1;\n List<EtatCommande> etatCommandes = new ArrayList<EtatCommande>();\n\n etatCommandes.add(selected.getEtatCommande());\n etatCommandes.add(selected.getEtatCommande().getParent());\n\n //etatCommandes = ejbFacadeEtatCommande.findAllNative(\" where o.ECm_Rang = \" + rangFils + \" OR o.ECm_Id = \"+selected.getEtatCommande().getId());\n etatCommandes.add(selected.getEtatCommande());\n return JsfUtil.getSelectItems(etatCommandes, true);\n\n } else {\n //int rangParent = selected.getEtatCommande().getRang() + 1;\n //int rangFils = selected.getEtatCommande().getRang() - 1;\n List<EtatCommande> etatCommandes = new ArrayList<EtatCommande>();\n\n etatCommandes.add(selected.getEtatCommande());// RETURN TO PARENT\n etatCommandes.add(selected.getEtatCommande().getParent());// STAY\n etatCommandes.addAll(selected.getEtatCommande().getListEtatCommandesFils()); //GO TO SUN\n\n //etatCommandes = ejbFacadeEtatCommande.findAllNative(\" where ( o.ECm_Rang = \" + rangParent + \" OR o.ECm_Rang = \" + rangFils + \" OR o.ECm_Id = \"+selected.getEtatCommande().getId()+\" )\");\n // etatCommandes.add(selected.getEtatCommande());\n return JsfUtil.getSelectItems(etatCommandes, true);\n\n }\n }", "protected void SelectTournament() {\n\t // Torneo.length -> tournament size\n\t // if (tournament size == 2) then BinaryTournament\n this.setRanking();\n\t \n\t for (int i=0; i<this.PopLength; i++) {\n\t Torneo[0] = Randint(0,this.PopLength-1);\n\t int mejor_torneo=Torneo[0];\n\t \n\t for (int j=1; j<Torneo.length; j++) {\n\t boolean repetido= false;\n\t do {\n\t Torneo[j] = Randint(0,this.PopLength-1);\n\t repetido=false;\n\t int k=0;\n\t while ((k<j) && (!repetido))\n\t if (Torneo[j]==Torneo[k])\n\t repetido=true;\n\t else\n\t k++;\n\t } while (repetido);\n\t \n\t if (OLDevaluation[Torneo[j]] < OLDevaluation[mejor_torneo])\n\t mejor_torneo=Torneo[j];\n\t }\n\t sample[i] = mejor_torneo;\n\t }\n\t // Se crea la nueva poblacion\n\t for (int n=0; n<this.PopLength; n++) {\n\t int kk=sample[n];\n\t for (int m=0; m<this.NbGenes; m++) {\n\t NEWpopulation[n][m]= OLDpopulation[kk][m];\n\t }\n\t NEWevaluation[n]= OLDevaluation[kk];\n\t NEWevalIndex[n]= OLDevalIndex[kk];\n\t }\n }", "public static void main(String[] args) {\n TreeNode n = Codec.deserialize(\"3 5 1 6 2 0 8 n n 7 4\");\n Main m = new Main();\n System.out.println(m.lowestCommonAncestor(n,new TreeNode(5), new TreeNode(1)).val);\n System.out.println(m.lowestCommonAncestor(n,new TreeNode(5), new TreeNode(4)).val);\n }", "@SuppressWarnings( \"unchecked\" )\n public List<Node> getSecondChoices() {\n final List<Part> relatedParts = findRelatedParts();\n final Node node = getNode();\n final Node other = getOther();\n return (List<Node>) CollectionUtils.select(\n IteratorUtils.toList( node.getSegment().parts() ),\n new Predicate() {\n @Override\n public boolean evaluate( Object object ) {\n Part part = (Part) object;\n return !part.equals( node )\n && !part.equals( other )\n && !relatedParts.contains( part );\n }\n }\n );\n }", "static int findUnion(int i) {\n int result = i;\n while(parent[result] != result)\n result = parent[result];\n\n // update all parents of i to result\n while(parent[i] != i) {\n int temp = parent[i];\n parent[i] = result;\n i = temp;\n }\n return result;\n }", "public int parent(int i){\n\t\tif(i == 0) return Integer.MIN_VALUE;\n\t\treturn (i-1)/2;\n\t}" ]
[ "0.6487596", "0.64266413", "0.63272136", "0.63044167", "0.6291923", "0.61884266", "0.612213", "0.60046095", "0.5999114", "0.58931535", "0.5866849", "0.5795695", "0.5606658", "0.5605506", "0.55737203", "0.5544996", "0.5527592", "0.55218923", "0.55074537", "0.55040914", "0.54946136", "0.54911196", "0.5486543", "0.54784894", "0.5474095", "0.5447034", "0.54263806", "0.53999096", "0.53948706", "0.538994", "0.5380941", "0.5380941", "0.5317644", "0.53097427", "0.5305526", "0.53047186", "0.5287888", "0.52816826", "0.52751416", "0.5264369", "0.5263689", "0.5258535", "0.525748", "0.5255494", "0.5237182", "0.5220419", "0.5219034", "0.5217437", "0.5211562", "0.5207364", "0.5203412", "0.5199566", "0.5191836", "0.51864886", "0.51596135", "0.51522875", "0.51347965", "0.51249194", "0.5121281", "0.5120174", "0.51159775", "0.51140267", "0.5111352", "0.5108897", "0.5107494", "0.50989956", "0.50975037", "0.5090151", "0.5087889", "0.50863403", "0.5084584", "0.50812685", "0.5051899", "0.5048211", "0.504739", "0.504739", "0.5046707", "0.50352865", "0.50261813", "0.5025295", "0.5013293", "0.50106364", "0.5007782", "0.50058925", "0.5005634", "0.49671325", "0.49594745", "0.49557924", "0.49532512", "0.49478632", "0.49472317", "0.49411607", "0.49390927", "0.49332204", "0.49316964", "0.49315232", "0.49273646", "0.49267483", "0.49207127", "0.49148038" ]
0.66773427
0
Auxiliary Function For rankSelection: Generate the Random City Index
private static int rankParentIndex(int popAmount, int totalWeight) { // Randomly Generate the Weight double randomWeight = Math.random() * (totalWeight + 1); // Find out the Living Range for (int rankWeight = popAmount; rankWeight > 0; rankWeight--) { // Reduce the rankWeight randomWeight = randomWeight - rankWeight; // Meet the Rank if (randomWeight <= 0) { return popAmount - rankWeight; } } return popAmount - 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String randomCityId(RandomNumberGenerator random) {\n long targetPop = (long) (random.rand() * totalPopulation);\n\n for (Map.Entry<String, Long> city : populationByCityId.entrySet()) {\n targetPop -= city.getValue();\n\n if (targetPop < 0) {\n return city.getKey();\n }\n }\n\n // should never happen\n throw new RuntimeException(\"Unable to select a random city id.\");\n }", "private int getRandomCity(ArrayList<Integer> listToGetRandomCities){\n int randomCity;\n int randomIndex = random.nextInt(listToGetRandomCities.size());\n\n randomCity = listToGetRandomCities.get(randomIndex);\n listToGetRandomCities.remove(randomIndex);\n return randomCity;\n }", "public City randomlyAssignCity()\n {\n int cityReferenceNumber = (int)(Math.random()*(getContainerSize() - 1)) + 1;\n City randomCity = cityContainer.get(cityReferenceNumber);\n \n return randomCity;\n }", "public RecommendedCity(String city, int rank) {\n super();\n City = city;\n this.rank = rank;\n }", "public String randomCityName(RandomNumberGenerator random) {\n String cityId = randomCityId(random);\n return demographics.get(cityId).city;\n }", "private static ArrayList<Chromosome> generateNearestNeighbourPopulation(int pathLength, int nnPopulationSize){\n // declaring the arraylist of chromosomes which will store the\n ArrayList<Chromosome> nnPopualtion = new ArrayList<>();\n\n // declaring a set which will contain all the starting cities that will be used for the population\n Set<Integer> startingCities = new HashSet<>();\n // initialising the set of startingCities with random cities. It being a set no duplicates are allowed\n while (startingCities.size() < nnPopulationSize) {\n startingCities.add(ThreadLocalRandom.current().nextInt(0, pathLength));\n }\n\n // An ArrayList with all the cityIDs which can be copied to keep track of visited/unvisited cities\n ArrayList<Integer> cities = new ArrayList<>();\n for (int i = 0; i < pathLength; i++) {\n cities.add(i);\n }\n\n // for every starting city\n for (Integer startingCity : startingCities) {\n // set the currentCity as the Starting City\n int currentCity = startingCity;\n // Declare a new chromosome to store this new path\n Chromosome chromosome = new Chromosome(pathLength);\n // Set the first city in the path as the startingCity\n chromosome.path[0] = startingCity;\n\n // Declare a new Set of unvisitedCities, and initialise it as a copy of the ArrayList of cityIDs\n Set<Integer> unvisitedCities = new HashSet<>(cities);\n // remove the startingCity from the set of unvisitedCities\n unvisitedCities.remove(startingCity);\n\n // for the length of the path\n for (int i = 1; i < pathLength; i++) {\n // initially set the closestCity to a random city from the set of unvisitedCities\n int closestCity = unvisitedCities.iterator().next();\n // loop through every unvisitedCity to find the closestCity\n for (Integer city : unvisitedCities) {\n // if the distance between the currentCity and the unvisitedCity is < the distance between\n // the currentCity and the closestCity\n if (distanceMatrix[currentCity][city] < distanceMatrix[currentCity][closestCity]) {\n // set thet unvisitedCity as the closestCity\n closestCity = city;\n }\n }\n // add the closestCity as the next city in the path\n chromosome.path[i] = closestCity;\n // make the currentCity for the next iteration the current closestCity\n currentCity = closestCity;\n // remove the closestCity from the set of unvisitedCities\n unvisitedCities.remove(closestCity);\n }\n\n // add the generated chromosome to the ArrayList of the initial nnPopulation\n nnPopualtion.add(chromosome);\n }\n\n return nnPopualtion;\n }", "private int selectNextCity(Ant ant) {\n int t = random.nextInt(numberOfCities - currentIndex);\n if (random.nextDouble() < randomFactor) {\n OptionalInt cityIndex = IntStream.range(0, numberOfCities)\n .filter(i -> i == t && !ant.visited(i))\n .findFirst();\n if (cityIndex.isPresent()) {\n return cityIndex.getAsInt();\n }\n }\n calculateProbabilities(ant);\n double r = random.nextDouble();\n double total = 0;\n for (int i = 0; i < numberOfCities; i++) {\n total += probabilities[i];\n if (total >= r) {\n return i;\n }\n }\n\n throw new RuntimeException(\"There are no other cities\");\n }", "City(){\n x_coordinate = (int)(Math.random()*200);\n y_coordinate = (int)(Math.random()*200);\n }", "public Demographics randomCity(RandomNumberGenerator random) {\n if (city != null) {\n // if we're only generating one city at a time, just use the largest entry for that one city\n if (fixedCity == null) {\n fixedCity = demographics.values().stream()\n .filter(d -> d.city.equalsIgnoreCase(city))\n .sorted().findFirst().get();\n }\n return fixedCity;\n }\n return demographics.get(randomCityId(random));\n }", "private int[] generateInitialSolution(){\n int[] initialSolution = new int[tspProblem.getNumberOfCities()];\n ArrayList<Integer> listToGetRandomCities = new ArrayList<Integer>();\n\n for(int i = 0; i <= initialSolution.length - 1; i++){\n listToGetRandomCities.add(i);\n }\n\n for(int i = 0; i <= initialSolution.length - 1; i++){\n initialSolution[i] = getRandomCity(listToGetRandomCities);\n }\n\n return initialSolution;\n }", "private int randomIndex(int size) {\n\t\treturn (int) (Math.random() * size);\n\t}", "private int randomIndex() {\n return StdRandom.uniform(head, tail);\n }", "public void generateIndividual() {\n // Loop through all our destination cities and add them to our tour\n for (int cityIndex = 0; cityIndex < TourManager.numberOfCities(); cityIndex++) {\n setCity(cityIndex, TourManager.getCity(cityIndex));\n }\n // Randomly reorder the tour\n Collections.shuffle(tour);\n }", "private Countable[] generateArray(int rank){\n var numbers = new Countable[rank];\n for (int i = 0; i < rank; i++) {\n numbers[i] = getRandomCountable();\n }\n return numbers;\n }", "public static String randomRank() {\r\n\t\tString[] rank = {\"assistant\",\"associate\",\"full\"};\r\n\t\treturn rank[(int)(Math.random() * 3)];\r\n\t}", "private Point randomIndex() {\r\n\t\tRandom rand = new Random();\r\n\t\tint val1 = rand.nextInt(rows_size);\r\n\t\tint val2 = rand.nextInt(columns_size);\r\n\t\twhile (!isEmpty(val1,val2)) {\r\n\t\t\tval1 = rand.nextInt(rows_size);\r\n\t\t\tval2 = rand.nextInt(columns_size);\r\n\t\t}\r\n\t\treturn new Point(val1,val2);\r\n\t}", "public City(){\n this.x = (int)(Math.random()*200);\n this.y = (int)(Math.random()*200);\n }", "private void addCities() {\n int random2 = 0;\n for (int i = 1; i < MAP_LENGTH-1; i++) {\n for (int j = 1; j < MAP_LENGTH-1; j++) {\n if (tileMap[i][j].getTerrain() instanceof Grass) { //Make cities on grass tiles only\n random2 = (int)(Math.round(Math.random()*18));\n if (!adjacentCity(i, j) && (random2 < 3)) {\n tileMap[i][j].setCity(new City(i, j, false)); //If randomly chosen and not in proximity of another city, create a city there (right now set as not a capital)\n }\n }\n }\n }\n }", "public City() {\r\n\t\tthis.x = (int) (Math.random() * 200);\r\n\t\tthis.y = (int) (Math.random() * 200);\r\n\t}", "private int newIndex() {\n //return indexes.remove(0);\n return random.nextInt(81);\n }", "public RandomNeighborhoodOperator(int nbRelaxedVars, long seed)\n{\n\trandom = new Random(seed);\n\tthis.nbRelaxedVars = nbRelaxedVars;\n\tselected = new TIntHashSet();\n}", "public String getZipCode(String cityName, RandomNumberGenerator random) {\n List<String> zipsForCity = getZipCodes(cityName);\n if (zipsForCity.size() > 1) {\n int randomChoice = random.randInt(zipsForCity.size());\n return zipsForCity.get(randomChoice);\n } else {\n return zipsForCity.get(0);\n }\n }", "public Position sampleRandomUniformPosition();", "private RandomLocationGen() {}", "protected TspSolutionInstance(int amountOfCities) {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < amountOfCities;i++) {\n\t\t\tlist.add(i);\n\t }\n\t\tjava.util.Collections.shuffle(list);\n\t\tthis.path = list;\n\t}", "GARoute(){\n cityIndex = new ArrayList<Integer>();\n }", "SolutionPopulation initialise(ArrayList<City> cities, int populationSize);", "int selectNextCity(Ant ant) {\r\n\t\tint from, to;\r\n\t\t\r\n\t\tdouble denom = 0.0;\r\n\r\n\t\tfrom = ant.curCity;\r\n\r\n\t\t// compute denom\r\n\t\tfor (to = 0; to < cities.length; to++) {\r\n\t\t\tif (ant.tabu[to] == 0) {\r\n\t\t\t\tdenom += antProduct(from, to);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tassert denom != 0.0;\r\n\r\n\t\tdo {\r\n\t\t\tdouble p;\r\n\t\t\tto++;\r\n\t\t\tif (to >= cities.length)\r\n\t\t\t\tto = 0;\r\n\t\t\tif (ant.tabu[to] == 0) {\r\n\t\t\t\tp = antProduct(from, to) / denom;\r\n\t\t\t\tdouble num = Math.random();\r\n\t\t\t\tif (num < p)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} while (true);\r\n\r\n\t\treturn to;\r\n\t}", "int RandomGeneratorZeroToThree (){\n\t\t int randomInt = 0;\n\t\t Random randomGenerator = new Random();\n\t\t for (int idx = 1; idx <= 10; ++idx) {\n\t\t\t randomInt = randomGenerator.nextInt(4);\n\n\t\t }\n\t\t return randomInt;\n\t }", "public void randomizeNeighbors(int[] r, int[] c) {\n\n // Copy over the constant neighbor list\n for (int i = 0; i < r.length; i++) {\n r[i] = NEIGHBOR_R[i];\n c[i] = NEIGHBOR_C[i];\n }\n\n for (int i = 0; i < r.length; i++) {\n\n // Obtain random index\n int randomIndex = (int) (Math.random() * r.length);\n\n // Swap integers\n int tempR = r[i];\n int tempC = c[i];\n r[i] = r[randomIndex];\n c[i] = c[randomIndex];\n r[randomIndex] = tempR;\n c[randomIndex] = tempC;\n }\n }", "@Test\n public void randomSeedNumTest()\n {\n int x = _city.getRandomNum(5);\n int y = _city.getRandomNum(5);\n assertEquals(x, y);\n }", "Chromosome getRandom();", "Main(int citizens)\n {\n\n this.citizens = citizens;\n rank = new int[citizens];\n id = new int[citizens];\n for (int i = 0; i < citizens; i++){\n\n rank[i] = 1;\n id[i] = i;\n }\n }", "public Cell generatePosition(int r, int c) {\n\t\tdouble w = Math.random()*r+1;\r\n\t\tdouble q = Math.random()*c;\r\n\t\tint rows = (int) w;\r\n\t\tint b = (int) q;\r\n\t\tchar cols = (char) ('A' + b);\r\n\t\treturn recorrerMatrix(rows,cols,getFirst());\r\n\t}", "public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\tr = random.nextInt(32);// gets random int from 0 to 32\r\n\t\t\t\tif (r < 4) num = 0; else if (r < 8) num = 1; else if (r < 31) num = 2; else num = 3;// distributes different objects\r\n\t\t\t\tif (nodes[i * WIDTH_TILES + j].isOccupied() == false) {// if tile empty or random chosen\r\n\t\t\t\t\tnodes[i * WIDTH_TILES + j] = new Node(new Point(i * BOARD_WIDTH / WIDTH_TILES, j * BOARD_WIDTH / HEIGHT_TILES), new ImageIcon(icons[num]).getImage(), true, occupants[num]);// creates random tile\r\n\t\t\t\t}// if (random)\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t}", "public int pickIndex() {\n int len = weightPrefixSum.length;\n\n int idx = random.nextInt(weightPrefixSum[len - 1]) + 1;\n\n int start = 0;\n int end = len - 1;\n while(start <= end){\n int mid = start + (end - start) / 2;\n\n if(weightPrefixSum[mid] == idx){\n return mid;\n }else if(weightPrefixSum[mid] < idx){\n start = mid + 1;\n }else{\n end = mid - 1;\n }\n }\n\n return start;\n\n }", "private List<Integer> generateRandom() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n int amt = myStateMap.get(i).getAmount();\n end = amt + start;\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }", "private static ArrayList<Chromosome> generatePopulation(ArrayList<City> cities, int pathLength, int populationSize) {\n // generating part of the initial population using a Nearest Neighbour Algorithm\n int nnPopulationSize = (int) (0.1*populationSize);\n // if the required number of chromosomes to be generated by the NN Algorithm is greater then the number of cities\n // then set the required number of chromosomes to the number of cities\n if (nnPopulationSize > cities.size()) {\n nnPopulationSize = cities.size();\n }\n ArrayList<Chromosome> nnPopulation = generateNearestNeighbourPopulation(pathLength, nnPopulationSize);\n\n // generating the rest of the initial population randomly\n int randomPopulationSize = populationSize - nnPopulationSize;\n ArrayList<Chromosome> randomPopulation = new ArrayList<>();\n randomPopulation.addAll( generateRandomPopulation(pathLength, randomPopulationSize) );\n\n // Combining the 2 parts of the population into one initial population\n ArrayList<Chromosome> population = new ArrayList<>();\n population.addAll(nnPopulation);\n population.addAll(randomPopulation);\n\n return population;\n }", "void rndSwapTwo() {\r\n\t\t// index 0 has the start city and doesn't change\r\n\t\t// hence the random#s are from 1 onwards\r\n\t\trndSwapTwo(1, this.length());\r\n\t}", "public int getRandomIndex() {\n\t\treturn this.getRandomIndex(this.rng);\n\t}", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "public int randomGene();", "private void collectRandomRIDs(){\n\t\tint numRIDs = iterations + 1;\n\t\trandomRID_list = new String[numRIDs];\n\t\tString randomClusterName;\n\t\tint clusterID, randomPosition;\n\t\t\n\t\t// Collect #iterations of random RID's\n\t\tfor(int i=0; i < numRIDs; i++){\n\t\t\trandomClusterName = env.VERTEX_PREFIX + (int) (Math.random() * env.NUM_VERTEX_TYPE);\n\t\t\tclusterID = db.getClusterIdByName(randomClusterName); \n\t\t\tOClusterPosition [] range = db.getStorage().getClusterDataRange(clusterID);\n\t\t\t\n\t\t\trandomPosition = (int) (Math.random() * range[1].intValue()) + range[0].intValue();\n\t\t\trandomRID_list[i] = \"#\" + clusterID + \":\" + randomPosition;\n\t\t}\n\t\t\n\t}", "protected void SelectTournament() {\n\t // Torneo.length -> tournament size\n\t // if (tournament size == 2) then BinaryTournament\n this.setRanking();\n\t \n\t for (int i=0; i<this.PopLength; i++) {\n\t Torneo[0] = Randint(0,this.PopLength-1);\n\t int mejor_torneo=Torneo[0];\n\t \n\t for (int j=1; j<Torneo.length; j++) {\n\t boolean repetido= false;\n\t do {\n\t Torneo[j] = Randint(0,this.PopLength-1);\n\t repetido=false;\n\t int k=0;\n\t while ((k<j) && (!repetido))\n\t if (Torneo[j]==Torneo[k])\n\t repetido=true;\n\t else\n\t k++;\n\t } while (repetido);\n\t \n\t if (OLDevaluation[Torneo[j]] < OLDevaluation[mejor_torneo])\n\t mejor_torneo=Torneo[j];\n\t }\n\t sample[i] = mejor_torneo;\n\t }\n\t // Se crea la nueva poblacion\n\t for (int n=0; n<this.PopLength; n++) {\n\t int kk=sample[n];\n\t for (int m=0; m<this.NbGenes; m++) {\n\t NEWpopulation[n][m]= OLDpopulation[kk][m];\n\t }\n\t NEWevaluation[n]= OLDevaluation[kk];\n\t NEWevalIndex[n]= OLDevalIndex[kk];\n\t }\n }", "pb4server.RandomPointMoveCityAskReq getRandomPointMoveCityAskReq();", "public static Solution[] rankSelection(Solution[] currPop){\n // Get the City Amount\n int popAmount = currPop.length;\n int totalWeight = (1 + popAmount) * popAmount / 2;\n // Get 2 Parents\n int parentIndex_1 = rankParentIndex(popAmount, totalWeight);\n int parentIndex_2;\n // Make Sure Two Parents are Different\n do {\n parentIndex_2 = rankParentIndex(popAmount, totalWeight);\n } while(parentIndex_1 == parentIndex_2);\n return new Solution[]{currPop[parentIndex_1], currPop[parentIndex_2]};\n }", "private int createAbilityIndex() {\n if (this.getPokemonInfo().numAbilities() == 2) {\n return RandomUtils.getRandomInt(2);\n } else {\n return RandomUtils.getRandomInt(3);\n }\n }", "private int generateRandomNumber() {\n\t\treturn new SplittableRandom().nextInt(0, 3);\n\t}", "private void createRiver(Square[][]Squares, int rows, int columns, int[][] terrainLoc)\n {\n // create a seed location for the river to start\n int riverRand = (int )(Math.random() * columns);\n \n // making sure the river will not start too close to the borders\n if (riverRand < columns/6 || riverRand > columns/1.2)\n {\n for(;riverRand > columns/6 && riverRand < columns/1.2 && riverRand < columns - 2;)\n {\n riverRand = (int )(Math.random() * columns + 1);\n }\n }\n // place the river seeds\n Squares[0][riverRand].setTerrain(3);\n Squares[1][riverRand].setTerrain(3);\n terrainLoc[0][riverRand] = 3;\n terrainLoc[1][riverRand] = 3;\n \n // start building the river downward \n \n // the grid will be looped horizontally for every second row to find a river tile, from top to bottom,\n // and place an extension to it either to its left or to its right side, which is three blocks long\n for(int a = 1;a<rows;a=a+2)\n {\n for (int b = 0; b<columns-1 ; b++)\n { \n if (terrainLoc[a][b] == 3)\n { \n int rand = (int)(Math.random() * 2 +1);\n \n switch(rand)\n {\n case 1: \n { \n if (b == columns -1)\n {\n Squares[a][b-1].setTerrain(3);\n terrainLoc[a][b-1] = 3;\n \n if(a!=rows-1)\n { \n Squares[a+1][b-1].setTerrain(3);\n terrainLoc[a+1][b-1] = 3;\n }\n if (a == rows -2)\n {\n terrainLoc[a+2][b-1] = 3;\n Squares[a+2][b-1].setTerrain(3);\n }\n }\n else\n {\n Squares[a][b+1].setTerrain(3);\n terrainLoc[a][b+1] = 3;\n \n if(a!=rows-1)\n { \n terrainLoc[a+1][b+1] = 3;\n Squares[a+1][b+1].setTerrain(3);\n }\n if(a<rows-2)\n {\n terrainLoc[a+2][b+1] = 3;\n Squares[a+2][b+1].setTerrain(3);\n }\n }\n \n // ifs to hop the iterator over previously created rivers to avoid adding multiple\n // river extensions on the same row \n if (b<=columns-3)\n {\n b=b+2;\n }\n if (b==columns-2)\n {\n b++;\n }\n break;\n }\n \n case 2: \n { \n if (b == 0)\n {\n Squares[a][b+1].setTerrain(3);\n terrainLoc[a][b+1] = 3;\n \n if(a!=rows-1)\n {\n terrainLoc[a+1][b+1] = 3;\n Squares[a+1][b+1].setTerrain(3);\n }\n \n if(a<rows-2)\n {\n terrainLoc[a+2][b+1] = 3;\n Squares[a+2][b+1].setTerrain(3);\n }\n }\n \n else\n {\n Squares[a][b-1].setTerrain(3);\n terrainLoc[a][b-1] = 3;\n \n if(a!=rows-1)\n {\n terrainLoc[a+1][b-1] = 3;\n Squares[a+1][b-1].setTerrain(3);\n }\n if(a<rows-2)\n {\n terrainLoc[a+2][b-1] = 3;\n Squares[a+2][b-1].setTerrain(3);\n }\n }\n \n // ifs to hop the iterator over previously created rivers to avoid adding multiple\n // river extensions on the same row \n if (b<=columns-3)\n {\n b=b+2;\n }\n if (b==columns-2)\n {\n b++;\n }\n break;\n } \n }\n }\n } \n } \n }", "public Integer getRandomIndexByType(int type){\n\t\tRandom randomGenerator = new Random();\n\t\tnewCategories.clear();\n\t\tfor(int i = 0; i<this.type.size(); i++)\n\t\t{\t\n\t\t\tif(this.type.get(i) == type) {\n\t\t\t\tnewCategories.add(this.categories.get(i));\n\t\t\t}\n\t\t}\n\t\tInteger index = randomGenerator.nextInt(newCategories.size());\n\t\treturn index;\n\t}", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "private void addRandomCloudCityCard(List<CardCollection.Item> result, int count) {\n List<String> possibleCards = new ArrayList<String>();\n possibleCards.addAll(_cloudCitySetRarity.getAllCards());\n filterNonExistingCards(possibleCards);\n Collections.shuffle(possibleCards, _random);\n addCards(result, possibleCards.subList(0, Math.min(possibleCards.size(), count)), false);\n }", "public static int weaponSpawnLocation(int cellCount)\r\n\t{\r\n\t\tRandom rng = new Random ();\t\r\n\t\treturn rng.nextInt(cellCount);\r\n\t}", "private static Position fetchRandomPosition(){\n return new Position(0,0).returnRandomPosition();\n }", "public void assignPoint(Person person, String cityName) {\n List<Place> zipsForCity;\n\n if (cityName == null) {\n int size = zipCodes.keySet().size();\n cityName = (String) zipCodes.keySet().toArray()[person.randInt(size)];\n }\n zipsForCity = zipCodes.get(cityName);\n\n if (zipsForCity == null) {\n zipsForCity = zipCodes.get(cityName + \" Town\");\n }\n\n Place place;\n if (zipsForCity != null && zipsForCity.size() == 1) {\n place = zipsForCity.get(0);\n } else if (zipsForCity != null) {\n String personZip = (String) person.attributes.get(Person.ZIP);\n if (personZip == null) {\n place = zipsForCity.get(person.randInt(zipsForCity.size()));\n } else {\n place = zipsForCity.stream()\n .filter(c -> personZip.equals(c.postalCode))\n .findFirst()\n .orElse(zipsForCity.get(person.randInt(zipsForCity.size())));\n }\n } else {\n // The place doesn't exist for some reason, pick a random location...\n String key = (String) zipCodes.keySet().toArray()[person.randInt(zipCodes.keySet().size())];\n place = zipCodes.get(key).get(person.randInt(zipCodes.get(key).size()));\n }\n\n if (place != null) {\n // Get the coordinate of the city/town\n Point2D.Double coordinate = new Point2D.Double();\n coordinate.setLocation(place.coordinate);\n // And now perturbate it slightly.\n // Precision within 0.001 degree is more or less a neighborhood or street.\n // Precision within 0.01 is a village or town\n // Precision within 0.1 is a large city\n double dx = person.rand(-0.05, 0.05);\n double dy = person.rand(-0.05, 0.05);\n coordinate.setLocation(coordinate.x + dx, coordinate.y + dy);\n person.attributes.put(Person.COORDINATE, coordinate);\n }\n }", "Chromosome getRandomAmongFittest(int limit);", "private void generateCandies(){\n\t\tfor (int i = 0; i < 16; i++){\n\t\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t\tCandy candy = new Candy(coordX, coordY, i);\n\t\t\tcandies.put(i, candy);\n\t\t}\n\t}", "private int randomGen(int upperBound) {\n\t\tRandom r = new Random();\n\t\treturn r.nextInt(upperBound);\n\t}", "public Color randColor() {\r\n return this.loc.get(this.rand.nextInt(this.loc.size()));\r\n }", "private int randomAddress() {\n\t\tint randomAddressId = (int) (Math.random() * 603);\n\t\treturn randomAddressId;\n\t}", "private static int randomInt(int i, int j) {\n\t\tRandom generator = new Random();\r\n\t\treturn i + generator.nextInt(j);\r\n\t}", "private static long getRandAccountFromBranch(int bid) {\n int noa = uniqueAccounts.get(bid).size();\n int index = rand.nextInt(noa);\n return accounts.get(bid).get(index);\n }", "public static void runGeneticAlgorithm(ArrayList<City> cities) throws IOException {\n\n\t\t//select our strategies for our genetic algorithm\n\t\tPopulationInitialiser initialiser = new RandomGeneration();//random generation of initial population as initialisation strategy\n\t\tPopulationCrossover breeder = new TwoPointCrossOver();//two-point crossover as crossover strategy\n\t\tPopulationMutator mutator = new SwapTwoCities();//swap of two elements as mutation strategy\n\t\tPopulationReplacement selector = new ElitistSelection();//elitism as selection strategy\n\n\t\t//create a generation history object to track all generations\n\t\tArrayList<GAPopulationGeneration> generationHistory = new ArrayList<>();\n\n\t\t//create our first generation and randomly generate its initial solutions\n\t\tGAPopulationGeneration generation = new GAPopulationGeneration(initialiser.initialise(cities, 8));\n\n\t\t// create our output table\n\t\tAsciiTable outputTable = new AsciiTable();\n\t\toutputTable.addHeavyRule();\n\n\t\t// create our incumbent and stopping criterion tracker\n\t\tCandidateSolution incumbent = generation.getParentPopulation().getBestSolution();\n\t\tint generationSinceImprovedIncumbent = 0;\n\n\t\t//loop until 10 iterations without improved incumbent\n\t\twhile (generationSinceImprovedIncumbent <= 10) {\n\n\t\t\t//take parents and crossover to create 6 offspring. record the results for displaying later\n\t\t\tgeneration.setOffspringPopulation(breeder.breed(generation.getParentPopulation(), 6));\n\t\t\tgeneration.setFamilyRecords(breeder.getFamilies());\n\n\t\t\t//take offspring and perform mutation. record the results for displaying later\n\t\t\tgeneration.setMutatedPopulation(mutator.mutatePopulation(generation.getOffspringPopulation()));\n\t\t\tgeneration.setMutantRecords(mutator.getMutations());\n\n\t\t\t//take mutated offspring and perform selection.\n\t\t\tgeneration.setNextPopulation(selector.replace(generation.getParentPopulation(), generation.getMutatedPopulation()));\n\n\t\t\t//if this solution is greater than the incumbent reset stopping criterion and we have new incumbent, else increment stopping criterion\n\t\t\tif (generation.getBestSolutionThisGeneration().compareTo(incumbent) < 0) {\n\t\t\t\tgenerationSinceImprovedIncumbent = 0;\n\t\t\t\tincumbent = generation.getBestSolutionThisGeneration();\n\t\t\t} else\n\t\t\t\tgenerationSinceImprovedIncumbent++;\n\n\t\t\t//record the current generation, and create the new generation from the current one\n\t\t\tgeneration.addToTable(outputTable, incumbent);\n\t\t\tgenerationHistory.add(generation);\n\t\t\tgeneration = generation.initialiseNextGeneration();\n\n\t\t}\n\n\t\t//print out the incumbent at the end\n\t\toutputTable.addRow(\"\", \"\", \"TSP final best solution & fitness : \", incumbent + \" (\" + incumbent.getFitness() + \")\", \"\", \"\", \"\", \"\");\n\t\toutputTable.addHeavyRule();\n\n\n\t\t//format the table, and print to console and output.txt\n\t\tTA_Grid grid = TA_Grid.create(\"an ascii compliant grid\")\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_HEAVY, ' ', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#', '#')\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_NORMAL, ' ', '~', ' ', '~', '~', '~', '~', '~', '~', '~', '~', '~')\n\t\t\t\t.addCharacterMap(TA_GridConfig.RULESET_LIGHT, ' ', '-', ' ', '-', '-', '-', '-', '-', '-', '-', '-', '-');\n\t\toutputTable.getContext().setGrid(grid);\n\t\toutputTable.setTextAlignment(TextAlignment.CENTER);\n\t\toutputTable.getRenderer().setCWC(new CWC_LongestLine());\n\t\tFileWriter output = new FileWriter(\"output.txt\", true);\n\t\toutput.append(outputTable.render()).append(\"\\n\\n\").close();\n\t\tSystem.out.println(outputTable.render() + \"\\n\\n\");\n\t}", "public static City buildMapFromNewYork(){\n City bangorME = new City(\"Bangor, ME\");\n \n City portlandME = new City(\"Portland, ME\");\n connect(portlandME, bangorME, 118);\n \n City portsmouthNH = new City(\"Portsmouth, NH\");\n connect(portsmouthNH, portlandME, 55);\n \n City burlingtonVT = new City(\"Burlington, VT\");\n connect(burlingtonVT, portsmouthNH, 190);\n connect(burlingtonVT, portlandME, 259);\n \n City bostonMA = new City(\"Boston, MA\");\n connect(bostonMA, portsmouthNH, 60);\n \n City providenceRI = new City(\"Providence, RI\");\n connect(providenceRI, bostonMA, 53);\n \n City worcesterMA = new City(\"Worcester, MA\");\n connect(worcesterMA, bostonMA, 49);\n connect(worcesterMA, portsmouthNH, 83);\n connect(worcesterMA, providenceRI, 44);\n \n City albanyNY = new City(\"Albany, NY\");\n connect(albanyNY, burlingtonVT, 177);\n connect(albanyNY, worcesterMA, 128);\n \n City newHavenCT = new City(\"New Haven, CT\");\n connect(newHavenCT, worcesterMA, 97);\n connect(newHavenCT, providenceRI, 100);\n \n City newYorkNY = new City(\"New York, NY\");\n connect(newYorkNY, newHavenCT, 79);\n connect(newYorkNY, albanyNY, 141);\n \n City buffaloNY = new City(\"Buffalo, NY\");\n connect(buffaloNY, albanyNY, 266);\n \n City philadelphiaPA = new City(\"Philadelphia, PA\");\n connect(philadelphiaPA, newYorkNY, 98);\n \n City washingtonDC = new City(\"Washington, DC\");\n connect(washingtonDC, philadelphiaPA, 145);\n \n City pittsburghPA = new City(\"Pittsburgh, PA\");\n connect(pittsburghPA, washingtonDC, 240);\n connect(pittsburghPA, philadelphiaPA, 288);\n connect(pittsburghPA, buffaloNY, 200);\n \n City clevelandOH = new City(\"Cleveland, OH\");\n connect(clevelandOH, pittsburghPA, 133);\n connect(clevelandOH, buffaloNY, 183);\n \n City richmondVA = new City(\"Richmond, VA\");\n connect(richmondVA, washingtonDC, 105);\n \n City charlestonWV = new City(\"Charleston, WV\");\n connect(charlestonWV, pittsburghPA, 213);\n connect(charlestonWV, washingtonDC, 343);\n connect(charlestonWV, richmondVA, 297);\n \n City charlotteNC = new City(\"Charlotte, NC\");\n connect(charlotteNC, richmondVA, 260);\n connect(charlotteNC, charlestonWV, 254);\n \n City atlantaGA = new City(\"Atlanta, GA\");\n connect(atlantaGA, charlotteNC, 229);\n \n City jacksonvilleFL = new City(\"Jacksonville, FL\");\n connect(jacksonvilleFL, atlantaGA, 300);\n connect(jacksonvilleFL, charlotteNC, 337);\n \n City miamiFL = new City(\"Miami, FL\");\n connect(miamiFL, jacksonvilleFL, 308);\n \n City tampaFL = new City(\"Tampa, FL\");\n connect(tampaFL, miamiFL, 251);\n connect(tampaFL, jacksonvilleFL, 187);\n \n City newOrleansLA = new City(\"New Orleans, LA\");\n connect(newOrleansLA, jacksonvilleFL, 473);\n connect(newOrleansLA, tampaFL, 563);\n connect(newOrleansLA, atlantaGA, 410);\n \n City nashvilleTN = new City(\"Nashville, TN\");\n connect(nashvilleTN, charlotteNC, 390);\n connect(nashvilleTN, atlantaGA, 226);\n connect(nashvilleTN, charlestonWV, 350);\n \n City memphisTN = new City(\"Memphis, TN\");\n connect(memphisTN, nashvilleTN, 191);\n connect(memphisTN, newOrleansLA, 347);\n connect(memphisTN, atlantaGA, 346);\n \n City detroitMI = new City(\"Detroit, MI\");\n connect(detroitMI, clevelandOH, 164);\n \n City indianapolisIN = new City(\"Indianapolis, IN\");\n connect(indianapolisIN, nashvilleTN, 264);\n connect(indianapolisIN, pittsburghPA, 339);\n connect(indianapolisIN, clevelandOH, 294);\n connect(indianapolisIN, detroitMI, 265);\n connect(indianapolisIN, charlestonWV, 299);\n \n City chicagoIL = new City(\"Chicago, IL\");\n connect(chicagoIL, detroitMI, 265);\n connect(chicagoIL, indianapolisIN, 177);\n \n City milwaukeeWI = new City(\"Milwaukee, WI\");\n connect(milwaukeeWI, chicagoIL, 89);\n \n City minneapolisMN = new City(\"Minneapolis, MN\");\n connect(minneapolisMN, milwaukeeWI, 300);\n \n City fargoND = new City(\"Fargo, ND\");\n connect(fargoND, minneapolisMN, 213);\n \n City siouxFallsSD = new City(\"Sioux Falls, SD\");\n connect(siouxFallsSD, fargoND, 214);\n connect(siouxFallsSD, minneapolisMN, 230);\n connect(siouxFallsSD, milwaukeeWI, 443);\n \n City omahaNE = new City(\"Omaha, NE\");\n connect(omahaNE, siouxFallsSD, 164);\n \n City desMoinesIA = new City(\"Des Moines, IA\");\n connect(desMoinesIA, omahaNE, 124);\n connect(desMoinesIA, chicagoIL, 306);\n connect(desMoinesIA, minneapolisMN, 221);\n \n City stLouisMO = new City(\"St. Louis, MO\");\n connect(stLouisMO, chicagoIL, 286);\n connect(stLouisMO, indianapolisIN, 235);\n connect(stLouisMO, nashvilleTN, 281);\n connect(stLouisMO, memphisTN, 256);\n \n City kansasCityMO = new City(\"Kansas City, MO\");\n connect(kansasCityMO, omahaNE, 168);\n connect(kansasCityMO, desMoinesIA, 176);\n connect(kansasCityMO, stLouisMO, 226);\n \n City oklahomaCityOK = new City(\"Oklahoma City, OK\");\n connect(oklahomaCityOK, kansasCityMO, 312);\n connect(oklahomaCityOK, stLouisMO, 449);\n connect(oklahomaCityOK, memphisTN, 416);\n \n City dallasTX = new City(\"Dallas, TX\");\n connect(dallasTX, oklahomaCityOK, 189);\n connect(dallasTX, memphisTN, 408);\n connect(dallasTX, newOrleansLA, 455);\n \n City houstonTX = new City(\"Houston, TX\");\n connect(houstonTX, dallasTX, 214);\n connect(houstonTX, newOrleansLA, 313);\n \n City sanAntonioTX = new City(\"San Antonio, TX\");\n connect(sanAntonioTX, dallasTX, 246);\n connect(sanAntonioTX, houstonTX, 182);\n \n City elPasoTX = new City(\"El Paso, TX\");\n connect(elPasoTX, dallasTX, 552);\n connect(elPasoTX, sanAntonioTX, 473);\n \n City albuquerqueNM = new City(\"Albuquerque, NM\");\n connect(albuquerqueNM, elPasoTX, 234);\n connect(albuquerqueNM, oklahomaCityOK, 482);\n \n City denverCO = new City(\"Denver, CO\");\n connect(denverCO, albuquerqueNM, 392);\n connect(denverCO, kansasCityMO, 528);\n connect(denverCO, omahaNE, 466);\n \n City billingsMT = new City(\"Billings, MT\");\n connect(billingsMT, denverCO, 485);\n connect(billingsMT, siouxFallsSD, 597);\n connect(billingsMT, fargoND, 529);\n \n City butteMT = new City(\"Butte, MT\");\n connect(butteMT, billingsMT, 211);\n \n City saltLakeCityUT = new City(\"Salt Lake City, UT\");\n connect(saltLakeCityUT, butteMT, 366);\n connect(saltLakeCityUT, denverCO, 480);\n \n City phoenixAZ = new City(\"Phoenix, AZ\");\n connect(phoenixAZ, elPasoTX, 379);\n connect(phoenixAZ, albuquerqueNM, 397);\n \n City lasVegasNV = new City(\"Las Vegas, NV\");\n connect(lasVegasNV, saltLakeCityUT, 369);\n connect(lasVegasNV, albuquerqueNM, 514);\n connect(lasVegasNV, phoenixAZ, 294);\n \n City losAngelesCA = new City(\"Los Angeles, CA\");\n connect(losAngelesCA, lasVegasNV, 263);\n connect(losAngelesCA, phoenixAZ, 350);\n \n City sanDiegoCA = new City(\"San Diego, CA\");\n connect(sanDiegoCA, losAngelesCA, 116);\n connect(sanDiegoCA, phoenixAZ, 335);\n connect(sanDiegoCA, lasVegasNV, 311);\n \n City montereyCA = new City(\"Monterey, CA\");\n connect(montereyCA, losAngelesCA, 319);\n \n City sanFranciscoCA = new City(\"San Francisco, CA\");\n connect(sanFranciscoCA, montereyCA, 114);\n connect(sanFranciscoCA, losAngelesCA, 358);\n \n City sacramentoCA = new City(\"Sacramento, CA\");\n connect(sacramentoCA, sanFranciscoCA, 84);\n connect(sacramentoCA, saltLakeCityUT, 585);\n \n City boiseID = new City(\"Boise, ID\");\n connect(boiseID, butteMT, 393);\n connect(boiseID, saltLakeCityUT, 301);\n \n City portlandOR = new City(\"Portland, OR\");\n connect(portlandOR, sacramentoCA, 538);\n connect(portlandOR, boiseID, 407);\n \n City seattleWA = new City(\"Seattle, WA\");\n connect(seattleWA, portlandOR, 175);\n connect(seattleWA, butteMT, 544);\n connect(seattleWA, boiseID, 472);\n \n //change this return city to start wherever you want\n return newYorkNY;\n }", "public static void GA(ArrayList<City> cities){\n int pathLength = cities.size();\n // the number of chromosomes which will be generated\n int populationSize = 100;\n // the number of chromosomes that will be generated from crossover as a percentage of the population\n double crossoverRate = 0.8;\n // the number of chromosomes that will be generated from crossover\n int crossoverSize = (int) (populationSize * crossoverRate);\n // the probability that a chromosome can have a random mutation\n double mutationRate = 0.05;\n // the number of generations\n int generations = 5000;\n\n // Initialising the distance matrix using the initialiseDistanceMatrix method\n initialiseDistanceMatrix(cities);\n\n // Generating the Initial Population\n ArrayList<Chromosome> population = generatePopulation(cities, pathLength, populationSize);\n\n // The following is done for each generation of the population\n for (int i = 0; i < generations; i++) {\n // calculating the fitness of every chromosome in the current generation\n calculateFitnessOfPopulation(population);\n // sort the population so that the chromosomes with the highest fitness are at the start of the list\n Collections.sort(population);\n // call the method which performs crossover on the population\n Set<Chromosome> children = crossoverPopulation(population, populationSize, crossoverSize);\n // carry out mutation on the children of the current population\n children.addAll( mutatePopulation(children, mutationRate) );\n\n // evolve the population\n population.addAll(children);\n ArrayList<Chromosome> currentGeneration = new ArrayList<>(population);\n ArrayList<Chromosome> nextGeneration = evolvePopulation(currentGeneration, populationSize, cities, pathLength);\n population = new ArrayList<>(nextGeneration);\n }\n\n // find the fittest chromosome\n Chromosome fittestChromosome = population.get(0);\n double maxFitness = population.get(0).fitness;\n for (Chromosome c : population) {\n if (c.fitness > maxFitness) {\n maxFitness = c.fitness;\n fittestChromosome = c;\n }\n }\n // display the path and distance of the fittest chromosome\n System.out.println(fittestChromosome.getPath());\n System.out.println(\"Total Route Distance: \" + routeDistance(fittestChromosome));\n\n //printPopulation(population);\n }", "public void random_init()\r\n\t{\r\n\t\tRandom random_generator = new Random();\r\n\t\t\r\n\t\tfor(int i=0;i<chromosome_size;i++)\r\n\t\t{\r\n\t\t\tchromosome[i] = random_generator.nextInt(num_colors)+1;\r\n\t\t}\r\n\t}", "public int getRandom() {\n int index = (int) Math.floor(Math.random() * size);\n return nums[index];\n }", "static Tour rndTour() {\r\n\t\tTour tr = Tour.sequence();\r\n\t\ttr.randomize();\r\n\t\ttr.distance = tr.distance();\r\n\t\treturn tr;\r\n\t}", "void buildCity(VertexLocation vert);", "public static void randomInit(int r) { }", "public ArrayList<PuzzleState> getRandomNeighbors() {\n\t\tArrayList<PuzzleState> ns = getNeighbors();\n\t\tCollections.shuffle(ns);\n\t\treturn ns;\t\n\t}", "private void generateNether(World world, Random random, int i, int j) {\n\n\t}", "public static int getRandCell() {\n int num = (int) (Math.random() * 10); // Generate random numbers\n int randCell = 1;\n if (num >= MARG_FIRST && num <= MARG_LAST) { // Set boundaries\n randCell = num;\n }\n return randCell;\n }", "@SuppressWarnings(\"null\")\r\n\t@Override\r\n\tpublic PWPSolution createSolution(InitialisationMode mode) {\n\t\t\r\n\t\tif (mode == InitialisationMode.RANDOM) {\r\n\t\t\r\n\t\tint[] solutions = new int[getNumberOfLocations()];//array of solutions\r\n\t\t\r\n\t\tfor (int i = 0 ; i <= getNumberOfLocations() -1 ; i++) { //enumerate the array, giving each location an integer value\r\n\t\t\t\r\n\t\t\tsolutions[i]= i;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tCollections.shuffle(Arrays.asList(solutions)); //shuffle the array\r\n\t\t\r\n\t\tSolutionRepresentation solution = new SolutionRepresentation(solutions); //create a new solution representation using the array of ints\r\n\t\t\r\n\t\tObjectiveFunctionInterface objfunc = getPWPObjectiveFunction(); //get the objective function to be used \r\n\r\n\t\tPWPSolution sol = new PWPSolution(solution, objfunc.getObjectiveFunctionValue(solution)); //create the new PWPSolution using the solution representation and the value of the objective function applied to the solution\r\n\t\t\r\n\t\treturn sol;\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63 */ this.pop.addElement(c);\r\n/* 37: */ }\r\n/* 38: */ }", "private int nextIndex() {\n return ThreadLocalRandom.current().nextInt(currentIndex, tracks.size());\n }", "public void generateRandomPosition(Zone samusZone) {\n\t\t\n\t\tint i = samusZone.getI(), j = samusZone.getJ();\n\t\twhile(i == samusZone.getI() && j == samusZone.getJ()) {\n\t\t\ti = ThreadLocalRandom.current().nextInt(1, 12 + 1);\n\t\t\tj = ThreadLocalRandom.current().nextInt(1, 12 + 1);\n\t\t}\n\t\t\n\t\tsamusZone.getSamus().setI(i);\n\t\tsamusZone.getSamus().setJ(j);\n\t}", "private static Set<Chromosome> generateRandomPopulation(int pathLength, int randomPopulationSize) {\n Set<Chromosome> population = new HashSet<>();\n\n // create an arraylist of CityIDs, and initialise it with the cities in order of their ID\n ArrayList<Integer> basePath = new ArrayList<>();\n for (int i = 0; i < pathLength; i++) {\n basePath.add(i);\n }\n\n // repeat the following for as many chromosomes as are required (populationSize)\n while (population.size() < randomPopulationSize) {\n Chromosome chromosome = new Chromosome(pathLength);\n // randomise the order of the arraylist of cities\n Collections.shuffle(basePath);\n for (int j = 0; j < pathLength; j++) {\n chromosome.path[j] = basePath.get(j);\n }\n population.add(chromosome);\n }\n\n return population;\n }", "public static LocNode intialState() {\n\n\t \n\t char[][] newMatrix =copyMatrix(matrix);\n\t \n\t \n\n\t \n\twhile(true) {\n\t\t\t\n\t\t\t\n\t\tint i=getRandomIndex(size);\n\t\tint j=getRandomIndex(size);\n\t\t\n\t if(newMatrix[i][j]=='-') {\n\t \t\n\t \n\t \t newMatrix[i][j]='c' ;\n\t \t \n\t \t \n\t \t updateVisibility(i, j, newMatrix);\n\t \t \n\t \t\n\t \t LocNode intialState= new LocNode(newMatrix, calculateOpjectiveFunction(newMatrix));\n\t \t \n\t \t\n\t \t return intialState;\n\t }\n\t \n\t }\n }", "private ArrayList<Integer> getRandomPointsIndex(float ratio,\n ArrayList<Integer> occupiedNList) {\n ArrayList<Integer> newNList = new ArrayList<Integer>();\n ArrayList<Integer> freeNList = new ArrayList<Integer>();\n Dimension dim = layoutPanel.getLayoutSize();\n int height = dim.height;\n int width = dim.width;\n int size = height * width;\n int newNListSize = (int) (size * ratio);\n\n // create a free list\n for (int i = 0; i < size; i++) {\n if (occupiedNList == null || !occupiedNList.contains(i)) {\n freeNList.add(i);\n }\n }\n\n // create a new neurons list\n Random rnd = new Random();\n while (freeNList.size() > 0 && newNList.size() < newNListSize) {\n int i = rnd.nextInt(freeNList.size());\n newNList.add(freeNList.get(i));\n freeNList.remove(i);\n }\n Collections.sort(newNList);\n\n return newNList;\n }", "City city(int i) {\r\n\t\treturn tsp.cities[this.index[i]];\r\n\t}", "private Integer getRandomUnvisitedNeighbourIndex(int currentIndex) {\n\t\t\n\t\tArrayList<Integer> neighbors = setUnvisitedNeighbors(currentIndex);\n\t\t\n\t\tRandom random = new Random();\n\t\t\t\t\n\t\treturn neighbors.size() == 0 ? NOT_EXIST : neighbors.get(random.nextInt(neighbors.size())); \n\t}", "private static Set<Chromosome> rankBasedRouletteWheelSelection(ArrayList<Chromosome> population, int populationSize) {\n Set<Chromosome> selectedChromosomes = new HashSet<>();\n\n // calculate the sum of all ranks, which will be used as a denominator for all probabilities\n int sumOfRanks = (populationSize + 1) * populationSize / 2;\n\n // declare an array of cumulative probabilities for all the chromosomes in the population\n double[] cumulativeProbability = new double[populationSize];\n // calculate the cumulative probability of the first chromosome as its probability\n cumulativeProbability[0] = (double) populationSize / sumOfRanks;\n // calculate the cumulative probabilities of all successive chromosomes:\n for (int i = 1; i < populationSize; i++) {\n // as the probability of this chromosomes based on its rank\n double probability = (double) (populationSize-i) / sumOfRanks;\n // plus the cumulative proability of the preceeding chromosome\n cumulativeProbability[i] = cumulativeProbability[i-1] + probability;\n }\n\n while (selectedChromosomes.size() < 2) {\n // choose a chromosome randomly based on its cumulative probability (the lower the better)\n double random = ThreadLocalRandom.current().nextDouble();\n int choice = 0;\n while (random > cumulativeProbability[choice]) {\n choice++;\n }\n\n // add the chosen chromosome to the set of selectedChromosomes\n selectedChromosomes.add(population.get(choice));\n }\n\n return selectedChromosomes;\n }", "private static int getRandomNumberOfRooms(){\r\n return r.nextInt(50)+1;\r\n }", "long getRank();", "public static Location genRandomSpawn() {\n final Random r = new Random();\n\n final World world = Bukkit.getWorld(\"Normal_tmp\");\n\n final int half = WIDTH / 2,\n x = randomBetween(r, -half + CENTERX, half + CENTERX),\n z = randomBetween(r, -half + CENTERZ, half + CENTERZ);\n\n return permutateLocation(new Location(world, x, 0, z));\n }", "private void setRand(){\n rand = generator.nextInt(9) + 1;\n }", "private static long getRandAccount() {\n int bid = rand.nextInt(noOfBranches);\n return getRandAccountFromBranch(bid);\n }", "public Double2D generateLocationInNeighborhood() {\n\n double neighborhoodLength = state.taskLocLength;// * (1 + 12.0 * state.random.nextDouble(true, true));\n // generate the x and y coordinates within the bounding area of the neighborhood\n double x, y;\n x = meanLocation.getX() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n y = meanLocation.getY() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// if (state.random.nextDouble() < state.delta) {\n// // use rejection sampling to get the distribution\n// // generate those outside the epsilon area\n// do {\n// x = meanLocation.getX() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// y = meanLocation.getY() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// }while(inEpsilon(x, y));\n// }else {\n// // generate those inside the epsilon area\n// do {\n// x = meanLocation.getX() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// y = meanLocation.getY() + (state.random.nextDouble(true, true) * neighborhoodLength) - neighborhoodLength / 2.0;\n// }while(!inEpsilon(x, y));\n// }\n\n\n\n\n // generate them within the view\n// double x = (state.random.nextDouble(true, true) * state.getSimWidth());\n// double y = (state.random.nextDouble(true, true) * state.getSimHeight());\n return new Double2D(x, y);\n }", "private void setupAnts() {\n IntStream.range(0, numberOfAnts)\n .forEach(i -> {\n ants.forEach(ant -> {\n ant.clear();\n ant.visitCity(-1, random.nextInt(numberOfCities));\n });\n });\n currentIndex = 0;\n }", "public int Rank();", "public RandomGrid() {\n random = new Random(System.currentTimeMillis());\n /*\n indexes = new LinkedList<>();\n for (int i = 0; i < 81; i++) {\n indexes.add(i);\n }\n numbers = new ArrayList<>(9);\n for (int i = 1; i <= 9; i++) {\n numbers.add(i);\n }\n Collections.shuffle(indexes, random);\n */\n grid = new int[9][9];\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n grid[i][j] = 0;\n }\n }\n subGrid = new SubGrid[3][3];\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n subGrid[i][j] = new SubGrid();\n }\n }\n }", "public void findCities() {\r\n\t\tpolygonMap.setCurrentPlayerID(client.getSettler().getID());\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0; i < island.getNodes().length; i++) {\r\n\t\t\tif (island.getNodes()[i].getBuilding() == Constants.SETTLEMENT\r\n\t\t\t\t\t&& island.getNodes()[i].getOwnerID() == client.getSettler()\r\n\t\t\t\t\t\t\t.getID()) {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, i);\r\n\t\t\t\tcounter++;\r\n\t\t\t} else {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, -1);\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void init(int nCities) {\r\n\t\t// Initialise variables\r\n\t\tINIT_PHEROMONE = 1.0 / nCities;\r\n\t\tdistance = new double[nCities][nCities];\r\n\t\tpheromone = new double[nCities][nCities];\r\n\t\tbestPath = new int[nCities];\r\n\t\t\r\n\t\tcreateCities(nCities);\r\n\t\tcreateAnts(nCities);\r\n\t}", "@Override\r\n\tpublic void buildCity() {\n\t\t\r\n\t}", "public int tournament(int size) {\n\t\t\n\t\tint best = 0;\n\t\tfloat bestFitness = Float.NEGATIVE_INFINITY;\n\t\t\n\t\t//selects the best individual from randomly sampled tournament participants\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tint index = R.nextInt(populationSize);\n\t\t\tif(fitness[index] > bestFitness){\n\t\t\t\tbestFitness = fitness[index];\n\t\t\t\tbest = index;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn best;\n\t}", "public abstract int getPopulation(int west, int south, int east, int north);", "public Location getRandomLocation() {\n\t\tint x = rand.nextInt(WORLD_SIZE);\n\t\tint y = 12;\n\t\tint z = rand.nextInt(WORLD_SIZE);\n\t\treturn new Location(x, y, z);\n\t}", "public static int randomPos(int grid) {\n Random rand = new Random();\n return rand.nextInt((grid));\n }", "long getFromRank();" ]
[ "0.6488237", "0.64814675", "0.6318941", "0.5931284", "0.5872085", "0.58565015", "0.58564806", "0.5826058", "0.582588", "0.5759553", "0.5656883", "0.56503147", "0.560677", "0.5588661", "0.555146", "0.5535749", "0.5527888", "0.5472583", "0.54520166", "0.54346836", "0.539494", "0.539331", "0.5364632", "0.5356077", "0.53496957", "0.53358155", "0.53155804", "0.5310231", "0.5309863", "0.52961564", "0.5274407", "0.5247092", "0.5243063", "0.52359015", "0.5214291", "0.52081627", "0.5198473", "0.51944953", "0.5192806", "0.5190452", "0.51714003", "0.5152263", "0.51403254", "0.51239127", "0.51212835", "0.51102716", "0.5093493", "0.5066504", "0.50630456", "0.5060277", "0.5059624", "0.50438714", "0.5035773", "0.50312686", "0.50091344", "0.5004687", "0.499049", "0.4986956", "0.49834126", "0.49658847", "0.49594045", "0.495544", "0.4955361", "0.4953477", "0.49532774", "0.49446416", "0.49445054", "0.49441698", "0.49345297", "0.4933433", "0.49254885", "0.49184754", "0.49179763", "0.49059337", "0.49052206", "0.48958588", "0.48915908", "0.48742294", "0.48726296", "0.48715276", "0.48687685", "0.48686373", "0.4857296", "0.48511738", "0.48435968", "0.48383337", "0.48364893", "0.48299196", "0.48188713", "0.481877", "0.4818177", "0.48143062", "0.48126036", "0.4808891", "0.48047388", "0.48038822", "0.48025915", "0.48025745", "0.48013416", "0.47930032" ]
0.48639035
82
Check MapTable and Return the Replaced Value
private static int getMappingValue(ArrayList<Integer[]> mapTable, int listOrder, int value) { // Define Mapping Order int mapIndex; if (listOrder == 1){ mapIndex = 1; }else{ mapIndex = 0; } // Go through the Whole List for(Integer[] item: mapTable) { if (item[listOrder - 1] == value){ return item[mapIndex]; } } return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateMap(MapData map);", "public int updatedcode(Map<String, Object> map) {\n\t\treturn dao.updatedcode(map);\r\n\t}", "public int updatedcodea(Map<String, Object> map) {\n\t\treturn dao.updatedcodea(map);\r\n\t}", "public int[] updateMap() {\r\n\t\tint[] isObstacle = super.updateMap();\r\n\t\tsmap.setMap(map);\r\n\t\treturn isObstacle;\r\n\t}", "private Map<String, Object> dealWithMap(Map<String, Object> paramMap)\n {\n Set<String> set = new HashSet<String>();\n for (String colName : defaultValColArr)\n {\n set.add(colName);\n }\n for (String colName : pkColArr)\n {\n set.add(colName);\n }\n Iterator<String> iterator = set.iterator();\n while (iterator.hasNext())\n {\n String colName = iterator.next();\n if (paramMap.get(colName) == null)\n {\n paramMap.remove(colName);\n }\n }\n return paramMap;\n }", "public String toggleMap() {\r\n\t\tMap temp = sensor.getTrueMap();\r\n\t\tif (Map.compare(temp, smap.getMap())) {\r\n\t\t\tsmap.setMap(map.copy());\r\n\t\t\treturn \"robot\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsmap.setMap(temp.copy());\r\n\t\t\treturn \"simulated\";\r\n\t\t}\r\n\t}", "@Override\n\tpublic void VisitMapLiteralNode(BunMapNode Node) {\n\n\t}", "private Map<String, Object> dealWithMap(Map<String, Object> paramMap) {\n\t\tSet<String> set = new HashSet<String>();\n\t\tfor (String colName : defaultValColArr) {\n\t\t\tset.add(colName);\n\t\t}\n\t\tfor (String colName : pkColArr) {\n\t\t\tset.add(colName);\n\t\t}\n\t\tIterator<String> iterator = set.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tString colName = iterator.next();\n\t\t\tif(paramMap.get(colName) == null) {\n\t\t\t\tparamMap.remove(colName);\n\t\t\t}\n\t\t}\n\t\treturn paramMap;\n\t}", "private void doAPITest(Map<Object,Object> table) {\n\t\tint size = table.size();\n\t\tObject key, value;\n\t\t\n\t\tMap<Object,Object> clone = cloneMap(table);\n\t\t\n\t\t// retrieve values using values()\n\t\tCollection<Object> values = table.values();\n\t\t\n\t\t// retrieve keys using keySet()\n\t\tSet<Object> keySet = table.keySet();\t\t\n\t\tObject[] keySetArray = keySet.toArray();\n\t\t\n\t\tint step = 1 + random.nextInt(5);\n\t\t\n\t\tfor (int i=0; i<keySetArray.length; i=i+step)\n\t\t{\n\t\t\tkey = keySetArray[i];\n\t\t\t// retrieve value\n\t\t\tvalue = table.get(key);\n\t\t\t\n\t\t\t// assert value is in the table\n\t\t\tassertTrue(table.containsValue(value));\n\t\t\t/*\n\t\t\t * assertTrue(table.contains(value)); // Removed as not supported by the Map interface, and identical to containsValue\n\t\t\t * if value is a wrapped key then check it's equal \n\t\t\t * to the key \n\t\t\t */\n\t\t\tif (value instanceof CustomValue)\n\t\t\t{\n\t\t\t\tassertEquals(key, ((CustomValue)value).key);\n\t\t\t}\n\t\t\t\n\t\t\t// count how many occurrences of this value there are\n\t\t\tint occurrences = numberOccurrences(values, value);\n\t\t\t\n\t\t\t// find the Map.Entry\n\t\t\tSet<Map.Entry<Object, Object>> entrySet = table.entrySet();\n\t\t\tIterator<Map.Entry<Object, Object>> entrySetIterator = entrySet.iterator();\n\t\t\tMap.Entry<Object,Object> entry = null;\n\t\t\tdo\n\t\t\t{\n\t\t\t\tentry = entrySetIterator.next();\n\t\t\t} while (!entry.getKey().equals(key));\n\t\t\t\n\t\t\t// remove from table in different ways\n\t\t\tswitch (i % 3)\n\t\t\t{\n\t\t\tcase 0:\n\t\t\t\ttable.remove(key);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tkeySet.remove(key);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\tentrySet.remove(entry);\n\t\t\t}\n\t\t\t\n\t\t\t// assert key is no longer in the table\n\t\t\tassertFalse(table.containsKey(key));\n\t\t\t// assert key is no longer in the keyset\n\t\t\tassertFalse(keySet.contains(key));\n\t\t\t// assert key is no longer in the entrySet\n\t\t\tassertFalse(entrySet.contains(entry));\n\t\t\t\n\t\t\t// assert that there's one fewer of this value in the hashtable\n\t\t\tassertEquals(occurrences, numberOccurrences(values, value) + 1);\n\t\t\t\n\t\t\t// re-insert key\n\t\t\ttable.put(key, value);\n\t\t\t\n\t\t\t// assert key is in the table\n\t\t\tassertTrue(table.containsKey(key));\n\t\t\t// assert key is in the keyset\n\t\t\tassertTrue(keySet.contains(key));\n\t\t\t// assert EntrySet is same size\n\t\t\tassertEquals(size, entrySet.size());\n\t\t}\n\t\t\n\t\t// test hashtable is the same size\n\t\tassertEquals(size, table.size());\n\t\t\n\t\t// test keySet is expected size\n\t\tassertEquals(size, keySet.size());\n\t\t\n\t\t// retrieve keys using keys()\n\t\tIterator<?> keys = table.keySet().iterator();\n\t\t\n\t\t// remove a subset of elements from the table. store in a map\n\t\tint counter = table.size() / 4;\n\t\tMap<Object,Object> map = new HashMap<Object, Object>();\n\t\twhile (keys.hasNext() && counter-- >= 0)\n\t\t{\n\t\t\tkey = keys.next();\n\t\t\tvalue = table.get(key);\n\t\t\tmap.put(key, value);\n\t\t\tkeys.remove(); // removes the most recent retrieved element\n\t\t}\n\t\t// re-add the elements using putAll\n\t\ttable.putAll(map);\n\t\t\n\t\t// test equal to copy\n\t\tassertEquals(clone, table);\n\t\t\n\t\t// clear the copy\n\t\tclone.clear();\n\t\t\n\t\t// assert size of clone is zero\n\t\tassertEquals(0, clone.size());\n\t\t\n\t\t// assert size of original is the same\n\t\tassertEquals(size, table.size());\n\t}", "void setMapChanged();", "public int updateMap(NodePositionsSet myMap){\r\n\t\t/*check updated ID*/\r\n\t\tif(myID == 0){\r\n\t\t\t//core.Debug.p(\"must set myID in global map before updating\");\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tthis.myMap = myMap;\r\n\t\tsynced=-1;\r\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic String update(Map<String, Object> entityMap)\n\t\t\tthrows DataAccessException {\n\t\treturn null;\n\t}", "public void onChangeMap(String arg0) {\n\t\t\r\n\t}", "private boolean findMapValue(Map<String, String> map, String searchValue) {\n\t\treturn (findMapKeyByValue(map, searchValue) != null);\r\n\t}", "protected Object processEntry(InvocableMap.Entry<K, V> entry, Map<? extends K, ? extends V> mapAll,\n boolean fInsert, boolean fReturn)\n {\n K oKey = entry.getKey();\n\n if (mapAll.containsKey(oKey))\n {\n V oValueCur = entry.getValue();\n V oValueNew = mapAll.get(oKey);\n boolean fMatch;\n\n if (oValueCur == null)\n {\n fMatch = fInsert;\n }\n else\n {\n Comparable verCur = oValueCur.getVersionIndicator();\n Comparable verNew = oValueNew.getVersionIndicator();\n\n fMatch = verCur.compareTo(verNew) == 0;\n }\n\n if (fMatch)\n {\n oValueNew.incrementVersion();\n entry.setValue(oValueNew, false);\n return NO_RESULT;\n }\n return fReturn ? oValueCur : NO_RESULT;\n }\n\n return NO_RESULT;\n }", "public void updateMap(TileMap tileMap){\n\t\tthis.tileMap = tileMap;\n\n\t}", "public void verifyValues() {\r\n // update the values view to the latest version, then proceed to verify\r\n // as usual. \r\n values = map.values();\r\n super.verifyValues();\r\n }", "public static String replaceWord(String word, String[][] wordMap) {\n\t\tif( word == null )\n\t\t\treturn null;\n\t\telse if( wordMap == null || wordMap.length == 0 )\n\t\t\treturn word;\n\t\telse\n\t\t{\n\t\t\tfor( int i = 0 ; i < wordMap.length ; i++ )\n\t\t\t\tif( word.equals( wordMap[i][0] ) )\n\t\t\t\t\treturn wordMap[i][1];\n\t\t\treturn word;\n\t\t}\n }", "public synchronized static void setFieldMap(String table, Map<String, String> javaToDbFieldMap) {\n ConcurrentHashMap<String, String> java2DbMap = getJava2DBFieldMap(table);\n ConcurrentHashMap<String, String> db2JavaMap = getDB2JavaFieldMap(table);\n if (javaToDbFieldMap != null && !javaToDbFieldMap.isEmpty()) {\n for (Map.Entry<String, String> entry : javaToDbFieldMap.entrySet()) {\n if (isNotBlank(entry.getKey()) && isNotBlank(entry.getValue())) {\n java2DbMap.put(entry.getKey(), entry.getValue());\n db2JavaMap.put(entry.getValue(), entry.getKey());\n }\n }\n }\n }", "@Override\n\tpublic Expression replacedVar(Map<Variable, Variable> replacement) {\n\t\tList<Tuple<String, Variable>> newVars = new ArrayList<Tuple<String, Variable>>(this.variables);\n\t\tnewVars.replaceAll(itm -> {\n\t\t\tif (itm.second() != null && replacement.containsKey(itm.second())) {\n\t\t\t\treturn new Tuple<String, Variable>(itm.first(), replacement.get(itm.second()));\n\t\t\t}\n\t\t\treturn itm;\n\t\t});\n\t\treturn new Expression(this.desc, newVars);\n\t}", "public void test_findMapBySqlMap() {\r\n\t\t// step 1:\r\n\t\tMap personMap = this.persistenceService.findMapBySqlMap(FIND_PERSON_BY_SQLMAP, NAME_PARAM[0], RETURN_MAP_KEY);\r\n\t\tassertForFindMapGoogle(personMap);\r\n\t\t\r\n\t\t// init again\r\n\t\tpersonMap = null;\r\n\t\t// step 2:\r\n\t\tpersonMap = this.persistenceService.findMapBySqlMap(FIND_PERSON_BY_SQLMAP, NAME_PARAM[0], RETURN_MAP_KEY, RETURN_MAP_VALUE);\r\n\t\tassertForFindMapGoogle(personMap);\r\n\t}", "@Test\n \tpublic void mapTable() {\n \t\t\n \t\tString[][] data = { { \"11\", \"12\" }, { \"21\", \"22\" } };\n \n \t\tTable table = tableWith(data,\"c1\",\"c2\");\n \n \t\tTableMapDirectives directives = new TableMapDirectives(table.columns().get(0));\n \t\t\n \t\tdirectives.add(column(\"TAXOCODE\"))\n \t\t .add(column(\"ISSCAAP\"))\n \t\t .add(column(\"Scientific_name\"))\n \t\t .add(column(\"English_name\").language(\"en\"))\n \t\t .add(column(\"French_name\").language(\"fr\"))\n \t\t .add(column(\"Spanish_name\").language(\"es\"))\n \t\t .add(column(\"Author\"))\n \t\t .add(column(\"Family\"))\n \t\t .add(column(\"Order\"));\n \n \t\tOutcome outcome = service.map(table, directives);\n \t\t\n \t\tassertNotNull(outcome.result());\n \t}", "public boolean hasChanged()\n {\n return map.hasChanged();\n }", "public void updateMap(HashMap<Coordinate, MapTile> currentView) {\n\t\t\tfor (Coordinate key : currentView.keySet()) {\n\t\t\t\tif (!map.containsKey(key)) {\n\t\t\t\t\tMapTile value = currentView.get(key);\n\t\t\t\t\tmap.put(key, value);\n\t\t\t\t\tif (value.getType() == MapTile.Type.TRAP) {\n\t\t\t\t\t\tTrapTile value2 = (TrapTile) value; // downcast to find type\n\t\t\t\t\t\tif (value2.getTrap().equals(\"parcel\") && possibleTiles.contains(key)) {\n\t\t\t\t\t\t\tparcelsFound++;\n\t\t\t\t\t\t\tparcels.add(key);\n\t\t\t\t\t\t\tif (parcelsFound == numParcels() && exitFound == true) {\n\t\t\t\t\t\t\t\tphase = \"search\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"lava\")) {\n\t\t\t\t\t\t\tlava.add(key);\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"health\")) {\n\t\t\t\t\t\t\thealth.add(key);\n\t\t\t\t\t\t} else if (value2.getTrap().equals(\"water\")) {\n\t\t\t\t\t\t\twater.add(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (value.getType() == MapTile.Type.FINISH) {\n\t\t\t\t\t\texitFound = true;\n\t\t\t\t\t\texit.add(key);\n\t\t\t\t\t\tif (parcelsFound == numParcels() && exitFound == true) {\n\t\t\t\t\t\t\tphase = \"search\";\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}", "private static void simpleMapExamples() {\n\t\tSystem.out.println(\"simpleMapExamples Start ----\");\n\t\t\n\t\tMap<String,Integer> mapEx1 = new HashMap<>();\n\t\t\n\t\tmapEx1.put(\"Amit\", 35);\n\t\tmapEx1.put(\"Gunjan\", 45);\n\t\tmapEx1.put(\"Vidut\", 55);\n\t\t\n\t\t//Loop over Map\n\t\tfor(Entry<String, Integer> entry : mapEx1.entrySet()) {\n\t\t\t\n\t\t\tString key = entry.getKey();\n\t\t\tInteger val = entry.getValue();\n\t\t\t\n\t\t\tSystem.out.println(\"KEY : \" + key + \" : VAL : \" + val);\n\t\t\t\n\t\t}\n\t\t\n\t\t//API to get collection of values from the map\n\t\tCollection<Integer> values = mapEx1.values();\n\t\t\n\t\t//Now browse over collection values using java8 lambda\n\t\tSystem.out.println(\"Printing values ...\");\n\t\tvalues.forEach((val) -> System.out.println(val));\n\t\t\n\t\t//Replace values in the map using \n\t\t//Here we are replacing each key's value to 46\n\t\tmapEx1.replaceAll(( s, i) -> {\n\t\t\treturn 46;\n\t\t});\n\t\t\n\t\tSystem.out.println(\"Printing after firing replaceAll...\");\n\t\t//Now print the key/value pair of map using lambda\n\t\tmapEx1.forEach((k,v) -> {\n\t\t\tSystem.out.println(\"Key : \" + k + \" Val \" + v);\n\t\t});\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"simpleMapExamples End ----\");\n\t}", "private boolean checkRep()\r\n/* 126: */ {\r\n/* 127: */ Iterator localIterator2;\r\n/* 128:217 */ for (Iterator localIterator1 = this.map.keySet().iterator(); localIterator1.hasNext(); localIterator2.hasNext())\r\n/* 129: */ {\r\n/* 130:217 */ N n = (Object)localIterator1.next();\r\n/* 131:218 */ localIterator2 = ((Map)this.map.get(n)).keySet().iterator(); continue;N suc = (Object)localIterator2.next();\r\n/* 132:219 */ if (!((Map)this.map.get(suc)).containsKey(n)) {\r\n/* 133:220 */ return false;\r\n/* 134: */ }\r\n/* 135:223 */ if (!((Map)this.map.get(n)).get(suc).equals(((Map)this.map.get(suc)).get(n))) {\r\n/* 136:224 */ return false;\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139:230 */ return true;\r\n/* 140: */ }", "Object visitMapOfValues(MapOfValuesNode node, Object state);", "@org.junit.Test\n public void mapGet901() {\n final XQuery query = new XQuery(\n \"map:contains(map{1:=\\\"Sunday\\\",2:=\\\"Monday\\\",3:=\\\"Tuesday\\\",number('NaN'):=\\\"Wednesday\\\",5:=\\\"Thursday\\\",6:=\\\"Friday\\\",7:=\\\"Saturday\\\"}, (1 to 5)[10])\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n error(\"XPTY0004\")\n );\n }", "Value replaceValue(Entry<Key, Value> entry, Value value);", "private static void mapCheck(){\n\t\tfor(int x = 0; x < Params.world_width; x = x + 1){\n\t\t\tfor(int y = 0; y < Params.world_height; y = y + 1){\n\t\t\t\tif(map[x][y] > 1){\n\t\t\t\t\t//System.out.println(\"Encounter Missing. Position: (\" + x + \",\" + y + \").\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public T1 caseTableMapping(TableMapping object) {\n\t\treturn null;\n\t}", "private static void mapReplace(@Nonnull final StringBuilder sb, @Nonnull final LinkedHashMap<String, String> map,\r\n final FormatFunction f) {\r\n int indexOf = 0;\r\n for (final Entry<String, String> entry : map.entrySet()) {\r\n final String key = entry.getKey();\r\n final String value = f.format(entry.getValue());\r\n while ((indexOf = sb.indexOf(key, indexOf)) > -1) {\r\n sb.replace(indexOf, indexOf + key.length(), value);\r\n indexOf += value.length();\r\n }\r\n }\r\n }", "public static <T> void indexedMap(T[][] matrix, TriFunction<T, Integer, Integer, T> mapFunction){\n for (int i = 0; i != matrix.length; ++i) {\n for (int j = 0; j != matrix[0].length; ++i) {\n T value = matrix[i][j];\n matrix[i][j] = mapFunction.apply(value, i, j);\n }\n }\n }", "boolean hasSimpleMap();", "private static void replacenullwithdefaultvalue(Map<Integer, Integer> map1, int defaultValue) {\n\t\t Map<Object, Object> map = map1.entrySet() \n .stream() \n .map(entry -> { \n if (entry.getValue() == null) \n entry.setValue(defaultValue); \n return entry; \n }) \n .collect(Collectors.toMap(Map.Entry::getKey, \n Map.Entry::getValue)); \n \n\t\tSystem.out.println(map);\n\t}", "@Override\n\tpublic Map<String, Object> updateMatWarnType(Map<String, Object> mapVo)\n\t\t\tthrows DataAccessException {\n\t\tMap<String, Object> retMap = new HashMap<String, Object>();\n\t\ttry {\n\t\t\tmapVo.put(\"group_id\", SessionManager.getGroupId());\n\t\t\tmapVo.put(\"hos_id\", SessionManager.getHosId());\n\t\t\tmapVo.put(\"copy_code\", SessionManager.getCopyCode());\n\t\t\t\n\t\t\tif(!mapVo.get(\"old_code\").equals(mapVo.get(\"warn_type_code\"))){\n\t\t\t\tMap<String, Object> codeMap = new HashMap<String, Object>();\n\t\t\t\tcodeMap.put(\"group_id\", SessionManager.getGroupId());\n\t\t\t\tcodeMap.put(\"hos_id\", SessionManager.getHosId());\n\t\t\t\tcodeMap.put(\"copy_code\", SessionManager.getCopyCode());\n\t\t\t\tcodeMap.put(\"warn_type_code\", mapVo.get(\"warn_type_code\"));\n\t\t\t\t\n\t\t\t\tMap<String, Object> matWarnTypeCodeMap = matWarnTypeMapper.queryMatWarnTypeByCode(codeMap);\n\t\t\t\t\n\t\t\t\tif(matWarnTypeCodeMap != null){\n\t\t\t\t\tretMap.put(\"state\", \"false\");\n\t\t\t\t\tretMap.put(\"warn\", \"预警类型编码已存在!\");\n\t\t\t\t\treturn retMap;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMap<String, Object> nameMap = new HashMap<String, Object>();\n\t\t\t\tnameMap.put(\"group_id\", SessionManager.getGroupId());\n\t\t\t\tnameMap.put(\"hos_id\", SessionManager.getHosId());\n\t\t\t\tnameMap.put(\"copy_code\", SessionManager.getCopyCode());\n\t\t\t\tnameMap.put(\"warn_type_code\", mapVo.get(\"warn_type_code\"));\n\t\t\t\t\n\t\t\t\tMap<String, Object> matWarnTypeNameMap = matWarnTypeMapper.queryMatWarnTypeByCode(nameMap);\n\t\t\t\t\n\t\t\t\tif(matWarnTypeNameMap != null){\n\t\t\t\t\tretMap.put(\"state\", \"false\");\n\t\t\t\t\tretMap.put(\"warn\", \"预警类型名称已存在!\");\n\t\t\t\t\treturn retMap;\n\t\t\t\t}\n\t\t\t}\n \t\n \tmatWarnTypeMapper.updateMatWarnType(mapVo);\n\t\t\n\t\t\tretMap.put(\"state\", \"true\");\n\t\t\tretMap.put(\"msg\", \"操作成功!\");\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\tthrow new SysException(e.getMessage());\n\t\t}\n\t\treturn retMap;\n\t}", "public void verifyMap() {\r\n // TODO: implement test to ensure that map is the same as confirmed if\r\n // its values were converted into collections.\r\n }", "private void addSubstitution(Map<String, String> substitutionMap, String find, String replace)\n {\n if (find != null && replace != null)\n {\n substitutionMap.put(find.toUpperCase(), replace);\n } \n }", "@Transactional\r\n\t@Override\r\n\tpublic long updateCodeUseyn(Map<String, String[]> map) throws SQLException {\n\t\t\r\n\t\tQCode code = QCode.code;\r\n\t\t\r\n\t\tJPAUpdateClause updateClause = new JPAUpdateClause(entityManager, code);\r\n\t\tString type = map.get(\"gbn\")[0];\r\n\r\n\t\tlong reuslt = 0;\r\n\t\tif(type.equals(\"upr\")) {\r\n\t\t\treuslt = updateClause.set(code.useyn, Integer.parseInt(map.get(\"useyn\")[0]))\r\n\t\t\t\t\t\t\t\t .where(code.upr_cd.eq(\"*\").and(code.cd.eq(map.get(\"cd\")[0])))\r\n\t\t\t\t\t\t\t\t .execute(); \r\n\t\t} else {\r\n\t\t\treuslt = updateClause.set(code.useyn, Integer.parseInt(map.get(\"useyn\")[0]))\r\n\t\t\t\t\t\t\t\t .where(code.upr_cd.eq(map.get(\"upr_cd\")[0]).and(code.cd.eq(map.get(\"cd\")[0])))\r\n\t\t\t\t\t\t\t\t .execute();\r\n\t\t}\r\n\t\t\r\n\t\treturn reuslt;\r\n\t}", "public static boolean checkInputTextMap(int index, int gridPaneSize, Map<Integer, Boolean> map){\n for (int i = index; i <gridPaneSize ; i = i+3) {\n if (!map.get(i))\n return false;\n }\n return true;\n }", "public abstract void removeFromMap();", "int insertMapSelective(Map<String, Object> record);", "String getMapCode();", "public void adjustMap(MapData mapd){\n int[][] map = mapd.getMap();\n int mx=mapd.getX();\n int my=mapd.getY();\n for(int y=0;y<my;y++){\n for(int x=0;x<mx;x++){\n boolean l = false;\n boolean r = false;\n boolean t = false;\n boolean b = false;\n boolean tl = false;\n boolean tr = false;\n boolean bl = false;\n boolean br = false;\n \n\n if(map[x][y]>0 && map[x][y]<26) {\n int mustSet = 0;\n //LEFT\n if (x > 0 && map[x - 1][y] > 0 && map[x-1][y]<26) {\n l = true;\n }\n //RIGHT\n if (x < mx - 1 && map[x + 1][y] > 0 && map[x+1][y]<26) {\n r = true;\n }\n //TOP\n if (y > 0 && map[x][y - 1] > 0 && map[x][y-1]<26) {\n t = true;\n }\n //Bottom\n if (y < my - 1 && map[x][y + 1] > 0 && map[x][y+1]<26) {\n b = true;\n }\n //TOP LEFT\n if (x > 0 && y > 0 && map[x - 1][y - 1] > 0 && map[x-1][y-1]<26) {\n tl = true;\n }\n //TOP RIGHT\n if (x < mx - 1 && y > 0 && map[x + 1][y - 1] > 0 && map[x+1][y-1]<26) {\n tr = true;\n }\n //Bottom LEFT\n if (x > 0 && y < my - 1 && map[x - 1][y + 1] > 0 && map[x-1][y+1]<26) {\n bl = true;\n }\n //Bottom RIGHT\n if (x < mx - 1 && y < my - 1 && map[x + 1][y + 1] > 0 && map[x+1][y+1]<26) {\n br = true;\n }\n\n //Decide Image to View\n if (!r && !l && !t && !b) {\n mustSet = 23;\n }\n if (r && !l && !t && !b) {\n mustSet = 22;\n }\n if (!r && l && !t && !b) {\n mustSet = 25;\n }\n if (!r && !l && t && !b) {\n mustSet = 21;\n }\n if (!r && !l && !t && b) {\n mustSet = 19;\n }\n if (r && l && !t && !b) {\n mustSet = 24;\n }\n if (!r && !l && t && b) {\n mustSet = 20;\n }\n if (r && !l && t && !b && !tr) {\n mustSet = 11;\n }\n if (r && !l && t && !b && tr) {\n mustSet = 2;\n }\n if (!r && l && t && !b && !tl) {\n mustSet = 12;\n }\n if (!r && l && t && !b && tl) {\n mustSet = 3;\n }\n if (r && !l && !t && b && br) {\n mustSet = 1;\n }\n if (r && !l && !t && b && !br) {\n mustSet = 10;\n }\n if (!r && l && !t && b && bl) {\n mustSet = 4;\n }\n if (r && !l && t && b && !tr) {\n mustSet = 15;\n }\n if (r && !l && t && b && tr) {\n mustSet = 6;\n }\n if (!r && l && t && b && !tl) {\n mustSet = 17;\n }\n if (!r && l && t && b && tl) {\n mustSet = 8;\n }\n if (r && l && !t && b && !br) {\n mustSet = 14;\n }\n if (r && l && !t && b && br) {\n mustSet = 5;\n }\n if (r && l && t && !b && !tr) {\n mustSet = 16;\n }\n if (r && l && t && !b && tr) {\n mustSet = 7;\n }\n if (!r && l && !t && b && !bl) {\n mustSet = 13;\n }\n if (r && l && t && b && br && tl) {\n mustSet = 9;\n }\n if (r && l && t && b && !br && !tl) {\n mustSet = 18;\n }\n\n //System.out.println(\"MAP SEGMENT : \" + mustSet);\n map[x][y] = mustSet;\n }\n mapd.setMap(map);\n }\n }\n System.out.println(\"Map Adjust OK !\");\n }", "public Hashtable getRemappedValues() throws Exception;", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "void mapChosen(int map);", "public boolean doesMapExist(String sourceItem, String targetItem,\n\t\t\tint sourceCol, int targetCol);", "public void testMapGet() {\r\n }", "public static void mapHashMap(Map<Integer, String> mapHashMap) {\n System.out.println(\"----------------------------- HashMap ----------------------------\");\n System.out.println(\"\\\"HashMap\\\" is unordered!\");\n mapHashMap.put(7, \"Cristiano Ronaldo\");\n mapHashMap.put(10, \"Leo Messi\");\n mapHashMap.put(8, \"Avi Nimni\");\n mapHashMap.put(24, \"Kobi Brian\");\n PrintUtils.printMap(mapHashMap);\n System.out.println();\n // STEP 2 - set p3 name to \"Moshe\"\n System.out.println(\"Set the name of player number 8 to be \\\"Moshe\\\":\");\n mapHashMap.replace(8, \"Avi Nimni\", \"Moshe\");\n // if you use \"put\" instead of \"replace\" it will work to!\n PrintUtils.printMap(mapHashMap);\n System.out.println();\n // STEP 3 - add p5 to the end of the list using using ADD method\n System.out.println(\"Add p5 to the end of the list using ADD method:\");\n System.out.println(\"Not an option!\");\n System.out.println();\n // STEP 4 - add p6 to position 3 the end of the list using ADD method\n System.out.println(\"Add p6 to position 3 the end of the list using ADD method:\");\n System.out.println(\"Not an option, you can wright over it!\");\n System.out.println();\n // STEP 5 - remove p2 from the list\n System.out.println(\"Remove p2 from the list and printing the list using a static method in a utility class:\");\n mapHashMap.remove(10, \"Leo Messi\");\n PrintUtils.printMap(mapHashMap);\n System.out.println();\n }", "protected int handleUpdate(Msg msg, DecodeIterator dIter, Map map,\n MapEntry mapEntry, Buffer mapKey)\n {\n System.out.println(symbolListName +\n \"\\nDOMAIN: \" + DomainTypes.toString(msg.domainType()));\n\n int ret = map.decode(dIter);\n if (ret != CodecReturnCodes.SUCCESS)\n {\n System.out.println(\"DecodeMap() failed: < \" + CodecReturnCodes.toString(ret) + \">\");\n return ret;\n }\n\n // decode the map\n while ((ret = mapEntry.decode(dIter, mapKey)) != CodecReturnCodes.END_OF_CONTAINER)\n {\n if (ret != CodecReturnCodes.SUCCESS)\n {\n System.out.println(\"DecodeMapEntry() failed: < \" + CodecReturnCodes.toString(ret) + \">\");\n return ret;\n }\n System.out.println(mapKey.toString() + \"\\t\" +\n mapEntryActionToString(mapEntry.action()));\n }\n\n return CodecReturnCodes.SUCCESS;\n }", "public void replaceValueInEntry(int i, @NullableDecl V v, boolean z) {\n Preconditions.checkArgument(i != -1);\n int smearedHash = Hashing.smearedHash(v);\n int findEntryByValue = findEntryByValue(v, smearedHash);\n if (findEntryByValue != -1) {\n if (z) {\n removeEntryValueHashKnown(findEntryByValue, smearedHash);\n if (i == this.size) {\n i = findEntryByValue;\n }\n } else {\n throw new IllegalArgumentException(\"Value already present in map: \" + v);\n }\n }\n deleteFromTableVToK(i, Hashing.smearedHash(this.values[i]));\n this.values[i] = v;\n insertIntoTableVToK(i, smearedHash);\n }", "<V1> KTable<K, V1> mapValues(ValueMapper<V, V1> mapper);", "@Override\r\n public ParaMap index(ParaMap inMap) throws Exception {\n return null;\r\n }", "private void mapID(final int column, final IdMapper id_mapper) {\n\t\t\n\t\t/*\n\t\t * To keep the original values of the preview table.\n\t\t */\n\t\tif (orig_values_list == null ) {\n\t\t\tprepareOrginalValiesTable();\n\t\t}\n\t\t\n\t\t/*\n\t\t * Getting source and target for id type. \n\t\t * Source and target species are the same (for now).\n\t\t * \n\t\t */\n\t\tfinal String target_type = (String) getIdmapTarget();\n\t\tfinal String source_type = (String) getIdmapSource();\n\t\tfinal String species = (String) getIdmapSpecies();\n\t\t\n\t\t/*\n\t\t * Name for the new column\n\t\t * TODO should give user ability to make own name, via UI.\n\t\t */\n\t\tfinal String new_name = target_type + \"->\" + source_type;\n\n\t\t/*\n\t\t * This performs the actual mapping.\n\t\t * Mapping results are stored in map \"res\".\n\t\t */\n final Map<String, IdMapping> res = id_mapper.map(\n\t\t\t\torig_values_list.get(column), source_type, target_type,\n\t\t\t\tspecies, species);\n\n if (DEBUG) {\n\t\t for (int row = 0; row < previewTable.getRowCount(); ++row) {\n\t\t\t System.out.print(row + \" :\");\n\t\t\t System.out.println((String) previewTable.getValueAt(row, column));\n\t\t }\n }\n\n /*\n * This parses the id mapping result\n */\n\t\tif (res != null && !res.isEmpty()) {\n\t\t\tfinal int orig_row_count = previewTable.getRowCount();\n\n\t\t\tfinal String[] new_column = new String[orig_row_count ];\n\t\t\tfor (int row = 0; row < orig_row_count; ++row) {\n\t\t\t\t\n\t\t\t\tfinal String source_id = orig_values_list.get(column).get(row);\n\t\t\t\tfinal IdMapping id_mapping = res.get(source_id);\n\t\t\t\tif (id_mapping != null) {\n\t\t\t\t\tif (id_mapping.getTargetIds() != null && !id_mapping.getTargetIds().isEmpty()) {\n\t\t\t\t\t\tfinal StringBuilder ids_str= new StringBuilder();\n\t\t\t\t\t\tfinal Set<String> target_ids = id_mapping.getTargetIds();\n\t\t\t\t\t\tfor (final String target_id : target_ids) {\n\t\t\t\t\t\t\tids_str.append( target_id);\n\t\t\t\t\t\t\tids_str.append( \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew_column[row] = ids_str.toString();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tnew_column[row] = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnew_column[row] = \"\";\n\t\t\t\t}\n\t\t\t\tif ( DEBUG) {\n System.out.println(source_id + \"->\" + new_column[row]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t\t/*\n\t\t\t * From here, the problems start.\n\t\t\t * It does NOT properly add a new table column...\n\t\t\t * TODO\n\t\t\t * FIXME\n\t\t\t */\n\t\t\tfinal TableColumn new_tablecolumn = new TableColumn();\n\n\t\t\tnew_tablecolumn.setHeaderValue(new_name);\n\t\t\tpreviewTable.addColumn(new_tablecolumn);\n\t\t\t\n\t\t\tfinal PreviewTableModel pt_model = (PreviewTableModel) previewTable\n\t\t\t\t\t.getModel();\n\t\t\t\n\t\t for (int row = 0; row < new_column.length; ++row) {\n pt_model.setValueAt(new_column[row], row, 1);\n \t// col 1 is just used as test!\n }\n\t\t}\n\n\t}", "public void getMap1() throws SQLException {\n\t}", "@Override\n\tpublic int keyUpdate(Map<String, String> map) {\n\t\treturn mapper.keyUpdate(map);\n\t}", "public Mapping setMap(StringDt theValue) {\n\t\tmyMap = theValue;\n\t\treturn this;\n\t}", "public static void demo1() {\n Map<String, String> m = new HashMap<String, String>();\r\n // Key, Value\r\n m.put(\"cn\", \"China\");\r\n m.put(\"th\", \"Thailand\");\r\n m.put(\"jp\", \"Japan\");\r\n\r\n// System.out.println(m.get(\"jp\"));\r\n\r\n for (Map.Entry<String, String> item : m.entrySet()) {\r\n String key = item.getKey();\r\n String value = item.getValue();\r\n System.out.printf(\"%s => %s\\n\", key, value);\r\n }\r\n\r\n System.out.println(\"----------------------\");\r\n m.put(\"th\", \"Siam\");\r\n\r\n for (Map.Entry<String, String> item : m.entrySet()) {\r\n String key = item.getKey();\r\n String value = item.getValue();\r\n System.out.printf(\"%s => %s\\n\", key, value);\r\n }\r\n\r\n if (m.containsValue(\"Japan\")) {\r\n System.out.println(\"found Japan\");\r\n }\r\n\r\n if (m.containsKey(\"cn\")) {\r\n System.out.println(\"found key cn\");\r\n m.remove(\"cn\");\r\n System.out.println(\"----------------remove cn-------------\");\r\n for (Map.Entry<String, String> item : m.entrySet()) {\r\n String key = item.getKey();\r\n String value = item.getValue();\r\n System.out.printf(\"%s => %s\\n\", key, value);\r\n }\r\n }\r\n\r\n }", "public static void test2(Map<Object,Object> map) \n\t{\n\t\tprint(map.getClass().getSimpleName()+\"~~~~~~~~~~~~\");\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Map has 'Set' behavior for keys:\n\t\tmap.putAll(new CountingMapData(25));\n\t\tprintKeys2(map);\n\t\t// Producing a collection of the values:\n\t\tprintnb(\"Values: \");\n\t\tprint(map.values());\n\t\tprint(map);\n\t\tprint(\"map.containsKey(11): \" + map.containsKey(11));\n\t\tprint(\"map.get(11): \" + map.get(11));\n\t\tprint(\"map.containsValue(\\\"F0\\\"): \" + map.containsValue(\"F0\"));\n\t\tObject key = map.keySet().iterator().next();\n\t\tprint(\"First key in map: \" + key);\n\t\tmap.remove(key);\n\t\tprintKeys2(map);\n\t\tmap.clear();\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Operations on the Set change the Map:\n\t\tmap.keySet().removeAll(map.keySet());\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t}", "public void changeMap(int x, int y, TipoCelda t) throws Exception {\n\t\tthis.itfPlanificadorMRS.changeMap(x,y,t);\n\t}", "@Test\n public void testPut_Existing() {\n map.put(\"Hello\", \"Old World\");\n configureAnswer();\n\n testObject.put(\"Hello\", \"World\");\n\n verify(helper).fireReplace(entry(\"Hello\", \"Old World\"), entry(\"Hello\", \"World\"));\n\n verifyNoMoreInteractions(helper);\n }", "public int askMap();", "@org.junit.Test\n public void mapGet007() {\n final XQuery query = new XQuery(\n \"map:get(map:entry(xs:untypedAtomic(\\\"foo\\\"), \\\"bar\\\"), \\\"foo\\\")\",\n ctx);\n\n final QT3Result res = result(query);\n result = res;\n test(\n assertStringValue(false, \"bar\")\n );\n }", "public void replaceThesarusWordwithGoogleWord ( ) {\r\n\t \t\t \t\r\n\t \tfor (Map.Entry<String, List<String>> entry : GoogleToThesarus.entrySet()) {\r\n\t String key = entry.getKey();\r\n\t List<String> values = entry.getValue();\r\n\t //String wordIsReplaced=null;\r\n\t \r\n\t for (String temp: values) {\r\n\t \t//why is this null\r\n\t \t\r\n\t \tif (splitto.equals(temp)) {\r\n\t \t\tsplitto=key;\r\n\t \t\tif(!replacedWordList.contains(splitto))\r\n\t \t\t\treplacedWordList.add(splitto);\r\n \t\t\r\n\t \t \t\t \t\t}\r\n\t \telse {\r\n\t \t\t//wordIsReplaced=splitto;\r\n\t \t\t//System.out.println(\"failed\");\r\n\t \t}\r\n\t \t\t }\r\n\t \t}\r\n\t }", "private void mapValues() {\n\t\tmap.put(1, \"I\");\r\n\t\tmap.put(5, \"V\");\r\n\t\tmap.put(10, \"X\");\r\n\t\tmap.put(50, \"L\");\r\n\t\tmap.put(100, \"C\");\r\n\t\tmap.put(500, \"D\");\r\n\t\tmap.put(1000, \"M\");\r\n\t}", "@Override\r\n public void EditMap() throws Exception {\r\n printInvalidCommandMessage();\r\n }", "private void fillMap(Grid tablero) { // reads the board and fill auxiliary map\n for (int i = 0; i < 10; i++) {\n for (int j = 0; j < 10; j++) {\n if (tablero.getCell(i, j) == 0) {\n Cell c = new Cell(i, j);\n ArrayList<Integer> elements = fillDomain();\n map.put(c, elements);\n } else {\n Cell c = new Cell(i, j);\n ArrayList<Integer> elements = new ArrayList<>();\n elements.add(tablero.getCell(i, j));\n map.put(c, elements);\n }\n }\n }\n }", "public static Boolean updateSingleEntry(Integer numberRolled){\n if (resultsMap.containsKey(numberRolled)) { //checking if thr Map contains the number rolled as a key i.e. a key\n // for a D6 would have numbers 1 through 6 as keys - if true cont. if false, return false\n Integer oldValue = resultsMap.get(numberRolled); //using the numberRolled as the key return the value\n Integer newValue = oldValue + 1; //add 1 to the value\n resultsMap.replace(numberRolled, oldValue, newValue); //replace old value with new value\n return resultsMap.get(numberRolled).equals(newValue); //confirm that the new value is in place/\n }\n return false;\n }", "@Test\n public void testPutAll_Existing() {\n Map<String, String> toAdd = fillMap(1, 10, \"\", \"Old \");\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10, \"\", \"New \");\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n for (String k : toAdd.keySet()) {\n String old = toAdd.get(k);\n String upd = toUpdate.get(k);\n\n verify(helper).fireReplace(entry(k, old), entry(k, upd));\n }\n verifyNoMoreInteractions(helper);\n }", "private void visitor(Map map, int row, int column) throws NotValidCellException {\n try {\n // controllo le diagonali non visitati rispetto alla mia posizione attuale\n if(!map.isEmptyCell(row, column)) { //se la cella non è vuota,\n if (row < 1 && column < 1 ) { // controlla alto sinistra della mappa\n downrightcontrol(map, row, column); //controlla basso destra rispetto alla mia posizione attuale\n } else if (row > map.numRow() - 2 && column < 1 ) { //controlla basso sinistra sulla mappa\n uprightcontrol(map, row, column); //controlla alto destra rispetto alla mia posizione attuale\n } else if (row > 0 && row <= map.numRow() - 2 && column < 1) { //controlla centrale sinistra della mappa\n uprightcontrol(map, row, column);\n downrightcontrol(map, row, column);\n } else if (row < 1 && column > map.numColumn() - 2) { //controlla alto destra della mappa\n downleftcontrol(map, row, column); //controlla basso sinistra rispetto alla mia posizione attuale\n } else if (row > map.numRow() - 2 && column > map.numColumn() - 2) { //controlla basso destra della mappa\n upleftcontrol(map, row, column); //controlla alto sinistra rispetto alla mia posizione attuale\n } else if (row > 0 && row <= map.numRow() - 2 && column > map.numColumn() - 2) { //controlla centrale destra della mappa\n upleftcontrol(map, row, column);\n downleftcontrol(map, row, column);\n } else if (row < 1 && column > 0 && column <= map.numColumn() - 2) { //controlla alto centro della mappa\n downleftcontrol(map, row, column);\n downrightcontrol(map, row, column);\n } else if (row > map.numRow() - 2 && column > 0 && column <= map.numColumn() - 2) { //controlla basso centrale della mappa\n upleftcontrol(map, row, column);\n uprightcontrol(map, row, column);\n } else if (row > 0 && row < map.numRow() - 1 && column > 0 && column < map.numColumn() - 1) { //controlla centro mappa\n upleftcontrol(map, row, column);\n uprightcontrol(map, row, column);\n downleftcontrol(map, row, column);\n downrightcontrol(map, row, column);\n }\n }\n } catch (NotValidCellException e) {\n LOGGER.log(Level.SEVERE, e.toString()+\"\\nvisitor method in class ColorDiagonalStrategy\", e);\n throw new NotValidCellException();\n }\n }", "@Before\r\n public void test_change(){\r\n HashTable<String,String> table = new HashTable<>(1);\r\n MySet<String> s = (MySet<String>) table.keySet();\r\n table.put(\"AA\",\"BB\");\r\n table.put(\"AA\",\"CC\");\r\n assertTrue(s.contains(\"AA\"));\r\n table.remove(\"AA\");\r\n assertFalse(s.contains(\"AA\"));\r\n }", "private void uprightcontrol(Map map, int row, int column) throws NotValidCellException {\n try {\n //se i dadi sono di colore uguale salva i dadi che non sono già salvati nell'arraylist\n if (map.getCell(row, column).getDice().getColor().equalsColor(map.getCell(row - 1, column + 1).getDice().getColor())) {\n if(!temp.contains(map.getCell(row, column).getDice()))\n temp.add(map.getCell(row, column).getDice());\n if(!temp.contains(map.getCell(row - 1, column + 1).getDice())) {\n temp.add(map.getCell(row - 1, column + 1).getDice());\n visitor(map, row - 1, column + 1);\n }\n }\n } catch (NullPointerException e) {\n // va bene così\n }\n }", "private Object[] lookupValues(RowMetaInterface rowMeta, Object[] row) throws KettleException\n\t{\n\t\tif (isStopped()) return null;\n\t\t\n\t\tif ( data.lookupColumnIndex == null ) \n\t\t{\n\t\t\tString names[] = data.lookupMeta.getFieldNames();\n\t\t\tdata.lookupColumnIndex = new int[names.length];\n\t\t\t\n\t\t\tfor( int i=0; i<names.length; i++ ) \n\t\t\t{\n\t\t\t\tdata.lookupColumnIndex[i] = rowMeta.indexOfValue(names[i]);\n\t\t\t\tif ( data.lookupColumnIndex[i] < 0 ) \n\t\t\t\t{\n\t\t\t\t\t// we should not get here\n\t\t\t\t\tthrow new KettleStepException( \"The lookup column '\"+names[i]+\"' could not be found\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Copy value references to lookup table.\n\t\t//\n Object[] lu = new Object[data.keynrs.length];\n for (int i=0;i<data.keynrs.length;i++) {\n \t// If the input is binary storage data, we convert it to normal storage.\n \t//\n \tif (data.convertKeysToNative[i]) {\n \t\tlu[i] = data.lookupMeta.getValueMeta(i).convertBinaryStringToNativeType((byte[])row[data.keynrs[i]]);\n \t} else {\n \t\tlu[i] = row[data.keynrs[i]];\n \t}\n }\n\n // Handle conflicting types (Number-Integer-String conversion to lookup type in hashtable)\n if (data.keyTypes!=null)\n {\n for (int i=0;i<data.lookupMeta.size();i++)\n {\n ValueMetaInterface inputValue = data.lookupMeta.getValueMeta(i);\n ValueMetaInterface lookupValue = data.keyTypes.getValueMeta(i);\n if (inputValue.getType()!=lookupValue.getType())\n {\n try\n {\n \t// Change the input value to match the lookup value\n \t//\n lu[i] = lookupValue.convertDataCompatible(inputValue, lu[i]);\n }\n catch (KettleValueException e)\n {\n throw new KettleStepException(\"Error converting data while looking up value\", e);\n }\n }\n }\n }\n \n Object[] add = null;\n \n\t\tif (data.hasLookupRows) \n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (meta.getKeystream().length>0)\n\t\t\t\t{\n\t\t\t\t\tadd=getFromCache(data.keyTypes, lu);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Just take the first element in the hashtable...\n\t\t\t\t\tthrow new KettleStepException(BaseMessages.getString(PKG, \"StreamLookup.Log.GotRowWithoutKeys\")); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tthrow new KettleStepException(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (add==null) // nothing was found, unknown code: add the specified default value...\n\t\t{\n\t\t\tadd=data.nullIf;\n\t\t} \n\t\t\n return RowDataUtil.addRowData(row, rowMeta.size(), add);\n\t}", "@Override\n\tpublic int boardModify(Map param) {\n\t\treturn dao.boardModify(session, param);\n\t}", "private void updateMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (newMap[i][j] instanceof Player) {\n\t\t\t\t\tmap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof BlankSpace) {\n\t\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Fence) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "private static void testMap(final OurMap<Integer, String> map) {\n System.out.printf(\"%n%s%n\", map.getClass());\n assert map.size() == 0;\n assert !map.containsKey(117);\n assert !map.containsKey(-2);\n assert map.get(117) == null;\n assert map.put(117, \"A\") == null;\n assert map.containsKey(117);\n assert map.get(117).equals(\"A\");\n assert map.put(17, \"B\") == null;\n assert map.size() == 2;\n assert map.containsKey(17);\n assert map.get(117).equals(\"A\");\n assert map.get(17).equals(\"B\");\n assert map.put(117, \"C\").equals(\"A\");\n assert map.containsKey(117);\n assert map.get(117).equals(\"C\");\n assert map.size() == 2;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n assert map.remove(117).equals(\"C\");\n assert !map.containsKey(117);\n assert map.get(117) == null;\n assert map.size() == 1;\n assert map.putIfAbsent(17, \"D\").equals(\"B\");\n assert map.get(17).equals(\"B\");\n assert map.size() == 1;\n assert map.containsKey(17);\n assert map.putIfAbsent(217, \"E\") == null;\n assert map.get(217).equals(\"E\");\n assert map.size() == 2;\n assert map.containsKey(217);\n assert map.putIfAbsent(34, \"F\") == null;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n }", "private static void treeMapMap(Map<Integer, String> treeMapMap) {\n System.out.println(\"----------------------------- TreeMap ----------------------------\");\n System.out.println(\"To work with \\\"TreeMap\\\" we need to add \\\"Equals and HashCode\\\" and \\\"Comparable\\\" to the Person Class!\");\n System.out.println(\"\\\"TreeMap\\\" is ordered by key\");\n treeMapMap.put(7, \"Cristiano Ronaldo\");\n treeMapMap.put(10, \"Leo Messi\");\n treeMapMap.put(8, \"Avi Nimni\");\n treeMapMap.put(24, \"Kobi Brian\");\n PrintUtils.printMap(treeMapMap);\n System.out.println();\n // STEP 2 - set p3 name to \"Moshe\"\n System.out.println(\"Set the name of player number 8 to be \\\"Moshe\\\":\");\n treeMapMap.replace(8, \"Avi Nimni\", \"Moshe\");\n // if you use \"put\" instead of \"replace\" it will work to!\n PrintUtils.printMap(treeMapMap);\n System.out.println();\n // STEP 3 - add p5 to the end of the list using using ADD method\n System.out.println(\"Add p5 to the end of the list using ADD method:\");\n System.out.println(\"Not an option!\");\n System.out.println();\n // STEP 4 - add p6 to position 3 the end of the list using ADD method\n System.out.println(\"Add p6 to position 3 the end of the list using ADD method:\");\n System.out.println(\"Not an option, you can wright over it!\");\n System.out.println();\n // STEP 5 - remove p2 from the list\n System.out.println(\"Remove p2 from the list and printing the list using a static method in a utility class:\");\n treeMapMap.remove(10, \"Leo Messi\");\n PrintUtils.printMap(treeMapMap);\n System.out.println();\n }", "@Override\n\tpublic boolean update(Eleve o) {\n\t\tmap.replace(o.getId(), o);\n\t\treturn true;\n\t}", "public T1 caseStringToTableMappingEntryMap(Map.Entry<String, MappingEntry<Table>> object) {\n\t\treturn null;\n\t}", "public boolean compareXMLMap(Element destinationDataElement, Map<Integer, String> map, List<Check> ck, String messageTitle, String keyName, int keyId)\n\t{\n\t\tboolean result = true;\n\t\ttry{\t\t\t\t\n\t\t\tfor (int j=0; j<ck.size(); j++) \n\t\t\t{\n\t\t\t\tCheck check = ck.get(j);\n\t\t\t\tNode destinationNode = destinationDataElement.selectSingleNode(check.DestinationPath);\n\t\t\t\tString sqlValue = map.get(j+1);\n\t\t\t\tif (destinationNode != null)\n\t\t\t\t{\n\t\t\t\t\tif (!destinationNode.getText().trim().equals(sqlValue)) \n\t\t\t\t\t{\n\t\t\t\t\t\tlogger.error(messageTitle + \"\\t\" + keyName + \":\" + map.get(keyId) + \"\\t\" + check.DestinationPath + \" Actual Value isn't equal with Expected Value: \" + destinationNode.getText().trim() + \",\" + sqlValue);\n\t\t\t\t\t\tresult = false;\n\t\t\t\t\t}\n\t\t\t\t}else if (sqlValue != null )\n\t\t\t\t{\n\t\t\t\t\tif (!sqlValue.trim().equals(\"\")) \n\t\t\t\t\t{\n\t\t\t\t\t\tlogger.error(messageTitle + \"\\t\" + keyName + \":\" + map.get(keyId) + \"\\t\" + \"CUSIP \" + map.get(4) + \"\\t\" + check.DestinationPath + \" Actual Value isn't equal with Expected Value: null, \" + sqlValue);\n\t\t\t\t\t\tresult = false;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (Exception ex) {\t\t\t\n\t\t\tlogger.error(messageTitle + \"\\t\" + \"CUSIP \" + map.get(4) + \"\\t\" + ex.toString());\n\t\t\tresult = false;\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "protected Map<String, String> transformMap(Map<String, String> values, Map<String, String> transformKey) {\n Map<String, String> result = new HashMap<String, String>();\n for (Map.Entry<String, String> entry : values.entrySet()) {\n if (transformKey.get(entry.getKey()) != null) {\n result.put(transformKey.get(entry.getKey()), entry.getValue());\n } else {\n result.put(entry.getKey(), entry.getValue());\n }\n }\n if (result.containsKey(INVALID_COLUMN_NAME)) {\n return null;\n } else {\n return result;\n }\n }", "@Test\n public void mapRemove() {\n check(MAPREM);\n query(MAPSIZE.args(MAPREM.args(MAPENTRY.args(1, 2), 1)), 0);\n }", "@Override\n\tpublic JSONArray updatePinzxx(Map<String, Object> map) {\n\t\tint result = 0;\n\t\ttry{\n\t\t\tresult = pinzDao.updatePinzxx(map);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tJSONArray jsonArray = new JSONArray();\n\t\tjsonArray.add(result);\n\t\treturn jsonArray;\n\t}", "public ProofMapIndexProxy<String, String> testMap() {\n String fullName = namespace + \".test-map\";\n return access.getProofMap(IndexAddress.valueOf(fullName), string(), string());\n }", "private void m15127a(C7218v vVar, Map<String, String> map) {\n String str = vVar.f13994b;\n if (C7269s.m15819a(str)) {\n map.put(\"idfa\", str);\n }\n map.put(\"dnt\", Boolean.toString(vVar.f13993a));\n }", "private void m12809b(Map<String, String> map) {\n C1372c b = this.f10119f.m12638b();\n C1371a b2 = b.m4790b();\n map.put(\"vwa\", String.valueOf(b2.m4783c()));\n map.put(\"vwm\", String.valueOf(b2.m4782b()));\n map.put(\"vwmax\", String.valueOf(b2.m4784d()));\n map.put(\"vtime_ms\", String.valueOf(b2.m4786f() * 1000.0d));\n map.put(\"mcvt_ms\", String.valueOf(b2.m4787g() * 1000.0d));\n C1371a c = b.m4792c();\n map.put(\"vla\", String.valueOf(c.m4783c()));\n map.put(\"vlm\", String.valueOf(c.m4782b()));\n map.put(\"vlmax\", String.valueOf(c.m4784d()));\n map.put(\"atime_ms\", String.valueOf(c.m4786f() * 1000.0d));\n map.put(\"mcat_ms\", String.valueOf(c.m4787g() * 1000.0d));\n }", "@Override\n protected Map<TableUniqueName, String> tableSubstitution() {\n return ImmutableMap.of();\n }" ]
[ "0.56485206", "0.559386", "0.55594665", "0.5510865", "0.5449205", "0.54372466", "0.54297984", "0.53814435", "0.53127956", "0.52813834", "0.5273172", "0.5253422", "0.522585", "0.5168778", "0.51515317", "0.51439965", "0.5127154", "0.51240426", "0.51125914", "0.5111923", "0.50907993", "0.50806093", "0.50714916", "0.50663334", "0.5064813", "0.50331146", "0.502376", "0.5012346", "0.5009715", "0.49970344", "0.49832678", "0.4959766", "0.49559078", "0.49558732", "0.49496776", "0.4940834", "0.493235", "0.49306577", "0.4926074", "0.49245122", "0.49230155", "0.49219272", "0.49090973", "0.48980433", "0.48977283", "0.48945075", "0.48945075", "0.48945075", "0.48945075", "0.48945075", "0.48945075", "0.48945075", "0.48945075", "0.48945075", "0.48945075", "0.48945075", "0.48945075", "0.48945075", "0.48902246", "0.4887567", "0.48844513", "0.48834556", "0.48708984", "0.48679417", "0.48672333", "0.4864905", "0.4863956", "0.48613375", "0.4859844", "0.48556614", "0.48553628", "0.48475352", "0.4847091", "0.4844455", "0.4838488", "0.48353294", "0.48284182", "0.48255256", "0.4822269", "0.48199767", "0.48141888", "0.48004514", "0.47939816", "0.47932744", "0.47901055", "0.47897696", "0.47890925", "0.47862127", "0.47619468", "0.47605154", "0.47601423", "0.47541076", "0.4752782", "0.4740015", "0.47363076", "0.47344258", "0.4727608", "0.4723585", "0.471612", "0.4714582" ]
0.54612154
4
Check Whether Have Duplicated Solution
public static boolean haveDuplicated(Solution[] Collection, Solution element) { // Go through All the Collection for (Solution item: Collection) { // Prevent NullElementException if (item == null) { return false; } if(item.equals(element)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean unique() {\n\t\tfor (int i = 1; i <= 9; i++) {\n\t\t\tcopy(problem, comp);\n\t\t\tsolve(0, 0, i, comp);\n\t\t\tif (!checkComp()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }", "public boolean checkDuplicates() {\n\t\tboolean[] vals = new boolean[9];\n\t\tfor(int i = 0; i < 3; i++) {\n\t\t\tfor(int k = 0; k < 3; k++) {\n\t\t\t\tint num = this.getCellNum(i, k);\n\t\t\t\tif(num != 0) {\n\t\t\t\t\tif(!vals[num-1]) {\n\t\t\t\t\t\t//The number hasn't already been found\n\t\t\t\t\t\tvals[num-1] = true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//A duplicate number was found\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}", "public boolean allDuplicatesEqual() {\n int[] input = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};\n int dupA = findDuplicatesA(input);\n int dupB = findDuplicatesB(input);\n int dupC = findDuplicatesC(input);\n int dupD = findDuplicatesD(input);\n int dupE = findDuplicatesE(input);\n return dupA == dupB && dupA == dupC && dupA == dupD && dupA == dupE;\n }", "@Test\r\n\tpublic void test1() {\r\n\t\tint[] nums = {1,2,3,1,4};\r\n\t\tAssert.assertEquals(true, containsDuplicate(nums));\r\n\t}", "private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }", "@SuppressWarnings({ \"unchecked\", \"static-access\" })\r\n\tpublic boolean checkArticleIsDuplicated(){\r\n\t\r\n\t\tnum_DupInDBLP = 0;\r\n\t\t\t\t\r\n\t\tCheckExist check = new CheckExist();\r\n\t\t\r\n\t\tnumberArray = (ArrayList<Integer>) check.CheckTitleSignaturePublications(dbsaPublicationCheckList).clone();\r\n\t\tduplicateNumber = numberArray.size();\r\n\t\t\r\n\t\tduplicationArtilce = false;\r\n\t\tif(numberArray.size() > 0){\r\n\t\t\tfor(int i = 0; i < numberArray.size(); i++)\r\n\t\t\t{\t\r\n\t\t\t\tmodel.setValueAt(true, numberArray.get(i), 8);\r\n\t\t\t\tresultsJTable.addRowToPaint(numberArray.get(i), Color.red);\r\n\t\t\t\tduplicationArtilce = true;\r\n\t\t\t\t\r\n\t\t\t\tnum_DupInDBLP ++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgetFetcherInfo();\r\n\t\t//System.out.println(num_DupInDBLP);\r\n\t\tcheckDuplicateJButton.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\t\tDBSAApplication.statisticPanel.updateStatistic(num_Total);\r\n\t\treturn duplicationArtilce;\r\n\t}", "public boolean isXsolution() {\n\t\tfor (int k=1; k<size*size; k++) {\n\t\t\tint count1 = 0;\n\t\t\tint count2 = 0;\n\t\t\tfor (int l=0; l<size*size; l++) {\n\t\t\t\tif (board[l][l]==k) count1++;\n\t\t\t\tif (board[l][size*size-l-1]==k) count2++;\n\t\t\t}\n\t\t\tif (count1!=1 || count2!=1) return false;\n\t\t}\n\t\treturn true;\n\t}", "private static void findDuplicatesBruteForce(int[] arr) {\n\t\t\n\t\tfor(int i = 0; i< arr.length ; i++)\n\t\t{\n\t\t\tfor ( int j = i+1 ; j < arr.length ; j++)\n\t\t\t{\n\t\t\t\tif(arr[i] == arr[j])\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(arr[i] + \" is duplicate by brute force method\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private boolean isSolvable() {\n\t\tshort permutations = 0; // the number of incorrect orderings of tiles\n\t\tshort currentTileViewLocationScore;\n\t\tshort subsequentTileViewLocationScore;\n\n\t\t// Start at the first tile\n\t\tfor (int i = 0; i < tiles.size() - 2; i++) {\n\t\t\tTile tile = tiles.get(i);\n\n\t\t\t// Determine the tile's location value\n\t\t\tcurrentTileViewLocationScore = computeLocationValue(tile\n\t\t\t\t\t.getCorrectLocation());\n\n\t\t\t// Compare the tile's location score to all of the tiles that\n\t\t\t// follow it\n\t\t\tfor (int j = i + 1; j < tiles.size() - 1; j++) {\n\t\t\t\tTile tSub = tiles.get(j);\n\n\t\t\t\tsubsequentTileViewLocationScore = computeLocationValue(tSub\n\t\t\t\t\t\t.getCorrectLocation());\n\n\t\t\t\t// If a tile is found to be out of order, increment the number\n\t\t\t\t// of permutations.\n\t\t\t\tif (currentTileViewLocationScore > subsequentTileViewLocationScore) {\n\t\t\t\t\tpermutations++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// return whether number of permutations is even\n\t\treturn permutations % 2 == 0;\n\t}", "boolean isUnique();", "public void containsDuplicates(String debugString) {\n\t\tfor(int i = 0; i < this.solutionLength; i++) {\n\t\t\tif(this.getSolutionRepresentation().lastIndexOf(this.getSolutionRepresentation().get(i)) != i && this.getSolutionRepresentation().lastIndexOf(this.getSolutionRepresentation().get(i)) != -1) {\n\t\t\t\tSystem.out.println(\"[WARNING] - solution contains duplicates. DS: \" + debugString);\n\t\t\t}\n\t\t}\n\t}", "public void testFindDuplicates() {\r\n System.out.println(\"findDuplicates\");\r\n \r\n List<String> elements = new ArrayList<>();\r\n elements.add(\"foo\");\r\n elements.add(\"bar\");\r\n elements.add(\"abc\");\r\n elements.add(\"foo\");\r\n elements.add(\"cde\");\r\n elements.add(\"cde\");\r\n elements.add(\"efg\");\r\n elements.add(\"cde\");\r\n \r\n Set<String> expResult = new LinkedHashSet<>();\r\n expResult.add(\"foo\");\r\n \r\n LexicalChecker instance = new LexicalChecker();\r\n Set<String> result = instance.findDuplicates(elements);\r\n \r\n assertNotSame(expResult, result);\r\n \r\n expResult.add(\"cde\");\r\n assertEquals(expResult, result);\r\n }", "public boolean checkforDuplicates(Tour tocheck) {\r\n\t\t boolean duplicate=false;\r\n\t\tfor(int t=0; t<tours.length-1;t++) {\r\n\t\t\tif(tocheck.checkforOrderDiffrence(tours[t])==false) {\r\n\t\t\t\tduplicate=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn duplicate;\r\n\t}", "private boolean checkFinalPuzzle() throws Exception {\n for(int i = 0; i < puzzle.getColumns(); ++i) {\n var clues = puzzle.getColumnClue(i);\n var solver_col = searchBoard.getFilledGroups(i, TraversalType.COLUMN);\n if(clues.size() != solver_col.size()) {\n return false;\n }\n for(int j = 0; j < clues.size(); ++j) {\n if(!clues.get(j).equals(solver_col.get(j))) {\n return false;\n }\n }\n }\n for(int i = 0; i < puzzle.getRows(); ++i) {\n var clues = puzzle.getRowClue(i);\n var solver_row = searchBoard.getFilledGroups(i, TraversalType.ROW);\n if(clues.size() != solver_row.size()) {\n return false;\n }\n for(int j = 0; j < clues.size(); ++j) {\n if(!clues.get(j).equals(solver_row.get(j))) {\n return false;\n }\n }\n }\n return true;\n }", "public boolean isUnique();", "boolean isIsUnique();", "public boolean containsDuplicate(int[] nums) {\r\n\t Set<Integer> set = new HashSet<Integer>();\r\n\t for(int i = 0; i < nums.length; i++) {\r\n\t if(set.contains(nums[i]))\r\n\t return true;\r\n\t else\r\n\t set.add(nums[i]);\r\n\t }\r\n\t return false;\r\n\t }", "boolean isKeepSolutions();", "public boolean checkDuplicates() {\n List<Booking> dupbookings = new ArrayList<>();\n try {\n dupbookings = bookingHelper.checkDuplicates(b_facility.getId(), b_evdate, b_startTime, b_endTime);\n } catch (Exception e) {\n //facesMessage(\"No other bookings found for the day and time\");\n }\n return dupbookings.size() > 0;\n }", "public boolean containsDuplicate(int[] nums) {\n if (nums == null || nums.length <= 1) {\n return false;\n }\n TreeSet<Integer> set = new TreeSet<>();\n for (int num : nums) {\n if (set.contains(num)) {\n return true;\n } else {\n set.add(num);\n }\n }\n return false;\n }", "private boolean containsDuplicate(final int[] inputarray){\n Set<Integer> cells = new HashSet<Integer>();\n for (int i : inputarray){\n if (cells.contains(i) || (i < 1 || i > inputarray.length)) return true;\n cells.add(i);\n }\n return false;\n }", "public static boolean hasDups(int[] num) {\n \n //create an int called control\n int control = 1;\n\n //check to see if there are any duplicates in num []\n for (int i = 0; i < num.length; i++) {\n\n for (int j = control; j < num.length; j++) {\n\n if (num[i] == num[j]) {\n return true;\n\n } //end of if statement\n\n } //end of for loop\n\n for (int j = 0; j < i; j++) {\n\n if (num[i] == num[j]) {\n return true;\n\n } //end of if statement\n\n } //end of for loop\n \n control++;\n \n } //end of for loop\n\n return false;\n\n }", "private boolean checkComp() {\n\t\tfor (int i = 0; i < comp.length; i++) {\n\t\t\tfor (int j = 0; j < comp[i].length; j++) {\n\t\t\t\tif (comp[i][j] != answer[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 static void main(String[] args) {\n\t\tint[] a1 = {1,2,3,4,5,6,7,8,9};\n\t\tSystem.out.println(containsDuplicates(a1));\n\t\tint[] a2 = {1,2,3,4,6,6,7,8,9};\n\t\tSystem.out.println(containsDuplicates(a2));\n\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] nums = {2,3,4,5,7,6,0};\r\n\t\t\r\n\t\tSystem.out.println(containsDuplicate(nums));\r\n\r\n\t}", "private boolean checkDuplicate(int id) {\r\n boolean x = false;\r\n for (Registration registration : studentRegList) {\r\n if (id == registration.getCourseId()) {\r\n x = true;\r\n break;\r\n }\r\n x = false;\r\n }\r\n return x;\r\n }", "@Test\r\n public void testCreateTourWithoutDuplicates_MultipleDups() {\r\n Tour tour = new Tour(new int[][]{{1, 1}, {2, 2}, {1, 1}, {3, 3}, {1, 1}, {1, 1}});\r\n Tour result = tour.createTourWithoutDuplicates();\r\n Tour expected = new Tour(new int[][]{{1, 1}, {2, 2}, {3, 3}});\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }", "void checkRepeated() {\r\n Move check = listOfMoves.peek();\r\n if (map.containsKey(check)) {\r\n _repeated = true;\r\n _winner = map.get(check.from()).opponent();\r\n }\r\n _repeated = false;\r\n }", "private static boolean collectionHasRepeat(List<Integer> square) {\n\t\tfor(int index = 1; index <= BOUNDARY; index++) {\n\t\t\tif(Collections.frequency(square, index) > 1) return true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean containsDuplicate(int[] nums) {\n Arrays.sort(nums);\n for (int i=1;i<nums.length;i++) {\n \tif (nums[i]==nums[i-1]) return true;\n }\n return false;\n }", "boolean hasSameAs();", "boolean hasIsEquivalent();", "Boolean same(MultiSet<X> s);", "private boolean containsDuplicate(final int[][] inputarray){\n Set<Integer> cells = new HashSet<Integer>();\n for (int[] i : inputarray){\n for(int values : i){\n if (cells.contains(values) || (values < 1 || values > (inputarray.length*inputarray.length))) return true;\n cells.add(values);\n }\n }\n return false;\n }", "boolean isNewSolution();", "public boolean RepVec(String []a){\n boolean rep=false;\n String aux1=\"\",aux2=\"\";\n for (int i = 0; i < a.length; i++) {\n aux1=a[i];\n for (int j = 0; j < a.length; j++) {\n aux2=a[j];\n if( i!=j ){ \n if(aux1==aux2){\n rep=true;\n return rep;\n } \n } \n }\n }\n return rep;\n \n }", "public static boolean exactlyOneDup(int[] num) {\n\n //create an int called control\n int control = 1;\n \n //create an int called counter\n int counter = 0;\n\n //check to see if there are any duplicates in num []\n for (int i = 0; i < num.length; i++) {\n\n for (int j = control; j < num.length; j++) {\n\n if (num[i] == num[j]) {\n counter += 1;\n\n } //end of if statement\n\n } //end of for loop\n \n control++;\n \n } //end of for loop\n\n if (counter != 1) {\n return false;\n }\n return true;\n \n }", "private void HaveDuplicate() {\n haveDuplicate = false;\n duplicateCounter = 0;\n try {\n query=\"SELECT * FROM category WHERE category_id = '\"+ txtCategoryNo.getText() +\"' OR category_name = '\"+\n txtCategoryName.getText() + \"'\";\n rset = connection.createStatement().executeQuery(query);\n while (rset.next()) {\n haveDuplicate = true;\n duplicateCounter++;\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "public boolean generateSolution() {\n //first clear all filled in fields by user (they could be wrong)\n clearGame();\n\n //use solver\n SudokuSolver solver = new BacktrackSolver();\n return solver.solveSudoku(this);\n }", "public boolean isSolvable() {\n int inversions = 0;\n int zrow = 0;\n int beg;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (tiles[i][j] == 0)\n zrow = i;\n else {\n for (int k = i; k < n; k++) {\n beg = (k == i)? j+1 : 0;\n for (int l = beg; l < n; l++) {\n if (tiles[i][j] != 0 && tiles[k][l] != 0 && tiles[i][j] > tiles[k][l])\n inversions++;\n }\n }\n }\n }\n }\n if (n%2 == 1)\n return (inversions%2 == 0);\n return ((inversions+zrow)%2 == 1);\n }", "public boolean containsDuplicate(int[] nums) {\n if (nums == null || nums.length == 0)\n return false;\n Set<Integer> distinctElems = new HashSet<>();\n for (int val : nums) {\n if (!distinctElems.add(val)) {\n return true;\n }\n }\n return false;\n }", "private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}", "private static int[][] sameSudoku(int[][] sudoku, int[][] solution) {\r\n int[][] result = new int[16][16];\r\n for (int i = 0; i < 16; i++) { //Make a copy of the sudoku problem\r\n for (int j = 0; j < 16; j++) {\r\n result[i][j] = sudoku[i][j];\r\n }\r\n }\r\n //if different values at the same cell then the sudokus are not the same.\r\n boolean same = true;\r\n for (int i = 0; i < 16; i++) {\r\n for (int j = 0; j < 16; j++) {\r\n if (result[i][j] != solution[i][j]) {\r\n same = false;\r\n result[i][j] = -1;\r\n }\r\n }\r\n }\r\n //if the sudokus are the same return null.\r\n if (same) {\r\n return null;\r\n }\r\n return result;\r\n }", "public void containsNoDuplicates() {\n List<Entry<T>> duplicates = Lists.newArrayList();\n for (Multiset.Entry<T> entry : LinkedHashMultiset.create(getSubject()).entrySet()) {\n if (entry.getCount() > 1) {\n duplicates.add(entry);\n }\n }\n if (!duplicates.isEmpty()) {\n failWithRawMessage(\"%s has the following duplicates: <%s>\", getDisplaySubject(), duplicates);\n }\n }", "public static boolean hasDups(int num[]) {\n\n //boolean value to trigger while loop, intially false, set to true when a duplicate is found\n boolean found = false;\n\n //int i initialized to 0\n int i = 0;\n\n/*\n //while loop to search through array \n while (found != true) {\n */\n //for loop to loop through array elements after the first one\n //compares the first array element to each successive one for a duplicate\n\n for (int k = 1; k < num.length - 1; k++) {\n\n if (num[i] == num[k]) { //if statement that checks the adjacent values until the end of the array\n\n found = true; //flag for found to be set to true which will end while loop and return result \n\n } //end if\n\n else if (num[i] != num[k]) { //if statement that checks if te adjacent values are not equal to ensure found is false, and continue while loop\n\n found = false; //flag for found to be set to false which will contineu while loop to search through array\n\n } //end else if \n i++; //increments i so it is 1 less than k to check adjacent values in the array\n } //end for\n\n //} //end while\n return found; //retun value\n }", "private static boolean duplicateSetName(String setName){\n boolean duplicate = false;\n for (Set set : SetManager.getInstance().getSets()) {\n if (set.getName() != null) {\n if (set.getName().equals(setName)) {\n duplicate = true;\n }\n }\n }\n return duplicate;\n }", "private boolean duplicationCheck(String userName) {\n\t\tboolean ret = true;\n\t\tif(obs.isEmpty()) {\n\t\t\tret = true;\n\t\t}\n\t\telse {\n\t\t\tfor(int i=0; i<obs.size(); i++) {\n\t\t\t\tif(obs.get(i).getUserName().compareTo(userName) == 0) {\n\t\t\t\t\tret = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tret = true;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "protected int checkForDuplicateGiftCards(Order order) {\r\n ArrayList paymentGroupClonedList = new ArrayList(order.getPaymentGroups());\r\n Iterator paymentGroupIterator = paymentGroupClonedList.iterator();;\r\n Iterator giftCardIterator = getGiftCardList().iterator();\r\n GiftCard tempGiftCard = null;\r\n String giftCardListCheckString = \"\";\r\n String paymentGroupListCheckString = \"\";\r\n int returnValue = NO_ERRORS;\r\n PaymentGroupImpl paymentGroup;\r\n \r\n while (paymentGroupIterator.hasNext()) {\r\n paymentGroup = (PaymentGroupImpl) paymentGroupIterator.next();\r\n if (paymentGroup instanceof NMCreditCard && ((NMCreditCard) paymentGroup).getCreditCardNumber() != null && ((NMCreditCard) paymentGroup).getCidTransient() != null) {\r\n paymentGroupListCheckString += ((NMCreditCard) paymentGroup).getCreditCardNumber().trim() + ((NMCreditCard) paymentGroup).getCidTransient().trim() + \"~\";\r\n }\r\n }\r\n \r\n while (giftCardIterator.hasNext()) {\r\n tempGiftCard = (GiftCard) giftCardIterator.next();\r\n \r\n if (!tempGiftCard.getIsBlank()) {\r\n if (paymentGroupListCheckString.indexOf(tempGiftCard.getCardNumber() + tempGiftCard.getCid()) != -1) {\r\n tempGiftCard.setIsValid(false);\r\n returnValue = DUPLICATE_CARD;\r\n }\r\n \r\n if (giftCardListCheckString.indexOf(tempGiftCard.getCardNumber() + tempGiftCard.getCid()) != -1) {\r\n tempGiftCard.setIsValid(false);\r\n Iterator giftCardIterator2 = getGiftCardList().iterator(); // another iterator to flag the other card that is a duplicate\r\n GiftCard tempGiftCard2 = null;\r\n while (giftCardIterator2.hasNext()) {\r\n tempGiftCard2 = (GiftCard) giftCardIterator2.next();\r\n if (tempGiftCard2.getCardNumber().trim().equalsIgnoreCase(tempGiftCard.getCardNumber()) && tempGiftCard2.getCid().trim().equalsIgnoreCase(tempGiftCard.getCid())) {\r\n tempGiftCard2.setIsValid(false);\r\n }\r\n }\r\n returnValue = DUPLICATE_CARD;\r\n }\r\n }\r\n giftCardListCheckString += tempGiftCard.getCardNumber() + tempGiftCard.getCid() + \"~\";\r\n }\r\n \r\n return returnValue;\r\n }", "static boolean isduplicate(int pos, int n) {\n for (int k=pos-1;k>=0;k--) { \n if(n==arr[k]){ //Compare already filled array elements\n return false;\n }\n }\n return true;\n }", "public void checkDuplicate (ArrayList studentAnswer, int answer) {\r\n if (!studentAnswer.contains(answer)){\r\n studentAnswer.add(answer);\r\n }\r\n }", "public static void main(String[] args) {\n\t\tint a[] = {4,4,4,5,5,5,6,6,6,9};\n\t\t\n\t\tArrayList<Integer> ab = new ArrayList<Integer>();\n\t\t\n\t\tfor(int i=0; i<a.length; i++)\n\t\t{\n\t\t\tint k =0;\n\t\t\tif(!ab.contains(a[i]))\n\t\t\t{\n\t\t\t\tab.add(a[i]);\n\t\t\t\tk++;\n\t\t\t\tfor(int j=i+1; j<a.length; j++)\n\t\t\t\t{\n\t\t\t\t\tif(a[i]==a[j])\n\t\t\t\t\t{\n\t\t\t\t\t\tk++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(a[i]);\n\t\t\t//System.out.println(k);\n\t\t\tif(k==1)\n\t\t\t\tSystem.out.println(a[i] +\" is unique number \");\n\t\t}\n\t\t\n\t}", "private boolean arePointsRepeated(Point[] points) {\n for (int i = 0; i < points.length; i++) {\r\n for (int j = i + 1; j < points.length; j++) {\r\n if (points[i].compareTo(points[j]) == 0)\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private boolean checkSolveSudoku() {\n\n // Check Rows\n for (int i = 0; i < rows.size(); i++) {\n ArrayList<Cell> row = rows.get(i);\n int[] temp = new int[getSize()];\n\n for (int j = 0; j < row.size(); j++) {\n if (row.get(j).getNumber() == -1)\n return false;\n temp[row.get(j).getNumber() - 1]++;\n }\n\n for (int j : temp)\n if (j == 0)\n return false;\n }\n\n // Check Columns\n for (int i = 0; i < columns.size(); i++) {\n ArrayList<Cell> column = columns.get(i);\n int[] temp = new int[getSize()];\n\n for (int j = 0; j < column.size(); j++)\n temp[column.get(j).getNumber() - 1]++;\n\n for (int j : temp)\n if (j == 0)\n return false;\n }\n\n // Check Boxes\n for (int i = 0; i < boxes.size(); i++) {\n ArrayList<Cell> box = rows.get(i);\n int[] temp = new int[getSize()];\n\n for (int j = 0; j < box.size(); j++)\n temp[box.get(j).getNumber() - 1]++;\n\n for (int j : temp)\n if (j == 0)\n return false;\n }\n\n return true;\n }", "@objid (\"ef9777b4-ed2a-4341-bb22-67675cddb70a\")\n boolean isIsUnique();", "public boolean isDupe(T element);", "private boolean inSameSuit() {\n for (int i = 0; i < cards.length-2; i++) {\n if (cards[i].charAt(1) != cards[i + 1].charAt(1)) {\n return false;\n }\n }\n \n return true;\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tList<Integer> nums = new ArrayList<>();\r\n\t\t\r\n\t\tnums.add(10);nums.add(10);nums.add(10);nums.add(8);\r\n\t\tnums.add(11);nums.add(10);nums.add(10);nums.add(10);\r\n\r\n\t\tSystem.out.println(nums);\r\n\t\t\r\n\t\tList<Integer> unique1 = new ArrayList<>(); \r\n\t\t\r\n\t\t\r\n\t\t // find unique NON DUPLICATE VALUES\r\n\t\tfor(Integer num: nums) {\r\n\t\t\tif(!unique1.contains(num)) { // if unique1 doesn't contains num add it\r\n\t\t\t\tunique1.add(num); //<<<<<======= adding to unique1 num one by one\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(unique1.toString());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t \r\n\t\t\r\n\t\tList<Integer> unique2 = new ArrayList<>();\r\n\t\t\r\n\t\tfor(int i =0; i<nums.size(); i++) { // find unique ( appearence once)\r\n\t\t\tint count=0;\r\n\t\t\t\r\n\t\t\tInteger value = nums.get(i);\r\n\t\t\tfor(int k =0; k<nums.size(); k++) {\r\n\t\t\t\tif(nums.get(k)== value && i != k) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(count == 0) {\r\n\t\t\t\tunique2.add(value);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(unique2);\r\n\t\t\r\n\t}", "public boolean isSolutionExist() {\n // Mengecek apakah sebuah matriks SPL memiliki solusi\n boolean ada_solusi = true;\n\n int i = this.NBrsEff - 1;\n\n while(ada_solusi && i >= 0){\n int j = 0;\n boolean found = false;\n\n while(!found && j <= this.NKolEff) {\n if(this.M[i][j] != 0 && j != this.NKolEff - 1) {\n found = true;\n }\n j += 1;\n }\n\n if(!found) {\n boolean all_zero_brs = false;\n\n for(int k = 0; k < this.NBrsEff; k++){\n if(this.isAllZeroBrs(k)) {\n all_zero_brs = true;\n }\n }\n\n if(!all_zero_brs) {\n ada_solusi = false;\n }\n }\n\n i -= 1;\n }\n\n return ada_solusi;\n }", "public boolean solvable() {\n // TODO: Your code here\n // TODO: NICK\n\n\n int parity = 0;\n int blankRow = 0; // the row with the blank tile\n\n\n for (int i = 0; i < n*n; i++){\n if(tiles[i/n][i%n] == 0){\n blankRow = i/3;\n continue;\n }\n for (int j = i + 1; j < n*n; j++) {\n if (tiles[i/n][i%n] > tiles[j/n][j%n] && tiles[j/n][j%n] != 0) {\n parity++;\n }\n }\n }\n\n\n\n // solvability conditions:\n if (n % 2 == 0) { // even grid\n if (blankRow % 2 == 0) { // blank on odd row; counting from bottom\n return parity % 2 == 0;\n } else { // blank on even row; counting from bottom\n return parity % 2 != 0;\n }\n } else { // odd grid\n return parity % 2 == 0;\n }\n }", "private void findUniqueInBoxes() {\n findUniqueInBox(1,3,1,3);\n findUniqueInBox(1,3,4,6);\n findUniqueInBox(1,3,7,9);\n findUniqueInBox(4,6,1,3);\n findUniqueInBox(4,6,4,6);\n findUniqueInBox(4,6,7,9);\n findUniqueInBox(7,9,1,3);\n findUniqueInBox(7,9,4,6);\n findUniqueInBox(7,9,7,9);\n\n }", "@Test\n public void shouldReturnUniqueCodenames()\n {\n String[] codenames = DatabaseHelper.getRandomCodenames(25);\n boolean noMatches = true;\n\n\n for (int i = 0; i < codenames.length-1; i++)\n {\n for (int j = i+1; j < codenames.length; j++)\n {\n if (codenames[i] == codenames[j])\n {\n noMatches = false;\n // Here to give more detailed feedback in case the test fails.\n System.out.println(\"Match found: \" + codenames[i] + \" \" + codenames[j]);\n }\n }\n }\n\n assert(noMatches);\n }", "public boolean isSolved(){\n\t\t// if any of row, col, and block contains 1,2,...,size*size,\n\t\t// then the sudoku is solved\n\t\tList<Integer> correctArray = new ArrayList<Integer>(size*size);\n\t\tfor (int i = 0; i < size*size; i++){\n\t\t\tcorrectArray.add(i+1);\n\t\t}\n\t\tfor (int n = 0; n < size*size; n++){\n\t\t\tif (!(this.getRowAsList(n).containsAll(correctArray)))\n\t\t\t\treturn false;\n\t\t\tif (!(this.getColAsList(n).containsAll(correctArray)))\n\t\t\t\treturn false;\n\t\t\tif (!(this.getBlockAsList(n).containsAll(correctArray)))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Test\n public void testHasDups() {\n var arg = new String[] {\"a\",\"b\",\"c\"};\n Sequence instance = new Sequence();\n boolean expResult = false;\n boolean result = instance.hasDups(arg);\n assertEquals(expResult, result);\n }", "public boolean hasDuplicates(boolean ignoreWhenIdentical) {\n boolean compareJustClassNames = !ignoreWhenIdentical;\n if (compareJustClassNames) {\n return list.size() > 1;\n }\n\n if (list.size() <= 1) {\n return false;\n }\n\n String previousHash = list.get(0).getHash();\n for (int i = 1; i < list.size(); i++) {\n String currentHash = list.get(i).getHash();\n if (!previousHash.equals(currentHash)) {\n return true;\n }\n }\n\n log.debug(\"ignoring duplicates of class \" + classFilePath + \" since the bytecode matches exactly\");\n\n return false;\n }", "void checkStationUIExists() {\n\n int recordCount = 9999;\n int duplicateCount = 0;\n\n String where = MrnStation.DATE_START + \"=\" +\n Tables.getDateFormat(station.getDateStart()) +\n \" and \" + MrnStation.LATITUDE +\n \" between \" + (station.getLatitude()-areaRangeVal) +\n \" and \" + (station.getLatitude()+areaRangeVal) +\n \" and \" + MrnStation.LONGITUDE +\n \" between \" + (station.getLongitude()-areaRangeVal) +\n \" and \" + (station.getLongitude()+areaRangeVal) ;\n if (dbg) System.out.println(\"<br>checkStationUIExists: where = \" + where);\n //outputDebug(\"checkStationUIExists: where = \" + where);\n\n MrnStation[] stns = new MrnStation().get(where);\n if (dbg) System.out.println(\"<br>checkStationUIExists: stns.length = \" + stns.length);\n //outputDebug(\"checkStationUIExists: number of stations found = \" + stns.length);\n\n String debugMessage = \"\\ncheckStationUIExists: duplicate UI check \\n \" +\n station.getDateStart(\"\").substring(0,10) +\n \", \" + ec.frm(station.getLatitude(),10,5) +\n \", \" + ec.frm(station.getLongitude(),10,5) +\n \", \" + station.getStnnam(\"\") +\n \" (\" + station.getStationId(\"\") + \")\";\n\n if (stns.length == 0) {\n outputDebug(debugMessage + \": duplicate UI not found\");\n } else {\n\n outputDebug(debugMessage);\n\n // check for duplicate station names (stnnam)\n while (recordCount > 0) {\n\n // count station names the same\n recordCount = 0;\n for (int i = 0; i < stns.length; i++) {\n if (stns[i].getStnnam(\"\").equals(station.getStnnam(\"\"))) {\n recordCount++;\n } // if (stns[i].getStnnam(\"\").equals(station.getStnnam(\"\")))\n } // for (int i = 0; i < stns.length; i++)\n\n if (dbg) System.out.println(\"<br>checkStationUIExists: recordCount = \" +\n recordCount + \", stnnam = \" + station.getStnnam(\"\"));\n\n debugMessage = \" \" + station.getStnnam(\"\") +\n \", recordCount (same stnnam) = \" + recordCount;\n\n if (recordCount > 0) {\n duplicateCount++;\n\n station.setStnnam(station.getStnnam(\"\") + duplicateCount);\n\n debugMessage += \" - new stnnam = \" +\n station.getStnnam(\"\");\n //outputDebug(debugMessage);\n if (dbg) System.out.println(\"checkStationUIExists: new stnnam = \" +\n station.getStnnam(\"\"));\n }// if (recordCount > 0)\n\n outputDebug(debugMessage);\n\n } // while (recordCount > 0)\n\n } // if (stns.length == 0)\n\n }", "public static void main(String[] args) {\n\t\tint[] nums = {-1, -1};\r\n\t\tNearbyAlmostDuplicate nad = new NearbyAlmostDuplicate();\r\n\t\tSystem.out.println(nad.containsNearbyAlmostDuplicate(nums, 1, 0));\r\n\t}", "public boolean IsCyclic() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "boolean isUniqueUsingBruteForce(String str) {\n\t\t// If at any time we encounter 2 same\n\t\t// characters, return false\n\t\tfor (int i = 0; i < str.length(); i++)\n\t\t\tfor (int j = i + 1; j < str.length(); j++)\n\t\t\t\tif (str.charAt(i) == str.charAt(j))\n\t\t\t\t\treturn false;\n\t\t// If no duplicate characters encountered,\n\t\t// return true\n\t\treturn true;\n\t}", "private boolean hasUniqueState()\n {\n return (getExternalArcState() == getMiddleArcState() && getExternalArcState() == getInternalArcState() && getExternalArcState() == getCircleState());\n }", "private static boolean isItVisted(Node node) {\n\t\t\n\t\tboolean areNodesEqual = false;\n\t\tfor (Node temp : nodesCovered) {\n\t\t\tif(choice==1){\n\t\t\t\tif (node.count == temp.count) \t\t\t\t{\n\t\t\t\t\tif (areTheyEqual(temp.stateSpace, node.stateSpace)) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t }\n\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tif (node.manhattanDist == temp.manhattanDist) {\n\t\t\t\t\t\tif (areTheyEqual(temp.stateSpace, node.stateSpace)) {\n\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\treturn areNodesEqual;\n\t}", "public static boolean exactlyOneDup(int num[]){\n int count = 0; //set up a varaible to record the number of duplicates\n \n //set up a loop to compare numbers in the array with each other\n for(int i=0;i<num.length;i++){\n int j=i+1;\n while(j<num.length)\n {\n if (num[i]==num[j])\n {\n count++;//when two numbers in the array are same,return true\n }\n \n j++;\n }\n \n }\n //return the results\n if (count==1){\n return true;//if there is only one duplicate return true\n }\n else {\n return false;//else return false\n }\n \n }", "private boolean hasNomeRepetido(String[] listaNomes) {\n for (int i = 0; i < listaNomes.length; i++) {\n for (int j = 0; j < listaNomes.length; j++) {\n if ((i != j) && (listaNomes[i].equals(listaNomes[j]))) {\n return true;\n }\n }\n }\n\n return false;\n }", "public boolean checkDuplicate(ResultSet rsData, ResultSet rsWareHouse) {\n\t\ttry {\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= number_colum; i++) {\n\t\t\t\ttry {\n//\t\t\t\t\tSystem.out.println(rsData.getString(i));\n//\t\t\t\t\tSystem.out.println(rsWareHouse.getObject(i + 1));\n\t\t\t\t\tif (!rsData.getString(i).equals(rsWareHouse.getObject(i + 1).toString())) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t} catch (NullPointerException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count > 2) {\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\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\n\t}", "public void checkSolution() {\r\n\t\tArrayList<Point> current = new ArrayList<>();\r\n\r\n for (JComponent btn : buttons) {\r\n current.add((Point) btn.getClientProperty(\"position\"));\r\n }\r\n\r\n if (compareList(solutions, current)) {\r\n \tJOptionPane.showMessageDialog(jf,\"You win!!!.\");\r\n \tSystem.exit(0);\r\n }\r\n\t}", "private boolean mozeLiSeSpojiti() {\r\n\t\t// provjera po redovima\r\n\t\tfor(int i = 0 ; i < 4 ; i++)\r\n\t\t\tfor(int j = 0 ; j < 3 ; j++)\r\n\t\t\t\tif(tabela[i][j] == tabela[i][j + 1])\r\n\t\t\t\t\treturn true;\r\n\t\t// provjera po kolonama\r\n\t\tfor(int j = 0 ; j < 4 ; j++)\r\n\t\t\tfor(int i = 0 ; i < 3 ; i++)\r\n\t\t\t\tif(tabela[i][j] == tabela[i + 1][j])\r\n\t\t\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public boolean isADuplicate(){\n\t\treturn testBitwiseFlag(1024);\n\t}", "public boolean percolates() {\n return (uf.find(count * count) == uf.find(count * count + 1));\n }", "public String validateSudoku(int[][] solutiongrid){ \n final int[][] rowarray = solutiongrid;\n final int[][] columnarray = transpose(solutiongrid); //Transpose the array so that we can check the columns now for dupes\n \n //Check all rows and columns for dupes\n for(int i=0;i<solutiongrid.length;i++){ \n if(containsDuplicate(rowarray[i]) || containsDuplicate(columnarray[i]))\n return solutioninvalid;\n }\n \n \n //Check the N sub squares for validity\n if(!checkSubGrids(solutiongrid))\n return solutioninvalid;\n \n return solutionvalid;\n }", "private boolean checkRep()\r\n/* 126: */ {\r\n/* 127: */ Iterator localIterator2;\r\n/* 128:217 */ for (Iterator localIterator1 = this.map.keySet().iterator(); localIterator1.hasNext(); localIterator2.hasNext())\r\n/* 129: */ {\r\n/* 130:217 */ N n = (Object)localIterator1.next();\r\n/* 131:218 */ localIterator2 = ((Map)this.map.get(n)).keySet().iterator(); continue;N suc = (Object)localIterator2.next();\r\n/* 132:219 */ if (!((Map)this.map.get(suc)).containsKey(n)) {\r\n/* 133:220 */ return false;\r\n/* 134: */ }\r\n/* 135:223 */ if (!((Map)this.map.get(n)).get(suc).equals(((Map)this.map.get(suc)).get(n))) {\r\n/* 136:224 */ return false;\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139:230 */ return true;\r\n/* 140: */ }", "@Test(testName = \"duplicateElementsFromOneArrays\")\n\t public static void commonElementsFromOneArray() \n\t {\n\t int[] my_array = {1, 2, 5, 5, 6, 6, 7, 2};\n\t \n\t for (int i = 0; i < my_array.length-1; i++)\n\t {\n\t for (int j = i+1; j < my_array.length; j++)\n\t {\n\t if ((my_array[i] == my_array[j]) && (i != j))\n\t {\n\t System.out.println(\"Duplicate Element : \"+my_array[j]);\n\t }\n\t }\n\t }\n\t }", "public boolean isExplicitUniqueCheckRequired();", "public static boolean duplicateCheck(ArrayList<Integer> aList) {\n\t\tBoolean duplicates = false;\n\t\tint elementIndex = 0;\n\t\twhile (duplicates == false && elementIndex < aList.size()-1) {\n\t\t\tint compareIndex = elementIndex + 1;\n\t\t\twhile (duplicates == false && compareIndex < aList.size()) {\n\t\t\t\t//System.out.println(aList.get(elementIndex));\n\t\t\t\t//System.out.println(aList.get(compareIndex));\n\t\t\t\tif (aList.get(elementIndex) == aList.get(compareIndex)) {\n\t\t\t\t\t//System.out.println(\"duplicate is true\");\n\t\t\t\t\tduplicates = true;\n\t\t\t\t}\n\t\t\t\tcompareIndex++;\n\t\t\t}\n\t\t\telementIndex++;\n\t\t}\n\t\tif (duplicates == true) {\n\t\t\t//System.out.println(\"final return for duplicate is true\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//System.out.println(\"final return for duplicate is false\");\n\t\t\treturn false;\n\t\t}\n\t}", "boolean hasSharedSet();", "public boolean percolates(){\n\t\tif(isPathological)\n\t\t\treturn isOpen(1,1);\n\t\t//System.out.println(\"Root top: \"+ quickUnion.find(N+2));\n\t\t\n\t\treturn (quickUnion.find(N*N+1) == quickUnion.find(0)); \t\n\t}", "public boolean checkDuplicates(String chars) {\n char[] check = chars.toCharArray();\n for (int i = 0; i < chars.length(); i++) {\n for (int j = i + 1; j < chars.length(); j++) {\n if (check[i] == check[j]) {\n return true;\n }\n }\n }\n return false;\n }", "protected boolean allowsDuplicates(Class type) {\n return !Set.class.isAssignableFrom(type);\n }", "@SuppressWarnings(\"unused\")\n private boolean checkIds(CFANode node) {\n\n if (!visited.add(node)) {\n // already handled, do nothing\n return true;\n }\n\n for (CFANode successor : CFAUtils.successorsOf(node)) {\n checkIds(successor);\n }\n\n //node.setReversePostorderId(reversePostorderId2++);\n assert node.getReversePostorderId() == reversePostorderId2++ : \"Node \" + node + \" got \" + node.getReversePostorderId() + \", but should get \" + (reversePostorderId2-1);\n return true;\n }", "public static boolean checkPath(int[][] bs, int i) {\n ArrayList<Integer> temp_cP = new ArrayList<Integer>();\r\n Set<Integer> temp_setcP = new HashSet<Integer>();\r\n boolean denoter = true;\r\n while (i == 3) {\r\n for (int k = 0; k < i; k++) {\r\n for (int e = 0; e < 3; e++) {\r\n temp_cP.add(e, bs[k][e]);\r\n }\r\n }\r\n temp_setcP = new HashSet<Integer>(temp_cP);\r\n if (temp_cP.size() > temp_setcP.size()) {\r\n denoter = false;\r\n break;\r\n\r\n } else {\r\n temp_cP.clear();\r\n temp_setcP.clear();\r\n\r\n for (int k = 0; k < i; k++) {\r\n for (int e = 3; e < 6; e++) {\r\n temp_cP.add(bs[k][e]);\r\n }\r\n }\r\n temp_setcP = new HashSet<Integer>(temp_cP);\r\n if (temp_cP.size() > temp_setcP.size()) {\r\n denoter = false;\r\n break;\r\n\r\n } else {\r\n break;\r\n }\r\n }\r\n }\r\n while (i == 6) {\r\n\r\n for (int k = 3; k < i; k++) {\r\n for (int e = 0; e < 3; e++) {\r\n temp_cP.add(e, bs[k][e]);\r\n }\r\n }\r\n temp_setcP = new HashSet<Integer>(temp_cP);\r\n if (temp_cP.size() > temp_setcP.size()) {\r\n denoter = false;\r\n break;\r\n\r\n } else {\r\n temp_cP.clear();\r\n temp_setcP.clear();\r\n\r\n for (int k = 3; k < i; k++) {\r\n for (int e = 3; e < 6; e++) {\r\n temp_cP.add(bs[k][e]);\r\n }\r\n }\r\n temp_setcP = new HashSet<Integer>(temp_cP);\r\n if (temp_cP.size() > temp_setcP.size()) {\r\n denoter = false;\r\n break;\r\n\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n }\r\n return denoter;\r\n }", "public static void main(String[] args) {\n\t\tint a[] = { 1, 2, 3, 6, 7, 8, 2, 3 };\r\n\r\n\t\tSystem.out.println(\"The Duplicates in the array is: \");\r\n\t\t\r\n\t\t//1 1\r\n\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tfor (int j=i+1; j < a.length; j++) {\r\n\t\t\t\tif (a[i] == a[j]) {\r\n\t\t\t\t\tSystem.out.println(a[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "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 isRepeated()\n {\n return start != end;\n }", "private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }", "boolean checkWin() {\n Iterator<Integer> seq = sequence.iterator();\n Iterator<Integer> in = input.iterator();\n\n while (seq.hasNext() && in.hasNext()) {\n seq.next();\n in.next();\n if (!seq.hasNext() && !in.hasNext()) {\n return true;\n }\n }\n return false;\n }", "private void verifyIndicesIsPermutation()\n {\n boolean seen[] = new boolean[length];\n \n for( int i=0; i<length; i++ ){\n int ix = indices[i];\n \n if( ix<0 ){\n System.out.println( \"Error: Negative index: indices[\" + i + \"]=\" + ix );\n }\n else if( ix>=indices.length ){\n System.out.println( \"Error: Index out of range: indices[\" + i + \"]=\" + ix );\n }\n else if( seen[ix] ){\n System.out.println( \"Error: Duplicate index: indices[\" + i + \"]=\" + ix );\n }\n else {\n seen[ix] = true;\n }\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tString[] niz = { \"abc\",\"bcd\",\"efg\",\"ijk\",\"lmn\",\"abc\",\"bcd\"};\n\n\t\tfor(int i=0;i<niz.length-1;i++) {\n\t\t\tfor(int j=i+1;j<niz.length;j++) {\n\t\t\t\tif(niz[i]== niz[j] && (i !=j)) { // moze ici i ovako if( (my_array[i].equals(my_array[j])) && (i != j) )\n\t\t\t\t\tSystem.out.println(\"dupli elementi su : \" + niz[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public boolean isSingleSolution() {\n boolean single_solution = false;\n\n if(!this.isManySolution() && this.isSolutionExist()) {\n single_solution = true;\n }\n\n return single_solution;\n }", "public static void main(String[] args) {\n\t\tint[] nums = {1,1,2,3,4,3,4};\n\t\tfor(int i=0; i<nums.length;i++) {\n\t\t\tint count = 0;\n\t\t\tfor(int j=0; j<nums.length; j++) {\n\t\t\t\tif(nums[i]==nums[j]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\tif(count==1) {\n\t\t\t\tSystem.out.println(nums[i]);\n\t\t\t}\n\t\t}\n\n\t}", "public boolean isDone() {\n //check if valid board\n assert isValidSolitaireBoard();\n if (numPiles == NUM_FINAL_PILES){\n //create array checkDonewith size NUM_FINAL_PILES\n int[] checkDone = new int[NUM_FINAL_PILES];\n \n /**\n the value in piles[i] needs to be unique, not greater than NUM_FINAL_PILES\n and no duplicates of the number\n each value is used as an index to the new array and their value is\n the checkDone's value. Eg. piles[2] = 4, checkDone[4] = 4\n if the checkDone[piles[i]] equals to piles[i], there is a duplicate.\n */\n for (int i = 0 ; i < numPiles; i++){\n if ((piles[i] <= NUM_FINAL_PILES) && (checkDone[piles[i] - 1] != piles[i])){\n checkDone[piles[i] - 1] = piles[i];\n }\n else\n return false;\n }\n return true;\n }\n else\n return false;\n }" ]
[ "0.7434679", "0.67549443", "0.6683565", "0.6663572", "0.65890807", "0.65667593", "0.6540323", "0.6498649", "0.6422283", "0.6355585", "0.6318917", "0.6302161", "0.6293815", "0.62893915", "0.62736845", "0.6272423", "0.6247443", "0.62393427", "0.62151325", "0.6200626", "0.61521614", "0.6144619", "0.6113566", "0.6101211", "0.60954934", "0.609034", "0.6072018", "0.6070926", "0.6052103", "0.6044346", "0.6041328", "0.60228324", "0.6002485", "0.5998662", "0.598464", "0.5968228", "0.59539884", "0.5934875", "0.5932332", "0.5918958", "0.59132254", "0.59068847", "0.5897736", "0.5893037", "0.58823967", "0.58762455", "0.58758277", "0.58703065", "0.58681834", "0.58678216", "0.58504313", "0.5849206", "0.5841727", "0.58054304", "0.5800094", "0.57923627", "0.5780741", "0.5775953", "0.5774138", "0.57719934", "0.5764616", "0.5763601", "0.5759629", "0.57576346", "0.5757341", "0.5753428", "0.57530373", "0.57471585", "0.5740273", "0.5734352", "0.5730677", "0.5730374", "0.5730259", "0.5729854", "0.5728609", "0.5720251", "0.57175064", "0.5716371", "0.57151127", "0.5714366", "0.57106894", "0.57098883", "0.57073855", "0.57041824", "0.5700609", "0.56925184", "0.56909543", "0.56671727", "0.5666122", "0.5665806", "0.56607383", "0.5654214", "0.56489694", "0.5646835", "0.5645664", "0.5642651", "0.5640985", "0.5638629", "0.56370676", "0.5633244" ]
0.6259257
16
Method to Execute the GA
public static boolean solve(Problem inputProblem, int popLimit, double mutChance, int iterLimit) { // Check All the Input Parameter // popLimit: Make as Even int evenBase = 2; if (popLimit % evenBase != 0){ popLimit = popLimit + 1; } // mutChance: in the Range of 0% and 100% if (mutChance < 0 || mutChance > 1){ System.out.println("Invalid Mutation Chance: " + mutChance); return false; } // Initialization Solution[] currentPop = initPopulation(inputProblem, popLimit); Solution[] generatedPop, nextPop; System.out.println(0 + "\t" +0+ "\t" +currentPop[0].distance); long time = System.nanoTime(); // Loop For Counting Iteration for (int turn = 0; turn < iterLimit; turn++) { //System.out.println(currentPop[0].distance); // Initialization Next Generation generatedPop = new Solution[popLimit]; // Loop for Generating Next Population Solution[] parent, offspring; for (int leftChild = popLimit; leftChild > 0; leftChild = leftChild - 2) { // Selection parent = rankSelection(currentPop); // CrossOver offspring = CrossOver_mapping(currentProblem, parent[0], parent[1]); // Prevent Duplicated Offspring if (haveDuplicated(generatedPop, offspring[0]) || haveDuplicated(generatedPop, offspring[1])) { leftChild = leftChild + 2; continue; } // Add Child into generatedPop generatedPop[leftChild - 1] = offspring[0]; generatedPop[leftChild - 2] = offspring[1]; } // Mutation For Each Solution Solution newElement; for (int index = 0; index < popLimit; index++){ if(Math.random() < mutChance){ // Use Local Search to Finish Mutation newElement = HillClimbing.solve_invoke(inputProblem, generatedPop[index]); // Prevent Duplicated Offspring if (!haveDuplicated(generatedPop, newElement)) { generatedPop[index] = newElement; } } } // Sort the Generated Array Arrays.sort(generatedPop); // Produce Next Generation nextPop = getTopSolutions(currentPop, generatedPop, popLimit); // Switch nextPop to currentPop currentPop = nextPop; System.out.println((System.nanoTime() - time) + "\t" + (turn+1) + "\t" + currentPop[0].distance); } // Store into the Static Variable optimalSolution = currentPop[0]; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void execute() {\n\t\tSystem.out.println(\"==STATISTICS FOR THE RESTAURANT==\");\n\t\tSystem.out.println(\"Most used Ingredients:\");\n\t\tmanager.printIngredients();\n\t\tSystem.out.println(\"Most ordered items:\");\n\t\tmanager.printMenuItems();\n\t\tSystem.out.println(\"==END STATISTICS==\");\n\t}", "public void run() {\n GenerationDetail detail = ga.getDetail();\n generationLabel.setText(String.valueOf(detail.getGeneration()+1));\n averageFitnessLabel.setText(String.valueOf(detail.getAverageFitness()));\n maxFitnessLabel.setText(String.valueOf(detail .getMaxFitness()));\n minFitnessLabel.setText(String.valueOf(detail.getMinFitness()));\n progressBar.setValue(100 * (detail.getGeneration())/ Integer.valueOf(times-1));\n }", "public void execute() {\n\t\tthis.badgeId = studentWorkerOperation.AddNewBadge(this.badgeName, this.badgeDescription);\n\t}", "private void execute() {\n Print.pr(\"Running ANNIE...\");\n try {\n annieController.execute();\n } catch (ExecutionException ex) {\n Out.prln(ex);\n }\n Print.prln(\"...ANNIE execution completed\");\n\n\n \n }", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "protected void execute() {\n\t\t\r\n\t\tParticleAnalysisReport[] reports = simpleVision.getFrame();\r\n\t\t for (int i = 0; i < reports.length; i++) { // print results\r\n ParticleAnalysisReport r = reports[i];\r\n SmartDashboard.putString(\"Particle\" + i, r.center_mass_x + \", \" + r.center_mass_y);\r\n\t\t }\r\n\t\t\r\n\t}", "private void loadGA(Command c, CliParams p, ProcessingContext ctx) throws IOException {\n GaQuery gq;\n try {\n gq = new GaQuery();\n } catch (MalformedURLException e) {\n throw new IllegalArgumentException(e.getMessage());\n }\n String configFile = c.getParamMandatory(\"configFile\");\n String usr = c.getParam(\"username\");\n String psw = c.getParam(\"password\");\n String token = c.getParam(\"token\");\n String id = c.getParamMandatory(\"profileId\");\n File conf = FileUtil.getFile(configFile);\n initSchema(conf.getAbsolutePath());\n gq.setIds(id);\n if (token != null && token.length() > 0) {\n setGoogleAnalyticsToken(token);\n } else if (usr != null && usr.length() > 0 &&\n psw != null && psw.length() > 0) {\n setGoogleAnalyticsUsername(usr);\n setGoogleAnalyticsPassword(psw);\n } else {\n throw new InvalidCommandException(\"The UseGoogleAnalytics command requires either GA token or \" +\n \"username and password!\");\n }\n setGoogleAnalyticsQuery(gq);\n gq.setDimensions(c.getParamMandatory(\"dimensions\").replace(\"|\", \",\"));\n gq.setMetrics(c.getParamMandatory(\"metrics\").replace(\"|\", \",\"));\n gq.setStartDate(c.getParamMandatory(\"startDate\"));\n gq.setEndDate(c.getParamMandatory(\"endDate\"));\n if (c.checkParam(\"filters\"))\n gq.setFilters(c.getParam(\"filters\"));\n c.paramsProcessed();\n\n // sets the current connector\n ctx.setConnector(this);\n setProjectId(ctx);\n l.info(\"Google Analytics Connector successfully loaded (id: \" + id + \").\");\n }", "protected void execute() {\n \t\n }", "protected void execute() {\n \t\n }", "@Override\n public void execute() {\n eslClient.getEventNotificationService().register(newEventNotificationConfig(URL)\n .forEvent(EVENT1)\n .forEvent(EVENT2)\n .forEvent(EVENT3));\n\n // Get the registered event notifications\n eventNotificationConfig = eslClient.getEventNotificationService().getEventNotificationConfig();\n }", "public void execute() {\n\n\t}", "public void execute() {\r\n\t\r\n\t}", "@Override\r\n\tpublic void execute(DelegateExecution execution) throws Exception {\n\t\tLOGGER.info(\" ... EquifaxServiceTask invoked \");\r\n\t\texecution.setVariable(\"equifaxScore\", 640);\r\n\t\tLOGGER.info(\" ... EquifaxServiceTask Score Generated\");\r\n\r\n\t}", "public void analyze(AnalyticsRequest request){\n \n }", "public void execute() {\n\t\t\n\t\tdrivetrain.updateAnglePID();\n\t\t\n//\t\tif (drivetrain.currentControl()) {\n//\t\t\tdrivetrain.shiftGears();\n//\t\t}\n\t}", "protected void execute() {\n\n\t}", "public void execute() {\n _plugin.openNavigator();\n }", "@SuppressWarnings(\"deprecation\")\n\tprotected void execute() {\n \t\n \n \t \n\t \t/*\n\t SmartDashboard.putDouble(\"Encoder Period: \", ExampleSubsystem.encoder.getPeriod());\n\t SmartDashboard.putDouble(\"Encoder Get: \", ExampleSubsystem.encoder.get());\n\t SmartDashboard.putDouble(\"Encoder RAW: \", ExampleSubsystem.encoder.getRaw());\n\t SmartDashboard.putDouble(\"Encoder Distance\", ExampleSubsystem.encoder.getDistance());\n\t SmartDashboard.putDouble(\"Encoder PID: \", ExampleSubsystem.encoder.pidGet());\n */\n \t\n \t/* System out println with Riolog\n \t \n\t \tSystem.out.println(\"Encoder Rate: \" + ExampleSubsystem.encoder.pidGet());\n\t \tSystem.out.println(\"Encoder Period: \" + ExampleSubsystem.encoder.getPeriod());\n\t \tSystem.out.println(\"Encoder Get: \" + ExampleSubsystem.encoder.get());\n\t \tSystem.out.println(\"Encoder RAW: \" + ExampleSubsystem.encoder.getRaw());\n\t \tSystem.out.println(\"Encoder Distance\" + ExampleSubsystem.encoder.getDistance());\n\t \tSystem.out.println(\"Encoder PID: \" + ExampleSubsystem.encoder.pidGet());\n \t*/\n \t\n }", "public void execute() {\n\t\t\n\t}", "protected void execute() {\r\n }", "public void execute(){\n\t\t\n\t}", "protected void execute() {\n\t}", "public void execute() {\n\t\tlaunch();\n\t}", "public void execute() {\n }", "protected void execute() {\n\t\t\n\t}", "@Override\n\tpublic void execute() {\n\t\tDMNModel model = getDmnRuntime().getModels().get(0); // assuming there is only one model in the KieBase\n\t\t\n\t\t// setting input data\n\t\tDMNContext dmnContext = createDmnContext(\n\t\t\t\tImmutablePair.of(\"customerData\", new CustomerData(\"Silver\", new BigDecimal(15)))\n\t\t);\n\t\t\n\t\t// executing decision logic\n\t\tDMNResult topLevelResult = getDmnRuntime().evaluateAll(model, dmnContext);\n\t\t\n\t\t// retrieving execution results\n\t\tSystem.out.println(\"--- results of evaluating all ---\");\n\t\ttopLevelResult.getDecisionResults().forEach(this::printAsJson);\n\t}", "protected void execute() {\n\n\t\t// SmartDashboard.putString(\"DB/String 0\", \"Vision was reached = \" +\n\t\t// Vision.getInstance().reached());\n\n\t\t// checks to see if the trigger is pressed, and sends diff variables\n\t\t// accordingly\n\n\t\tif (DriveTrain.getInstance().orientationTriggerGet()) {\n\t\t\tDriveTrain.getInstance().tankDrive(getLeftStick(), -getRightStick(), squaredInputs);\n\n\t\t} else {\n\t\t\tDriveTrain.getInstance().tankDrive(-getRightStick(), getLeftStick(), squaredInputs);\n\t\t}\n\n\t}", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n this.setSetpoint(OI.getAdjustedThrottle()*RobotMap.maxRPM);\n ScraperBike.debugToTable(\"PIDSetpoint\", OI.getAdjustedThrottle()*RobotMap.maxRPM);\n \n }", "protected void execute()\n\t{\n\t}", "public void executeScript() throws Exception {\n\n nav.ChangeCountry(\"India\");\n nav.SearchFor(\"\");\n pdp.AddToBag();\n pdp.EnterBag();\n bag.CheckOut();\n lgn.LoginWith(\"[email protected]\");\n\n\n\n }", "protected void execute() {\n \tRobot.telemetry.setAutonomousStatus(\"Running \" + commandName + \": \" + distance);\n \tRobot.drivetrain.arcadeDrive(Robot.driveDistancePID.getOutput(), 0.0, false);\n }", "@Override\n public final void execute(final ExecutionComponent executionComponent, final InstanceGoal<?> topLevelGoal) {\n final InstanceGoal<InstanceParameters> instanceGoal = rlgm.getNextInstanceGoal();\n if (instanceGoal != null) {\n final GaaAgent agent = (GaaAgent) executionComponent;\n\n // Invoke the goal\n Object returnValue = null;\n try {\n returnValue = agent.getGoalCapabilityMap().invoke(instanceGoal);\n\n } catch (final NoSuchMethodException e) {\n // We tried to invoke a bad method name. The RLGM we're\n // executing probably needs modification, or our agent does not\n // possess (or register) the desired capability.\n onInvocationFailed(instanceGoal);\n return;\n } catch (final IllegalArgumentException e) {\n // We were unable to correctly map the goal's instance\n // parameters to the method's formal parameters. The RLGM we're\n // executing probably needs modification, or our agent does not\n // possess (or register) the desired capability.\n onInvocationFailed(instanceGoal);\n return;\n } catch (final IllegalAccessException e) {\n // We tried to access a method that we are not allowed to.\n onInvocationFailed(instanceGoal);\n return;\n } catch (final InvocationTargetException e) {\n // An assertion in the target method was hit, or a runtime\n // exception was thrown.\n onInvocationFailed(instanceGoal);\n return;\n }\n\n try {\n // Trigger the appropriate instance tree changes based on\n // this goal's completion\n final InstanceParameters instanceParameters = instanceGoal.getParameter();\n\n for (final SpecificationEvent event : rlgm.getEventsToFire(instanceGoal.getSpecificationGoal(), returnValue)) {\n InstanceParameters actualParameters = null;\n\n // Map event formal parameters to actual parameters\n if (event.getParameters() != null) {\n final Set<UniqueIdentifier> formalParameters = event.getParameters().getParameters();\n if (!formalParameters.isEmpty()) {\n actualParameters = event.createInstanceParameters();\n\n if (instanceParameters != null) {\n boolean returnMapped = false;\n for (final UniqueIdentifier formalParameter : formalParameters) {\n final Object actualParameter = instanceParameters.getValue(formalParameter);\n if (actualParameter != null) {\n actualParameters.setValue(formalParameter, actualParameter);\n } else {\n if (!returnMapped) {\n actualParameters.setValue(formalParameter, returnValue);\n returnMapped = true;\n } else {\n // We can only pass along the return\n // value\n assert false;\n }\n }\n }\n } else {\n // We can only pass along the return value\n assert formalParameters.size() == 1;\n actualParameters.setValue(formalParameters.iterator().next(), returnValue);\n }\n }\n }\n\n // Signal the event\n rlgm.event(instanceGoal, event, actualParameters);\n }\n\n // Signal the we achieved the goal\n rlgm.event(instanceGoal, SpecificationEvent.ACHIEVED_EVENT, null);\n\n } catch (final RoleLevelGoalModel.GoalFailureException e) {\n // Signal the we failed the goal\n rlgm.event(instanceGoal, SpecificationEvent.FAILED_EVENT, null);\n }\n }\n }", "private void sendGoogleAnaliticsData(String title) {\n\t\tString GA_PROPERTY_ID = \"UA-52812931-2\";\n\n\t\t// Dispatch period in seconds.\n\t\tint GA_DISPATCH_PERIOD = 10;\n\n\t\t// Prevent hits from being sent to reports, i.e. during testing.\n\t\tboolean GA_IS_DRY_RUN = false;\n\n\t\t// GA Logger verbosity.\n\t\tLogLevel GA_LOG_VERBOSITY = LogLevel.INFO;\n\n\t\t// Key used to store a user's tracking preferences in SharedPreferences.\n\t\tfinal String TRACKING_PREF_KEY = \"trackingPreference\";\n\n\t\tmGa = GoogleAnalytics.getInstance(this.getApplicationContext());\n\t\tmTracker = mGa.getTracker(GA_PROPERTY_ID);\n\n\t\t// Set dispatch period.\n\t\tGAServiceManager.getInstance().setLocalDispatchPeriod(\n\t\t\t\tGA_DISPATCH_PERIOD);\n\n\t\t// Set dryRun flag.\n\t\tmGa.setDryRun(GA_IS_DRY_RUN);\n\n\t\t// Set Logger verbosity.\n\t\tmGa.getLogger().setLogLevel(GA_LOG_VERBOSITY);\n\n\t\t// Set the opt out flag when user updates a tracking preference.\n\t\tSharedPreferences userPrefs = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this.getApplicationContext());\n\t\tuserPrefs\n\t\t\t\t.registerOnSharedPreferenceChangeListener(new SharedPreferences.OnSharedPreferenceChangeListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSharedPreferenceChanged(\n\t\t\t\t\t\t\tSharedPreferences sharedPreferences, String key) {\n\t\t\t\t\t\tif (key.equals(TRACKING_PREF_KEY)) {\n\t\t\t\t\t\t\tGoogleAnalytics\n\t\t\t\t\t\t\t\t\t.getInstance(getApplicationContext())\n\t\t\t\t\t\t\t\t\t.setAppOptOut(\n\t\t\t\t\t\t\t\t\t\t\tsharedPreferences.getBoolean(key,\n\t\t\t\t\t\t\t\t\t\t\t\t\tfalse));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tmTracker.set(Fields.SCREEN_NAME, \"Sreen - \" + title);\n\n\n\t}", "@Override\n\tpublic void execute() {\n\t\tmoteur.couper();\n\t}", "@Override\n public void execute() {\n repository.getHashtags();\n\n }", "public static void main(String[] args)\n throws IOException, ExecutionException, InterruptedException {\n String projectId = ServiceOptions.getDefaultProjectId();\n String defaultCatalog =\n String.format(\"projects/%s/locations/global/catalogs/default_catalog\", projectId);\n // visitorId is generated randomly\n String visitorId = UUID.randomUUID().toString();\n\n writeUserEvent(defaultCatalog, visitorId);\n }", "public void execute() {\n setExecuted(true);\n }", "protected void execute()\n {\n }", "public void fitnessFunction()\n\t{\n\t\t\n\t}", "Analytics_Engine createAnalytics_Engine();", "public void Execute() {\n\n }", "@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}", "protected void execute() {\n\n\n \n }", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "@Override\n public void handle(ActionEvent event) {\n if (appUser != null) {\n \tAnalyticsOutput analyticsOutput = new AnalyticsOutput();\n \tanalyticsOutput.generateOutput(conn, appUser.getUserID());\n }else {\n \tSystem.out.println(\"You have to be signed in to get analytics\");\n }\n }", "@Override\n public void Execute() {\n\n }", "public static void runAGeneration() {\n //Breeds Population until max population size for genetic drift\n breedAll();\n\n //Genocides Population by fitness\n genocide();\n\n System.out.println(\"\\nPopulation: \");\n\n //prints population\n printPopulation();\n }", "@Override\n\tpublic void execute() {\n\t\tSystem.out.println(\"ServiceImpl execute\");\n\t}", "public void execute() {\n for (CoordAction<PCEData,PCEData> pce : this) {\n pce.setRequestData(this.getRequestData());\n // Aggregators trigger the execution of its children PCE's before they are\n // executed themselves.\n pce.process();\n }\n }", "void analysisPostponed();", "@Override\n public void onStart() {\n super.onStart();\n GoogleAnalytics.getInstance(this).reportActivityStart(this);\n }", "public void execFunzzySearchMapGeneFunc(){\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n System.out.println(this.searchParam );\n map.put(\"searchParam\",this.searchParam);\n }\n\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n map.put(\"species\",this.searchSpecies);\n }\n\n if(this.searchTrait != null && this.searchTrait.equals(\"null\")==false && this.searchTrait.length()>0){\n\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"searchTrait\", this.searchTrait) ;\n }\n\n if(this.pvalue != null && this.pvalue.equals(\"null\")==false && this.pvalue.length()>0){\n\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n\n\n mapGeneBeanList = (List<MapGeneBean>) baseService.findResultList(\"cn.big.gvk.dm.MapGene.selectMapGeneCount\",map);\n if(mapGeneBeanList != null ){\n for(MapGeneBean mgb: mapGeneBeanList){\n //get count\n\n Map t = new HashMap();\n t.put(\"gId\",mgb.getGid()) ;\n t.put(\"count\",\"count\");\n\n //trait count\n GwasAssociationView gwas = (GwasAssociationView) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectGwasViewByGeneInfo\",t);\n if(gwas != null){\n mgb.setTraitCount(gwas.getTraitCount());\n }\n\n //study count\n StudyBean study = (StudyBean) baseService.findObjectByObject(\"cn.big.gvk.dm.study.selectStudyByMapGeneId\",t);\n if(study != null ){\n mgb.setStudyCount(study.getStudyCount());\n }\n\n //publication count\n PublicationBean publication = (PublicationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.publication.selectPubByGeneId\",t);\n if (publication != null ){\n mgb.setPublicationCount(publication.getPublicationCount());\n }\n }\n }\n\n StringBuffer sb = new StringBuffer() ;\n\n if(mapGeneBeanList != null && mapGeneBeanList.size()>0){\n for(MapGeneBean mapgene: mapGeneBeanList){\n sb.append(mapgene.getMapGeneId()).append(\"\\t\").append(mapgene.getMapGeneChrom()).append(\":\")\n .append(mapgene.getMapGeneStart()).append(\"-\").append(mapgene.getMapGeneEnd()).append(\"\\t\").append(mapgene.getTraitCount()).append(\"\\t\")\n .append(mapgene.getStudyCount()).append(\"\\n\");\n }\n }\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }", "@Override\r\n\tpublic void execute() {\n\t}", "@Override\r\n\tpublic void execute() {\n\t}", "@Override\n\tpublic void run( String arg )\n\t{\n\t\tfinal LoadParseQueryXML result = new LoadParseQueryXML();\n\n\t\tif ( !result.queryXML( \"Dataset Quality Estimation\", true, true, true, true, true ) )\n\t\t\treturn;\n\n\t\testimateFRC( result.getData(), SpimData2.getAllViewIdsSorted( result.getData(), result.getViewSetupsToProcess(), result.getTimePointsToProcess() ) );\n\t}", "protected void execute() {}", "public void execute(){\n\n }", "@Override\n\t\tpublic void run() {\n\t\t\tExecutor executor = new Executor(this.env);\n\n\t\t\t// control loop\n\t\t\t//String dataFileName = monitorLog.monitor();\n\t\t\t//AnalysisStatus analysisStatus = analyser.analyse(dataFileName, args);\n\t\t\t// AdaptationPlan adaptationPlan =\n\t\t\t// planner.selectPlan(analysisStatus);\n\t\t\t//executor.execute(adaptationPlan);\n\t\t\t//System.out.println(this.getClass()+\" **************** CHANGE **************\"+System.nanoTime());\n\t\t\texecutor.executeFake(this.env);\n\t\t\t//executeFake();\n\t\t}", "protected void execute() {\n \tTmSsAutonomous.getInstance().showAlgInfo();\n \tshowPreferenceSettings(); //P.println(\"[Preferences info TBD]\");\n }", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "@Override\r\n\tpublic void execute() {\n\r\n\t}", "@Override\r\n\tprotected void execute() {\r\n\t}", "void startTracking();", "void analysisCompleted();", "protected void execute ()\n\t{\n\t\t//Take and process new image every .5 seconds\n\t\tif (System.currentTimeMillis() % 500 == 0)\n\t\t{\n\t\t\tSubsystems.goalVision.processNewImage();\n\t\t}\n\n\t\tif (Subsystems.goalVision.getProportionalGoalX() < X_OFFSET\n\t\t - DEADBAND)\n\t\t//the goal is to the left\n\t\t{\n\t\t\t//turn left\n\t\t\tSubsystems.transmission.drive(motorRatio, -motorRatio);\n\t\t}\n\t\t//the goal is to the right\n\t\telse if (Subsystems.goalVision.getProportionalGoalX() > X_OFFSET\n\t\t + DEADBAND)\n\t\t{\n\t\t\t//turn right\n\t\t\tSubsystems.transmission.drive(-motorRatio, motorRatio);\n\t\t}\n\t}", "public static void execute() {\n EFsupply.standardGroundSupply(70036690, -63257400, \"EF Tasmania Supply 1\");\n\n //Default Zeon supply i Tasmania.\n ZeonSupply.standardGroundSupply(69616733, -63019640, \"Zeon Tasmania Supply 1\");\n\n ZeonNpcEF1();\n EfNpcZeon1();\n }", "public void executeScript() throws Exception {\n\t\tnav.SearchFor(\"\");\n\t\tnav.ClickNavigationLinks(TopNavLinks.WOMENSAPPAREL);\n\t\tprp.RefineByColor(\"Black\");\n\t\tprp.RefineBySize(\"Medium\");\n\t\tprp.ClickFirstItem();\n\t}", "public void execute() {\n execute0();\n }", "@Override\n\tpublic void execute() {\n\t\t\n\t}", "@Override\n\tpublic void execute() {\n\t}", "@Before(\"forDaoPackage()\")\r\n\tpublic void performApiAnalytics() {\r\n\t\tSystem.out.println(\"\\n=======>>>>> Performing API analytics\");\r\n\t}", "public void execute(DelegateExecution execution) throws Exception {\r\n\t\tLOGGER.info(\"-> \");\r\n\t\tgetExecutionVariablen(execution);\r\n\t\tperformGeschaeftslogik();\r\n\t}", "@Override\n\tprotected void execute() {\n\t\tRobot.collector.setMawOpen(Robot.oi.getCollectorOpen());\n\t\tRobot.collector.setIntakeSpeed(Robot.oi.getCollectorSpeed());\n\t\tRobot.collector.setWristStageOneRetracted(Robot.oi.getWristStageOneRetracted());\n\t\tRobot.collector.setWristStageTwoRetracted(Robot.oi.getWristStageTwoRetracted());\n\t}", "@Override\r\n\tpublic void execute() {\n }", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tGoogleAnalytics.getInstance(MyAccountActivity.this)\r\n\t\t\t\t.reportActivityStart(MyAccountActivity.this);\r\n\r\n\t}", "public void run() {\n\t\t\tArrayList<GoobiScriptResult> templist = new ArrayList<>(resultList);\n for (GoobiScriptResult gsr : templist) {\n\t\t\t\tif (gsr.getResultType() == GoobiScriptResultType.WAITING && gsr.getCommand().equals(command)) {\n\t\t\t\t\tProcess p = ProcessManager.getProcessById(gsr.getProcessId());\n\t\t\t\t\tgsr.setProcessTitle(p.getTitel());\n\t\t\t\t\tgsr.setResultType(GoobiScriptResultType.RUNNING);\n\t\t\t\t\tgsr.updateTimestamp();\n\t p.setProjekt(project);\n\t p.setProjectId(project.getId());\n\t try {\n\t\t\t\t\t\tProcessManager.saveProcess(p);\n\t\t\t\t\t\tHelper.addMessageToProcessLog(p.getId(), LogType.DEBUG, \"Project '\" + project + \"' assigned using GoobiScript.\", username);\n\t logger.info(\"Project '\" + project + \"' assigned using GoobiScript for process with ID \" + p.getId());\n\t gsr.setResultMessage(\"Project '\" + project + \"' assigned successfully.\");\n\t\t\t\t\t\tgsr.setResultType(GoobiScriptResultType.OK);\n\t\t\t\t\t} catch (DAOException e) {\n\t\t\t\t\t\tgsr.setResultMessage(\"Problem assigning new project: \" + e.getMessage());\n\t\t\t\t\t\tgsr.setResultType(GoobiScriptResultType.OK);\n\t\t\t\t\t}\n\t gsr.updateTimestamp();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic void execute() throws Exception {\n\t\t\r\n\t}", "public void execute() throws MojoExecutionException {\n CodeGeneratorLoggerFactory.setLogger(getLog());\n\n // iff baseFolder is null or empty, reset it to the default value\n baseFolder = StringUtils.defaultIfEmpty(baseFolder, \"GUIData\");\n\n // create the helper with our config\n CodeGeneratorHelper helper = new CodeGeneratorHelper(toCodeGeneratorConfig());\n\n if (CodeGeneratorLoggerFactory.getLogger().isDebugEnabled()) {\n helper.displayProjectInformation();\n }\n\n // register all custom element classes\n helper.registerCustomElements();\n\n // create the generated page details file\n helper.createSeLionPageDetailsFile();\n\n // process the files.\n helper.processFiles();\n }" ]
[ "0.61667645", "0.5901071", "0.5849025", "0.58024126", "0.57802474", "0.57802474", "0.57802474", "0.5757995", "0.57449585", "0.57338166", "0.57338166", "0.5724335", "0.5721793", "0.5719288", "0.5702244", "0.5689151", "0.5683326", "0.5643984", "0.5599825", "0.5568776", "0.5561904", "0.5555986", "0.5552511", "0.5529549", "0.5509244", "0.5507823", "0.54971975", "0.5482119", "0.54802793", "0.5467075", "0.5467075", "0.5467075", "0.5467075", "0.5467075", "0.5467075", "0.5467075", "0.5467075", "0.5467075", "0.5467075", "0.5467075", "0.5467075", "0.54619324", "0.54610765", "0.54607356", "0.5421874", "0.5420589", "0.54194254", "0.5408106", "0.5407781", "0.5406893", "0.5402838", "0.5401995", "0.5400773", "0.53912824", "0.53717506", "0.53703237", "0.5369498", "0.5368615", "0.5368615", "0.5368615", "0.5368615", "0.5358417", "0.5353144", "0.5347135", "0.5345041", "0.5333542", "0.5331021", "0.5315832", "0.5315613", "0.5295029", "0.5295029", "0.5292787", "0.5287518", "0.52854735", "0.52832633", "0.5257881", "0.5250924", "0.5250924", "0.5250924", "0.5250924", "0.5250924", "0.5250924", "0.5250924", "0.5247582", "0.52459687", "0.52421147", "0.5235915", "0.5231467", "0.5225725", "0.5218975", "0.5213516", "0.52116364", "0.5200888", "0.51982504", "0.51975095", "0.51926094", "0.519157", "0.5184181", "0.51653653", "0.5150349", "0.5134025" ]
0.0
-1
Check the Route Length First
public boolean equals(Solution sol) { if (this.route.length != sol.route.length){ return false; } // Check the Distance else if (this.distance != sol.distance) { return false; }else{ // Check the Route for (int index = 0; index < this.route.length; index++) { if (this.route[index] != sol.route[index]){ return false; } } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasRoute();", "public boolean hasValidRoute() \n {\n return validRoute;\n }", "@Test\n\tpublic void checkNumberOfDifferentRoutes() {\n\t\tassertEquals(Trains.numberDifferentRoutes(\"C\",\"C\",30), 7);\n\t}", "@Test\n\tpublic void checkShortestRoute() {\n\t\tassertEquals(Trains.shortestRoute(\"A\",\"C\"), 9);\n\t\t//assertEquals(Trains.shortestRoute(\"B\",\"B\"), 9);\n\t}", "private int countPossibleRoutes(){\n\tint totPossRoutes =0;\n\tfor(int i=0;i<ConditionTree.length;i++){\n\t\tif(ConditionTree[i][5].equals(\"Y\")){\n\t\t\ttotPossRoutes++;\n\t\t}\n\t}\n\t\n\treturn totPossRoutes;\n}", "@java.lang.Override\n public boolean hasRoute() {\n return stepInfoCase_ == 7;\n }", "@java.lang.Override\n public boolean hasRoute() {\n return stepInfoCase_ == 7;\n }", "@Test\r\n public void testGetLengthShortestRoute() {\r\n System.out.println(\"getLengthShortestRoute\");\r\n String _strRoute = \"\";\r\n String name = \"KiwiLand\";\r\n List<String> _lstStr = Arrays.asList(\"AB5\", \"BC4\", \"CD8\", \"DC8\", \"DE6\", \"AD5\", \"CE2\", \"EB3\", \"AE7\");\r\n Compute instance = new Compute();\r\n instance.initLand(name, _lstStr);\r\n int expResult = 0;\r\n int result = instance.getLengthShortestRoute(_strRoute);\r\n assertEquals(expResult, result);\r\n\r\n \r\n }", "Boolean checkLength(String detail);", "boolean hasRouteDest();", "protected final boolean checkLRPCoverage(final LocRefData locRefData) {\n\t\tList<LocRefPoint> locRefPoints = locRefData.getLocRefPoints();\n\t\tList<Line> locRoute = ExpansionHelper.getExpandedLocation(locRefData);\n\t\tint lrpLength = 0;\n\t\tList<Line> lrpRoute = new ArrayList<Line>();\n\t\tfor (LocRefPoint lrd : locRefPoints) {\n\t\t\tif (lrd.getRoute() != null) {\n\t\t\t\tif (!lrd.isLRPOnLine()) {\n\t\t\t\t\t// Added by DLR e.V. (RE)\n\t\t\t\t\tif (locRefData.getLocationType() == LocationType.CLOSED_LINE\n\t\t\t\t\t\t\t&& lrd == locRefPoints.get(locRefPoints.size() - 1)) {\n\t\t\t\t\t\tList<Line> route = lrd.getRoute();\n\t\t\t\t\t\troute.add(locRefPoints.get(0).getRoute().get(0));\n\t\t\t\t\t\tlrpRoute.addAll(route);\n\t\t\t\t\t\troute.remove(route.size() - 1);\n\t\t\t\t\t} else { // original code\n\t\t\t\t\t\tlrpRoute.addAll(lrd.getRoute());\n\t\t\t\t\t}\n\t\t\t\t\t//\n\t\t\t\t}\n\t\t\t\t// Added by DLR e.V. (RE)\n\t\t\t\tif (locRefData.getLocationType() == LocationType.CLOSED_LINE\n\t\t\t\t\t\t&& lrd == locRefPoints.get(locRefPoints.size() - 1)) {\n\t\t\t\t\tList<Line> route = lrd.getRoute();\n\t\t\t\t\troute.add(locRefPoints.get(0).getRoute().get(0));\n\t\t\t\t\tlrpLength += PathUtils.getLength(route);\n\t\t\t\t\troute.remove(route.size() - 1);\n\t\t\t\t} else { // original code\n\t\t\t\t\tlrpLength += lrd.getDistanceToNext();\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t}\n\t\t}\n\t\t// check for the same amount of lines\n\t\tif (locRoute.size() != lrpRoute.size()) {\n\t\t\tLOG.error(\"number of lines are different\");\n\t\t\tLOG.error(\"location: \" + locRoute.size() + \" - locRef: \"\n\t\t\t\t\t+ lrpRoute.size());\n\t\t\treturn false;\n\t\t}\n\t\tint locationLength = 0;\n\t\tint count = locRoute.size();\n\t\t// check if the lines are equal and in the same order\n\t\tfor (int i = 0; i < count; ++i) {\n\t\t\tLine next = locRoute.get(i);\n\t\t\tif (next.getID() != lrpRoute.get(i).getID()) {\n\t\t\t\t// if a line is missing or in an incorrect order, then fail\n\t\t\t\tLOG.error(\"paths are different\");\n\t\t\t\tLOG.error(\"location line: \" + next.getID() + \" - locRef line: \"\n\t\t\t\t\t\t+ lrpRoute.get(i).getID());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tlocationLength += next.getLineLength();\n\t\t}\n\t\t// check that the location length and location reference path length are\n\t\t// equal\n\t\tif (locationLength != lrpLength) {\n\t\t\tLOG.error(\"lengths are different\");\n\t\t\tLOG.error(\"location: \" + locationLength + \" - locRef: \" + lrpLength);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public Integer lengthOfTheShortestRoute(MultiDirectionalNode startNode,\n\t\t\tMultiDirectionalNode endNode) {\n\t\treturn null;\n\t}", "private boolean multipleRoutes(StaticPacketTrace trace) {\n boolean multipleRoutes = false;\n IPCriterion ipCriterion = ((IPCriterion) trace.getInitialPacket().getCriterion(Criterion.Type.IPV4_DST));\n IpAddress ip = null;\n if (ipCriterion != null) {\n ip = ipCriterion.ip().address();\n } else if (trace.getInitialPacket().getCriterion(Criterion.Type.IPV6_DST) != null) {\n ip = ((IPCriterion) trace.getInitialPacket().getCriterion(Criterion.Type.IPV6_DST)).ip().address();\n }\n if (ip != null) {\n Optional<ResolvedRoute> optionalRoute = routeNib.longestPrefixLookup(ip);\n if (optionalRoute.isPresent()) {\n ResolvedRoute route = optionalRoute.get();\n multipleRoutes = routeNib.getAllResolvedRoutes(route.prefix()).size() > 1;\n }\n }\n return multipleRoutes;\n }", "@Test\n\tpublic void checkDistanceRouteAEBCD() {\n\t\tassertEquals(Trains.distanceRoute(\"A\", \"E\", \"B\", \"C\", \"D\"), \"22\");\n\t}", "@Test\n\tpublic void checkDistanceRouteABC() {\n\t\tassertEquals(Trains.distanceRoute(\"A\", \"B\", \"C\"), \"9\");\n\t}", "public void invalidRoute() \n {\n validRoute = false;\n }", "public boolean hasNextHop()\n {\n return getHopCount() < route.size()-1;\n }", "boolean hasSearchLength();", "boolean testLength(Tester t) {\n return t.checkExpect(lob3.length(), 3) && t.checkExpect(los3.length(), 3)\n && t.checkExpect(los1.length(), 1) && t.checkExpect(new MtLoGamePiece().length(), 0);\n }", "public void testRoute() {\r\n\t\tLog.i(\"JUNIT\", \"Routing test started\");\r\n\t\t// create route with known points\r\n\t\tRoute pr = new Route(new GeoLocation(49.904005, 10.859725),\r\n\t\t\t\tnew GeoLocation(49.902637, 10.870646));\r\n\t\tList<GeoLocation> listLocations = new LinkedList<GeoLocation>();\r\n\t\t// retrieve path\r\n\t\tlistLocations = pr.getPath();\r\n\r\n\t\t// check maneuver count == 7\r\n\t\t// assertEquals(listLocations.size(),7);\r\n\t\tassertTrue(listLocations.size() > 0);\r\n\t}", "boolean hasRoute(Node to);", "public boolean areRoutesValid() {\n return valid;\n }", "@Test\r\n public void testGetRoute() {\r\n // Test 1 (Short Path)\r\n Path route = backend.getRoute(\"Observatory & Babcock\", \"Liden & Babcock\");\r\n // Verify distance is correct\r\n if(route.getDistance() != 460)\r\n fail(\"Failed to get shortest path\");\r\n // Verify path starts at 'Observatory & Babcock' and ends at 'Liden & Babcock'\r\n if(!route.getPath().get(0).getName().equalsIgnoreCase(\"Observatory & Babcock\") ||\r\n !route.getPath().get(1).getName().equalsIgnoreCase(\"Liden & Babcock\"))\r\n fail(\"Failed to get shortest path\");\r\n\r\n //Test 2 (Short Path w/ POIs)\r\n route = backend.getRoute(\"Mills & Johnson\", \"Brooks & Johnson\");\r\n // Verify distance is correct\r\n if(route.getDistance() != 441)\r\n fail(\"Failed to get shortest path\");\r\n // Verify point of interest\r\n if(!route.getPOI().get(0).equalsIgnoreCase(\"Grand Central\"))\r\n fail(\"Failed to find point of interest\");\r\n }", "int getWayLength();", "@Test\n\tpublic void checkDistanceRouteAD() {\n\t\tassertEquals(Trains.distanceRoute(\"A\", \"D\"), \"5\");\n\t}", "@Test\n\tpublic void testWithAnUnexistenceRoute() {\n\t\tassertEquals(Trains.distanceRoute(\"A\", \"E\", \"D\"), \"NO SUCH ROUTE\");\n\t}", "public boolean routeExists(String to) {\n\tRoutesMap routesMap = forwardTable.get(to);\n\tif(routesMap == null) {\n\t return false;\n\t}\n\treturn (routesMap.size() > 0);\n }", "public boolean meetsMinimumLength(){\n\n return alg.meetsMinimumLength(input.getText().toString());\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn ((front == 0 && rear == MAX_LENGTH - 1) || rear == front - 1);\r\n\t}", "public boolean isFull(){\n return this.top==this.maxLength-1;\n }", "private boolean isLengthCorrect(final String token) {\n return token.length() == VALID_TOKEN_LENGTH;\n }", "public int getNombreLiaison()\t{\r\n \treturn this.routes.size();\r\n }", "public int length() {\n return 1 + this.rest.length(); \n }", "public boolean hasRoute(IPv4Address ip){\n\t\tIterator<RouteEntry> it = routeTable.iterator();\n\t\twhile(it.hasNext()){\n\t\t\tRouteEntry r = it.next();\n\t\t\tSubnetUtils.SubnetInfo si = new SubnetUtils(r.dstNet.toString()).getInfo();\n\t\t\tif(si.isInRange(ip.toString()))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\r\n void findRouteSameLine() {\r\n List<Station> route = model.findRoute(1, 20);\r\n assertNotNull(route);\r\n assertEquals(6, route.size());\r\n assertEquals(\"OakGrove\", route.get(0).getName());\r\n assertEquals(\"NorthStation\", route.get(5).getName());\r\n }", "@Test\n\tpublic void testGetPathLength() {\n\t\tController control = new Controller();\n\t\tBasicRobot robot = new BasicRobot();\n\t\tExplorer explorer = new Explorer();\n\t\tcontrol.setBuilder(Order.Builder.DFS);\n\t\tcontrol.setRobotAndDriver(robot, explorer);\n\t\trobot.setMaze(control);\n\t\tcontrol.turnOffGraphics();\n\t\tcontrol.setSkillLevel(0);\n\t\tcontrol.switchFromTitleToGenerating(0);\n\t\tcontrol.waitForPlayingState();\n\t\texplorer.setRobot(robot);\n\t\tassertTrue(explorer.getPathLength() == 0);\n\t\t// moving the robot one unit and checking the odometer\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\tassertTrue(explorer.getPathLength() > 0);\n\t\t\n\t\t// moving the robot again to get a reading of 2\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\t\n\t\t\n\t\t// moving the robot a third time to make sure that the odometer is updating correctly\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t}", "public int getPathLength();", "private static boolean checkLength(String password) {\n \treturn password.length() >= minLength;\n }", "@Test\n void calculateRoute() {\n GPSObject n2 = new GPSObject(\"Centenary 2\");\n Location n1 = new Location(\"Centenary 2\",\"0\",n2);\n GPSObject n3 = new GPSObject(\"Thuto 1-5\");\n Location n4 = new Location(\"Thuto 1-5\",\"1\",n3);\n Locations loc = new Locations();\n assertNotNull(roo.calculateRoute(loc));\n }", "@java.lang.Override\n @java.lang.Deprecated public int getRouteCount() {\n return route_.size();\n }", "@Test\r\n void findRouteDifferentLine() {\r\n List<Station> route = model.findRoute(9, 60);\r\n assertNotNull(route);\r\n assertEquals(10, route.size());\r\n assertEquals(\"SuffolkDowns\", route.get(0).getName());\r\n assertEquals(\"Broadway\", route.get(9).getName());\r\n }", "public boolean hasRouteDest() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }", "public boolean hasRouteDest() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }", "public void testLength()\n {\n LinearSearch ls = new LinearSearch();\n\n assertFalse(ls.validLength(int [15] haystack));\n }", "private int checkLoopLength(ListNode node) {\n ListNode node1 = node.next;\n\n int length = 1;\n\n while (node1 != node) {\n node1 = node1.next;\n\n length++;\n }\n\n return length;\n }", "private boolean checkPermissions(HttpServletRequest request, RouteAction route) {\n\t\treturn true;\n\t}", "static int size_of_rlc(String passed){\n\t\treturn 1;\n\t}", "private boolean roadCheck(Road road) {\n\t\t\n\t\treturn false;\n\t}", "public boolean canDoBuildInitialRoad(){\n\t\t // If the player already has two roads on the board then he has already placed the initial roads\n\t\t if(playerPieces.getNumberOfRoads() < 14){\n\t\t\t return false;\n\t\t }\n\t\t return true;\n\t }", "static int size_of_ral(String passed){\n\t\treturn 1;\n\t}", "public static boolean vacuumCleanerRoute(String str) {\n int x, y;\n x = y = 0;\n // turn string into char array\n char[] chars = str.toCharArray();\n\n // this solution will also work\n // for (int i = 0; i < str.length(); i++) {\n // char move = chars[i];\n\n // if (move == 'L')\n // x -= 1;\n // else if (move == 'R')\n // x += 1;\n // else if (move == 'U')\n // y += 1;\n // else\n // y -= 1;\n // }\n\n //check every character and see what it matches\n for (char move : chars) {\n if (move == 'L')\n x -= 1;\n else if (move == 'R')\n x += 1;\n else if (move == 'U')\n y += 1;\n else\n y -= 1;\n }\n\n return x == 0 && y == 0;\n }", "public int getRoadLength() {\n \t\treturn roadLength;\n \t}", "static int size_of_rz(String passed){\n\t\treturn 1;\n\t}", "public boolean isFull() {\n\t\treturn (rear+1)%total_size == front;\r\n\t}", "private boolean isFirstMove(int numberGeneratedSoFarLength) {\n\t\treturn numberGeneratedSoFarLength == 1;\n\t}", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "private static void nbRoutesPremierPoint(List<Point> points) {\n if(points == null || points.isEmpty()) {\n System.out.println(\"Aucun point dans l'ensemble des points ...\");\n return;\n }\n Iterator<Point> iter = points.iterator();\n Point p1 = iter.next();\n System.out.println(\"Il y a \"+p1.getNbRoutes()+\" routes qui partent du point p1\");\n }", "@Override\n\tprotected void checkNumberOfInputs(int length) {\n\n\t}", "public boolean hasRoute(List<String> routes) {\n if (routes.isEmpty()) {\n return false;\n }\n int n = 0;\n for (String r: routes) {\n if (hasRoute(r)) {\n n++;\n }\n }\n return n == routes.size();\n }", "private int length() { return length; }", "public boolean isOnRoute() {\n\t\treturn onRoute;\n\t}", "boolean hasDistance();", "public static boolean isAkParamLengthValid(String parameter, int length)\n {\n boolean ret = true;\n if (isConstantAkParamsDefined())\n {\n int i = getAkParamIndex(parameter);\n if (length != akParams_[i].len)\n {\n ret = false;\n Log.e(LOG_TAG, \"In configuration file, the AK parameter \" + parameter + \" values length \"\n + length + \" is NOT compatible to the defined length \" + akParams_[i].len);\n }\n }\n return ret;\n }", "static int size_of_rp(String passed){\n\t\treturn 1;\n\t}", "protected boolean shouldStartRoutes() {\n return isStarted() && !isStarting();\n }", "private boolean hasValidLength()\n {\n final int length = mTextInputLayout.getText().length();\n return (length >= mMinLen && length <= mMaxLen);\n }", "public boolean checkAndMove() {\r\n\r\n\t\tif(position == 0)\r\n\t\t\tdirection = true;\r\n\r\n\t\tguardMove();\r\n\r\n\t\tif((position == (guardRoute.length - 1)) && direction) {\r\n\t\t\tposition = 0;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(direction)\r\n\t\t\tposition++;\r\n\t\telse\r\n\t\t\tposition--;\r\n\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic int inquiry(int route, int departure, int arrival) {\n\t\tint k = route;\r\n\t\tint count = 0;\r\n\t\tticket2.departure = departure;\r\n\t\tticket2.arrival = arrival;\r\n\t\tfor (int i = 1; i <= 8*100; i++){\r\n\t\t\tticket2.seat = i%100;\r\n\t\t\tif (ticket2.passenger == null){\r\n\t\t\t\tif ((departure >= ticket.arrival) | (arrival <= ticket.departure)){\r\n\t\t\t\t\tcount ++;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn count;\r\n\t}", "public void calculateRoute() {\n SKRouteSettings route = new SKRouteSettings();\n route.setStartCoordinate(start);\n route.setDestinationCoordinate(end);\n route.setNoOfRoutes(1);\n switch (routingType) {\n case SHORTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_SHORTEST);\n break;\n case FASTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_FASTEST);\n break;\n case QUIET:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_QUIETEST);\n break;\n }\n route.setRouteExposed(true);\n SKRouteManager.getInstance().calculateRoute(route);\n }", "@Test\r\n public void testGetDistanceOfRoute() {\r\n System.out.println(\"getDistanceOfRoute\");\r\n \r\n String name = \"KiwiLand\";\r\n List<String> _lstStr = Arrays.asList(\"AB5\", \"BC4\", \"CD8\", \"DC8\", \"DE6\", \"AD5\", \"CE2\", \"EB3\", \"AE7\");\r\n Compute instance = new Compute();\r\n instance.initLand(name, _lstStr);\r\n String _strRoute = \"A-B-C\";\r\n int expResult = 9; \r\n int result = instance.getDistanceOfRoute(_strRoute);\r\n assertEquals(expResult, result);\r\n _strRoute = \"A-D\";\r\n expResult = 5;\r\n result = instance.getDistanceOfRoute(_strRoute);\r\n assertEquals(expResult, result);\r\n _strRoute = \"A-D-C\";\r\n expResult = 13;\r\n result = instance.getDistanceOfRoute(_strRoute);\r\n assertEquals(expResult, result);\r\n _strRoute = \"A-E-B-C-D\";\r\n expResult = 22;\r\n result = instance.getDistanceOfRoute(_strRoute);\r\n assertEquals(expResult, result);\r\n _strRoute = \"A-E-D\";\r\n expResult = -1;\r\n result = instance.getDistanceOfRoute(_strRoute);\r\n assertEquals(expResult, result);\r\n \r\n\r\n }", "boolean isFull()\n\t{\n\t\treturn rear==size-1;\n\t}", "public int get_length();", "@Test\r\n\tpublic void testLength() {\r\n\t\tassertEquals(LENGTH, validRectangle.length());\r\n\t}", "@Override\n public boolean validateNotEmptyPartial (String partial)\n {\n return partial.replaceAll(\"[^/]\", \"\").length() < 3 && partial.replaceAll(\"[^0-9]\", \"\").length() < 9 &&\n partial.replaceAll(\"[0-9/]\", \"\").length() == 0;\n }", "public boolean isFull() {\r\n\t\treturn (rear+1)%maxSize==front;\r\n\t}", "boolean hasSegments();", "public int length();", "public int length();", "public int length();", "public int length();", "public int length();", "public Route longestPrefixMatch(IpAddress ip) {\n Iterable<Route> prefixes =\n routeTable.getValuesForKeysPrefixing(RouteTools.createBinaryString(ip.toIpPrefix()));\n\n Iterator<Route> it = prefixes.iterator();\n\n Route route = null;\n while (it.hasNext()) {\n route = it.next();\n }\n\n return route;\n }", "@java.lang.Deprecated public int getRouteCount() {\n if (routeBuilder_ == null) {\n return route_.size();\n } else {\n return routeBuilder_.getCount();\n }\n }", "public int finalizeRouteEnvironment();", "public java.math.BigInteger getFrequencyOfRoute() {\r\n return frequencyOfRoute;\r\n }", "public int calculateDistance(String route) {\r\n if(route.length() < 2)\r\n throw new IllegalArgumentException(\"route is too short\");\r\n \r\n // find first vertex\r\n Vertex currentVertex = null;\r\n for(Vertex v : listOfVertices) {\r\n if(v.getName() == route.charAt(0)) {\r\n currentVertex = v;\r\n break;\r\n }\r\n }\r\n if(currentVertex == null) {\r\n throw new IllegalArgumentException(\"Vertex \" + route.charAt(0) + \" not found\");\r\n }\r\n \r\n int totalDistance = 0;\r\n for(int i = 1; i < route.length(); ++i) {\r\n char nextVertexName = route.charAt(i);\r\n Edge travelledEdge = currentVertex.getJoiningEdgeByName(nextVertexName);\r\n \r\n // check edge between vertices exists, and if not throw exception\r\n if(travelledEdge == null) {\r\n throw new IllegalArgumentException(\"Vertex \" + route.charAt(i) + \" not found\");\r\n }\r\n \r\n // travel edge to next vertex\r\n totalDistance += travelledEdge.getDistance();\r\n currentVertex = travelledEdge.getOppositeVertex(currentVertex);\r\n }\r\n \r\n return totalDistance;\r\n }", "boolean isFull() {return pointer==size;}", "public RouteResponse findRouteTime(RouteRequest routeRequest);", "public void findLength()\n\t{\n\t\tlength = name.length();\n\t}", "public boolean isFull() {\n\t\treturn count == st.length? true : false;\r\n\t}", "static int size_of_rpe(String passed){\n\t\treturn 1;\n\t}", "public abstract int length();", "public abstract int length();" ]
[ "0.673366", "0.64593524", "0.6358811", "0.6356156", "0.6292244", "0.5975037", "0.59735364", "0.5931768", "0.5889477", "0.58708966", "0.57931095", "0.5761087", "0.5758228", "0.5745202", "0.572422", "0.5685838", "0.56764805", "0.5668895", "0.564965", "0.56313837", "0.5610348", "0.5599949", "0.5549677", "0.5512907", "0.5512203", "0.5495755", "0.54784125", "0.54335", "0.541085", "0.5408622", "0.5374689", "0.53268677", "0.5321114", "0.5296775", "0.5227493", "0.52228326", "0.52096695", "0.5203421", "0.5196933", "0.5173655", "0.5166185", "0.51549345", "0.514447", "0.51376486", "0.511408", "0.50928634", "0.5089312", "0.50882465", "0.5069596", "0.50628525", "0.5058208", "0.5050009", "0.50407517", "0.5036136", "0.50198936", "0.50194854", "0.50194854", "0.50194854", "0.50194854", "0.50194854", "0.50194854", "0.50194854", "0.50194854", "0.50194854", "0.50175786", "0.5014148", "0.5008094", "0.50076634", "0.4997801", "0.49963212", "0.49793315", "0.49741638", "0.4972582", "0.49637473", "0.49627468", "0.49616626", "0.49518722", "0.49445716", "0.49424806", "0.49374744", "0.4934984", "0.49317768", "0.49315694", "0.49248236", "0.4924587", "0.4924587", "0.4924587", "0.4924587", "0.4924587", "0.4923196", "0.49007607", "0.4894999", "0.4891865", "0.48909923", "0.48835382", "0.4880605", "0.48787543", "0.48695874", "0.48662826", "0.48626375", "0.48626375" ]
0.0
-1
Create buttons in this page
protected void createButtons(Composite parent) { comRoot = new Composite(parent, SWT.BORDER); comRoot.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false)); comRoot.setLayout(new GridLayout(2, false)); tbTools = new ToolBar(comRoot, SWT.WRAP | SWT.RIGHT | SWT.FLAT); tbTools.setLayout(new GridLayout()); tbTools.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false)); final ToolItem btnSettings = new ToolItem(tbTools, SWT.NONE); btnSettings.setText(Messages.btnAdvancedSettings); btnSettings.setToolTipText(Messages.tipAdvancedSettings); btnSettings.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { PerformanceSettingsDialog dialog = new PerformanceSettingsDialog( getShell(), getMigrationWizard().getMigrationConfig()); dialog.open(); } }); new ToolItem(tbTools, SWT.SEPARATOR); btnPreviewDDL = new ToolItem(tbTools, SWT.CHECK); btnPreviewDDL.setSelection(false); btnPreviewDDL.setText(Messages.btnPreviewDDL); btnPreviewDDL.setToolTipText(Messages.tipPreviewDDL); btnPreviewDDL.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { boolean flag = btnPreviewDDL.getSelection(); switchText(flag); } }); new ToolItem(tbTools, SWT.SEPARATOR); final ToolItem btnExportScript = new ToolItem(tbTools, SWT.NONE); btnExportScript.setText(Messages.btnExportScript); btnExportScript.setToolTipText(Messages.tipSaveScript); btnExportScript.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { exportScriptToFile(); } }); new ToolItem(tbTools, SWT.SEPARATOR); final ToolItem btnUpdateScript = new ToolItem(tbTools, SWT.NONE); btnUpdateScript.setText(Messages.btnUpdateScript); btnUpdateScript.setToolTipText(Messages.tipUpdateScript); btnUpdateScript.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { prepare4SaveScript(); getMigrationWizard().saveMigrationScript(false, isSaveSchema()); MessageDialog.openInformation(PlatformUI.getWorkbench() .getDisplay().getActiveShell(), Messages.msgInformation, Messages.setOptionPageOKMsg); } }); btnUpdateScript .setEnabled(getMigrationWizard().getMigrationScript() != null); new ToolItem(tbTools, SWT.SEPARATOR); final ToolItem btnNewScript = new ToolItem(tbTools, SWT.NONE); btnNewScript.setText(Messages.btnCreateNewScript); btnNewScript.setToolTipText(Messages.tipCreateNewScript); btnNewScript.addSelectionListener(new SelectionAdapter() { public void widgetSelected(final SelectionEvent event) { prepare4SaveScript(); String name = EditScriptDialog.getMigrationScriptName( getShell(), getMigrationWizard().getMigrationConfig() .getName()); if (StringUtils.isBlank(name)) { return; } getMigrationWizard().getMigrationConfig().setName(name); getMigrationWizard().saveMigrationScript(true, isSaveSchema()); btnUpdateScript.setEnabled(getMigrationWizard() .getMigrationScript() != null); MessageDialog.openInformation(PlatformUI.getWorkbench() .getDisplay().getActiveShell(), Messages.msgInformation, Messages.setOptionPageOKMsg); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Color.cyan);\n\t\tbutton4 = new GButton(\"Return to Menu\", 250, 475, 200, 50, Color.cyan);\n\n\t\tescapeButtons.add(button1);\n\t\tescapeButtons.add(button3);\n\t\tescapeButtons.add(button4);\n\n\t}", "private void createButtonsPanel() {\r\n Composite buttonsPanel = new Composite(this, SWT.NONE);\r\n buttonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\r\n buttonsPanel.setLayout(new GridLayout(4, true));\r\n\r\n getButtonFromAction(buttonsPanel, \"New\", new NewAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Save\", new SaveAction());\r\n getButtonFromAction(buttonsPanel, \"Delete\", new DeleteAction(_window));\r\n getButtonFromAction(buttonsPanel, \"Cancel\", new CancelAction());\r\n }", "public void createButtons() {\n\t\tbutton1 = new JButton(\"Button1\");\n\t\tbutton2 = new JButton(\"Button2\");\n\t\tbutton3 = new JButton(\"Button3\");\n\t\tbutton4 = new JButton(\"Button4\");\n\t\tbutton5 = new JButton(\"Button5\");\n\t}", "public void createButtons() {\n\n addRow = new JButton(\"Add row\");\n add(addRow);\n\n deleteRow = new JButton(\"Delete row\");\n add(deleteRow);\n }", "private void createButton(){\n addButton();\n addStartButton();\n }", "private JPanel createButtons()\r\n\t{\r\n\t\tJPanel buttons = new JPanel();\r\n\t\tbuttons.setLayout(new FlowLayout(FlowLayout.TRAILING));\r\n\r\n\r\n\t\tButton save = new Button(PrimeMain1.texts.getString(\"save\"));\r\n\t\tsave.addActionListener(this);\r\n\t\tsave.setActionCommand(\"save\");\r\n\r\n\t\tButton cancel = new Button(PrimeMain1.texts.getString(\"cancel\"));\r\n\t\tcancel.addActionListener(this);\r\n\t\tcancel.setActionCommand(\"cancel\");\r\n\r\n\r\n\t\tbuttons.add(save);\r\n\t\tbuttons.add(cancel);\r\n\r\n\t\treturn buttons;\r\n\t}", "Button createButton();", "private void generateButtons(){\n\t\tint coordX = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tint coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\t//Button button = new Button(coordX, coordY);\n\t\t//buttons.put(0, button);\n\t}", "private void setupButtons() {\n\t\tsetupCreateCourse();\n\t\tsetupRemoveCourse();\n\t\tsetupCreateOffering();\n\t\tsetupRemoveOffering();\n\t\tsetupAddPreReq();\n\t\tsetupRemovePreReq();\n\t\tsetupBack();\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 HBox createButtons() {\n\t\tButton solve = new Button(\"Solve\");\n\t\tButton clear = new Button(\"Clear\");\n\t\tButton quit = new Button(\"Quit\");\n\t\t\n\t\tsolve.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tclear.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\tquit.setStyle(\"-fx-font: 12 arial; -fx-base: #336699;\");\n\t\t\n\t\tsolve.setOnAction(e -> solve());\n\t\tclear.setOnAction(e -> clear());\n\t\tquit.setOnAction(e -> quit());\n\t\t\n\t\tHBox buttons = new HBox();\n\t\tbuttons.setSpacing(20);\n\t\tbuttons.setPadding(new Insets(20,20,20,20));\n\t\tbuttons.setAlignment(Pos.CENTER);\n\t\tbuttons.getChildren().addAll(solve, clear, quit);\n\t\tbuttons.setStyle(\"-fx-background-color: #DCDCDC;\");\n\t\t\n\t\treturn buttons;\n\t}", "public void createGameButtons() {\n \tcreateGameButton(myResources.getString(\"startcommand\"), 1, GAME_BUTTON_XLOCATION, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"stopcommand\"), 0, GAME_BUTTON_XLOCATION * 3, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"speedup\"), SPEED_INCREASE, GAME_BUTTON_XLOCATION*5, GAME_BUTTON_YLOCATION);\n \tcreateGameButton(myResources.getString(\"slowdown\"), 1/SPEED_INCREASE, GAME_BUTTON_XLOCATION*7, GAME_BUTTON_YLOCATION);\n }", "private void addViewBody() {\n\t\tJButton medicosButton = new JButton(\"Médicos\");\n\t\tmedicosButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new MedicosView());\n\t\t});\n\t\tthis.add(medicosButton);\n\n\t\tJButton clientesButton = new JButton(\"Clientes\");\n\t\tclientesButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new ClientesView());\n\t\t});\n\t\tthis.add(clientesButton);\n\n\t\tJButton novaConsultaButton = new JButton(\"Nova Consulta\");\n\t\tnovaConsultaButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new CadastroConsultaView());\n\t\t});\n\t\tthis.add(novaConsultaButton);\n\n\t\tJButton novoTesteButton = new JButton(\"Novo Teste [EM BREVE]\");\n\t\tnovoTesteButton.setEnabled(false);\n\t\tthis.add(novoTesteButton);\n\t}", "@Override\n\tprotected void createCompButtons() {\n\t\tbuildCompButtons();\n\t}", "private void createButton() throws SlickException {\n int width = 25*getGameContainer().getWidth()/100;\n int height = 10*getGameContainer().getHeight()/100;\n\n Image login = new Image(getReaderXmlFile().read(\"buttonLogin\")).getScaledCopy(width, height);\n Coordinate posLogin = new Coordinate((getGameContainer().getWidth() - login.getWidth())/2,55*getGameContainer().getHeight()/100);\n loginButton = new Button(getGameContainer(), login, posLogin, IDStates.MENU_STATE, this);\n\n Image account = new Image(getReaderXmlFile().read(\"buttonAccount\")).getScaledCopy(width, height);\n Coordinate posAccount = new Coordinate((getGameContainer().getWidth() - account.getWidth())/2,70*getGameContainer().getHeight()/100);\n accountButton = new Button(getGameContainer(), account, posAccount, IDStates.MENU_STATE, this);\n }", "private void createButtons() {\n Button helpSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -5797923866320649518L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToHelp();\n }\n });\n\n// Button skillSettingsButton = new Button(\"\",\n// new Button.ClickListener() {\n// private static final long serialVersionUID = 7147554466396214893L;\n//\n// @Override\n// public void buttonClick(ClickEvent event) {\n// settingsPresenter.navigateToSkills();\n// }\n// });\n// skillSettingsButton.addStyleName(\"icon-cog\");\n\n Button medicSettingsButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = 7147554466396214893L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateToMedic();\n }\n });\n\n\n Button logoutButton = new Button(\"\",\n new Button.ClickListener() {\n private static final long serialVersionUID = -1096188732209266611L;\n\n @Override\n public void buttonClick(ClickEvent event) {\n settingsPresenter.navigateBack();\n }\n });\n logoutButton.addStyleName(\"default\");\n\n // Adding and aligning the 3 Buttons.\n //Setting a Description for the buttons which is displayed when flying over the button\n super.verticalNavigation.addComponent(helpSettingsButton);\n super.verticalNavigation.setComponentAlignment(helpSettingsButton, Alignment.MIDDLE_CENTER);\n helpSettingsButton.setDescription(\"Set the Help options for the Patient\");\n helpSettingsButton.setIcon(new ThemeResource(\"img/contacgg.png\"), BUTTON_HELP_SETTINGS);\n helpSettingsButton.setWidth(BUTTON_WIDTH);\n helpSettingsButton.setHeight(BUTTON_HEIGHT);\n\n super.verticalNavigation.addComponent(medicSettingsButton);\n super.verticalNavigation.setComponentAlignment(medicSettingsButton, Alignment.MIDDLE_CENTER);\n medicSettingsButton.setDescription(\"Set the Medication options for the Patient\");\n medicSettingsButton.setIcon(new ThemeResource(\"img/medicine-icon-cog.png\"),BUTTON_MEDIC_SETTINGS);\n medicSettingsButton.setWidth(BUTTON_WIDTH);\n medicSettingsButton.setHeight(BUTTON_HEIGHT);\n\n// addComponent(skillSettingsButton);\n// setComponentAlignment(skillSettingsButton, Alignment.MIDDLE_CENTER);\n// skillSettingsButton.setDescription(\"Set the Skill options for the Patient\");\n// skillSettingsButton.setIcon(new ThemeResource(\"img/skill2-icon-cog.png\"), BUTTON_SKILL_SETTINGS);\n// skillSettingsButton.setWidth(BUTTON_WIDTH);\n// skillSettingsButton.setHeight(BUTTON_HEIGHT);\n\n logoutButton.setWidth(BUTTON_WIDTH);\n super.verticalNavigation.addComponent(logoutButton);\n super.verticalNavigation.setComponentAlignment(logoutButton, Alignment.MIDDLE_CENTER);\n logoutButton.setDescription(\"You will be logged out\");\n logoutButton.setIcon(new ThemeResource(\"img/logout.png\"), BUTTON_LOGOUT);\n logoutButton.setWidth(BUTTON_WIDTH);\n logoutButton.setHeight(BUTTON_HEIGHT);\n\n }", "@Override\n\tprotected void createCompButtons() {\n\t\tbtnExcelReport = new Button(getCompButtons(), SWT.NONE);\n\t\tbtnExcelReport.setText(\"Excel Report\");\n\t\tbtnExcelReport.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnExcelReport\n\t\t.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(\n\t\t\t\t\torg.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdExcelReportWidgetSelected();\n\t\t\t}\n\t\t});\n\t}", "private void createComponentForButtons(Composite section)\n {\n createRowForNewStyleButton(section);\n createRowForNewRegexButton(section);\n createRowForNewColumnButton(section);\n createRowForDeleteButton(section);\n createRowForDeleteAllButton(section);\n }", "private void createBottomActionButtons() {\n Composite actionControlComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n actionControlComp.setLayout(gl);\n actionControlComp.setLayoutData(gd);\n\n Button okBtn = new Button(actionControlComp, SWT.PUSH);\n okBtn.setText(\" OK \");\n okBtn.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (verifySelection()) {\n close();\n }\n }\n });\n\n Button cancelBtn = new Button(actionControlComp, SWT.PUSH);\n cancelBtn.setText(\" Cancel \");\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n close();\n }\n });\n }", "@Override\n\tpublic Button createButton() {\n\t\treturn new HtmlButton();\n\t}", "private void createButtons() {\n\tTexture startGameTex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_start.png\"));\n\tTexture plane_p1_tex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_player1.png\"));\n\tTexture plane_p2_tex = new Texture(\n\t\tGdx.files.internal(\"assets/data/menu/menu_player2.png\"));\n\n\tplayButton = new Button(\"\", font, 0, 0, new TextureRegion(startGameTex,\n\t\t0, 0, 161, 20), new TextureRegion(startGameTex, 0, 0, 161, 20),\n\t\tnew ScreenSwitchHandler(Screen.GAME));\n\tplaneButton_p1 = new Button(\"\", font, 0, 0, new TextureRegion(\n\t\tplane_p1_tex, 0, 0, 161, 20), new TextureRegion(plane_p1_tex,\n\t\t0, 0, 161, 20), new ScreenSwitchHandler(Screen.PLANE_P1));\n\tplaneButton_p2 = new Button(\"\", font, 0, 0, new TextureRegion(\n\t\tplane_p2_tex, 0, 0, 161, 20), new TextureRegion(plane_p2_tex,\n\t\t0, 0, 161, 20), new ScreenSwitchHandler(Screen.PLANE_P2));\n\toptionsButton = new Button(\"Options\", font, new ScreenSwitchHandler(\n\t\tScreen.OPTIONS));\n\texitButton = new Button(\"Exit\", font, new ButtonHandler() {\n\t @Override\n\t public void onClick() {\n\t\tGdx.app.exit();\n\t }\n\n\t @Override\n\t public void onRelease() {\n\t\t// TODO Auto-generated method stub\n\n\t }\n\t});\n }", "private void initButtons() {\n HBox buttons = new HBox(50);\n yes = new Button(\"Yes!\");\n no = new Button(\"No!\");\n buttons.getChildren().addAll(yes,no);\n buttons.setAlignment(Pos.CENTER);\n root.getChildren().addAll(buttons);\n }", "public void createOrderBtn(){\n createOrderBtn = new Button(\"Create order\");\n createOrderBtn.setLayoutX(305);\n createOrderBtn.setLayoutY(710);\n createOrderBtn.setPrefWidth(480);\n createOrderBtn.setPrefHeight(50);\n createOrderBtn.setStyle(\"-fx-background-color: #34ffb9\");\n createOrderBtn.setFont(new Font(18));\n createOrderBtn.setOnAction(event -> createOrderInDB());\n\n root.getChildren().addAll(createOrderBtn);\n }", "protected void createButtons(Panel panel) {\n panel.add(new Filler(24,20));\n\n Choice drawingChoice = new Choice();\n drawingChoice.addItem(fgUntitled);\n\n\t String param = getParameter(\"DRAWINGS\");\n\t if (param == null)\n\t param = \"\";\n \tStringTokenizer st = new StringTokenizer(param);\n while (st.hasMoreTokens())\n drawingChoice.addItem(st.nextToken());\n // offer choice only if more than one\n if (drawingChoice.getItemCount() > 1)\n panel.add(drawingChoice);\n else\n panel.add(new Label(fgUntitled));\n\n\t\tdrawingChoice.addItemListener(\n\t\t new ItemListener() {\n\t\t public void itemStateChanged(ItemEvent e) {\n\t\t if (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t loadDrawing((String)e.getItem());\n\t\t }\n\t\t }\n\t\t }\n\t\t);\n\n panel.add(new Filler(6,20));\n\n Button button;\n button = new CommandButton(new DeleteCommand(\"Delete\", fView));\n panel.add(button);\n\n button = new CommandButton(new DuplicateCommand(\"Duplicate\", fView));\n panel.add(button);\n\n button = new CommandButton(new GroupCommand(\"Group\", fView));\n panel.add(button);\n\n button = new CommandButton(new UngroupCommand(\"Ungroup\", fView));\n panel.add(button);\n\n button = new Button(\"Help\");\n\t\tbutton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n\t\t showHelp();\n\t\t }\n\t\t }\n\t\t);\n panel.add(button);\n\n fUpdateButton = new Button(\"Simple Update\");\n\t\tfUpdateButton.addActionListener(\n\t\t new ActionListener() {\n\t\t public void actionPerformed(ActionEvent event) {\n if (fSimpleUpdate)\n setBufferedDisplayUpdate();\n else\n setSimpleDisplayUpdate();\n\t\t }\n\t\t }\n\t\t);\n\n // panel.add(fUpdateButton); // not shown currently\n }", "private void iterateOverButtons(){\n int columnRows = 4;\n integerButtons = new Button[MAX_BUTTONS];\n for (int i = 0; i < integerButtons.length; ++i) {\n integerButtons[i] = new Button(buttonText[i]);\n integerButtons[i].setId(\"buttons\");\n integerButtons[i].setPrefSize(60, 80);\n gridPane.add(integerButtons[i], i % columnRows , i / columnRows);\n }\n }", "protected void createSaveButtons() {\n Composite buttonComp = new Composite(shell, SWT.NONE);\n buttonComp.setLayout(new GridLayout(2, true));\n buttonComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,\n false));\n\n int buttonWidth = 80;\n GridData gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button saveBtn = new Button(buttonComp, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n handleSaveAction();\n }\n });\n\n gd = new GridData(SWT.LEFT, SWT.DEFAULT, true, false);\n gd.widthHint = buttonWidth;\n Button cancelBtn = new Button(buttonComp, SWT.PUSH);\n cancelBtn.setText(\"Cancel\");\n cancelBtn.setLayoutData(gd);\n cancelBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n setReturnValue(null);\n close();\n }\n });\n }", "private void createbuttons(){\n newPatient = (Button) findViewById(R.id.newButton);\n newPatient.setOnClickListener(buttonClick);\n\n registeredPatient = (Button) findViewById(R.id.registeredButton);\n registeredPatient.setOnClickListener(buttonClick);\n\n viewManagement = (Button) findViewById(R.id.viewStaffActivitiesButton);\n viewManagement.setOnClickListener(buttonClick);\n }", "private void createButtons() {\n\t\tfor (int x = 0; x < buttons.length; x++)\n\t\t\tfor (int y = 0; y < buttons[x].length; y++) {\n\t\t\t\tif ((x % 2 == 0 && y % 2 == 0) || (x % 2 == 1 && y % 2 == 1))\n\t\t\t\t\tbuttons[x][y] = new DarkButton();\n\t\t\t\telse\n\t\t\t\t\tbuttons[x][y] = new LightButton();\n\n\t\t\t\tbuttonListener(x, y);\n\t\t\t}\n\t\t\t\n\t\t\tinitButtonIcons();\n\t}", "void createButtons(Container cp) {\r\n JPanel pn4 = new JPanel(); // create a panel\r\n pn4.setLayout(new FlowLayout(FlowLayout.LEFT)); // set the layout\r\n for (int i=0; i<strClEx.length; i++) {\r\n // repeat for the number of the buttons\r\n bt[i] = new JButton(strClEx[i]); // create a button\r\n bt[i].addActionListener(this); // add the action listener to the button\r\n pn4.add(bt[i]); // add the button to the panel\r\n }\r\n cp.add(pn4); // add the panel to the container\r\n }", "private void createButtonsPane(VBox labelsPane){\n\t\tHBox buttonsPane = new HBox();\n\t\tButton easy = new Button(\"EASY\");\n\t\teasy.setFont(new Font(\"Arial Black\", 12));\n\t\teasy.setTextFill(Color.BLUE);\n\t\teasy.setFocusTraversable(false);\n\t\tButton medium = new Button(\"MEDIUM\");\n\t\tmedium.setFont(new Font(\"Arial Black\", 12));\n\t\tmedium.setTextFill(Color.BLUE);\n\t\tmedium.setFocusTraversable(false);\n\t\tButton hard = new Button(\"HARD\");\n\t\thard.setFont(new Font(\"Arial Black\", 12));\n\t\thard.setTextFill(Color.BLUE);\n\t\thard.setFocusTraversable(false);\n\t\tbuttonsPane.getChildren().addAll(easy, medium, hard);\n\t\tbuttonsPane.setMargin(easy, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(medium, new Insets(10,5,5,5));\n\t\tbuttonsPane.setMargin(hard, new Insets(10,5,5,5));\n\t\tbuttonsPane.setSpacing(20);\n\t\tbuttonsPane.setAlignment(Pos.CENTER);\n\t\tbuttonsPane.setStyle(\"-fx-background-color: gray;\");\n\t\teasy.setOnAction(new EasyHandler());\n\t\tmedium.setOnAction(new MediumHandler());\n\t\thard.setOnAction(new HardHandler());\n\t\tlabelsPane.getChildren().add(buttonsPane);\n\t}", "public void createInstructionButton() {\n \tEventHandler<MouseEvent> eventHandler = new EventHandler<MouseEvent>() {\n\t @Override public void handle(MouseEvent e) {\n\t \tshowInstructions();}\n };\n \tcreateGenericButton(2, 0, myResources.getString(\"guide\"), eventHandler);\n }", "private void addButtons() {\r\n\t\troot.getChildren().add(button); // creating the Easy button \r\n\t\tb1 = new Button(\"Easy\");\r\n\t\tb1.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Easy\";\r\n\t\t\t}\r\n\t\t});\r\n\t\troot.getChildren().add(b1); // creating the Normal button\r\n\t\tb2 = new Button(\"Normal\");\r\n\t\tb2.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Normal\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb2.setLayoutX(50);\r\n\t\troot.getChildren().add(b2); // creating the Hard button\r\n\t\tb3 = new Button(\"Hard\");\r\n\t\tb3.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent ke) {\r\n\t\t\t\tdiff = \"Hard\";\r\n\t\t\t}\r\n\t\t});\r\n\t\tb3.setLayoutX(115);\r\n\t\troot.getChildren().add(b3);\r\n\t}", "void createButton(Button main){\n\t\tActions handler = new Actions();\r\n\t\tmain.setOnAction(handler);\r\n\t\tmain.setFont(font);\r\n\t\t//sets button preference dimensions and label \r\n\t\tmain.setPrefWidth(100);\r\n\t\tmain.setPrefHeight(60);\r\n\t\tmain.setText(\"Close\");\r\n\t}", "public void clickOnCreateButton() {\n\t\twaitForElement(createButton);\n\t\tclickOn(createButton);\n\t}", "@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }", "private void createButton() {\n this.setIcon(images.getImageIcon(fileName + \"-button\"));\n this.setActionCommand(command);\n this.setPreferredSize(new Dimension(width, height));\n this.setMaximumSize(new Dimension(width, height));\n }", "@Override\n public Button createButton() {\n return new WindowsButton();\n }", "private void createUIComponents() {\n bt1 = new JButton(\"Hola\");\n }", "private Button constructCreationLinkButton(UUID creationID){\n\n CreationControllable cc = (CreationControllable) builder.getControllers()[1];\n if (!cc.containsCreation(creationID)){\n return null;\n }\n\n String[] creationInfo = cc.viewCreationSummary(creationID, viewer);\n Button b = new Button(creationInfo[0] + \" ( \" + creationInfo[1] + \" ) By: \"+ creationInfo[2]);\n\n b.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n stage.close();\n CreationViewController controller = getCreationBrowserController();\n if (controller == null){\n return;\n }\n controller.linkCreationCallback(creationID);\n stage.show();\n }\n });\n\n return b;\n }", "private void createBeginningButtons() {\n\t createStartButtons(myResources.getString(\"game1\"), 0, 0);\n\t\tcreateStartButtons(myResources.getString(\"game2\"), 0, 1);\n\t\tcreateStartButtons(myResources.getString(\"game3\"), 0, 2);\n\t\tcreateStartButtons(myResources.getString(\"game4\"), 0, 3);\n\t\tcreateStartButtons(myResources.getString(\"game5\"), 0, 4);\n\t\tcreateInstructionButton();\n\t\tcreateStartingLabel();\n\t\tcreateGridSizeButton();\n }", "private void generateButtonPanel() {\n buttonsPanel = new JPanel();\n playPauseButton = addButton(\"Play/Pause\");\n restartButton = addButton(\"Restart\");\n speedUpButton = addButton(\"Speed Up\");\n slowDownButton = addButton(\"Slow Down\");\n loopbackButton = addButton(\"Loopback\");\n keyCommandsButton = addButton(\"Key Commands\");\n textViewButton = addButton(\"Animation Text\");\n\n addShapeButton = addButton(\"Add Shape\");\n removeShapeButton = addButton(\"Remove Shape\");\n addKeyframeButton = addButton(\"Add Keyframe\");\n removeKeyframeButton = addButton(\"Remove Keyframe\");\n editKeyframeButton = addButton(\"Edit Keyframe\");\n clearAnimationButton = addButton(\"Clear Animation\");\n clearShapeButton = addButton(\"Clear Shape\");\n buttonsPanel.setLayout(new FlowLayout());\n\n mainPanel.add(buttonsPanel);\n }", "public HBox hbButtons() {\r\n\r\n HBox hbBottom = new HBox(10); //HBox for buttons at the bottom\r\n\r\n hbBottom.setAlignment(Pos.CENTER); //Set Buttoms to center\r\n hbBottom.setPadding(new Insets(10, 1, 1, 1)); //Padd it\r\n\r\n //SetId\r\n btnConfirm.setId(\"btn\");\r\n btnEdit.setId(\"btn\");\r\n\r\n //Add buttons to the bottom HBox\r\n hbBottom.getChildren().addAll(btnConfirm, btnEdit);\r\n\r\n //Handlers\r\n btnConfirm.setOnAction(new ConfirmHandler()); //Handler for confirm\r\n btnEdit.setOnAction(new EditHandler()); //Handler for edit\r\n\r\n return hbBottom;\r\n\r\n }", "protected void drawButtons() {\n\t\tint spaceX = 50;\n\t\tint spaceY = 500;\t\n\t\t\n\t\tint aux = 1;\n\t\tfor(int i = 65; i < 91; i++) {\n\n\t\t\tLetterButton button = new LetterButton((char) i, (25 + spaceX ) * aux, spaceY);\n\t\t\taux++;\n\t\t\tif(aux == 14) {\n\t\t\t\tspaceY += 25 + 50;\n\t\t\t\taux = 1;\n\t\t\t}\n\t\t\tthis.add(button);\n\t\t}\n\t\t\n\t}", "public void clickCreateButton() {\n this.action.click(this.createButton);\n }", "public void createButtonGrid() {\n\t\tbuttonPanel.setOpaque(false);\n\t\t\n\t\t// designs array of buttons\n\t\tfor (int counter = 1; counter <= 20; counter++) {\n\t\t\tbuttonArray[counter] = new JButton();\n\t\t\tbuttonArray[counter].setOpaque(false);\n\t\t\tbuttonArray[counter].setVisible(true);\n\t\t\tbuttonArray[counter].setBorderPainted(false);\n\t\t\tbuttonArray[counter].setHorizontalTextPosition(JButton.CENTER);\n\t\t\tbuttonArray[counter].setVerticalTextPosition(SwingConstants.CENTER);\n\t\t\tbuttonArray[counter].setFont(new Font(\"Courier\", Font.PLAIN, 15));\n\t\t\tbuttonArray[counter].setText(\"<html><font color = white>\" + Integer.toString(counter) + \"</font></html>\");\n\t\t\t// add action listener to each button\n\t\t\tbuttonArray[counter].addActionListener(eventsMain);\n\t\t\t// add each button to the container\n\t\t\tbuttonPanel.add(buttonArray[counter]);\n\t\t}\n\t\t\n\t\t// set colour for ach row of buttons\n\t\tfor (int counter = 1; counter <= 20; counter++) {\n\t\t\tif (counter >= 1 && counter < 6) {\n\t\t\t\tbuttonArray[counter].setIcon(btnBlue);\n\t\t\t} else if (counter > 5 && counter < 11) {\n\t\t\t\tbuttonArray[counter].setIcon(btnGreen);\n\t\t\t} else if (counter > 10 && counter < 16) {\n\t\t\t\tbuttonArray[counter].setIcon(btnRed);\n\t\t\t} else if (counter > 15 && counter < 21) {\n\t\t\t\tbuttonArray[counter].setIcon(btnGray);\n\t\t\t}\n\t\t}\n\t}", "private void addUniqueToViewNodes() {\n\t\taddFilterButton();\n\t\t\n\t\t/* Button Initialization */\n\t\t//This Button Creates a Report\n\t\tcreateReportBtn = new Button(\"Create Report\");\n\t\tcreateReportBtn.getStyleClass().add(\"GreenButton\");\n\t\tcreateReportBtn.setOnAction(e -> {\n\t\t\tCreateReportPopup crPopup = new CreateReportPopup(\"Create Report\");\n\t\t\tcrPopup.show();\n\t\t});\n\t\t\n\t\t// This Button views the currently selected report in more detail\n\t\treportDetailsBtn = new Button(\"Report Details\");\n\t\treportDetailsBtn.getStyleClass().add(\"GreenButton\");\n\t\t\n\t\t/* Assembly */\n\t\tactionButtons.getChildren().addAll(createReportBtn, reportDetailsBtn);\n\t\t\n\t\tactionButtons.setPrefHeight(Values.ACTION_BUTTONS_PREF_WIDTH);\n\t}", "public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\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 }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(550, 400);\n\t\tshell.setText(\"Source A Antenna 1 Data\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnNewButton_1.setBounds(116, 10, 98, 30);\n\t\tbtnNewButton_1.setText(\"pol 1\");\n\t\t\n\t\tButton btnPol = new Button(shell, SWT.NONE);\n\t\tbtnPol.setText(\"pol 2\");\n\t\tbtnPol.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol.setBounds(220, 10, 98, 30);\n\t\t\n\t\tButton btnPol_1 = new Button(shell, SWT.NONE);\n\t\tbtnPol_1.setText(\"pol 3\");\n\t\tbtnPol_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_1.setBounds(324, 10, 98, 30);\n\t\t\n\t\tButton btnPol_2 = new Button(shell, SWT.NONE);\n\t\tbtnPol_2.setText(\"pol 4\");\n\t\tbtnPol_2.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_2.setBounds(428, 10, 98, 30);\n\t\t\n\t\tButton button_3 = new Button(shell, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tPlot_graph nw = new Plot_graph();\n\t\t\t\tnw.GraphScreen();\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(116, 46, 98, 30);\n\t\t\n\t\tButton button_4 = new Button(shell, SWT.NONE);\n\t\tbutton_4.setBounds(116, 83, 98, 30);\n\t\t\n\t\tButton button_5 = new Button(shell, SWT.NONE);\n\t\tbutton_5.setBounds(116, 119, 98, 30);\n\t\t\n\t\tButton button_6 = new Button(shell, SWT.NONE);\n\t\tbutton_6.setBounds(116, 155, 98, 30);\n\t\t\n\t\tButton button_7 = new Button(shell, SWT.NONE);\n\t\tbutton_7.setBounds(220, 155, 98, 30);\n\t\t\n\t\tButton button_8 = new Button(shell, SWT.NONE);\n\t\tbutton_8.setBounds(220, 119, 98, 30);\n\t\t\n\t\tButton button_9 = new Button(shell, SWT.NONE);\n\t\tbutton_9.setBounds(220, 83, 98, 30);\n\t\t\n\t\tButton button_10 = new Button(shell, SWT.NONE);\n\t\tbutton_10.setBounds(220, 46, 98, 30);\n\t\t\n\t\tButton button_11 = new Button(shell, SWT.NONE);\n\t\tbutton_11.setBounds(428, 155, 98, 30);\n\t\t\n\t\tButton button_12 = new Button(shell, SWT.NONE);\n\t\tbutton_12.setBounds(428, 119, 98, 30);\n\t\t\n\t\tButton button_13 = new Button(shell, SWT.NONE);\n\t\tbutton_13.setBounds(428, 83, 98, 30);\n\t\t\n\t\tButton button_14 = new Button(shell, SWT.NONE);\n\t\tbutton_14.setBounds(428, 46, 98, 30);\n\t\t\n\t\tButton button_15 = new Button(shell, SWT.NONE);\n\t\tbutton_15.setBounds(324, 46, 98, 30);\n\t\t\n\t\tButton button_16 = new Button(shell, SWT.NONE);\n\t\tbutton_16.setBounds(324, 83, 98, 30);\n\t\t\n\t\tButton button_17 = new Button(shell, SWT.NONE);\n\t\tbutton_17.setBounds(324, 119, 98, 30);\n\t\t\n\t\tButton button_18 = new Button(shell, SWT.NONE);\n\t\tbutton_18.setBounds(324, 155, 98, 30);\n\n\t}", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent)\n\t{\n\t\tButton button_1 = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,\n\t\t\t\ttrue);\n\t\tbutton_1.setText(\"Ja\");\n\t\tButton button = createButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\n\t\tbutton.setText(\"Nein\");\n\t}", "public void buildButtons() {\r\n\t\tImage temp1= display_img.getImage();\r\n\t\tImageIcon img=new ImageIcon(temp1.getScaledInstance(800, 800, Image.SCALE_SMOOTH));\r\n\t\timg1 = img.getImage();\r\n\t\tfor(int y=0;y<10;y++) {\r\n\t\t\tfor(int x=0; x<10; x++) {\r\n\t\t\t\tImage image = Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(img1.getSource(), new CropImageFilter(x * 800 / 10, y * 800 / 10, 100, 100)));\r\n\t\t\t\tImageIcon icon = new ImageIcon(image);\r\n\t\t\t\tJButton temp = new JButton(icon);\r\n\t\t\t\ttemp.putClientProperty(\"position\", new Point(y,x));\r\n\t\t\t\tsolutions.add(new Point(y,x));\r\n\t\t\t\ttemp.putClientProperty(\"isLocked\", false);\r\n\t\t\t\ttemp.addMouseListener(new DragMouseAdapter());\r\n\t\t\t\tgrid[x][y]=temp;\r\n\r\n\t\t\t\tbuttons.add(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \" 设 置 \",\n\t\t\t\ttrue);//IDialogConstants.CANCEL_LABEL\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\" 取 消 \", false);//IDialogConstants.CANCEL_LABEL\n\t}", "private void createButtons(GridBagConstraints gridBagConstraints) {\n\t\tgridBagConstraints.gridx = 0;\n\t\tgridBagConstraints.gridy = 3;\n\t\tfileInputPanel.add(evolveButton, gridBagConstraints);\n\n\t\tgridBagConstraints.gridx = 1;\n\t\tgridBagConstraints.gridy = 3;\n\t\tfileInputPanel.add(simulateButton, gridBagConstraints);\n\t}", "private JComponent buildButtons() {\n Panel panel = new Panel();\n panel.setLayout(new FlowLayout(FlowLayout.RIGHT));\n JButton button = Buttons.create(\"Create\").onClick((ev) -> {\n try {\n group.setName(name.getText());\n group.clearUsers();\n list.getSelectedValuesList().forEach((item) -> {\n group.addUser(item);\n });\n if (group.getName().isEmpty()) {\n JOptionPane.showMessageDialog(null, \"Name is required\");\n return;\n }\n if (!group.hasUsers()) {\n JOptionPane.showMessageDialog(null, \"Users are required\");\n return;\n }\n if (group.getId() == 0) {\n GroupRepository.get().save(group);\n } else {\n GroupRepository.get().update(group);\n }\n SwingUtilities.getWindowAncestor(this).dispose();\n } catch (RepositoryException ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n });\n button.setIcon(IconFactory.get().create(\"fa:check\"));\n panel.add(button);\n return panel;\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "private void createButton(int i){\n\t\tint x = 10, y = 120, width = 100, height = 20;\n\t\tint temp = 0;\n\t\t\n\t\tbuttons.add(new JButton(\"New Student\"));\n\t\tbuttons.get(i).addActionListener(this);\n\t\t\n\t\tfor (int a = 0; a<i; a++){\n\t\t\tx += 110;\n\t\t\ttemp++;\n\t\t\tif(temp >= Integer.parseInt(askColumns.getText())){\n\t\t\t\ty += 140;\n\t\t\t\tx = 10;\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\t\n\t\t\n\t\tbuttons.get(i).setBounds(x, y, width, height);\n\t\tthis.add(buttons.get(i));\t\n\t\tbuttons.get(i).revalidate();\n\t\tbuttons.get(i).repaint();\n\t\t\n\t}", "public HomePageHelper writeTextOfButtons(){\n System.out.println (\"Quantity of elements: \" + languagesButtons.size());\n for(WebElement el : languagesButtons){\n System.out.println(\"Tag Name: \" + el.getTagName());\n System.out.println(\"attr: ng-click - \" + el.getAttribute(\"ng-click\"));\n }\n return this;\n }", "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 createContents() {\r\n\t\tshell = new Shell(getParent(), getStyle());\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(getText());\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite = new Composite(shell, SWT.NONE);\r\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite_1 = new Composite(composite, SWT.NONE);\r\n\t\tRowLayout rl_composite_1 = new RowLayout(SWT.VERTICAL);\r\n\t\trl_composite_1.center = true;\r\n\t\trl_composite_1.fill = true;\r\n\t\tcomposite_1.setLayout(rl_composite_1);\r\n\t\t\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayout(new FillLayout(SWT.VERTICAL));\r\n\t\t\r\n\t\tButton btnNewButton = new Button(composite_2, SWT.NONE);\r\n\t\tbtnNewButton.setText(\"New Button\");\r\n\t\t\r\n\t\tButton btnRadioButton = new Button(composite_2, SWT.RADIO);\r\n\t\tbtnRadioButton.setText(\"Radio Button\");\r\n\t\t\r\n\t\tButton btnCheckButton = new Button(composite_2, SWT.CHECK);\r\n\t\tbtnCheckButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCheckButton.setText(\"Check Button\");\r\n\r\n\t}", "private void refreshButtons() {\n flowPane.getChildren().clear();\n\n for(String testName : Files.listTests()) {\n TestJson info;\n try {\n info = TestParser.read(testName);\n } catch(FileNotFoundException e) {\n continue; /* Skip */\n }\n\n JFXButton button = new JFXButton(testName);\n button.pseudoClassStateChanged(PseudoClass.getPseudoClass(\"select-button\"), true);\n\n button.setOnAction(e -> buttonPressed(info));\n\n if(!filter(info, button))\n continue;\n\n // If this model asked to be put in a specific place, put it there\n if(!info.custom && info.order >= 0)\n flowPane.getChildren().add(Math.min(info.order, flowPane.getChildren().size()), button);\n else\n flowPane.getChildren().add(button);\n }\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Speichern\",\n\t\t\t\tfalse);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\n\t\t\t\t\"Abbrechen\", false);\n\t\t\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, Messages.BTN_ADD,\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tMessages.BTN_FINISH, false);\r\n\t\tinitDataBindings();\r\n\t}", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Add\",\r\n\t\t\t\ttrue);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID,\r\n\t\t\t\tIDialogConstants.CANCEL_LABEL, false);\r\n\t}", "@Override\n\tpublic void createPartControl(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NONE);\n\t\t\n\t\tbtnNewButton = new Button(container, SWT.NONE);\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(286, 513, 75, 30);\n\t\tbtnNewButton.setText(\"\\u9996\\u9875\");\n\t\t\n\t\tbutton = new Button(container, SWT.NONE);\n\t\tbutton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage--;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton.setText(\"\\u4E0A\\u4E00\\u9875\");\n\t\tbutton.setBounds(367, 513, 75, 30);\n\t\t\n\t\tbutton_1 = new Button(container, SWT.NONE);\n\t\tbutton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage = page.getPageCount();\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton_1.setText(\"\\u5C3E\\u9875\");\n\t\tbutton_1.setBounds(652, 513, 75, 30);\n\t\t\n\t\tbutton_2 = new Button(container, SWT.NONE);\n\t\tbutton_2.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage++;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton_2.setText(\"\\u4E0B\\u4E00\\u9875\");\n\t\tbutton_2.setBounds(571, 513, 75, 30);\n\t\t\n\t\ttext = new Text(container, SWT.BORDER);\n\t\ttext.setText(\"\"+currentPage);\n\t\ttext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\ttext.setBounds(445, 515, 32, 26);\n\t\t\n\t\tLabel label = new Label(container, SWT.NONE);\n\t\tlabel.setText(\"/\");\n\t\tlabel.setBounds(483, 518, 6, 20);\n\t\t\n\t\tlabel_1 = new Label(container, SWT.NONE);\n\t\tlabel_1.setText(\"2\");\n\t\tlabel_1.setBounds(495, 518, 22, 20);\n\t\t\n\t\tButton button_3 = new Button(container, SWT.NONE);\n\t\tbutton_3.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tint want = Integer.parseInt(text.getText());\n\t\t\t\tif(want<1){\n\t\t\t\t\twant = 1;\n\t\t\t\t}else if(want>page.getCurrentPage()){\n\t\t\t\t\twant = page.getPageCount();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrentPage = want;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton_3.setText(\"->\");\n\t\tbutton_3.setBounds(527, 513, 32, 30);\n\t\t\n\t\ttext_1 = new Text(container, SWT.BORDER);\n\t\ttext_1.setBounds(286, 134, 73, 26);\n\t\t\n\t\tButton btnNewButton_1 = new Button(container, SWT.NONE);\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tname = text_1.getText();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(367, 134, 55, 30);\n\t\tbtnNewButton_1.setText(\"\\u67E5\\u627E\");\n\t\t\n\t\ttabFolder = new TabFolder(container, SWT.NONE);\n\t\ttabFolder.setBounds(281, 184, 456, 323);\n\t\t\n\t\ttabItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttabItem_2.setText(\"\\u672A\\u8BCA\\u65AD\");\n\t\t\n\t\ttable_2 = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable_2.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.CLOSE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_2.getItem(table_2.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdb.update(\"update register set state = 2 where name = '\"+register.getName()+\"'\");\n\t\t\t\tregister.setState(\"诊断中\");\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\ttable_2.setLinesVisible(true);\n\t\ttable_2.setHeaderVisible(true);\n\t\ttabItem_2.setControl(table_2);\n\t\t\n\t\tTableColumn tableColumn_4 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_4.setWidth(100);\n\t\ttableColumn_4.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tTableColumn tableColumn_5 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_5.setWidth(115);\n\t\ttableColumn_5.setText(\"\\u7ECF\\u529E\\u4EBA\");\n\t\t\n\t\tTableColumn tableColumn_6 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_6.setWidth(118);\n\t\ttableColumn_6.setText(\"\\u7C7B\\u578B\");\n\t\t\n\t\tTableColumn tableColumn_7 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_7.setWidth(108);\n\t\ttableColumn_7.setText(\"\\u4EF7\\u683C\");\n\t\t\n\t\tMenu menu_2 = new Menu(table_2);\n\t\ttable_2.setMenu(menu_2);\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.NONE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_2.getItem(table_2.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"无\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t}\n\t\t});\n\t\tmenuItem_4.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tname = table_2.getItem(table_2.getSelectionIndex()).getText(0);\n\t\t\t\tWarning_1 warning = new Warning_1(new Shell(), SWT.NONE);\n\t\t\t\twarning.open();\n\t\t\t\tif(warning.isResult())\n\t\t\t\t\tif(db.update(\"delete from register where name = '\"+name+\"'\")!=0){\n\t\t\t\t\t\tOpenBox.Open(\"操作成功\");\n\t\t\t\t\t\tcurrentPage = 1;\n\t\t\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tOpenBox.Open(\"操作失败\");\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tmenuItem_5.setText(\"\\u5220\\u9664\");\n\t\t\n\t\ttabItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttabItem_1.setText(\"\\u8BCA\\u65AD\\u4E2D\");\n\t\t\n\t\ttable_1 = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.CLOSE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_1.getItem(table_1.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdb.update(\"update register set state = 2 where name = '\"+register.getName()+\"'\");\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\ttable_1.setLinesVisible(true);\n\t\ttable_1.setHeaderVisible(true);\n\t\ttabItem_1.setControl(table_1);\n\t\t\n\t\tTableColumn tableColumn = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn.setWidth(100);\n\t\ttableColumn.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tTableColumn tableColumn_1 = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn_1.setWidth(115);\n\t\ttableColumn_1.setText(\"\\u7ECF\\u529E\\u4EBA\");\n\t\t\n\t\tTableColumn tableColumn_2 = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn_2.setWidth(118);\n\t\ttableColumn_2.setText(\"\\u7C7B\\u578B\");\n\t\t\n\t\tTableColumn tableColumn_3 = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn_3.setWidth(108);\n\t\ttableColumn_3.setText(\"\\u4EF7\\u683C\");\n\t\t\n\t\tMenu menu_1 = new Menu(table_1);\n\t\ttable_1.setMenu(menu_1);\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.CLOSE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_1.getItem(table_1.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"无\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tmenuItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tname = table_1.getItem(table_1.getSelectionIndex()).getText(0);\n\t\t\t\tWarning_1 warning = new Warning_1(new Shell(), SWT.CLOSE);\n\t\t\t\twarning.open();\n\t\t\t\tif(warning.isResult())\n\t\t\t\t\tif(db.update(\"delete from register where name = '\"+name+\"'\")!=0){\n\t\t\t\t\t\tOpenBox.Open(\"操作成功\");\n\t\t\t\t\t\tcurrentPage = 1;\n\t\t\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tOpenBox.Open(\"操作失败\");\n\t\t\t}\n\t\t});\n\t\tmenuItem_3.setText(\"\\u5220\\u9664\");\n\t\t\n\t\ttabItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttabItem.setText(\"\\u5DF2\\u8BCA\\u65AD\");\n\t\t\n\t\ttable = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttabItem.setControl(table);\n\t\ttable.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.NONE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table.getItem(table.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setLinesVisible(true);\n\t\t\n\t\tTableColumn tblclmnNewColumn = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn.setWidth(100);\n\t\ttblclmnNewColumn.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tTableColumn tblclmnNewColumn_1 = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn_1.setWidth(115);\n\t\ttblclmnNewColumn_1.setText(\"\\u7ECF\\u529E\\u4EBA\");\n\t\t\n\t\tTableColumn tblclmnNewColumn_2 = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn_2.setText(\"\\u7C7B\\u578B\");\n\t\ttblclmnNewColumn_2.setWidth(118);\n\t\t\n\t\tTableColumn tblclmnNewColumn_3 = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn_3.setWidth(108);\n\t\ttblclmnNewColumn_3.setText(\"\\u4EF7\\u683C\");\n\t\t\n\t\tMenu menu = new Menu(table);\n\t\ttable.setMenu(menu);\n\t\t\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.NONE);\n\t\tmenuItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.NONE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table.getItem(table.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"无\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t}\n\t\t});\n\t\tmenuItem.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu, SWT.NONE);\n\t\tmenuItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tname = table.getItem(table.getSelectionIndex()).getText(0);\n\t\t\t\tWarning_1 warning = new Warning_1(new Shell(), SWT.NONE);\n\t\t\t\twarning.open();\n\t\t\t\tif(warning.isResult())\n\t\t\t\t\tif(db.update(\"delete from register where name = '\"+name+\"'\")!=0){\n\t\t\t\t\t\tOpenBox.Open(\"操作成功\");\n\t\t\t\t\t\tcurrentPage = 1;\n\t\t\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tOpenBox.Open(\"操作失败\");\n\t\t\t}\n\t\t});\n\t\tmenuItem_1.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\n\t\tcreateActions();\n\t\tinitializeToolBar();\n\t\tinitializeMenu();\n\t}", "private void setupButtons() {\n final ButtonGroup btngrp = new ButtonGroup();\n\n for (final AbstractAction actn : myToolActions) {\n final JToggleButton btn = new JToggleButton(actn);\n btn.addActionListener(actn);\n btngrp.add(btn);\n add(btn);\n }\n\n btngrp.clearSelection();\n btngrp.getElements().nextElement().setSelected(true);\n\n }", "private void setupButtons() {\n\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n finishActivity(null, null);\n }\n });\n\n btnCreate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Pub validatedData = validateFormData();\n\n if ( validatedData != null )\n uploadImagesIfNecessaryThenRegisterNewPub(validatedData);\n }\n });\n }", "@NotNull\n TBItemButton addButton() {\n @NotNull TBItemButton butt = new TBItemButton(myItemListener, myStats != null ? myStats.getActionStats(\"simple_button\") : null);\n myItems.addItem(butt);\n return butt;\n }", "@Override\n\tprotected void createButtonsForButtonBar(Composite parent) {\n\t\tButton button_1 = createButton(parent, CustomNo, \"No\", false);\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"No\" clicked\n\t\t\t\tclose();\n\t\t\t}\n\t\t});\n\t\tButton button = createButton(parent, CustomYes, \"Yes\",\n\t\t\t\ttrue);\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// \"Yes\" clicked\n\t\t\t\t\n\t\t FileDialog dlg = new FileDialog(getShell(), SWT.SAVE);\n\t\t dlg.setFilterNames(new String[]{\"All Files (*.*)\"});\n\t\t dlg.setFilterExtensions(new String[]{\"*.*\"});\n\t\t dlg.setOverwrite(true);\n\t\t dlg.setFileName(filename);\n\t\t String path = dlg.open();\n\t\t //Activator.getDefault().showDialogAsync(\"Filepath chosen\", path);\n\t\t filepath = path;\n\t\t if (path != null)\n\t\t \tclose();\n\t\t\t}\n\t\t});\n\t\tbutton.setSelection(true);\n\t}", "private void makeDayButtons() \n\t{\n\t\t\n\t\tSystem.out.println(monthMaxDays);\n\t\tfor (int i = 1; i <= monthMaxDays; i++) \n\t\t{\n\t\t\t//the first day starts from 1\n\t\t\tfinal int dayNumber = i;\n\t\t\t\n\t\t\t//create new button\n\t\t\tJButton day = new JButton(Integer.toString(dayNumber));\n\t\t\tday.setBackground(Color.WHITE);\n\t\n\t\t\t//attach a listener\n\t\t\tday.addActionListener(new \n\t\t\t\t\tActionListener() \n\t\t\t\t\t{\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if button is pressed, highlight it \n\t\t\t\t\t\t\tborderSelected(dayNumber -1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//show the event items in the box on the right\n\t\t\t\t\t\t\twriteEvents(dayNumber);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tchangeDateLabel(dayNumber);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//make these buttons available for use\n\t\t\t\t\t\t\tnextDay.setEnabled(true);\n\t\t\t\t\t\t\tprevDay.setEnabled(true);\n\t\t\t\t\t\t\tcreateButton.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\n\t\t\t//add this button to the day button ArrayList\n\t\t\tbuttonArray.add(day);\n\t\t}\n\t}", "private void doButtons()\n {\n if (scopes.size()>1) addButtons();\n else hideButtons();\n }", "public Box getButtonPanel() {\n\t\tBox buttonsPanel = new Box(BoxLayout.Y_AXIS);\n\t\tbuttonsPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\t\tBox treeBox = new Box(BoxLayout.Y_AXIS);\n\t\ttreeBox.setBorder(new TitledBorder(\"Schema\"));\n\n\t\tBox associationBox = new Box(BoxLayout.Y_AXIS);\n\t\tassociationBox.setBorder(new TitledBorder(\"Association\"));\n\n\t\tBox outputBox = new Box(BoxLayout.Y_AXIS);\n\t\toutputBox.setBorder(new TitledBorder(\"Output\"));\n\n\t\tBox numerotationBox = new Box(BoxLayout.X_AXIS);\n\t\tnumerotationBox.setBorder(new TitledBorder(\"Numerotation\"));\n\t\t/* add a button for loading a XML Schema */\n\t\tJButton loadFileb = new JButton(\"Open schema\");\n\t\tUtils.setDefaultSize(loadFileb);\n\t\tloadFileb.addActionListener(new LoadSchemaListener());\n\n\t\t/*\n\t\t * add a button for associating the content of a node to a line in the\n\t\t * flat file\n\t\t */\n\t\tJButton selectLineNodeb = new JButton(\"Main node\");\n\t\tUtils.setDefaultSize(selectLineNodeb);\n\t\tselectLineNodeb.addActionListener(new SelectLineNodeListener());\n\n\t\tJButton selectNodeb = new JButton(\"Select\");\n\t\tUtils.setDefaultSize(selectNodeb);\n\t\tselectNodeb.addActionListener(new SelectNodeListener());\n\n\t\tJButton unselectNodeb = new JButton(\"Unselect\");\n\t\tUtils.setDefaultSize(unselectNodeb);\n\t\tunselectNodeb.addActionListener(new UnselectNodeListener());\n\n\t\tJButton nameb = new JButton(\"Name\");\n\t\tUtils.setDefaultSize(nameb);\n\t\tnameb.addActionListener(new associateNameListener());\n\n\t\tJButton filterb = new JButton(\"Filter\");\n\t\tUtils.setDefaultSize(filterb);\n\t\tfilterb.addActionListener(new AssociateFilterListener());\n\n\t\tJButton infosb = new JButton(\"About\");\n\t\tUtils.setDefaultSize(infosb);\n\t\tinfosb.addActionListener(new InfosListener());\n\n\t\tassociationBox.add(selectNodeb);\n\t\tassociationBox.add(unselectNodeb);\n\t\tassociationBox.add(nameb);\n\t\tassociationBox.add(filterb);\n\t\tfilter = new JLabel(\"no filter\");\n\t\tassociationBox.add(filter);\n\n\t\ttreeBox.add(loadFileb);\n\n\t\tassociationBox.add(infosb);\n\n\t\tJButton loadXmlFileb = new JButton(\"Open document (XML)\");\n\t\tUtils.setDefaultSize(loadXmlFileb);\n\t\tloadXmlFileb.addActionListener(new LoadDocumentListener());\n\n\t\tJButton setSeparatorb = new JButton(\"Separator\");\n\t\tUtils.setDefaultSize(setSeparatorb);\n\t\tsetSeparatorb.addActionListener(new SetSeparatorListener());\n\n\t\tJButton printTabFileb = new JButton(\"Print\");\n\t\tUtils.setDefaultSize(printTabFileb);\n\t\tprintTabFileb.addActionListener(new PrintFlatFileListener());\n\n\t\ttreeBox.add(loadXmlFileb);\n\t\ttreeBox.add(selectLineNodeb);\n\n\t\toutputBox.add(setSeparatorb);\n\t\toutputBox.add(printTabFileb);\n\n\t\tnumerotationButtons = new ButtonGroup();\n\n\t\tnumericb = new JRadioButton(\"1\");\n\t\thighAlphabeticb = new JRadioButton(\"A\");\n\t\tlowAlphabeticb = new JRadioButton(\"a\");\n\t\tnoneb = new JRadioButton(\"none\");\n\n\t\tnumericb.addActionListener(new NumerotationListener());\n\t\thighAlphabeticb.addActionListener(new NumerotationListener());\n\t\tlowAlphabeticb.addActionListener(new NumerotationListener());\n\t\tnumerotationBox.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tnumerotationButtons.add(numericb);\n\t\tnumerotationButtons.add(highAlphabeticb);\n\t\tnumerotationButtons.add(lowAlphabeticb);\n\t\tnumerotationButtons.add(noneb);\n\n\t\tswitch (((XsdTreeStructImpl) xsdTree).numerotation_type) {\n\t\tcase XsdTreeStructImpl.HIGH_ALPHABETIC_NUMEROTATION:\n\t\t\thighAlphabeticb.setSelected(true);\n\t\t\tbreak;\n\t\tcase XsdTreeStructImpl.LOW_ALPHABETIC_NUMEROTATION:\n\t\t\tlowAlphabeticb.setSelected(true);\n\t\t\tbreak;\n\t\tcase XsdTreeStructImpl.NUMERIC_NUMEROTATION:\n\t\t\tnumericb.setSelected(true);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tnoneb.setSelected(true);\n\t\t\tbreak;\n\t\t}\n\n\t\tnumerotationBox.add(numericb);\n\t\tnumerotationBox.add(highAlphabeticb);\n\t\tnumerotationBox.add(lowAlphabeticb);\n\t\tnumerotationBox.add(noneb);\n\n\t\tbuttonsPanel.add(treeBox);\n\t\tbuttonsPanel.add(associationBox);\n\t\tbuttonsPanel.add(outputBox);\n\t\tbuttonsPanel.add(numerotationBox);\n\n\t\tdisplayExample = new JCheckBox(\"preview\");\n\t\tbuttonsPanel.add(displayExample);\n\t\tdisplayExample.addActionListener(new PreviewListener());\n\t\t\n\t\treturn buttonsPanel;\n\t}", "protected Panel createButtonPanel() {\n Panel panel = new Panel();\n panel.setLayout(new PaletteLayout(2, new Point(2,2), false));\n return panel;\n }", "public void clickCreateNewPostBtn() {\n createPostBtn.get(0).click();\n }", "private JPanel createAddAndRemoveButtons() {\n JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEADING));\n panel.add(createAddResourceButton());\n panel.add(createRemoveResourceButton());\n\n return panel;\n }", "@Override\r\n\tprotected void createButtonsForButtonBar(Composite parent) {\r\n\t\tcreateButton(parent, IDialogConstants.OK_ID, \"Rechercher\", true);\r\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, \"Annuler\", false);\r\n\t}", "private void crearObjetos() {\n // crea los botones\n this.btnOK = new CCButton(this.OK);\n this.btnOK.setActionCommand(\"ok\");\n this.btnOK.setToolTipText(\"Confirmar la Operación\");\n \n this.btnCancel = new CCButton(this.CANCEL);\n this.btnCancel.setActionCommand(\"cancel\");\n this.btnCancel.setToolTipText(\"Cancelar la Operación\");\n \n // Agregar los eventos a los botones\n this.btnOK.addActionListener(this);\n this.btnCancel.addActionListener(this);\n }", "private List<Button> createButtons(final JSONObject jsonMessageSet) {\n final List<Button> buttons = new ArrayList<Button>();\n\n final JSONArray jsonButtons = (JSONArray) jsonMessageSet.get(\"button\");\n for (Object buttonObject : jsonButtons) {\n final JSONObject jsonButton = (JSONObject) buttonObject;\n final Button button = new Button();\n button.setButtonId((Integer) jsonButton.get(\"buttonId\"));\n button.setText((String) jsonButton.get(\"text\"));\n buttons.add(button);\n }\n\n return buttons;\n }", "@Override\n public void initialiseButtons() {\n resumeButton = new Button(buttonLeft, resumeButtonTop, buttonRight, resumeButtonBottom, Assets.resume);\n restartButton = new Button(buttonLeft, restartButtonTop, buttonRight, restartButtonBottom, Assets.restart);\n instructionsButton = new Button(buttonLeft, instructionsButtonTop, buttonRight, instructionsButtonBottom, Assets.instructions);\n quitButton = new Button(buttonLeft, quitButtonTop, buttonRight, quitButtonBottom, Assets.quit);\n backArrowButton = new Button(-8,-10,120,100, Assets.backArrowButton);\n saveGameButton = new Button(buttonLeft,saveGameButtonTop,buttonRight,saveGameButtonBottom,Assets.saveGame);\n }", "private Button[] createButtonsAndLMessage() {\n\t\t\n\t\t// local buttom\n\t\tButton launchLocal = new Button(\"Launch Local Game\");\n\t\tlaunchLocal.setMaxWidth(Double.MAX_VALUE);\n\t\tlaunchLocal.setAlignment(Pos.CENTER);\n\t\tlaunchLocal.autosize();\n\t\tlaunchLocal.setOnAction(e -> {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif(checkingAllArguments()) {\n\t\t\t\t\tmenuMessage.setText(\"Game will start soon...\");\n\t\t\t\t\tlaunchLocal(new Stage());\n\t\t\t\t}\n\t\t\t } catch (Exception exception) { \n\t\t\t\t menuMessage.setText(\"Can't launch a local game : either a IP Address of a remote player is wrong or you didn't select 4 players\");\n\t\t\t } \n\t\t \n\t\t});\n\t\t\n\t\t// remote button\n\t\tButton launchRemote = new Button(\"Launch Remote Game\");\n\t\tlaunchRemote.setMaxWidth(Double.MAX_VALUE);\n\t\tlaunchRemote.setAlignment(Pos.CENTER);\n\t\tlaunchRemote.autosize();\n\t\tlaunchRemote.setOnAction(e -> { \n\t\t\t\n\t\t\ttry {\n\t\t\t\tmenuMessage.setText(\"Game will start as soon as the client is connected...\");\n\t\t\t\tlaunchRemote(new Stage());\n\t\t\t } catch (Exception exception) { \n\t\t\t\tmenuMessage.setText(\"Can't launch a remote game : Check your internet connection\");\n\t\t\t } \n\t\t}); \n\t\t\n\t\tButton[] toReturn = {launchLocal, launchRemote};\n\t\treturn toReturn;\n\t}", "private void setupButtons()\n\t{\n\t\tequals.setText(\"=\");\n\t\tequals.setBackground(Color.RED);\n\t\tequals.setForeground(Color.WHITE);\n\t\tequals.setOpaque(true);\n\t\tequals.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tequals.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tclear.setText(\"C\");\n\t\tclear.setBackground(new Color(0, 170, 100));\n\t\tclear.setForeground(Color.WHITE);\n\t\tclear.setOpaque(true);\n\t\tclear.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 50));\n\t\tclear.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tbackspace.setText(\"<--\");\n\t\tbackspace.setBackground(new Color(0, 170, 100));\n\t\tbackspace.setForeground(Color.WHITE);\n\t\tbackspace.setOpaque(true);\n\t\tbackspace.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tbackspace.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t\tnegative.setText(\"+/-\");\n\t\tnegative.setBackground(Color.GRAY);\n\t\tnegative.setForeground(Color.WHITE);\n\t\tnegative.setOpaque(true);\n\t\tnegative.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 35));\n\t\tnegative.setBorder(new CompoundBorder(new LineBorder(Color.LIGHT_GRAY, 5), new LineBorder(Color.BLACK, 3)));\n\t}", "protected void createButtonsForButtonBar(Composite parent) {\n\t\tcreateButton(barComp, BUTTON_ADD_ID, Messages.btnAddParameter, true);\n\t\tcreateButton(barComp, BUTTON_EDIT_ID, Messages.btnEditParameter, true);\n\t\tcreateButton(barComp, BUTTON_DROP_ID, Messages.btnDropParameter, true);\n\t\tcreateButton(barComp, BUTTON_UP_ID, Messages.btnUpParameter, true);\n\t\tcreateButton(barComp, BUTTON_DOWN_ID, Messages.btnDownParameter, true);\n\t\tcreateButton(parent, IDialogConstants.OK_ID, com.cubrid.common.ui.common.Messages.btnOK, true);\n\n\t\tgetButton(BUTTON_EDIT_ID).setEnabled(false);\n\t\tgetButton(BUTTON_UP_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DOWN_ID).setEnabled(false);\n\t\tgetButton(BUTTON_DROP_ID).setEnabled(false);\n\t\tcreateButton(parent, IDialogConstants.CANCEL_ID, com.cubrid.common.ui.common.Messages.btnCancel, false);\n\t}", "private Button createNewArrayButton(BorderPane root) {\n Button newArr = new Button(\"Generate New Array\");\n\n newArr.setOnMouseClicked(event -> {\n ((HBox) root.getTop()).getChildren().get(2).setDisable(false);\n ((HBox) root.getTop()).getChildren().get(3).setDisable(false);\n\n generateRandomHeights();\n root.setBottom(createSortingDisplay());\n });\n\n return newArr;\n }", "private void createButtons() {\n Texture playButtonIdle, playButtonPressed,settingsButtonIdle, settingsButtonPressed, creditsButtonIdle, creditsButtonPressed;\n\n if(game.getLocale().getCountry().equals(\"FI\")){\n playButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startgame_FIN.png\");\n playButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startgame_FIN_PRESSED.png\");\n\n settingsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startsettings_FIN.png\");\n settingsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startsettings_FIN_PRESSED.png\");\n\n creditsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_credits_FIN.png\");\n creditsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_credits_FIN_PRESSED.png\");\n }else{\n playButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startgame_ENG.png\");\n playButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startgame_ENG_PRESSED.png\");\n\n settingsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_startsettings_ENG.png\");\n settingsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_startsettings_ENG_PRESSED.png\");\n\n creditsButtonIdle = game.getAssetManager().get(\"BUTTONS/button_credits_ENG.png\");\n creditsButtonPressed = game.getAssetManager().get(\"BUTTONS/button_credits_ENG_PRESSED.png\");\n }\n\n ImageButton playButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(playButtonIdle)), new TextureRegionDrawable(new TextureRegion(playButtonPressed)));\n\n playButton.setPosition(95, 12);\n stage.addActor(playButton);\n\n playButton.addListener(new ChangeListener() {\n // This method is called whenever the actor is clicked. We override its behavior here.\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(gameScreen);\n }\n });\n\n ImageButton settingsButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(settingsButtonIdle)), new TextureRegionDrawable(new TextureRegion(settingsButtonPressed)));\n\n settingsButton.setPosition(175, 12);\n stage.addActor(settingsButton);\n\n settingsButton.addListener(new ChangeListener() {\n // This method is called whenever the actor is clicked. We override its behavior here.\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(new OptionsScreen(game));\n }\n });\n\n ImageButton creditsButton = new ImageButton(new TextureRegionDrawable(new TextureRegion(creditsButtonIdle)), new TextureRegionDrawable(new TextureRegion(creditsButtonPressed)));\n\n creditsButton.setPosition(15, 12);\n stage.addActor(creditsButton);\n\n creditsButton.addListener(new ChangeListener() {\n // This method is called whenever the actor is clicked. We override its behavior here.\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n game.setScreen(new CreditsScreen(game));\n }\n });\n }", "@Listen(\"onClick=#createEntryButton\")\n public void createEntryButtonOnClick(){\n Window window = (Window) Executions.createComponents(\"entry.zul\", phonePageWindow, new HashMap());\n window.doModal();\n }", "private void createOKButtons() {\n okAddButton = addOKButton(\"Add Shape\");\n okRemoveButton = addOKButton(\"Remove Shape\");\n okAddKeyframeButton = addOKButton(\"Add Keyframe\");\n okAddKeyframeTimeButton = addOKButton(\"Add Keyframe Time\");\n okRemoveKeyframeButton = addOKButton(\"Remove Keyframe\");\n okRemoveKeyframeTimeButton = addOKButton(\"Remove Keyframe Time\");\n okEditKeyframeButton = addOKButton(\"Edit Keyframe\");\n okEditKeyframeTimeButton = addOKButton(\"Edit Keyframe Time\");\n okEditKeyframeFinalButton = addOKButton(\"Edit Keyframe Final\");\n okClearShapeButton = addOKButton(\"Clear Shape\");\n }", "public void initializeButtons() {\n\t\tif(null!=itemPanel)\n\t\t\tremove(itemPanel);\n\t\t\n\t\titemPanel = new JPanel();\n\t\titemPanel.setLayout(new FlowLayout());\n\t\tList<Item> allItems = itemDao.readAll();\n\t\t\n\t\t//Sort list of items based on item code.\n\t\tCollections.sort(allItems, new Comparator<Item>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Item o1, Item o2) {\n\t\t\t\tCharacter c1 = o1.getCode();\n\t\t\t\tCharacter c2 = o2.getCode();\n\t\t\t\treturn c1.compareTo(c2);\n\t\t\t}\n\t\t});\n\t\t\n\t\tfor(final Item item : allItems){\n\t\t\tJButton addButton = new JButton(item.getName());\n\t\t\tDeal deal = item.getDeal();\n\t\t\tString dealName = deal == null ? \"\" : \"<br>\" + deal.getName();\n\t\t\t//Set tool tip as description and deal if available\n\t\t\taddButton.setToolTipText(\"<html>\"+item.getDescription()+\"<br>Price: $\"+item.getPrice()\n\t\t\t\t\t+ dealName+\"</html>\");\n\t\t\t//Add item to cart when pressed, also update cartLabel.\n\t\t\taddButton.addActionListener(new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tcart.addItem(item.getCode());\n\t\t\t\t\tcartLabel.setText(cart.size()+ \" items in your cart\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t//addButton.setBounds(10, frameHeight, 75, 20);\n\t\t\taddButton.setSize(new Dimension(75, 20));\n\t\t\titemPanel.add(addButton);\n\t\t}\n\t\t\n\t\titemPanel.setBounds(10, 30, 280, 150);\n\t\tadd(itemPanel);\n\t\tMain.getFrame().setVisible(true);;\n\t}", "private void setupActionButtons() {\n setupLikeActionButton();\n setupRepostActionButton();\n setupMoreActionButton();\n }", "@Override\n\tprotected void buildButton() {\n\t\t\n\t}", "private void createYourMusicContent() {\n\t\t/**Creates all images we will use for the buttons*/\n\t\tImageIcon image1 = new ImageIcon(sURLFB1);\n\t\tImageIcon image2 = new ImageIcon(sURLFB2);\n\t\tImageIcon image3 = new ImageIcon(sURLFB3);\n\t\tImageIcon image4 = new ImageIcon(sURLFBS1);\n\t\tImageIcon image5 = new ImageIcon(sURLFBS2);\n\t\tImageIcon image6 = new ImageIcon(sURLFBS3);\n\t\tImageIcon image7 = new ImageIcon(sURLFBPL1);\n\t\tImageIcon image8 = new ImageIcon(sURLFBPL2);\n\t\tImageIcon image9 = new ImageIcon(sURLFBPL3);\n\t\n\t\t/**Creates the button of Favourites and configures it*/\n\t\tjbFavorites = new JButton(\"Favorites\");\n\t\tjbFavorites.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbFavorites.setForeground(new Color(150,100,100));\n\t\tjbFavorites.setIcon(image1);\n\t\tjbFavorites.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setRolloverIcon(image2);\n\t\tjbFavorites.setSelectedIcon(image3);\n\t\tjbFavorites.setContentAreaFilled(false);\n\t\tjbFavorites.setFocusable(false);\n\t\tjbFavorites.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of Songs and configures it*/\n\t\tjbSongs = new JButton(\"Songs\");\n\t\tjbSongs.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbSongs.setForeground(new Color(150,100,100));\n\t\tjbSongs.setIcon(image4);\n\t\tjbSongs.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setRolloverIcon(image5);\n\t\tjbSongs.setSelectedIcon(image6);\n\t\tjbSongs.setContentAreaFilled(false);\n\t\tjbSongs.setFocusable(false);\n\t\tjbSongs.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of PartyList and configures it*/\n\t\tjbPartyList = new JButton(\"PartyList\");\n\t\tjbPartyList.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbPartyList.setForeground(new Color(150,100,100));\n\t\tjbPartyList.setIcon(image7);\n\t\tjbPartyList.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setRolloverIcon(image8);\n\t\tjbPartyList.setSelectedIcon(image9);\t\n\t\tjbPartyList.setContentAreaFilled(false);\n\t\tjbPartyList.setFocusable(false);\n\t\tjbPartyList.setBorderPainted(false);\n\t\t\n\t\t/**Creates the panel where we will put all buttons*/\n\t\tjpPreLists = new JPanel(new BorderLayout());\n jpPreLists.setOpaque(false);\n\t\tjpPreLists.add(jbFavorites,BorderLayout.NORTH);\n\t\tjpPreLists.add(jbSongs,BorderLayout.CENTER);\n\t\tjpPreLists.add(jbPartyList,BorderLayout.SOUTH);\n\t}", "private void init_buttons(){\r\n /**\r\n * BOTON NUEVO\r\n */\r\n im_tool1.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n botonNuevo();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON EDITAR\r\n */\r\n im_tool2.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEditar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON GUARDAR\r\n */\r\n im_tool3.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonGuardar();\r\n }\r\n }\r\n }); \r\n /**\r\n * BOTON ELIMINAR\r\n */\r\n im_tool4.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonEliminar();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON IMPRIMIR\r\n */\r\n im_tool5.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){ \r\n botonImprimir();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON REGRESAR\r\n */\r\n im_tool6.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n botonInicio();\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON POR ASIGNAR\r\n */\r\n im_tool7.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON NOTAS DE CREDITO\r\n */\r\n im_tool8.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON DEVOLUCION\r\n */\r\n im_tool9.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n //\r\n }\r\n }\r\n });\r\n /**\r\n * BOTON BUSCAR\r\n */\r\n im_tool12.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n switch (mouseEvent.getClickCount()){\r\n case 1:\r\n botonInicio();\r\n botonBuscar();\r\n break;\r\n case 2:\r\n Datos.setIdButton(2003041);\r\n Gui.getInstance().showBusqueda(\"Busqueda\"); \r\n break;\r\n }\r\n }\r\n });\r\n /**\r\n * SELECCION EN LA TABLA\r\n */\r\n tb_guias.setOnMouseClicked((MouseEvent mouseEvent) -> {\r\n if(mouseEvent.getButton().equals(MouseButton.PRIMARY)){\r\n if(mouseEvent.getClickCount() > 0){\r\n if ((tb_guias.getItems() != null) && (!tb_guias.getItems().isEmpty()))\r\n selectedRowGuide();\r\n }\r\n }\r\n }); \r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nroguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nroguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n Datos.setLog_cguias(new log_CGuias()); \r\n boolean boo = Ln.getInstance().check_log_CGuias_rela_caja(tf_nroguia.getText()); \r\n numGuias = 0;\r\n if(boo){\r\n Datos.setRep_log_cguias(Ln.getInstance().find_log_CGuias(tf_nroguia.getText(), \"\", \"ncaja\", Integer.parseInt(rows)));\r\n loadTable(Datos.getRep_log_cguias()); \r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de \" + ScreenName + \" NO existe!\", \"A\");\r\n tf_nroguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n /**\r\n * metodo para mostrar buscar el nro de guia\r\n * param: ENTER O TAB\r\n */\r\n tf_nrorguia.setOnKeyReleased((KeyEvent ke) -> {\r\n if (ke.getCode().equals(KeyCode.ENTER)){\r\n //Valida que el evento se haya generado en el campo de busqueda\r\n if(((Node)ke.getSource()).getId().equals(\"tf_nrorguia\")){\r\n //Solicita los datos y envia la Respuesta a imprimirse en la Pantalla\r\n boolean booa = true; \r\n if(booa){\r\n boolean booc = Ln.getInstance().check_log_CGuias_caja(tf_nrorguia.getText()); \r\n if(booc){\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n else{\r\n for (int i = 0; i < log_guide_guia.size(); i++) {\r\n if(tf_nrorguia.getText().equals(tb_guias.getItems().get(i).getGuias())){\r\n booa = false;\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n break;\r\n }\r\n } \r\n if(booa){\r\n log_Guide_rel_inv guide_carga = new log_Guide_rel_inv();\r\n\r\n List<Fxp_Archguid_gfc> data = \r\n Ln.getList_log_Archguid_gfc(Ln.getInstance().find_Archguid_gfc(tf_nrorguia.getText()));\r\n\r\n if (data.get(0).getStat_guia().equals(\"X\")\r\n || data.get(0).getStat_guia().equals(\"C\")){\r\n guide_carga.setNumorden(String.valueOf((log_guide_guia.size() + 1)));\r\n guide_carga.setGuias(tf_nrorguia.getText());\r\n guide_carga.setNumfact(data.get(0).getNumfact());\r\n guide_carga.setNumclie(data.get(0).getNumclie());\r\n\r\n if (data.get(0).getStat_guia().equals(\"A\")){\r\n if (tipoOperacion == 1)\r\n guide_carga.setStat_guia(null);\r\n else\r\n guide_carga.setStat_guia(data.get(0).getStat_guia());\r\n }\r\n else{\r\n guide_carga.setStat_guia(null);\r\n }\r\n \r\n \r\n log_guide_guia.add(guide_carga);\r\n\r\n loadTableGuide_guias();\r\n change_im_val(200, im_checkg); \r\n\r\n numFactCarga = numFactCarga + data.get(0).getNumfact();\r\n numClieCarga = numClieCarga + data.get(0).getNumclie();\r\n\r\n tf_nrorguia.setText(\"\");\r\n }else{\r\n if (data.get(0).getStat_guia().equals(\"\")){\r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO tiene relación de Guia de Carga!\", \"A\");\r\n }\r\n else{\r\n Gui.getInstance().showMessage(\"El Nro. de Guia ya esta relacionado!\", \"A\");\r\n }\r\n tf_nrorguia.requestFocus();\r\n }\r\n \r\n }\r\n }\r\n }\r\n else{\r\n change_im_val(0, im_checkg); \r\n Gui.getInstance().showMessage(\"El Nro. de Guia NO existe!\", \"A\");\r\n tf_nrorguia.requestFocus();\r\n }\r\n }\r\n }\r\n });\r\n }", "private void addDemoButtons(int p_73972_1_, int p_73972_2_)\r\n\t{\r\n\t\tthis.buttonList.add(new GuiButton(11, this.width / 2 - 100, p_73972_1_, I18n.format(\"menu.playdemo\")));\r\n\t\tthis.buttonResetDemo = this.addButton(new GuiButton(12, this.width / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.format(\"menu.resetdemo\")));\r\n\t\tISaveFormat isaveformat = this.mc.getSaveLoader();\r\n\t\tWorldInfo worldinfo = isaveformat.getWorldInfo(\"Demo_World\");\r\n\r\n\t\tif (worldinfo == null)\r\n\t\t{\r\n\t\t\tthis.buttonResetDemo.enabled = false;\r\n\t\t}\r\n\t}", "private void createButtonsForPanel(JPanel queueButtonPanel) {\n JButton playbutton = new JButton(\"Play\");\n JButton addsongbutton = new JButton(\"Add song\");\n playButtonActionListener(playbutton);\n addSongButtonActionListener(addsongbutton);\n queueButtonPanel.add(playbutton);\n queueButtonPanel.add(addsongbutton);\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}", "private void 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 Component createNextButton() {\n JButton b = new BasicArrowButton(SwingConstants.NORTH);\n b.addActionListener(nextButtonHandler);\n b.addMouseListener(nextButtonHandler);\n return b; }", "private JPanel createConfirmButtonsPanel() {\n JPanel p = new JPanel(new FlowLayout());\n p.add(createConfirmButton());\n p.add(createCancelButton());\n \n return p;\n }", "HasClickHandlers getCreateNewButton();", "private void configureButtons() {\n\n backToMenu = new JButton(\"Menu\");\n if(isWatching){\n backToMenu.setBounds(575, 270, 100, 50);\n }\n else{\n backToMenu.setBounds(30, 800, 100, 50);\n }\n backToMenu.setFont(new Font(\"Broadway\", Font.PLAIN, 20));\n backToMenu.setBackground(Color.RED);\n backToMenu.setFocusable(false);\n backToMenu.addActionListener(this);\n add(backToMenu);\n }", "private void addControls() {\n\t\tAjaxButton button = new AjaxButton(\"submitButton\", ResourceUtils.getModel(\"button.save\")) {\n\t\t\t@Override\n protected void onSubmit(AjaxRequestTarget target, Form<?> form) {\n onSubmitAction(strWrapper, target, form);\n target.add(form);\n }\n\n\t\t\t@Override\n\t\t\tprotected void onError(AjaxRequestTarget target, Form<?> form) {\n\t\t\t\tsuper.onError(target, form);\n\t\t\t\ttarget.add(form);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onConfigure() {\n\t\t\t\tsuper.onConfigure();\n\t\t\t\tthis.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tform.add(button);\n\n\t\tbutton = new AjaxButton(\"cancelButton\", ResourceUtils.getModel(\"button.cancel\")) {\n\t\t\t@Override\n\t\t\tprotected void onSubmit(AjaxRequestTarget target, Form<?> form) {\n\t\t\t\tonCancelAction(strWrapper, target, form);\n\t\t\t\tform.clearInput();\n\t\t\t\ttarget.add(form);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onConfigure() {\n\t\t\t\tsuper.onConfigure();\n\t\t\t\tthis.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tbutton.setDefaultFormProcessing(false);\n\t\tform.add(button);\n\n\t}", "@Override\n protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);\n createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);\n }" ]
[ "0.7697604", "0.76447046", "0.76436573", "0.74218786", "0.73884064", "0.7377064", "0.72844833", "0.72247154", "0.7177878", "0.7168342", "0.70548993", "0.7053412", "0.6996453", "0.6995575", "0.69730943", "0.693267", "0.69271094", "0.687939", "0.68756783", "0.6867596", "0.6841828", "0.6798551", "0.67908216", "0.67898333", "0.67493606", "0.6747545", "0.6741776", "0.67370564", "0.6726377", "0.6710606", "0.6704543", "0.6678915", "0.66719943", "0.663765", "0.6622021", "0.6604684", "0.65952927", "0.65924805", "0.6585286", "0.6554121", "0.6550144", "0.6544514", "0.6532716", "0.6532696", "0.6530077", "0.6529378", "0.6528822", "0.6526483", "0.652173", "0.65196085", "0.65161043", "0.6511026", "0.6491984", "0.64341605", "0.6432275", "0.6431519", "0.6425579", "0.64245766", "0.6407937", "0.6407224", "0.64029115", "0.63864046", "0.6373336", "0.636073", "0.6358886", "0.63535225", "0.6353", "0.63497543", "0.6343914", "0.6341455", "0.63391435", "0.63290113", "0.63285524", "0.6324727", "0.63238096", "0.63235", "0.6320489", "0.6312689", "0.63115233", "0.6309951", "0.62973297", "0.62947536", "0.62943006", "0.6292122", "0.6291049", "0.62901956", "0.62818706", "0.62778646", "0.62754226", "0.62613505", "0.6260807", "0.6254662", "0.62449783", "0.6243314", "0.62324834", "0.62252885", "0.62074184", "0.6203513", "0.62027407", "0.6201664" ]
0.6839119
21
Create contents of the wizard
public void createControl(Composite parent) { Composite container = new Composite(parent, SWT.NONE); container.setLayout(new GridLayout()); setControl(container); Composite container2 = new Composite(container, SWT.BORDER); container2.setLayout(new GridLayout()); container2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); txtSummary = new StyledText(container2, SWT.LEFT | SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL); txtSummary.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); txtSummary.setBackground(SWTResourceConstents.COLOR_WHITE); txtDDL = new StyledText(container2, SWT.LEFT | SWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL); GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); gd.exclude = true; txtDDL.setLayoutData(gd); txtDDL.setVisible(false); txtDDL.setBackground(SWTResourceConstents.COLOR_WHITE); createButtons(container); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract AbstractPerfCakeEditWizard createWizard(IStructuredSelection selection);", "private Wizard(final FXFinder javafxFinder) {\n this.javafxFinder = javafxFinder;\n wizard = new JFrame(\"Apache SIS setup\");\n final Container content = wizard.getContentPane();\n content.setLayout(new BorderLayout());\n /*\n * Back, Next, Cancel button.\n */\n { // For keeping variables in a local scope.\n final Box buttons = Box.createHorizontalBox();\n buttons.setBorder(new EmptyBorder(9, 12, 9, 15)); // Top, left, bottom, right.\n backButton = createButton(buttons, BACK); buttons.add(Box.createHorizontalStrut(10));\n nextButton = createButton(buttons, NEXT); buttons.add(Box.createHorizontalStrut(30));\n cancelButton = createButton(buttons, CANCEL);\n backButton.setEnabled(false);\n\n final JPanel bottom = new JPanel(new BorderLayout());\n bottom.add(new JSeparator(), BorderLayout.NORTH);\n bottom.add(buttons, java.awt.BorderLayout.EAST);\n content.add(bottom, BorderLayout.SOUTH);\n }\n /*\n * Navigation panel on the left side with the following titles\n * (currently shown page is highlighted):\n *\n * - Introduction\n * - Download\n * - Set directory\n * - Summary\n */\n final WizardPage[] pages = WizardPage.values();\n {\n titles = new JLabel[pages.length];\n final EmptyBorder padding = new EmptyBorder(3, 0, 3, 0);\n final Box summary = Box.createVerticalBox();\n for (int i=0; i<pages.length; i++) {\n final String title = (i == 0 ? SELECTED_TITLE_BULLET : TITLE_BULLET) + pages[i].title;\n final JLabel label = new JLabel(title, JLabel.LEFT);\n label.setForeground(i == 0 ? SELECTED_TITLE_COLOR : TITLE_COLOR);\n label.setBorder(padding);\n summary.add(titles[i] = label);\n }\n final JPanel pane = new JPanel();\n pane.setBackground(new Color(169, 204, 227));\n pane.setBorder(new EmptyBorder(40, 15, 9, 24)); // Top, left, bottom, right.\n pane.add(summary);\n content.add(pane, BorderLayout.WEST);\n }\n /*\n * The main content where text is shown, together with download button, directory chooser, etc.\n * The content of each page is created by `createPage(…)`. They all have in common to start with\n * a description text formatted in HTML.\n */\n {\n final Font font = new Font(Font.SERIF, Font.PLAIN, 14);\n javafxPath = new JLabel();\n javafxPath.setBorder(JAVAFX_PATH_BORDER);\n javafxPathError = new JLabel();\n javafxPathError.setForeground(Color.RED);\n javafxPathError.setFont(font);\n inflateProgress = new JProgressBar();\n cardPanel = new JPanel(new CardLayout());\n cardPanel.setBorder(new EmptyBorder(30, 30, 9, 30)); // Top, left, bottom, right.\n cardPanel.setBackground(Color.WHITE);\n for (final WizardPage page : pages) {\n cardPanel.add(createPage(page, font), page.name());\n // The initially visible component is the first added.\n }\n currentPage = pages[0];\n content.add(cardPanel, BorderLayout.CENTER);\n }\n wizard.setSize(WIDTH, 500); // Must be before `setLocationRelativeTo(…)`.\n wizard.setResizable(false);\n wizard.setLocationRelativeTo(null);\n wizard.addWindowListener(new WindowAdapter() {\n @Override public void windowClosing(WindowEvent event) {\n javafxFinder.cancel();\n }\n });\n }", "public void addPages() {\n //super.addPages(); //<--- notice we're overriding here\n mainPage = new NewTargetWizardPage(\"newFilePage1\", getSelection());//$NON-NLS-1$\n mainPage.setTitle(TITLE);\n mainPage.setDescription(DESCRIPTION); \n addPage(mainPage);\n }", "private void createContents() {\n shell = new Shell(getParent(), SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL);\n shell.setSize(FORM_WIDTH, 700);\n shell.setText(getText());\n shell.setLayout(new GridLayout(1, false));\n\n TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n tabFolder.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n // STRUCTURE PARAMETERS\n\n TabItem tbtmStructure = new TabItem(tabFolder, SWT.NONE);\n tbtmStructure.setText(\"Structure\");\n\n Composite grpStructure = new Composite(tabFolder, SWT.NONE);\n tbtmStructure.setControl(grpStructure);\n grpStructure.setLayout(TAB_GROUP_LAYOUT);\n grpStructure.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n ParmDialogText.load(grpStructure, parms, \"meta\");\n ParmDialogText.load(grpStructure, parms, \"col\");\n ParmDialogText.load(grpStructure, parms, \"id\");\n ParmDialogChoices.load(grpStructure, parms, \"init\", Activation.values());\n ParmDialogChoices.load(grpStructure, parms, \"activation\", Activation.values());\n ParmDialogFlag.load(grpStructure, parms, \"raw\");\n ParmDialogFlag.load(grpStructure, parms, \"batch\");\n ParmDialogGroup cnn = ParmDialogText.load(grpStructure, parms, \"cnn\");\n ParmDialogGroup filters = ParmDialogText.load(grpStructure, parms, \"filters\");\n ParmDialogGroup strides = ParmDialogText.load(grpStructure, parms, \"strides\");\n ParmDialogGroup subs = ParmDialogText.load(grpStructure, parms, \"sub\");\n if (cnn != null) {\n if (filters != null) cnn.setGrouped(filters);\n if (strides != null) cnn.setGrouped(strides);\n if (subs != null) cnn.setGrouped(subs);\n }\n ParmDialogText.load(grpStructure, parms, \"lstm\");\n ParmDialogGroup wGroup = ParmDialogText.load(grpStructure, parms, \"widths\");\n ParmDialogGroup bGroup = ParmDialogText.load(grpStructure, parms, \"balanced\");\n if (bGroup != null && wGroup != null) {\n wGroup.setExclusive(bGroup);\n bGroup.setExclusive(wGroup);\n }\n\n // SEARCH CONTROL PARAMETERS\n\n TabItem tbtmSearch = new TabItem(tabFolder, SWT.NONE);\n tbtmSearch.setText(\"Training\");\n\n ScrolledComposite grpSearch0 = new ScrolledComposite(tabFolder, SWT.V_SCROLL);\n grpSearch0.setLayout(new FillLayout());\n grpSearch0.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n tbtmSearch.setControl(grpSearch0);\n Composite grpSearch = new Composite(grpSearch0, SWT.NONE);\n grpSearch0.setContent(grpSearch);\n grpSearch.setLayout(TAB_GROUP_LAYOUT);\n grpSearch.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n Enum<?>[] preferTypes = (this.modelType == TrainingProcessor.Type.CLASS ? RunStats.OptimizationType.values()\n : RunStats.RegressionType.values());\n ParmDialogChoices.load(grpSearch, parms, \"prefer\", preferTypes);\n ParmDialogChoices.load(grpSearch, parms, \"method\", Trainer.Type.values());\n ParmDialogText.load(grpSearch, parms, \"bound\");\n ParmDialogChoices.load(grpSearch, parms, \"lossFun\", LossFunctionType.values());\n ParmDialogText.load(grpSearch, parms, \"weights\");\n ParmDialogText.load(grpSearch, parms, \"iter\");\n ParmDialogText.load(grpSearch, parms, \"batchSize\");\n ParmDialogText.load(grpSearch, parms, \"testSize\");\n ParmDialogText.load(grpSearch, parms, \"maxBatches\");\n ParmDialogText.load(grpSearch, parms, \"earlyStop\");\n ParmDialogChoices.load(grpSearch, parms, \"regMode\", Regularization.Mode.values());\n ParmDialogText.load(grpSearch, parms, \"regFactor\");\n ParmDialogText.load(grpSearch, parms, \"seed\");\n ParmDialogChoices.load(grpSearch, parms, \"start\", WeightInit.values());\n ParmDialogChoices.load(grpSearch, parms, \"gradNorm\", GradientNormalization.values());\n ParmDialogChoices.load(grpSearch, parms, \"updater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"learnRate\");\n ParmDialogChoices.load(grpSearch, parms, \"bUpdater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"updateRate\");\n\n grpSearch.setSize(grpSearch.computeSize(FORM_WIDTH - 50, SWT.DEFAULT));\n\n // BOTTOM BUTTON BAR\n\n Composite grpButtonBar = new Composite(shell, SWT.NONE);\n grpButtonBar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n grpButtonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n Button btnSave = new Button(grpButtonBar, SWT.NONE);\n btnSave.setText(\"Save\");\n btnSave.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n Button btnClose = new Button(grpButtonBar, SWT.NONE);\n btnClose.setText(\"Cancel\");\n btnClose.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n shell.close();\n }\n });\n\n Button btnOK = new Button(grpButtonBar, SWT.NONE);\n btnOK.setText(\"Save and Close\");\n btnOK.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n shell.close();\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n }", "public void addPages() {\n\t\t\n\t\tProjectUtils projectUtils = new ProjectUtils();\n\t\tIProject proj = projectUtils.getProject(selection);\n\t\t\n\t\t\n\t\t\n\t\tDb db = loadDBParams();\n\t\tDBConnection dbConn = new DBConnection();\n\t\tConnection connection = null;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tconnection = dbConn.loadDriver(proj.getLocation()+\"/\"+db.getDriverClassPath(), db.getDriverClass(), db.getDatabaseURL(), db.getUserName(), db.getPassWord());\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\tpage = new SmartNewWizardPage(selection, connection, proj.getLocation().toString());\n\t\taddPage(page);\n\n\t}", "@Override\n\tpublic void addPages() {\n\t\t_fileWizard = new NewPlotFilenameWizardPage(selection);\n\t\t_scaleWizard = new ScaleWizardPage(selection);\n\t\t_coastWizard = new CoastWizardPage(selection);\n\t\t_gridWizard = new GridWizardPage(selection);\n\n\t\t// check there's ETOPO data before we add the page\n\t\t_etopoWizard = new ETOPOWizardPage(selection);\n\n\t\taddPage(_fileWizard);\n\t\taddPage(_scaleWizard);\n\t\taddPage(_coastWizard);\n\t\taddPage(_gridWizard);\n\t\tif (_etopoWizard.isAvailable())\n\t\t\taddPage(_etopoWizard);\n\t}", "public void testWizards() {\n // open new file wizard\n NewFileWizardOperator nfwo = NewFileWizardOperator.invoke();\n nfwo.selectProject(\"SampleProject\");\n nfwo.selectCategory(\"Java\");\n nfwo.selectFileType(\"Java Class\");\n // go to next page\n nfwo.next();\n // create operator for the next page\n NewJavaFileNameLocationStepOperator nfnlso = new NewJavaFileNameLocationStepOperator();\n nfnlso.txtObjectName().typeText(\"MyNewClass\");\n // finish wizard\n //nfnlso.finish();\n // cancel wizard\n nfnlso.cancel();\n }", "public void addPages() {\n\t\twizardPage = new WizardNewProjectCreationPage(\n\t\t\"NewExampleComSiteProject\");\n\t\twizardPage.setDescription(\"Create a new Example.com Site Project.\");\n\t\twizardPage.setTitle(\"New Example.com Site Project\");\n\t\taddPage(wizardPage);\n\t}", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "public void testGenericWizards() {\n // open new project wizard\n NewProjectWizardOperator npwo = NewProjectWizardOperator.invoke();\n npwo.selectCategory(\"Java Web\");\n npwo.selectProject(\"Web Application\");\n npwo.next();\n // create operator for next page\n WizardOperator wo = new WizardOperator(\"Web Application\");\n JTextFieldOperator txtName = new JTextFieldOperator((JTextField) new JLabelOperator(wo, \"Project Name:\").getLabelFor());\n txtName.clearText();\n txtName.typeText(\"MyApp\");\n wo.cancel();\n }", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "@Override\r\n\tpublic void addPages() {\n\t\tprojectPage = new NewProjectWizardPage();\r\n\t\taddPage(projectPage);\r\n\t}", "protected void createContents() {\n\n\t}", "protected void createContents() {\n\t\tregister Register = new register();\n\t\tRegisterDAOImpl RDI = new RegisterDAOImpl();\t\n\t\t\n\t\tload = new Shell();\n\t\tload.setSize(519, 370);\n\t\tload.setText(\"XX\\u533B\\u9662\\u6302\\u53F7\\u7CFB\\u7EDF\");\n\t\tload.setLayout(new FormLayout());\n\t\t\n\t\tLabel name = new Label(load, SWT.NONE);\n\t\tFormData fd_name = new FormData();\n\t\tfd_name.top = new FormAttachment(20);\n\t\tfd_name.left = new FormAttachment(45, -10);\n\t\tname.setLayoutData(fd_name);\n\t\tname.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tname.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel subjet = new Label(load, SWT.NONE);\n\t\tFormData fd_subjet = new FormData();\n\t\tfd_subjet.left = new FormAttachment(44);\n\t\tfd_subjet.top = new FormAttachment(50);\n\t\tsubjet.setLayoutData(fd_subjet);\n\t\tsubjet.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tsubjet.setText(\"\\u79D1\\u5BA4\");\n\t\t\n\t\tLabel doctor = new Label(load, SWT.NONE);\n\t\tFormData fd_doctor = new FormData();\n\t\tfd_doctor.top = new FormAttachment(60);\n\t\tfd_doctor.left = new FormAttachment(45, -10);\n\t\tdoctor.setLayoutData(fd_doctor);\n\t\tdoctor.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tdoctor.setText(\"\\u533B\\u751F\");\n\t\t\n\t\tnametext = new Text(load, SWT.BORDER);\n\t\tnametext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tnametext.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_nametext = new FormData();\n\t\tfd_nametext.right = new FormAttachment(50, 94);\n\t\tfd_nametext.top = new FormAttachment(20);\n\t\tfd_nametext.left = new FormAttachment(50);\n\t\tnametext.setLayoutData(fd_nametext);\n\t\t\n\t\tLabel titlelabel = new Label(load, SWT.NONE);\n\t\tFormData fd_titlelabel = new FormData();\n\t\tfd_titlelabel.right = new FormAttachment(43, 176);\n\t\tfd_titlelabel.top = new FormAttachment(10);\n\t\tfd_titlelabel.left = new FormAttachment(43);\n\t\ttitlelabel.setLayoutData(fd_titlelabel);\n\t\ttitlelabel.setFont(SWTResourceManager.getFont(\"楷体\", 18, SWT.BOLD));\n\t\ttitlelabel.setText(\"XX\\u533B\\u9662\\u95E8\\u8BCA\\u6302\\u53F7\");\n\t\t\n\t\tLabel label = new Label(load, SWT.NONE);\n\t\tFormData fd_label = new FormData();\n\t\tfd_label.top = new FormAttachment(40);\n\t\tfd_label.left = new FormAttachment(44, -10);\n\t\tlabel.setLayoutData(fd_label);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tlabel.setText(\"\\u6302\\u53F7\\u8D39\");\n\t\t\n\t\tcosttext = new Text(load, SWT.BORDER);\n\t\tcosttext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tcosttext.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_costtext = new FormData();\n\t\tfd_costtext.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_costtext.top = new FormAttachment(40);\n\t\tfd_costtext.left = new FormAttachment(50);\n\t\tcosttext.setLayoutData(fd_costtext);\n\t\t\n\t\tLabel type = new Label(load, SWT.NONE);\n\t\tFormData fd_type = new FormData();\n\t\tfd_type.top = new FormAttachment(30);\n\t\tfd_type.left = new FormAttachment(45, -10);\n\t\ttype.setLayoutData(fd_type);\n\t\ttype.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\ttype.setText(\"\\u7C7B\\u578B\");\n\t\t\n\t\tCombo typecombo = new Combo(load, SWT.NONE);\n\t\ttypecombo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\ttypecombo.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_typecombo = new FormData();\n\t\tfd_typecombo.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_typecombo.top = new FormAttachment(30);\n\t\tfd_typecombo.left = new FormAttachment(50);\n\t\ttypecombo.setLayoutData(fd_typecombo);\n\t\ttypecombo.setText(\"\\u95E8\\u8BCA\\u7C7B\\u578B\");\n\t\ttypecombo.add(\"普通门诊\",0);\n\t\ttypecombo.add(\"专家门诊\",1);\n\t\tMySelectionListener3 ms3 = new MySelectionListener3(typecombo,costtext);\n\t\ttypecombo.addSelectionListener(ms3);\n\t\t\n\t\tCombo doctorcombo = new Combo(load, SWT.NONE);\n\t\tdoctorcombo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tdoctorcombo.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_doctorcombo = new FormData();\n\t\tfd_doctorcombo.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_doctorcombo.top = new FormAttachment(60);\n\t\tfd_doctorcombo.left = new FormAttachment(50);\n\t\tdoctorcombo.setLayoutData(fd_doctorcombo);\n\t\tdoctorcombo.setText(\"\\u9009\\u62E9\\u533B\\u751F\");\n\t\t\n\t\tCombo subject = new Combo(load, SWT.NONE);\n\t\tsubject.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tsubject.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tfd_subjet.right = new FormAttachment(subject, -6);\n\t\tfd_subjet.top = new FormAttachment(subject, -1, SWT.TOP);\n\t\tFormData fd_subject = new FormData();\n\t\tfd_subject.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_subject.top = new FormAttachment(50);\n\t\tfd_subject.left = new FormAttachment(50);\n\t\tsubject.setLayoutData(fd_subject);\n\t\tsubject.setText(\"\\u79D1\\u5BA4\\uFF1F\");\n\t\tsubject.add(\"神经内科\", 0);\n\t\tsubject.add(\"呼吸科\", 1);\n\t\tsubject.add(\"泌尿科\", 2);\n\t\tsubject.add(\"放射科\", 3);\n\t\tsubject.add(\"五官\", 4);\n\t\tMySelectionListener myselection = new MySelectionListener(i,subject,doctorcombo,pdtabledaoimpl);\n\t\tsubject.addSelectionListener(myselection);\n\t\t\n\t\tMySelectionListener2 ms2 = new MySelectionListener2(subject,doctorcombo,Register,nametext,RDI);\n\t\tdoctorcombo.addSelectionListener(ms2);\n\t\t\n\t\tButton surebutton = new Button(load, SWT.NONE);\n\t\tFormData fd_surebutton = new FormData();\n\t\tfd_surebutton.top = new FormAttachment(70);\n\t\tfd_surebutton.left = new FormAttachment(44);\n\t\tsurebutton.setLayoutData(fd_surebutton);\n\t\tsurebutton.setFont(SWTResourceManager.getFont(\"楷体\", 12, SWT.BOLD));\n\t\tsurebutton.setText(\"\\u786E\\u5B9A\");\n\t\tsurebutton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t Register register = new Register();\n\t\t\t\tPatientDAOImpl patientdaoimpl = new PatientDAOImpl();\n\n/*\t\t\t\tregisterdaoimpl.Save(Register);*/\n\t\t\t\tPatientInfo patientinfo = null;\n\t\t\t\tpatientinfo = patientdaoimpl.findByname(nametext.getText());\n\t\t\t\tif(patientinfo.getId() > 0 ){\n\t\t\t\t\tMessageBox messagebox = new MessageBox(load);\n\t\t\t\t\tmessagebox.setMessage(\"挂号成功!\");\n\t\t\t\t\tmessagebox.open();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tMessageBox messagebox = new MessageBox(load);\n\t\t\t\t\tmessagebox.setMessage(\"此用户不存在,请先注册\");\n\t\t\t\t\tmessagebox.open();\n\t\t\t\t\tload.dispose();\n\t\t\t\t\tregister.open();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton registerbutton = new Button(load, SWT.NONE);\n\t\tFormData fd_registerbutton = new FormData();\n\t\tfd_registerbutton.top = new FormAttachment(70);\n\t\tfd_registerbutton.left = new FormAttachment(53);\n\t\tregisterbutton.setLayoutData(fd_registerbutton);\n\t\tregisterbutton.setFont(SWTResourceManager.getFont(\"楷体\", 12, SWT.BOLD));\n\t\tregisterbutton.setText(\"\\u6CE8\\u518C\");\n\t\tregisterbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\t\n\t\t\t\tRegister register = new Register();\n\t\t\t\tload.close();\n\t\t\t\tregister.open();\n\t\t\t}\n\t\t});\n\t}", "public void addPages() {\n\t\tpage = new NewTotoriWizardPage(selection);\n\t\taddPage(page);\n\t}", "@Override\n\tpublic void create(IWizardEntity entity, WizardRunner runner) {\n\t\t\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tfinal TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\r\n\t\ttabFolder.setToolTipText(\"\");\r\n\t\t\r\n\t\tTabItem tabItem = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem.setText(\"欢迎使用\");\r\n\t\t\r\n\t\tTabItem tabItem_1 = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem_1.setText(\"员工查询\");\r\n\t\t\r\n\t\tMenu menu = new Menu(shell, SWT.BAR);\r\n\t\tshell.setMenuBar(menu);\r\n\t\t\r\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.NONE);\r\n\t\tmenuItem.setText(\"系统管理\");\r\n\t\t\r\n\t\tMenuItem menuItem_1 = new MenuItem(menu, SWT.CASCADE);\r\n\t\tmenuItem_1.setText(\"员工管理\");\r\n\t\t\r\n\t\tMenu menu_1 = new Menu(menuItem_1);\r\n\t\tmenuItem_1.setMenu(menu_1);\r\n\t\t\r\n\t\tMenuItem menuItem_2 = new MenuItem(menu_1, SWT.NONE);\r\n\t\tmenuItem_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tTabItem tbtmNewItem = new TabItem(tabFolder,SWT.NONE);\r\n\t\t\t\ttbtmNewItem.setText(\"员工查询\");\r\n\t\t\t\t//创建自定义组件\r\n\t\t\t\tEmpQueryCmp eqc = new EmpQueryCmp(tabFolder, SWT.NONE);\r\n\t\t\t\t//设置标签显示的自定义组件\r\n\t\t\t\ttbtmNewItem.setControl(eqc);\r\n\t\t\t\t\r\n\t\t\t\t//选中当前标签页\r\n\t\t\t\ttabFolder.setSelection(tbtmNewItem);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tmenuItem_2.setText(\"员工查询\");\r\n\r\n\t}", "private void createPageContent() \n\t{\n\t\tGridLayout gl = new GridLayout(4, true);\n gl.verticalSpacing = 10;\n\t\t\n\t\tGridData gd;\n\t\tfinal Label wiz1Label = new Label(shell, SWT.NONE);\n\t\twiz1Label.setText(\"Enter Fields\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\twiz1Label.setLayoutData(gd);\n\t\twiz1Label.pack();\n\t\tText nameInput = new Text(shell, SWT.BORDER);\n\t\tnameInput.setMessage(\"Name\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tnameInput.setLayoutData(gd);\n\t\tnameInput.pack();\n\t\t//Component\n\t\tText componentInput = new Text(shell, SWT.BORDER);\n\t\tcomponentInput.setMessage(\"Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcomponentInput.setLayoutData(gd);\n\t\tcomponentInput.pack();\n\t\t//school\n\t\tText schoolInput = new Text(shell, SWT.BORDER);\n\t\tschoolInput.setMessage(\"School\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tschoolInput.setLayoutData(gd);\n\t\tschoolInput.pack();\n\t\t//range\n\t\tText rangeInput = new Text(shell, SWT.BORDER);\n\t\trangeInput.setMessage(\"Range\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\trangeInput.setLayoutData(gd);\n\t\trangeInput.pack();\n\t\t//Effect\n\t\tText effectInput = new Text(shell, SWT.BORDER);\n\t\teffectInput.setMessage(\"Effect\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\teffectInput.setLayoutData(gd);\n\t\teffectInput.pack();\n\t\t//castingtime\n\t\tText castimeInput = new Text(shell, SWT.BORDER);\n\t\tcastimeInput.setMessage(\"Casting Time\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcastimeInput.setLayoutData(gd);\n\t\tcastimeInput.pack();\n\t\t//materialcomponent\n\t\tText materialInput = new Text(shell, SWT.BORDER);\n\t\tmaterialInput.setMessage(\"Material Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tmaterialInput.setLayoutData(gd);\n\t\tmaterialInput.pack();\n\t\t//Savingthrow\n\t\tText savthrowInput = new Text(shell, SWT.BORDER);\n\t\tsavthrowInput.setMessage(\"Saving Throw\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tsavthrowInput.setLayoutData(gd);\n\t\tsavthrowInput.pack();\n\t\t//Focus\n\t\tText focusInput = new Text(shell, SWT.BORDER);\n\t\tfocusInput.setMessage(\"Focus\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tfocusInput.setLayoutData(gd);\n\t\tfocusInput.pack();\n\t\t//Duration\n\t\tText durationInput = new Text(shell, SWT.BORDER);\n\t\tdurationInput.setMessage(\"Duration\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdurationInput.setLayoutData(gd);\n\t\tdurationInput.pack();\n\t\t//spellresistance\n\t\tLabel resistanceLabel = new Label(shell, SWT.NONE);\n\t\tresistanceLabel.setText(\"Can Spell Be Resisted\");\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceLabel.setLayoutData(gd);\n\t\tresistanceLabel.pack();\n\t\tButton resistanceInput = new Button(shell, SWT.CHECK);\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceInput.setLayoutData(gd);\n\t\tresistanceInput.pack();\n\t\t//level\n\t\tText levelInput = new Text(shell, SWT.BORDER);\n\t\tlevelInput.setMessage(\"Level\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tlevelInput.setLayoutData(gd);\n\t\tlevelInput.pack();\n\t\t//Damage\n\t\tText damageInput = new Text(shell, SWT.BORDER);\n\t\tdamageInput.setMessage(\"Damage\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 1;\n\t\tdamageInput.setLayoutData(gd);\n\t\tdamageInput.pack();\n\t\t//DamageAlternative\n\t\tText damagealterInput = new Text(shell, SWT.BORDER);\n\t\tdamagealterInput.setMessage(\"Damage Alternative\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdamagealterInput.setLayoutData(gd);\n\t\tdamagealterInput.pack();\n\t\n\t\t//description\n\t\t\n\t\tText descriptionInput = new Text(shell, SWT.WRAP | SWT.V_SCROLL);\n\t\tdescriptionInput.setText(\"Description (Optional)\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\tgd.verticalSpan = 15;\n\t\tdescriptionInput.setLayoutData(gd);\n\t\tdescriptionInput.pack();\n\t\tLabel blank = new Label(shell, SWT.NONE);\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, true);\n\t\tgd.horizontalSpan = 4;\n\t\tblank.setLayoutData(gd);\n\t\tblank.pack();\n\t\tButton save = new Button(shell, SWT.PUSH);\n\n\t\tsave.setText(\"Save\");\n\t\tsave.addListener(SWT.Selection, new Listener()\n\t\t{\n\t\t\tpublic void handleEvent(Event event)\n\t\t\t{\n\t\t\t\tBoolean checkfault = false;\n\t\t\t\tLinkedHashMap<String, String> a = new LinkedHashMap<String, String>();\n\t\t\t\tif(nameInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tnameInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(componentInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcomponentInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(schoolInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tschoolInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(castimeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcastimeInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(levelInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tlevelInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(checkfault)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ta.put(\"NAME\", nameInput.getText());\n\t\t\t\ta.put(\"COMPONENTS\", componentInput.getText());\n\t\t\t\ta.put(\"SCHOOL\", schoolInput.getText());\n\t\t\t\ta.put(\"CASTINGTIME\", castimeInput.getText());\n\t\t\t\ta.put(\"LEVEL\", levelInput.getText());\n\t\t\t\tif(resistanceInput.getSelection())\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"YES\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"NO\");\n\t\t\t\t}\n\t\t\t\tif(!materialInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"MATERIALCOMPONENT\", materialInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!savthrowInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SAVINGTHROW\", savthrowInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!focusInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"FOCUS\", focusInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!durationInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DURATION\", durationInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damageInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGE\", damageInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damagealterInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGEALTERNATE\", damagealterInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!rangeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"RANGE\", rangeInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!effectInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"EFFECT\", effectInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ta.put(\"DESCRIPTION\", descriptionInput.getText());\n\t\t\t\tnewspell = new SpellEntity(a);\n\t\t\t\tMain.gameState.abilities.put(newspell.getName(), newspell);\n\t\t\t\tMain.gameState.customContent.put(newspell.getName(), newspell);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t}\n\t\t);\n\t\tgd = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tsave.setLayoutData(gd);\n\t\tsave.pack();\n\t\tshell.setLayout(gl);\n\t\tshell.layout();\n\t\tshell.pack();\n//\t\t//wizard\n//\t\t\t\tfinal Composite wizPanel = new Composite(shell, SWT.BORDER);\n//\t\t\t\twizPanel.setBounds(0,0,WIDTH, HEIGHT);\n//\t\t\t\tfinal StackLayout wizLayout = new StackLayout();\n//\t\t\t\twizPanel.setLayout(wizLayout);\n//\t\t\t\t\n//\t\t\t\t//Page1 -- Name\n//\t\t\t\tfinal Composite wizpage1 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\twizpage1.setBounds(0,0,WIDTH,HEIGHT);\n//\t\t\t\t\n//\t\t\t\tfinal Label wiz1Label = new Label(wizpage1, SWT.NONE);\n//\t\t\t\twiz1Label.setText(\"Enter Name (required)\");\n//\t\t\t\twiz1Label.pack();\n//\t\t\t\tfinal Text wizpage1text = new Text(wizpage1, SWT.BORDER);\n//\t\t\t\twizpage1text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage1text.setText(\"FireBall\");\n//\t\t\t\tButton next1 = createNextButton(wizpage1);//TODO cancel and previous button\n//\t\t\t\tcreateBackButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tnext1.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage1text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellname = wizpage1text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tSystem.out.println(\"PANIC: ITEM WIZARD PAGE 1 OUT\");\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz1Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\t);\n//\t\t\t\t\n//\t\t\t\twizPages.add(wizpage1);\n//\t\t\t\t//Page2 -- component\n//\t\t\t\tfinal Composite wizpage2 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz2Label = new Label(wizpage2, SWT.NONE);\n//\t\t\t\twiz2Label.setText(\"Enter Component: (required)\");\n//\t\t\t\twiz2Label.pack();\n//\t\t\t\tfinal Text wizpage2text = new Text(wizpage2, SWT.BORDER);\n//\t\t\t\twizpage2text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage2text.setText(\"Fire\");\n//\t\t\t\tButton next2 = createNextButton(wizpage2);\n//\t\t\t\tcreateBackButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tnext2.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage2text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellcomp = wizpage2text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz2Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage2);\n//\t\t\t\t//Page3 -- School\n//\t\t\t\tfinal Composite wizpage3 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz3Label = new Label(wizpage3, SWT.NONE);\n//\t\t\t\twiz3Label.setText(\"Enter School: (required)\");\n//\t\t\t\twiz3Label.pack();\n//\t\t\t\tfinal Text wizpage3text = new Text(wizpage3, SWT.BORDER);\n//\t\t\t\twizpage3text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage3text.setText(\"Descruction\");\n//\t\t\t\tButton next3 = createNextButton(wizpage3);\n//\t\t\t\tcreateBackButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tnext3.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage3text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellschool = wizpage3text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz3Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage3);\n//\t\t\t\t//Page4 -- Range\n//\t\t\t\tfinal Composite wizpage4 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz4Label = new Label(wizpage4, SWT.NONE);\n//\t\t\t\twiz4Label.setText(\"Enter Range: (required)\");\n//\t\t\t\twiz4Label.pack();\n//\t\t\t\tfinal Text wizpage4text = new Text(wizpage4, SWT.BORDER);\n//\t\t\t\twizpage4text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage4text.setText(\"50 feet\");\n//\t\t\t\tButton next4 = createNextButton(wizpage4);\n//\t\t\t\tcreateBackButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tnext4.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage4text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellrange = wizpage4text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz4Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage4);\n//\t\t\t\t//Page5 -- effect\n//\t\t\t\tfinal Composite wizpage5 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz5Label = new Label(wizpage5, SWT.NONE);\n//\t\t\t\twiz5Label.setText(\"Enter Effect: (required)\");\n//\t\t\t\twiz5Label.pack();\n//\t\t\t\tfinal Text wizpage5text = new Text(wizpage5, SWT.BORDER);\n//\t\t\t\twizpage5text.setBounds(50, 50, 250, 150);\n//\t\t\t\twizpage5text.setText(\"No effect\");\n//\t\t\t\tButton next5 = createNextButton(wizpage5);\n//\t\t\t\tcreateBackButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tnext5.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelleffect = wizpage5text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz5Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage5);\n//\t\t\t\t//Page6 -- casting time\n//\t\t\t\tfinal Composite wizpage6 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz6Label = new Label(wizpage6, SWT.NONE);\n//\t\t\t\twiz6Label.setText(\"Enter Casting Time: (required)\");\n//\t\t\t\twiz6Label.pack();\n//\t\t\t\tfinal Text wizpage6text = new Text(wizpage6, SWT.BORDER);\n//\t\t\t\twizpage6text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage6text.setText(\"1 turn\");\n//\t\t\t\tButton next6 = createNextButton(wizpage6);\n//\t\t\t\tcreateBackButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tnext6.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellcastime = wizpage6text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz6Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage6);\n//\t\t\t\t//Page7 -- Material Component\n//\t\t\t\tfinal Composite wizpage7 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz7Label = new Label(wizpage7, SWT.NONE);\n//\t\t\t\twiz7Label.setText(\"Enter Material Component: (required)\");\n//\t\t\t\twiz7Label.pack();\n//\t\t\t\tfinal Text wizpage7text = new Text(wizpage7, SWT.BORDER);\n//\t\t\t\twizpage7text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage7text.setText(\"None\");\n//\t\t\t\tButton next7 = createNextButton(wizpage7);\n//\t\t\t\tcreateBackButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tnext7.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage7text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellmaterial = wizpage7text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz7Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage7);\n//\t\t\t\t//Page8 -- saving throw\n//\t\t\t\tfinal Composite wizpage8 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz8Label = new Label(wizpage8, SWT.NONE);\n//\t\t\t\twiz8Label.setText(\"Enter Saving Throw: (required)\");\n//\t\t\t\twiz8Label.pack();\n//\t\t\t\tfinal Text wizpage8text = new Text(wizpage8, SWT.BORDER);\n//\t\t\t\twizpage8text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage8text.setText(\"Will negate XX\");\n//\t\t\t\tButton next8 = createNextButton(wizpage8);\n//\t\t\t\tcreateBackButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tnext8.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage8text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellsaving = wizpage8text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz8Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage8);\n//\t\t\t\t//Page9 -- Focus\n//\t\t\t\tfinal Composite wizpage9 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz9Label = new Label(wizpage9, SWT.NONE);\n//\t\t\t\twiz9Label.setText(\"Enter Focus: (required)\");\n//\t\t\t\twiz9Label.pack();\n//\t\t\t\tfinal Text wizpage9text = new Text(wizpage9, SWT.BORDER);\n//\t\t\t\twizpage9text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage9text.setText(\"A dart\");\n//\t\t\t\tButton next9 = createNextButton(wizpage9);\n//\t\t\t\tcreateBackButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tnext9.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage9text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellfocus = wizpage9text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz9Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage9);\n//\t\t\t\t//Page10 -- Duration\n//\t\t\t\tfinal Composite wizpage10 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz10Label = new Label(wizpage10, SWT.NONE);\n//\t\t\t\twiz10Label.setText(\"Enter Duration: (required)\");\n//\t\t\t\twiz10Label.pack();\n//\t\t\t\tfinal Text wizpage10text = new Text(wizpage10, SWT.BORDER);\n//\t\t\t\twizpage10text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage10text.setText(\"5 Turns\");\n//\t\t\t\tButton next10 = createNextButton(wizpage10);\n//\t\t\t\tcreateBackButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tnext10.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage10text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellduration = wizpage10text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz10Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage10);\n//\t\t\t\t//Page11 -- Level\n//\t\t\t\tfinal Composite wizpage11 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz11Label = new Label(wizpage11, SWT.NONE);\n//\t\t\t\twiz11Label.setText(\"Enter Level (required)\");\n//\t\t\t\twiz11Label.pack();\n//\t\t\t\tfinal Text wizpage11text = new Text(wizpage11, SWT.BORDER);\n//\t\t\t\twizpage11text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage11text.setText(\"1\");\n//\t\t\t\tButton next11 = createNextButton(wizpage11);\n//\t\t\t\tcreateBackButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tnext11.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage11text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\ttry\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tif(Integer.parseInt(wizpage11text.getText()) >= 0)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelllevel = String.valueOf(Integer.parseInt(wizpage11text.getText()));\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tcatch(NumberFormatException a)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage11);\n//\t\t\t\t//Page12 -- resistance\n//\t\t\t\tfinal Composite wizpage12 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz12Label = new Label(wizpage12, SWT.NONE);\n//\t\t\t\twiz12Label.setText(\"Enter Spell resistance: (Yes/No)\");\n//\t\t\t\twiz12Label.pack();\n//\t\t\t\tfinal Text wizpage12text = new Text(wizpage12, SWT.BORDER);\n//\t\t\t\twizpage12text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage12text.setText(\"Yes\");\n//\t\t\t\tButton next12 = createNextButton(wizpage12);\n//\t\t\t\tcreateBackButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tnext12.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage12text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellresistance = wizpage12text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz12Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage12);\n//\t\t\t\t//Page13 - Description\n//\t\t\t\tfinal Composite wizpage13 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tLabel wiz13Label = new Label(wizpage13, SWT.NONE);\n//\t\t\t\twiz13Label.setText(\"Enter Description (Optional)\");\n//\t\t\t\twiz13Label.pack(); \n//\t\t\t\tfinal Text wizpage13text = new Text(wizpage13, SWT.BORDER);\n//\t\t\t\twizpage13text.setBounds(50, 50, 300, 200);\n//\t\t\t\twizpage13text.setText(\"Description here\");\n//\t\t\t\tButton next13 = createNextButton(wizpage13);\n//\t\t\t\tcreateBackButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tnext13.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage13text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = wizpage13text.getText();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = \"<empty>\";\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tCreateVerificationPage(wizPanel, wizLayout);\n//\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\n//\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage13);\n//\t\t\t\t\n//\t\t\t\twizLayout.topControl = wizpage1;\n//\t\t\t\twizPanel.layout();\n\t}", "public void addPages() {\t\t\n\t\tpage1 = new Opera2ActionsTransformationWizardPage1(selection, operaModel);\n\t\taddPage(page1);\t\n\t}", "public IWizard getWizard();", "@Override\n public void addPages() {\n super.addPages();\n page1 = new NewReviewWizardPage();\n addPage(page1);\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.addShellListener(new ShellAdapter() {\n\t\t\t@Override\n\t\t\tpublic void shellActivated(ShellEvent e) {\n\t\t\t\tloadSettings();\n\t\t\t}\n\t\t});\n\t\tshell.setSize(450, 160);\n\t\tshell.setText(\"Settings\");\n\t\t\n\t\ttextUsername = new Text(shell, SWT.BORDER);\n\t\ttextUsername.setBounds(118, 10, 306, 21);\n\t\t\n\t\ttextPassword = new Text(shell, SWT.BORDER | SWT.PASSWORD);\n\t\ttextPassword.setBounds(118, 38, 306, 21);\n\t\t\n\t\tCLabel lblLogin = new CLabel(shell, SWT.NONE);\n\t\tlblLogin.setBounds(10, 10, 61, 21);\n\t\tlblLogin.setText(\"Login\");\n\t\t\n\t\tCLabel lblPassword = new CLabel(shell, SWT.NONE);\n\t\tlblPassword.setText(\"Password\");\n\t\tlblPassword.setBounds(10, 38, 61, 21);\n\t\t\n\t\tButton btnSave = new Button(shell, SWT.NONE);\n\t\tbtnSave.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tApplicationSettings as = new ApplicationSettings();\n\t\t as.savePassword(textPassword.getText());\n\t\t as.saveUsername(textUsername.getText());\n\t\t \n\t\t connectionOK = WSHandler.setAutoFillDailyReports(btnAutomaticDailyReport.getSelection());\n\t\t \n\t\t shell.close();\n\t\t if (!(parentDialog == null)) {\n\t\t \tparentDialog.reloadTable();\n\t\t }\n\t\t\t}\n\t\t});\n\t\tbtnSave.setBounds(10, 87, 414, 25);\n\t\tbtnSave.setText(\"Save\");\n\n\t}", "protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }", "public NewPageWizard(IXWikiSpace sapce)\n {\n super();\n setWindowTitle(\"Add New Page...\");\n setNeedsProgressMonitor(false);\n this.space = sapce;\n }", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent e) {\r\n\t\t\t\tgetParent().setEnabled(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tshell.setImage(SWTResourceManager.getImage(LoginInfo.class, \"/javax/swing/plaf/metal/icons/ocean/warning.png\"));\r\n\r\n\t\tsetMidden(397, 197);\r\n\r\n\t\tshell.setText(this.windows_name);\r\n\t\tshell.setLayout(null);\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 11, SWT.NORMAL));\r\n\t\tlabel.setBounds(79, 45, 226, 30);\r\n\t\tlabel.setAlignment(SWT.CENTER);\r\n\t\tlabel.setText(this.label_show);\r\n\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(150, 107, 86, 30);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\r\n\t}", "@Override\n\tpublic void createControl(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NULL);\n\n\t\tsetControl(container);\n\n\t\tString username = \"\";\n\t\tString password = \"\";\n\t\ttry {\n\t\t\tString[] array = window.ds.getURI().getUserInfo().split(\":\");\n\t\t\tusername = array[0];\n\t\t\tpassword = array[1];\n\t\t} catch (Exception e) {\n\t\t}\n\n\t\tLabel lblUsername = new Label(container, SWT.NONE);\n\t\tlblUsername.setBounds(10, 52, 75, 13);\n\t\tlblUsername.setText(\"Username\");\n\n\t\tusernameText = new Text(container, SWT.BORDER);\n\t\tusernameText.setText(username);\n\t\tusernameText.addModifyListener(new ModifyListener() {\n\t\t\t@Override\n\t\t\tpublic void modifyText(ModifyEvent arg0) {\n\t\t\t\tgetWizard().getContainer().updateButtons();\n\t\t\t}\n\t\t});\n\n\t\tusernameText.setBounds(10, 71, 187, 19);\n\t\tusernameText.setFocus();\n\n\t\tLabel lblPassword = new Label(container, SWT.NONE);\n\t\tlblPassword.setBounds(10, 96, 75, 13);\n\t\tlblPassword.setText(\"Password\");\n\n\t\tpasswordText = new Text(container, SWT.BORDER | SWT.PASSWORD);\n\t\tpasswordText.setText(password);\n\t\tpasswordText.addModifyListener(new ModifyListener() {\n\t\t\t@Override\n\t\t\tpublic void modifyText(ModifyEvent arg0) {\n\t\t\t\tgetWizard().getContainer().updateButtons();\n\t\t\t}\n\t\t});\n\n\t\tpasswordText.setBounds(10, 115, 187, 19);\n\t\tControl[] list = null;\n\t\t\n\t\tif (window.ds.usesComponent(IUserCreation.class)) {\n\t\t\tbtnCreateAnNew = new Button(container, SWT.NONE);\n\t\t\tbtnCreateAnNew.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tLOG.info(\"Create an account\");\n\t\t\t\t\tSignInWithAuthenticationWizard wizard = (SignInWithAuthenticationWizard) getWizard();\n\t\t\t\t\twizard.getWizardDialog().close();\n\t\t\t\t\twindow.newUserAction.run();\n\t\t\t\t\tLOG.info(\"Create an account 2\");\n\t\t\t\t}\n\t\t\t});\n\t\t\tbtnCreateAnNew.setBounds(10, 10, 152, 25);\n\t\t\tbtnCreateAnNew.setText(\"Create a new account\");\n\t\t\tlist = new Control[] { btnCreateAnNew, usernameText,\n\t\t\t\t\tpasswordText };\n\t\t\tcontainer.setTabList(list);\n\t\t} else {\n\t\t\tlist = new Control[] { usernameText,\n\t\t\t\t\tpasswordText };\n\t\t\tcontainer.setTabList(list);\n\t\t}\n\n\t\t\n\t\t\n\t}", "public AbstractWizardPage()\n {\n super(true);\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(764, 551);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.NONE);\n\t\tmntmFile.setText(\"File...\");\n\t\t\n\t\tMenuItem mntmEdit = new MenuItem(menu, SWT.NONE);\n\t\tmntmEdit.setText(\"Edit\");\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\tcomposite.setLayout(null);\n\t\t\n\t\tGroup grpDirectorio = new Group(composite, SWT.NONE);\n\t\tgrpDirectorio.setText(\"Directorio\");\n\t\tgrpDirectorio.setBounds(10, 86, 261, 387);\n\t\t\n\t\tGroup grpListadoDeAccesos = new Group(composite, SWT.NONE);\n\t\tgrpListadoDeAccesos.setText(\"Listado de Accesos\");\n\t\tgrpListadoDeAccesos.setBounds(277, 86, 477, 387);\n\t\t\n\t\tLabel label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 479, 744, 2);\n\t\t\n\t\tButton btnNewButton = new Button(composite, SWT.NONE);\n\t\tbtnNewButton.setBounds(638, 491, 94, 28);\n\t\tbtnNewButton.setText(\"New Button\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(composite, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(538, 491, 94, 28);\n\t\tbtnNewButton_1.setText(\"New Button\");\n\t\t\n\t\tToolBar toolBar = new ToolBar(composite, SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar.setBounds(10, 10, 744, 20);\n\t\t\n\t\tToolItem tltmAccion = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion.setText(\"Accion 1\");\n\t\t\n\t\tToolItem tltmAccion_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion_1.setText(\"Accion 2\");\n\t\t\n\t\tToolItem tltmRadio = new ToolItem(toolBar, SWT.RADIO);\n\t\ttltmRadio.setText(\"Radio\");\n\t\t\n\t\tToolItem tltmItemDrop = new ToolItem(toolBar, SWT.DROP_DOWN);\n\t\ttltmItemDrop.setText(\"Item drop\");\n\t\t\n\t\tToolItem tltmCheckItem = new ToolItem(toolBar, SWT.CHECK);\n\t\ttltmCheckItem.setText(\"Check item\");\n\t\t\n\t\tCoolBar coolBar = new CoolBar(composite, SWT.FLAT);\n\t\tcoolBar.setBounds(10, 39, 744, 30);\n\t\t\n\t\tCoolItem coolItem_1 = new CoolItem(coolBar, SWT.NONE);\n\t\tcoolItem_1.setText(\"Accion 1\");\n\t\t\n\t\tCoolItem coolItem = new CoolItem(coolBar, SWT.NONE);\n\n\t}", "@Override\r\n\t\tpublic void create() {\n\t\t\tsuper.create();\r\n\t\t\tsuper.getOKButton().setEnabled(false);\r\n\t\t\tsuper.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t\tsuper.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_);\r\n\t\t\tsuper.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t}", "private void setup(){\n\t\t\n\t\t//set the dialog title\n\t\tsetText(LocaleText.get(\"createSPSSFileDialog\"));\n\t\t//create the status text\n\t\tstatusLabel = new Label();\n\t\t\n\t\t//create the buttons\n\t\tButton btnCancel = new Button(LocaleText.get(\"close\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcancel();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnCreate = new Button(LocaleText.get(\"createSPSSFileDialog\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tcreateSPSSFile();\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnSave = new Button(LocaleText.get(\"save\"), new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tsave();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\n\t\t//update the languages in the form.\n\t\tFormHandler.updateLanguage(Context.getLocale(), Context.getLocale(), form);\n\t\t//add the languages to the language drop down\n\t\tfor(Locale l : form.getLocales())\n\t\t{\n\t\t\tlistBoxLanguages.addItem(l.getName());\n\t\t}\n\t\t\n\t\t//setup the text area\n\t\tspssText.setCharacterWidth(30);\n\t\tspssText.setPixelSize(300, 300);\n\t\t\n\t\t\n\t\tFlexCellFormatter formatter = table.getFlexCellFormatter();\n\t\t\n\t\t//now add stuff to the UI\n\t\tint row = 0;\n\t\ttable.setWidget(row, 0, new Label(LocaleText.get(\"language\")));\n\t\ttable.setWidget(row, 1, listBoxLanguages);\n\t\trow++;\n\t\ttable.setWidget(row, 0, spssText);\n\t\tformatter.setColSpan(row, 0, 2);\n\t\tformatter.setHeight(row, 0, \"300px\");\n\t\tformatter.setWidth(row, 0, \"300px\");\n\t\trow++;\n\t\ttable.setWidget(row, 0, statusLabel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnCreate);\n\t\trow++;\n\t\ttable.setWidget(row, 0, btnSave);\n\t\ttable.setWidget(row, 1, btnCancel);\n\t\trow++;\n\t\ttable.setWidget(row, 0, appletHtml);\n\t\t\n\t\t\t\t\t\t\n\t\t//some random UI stuff to make everything nice and neat\n\t\tVerticalPanel panel = new VerticalPanel();\n\t\tFormUtil.maximizeWidget(panel);\n\t\tpanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tpanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);\n\t\tpanel.add(table);\n\t\t\n\t\tsetWidget(panel);\n\t\t\n\t\tsetWidth(\"200px\");\t\t\n\t}", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), getStyle());\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(getText());\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite = new Composite(shell, SWT.NONE);\r\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tComposite composite_1 = new Composite(composite, SWT.NONE);\r\n\t\tRowLayout rl_composite_1 = new RowLayout(SWT.VERTICAL);\r\n\t\trl_composite_1.center = true;\r\n\t\trl_composite_1.fill = true;\r\n\t\tcomposite_1.setLayout(rl_composite_1);\r\n\t\t\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayout(new FillLayout(SWT.VERTICAL));\r\n\t\t\r\n\t\tButton btnNewButton = new Button(composite_2, SWT.NONE);\r\n\t\tbtnNewButton.setText(\"New Button\");\r\n\t\t\r\n\t\tButton btnRadioButton = new Button(composite_2, SWT.RADIO);\r\n\t\tbtnRadioButton.setText(\"Radio Button\");\r\n\t\t\r\n\t\tButton btnCheckButton = new Button(composite_2, SWT.CHECK);\r\n\t\tbtnCheckButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCheckButton.setText(\"Check Button\");\r\n\r\n\t}", "public NewEntryWizard()\n {\n setNeedsProgressMonitor( true );\n }", "private void createContents() {\r\n\t\tshlAjouterNouvelleEquation = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);\r\n\t\tshlAjouterNouvelleEquation.setSize(363, 334);\r\n\t\tif(modification)\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Modifier Equation\");\r\n\t\telse\r\n\t\t\tshlAjouterNouvelleEquation.setText(\"Ajouter Nouvelle Equation\");\r\n\t\tshlAjouterNouvelleEquation.setLayout(new FormLayout());\r\n\r\n\r\n\t\tLabel lblContenuEquation = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblContenuEquation = new FormData();\r\n\t\tfd_lblContenuEquation.top = new FormAttachment(0, 5);\r\n\t\tfd_lblContenuEquation.left = new FormAttachment(0, 5);\r\n\t\tlblContenuEquation.setLayoutData(fd_lblContenuEquation);\r\n\t\tlblContenuEquation.setText(\"Contenu Equation\");\r\n\r\n\r\n\t\tcontrainteButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnContrainte = new FormData();\r\n\t\tfd_btnContrainte.top = new FormAttachment(0, 27);\r\n\t\tfd_btnContrainte.right = new FormAttachment(100, -10);\r\n\t\tcontrainteButton.setLayoutData(fd_btnContrainte);\r\n\t\tcontrainteButton.setText(\"Contrainte\");\r\n\r\n\t\torientationButton = new Button(shlAjouterNouvelleEquation, SWT.CHECK);\r\n\t\tFormData fd_btnOrinet = new FormData();\r\n\t\tfd_btnOrinet.top = new FormAttachment(0, 27);\r\n\t\tfd_btnOrinet.right = new FormAttachment(contrainteButton, -10);\r\n\r\n\t\torientationButton.setLayoutData(fd_btnOrinet);\r\n\t\t\r\n\t\torientationButton.setText(\"Orient\\u00E9\");\r\n\r\n\t\tcontenuEquation = new Text(shlAjouterNouvelleEquation, SWT.BORDER|SWT.SINGLE);\r\n\t\tFormData fd_text = new FormData();\r\n\t\tfd_text.right = new FormAttachment(orientationButton, -10, SWT.LEFT);\r\n\t\tfd_text.top = new FormAttachment(0, 25);\r\n\t\tfd_text.left = new FormAttachment(0, 5);\r\n\t\tcontenuEquation.setLayoutData(fd_text);\r\n\r\n\t\tcontenuEquation.addListener(SWT.FocusOut, out->{\r\n\t\t\tSystem.out.println(\"Making list...\");\r\n\t\t\ttry {\r\n\t\t\t\tequation.getListeDeParametresEqn_DYNAMIC();\r\n\t\t\t\tif(!btnTerminer.isDisposed()){\r\n\t\t\t\t\tif(!btnTerminer.getEnabled())\r\n\t\t\t\t\t\t btnTerminer.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\tthis.showError(shlAjouterNouvelleEquation, e1.toString());\r\n\t\t\t\t btnTerminer.setEnabled(false);\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\t\r\n\t\t});\r\n\r\n\t\tLabel lblNewLabel = new Label(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_lblNewLabel = new FormData();\r\n\t\tfd_lblNewLabel.top = new FormAttachment(0, 51);\r\n\t\tfd_lblNewLabel.left = new FormAttachment(0, 5);\r\n\t\tlblNewLabel.setLayoutData(fd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"Param\\u00E8tre de Sortie\");\r\n\r\n\t\tparametreDeSortieCombo = new Combo(shlAjouterNouvelleEquation, SWT.DROP_DOWN |SWT.READ_ONLY);\r\n\t\tparametreDeSortieCombo.setEnabled(false);\r\n\r\n\t\tFormData fd_combo = new FormData();\r\n\t\tfd_combo.top = new FormAttachment(0, 71);\r\n\t\tfd_combo.left = new FormAttachment(0, 5);\r\n\t\tparametreDeSortieCombo.setLayoutData(fd_combo);\r\n\t\tparametreDeSortieCombo.addListener(SWT.FocusIn, in->{\r\n\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\tparametreDeSortieCombo.update();\r\n\t\t});\r\n\r\n\t\tSashForm sashForm = new SashForm(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tFormData fd_sashForm = new FormData();\r\n\t\tfd_sashForm.top = new FormAttachment(parametreDeSortieCombo, 6);\r\n\t\tfd_sashForm.bottom = new FormAttachment(100, -50);\r\n\t\tfd_sashForm.right = new FormAttachment(100);\r\n\t\tfd_sashForm.left = new FormAttachment(0, 5);\r\n\t\tsashForm.setLayoutData(fd_sashForm);\r\n\r\n\r\n\r\n\r\n\t\tGroup propertiesGroup = new Group(sashForm, SWT.NONE);\r\n\t\tpropertiesGroup.setLayout(new FormLayout());\r\n\r\n\t\tpropertiesGroup.setText(\"Propri\\u00E9t\\u00E9s\");\r\n\t\tFormData fd_propertiesGroup = new FormData();\r\n\t\tfd_propertiesGroup.top = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.left = new FormAttachment(0);\r\n\t\tfd_propertiesGroup.bottom = new FormAttachment(100, 0);\r\n\t\tfd_propertiesGroup.right = new FormAttachment(100, 0);\r\n\t\tpropertiesGroup.setLayoutData(fd_propertiesGroup);\r\n\r\n\r\n\r\n\r\n\r\n\t\tproperties = new Text(propertiesGroup, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);\r\n\t\tFormData fd_grouptext = new FormData();\r\n\t\tfd_grouptext.top = new FormAttachment(0,0);\r\n\t\tfd_grouptext.left = new FormAttachment(0, 0);\r\n\t\tfd_grouptext.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grouptext.right = new FormAttachment(100, 0);\r\n\t\tproperties.setLayoutData(fd_grouptext);\r\n\r\n\r\n\r\n\t\tGroup grpDescription = new Group(sashForm, SWT.NONE);\r\n\t\tgrpDescription.setText(\"Description\");\r\n\t\tgrpDescription.setLayout(new FormLayout());\r\n\t\tFormData fd_grpDescription = new FormData();\r\n\t\tfd_grpDescription.bottom = new FormAttachment(100, 0);\r\n\t\tfd_grpDescription.right = new FormAttachment(100,0);\r\n\t\tfd_grpDescription.top = new FormAttachment(0);\r\n\t\tfd_grpDescription.left = new FormAttachment(0);\r\n\t\tgrpDescription.setLayoutData(fd_grpDescription);\r\n\r\n\t\tdescription = new Text(grpDescription, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tdescription.setParent(grpDescription);\r\n\r\n\t\tFormData fd_description = new FormData();\r\n\t\tfd_description.top = new FormAttachment(0,0);\r\n\t\tfd_description.left = new FormAttachment(0, 0);\r\n\t\tfd_description.bottom = new FormAttachment(100, 0);\r\n\t\tfd_description.right = new FormAttachment(100, 0);\r\n\r\n\t\tdescription.setLayoutData(fd_description);\r\n\r\n\r\n\t\tsashForm.setWeights(new int[] {50,50});\r\n\r\n\t\tbtnTerminer = new Button(shlAjouterNouvelleEquation, SWT.NONE);\r\n\t\tbtnTerminer.setEnabled(false);\r\n\t\tFormData fd_btnTerminer = new FormData();\r\n\t\tfd_btnTerminer.top = new FormAttachment(sashForm, 6);\r\n\t\tfd_btnTerminer.left = new FormAttachment(sashForm,0, SWT.CENTER);\r\n\t\tbtnTerminer.setLayoutData(fd_btnTerminer);\r\n\t\tbtnTerminer.setText(\"Terminer\");\r\n\t\tbtnTerminer.addListener(SWT.Selection, e->{\r\n\t\t\t\r\n\t\t\tboolean go = true;\r\n\t\t\tresult = null;\r\n\t\t\tif (status.equals(ValidationStatus.ok())) {\r\n\t\t\t\t//perform all the neccessary tests before validating the equation\t\t\t\t\t\r\n\t\t\t\tif(equation.isOriented()){\r\n\t\t\t\t\tif(!equation.getListeDeParametresEqn().contains(equation.getParametreDeSortie()) || equation.getParametreDeSortie() == null){\t\t\t\t\t\t\r\n\t\t\t\t\t\tString error = \"Erreur sur l'équation \"+equation.getContenuEqn();\r\n\t\t\t\t\t\tgo = false;\r\n\t\t\t\t\t\tshowError(shlAjouterNouvelleEquation, error);\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (go) {\r\n\t\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tequation.setParametreDeSortie(null);\r\n\t\t\t\t\tresult = Boolean.TRUE;\r\n\t\t\t\t\t//Just some cleanup\r\n\t\t\t\t\tfor (Parametre par : equation.getListeDeParametresEqn()) {\r\n\t\t\t\t\t\tif (par.getTypeP().equals(TypeParametre.OUTPUT)) {\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tpar.setTypeP(TypeParametre.UNDETERMINED);\r\n\t\t\t\t\t\t\t\tpar.setSousTypeP(SousTypeParametre.FREE);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tshlAjouterNouvelleEquation.dispose();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t//\tSystem.out.println(equation.getContenuEqn() +\"\\n\"+equation.isConstraint()+\"\\n\"+equation.isOriented()+\"\\n\"+equation.getParametreDeSortie());\r\n\t\t});\r\n\r\n\t\t//In this sub routine I bind the values to the respective controls in order to observe changes \r\n\t\t//and verify the data insertion\r\n\t\tbindValues();\r\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAccountHeader.setAlignment(SWT.CENTER);\n\t\tdialogAccountHeader.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tdialogAccountHeader.setLayoutData(BorderLayout.NORTH);\n\t\tif(!this.isNeedAdd)\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel.setBounds(10, 16, 106, 21);\n\t\tlabel.setText(\"\\u0418\\u043C\\u044F \\u0441\\u0435\\u0440\\u0432\\u0435\\u0440\\u0430\");\n\t\t\n\t\ttextServer = new Text(composite, SWT.BORDER);\n\t\ttextServer.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextServer.setBounds(122, 13, 241, 32);\n\t\t\n\t\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_1.setText(\"\\u041B\\u043E\\u0433\\u0438\\u043D\");\n\t\tlabel_1.setBounds(10, 58, 55, 21);\n\t\t\n\t\ttextLogin = new Text(composite, SWT.BORDER);\n\t\ttextLogin.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextLogin.setBounds(122, 55, 241, 32);\n\t\ttextLogin.setFocus();\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_2.setText(\"\\u041F\\u0430\\u0440\\u043E\\u043B\\u044C\");\n\t\tlabel_2.setBounds(10, 106, 55, 21);\n\t\t\n\t\ttextPass = new Text(composite, SWT.PASSWORD | SWT.BORDER);\n\t\ttextPass.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextPass.setBounds(122, 103, 241, 32);\n\t\t\n\t\tif(isNeedAdd){\n\t\t\ttextServer.setText(\"imap.mail.ru\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextServer.setText(this.account.getServer());\n\t\t\ttextLogin.setText(account.getLogin());\n\t\t\ttextPass.setText(account.getPass());\n\t\t}\n\t\t\n\t\tComposite composite_1 = new Composite(shell, SWT.NONE);\n\t\tcomposite_1.setLayoutData(BorderLayout.SOUTH);\n\t\t\n\t\tButton btnSaveAccount = new Button(composite_1, SWT.NONE);\n\t\tbtnSaveAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString login = textLogin.getText();\n\t\t\t\tif(textServer.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле имя сервера не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textLogin.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (!login.matches(\"^([_A-Za-z0-9-]+)@([A-Za-z0-9]+)\\\\.([A-Za-z]{2,})$\"))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин введен некорректно!\");\n\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Setting.Instance().AnyAccounts(textLogin.getText(), isNeedAdd))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"такой логин уже существует!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textPass.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле пароль не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isNeedAdd)\n\t\t\t\t{\n\t\t\t\t\tservice.AddAccount(textServer.getText(), textLogin.getText(), textPass.getText());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\taccount.setLogin(textLogin.getText());\n\t\t\t\t\taccount.setPass(textPass.getText());\n\t\t\t\t\taccount.setServer(textServer.getText());\t\n\t\t\t\t\tservice.EditAccount(account);\n\t\t\t\t}\n\t\t\t\tservice.RepaintAccount(table);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnSaveAccount.setLocation(154, 0);\n\t\tbtnSaveAccount.setSize(96, 32);\n\t\tbtnSaveAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnSaveAccount.setText(\"\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u044C\");\n\t\t\n\t\tButton btnCancel = new Button(composite_1, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setLocation(267, 0);\n\t\tbtnCancel.setSize(96, 32);\n\t\tbtnCancel.setText(\"\\u041E\\u0442\\u043C\\u0435\\u043D\\u0430\");\n\t\tbtnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(447, 310);\n\t\tshell.setText(\"Verisure ASCII Node\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n\t\t\n\t\tTabItem basicItem = new TabItem(tabFolder, SWT.NONE);\n\t\tbasicItem.setText(\"Basic\");\n\t\t\n\t\tComposite basicComposite = new Composite(tabFolder, SWT.NONE);\n\t\tbasicItem.setControl(basicComposite);\n\t\tbasicComposite.setLayout(null);\n\t\t\n\t\tButton btnDelMeasurments = new Button(basicComposite, SWT.NONE);\n\t\t\n\t\tbtnDelMeasurments.setToolTipText(\"Delete the measurements from the device.\");\n\t\tbtnDelMeasurments.setBounds(269, 192, 159, 33);\n\t\tbtnDelMeasurments.setText(\"Delete measurements\");\n\t\t\n\t\tButton btnGetMeasurement = new Button(basicComposite, SWT.NONE);\n\t\tbtnGetMeasurement.setToolTipText(\"Get the latest measurement from the device.\");\n\t\t\n\t\tbtnGetMeasurement.setBounds(0, 36, 159, 33);\n\t\tbtnGetMeasurement.setText(\"Get new bloodvalue\");\n\t\t\n\t\tfinal StyledText receiveArea = new StyledText(basicComposite, SWT.BORDER | SWT.WRAP);\n\t\treceiveArea.setLocation(167, 30);\n\t\treceiveArea.setSize(259, 92);\n\t\treceiveArea.setToolTipText(\"This is where the measurement will be displayd.\");\n\t\t\n\t\tButton btnBase64 = new Button(basicComposite, SWT.RADIO);\n\t\tbtnBase64.setToolTipText(\"Show the latest blood value (base64 encoded).\");\n\t\tbtnBase64.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\t\n\t\tbtnDelMeasurments.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0){\n\t\t\t\treceiveArea.setText(\"Deleting measurements, please wait...\");\n\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tString theText = \"DEL\";\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//System.out.println(\"Hej\");\n\n\t\t\t\t\t\t//rest.doPut(\"lol\");\n\t\t\t\t\t\trest.doPut(theText);\n\t\t\t\t\t\tSystem.out.println(\"Sov i tre sekunder.\");\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (!db.getAck(theText, rest));\n\t\t\t\treceiveArea.setText(\"Deleted measurements from device.\");\n\t\t\t}\n\t\t});\n\t\tbtnBase64.setSelection(true);\n\t\tbtnBase64.setBounds(137, 130, 74, 25);\n\t\tbtnBase64.setText(\"base64\");\n\t\t\n\t\tButton btnHex = new Button(basicComposite, SWT.RADIO);\n\t\tbtnHex.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\n\t\t\t\ttype = 2;\n\t\t\t\tSystem.out.println(\"Bytte type till: \"+type);\n\n\t\t\t}\n\t\t});\n\t\tbtnHex.setToolTipText(\"Show the measurement in hex.\");\n\t\tbtnHex.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tbtnHex.setBounds(217, 130, 50, 25);\n\t\tbtnHex.setText(\"hex\");\n\t\t\n\t\tButton btnAscii = new Button(basicComposite, SWT.RADIO);\n\t\t\n\t\tbtnAscii.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\ttype = 1;\n\t\t\t\tSystem.out.println(\"Bytte type till: \"+type);\n\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\t * Return that the value should be represented as base64.\n\t\t * \n\t\t */\n\t\t\n\t\tbtnBase64.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\ttype = 0;\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnAscii.setToolTipText(\"Show the measurement in ascii.\");\n\t\tbtnAscii.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tbtnAscii.setBounds(269, 130, 53, 25);\n\t\tbtnAscii.setText(\"ascii\");\n\t\t\n\t\tLabel label = new Label(basicComposite, SWT.NONE);\n\t\tlabel.setText(\"A master thesis project by Pétur and David\");\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Cantarell\", 7, SWT.NORMAL));\n\t\tlabel.setBounds(10, 204, 192, 21);\n\t\t\n\t\tButton btnGetDbValue = new Button(basicComposite, SWT.NONE);\n\t\tbtnGetDbValue.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\treceiveArea.setText(db.getNodeFaults(type));\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\treceiveArea.setText(\"Getting latest measurements from db, please wait...\");\n\t\t\t}\n\t\t});\n\t\tbtnGetDbValue.setBounds(0, 71, 159, 33);\n\t\tbtnGetDbValue.setText(\"Get latest bloodvalue\");\n\t\t\n\t\t/*\n\t\t *Get measurement from device event handler \n\t\t *\n\t\t *@param The Mouse Adapter\n\t\t * \n\t\t */\n\t\t\n\t\t\n\t\tbtnGetMeasurement.addMouseListener(new MouseAdapter() {\n\t\t\t\n\t\t\tpublic void MouseDown(MouseEvent arg0){\n\t\t\t\treceiveArea.setText(\"Getting measurement from device, please wait...\");\n\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tString theText = \"LOG\";\n\t\t\t\t\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//System.out.println(\"Hej\");\n\n\t\t\t\t\t\t//rest.doPut(\"lol\");\n\t\t\t\t\t\trest.doPut(theText);\n\t\t\t\t\t\t\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (!db.getAck(theText, rest));\n\t\t\t\ttry{\n\t\t\t\t\tThread.sleep(2000);\n\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t\treceiveArea.setText(db.getNodeFaults(type));\n\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\treceiveArea.setText(\"Getting measurements from device, please wait...\");\n\t\t\t}\n\t\t});\n\n\t\t\n\t\t/*\n\t\t * The advanced tab section\n\t\t */\n\t\t\n\t\tTabItem advancedItem = new TabItem(tabFolder, SWT.NONE);\n\t\tadvancedItem.setText(\"Advanced\");\n\t\t\n\t\tComposite advComposite = new Composite(tabFolder, SWT.NONE);\n\t\tadvancedItem.setControl(advComposite);\n\t\tadvComposite.setLayout(null);\n\t\t\n\t\tButton advSendButton = new Button(advComposite, SWT.NONE);\n\t\t\n\t\n\t\tadvSendButton.setToolTipText(\"Send arbitary data to the device.\");\n\t\n\t\tadvSendButton.setBounds(307, 31, 121, 33);\n\t\tadvSendButton.setText(\"Send Data\");\n\t\t\n\t\tLabel lblNewLabel = new Label(advComposite, SWT.NONE);\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"Cantarell\", 7, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(10, 204, 192, 21);\n\t\tlblNewLabel.setText(\"A master thesis project by Pétur and David\");\n\t\t\n\t\tfinal StyledText advSendArea = new StyledText(advComposite, SWT.BORDER | SWT.WRAP);\n\t\tadvSendArea.setToolTipText(\"This is where you type your arbitary data to send to the device.\");\n\t\tadvSendArea.setBounds(10, 31, 291, 33);\n\t\t\n\t\tButton advReceiveButton = new Button(advComposite, SWT.NONE);\n\t\t\n\n\t\t\n\t\tadvReceiveButton.setToolTipText(\"Receive data from the database.\");\n\t\tadvReceiveButton.setBounds(10, 70, 99, 33);\n\t\tadvReceiveButton.setText(\"Receive Data\");\n\t\t\n\t\tfinal StyledText advReceiveArea = new StyledText(advComposite, SWT.BORDER | SWT.WRAP);\n\t\tadvReceiveArea.setToolTipText(\"This is where the receive data will be presented.\");\n\t\tadvReceiveArea.setBounds(115, 67, 313, 70);\n\t\t\n\t\tButton advAscii = new Button(advComposite, SWT.RADIO);\n\t\tadvAscii.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\tadvType = 1;\n\t\t\t}\n\t\t});\n\t\t\n\t\tadvReceiveButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tadvReceiveArea.setText(\"Receiving the data, please wait...\");\n\t\t\t\tXBNConnection xbn = new XBNConnection();\n\t\t\t\tString text = xbn.getNodeFaults(advType);\n\t\t\t\tadvReceiveArea.setText(text);\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\tadvReceiveArea.setText(\"Receivng data from device, please wait\");\n\t\t\t}\n\t\t});\n\t\tadvAscii.setSelection(true);\n\t\tadvAscii.setToolTipText(\"Show the database results as ascii.\");\n\t\tadvAscii.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tadvAscii.setBounds(10, 109, 54, 25);\n\t\tadvAscii.setText(\"ascii\");\n\t\t\n\t\tButton advHex = new Button(advComposite, SWT.RADIO);\n\t\tadvHex.setToolTipText(\"Show the database results as hex.\");\n\t\tadvHex.setFont(SWTResourceManager.getFont(\"Cantarell\", 9, SWT.NORMAL));\n\t\tadvHex.setBounds(66, 109, 43, 25);\n\t\tadvHex.setText(\"hex\");\n\t\tadvHex.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\tadvType = 2;\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnDeleteDatabase = new Button(advComposite, SWT.NONE);\n\t\tbtnDeleteDatabase.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tdb.deleteMessages();\n\t\t\t\tadvReceiveArea.setText(\"Deleted data from database\");\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnDeleteDatabase.setToolTipText(\"Delete entries in the database.\");\n\t\tbtnDeleteDatabase.setText(\"Delete database\");\n\t\tbtnDeleteDatabase.setBounds(269, 192, 159, 33);\n\t\t\n\t\n\t\t\n\n\t\t/*\n\t\t * This is the advanced send button. Can send arbitary text to the device.\n\t\t */\n\t\t\n\t\tadvSendButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t\t//advSendArea.setText(\"Sending: '\"+advSendArea.getText()+\"' to the device, please wait...\");\n\t\t\t\tString theText = advSendArea.getText();\n\t\t\t\tSystem.out.println(\"Texten som ska skickas är: \" + theText);\n\t\t\t\t\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tString chunkText = \"\";\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tStringBuilder sb = new StringBuilder(theText);\n\t\t\t\t// Add and @ to be sure that there will never be two strings that are\n\t\t\t\t// the same in a row.\n\t\t\t\t// for (int i = 3; i < sb.toString().length(); i += 6) {\n\t\t\t\t// sb.insert(i, \"@\");\n\t\t\t\t// }\n\t\t\t\t// theText = sb.toString();\n\t\t\t\tSystem.out.println(theText);\n\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\tif (theText.length() < 3) {\n\t\t\t\t\t\tchunkText = theText.substring(0, theText.length());\n\t\t\t\t\t\tint pad = theText.length() % 3;\n\t\t\t\t\t\tif (pad == 1) {\n\t\t\t\t\t\t\tchunkText = chunkText + \" \";\n\t\t\t\t\t\t\ttheText = theText + \" \";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunkText = chunkText + \" \";\n\t\t\t\t\t\t\ttheText = theText + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchunkText = theText.substring(0, 3);\n\t\t\t\t\t}\n\n\t\t\t\t\ttheText = theText.substring(3);\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\trest.doPut(chunkText);\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twhile (theText.length() > 0 && db.getAck(chunkText, rest));\n\t\t\t\tadvSendArea.setText(\"Data sent to the device.\");\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\n\t\t});\n\n\t}", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "public abstract void createContents(Panel mainPanel);", "public CartogramWizard ()\n\t{\n\t\n\t\t// Set the window parameters.\n\t\tthis.setTitle(AppContext.shortProgramName + \" _ Cartogram Wizard\");\n\t\tthis.setSize(640, 480);\n\t\tthis.setLocation(30, 40);\n\t\tthis.setResizable(false);\n\t\tthis.setLayout(null);\n\t\t//this.setModal(true);\n\t\tthis.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\n\t\tthis.addWindowListener(new CartogramWizardWindowListener());\n\t\t\n\t\t\n\t\t// Adding the cartogram wizard to the app context.\n\t\tAppContext.cartogramWizard = this;\n\t\t\n\t\t\n\t\t// Add icon panel at the left of the wizard window.\n\t\t// This panel contains the ScapeToad icon.\n\t\tif (mScapeToadIconPanel == null)\n\t\t{\n\t\t\tmScapeToadIconPanel = new ScapeToadIconPanel(this);\n\t\t}\n\t\t\n\t\tmScapeToadIconPanel.setLocation(30, 90);\n\t\tthis.add(mScapeToadIconPanel);\n\t\t\n\t\t\n\t\t\n\t\t// Add title panel.\n\t\tCartogramWizardTitlePanel titlePanel =\n\t\t\tnew CartogramWizardTitlePanel(this);\n\t\t\n\t\ttitlePanel.setLocation(30, 20);\n\t\tthis.add(titlePanel);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Add icon panel at the left of the wizard window.\n\t\t// This panel contains the ScapeToad icon.\n\t\tmWizardStepIconPanel = new WizardStepIconPanel(this);\n\t\tmWizardStepIconPanel.setLocation(380, 20);\n\t\tthis.add(mWizardStepIconPanel);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t// Ajouter l'introduction au wizard.\n\t\t// Explication des étapes à suivre :\n\t\t// 1. Sélectionner la couche des polygones (master layer).\n\t\t// 2. Sélectionner l'information statistique.\n\t\t// 3. Sélection des couches à transformer simultanément.\n\t\t\n\t\tmPanelZero = new CartogramWizardPanelZero(this);\n\t\tthis.getContentPane().add(mPanelZero);\n\t\t\n\t\tmCurrentStep = 0;\n\t\t\n\t\t\n\t\t\n\t\t// Add the running panel which is already created.\n\t\tmRunningPanel.setVisible(false);\n\t\tthis.add(mRunningPanel);\n\t\t\n\t\t\n\t\t// Add the finished panel which is already created.\n\t\tmFinishedPanel.setVisible(false);\n\t\tthis.add(mFinishedPanel);\n\t\t\n\t\t\t\t\n\t\t// Add the Cancel button.\n\t\tmCancelButton = new JButton(\"Cancel\");\n\t\tmCancelButton.setLocation(30, 404);\n\t\tmCancelButton.setSize(100, 26);\n\t\tmCancelButton.addActionListener(new CartogramWizardCloseAction());\n\t\tthis.getContentPane().add(mCancelButton);\n\t\t\n\t\t\n\t}", "private void createContents() {\r\n this.shell = new Shell(this.getParent(), this.getStyle());\r\n this.shell.setText(\"自動プロキシ構成スクリプトファイル生成\");\r\n this.shell.setLayout(new GridLayout(1, false));\r\n\r\n Composite composite = new Composite(this.shell, SWT.NONE);\r\n composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n composite.setLayout(new GridLayout(1, false));\r\n\r\n Label labelTitle = new Label(composite, SWT.NONE);\r\n labelTitle.setText(\"自動プロキシ構成スクリプトファイルを生成します\");\r\n\r\n String server = Filter.getServerName();\r\n if (server == null) {\r\n Group manualgroup = new Group(composite, SWT.NONE);\r\n manualgroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n manualgroup.setLayout(new GridLayout(2, false));\r\n manualgroup.setText(\"鎮守府サーバーが未検出です。IPアドレスを入力して下さい。\");\r\n\r\n Label iplabel = new Label(manualgroup, SWT.NONE);\r\n iplabel.setText(\"IPアドレス:\");\r\n\r\n final Text text = new Text(manualgroup, SWT.BORDER);\r\n GridData gdip = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n gdip.widthHint = SwtUtils.DPIAwareWidth(150);\r\n text.setLayoutData(gdip);\r\n text.setText(\"0.0.0.0\");\r\n text.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent e) {\r\n CreatePacFileDialog.this.server = text.getText();\r\n }\r\n });\r\n\r\n this.server = \"0.0.0.0\";\r\n } else {\r\n this.server = server;\r\n }\r\n\r\n Button storeButton = new Button(composite, SWT.NONE);\r\n storeButton.setText(\"保存先を選択...\");\r\n storeButton.addSelectionListener(new FileSelectionAdapter(this));\r\n\r\n Group addrgroup = new Group(composite, SWT.NONE);\r\n addrgroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n addrgroup.setLayout(new GridLayout(2, false));\r\n addrgroup.setText(\"アドレス(保存先のアドレスより生成されます)\");\r\n\r\n Label ieAddrLabel = new Label(addrgroup, SWT.NONE);\r\n ieAddrLabel.setText(\"IE用:\");\r\n\r\n this.iePath = new Text(addrgroup, SWT.BORDER);\r\n GridData gdIePath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gdIePath.widthHint = SwtUtils.DPIAwareWidth(380);\r\n this.iePath.setLayoutData(gdIePath);\r\n\r\n Label fxAddrLabel = new Label(addrgroup, SWT.NONE);\r\n fxAddrLabel.setText(\"Firefox用:\");\r\n\r\n this.firefoxPath = new Text(addrgroup, SWT.BORDER);\r\n GridData gdFxPath = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n gdFxPath.widthHint = SwtUtils.DPIAwareWidth(380);\r\n this.firefoxPath.setLayoutData(gdFxPath);\r\n\r\n this.shell.pack();\r\n }", "@Override\n\tpublic void createPartControl(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NONE);\n\t\t\n\t\tbtnNewButton = new Button(container, SWT.NONE);\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(286, 513, 75, 30);\n\t\tbtnNewButton.setText(\"\\u9996\\u9875\");\n\t\t\n\t\tbutton = new Button(container, SWT.NONE);\n\t\tbutton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage--;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton.setText(\"\\u4E0A\\u4E00\\u9875\");\n\t\tbutton.setBounds(367, 513, 75, 30);\n\t\t\n\t\tbutton_1 = new Button(container, SWT.NONE);\n\t\tbutton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage = page.getPageCount();\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton_1.setText(\"\\u5C3E\\u9875\");\n\t\tbutton_1.setBounds(652, 513, 75, 30);\n\t\t\n\t\tbutton_2 = new Button(container, SWT.NONE);\n\t\tbutton_2.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage++;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton_2.setText(\"\\u4E0B\\u4E00\\u9875\");\n\t\tbutton_2.setBounds(571, 513, 75, 30);\n\t\t\n\t\ttext = new Text(container, SWT.BORDER);\n\t\ttext.setText(\"\"+currentPage);\n\t\ttext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\ttext.setBounds(445, 515, 32, 26);\n\t\t\n\t\tLabel label = new Label(container, SWT.NONE);\n\t\tlabel.setText(\"/\");\n\t\tlabel.setBounds(483, 518, 6, 20);\n\t\t\n\t\tlabel_1 = new Label(container, SWT.NONE);\n\t\tlabel_1.setText(\"2\");\n\t\tlabel_1.setBounds(495, 518, 22, 20);\n\t\t\n\t\tButton button_3 = new Button(container, SWT.NONE);\n\t\tbutton_3.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tint want = Integer.parseInt(text.getText());\n\t\t\t\tif(want<1){\n\t\t\t\t\twant = 1;\n\t\t\t\t}else if(want>page.getCurrentPage()){\n\t\t\t\t\twant = page.getPageCount();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrentPage = want;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton_3.setText(\"->\");\n\t\tbutton_3.setBounds(527, 513, 32, 30);\n\t\t\n\t\ttext_1 = new Text(container, SWT.BORDER);\n\t\ttext_1.setBounds(286, 134, 73, 26);\n\t\t\n\t\tButton btnNewButton_1 = new Button(container, SWT.NONE);\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tname = text_1.getText();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(367, 134, 55, 30);\n\t\tbtnNewButton_1.setText(\"\\u67E5\\u627E\");\n\t\t\n\t\ttabFolder = new TabFolder(container, SWT.NONE);\n\t\ttabFolder.setBounds(281, 184, 456, 323);\n\t\t\n\t\ttabItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttabItem_2.setText(\"\\u672A\\u8BCA\\u65AD\");\n\t\t\n\t\ttable_2 = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable_2.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.CLOSE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_2.getItem(table_2.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdb.update(\"update register set state = 2 where name = '\"+register.getName()+\"'\");\n\t\t\t\tregister.setState(\"诊断中\");\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\ttable_2.setLinesVisible(true);\n\t\ttable_2.setHeaderVisible(true);\n\t\ttabItem_2.setControl(table_2);\n\t\t\n\t\tTableColumn tableColumn_4 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_4.setWidth(100);\n\t\ttableColumn_4.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tTableColumn tableColumn_5 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_5.setWidth(115);\n\t\ttableColumn_5.setText(\"\\u7ECF\\u529E\\u4EBA\");\n\t\t\n\t\tTableColumn tableColumn_6 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_6.setWidth(118);\n\t\ttableColumn_6.setText(\"\\u7C7B\\u578B\");\n\t\t\n\t\tTableColumn tableColumn_7 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_7.setWidth(108);\n\t\ttableColumn_7.setText(\"\\u4EF7\\u683C\");\n\t\t\n\t\tMenu menu_2 = new Menu(table_2);\n\t\ttable_2.setMenu(menu_2);\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.NONE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_2.getItem(table_2.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"无\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t}\n\t\t});\n\t\tmenuItem_4.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tname = table_2.getItem(table_2.getSelectionIndex()).getText(0);\n\t\t\t\tWarning_1 warning = new Warning_1(new Shell(), SWT.NONE);\n\t\t\t\twarning.open();\n\t\t\t\tif(warning.isResult())\n\t\t\t\t\tif(db.update(\"delete from register where name = '\"+name+\"'\")!=0){\n\t\t\t\t\t\tOpenBox.Open(\"操作成功\");\n\t\t\t\t\t\tcurrentPage = 1;\n\t\t\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tOpenBox.Open(\"操作失败\");\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tmenuItem_5.setText(\"\\u5220\\u9664\");\n\t\t\n\t\ttabItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttabItem_1.setText(\"\\u8BCA\\u65AD\\u4E2D\");\n\t\t\n\t\ttable_1 = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.CLOSE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_1.getItem(table_1.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdb.update(\"update register set state = 2 where name = '\"+register.getName()+\"'\");\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\ttable_1.setLinesVisible(true);\n\t\ttable_1.setHeaderVisible(true);\n\t\ttabItem_1.setControl(table_1);\n\t\t\n\t\tTableColumn tableColumn = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn.setWidth(100);\n\t\ttableColumn.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tTableColumn tableColumn_1 = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn_1.setWidth(115);\n\t\ttableColumn_1.setText(\"\\u7ECF\\u529E\\u4EBA\");\n\t\t\n\t\tTableColumn tableColumn_2 = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn_2.setWidth(118);\n\t\ttableColumn_2.setText(\"\\u7C7B\\u578B\");\n\t\t\n\t\tTableColumn tableColumn_3 = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn_3.setWidth(108);\n\t\ttableColumn_3.setText(\"\\u4EF7\\u683C\");\n\t\t\n\t\tMenu menu_1 = new Menu(table_1);\n\t\ttable_1.setMenu(menu_1);\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.CLOSE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_1.getItem(table_1.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"无\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tmenuItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tname = table_1.getItem(table_1.getSelectionIndex()).getText(0);\n\t\t\t\tWarning_1 warning = new Warning_1(new Shell(), SWT.CLOSE);\n\t\t\t\twarning.open();\n\t\t\t\tif(warning.isResult())\n\t\t\t\t\tif(db.update(\"delete from register where name = '\"+name+\"'\")!=0){\n\t\t\t\t\t\tOpenBox.Open(\"操作成功\");\n\t\t\t\t\t\tcurrentPage = 1;\n\t\t\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tOpenBox.Open(\"操作失败\");\n\t\t\t}\n\t\t});\n\t\tmenuItem_3.setText(\"\\u5220\\u9664\");\n\t\t\n\t\ttabItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttabItem.setText(\"\\u5DF2\\u8BCA\\u65AD\");\n\t\t\n\t\ttable = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttabItem.setControl(table);\n\t\ttable.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.NONE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table.getItem(table.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setLinesVisible(true);\n\t\t\n\t\tTableColumn tblclmnNewColumn = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn.setWidth(100);\n\t\ttblclmnNewColumn.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tTableColumn tblclmnNewColumn_1 = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn_1.setWidth(115);\n\t\ttblclmnNewColumn_1.setText(\"\\u7ECF\\u529E\\u4EBA\");\n\t\t\n\t\tTableColumn tblclmnNewColumn_2 = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn_2.setText(\"\\u7C7B\\u578B\");\n\t\ttblclmnNewColumn_2.setWidth(118);\n\t\t\n\t\tTableColumn tblclmnNewColumn_3 = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn_3.setWidth(108);\n\t\ttblclmnNewColumn_3.setText(\"\\u4EF7\\u683C\");\n\t\t\n\t\tMenu menu = new Menu(table);\n\t\ttable.setMenu(menu);\n\t\t\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.NONE);\n\t\tmenuItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.NONE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table.getItem(table.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"无\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t}\n\t\t});\n\t\tmenuItem.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu, SWT.NONE);\n\t\tmenuItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tname = table.getItem(table.getSelectionIndex()).getText(0);\n\t\t\t\tWarning_1 warning = new Warning_1(new Shell(), SWT.NONE);\n\t\t\t\twarning.open();\n\t\t\t\tif(warning.isResult())\n\t\t\t\t\tif(db.update(\"delete from register where name = '\"+name+\"'\")!=0){\n\t\t\t\t\t\tOpenBox.Open(\"操作成功\");\n\t\t\t\t\t\tcurrentPage = 1;\n\t\t\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tOpenBox.Open(\"操作失败\");\n\t\t\t}\n\t\t});\n\t\tmenuItem_1.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\n\t\tcreateActions();\n\t\tinitializeToolBar();\n\t\tinitializeMenu();\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 395);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tnachname = new Text(shell, SWT.BORDER);\r\n\t\tnachname.setBounds(32, 27, 76, 21);\r\n\t\t\r\n\t\tvorname = new Text(shell, SWT.BORDER);\r\n\t\tvorname.setBounds(32, 66, 76, 21);\r\n\t\t\r\n\t\tLabel lblNachname = new Label(shell, SWT.NONE);\r\n\t\tlblNachname.setBounds(135, 33, 55, 15);\r\n\t\tlblNachname.setText(\"Nachname\");\r\n\t\t\r\n\t\tLabel lblVorname = new Label(shell, SWT.NONE);\r\n\t\tlblVorname.setBounds(135, 66, 55, 15);\r\n\t\tlblVorname.setText(\"Vorname\");\r\n\t\t\r\n\t\tButton btnFgeListeHinzu = new Button(shell, SWT.NONE);\r\n\t\tbtnFgeListeHinzu.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//\r\n\t\t\t\tPerson p = new Person();\r\n\t\t\t\tp.setNachname(getNachname().getText());\r\n\t\t\t\tp.setVorname(getVorname().getText());\r\n\t\t\t\t//\r\n\t\t\t\tPerson.getPersonenListe().add(p);\r\n\t\t\t\tgetGuiListe().add(p.toString());\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFgeListeHinzu.setBounds(43, 127, 147, 25);\r\n\t\tbtnFgeListeHinzu.setText(\"f\\u00FCge liste hinzu\");\r\n\t\t\r\n\t\tButton btnWriteJson = new Button(shell, SWT.NONE);\r\n\t\tbtnWriteJson.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tPerson.write2JSON();\r\n\t\t\t\t\t//\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"JSON geschrieben\");\r\n\t\t\t\t\tmb.setMessage(Person.getPersonenListe().size() + \" Einträge erfolgreich geschrieben\");\r\n\t\t\t\t\tmb.open();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"Fehler bei JSON\");\r\n\t\t\t\t\tmb.setMessage(e1.getMessage());\r\n\t\t\t\t\tmb.open();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnWriteJson.setBounds(54, 171, 75, 25);\r\n\t\tbtnWriteJson.setText(\"write 2 json\");\r\n\t\t\r\n\t\tguiListe = new List(shell, SWT.BORDER);\r\n\t\tguiListe.setBounds(43, 221, 261, 125);\r\n\r\n\t}", "private void createContents() {\r\n\t\tshlOProgramie = new Shell(getParent().getDisplay(), SWT.DIALOG_TRIM\r\n\t\t\t\t| SWT.RESIZE);\r\n\t\tshlOProgramie.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tshlOProgramie.setText(\"O programie\");\r\n\t\tshlOProgramie.setSize(386, 221);\r\n\t\tint x = 386;\r\n\t\tint y = 221;\r\n\t\t// Get the resolution\r\n\t\tRectangle pDisplayBounds = shlOProgramie.getDisplay().getBounds();\r\n\r\n\t\t// This formulae calculate the shell's Left ant Top\r\n\t\tint nLeft = (pDisplayBounds.width - x) / 2;\r\n\t\tint nTop = (pDisplayBounds.height - y) / 2;\r\n\r\n\t\t// Set shell bounds,\r\n\t\tshlOProgramie.setBounds(nLeft, nTop, x, y);\r\n\t\tsetText(\"O programie\");\r\n\r\n\t\tbtnZamknij = new Button(shlOProgramie, SWT.PUSH | SWT.BORDER_SOLID);\r\n\t\tbtnZamknij.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlOProgramie.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnZamknij.setBounds(298, 164, 68, 23);\r\n\t\tbtnZamknij.setText(\"Zamknij\");\r\n\r\n\t\tText link = new Text(shlOProgramie, SWT.READ_ONLY);\r\n\t\tlink.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlink.setBounds(121, 127, 178, 13);\r\n\t\tlink.setText(\"Kontakt: [email protected]\");\r\n\r\n\t\tCLabel lblNewLabel = new CLabel(shlOProgramie, SWT.BORDER\r\n\t\t\t\t| SWT.SHADOW_IN | SWT.SHADOW_OUT | SWT.SHADOW_NONE);\r\n\t\tlblNewLabel.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlblNewLabel.setBounds(118, 20, 248, 138);\r\n\t\tlblNewLabel\r\n\t\t\t\t.setText(\" Kalkulator walut ver 0.0.2 \\r\\n -------------------------------\\r\\n Program umo\\u017Cliwiaj\\u0105cy pobieranie\\r\\n aktualnych kurs\\u00F3w walut ze strony nbp.pl\\r\\n\\r\\n Copyright by Wojciech Trocki.\\r\\n\");\r\n\r\n\t\tLabel lblNewLabel_1 = new Label(shlOProgramie, SWT.NONE);\r\n\t\tlblNewLabel_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(\"images/about.gif\"));\r\n\t\tlblNewLabel_1.setBounds(10, 20, 100, 138);\r\n\t}", "protected void createContents() {\n\t\tsetText(\"Account Settings\");\n\t\tsetSize(450, 225);\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\r\n\t}", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "private void createContents() {\n\t\tshlAbout = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE);\n\t\tshlAbout.setMinimumSize(new Point(800, 600));\n\t\tshlAbout.setSize(800, 688);\n\t\tshlAbout.setText(\"About\");\n\t\t\n\t\tLabel lblKelimetrikAPsycholinguistic = new Label(shlAbout, SWT.CENTER);\n\t\tlblKelimetrikAPsycholinguistic.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tlblKelimetrikAPsycholinguistic.setBounds(0, 10, 784, 21);\n\t\tlblKelimetrikAPsycholinguistic.setText(\"KelimetriK: A psycholinguistic tool of Turkish\");\n\t\t\n\t\tScrolledComposite scrolledComposite = new ScrolledComposite(shlAbout, SWT.BORDER | SWT.V_SCROLL);\n\t\tscrolledComposite.setBounds(0, 37, 774, 602);\n\t\tscrolledComposite.setExpandHorizontal(true);\n\t\tscrolledComposite.setExpandVertical(true);\n\t\t\n\t\tComposite composite = new Composite(scrolledComposite, SWT.NONE);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setSize(107, 21);\n\t\tlabel.setText(\"Introduction\");\n\t\tlabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\n\t\tLabel label_1 = new Label(composite, SWT.WRAP);\n\t\tlabel_1.setLocation(0, 27);\n\t\tlabel_1.setSize(753, 157);\n\t\tlabel_1.setText(\"Selection of appropriate words for a fully controlled word stimuli set is an essential component for conducting an effective psycholinguistic studies (Perea, & Polatsek, 1998; Bowers, Davis, & Hanley, 2004). For example, if the word stimuli set of a visual word recognition study is full of high frequency words, this may create a bias on the behavioral scores and would lead to incorrect inferences about the hypothesis. Thus, experimenters who are intended to work with any kind of verbal stimuli should consider such linguistic variables to obtain reliable results.\\r\\n\\r\\nKelimetriK is a query-based software program designed to demonstrate several lexical variables and orthographic statistics of words. As shown in Figure X, the user-friendly interface of KelimetriK is an easy-to-use software developed to be a helpful source experimenters who are preparing verbal stimuli sets for psycholinguistic studies. KelimetriK provides information about several lexical properties of word-frequency, neighborhood size, orthographic similarity and relatedness. KelimetriK\\u2019s counterparts in other language are N-watch in English (Davis, 2005) and BuscaPalabras in Spanish (Davis, & Perea, 2005).\");\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setLocation(0, 190);\n\t\tlabel_2.setSize(753, 21);\n\t\tlabel_2.setText(\"The lexical variables in KelimetriK Software\");\n\t\tlabel_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\n\t\tLabel label_3 = new Label(composite, SWT.WRAP);\n\t\tlabel_3.setBounds(0, 228, 753, 546);\n\t\tlabel_3.setText(\"Output lexical variables (and orthographic statistics) in KelimetriK are word-frequency, bigram and tri-gram frequency and average frequency values, orthographic neighborhood size (Coltheart\\u2019s N), orthographic Levensthein distance 20 (OLD20) and transposed letter and subset/superset similarity.\\r\\n\\r\\nWord frequency is a value that describes of how many times a word occurred in a given text. Research shows that there is a consistent logarithmic relationship between reaction time and word\\u2019s frequency score; the impact of effect is higher for smaller frequencies words that the effect gets smaller on higher frequency scores (Davis, 2005).\\r\\n\\r\\nBi-grams and tri-grams are are obtained by decomposing a word (string of tokens) into sequences of two and three number of neighboring elements (Manning, & Sch\\u00FCtze, 1999). For example, the Turkish word \\u201Ckule\\u201D (tower in English) can be decomposed into three different bigram sets (\\u201Cku\\u201D, \\u201Cul\\u201D, \\u201Cle\\u201D). Bigram/trigram frequency values are obtained by counting how many same letter (four in this case) words will start with first bigram set (e.g. \\u201Cku\\u201D), how many words have second bigram set in the middle (e.g. \\u201Cul\\u201D) in the middle, and how many words will end with last bigram set (\\u201Cle\\u201D) in a given lexical word database. The trigrams for the word \\u201Ckule\\u201D are \\u201Ckul\\u201D and \\u201Cule\\u201D. Average bi-gram/tri-gram frequency is obtained by adding a word\\u2019s entire bi-gram/ tri-gram frequencies and then dividing it by number of bigrams (\\u201Ckule\\u201D consist of three bigrams).\\r\\n\\r\\nOrthographic neighborhood size (Coltheart\\u2019s N) refers to number of words that can be obtained from a given lexical database word list by substituting a single letter of a word (Coltheart et al, 1977). For example, orthographic neighborhood size of the word \\u201Ckule\\u201D is 9 if searched on KelimetriK (\\u201C\\u015Fule\\u201D, \\u201Ckula\\u201D, \\u201Ckulp\\u201D, \\u201Cfule\\u201D, \\u201Ckale\\u201D, \\u201Ck\\u00F6le\\u201D, \\u201Ckele\\u201D, \\u201Ckile\\u201D, \\u201Cku\\u015Fe\\u201D). A word\\u2019s orthographic neighborhood size could influence behavioral performance in visual word recognition tasks of lexical decision, naming, perceptual identification, and semantic categorization (Perea, & Polatsek, 1998).\\r\\n\\r\\nOrthographic Levensthein distance 20 (OLD20) of a word is the average of 20 most close words in the unit of Levensthein distance (Yarkoni, Balota, & Yap, 2008). Levensthein distance between the two strings of letters is obtained by counting the minimum number of operations (substitution, deletion or insertion) required while passing from one letter string to the other (Levenshthein, 1966). Behavioral studies show that, OLD20 is negatively correlated with orthographic neighborhood size (r=-561) and positively correlated with word-length (r=868) for English words (Yarkoni, Balota, & Yap, 2008). Moreover, OLD20 explains more variance on visual word recognition scores than orthographic neighborhood size and word length (Yarkoni, Balota, & Yap, 2008).\\r\\n\\r\\nOrthographic similarity between two words means they are the neighbors of each other like the words \\u201Cal\\u0131n\\u201D (forehead in English) and \\u201Calan\\u201D (area in English). Transposed letter (TL) and subset/superset are the two most common similarities in the existing literature (Davis, 2005). TL similiarity is the case when the two letters differ from each other based on a single pair of adjacent letters as in the Turkish words of \\u201Cesen\\u201D (blustery) and \\u201Cesne\\u201D (yawn). Studies have shown that TL similarity may facilitate detection performance on naming and lexical decision task (Andrews, 1996). Subset/Superset similarity occurs when there is an embedded word in a given input word such as \\u201Cs\\u00FCt\\u201D (subset: milk in Turkish) \\u201Cs\\u00FCtun\\u201D (superset: pillar in Turkish). Presence of a subset in a word in a stimuli set may influence the subject\\u2019s reading performance, hence may create a confounding factor on the behavioral results (Bowers, Davis, & Hanley, 2005).\");\n\t\t\n\t\tLabel lblAndrewsLexical = new Label(composite, SWT.NONE);\n\t\tlblAndrewsLexical.setLocation(0, 798);\n\t\tlblAndrewsLexical.setSize(753, 296);\n\t\tlblAndrewsLexical.setText(\"Andrews (1996). Lexical retrieval and selection processes: Effects of transposed-letter confusability, Journal of Memory and Language 35, 775\\u2013800\\r\\n\\r\\nBowers, J. S., Davis, C. J., & Hanley, D. A. (2005). References automatic semantic activation of embedded words: Is there a \\u2018\\u2018hat\\u2019\\u2019 in \\u2018\\u2018that\\u2019\\u2019? Journal of Memory and Language, 52, 131-143.\\r\\n\\r\\nColtheart, M., Davelaar, E., Jonasson, J. T., & Besner, D. (1977). Access to the internal lexicon. Attention and Performance, 6, 535-555.\\r\\n\\r\\nDavis, C. J. (2005). N-Watch: A program for deriving neighborhood size and other psycholinguistic statistics. Behavior Research Methods, 37, 65-70.\\r\\n\\r\\nDavis, C. J., & Parea, M. (2005). BuscaPalabras: A program for deriving orthographic and phonological neighborhood statistics and other psycholinguistic indices in Spanish. Behavior Research Methods, 37, 665-671.\\r\\n\\r\\nLevenshtein, V. I. (1966, February). Binary codes capable of correcting deletions, insertions and reversals. In Soviet physics doklady (Vol. 10, p. 707).\\r\\n\\r\\nManning, C. D., & Sch\\u00FCtze, H. (1999). Foundations of statistical natural language processing. MIT press.\\r\\n\\r\\nPerea, M., & Pollatsek, A. (1998). The effects of neighborhood frequency in reading and lexical decision. Journal of Experimental Psychology, 24, 767-779.\\r\\n\\r\\nYarkoni, T., Balota, D., & Yap, M. (2008). Moving beyond Coltheart\\u2019s N: A new measure of orthographic similarity. Psychonomic Bulletin & Review, 15(5), 971-979.\\r\\n\");\n\t\t\n\t\tLabel label_4 = new Label(composite, SWT.NONE);\n\t\tlabel_4.setBounds(0, 771, 753, 21);\n\t\tlabel_4.setText(\"References\");\n\t\tlabel_4.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_4.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tscrolledComposite.setContent(composite);\n\t\tscrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\n\n\t}", "private void createContents() throws SQLException {\n\t\tshell = new Shell(getParent(), SWT.SHELL_TRIM);\n\t\tshell.setImage(user.getIcondata().BaoduongIcon);\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\tsetText(\"Tạo Công việc (Đợt Bảo dưỡng)\");\n\t\tshell.setSize(777, 480);\n\t\tnew FormTemplate().setCenterScreen(shell);\n\n\t\tFill_ItemData fi = new Fill_ItemData();\n\n\t\tSashForm sashForm = new SashForm(shell, SWT.NONE);\n\t\tsashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));\n\n\t\tSashForm sashForm_3 = new SashForm(sashForm, SWT.VERTICAL);\n\n\t\tSashForm sashForm_2 = new SashForm(sashForm_3, SWT.NONE);\n\t\tComposite composite = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setText(\"Tên đợt Bảo dưỡng*:\");\n\n\t\ttext_Tendot_Baoduong = new Text(composite, SWT.BORDER);\n\t\ttext_Tendot_Baoduong.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\n\t\tLabel label_3 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_3 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_3.verticalIndent = 3;\n\t\tlabel_3.setLayoutData(gd_label_3);\n\t\tlabel_3.setText(\"Loại phương tiện:\");\n\n\t\tcombo_Loaiphuongtien = new Combo(composite, SWT.READ_ONLY);\n\t\tcombo_Loaiphuongtien.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\tFill_ItemData f = new Fill_ItemData();\n\t\t\t\t\tif ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Xemay()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Xemay());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t} else if ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Oto()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Oto());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcombo_Loaiphuongtien.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));\n\t\tfi.setComboBox_LOAIPHUONGTIEN_Phuongtien_Giaothong(combo_Loaiphuongtien, 0);\n\n\t\tLabel label_4 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_4 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_4.verticalIndent = 3;\n\t\tlabel_4.setLayoutData(gd_label_4);\n\t\tlabel_4.setText(\"Mô tả:\");\n\n\t\ttext_Mota = new Text(composite, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\n\t\ttext_Mota.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1));\n\t\tnew Label(composite, SWT.NONE);\n\n\t\tbtnNgunSaCha = new Button(composite, SWT.NONE);\n\t\tGridData gd_btnNgunSaCha = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnNgunSaCha.widthHint = 85;\n\t\tbtnNgunSaCha.setLayoutData(gd_btnNgunSaCha);\n\t\tbtnNgunSaCha.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tChonNguonSuachua_Baoduong cnsb = new ChonNguonSuachua_Baoduong(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\tcnsb.open();\n\t\t\t\t\tnsb = cnsb.getResult();\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null) {\n\t\t\t\t\t\tfillNguonSuachuaBaoduong(nsb);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (nsb == null) {\n\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CLOSE);\n\t\t\t\t\t\tm.setText(\"Xóa dữ liệu cũ?\");\n\t\t\t\t\t\tm.setMessage(\"Bạn muốn xóa dữ liệu cũ?\");\n\t\t\t\t\t\tint rc = m.open();\n\t\t\t\t\t\tswitch (rc) {\n\t\t\t\t\t\tcase SWT.CANCEL:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.YES:\n\t\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(-1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.NO:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t}\n\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG(ViewAndEdit_MODE_dsb);\n\t\t\t\t\tfillNguonSuachuaBaoduong(ViewAndEdit_MODE_dsb);\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnNgunSaCha.setText(\"Liên hệ\");\n\t\tbtnNgunSaCha.setImage(user.getIcondata().PhoneIcon);\n\n\t\tComposite composite_1 = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite_1.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblSXut = new Label(composite_1, SWT.NONE);\n\t\tlblSXut.setText(\"Số đề xuất: \");\n\n\t\ttext_Sodexuat = new Text(composite_1, SWT.NONE);\n\t\ttext_Sodexuat.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Sodexuat.setEditable(false);\n\t\ttext_Sodexuat.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyThng = new Label(composite_1, SWT.NONE);\n\t\tlblNgyThng.setText(\"Ngày tháng: \");\n\n\t\ttext_NgaythangVanban = new Text(composite_1, SWT.NONE);\n\t\ttext_NgaythangVanban.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_NgaythangVanban.setEditable(false);\n\t\ttext_NgaythangVanban.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblnV = new Label(composite_1, SWT.NONE);\n\t\tlblnV.setText(\"Đơn vị: \");\n\n\t\ttext_Donvi = new Text(composite_1, SWT.NONE);\n\t\ttext_Donvi.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Donvi.setEditable(false);\n\t\ttext_Donvi.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyXL = new Label(composite_1, SWT.NONE);\n\t\tlblNgyXL.setText(\"Ngày xử lý:\");\n\n\t\ttext_Ngaytiepnhan = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaytiepnhan.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaytiepnhan.setEditable(false);\n\t\ttext_Ngaytiepnhan.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyGiao = new Label(composite_1, SWT.NONE);\n\t\tlblNgyGiao.setText(\"Ngày giao:\");\n\n\t\ttext_Ngaygiao = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaygiao.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaygiao.setEditable(false);\n\t\ttext_Ngaygiao.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblTrchYu = new Label(composite_1, SWT.NONE);\n\t\tGridData gd_lblTrchYu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblTrchYu.verticalIndent = 3;\n\t\tlblTrchYu.setLayoutData(gd_lblTrchYu);\n\t\tlblTrchYu.setText(\"Ghi chú: \");\n\n\t\ttext_Trichyeu = new Text(composite_1, SWT.NONE);\n\t\ttext_Trichyeu.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Trichyeu.setEditable(false);\n\t\tGridData gd_text_Trichyeu = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n\t\tgd_text_Trichyeu.heightHint = 27;\n\t\ttext_Trichyeu.setLayoutData(gd_text_Trichyeu);\n\t\tnew Label(composite_1, SWT.NONE);\n\n\t\tbtnThemDexuat = new Button(composite_1, SWT.NONE);\n\t\tbtnThemDexuat.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tInsert_dx = null;\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null\n\t\t\t\t\t\t\t&& ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() > 0) {\n\t\t\t\t\t\tInsert_dx = controler.getControl_DEXUAT().get_DEXUAT(ViewAndEdit_MODE_dsb);\n\t\t\t\t\t}\n\t\t\t\t\tif (Insert_dx != null) {\n\t\t\t\t\t\tTAPHOSO ths = controler.getControl_TAPHOSO().get_TAP_HO_SO(Insert_dx.getMA_TAPHOSO());\n\t\t\t\t\t\tTaphoso_View thsv = new Taphoso_View(shell, SWT.DIALOG_TRIM, user, ths, false);\n\t\t\t\t\t\tthsv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tNhapDeXuat ndx = new NhapDeXuat(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\t\tndx.open();\n\t\t\t\t\t\tInsert_dx = ndx.result;\n\t\t\t\t\t\tif (Insert_dx == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tboolean ict = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(\n\t\t\t\t\t\t\t\t\t\tViewAndEdit_MODE_dsb, Ma_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tif (ict) {\n\t\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_WORKING);\n\t\t\t\t\t\t\tm.setText(\"Hoàn tất\");\n\t\t\t\t\t\t\tm.setMessage(\"Thêm Đề xuất Hoàn tất\");\n\t\t\t\t\t\t\tm.open();\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (NullPointerException | SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnThemDexuat.setImage(user.getIcondata().DexuatIcon);\n\t\tbtnThemDexuat.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));\n\t\tbtnThemDexuat.setText(\"Thêm Hồ sơ\");\n\t\tsashForm_2.setWeights(new int[] { 1000, 618 });\n\n\t\tSashForm sashForm_1 = new SashForm(sashForm_3, SWT.NONE);\n\t\ttree_PTTS = new Tree(sashForm_1, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);\n\t\ttree_PTTS.setLinesVisible(true);\n\t\ttree_PTTS.setHeaderVisible(true);\n\t\ttree_PTTS.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event arg0) {\n\t\t\t\tTreeItem[] til = tree_PTTS.getSelection();\n\t\t\t\tif (til.length > 0) {\n\t\t\t\t\tRow_PTTSthamgia_Baoduong pttg = (Row_PTTSthamgia_Baoduong) til[0].getData();\n\t\t\t\t\tsetHinhthuc_Baoduong(pttg.getHtbd());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttree_PTTS.addListener(SWT.SetData, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tif (tree_PTTS.getItems().length > 0) {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tTreeColumn trclmnStt = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnStt.setWidth(50);\n\t\ttrclmnStt.setText(\"Stt\");\n\n\t\tTreeColumn trclmnTnMT = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnTnMT.setWidth(100);\n\t\ttrclmnTnMT.setText(\"Tên, mô tả\");\n\n\t\tTreeColumn trclmnHngSnXut = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnHngSnXut.setWidth(100);\n\t\ttrclmnHngSnXut.setText(\"Hãng sản xuất\");\n\n\t\tTreeColumn trclmnDngXe = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnDngXe.setWidth(100);\n\t\ttrclmnDngXe.setText(\"Dòng xe\");\n\n\t\tTreeColumn trclmnBinS = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBinS.setWidth(100);\n\t\ttrclmnBinS.setText(\"Biển số\");\n\n\t\tTreeColumn trclmnNgySDng = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnNgySDng.setWidth(100);\n\t\ttrclmnNgySDng.setText(\"Ngày sử dụng\");\n\n\t\tTreeColumn trclmnMPhngTin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnMPhngTin.setWidth(90);\n\t\ttrclmnMPhngTin.setText(\"Mã PTTS\");\n\n\t\tMenu menu = new Menu(tree_PTTS);\n\t\ttree_PTTS.setMenu(menu);\n\n\t\tMenuItem mntmThmPhngTin = new MenuItem(menu, SWT.NONE);\n\t\tmntmThmPhngTin.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tThem_PTGT();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmntmThmPhngTin.setText(\"Thêm phương tiện tài sản\");\n\n\t\tMenuItem mntmXoa = new MenuItem(menu, SWT.NONE);\n\t\tmntmXoa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tdelete();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tmntmXoa.setText(\"Xóa\");\n\n\t\tTreeColumn trclmnThayNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayNht.setWidth(70);\n\t\ttrclmnThayNht.setText(\"Thay nhớt\");\n\n\t\tTreeColumn trclmnThayLcNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNht.setWidth(100);\n\t\ttrclmnThayLcNht.setText(\"Thay lọc nhớt\");\n\n\t\tTreeColumn trclmnThayLcGi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcGi.setWidth(100);\n\t\ttrclmnThayLcGi.setText(\"Thay lọc gió\");\n\n\t\tTreeColumn trclmnThayLcNhin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNhin.setWidth(100);\n\t\ttrclmnThayLcNhin.setText(\"Thay lọc nhiên liệu\");\n\n\t\tTreeColumn trclmnThayDuPhanh = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuPhanh.setWidth(100);\n\t\ttrclmnThayDuPhanh.setText(\"Thay Dầu phanh - ly hợp\");\n\n\t\tTreeColumn trclmnThayDuHp = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuHp.setWidth(100);\n\t\ttrclmnThayDuHp.setText(\"Thay Dầu hộp số\");\n\n\t\tTreeColumn trclmnThayDuVi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuVi.setWidth(100);\n\t\ttrclmnThayDuVi.setText(\"Thay Dầu vi sai\");\n\n\t\tTreeColumn trclmnLcGiGin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnLcGiGin.setWidth(100);\n\t\ttrclmnLcGiGin.setText(\"Lọc gió giàn lạnh\");\n\n\t\tTreeColumn trclmnThayDuTr = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuTr.setWidth(100);\n\t\ttrclmnThayDuTr.setText(\"Thay dầu trợ lực lái\");\n\n\t\tTreeColumn trclmnBoDngKhcs = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBoDngKhcs.setWidth(100);\n\t\ttrclmnBoDngKhcs.setText(\"Bảo dưỡng khác\");\n\n\t\tExpandBar expandBar = new ExpandBar(sashForm_1, SWT.V_SCROLL);\n\t\texpandBar.setForeground(SWTResourceManager.getColor(SWT.COLOR_LIST_FOREGROUND));\n\n\t\tExpandItem xpndtmLoiHnhBo = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setText(\"Loại hình bảo dưỡng\");\n\n\t\tComposite grpHnhThcBo = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setControl(grpHnhThcBo);\n\t\tgrpHnhThcBo.setLayout(new GridLayout(1, false));\n\n\t\tbtnDaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDaudongco.setText(\"Dầu động cơ\");\n\n\t\tbtnLocdaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocdaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocdaudongco.setText(\"Lọc dầu động cơ\");\n\n\t\tbtnLocgio = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgio.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgio.setText(\"Lọc gió\");\n\n\t\tbtnLocnhienlieu = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocnhienlieu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocnhienlieu.setText(\"Lọc nhiên liệu\");\n\n\t\tbtnDauphanh_lyhop = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauphanh_lyhop.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauphanh_lyhop.setText(\"Dầu phanh và dầu ly hợp\");\n\n\t\tbtnDauhopso = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauhopso.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauhopso.setText(\"Dầu hộp số\");\n\n\t\tbtnDauvisai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauvisai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauvisai.setText(\"Dầu vi sai\");\n\n\t\tbtnLocgiogianlanh = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgiogianlanh.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgiogianlanh.setText(\"Lọc gió giàn lạnh\");\n\n\t\tbtnDautroluclai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDautroluclai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDautroluclai.setText(\"Dầu trợ lực lái\");\n\n\t\tbtnBaoduongkhac = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnBaoduongkhac.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBaoduongkhac.setText(\"Bảo dưỡng khác\");\n\t\txpndtmLoiHnhBo.setHeight(xpndtmLoiHnhBo.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);\n\n\t\tExpandItem xpndtmLinH = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLinH.setText(\"Liên hệ\");\n\n\t\tComposite composite_2 = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLinH.setControl(composite_2);\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblTnLinH = new Label(composite_2, SWT.NONE);\n\t\tlblTnLinH.setText(\"Tên liên hệ: \");\n\n\t\ttext_Tenlienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Tenlienhe.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblGiiThiu = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblGiiThiu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblGiiThiu.verticalIndent = 3;\n\t\tlblGiiThiu.setLayoutData(gd_lblGiiThiu);\n\t\tlblGiiThiu.setText(\"Giới thiệu: \");\n\n\t\ttext_Gioithieu = new Text(composite_2, SWT.BORDER);\n\t\ttext_Gioithieu.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\n\t\tLabel lblLinH = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblLinH = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblLinH.verticalIndent = 3;\n\t\tlblLinH.setLayoutData(gd_lblLinH);\n\t\tlblLinH.setText(\"Liên hệ: \");\n\n\t\ttext_Lienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Lienhe.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\txpndtmLinH.setHeight(120);\n\t\tsashForm_1.setWeights(new int[] { 543, 205 });\n\t\tsashForm_3.setWeights(new int[] { 170, 228 });\n\t\tsashForm.setWeights(new int[] { 1000 });\n\n\t\tbtnLuu = new Button(shell, SWT.NONE);\n\t\tbtnLuu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (dataCreate != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tTaoMoi_DotSuachua_Baoduong();\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate void TaoMoi_DotSuachua_Baoduong() throws SQLException {\n\t\t\t\tif (checkTextNotNULL()) {\n\t\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = getDOT_SUACHUA_BAODUONG();\n\t\t\t\t\tint key = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.InsertDOT_THUCHIEN_SUACHUA_BAODUONG(dsb, null, null);\n\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\tif (key >= 0) {\n\t\t\t\t\t\tif (nsb != null)\n\t\t\t\t\t\t\tdsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG().update_DOT_THUCHIEN_SUACHUA_BAODUONG(dsb);\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien > 0)\n\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(dsb,\n\t\t\t\t\t\t\t\t\t\t\tMa_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tTreeItem[] til = tree_PTTS.getItems();\n\t\t\t\t\t\tif (til.length > 0) {\n\t\t\t\t\t\t\tfor (TreeItem ti : til) {\n\t\t\t\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\t\t\t\tRow_PTTSthamgia_Baoduong rp = (Row_PTTSthamgia_Baoduong) ti.getData();\n\t\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG_TAISAN()\n\t\t\t\t\t\t\t\t\t\t.set_DOT_THUCHIEN_SUACHUA_TAISAN(dsb, rp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tshowMessage_Succes();\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tGiaoViec gv = new GiaoViec(user);\n\t\t\t\t\t\tgv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowMessage_Fail();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tshowMessage_FillText();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate DOT_THUCHIEN_SUACHUA_BAODUONG getDOT_SUACHUA_BAODUONG() {\n\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = new DOT_THUCHIEN_SUACHUA_BAODUONG();\n\t\t\t\tdsb.setTEN_DOT_THUCHIEN_SUACHUA_BAODUONG(text_Tendot_Baoduong.getText());\n\t\t\t\tdsb.setLOAI_PHUONG_TIEN(\n\t\t\t\t\t\tInteger.valueOf((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText())));\n\t\t\t\tdsb.setSUACHUA_BAODUONG(fi.getInt_Baoduong());\n\t\t\t\tdsb.setMO_TA(text_Mota.getText());\n\t\t\t\treturn dsb;\n\t\t\t}\n\n\t\t});\n\t\tGridData gd_btnLu = new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1);\n\t\tgd_btnLu.widthHint = 75;\n\t\tbtnLuu.setLayoutData(gd_btnLu);\n\t\tbtnLuu.setText(\"Xong\");\n\n\t\tbtnDong = new Button(shell, SWT.NONE);\n\t\tbtnDong.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if (Insert_dx != null)\n\t\t\t\t\t\t// controler.getControl_DEXUAT().delete_DEXUAT(Insert_dx);\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tGridData gd_btnDong = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnDong.widthHint = 75;\n\t\tbtnDong.setLayoutData(gd_btnDong);\n\t\tbtnDong.setText(\"Đóng\");\n\t\tinit_loadMODE();\n\t\tinit_CreateMode();\n\t}", "static public Wizard createWizard (){\n System.out.println(\"Enter the name of your wizard : \");\n Scanner sc = new Scanner(System.in);\n String nameCharacter = sc.next();\n\n // enter and get the HP value of the character\n System.out.println(\"Enter the healpoint of your wizard : \");\n Scanner scan = new Scanner(System.in);\n String healPointCharacter = scan.next();\n int hpCharacter = Integer.parseInt(healPointCharacter);\n\n // get the power value\n System.out.println(\"Enter the power of your wizard : \");\n Scanner sca = new Scanner(System.in);\n String powerCharacter = sca.next();\n int pcCharacter = Integer.parseInt(powerCharacter);\n\n\n // get the initiative (turn order)\n System.out.println(\"Enter the initiative of your wizard : \");\n Scanner scann = new Scanner(System.in);\n String initiativeCharacter = scann.next();\n int iniCharacter = Integer.parseInt(initiativeCharacter);\n\n System.out.println(\"Enter the wizard damage value of your wizard : \");\n Scanner scanS = new Scanner(System.in);\n String wizardDamage = scann.next();\n int wiz = Integer.parseInt(wizardDamage);\n\n Wizard createWizard = new Wizard(nameCharacter, pcCharacter, hpCharacter, iniCharacter, wiz);\n System.out.println(\"Your wizard has been created with success!\");\n\n return createWizard;\n }", "protected IFlowControl createWizard( InputStream in ){\r\n\t\tXMLWizardBuilder<T> builder = new XMLWizardBuilder<T>( in );\r\n\t\ttry{\r\n\t\t\tbuilder.build( this);\r\n\t\t}\r\n\t\tcatch( Exception ex ){\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tflow = new FlowControl(); \r\n\t\tsuper.setFlow(flow);\r\n\t\treturn flow;\r\n\t}", "protected void createContents() {\n\t\tshlCarbAndRemainder = new Shell(Display.getDefault(), SWT.TITLE|SWT.CLOSE|SWT.BORDER);\n\t\tshlCarbAndRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tshlCarbAndRemainder.setSize(323, 262);\n\t\tshlCarbAndRemainder.setText(\"CARB and Remainder\");\n\t\t\n\t\tGroup grpCarbSetting = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpCarbSetting.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpCarbSetting.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpCarbSetting.setText(\"CARB Setting\");\n\t\t\n\t\tgrpCarbSetting.setBounds(10, 0, 295, 106);\n\t\t\n\t\tLabel lblCARBValue = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblCARBValue.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblCARBValue.setBounds(10, 32, 149, 22);\n\t\tlblCARBValue.setText(\"CARB Value\");\n\t\t\n\t\tLabel lblAuthenticationPIN = new Label(grpCarbSetting, SWT.NONE);\n\t\tlblAuthenticationPIN.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlblAuthenticationPIN.setBounds(10, 68, 149, 22);\n\t\tlblAuthenticationPIN.setText(\"Authentication PIN\");\n\t\t\n\t\tSpinner spinnerCARBValue = new Spinner(grpCarbSetting, SWT.BORDER);\n\t\tspinnerCARBValue.setBounds(206, 29, 72, 22);\n\t\t\n\t\ttextAuthenticationPIN = new Text(grpCarbSetting, SWT.BORDER|SWT.PASSWORD);\n\t\ttextAuthenticationPIN.setBounds(206, 65, 72, 21);\n\t\t\t\t\n\t\tGroup grpRemainder = new Group(shlCarbAndRemainder, SWT.NONE);\n\t\tgrpRemainder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tgrpRemainder.setFont(SWTResourceManager.getFont(\"Calibri\", 12, SWT.BOLD));\n\t\tgrpRemainder.setText(\"Remainder\");\n\t\tgrpRemainder.setBounds(10, 112, 296, 106);\n\t\t\n\t\tButton btnInjectBolus = new Button(grpRemainder, SWT.NONE);\n\t\tbtnInjectBolus.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnInjectBolus.setBounds(183, 38, 103, 41);\n\t\tbtnInjectBolus.setText(\"INJECT BOLUS\");\n\t\t\n\t\tButton btnCancel = new Button(grpRemainder, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshlCarbAndRemainder.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setBounds(10, 38, 80, 41);\n\t\tbtnCancel.setText(\"Cancel\");\n\t\t\n\t\tButton btnSnooze = new Button(grpRemainder, SWT.NONE);\n\t\tbtnSnooze.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnSnooze.setBounds(96, 38, 81, 41);\n\t\tbtnSnooze.setText(\"Snooze\");\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(44, 47, 90, 24);\r\n\t\tlabel.setText(\"充值金额:\");\r\n\t\t\r\n\t\ttext_balance = new Text(shell, SWT.BORDER);\r\n\t\ttext_balance.setBounds(156, 47, 198, 30);\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\t//确认充值\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tString balance=text_balance.getText().trim();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint i=dao.add(balance);\r\n\t\t\t\t\tif(i>0){\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"成功提示\", \"充值成功\");\r\n\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswtUtil.showMessage(shell, \"错误提示\", \"所充值不能为零\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setBounds(140, 131, 114, 34);\r\n\t\tbutton.setText(\"确认充值\");\r\n\r\n\t}", "@Override\r\n\tpublic void createControl(Composite parent) {\n\t\t\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tGridData gd = new GridData(GridData.FILL_HORIZONTAL);\r\n\t\tcontainer.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel nameLabel = new Label(container, SWT.NULL);\r\n\t\tnameText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tnameLabel.setText(BundleInternationalization.getString(\"NameLabel\")+\":\");\r\n\t\tnameText.setLayoutData(gd);\r\n\t\t// Listener to validate the project name when user finishes writing\r\n\t\tnameText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel descriptionLabel = new Label(container, SWT.NULL);\r\n\t\tdescriptionText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tdescriptionLabel.setText(BundleInternationalization.getString(\"DescriptionLabel\")+\":\");\r\n\t\tdescriptionText.setLayoutData(gd);\r\n\t\t// Listener to validate the project description when user finishes writing\r\n\t\tdescriptionText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\t\t\r\n\t\t\r\n\t\tLabel startDateLabel = new Label(container, SWT.NULL);\r\n\t\tstartDateText = new DateTime(container, SWT.DATE | SWT.BORDER | SWT.SINGLE);\r\n\t\tstartDateLabel.setText(BundleInternationalization.getString(\"StartDateLabel\")+\":\");\t\r\n\t\tstartDateText.setLayoutData(gd);\r\n\t\t\r\n\r\n\t\tLabel endDateLabel = new Label(container, SWT.NULL);\r\n\t\tendDateText = new DateTime(container, SWT.DATE | SWT.BORDER | SWT.SINGLE);\r\n\t\tendDateLabel.setText(BundleInternationalization.getString(\"EndDateLabel\")+\":\");\t\r\n\t\tendDateText.setLayoutData(gd);\r\n\t\t\r\n\t\tLabel budgetLabel = new Label(container, SWT.NULL);\r\n\t\tbudgetText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tbudgetLabel.setText(BundleInternationalization.getString(\"BudgetLabel\")+\":\");\r\n\t\tbudgetText.setLayoutData(gd);\r\n\t\tbudgetText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateDouble(event);\r\n }\r\n\t\t}); \r\n\t\tbudgetText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel quantityLinesLabel = new Label(container, SWT.NULL);\r\n\t\tquantityLinesText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tquantityLinesLabel.setText(BundleInternationalization.getString(\"NumberCodeLinesLabel\")+\":\");\r\n\t\tquantityLinesText.setLayoutData(gd);\r\n\t\tquantityLinesText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateInt(event);\r\n }\r\n\r\n\t\t});\r\n\t\tquantityLinesText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel domainLabel = new Label(container, SWT.NULL);\r\n\t\tdomainText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tdomainLabel.setText(BundleInternationalization.getString(\"DomainLabel\")+\":\");\r\n\t\tdomainText.setLayoutData(gd);\r\n\t\t// Listener to validate the domain text when user finishes writing\r\n\t\tdomainText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel progLanguageLabel = new Label(container, SWT.NULL);\r\n\t\tprogLanguageCombo = new Combo(container, SWT.DROP_DOWN | SWT.READ_ONLY);\r\n\t\tprogLanguageLabel.setText(BundleInternationalization.getString(\"ProgrammingLanguageLabel\")+\":\");\r\n\t\t// progLanguageCombo.setLayoutData(gd);\t\r\n\t\tprogLanguageCombo.setItems (new String [] {\"Java\", \"Ada\", \"C++\", \"C#\", \"Cobol\", \"ASP\", \"JSP\"});\r\n\t\tprogLanguageCombo.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel estimatedHoursLabel = new Label(container, SWT.NULL);\r\n\t\testimatedHoursText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\testimatedHoursLabel.setText(BundleInternationalization.getString(\"EstimatedHoursLabel\")+\":\");\r\n\t\testimatedHoursText.setLayoutData(gd);\r\n\t\testimatedHoursText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateInt(event);\r\n }\r\n\r\n\t\t});\r\n\t\testimatedHoursText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\twizardChanged();\r\n\t\tsetControl(container);\r\n\r\n\t}", "protected void createContents() throws Exception {\n\t\tshlGecco = new Shell();\n\t\tshlGecco.setImage(SWTResourceManager.getImage(jdView.class, \"/images/yc.ico\"));\n\t\tshlGecco.setSize(1366, 736);\n\t\tshlGecco.setText(\"gecco爬取京东信息\");\n\t\tshlGecco.setLocation(0, 0);\n\t\tshlGecco.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\tSashForm sashForm = new SashForm(shlGecco, SWT.NONE);\n\t\tsashForm.setOrientation(SWT.VERTICAL);\n\n\t\tGroup group = new Group(sashForm, SWT.NONE);\n\t\tgroup.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 10, SWT.BOLD));\n\t\tgroup.setText(\"爬取查询条件\");\n\t\tgroup.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tSashForm sashForm_2 = new SashForm(group, SWT.NONE);\n\n\t\tGroup group_2 = new Group(sashForm_2, SWT.NONE);\n\t\tgroup_2.setText(\"爬取条件\");\n\n\t\tLabel lblip = new Label(group_2, SWT.NONE);\n\t\tlblip.setLocation(34, 27);\n\t\tlblip.setSize(113, 21);\n\t\tlblip.setText(\"输入开始爬取地址:\");\n\n\t\ttxtSearchUrl = new Text(group_2, SWT.BORDER);\n\t\ttxtSearchUrl.setLocation(153, 23);\n\t\ttxtSearchUrl.setSize(243, 23);\n\t\ttxtSearchUrl.setText(\"https://www.jd.com/allSort.aspx\");\n\n\t\tbtnSearch = new Button(group_2, SWT.NONE);\n\t\tbtnSearch.setLocation(408, 23);\n\t\tbtnSearch.setSize(82, 25);\n\n\t\tbtnSearch.setEnabled(false);\n\t\tbtnSearch.setText(\"开始爬取\");\n\n\t\tGroup group_3 = new Group(sashForm_2, SWT.NONE);\n\t\tgroup_3.setText(\"查询条件\");\n\n\t\tLabel label_2 = new Label(group_3, SWT.NONE);\n\t\tlabel_2.setLocation(77, 25);\n\t\tlabel_2.setSize(86, 25);\n\t\tlabel_2.setText(\"选择查询条件:\");\n\n\t\tcombo = new Combo(group_3, SWT.NONE);\n\t\tcombo.setLocation(169, 23);\n\t\tcombo.setSize(140, 23);\n\t\tcombo.setItems(new String[] { \"全部\", \"商品总类别\", \"子类别名\", \"类别链接\" });\n\t\t// combo.setText(\"全部\");\n\n\t\tbutton = new Button(group_3, SWT.NONE);\n\t\tbutton.setLocation(524, 23);\n\t\tbutton.setSize(80, 25);\n\t\tbutton.setText(\"点击查询\");\n\t\tbutton.setEnabled(false);\n\n\t\tcombo_1 = new Combo(group_3, SWT.NONE);\n\t\tcombo_1.setEnabled(false);\n\t\tcombo_1.setLocation(332, 23);\n\t\tcombo_1.setSize(170, 23);\n\t\t// combo_1.setItems(new String[] { \"全部\" });\n\t\t// combo_1.setText(\"全部\");\n\t\tsashForm_2.setWeights(new int[] { 562, 779 });\n\t\tGroup group_1 = new Group(sashForm, SWT.NONE);\n\t\tgroup_1.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 10, SWT.BOLD));\n\t\tgroup_1.setText(\"爬取结果\");\n\t\tgroup_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tSashForm sashForm_1 = new SashForm(group_1, SWT.NONE);\n\n\t\tGroup group_Categorys = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_Categorys.setText(\"商品分组\");\n\t\tgroup_Categorys.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tcategorys = new Table(group_Categorys, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tcategorys.setHeaderVisible(true);\n\t\tcategorys.setLinesVisible(true);\n\n\t\tTableColumn ParentName = new TableColumn(categorys, SWT.NONE);\n\t\tParentName.setWidth(87);\n\t\tParentName.setText(\"商品总类别\");\n\n\t\tTableColumn Title = new TableColumn(categorys, SWT.NONE);\n\t\tTitle.setWidth(87);\n\t\tTitle.setText(\"子类别名\");\n\n\t\tTableColumn Ip = new TableColumn(categorys, SWT.NONE);\n\t\tIp.setWidth(152);\n\t\tIp.setText(\"类别链接\");\n\n\t\tGroup group_ProductBrief = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_ProductBrief.setText(\"商品简要信息列表\");\n\t\tgroup_ProductBrief.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tproductBrief = new Table(group_ProductBrief, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tproductBrief.setLinesVisible(true);\n\t\tproductBrief.setHeaderVisible(true);\n\n\t\tTableColumn Code = new TableColumn(productBrief, SWT.NONE);\n\t\tCode.setWidth(80);\n\t\tCode.setText(\"商品编号\");\n\n\t\tTableColumn Detailurl = new TableColumn(productBrief, SWT.NONE);\n\t\tDetailurl.setWidth(162);\n\t\tDetailurl.setText(\"商品详情链接\");\n\n\t\tTableColumn Preview = new TableColumn(productBrief, SWT.NONE);\n\t\tPreview.setWidth(170);\n\t\tPreview.setText(\"商品图片链接\");\n\n\t\tTableColumn Dtitle = new TableColumn(productBrief, SWT.NONE);\n\t\tDtitle.setWidth(150);\n\t\tDtitle.setText(\"商品标题\");\n\n\t\tGroup group_ProductDetail = new Group(sashForm_1, SWT.NONE);\n\t\tgroup_ProductDetail.setText(\"商品详细信息\");\n\t\tgroup_ProductDetail.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tComposite composite = new Composite(group_ProductDetail, SWT.NONE);\n\n\t\tPDetail = new Text(composite,\n\t\t\t\tSWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);\n\t\tPDetail.setLocation(55, 339);\n\t\tPDetail.setSize(360, 220);\n\n\t\tLabel Id = new Label(composite, SWT.NONE);\n\t\tId.setBounds(31, 28, 61, 15);\n\t\tId.setText(\"商品编号:\");\n\n\t\tLabel detail = new Label(composite, SWT.NONE);\n\t\tdetail.setText(\"商品详情:\");\n\t\tdetail.setBounds(31, 311, 61, 15);\n\n\t\tLabel title = new Label(composite, SWT.NONE);\n\t\ttitle.setText(\"商品标题:\");\n\t\ttitle.setBounds(31, 64, 61, 15);\n\n\t\tLabel jdAd = new Label(composite, SWT.NONE);\n\t\tjdAd.setText(\"商品广告:\");\n\t\tjdAd.setBounds(31, 201, 61, 15);\n\n\t\tLabel price = new Label(composite, SWT.NONE);\n\t\tprice.setBounds(31, 108, 61, 15);\n\t\tprice.setText(\"价格:\");\n\n\t\tdcode = new Text(composite, SWT.BORDER);\n\t\tdcode.setEditable(false);\n\t\tdcode.setBounds(98, 25, 217, 21);\n\n\t\tLabel jdprice = new Label(composite, SWT.NONE);\n\t\tjdprice.setBounds(75, 127, 48, 15);\n\t\tjdprice.setText(\"京东价:\");\n\n\t\tLabel srcPrice = new Label(composite, SWT.NONE);\n\t\tsrcPrice.setBounds(75, 166, 48, 15);\n\t\tsrcPrice.setText(\"原售价:\");\n\n\t\tdprice = new Text(composite, SWT.BORDER);\n\t\tdprice.setEditable(false);\n\t\tdprice.setBounds(128, 127, 187, 21);\n\n\t\tdsrcPrice = new Text(composite, SWT.BORDER);\n\t\tdsrcPrice.setEditable(false);\n\t\tdsrcPrice.setBounds(128, 166, 187, 21);\n\n\t\tdtitle = new Text(composite,\n\t\t\t\tSWT.BORDER | SWT.READ_ONLY | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL | SWT.MULTI);\n\t\tdtitle.setBounds(98, 62, 217, 42);\n\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setText(\"广告标题:\");\n\t\tlabel.setBounds(62, 233, 61, 15);\n\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setText(\"广告链接:\");\n\t\tlabel_1.setBounds(62, 272, 61, 15);\n\n\t\tadtitle = new Text(composite, SWT.BORDER);\n\t\tadtitle.setEditable(false);\n\t\tadtitle.setBounds(128, 231, 187, 21);\n\n\t\tadUrl = new Text(composite, SWT.BORDER);\n\t\tadUrl.setEditable(false);\n\t\tadUrl.setBounds(128, 270, 187, 21);\n\t\tsashForm_1.setWeights(new int[] { 335, 573, 430 });\n\t\tsashForm.setWeights(new int[] { 85, 586 });\n\n\t\tdoEvent();// 组件的事件操作\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell(shell,SWT.SHELL_TRIM|SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\chaogushenqi.png\"));\n\t\tshell.setSize(467, 398);\n\t\tshell.setText(\"\\u5356\\u7A7A\");\n\t\t\n\t\ttext_code = new Text(shell, SWT.BORDER);\n\t\ttext_code.setBounds(225, 88, 73, 23);\n\t\t\n\t\ttext_uprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_uprice.setBounds(225, 117, 73, 23);\n\t\t\n\t\ttext_downprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_downprice.setBounds(225, 146, 73, 23);\n\t\t\n\t\ttext_price = new Text(shell, SWT.BORDER);\n\t\ttext_price.setBounds(225, 178, 73, 23);\n\t\t\n\t\ttext_num = new Text(shell, SWT.BORDER);\n\t\ttext_num.setBounds(225, 207, 73, 23);\n\t\t\n\t\t//下单,取消按钮\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tpaceoder();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(116, 284, 58, 27);\n\t\tbtnNewButton.setText(\"\\u4E0B\\u5355\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(225, 284, 58, 27);\n\t\tbtnNewButton_1.setText(\"\\u53D6\\u6D88\");\n\t\t\n\t\tLabel lbl_code = new Label(shell, SWT.NONE);\n\t\tlbl_code.setBounds(116, 91, 60, 17);\n\t\tlbl_code.setText(\"股票代码:\");\n\t\t\n\t\tLabel lbl_upprice = new Label(shell, SWT.NONE);\n\t\tlbl_upprice.setBounds(116, 120, 60, 17);\n\t\tlbl_upprice.setText(\"涨停价格:\");\n\t\t\n\t\tLabel lbl_downprice = new Label(shell, SWT.NONE);\n\t\tlbl_downprice.setBounds(116, 152, 60, 17);\n\t\tlbl_downprice.setText(\"跌停价格:\");\n\t\t\n\t\tLabel lbl_price = new Label(shell, SWT.NONE);\n\t\tlbl_price.setBounds(116, 181, 60, 17);\n\t\tlbl_price.setText(\"委托价格:\");\n\t\t\n\t\tLabel lbl_num = new Label(shell, SWT.NONE);\n\t\tlbl_num.setBounds(116, 210, 60, 17);\n\t\tlbl_num.setText(\"委托数量:\");\n\t\t\n\t\tLabel lbl_date = new Label(shell, SWT.NONE);\n\t\tlbl_date.setBounds(116, 243, 61, 17);\n\t\tlbl_date.setText(\"日 期:\");\n\t\t\n\t\ttext_dateTime = new DateTime(shell, SWT.BORDER);\n\t\ttext_dateTime.setBounds(225, 237, 88, 24);\n\t\t\n\t\tlbl_notice = new Label(shell, SWT.BORDER);\n\t\tlbl_notice.setBounds(316, 333, 125, 17);\n\t\t\n\t\tif (information == null) {\n\n\t\t\tfinal Label lbl_search = new Label(shell, SWT.NONE);\n\t\t\tlbl_search.addMouseListener(new MouseAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseDown(MouseEvent e) {\n\n\t\t\t\t\tlbl_searchEvent();\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search.addMouseTrackListener(new MouseTrackAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseEnter(MouseEvent e) {\n\t\t\t\t\tlbl_search.setBackground(Display.getCurrent()\n\t\t\t\t\t\t\t.getSystemColor(SWT.COLOR_GREEN));\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseExit(MouseEvent e) {\n\t\t\t\t\tlbl_search\n\t\t\t\t\t\t\t.setBackground(Display\n\t\t\t\t\t\t\t\t\t.getCurrent()\n\t\t\t\t\t\t\t\t\t.getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search\n\t\t\t\t\t.setImage(SWTResourceManager\n\t\t\t\t\t\t\t.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\检查.png\"));\n\t\t\tlbl_search.setBounds(354, 91, 18, 18);\n\n\t\t\ttext_place = new Text(shell, SWT.BORDER);\n\t\t\ttext_place.setBounds(304, 88, 32, 23);\n\n\t\t} else {\n\t\t\ttrade_shortsell();// 显示文本框内容\n\t\t}\n\t\t\n\t}", "protected void createPages() {\n\t\tcreateIntroEditor();\n\t\tcreatePageMainEditor();\n\t\tcreatePageController();\n\t\tcreateCssEditor();\n\t\tcreatePageTextEditor();\n\t\trefreshPageMainEditor();\n\t\trefreshPageControllerEditor();\n\t\trefreshCssEditor();\n\t\tsetDirty(false);\n\t}", "private void createWizard(String persoName, String persoImage, int persoLife, int attack) {\n\t\tpersoList.add(new Wizard(persoName, persoImage, persoLife, attack));\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(550, 400);\n\t\tshell.setText(\"Source A Antenna 1 Data\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnNewButton_1.setBounds(116, 10, 98, 30);\n\t\tbtnNewButton_1.setText(\"pol 1\");\n\t\t\n\t\tButton btnPol = new Button(shell, SWT.NONE);\n\t\tbtnPol.setText(\"pol 2\");\n\t\tbtnPol.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol.setBounds(220, 10, 98, 30);\n\t\t\n\t\tButton btnPol_1 = new Button(shell, SWT.NONE);\n\t\tbtnPol_1.setText(\"pol 3\");\n\t\tbtnPol_1.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_1.setBounds(324, 10, 98, 30);\n\t\t\n\t\tButton btnPol_2 = new Button(shell, SWT.NONE);\n\t\tbtnPol_2.setText(\"pol 4\");\n\t\tbtnPol_2.setFont(SWTResourceManager.getFont(\"Ubuntu\", 11, SWT.BOLD));\n\t\tbtnPol_2.setBounds(428, 10, 98, 30);\n\t\t\n\t\tButton button_3 = new Button(shell, SWT.NONE);\n\t\tbutton_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tPlot_graph nw = new Plot_graph();\n\t\t\t\tnw.GraphScreen();\n\t\t\t}\n\t\t});\n\t\tbutton_3.setBounds(116, 46, 98, 30);\n\t\t\n\t\tButton button_4 = new Button(shell, SWT.NONE);\n\t\tbutton_4.setBounds(116, 83, 98, 30);\n\t\t\n\t\tButton button_5 = new Button(shell, SWT.NONE);\n\t\tbutton_5.setBounds(116, 119, 98, 30);\n\t\t\n\t\tButton button_6 = new Button(shell, SWT.NONE);\n\t\tbutton_6.setBounds(116, 155, 98, 30);\n\t\t\n\t\tButton button_7 = new Button(shell, SWT.NONE);\n\t\tbutton_7.setBounds(220, 155, 98, 30);\n\t\t\n\t\tButton button_8 = new Button(shell, SWT.NONE);\n\t\tbutton_8.setBounds(220, 119, 98, 30);\n\t\t\n\t\tButton button_9 = new Button(shell, SWT.NONE);\n\t\tbutton_9.setBounds(220, 83, 98, 30);\n\t\t\n\t\tButton button_10 = new Button(shell, SWT.NONE);\n\t\tbutton_10.setBounds(220, 46, 98, 30);\n\t\t\n\t\tButton button_11 = new Button(shell, SWT.NONE);\n\t\tbutton_11.setBounds(428, 155, 98, 30);\n\t\t\n\t\tButton button_12 = new Button(shell, SWT.NONE);\n\t\tbutton_12.setBounds(428, 119, 98, 30);\n\t\t\n\t\tButton button_13 = new Button(shell, SWT.NONE);\n\t\tbutton_13.setBounds(428, 83, 98, 30);\n\t\t\n\t\tButton button_14 = new Button(shell, SWT.NONE);\n\t\tbutton_14.setBounds(428, 46, 98, 30);\n\t\t\n\t\tButton button_15 = new Button(shell, SWT.NONE);\n\t\tbutton_15.setBounds(324, 46, 98, 30);\n\t\t\n\t\tButton button_16 = new Button(shell, SWT.NONE);\n\t\tbutton_16.setBounds(324, 83, 98, 30);\n\t\t\n\t\tButton button_17 = new Button(shell, SWT.NONE);\n\t\tbutton_17.setBounds(324, 119, 98, 30);\n\t\t\n\t\tButton button_18 = new Button(shell, SWT.NONE);\n\t\tbutton_18.setBounds(324, 155, 98, 30);\n\n\t}", "public NewTargetFileWizard() {\n super();\n }", "Page createPage();", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(340, 217);\n\t\tshell.setText(\"Benvenuto\");\n\t\tshell.setLayout(new FormLayout());\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tFormData fd_composite = new FormData();\n\t\tfd_composite.bottom = new FormAttachment(100, -10);\n\t\tfd_composite.top = new FormAttachment(0, 10);\n\t\tfd_composite.right = new FormAttachment(100, -10);\n\t\tfd_composite.left = new FormAttachment(0, 10);\n\t\tcomposite.setLayoutData(fd_composite);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel lblUsername = new Label(composite, SWT.NONE);\n\t\tlblUsername.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblUsername.setText(\"Username\");\n\t\t\n\t\ttxtUsername = new Text(composite, SWT.BORDER);\n\t\ttxtUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t\tfinal String username = txtUsername.getText();\n\t\tSystem.out.println(username);\n\t\t\n\t\tLabel lblPeriodo = new Label(composite, SWT.NONE);\n\t\tlblPeriodo.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblPeriodo.setText(\"Periodo\");\n\t\t\n\t\tfinal CCombo combo_1 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_1.setVisibleItemCount(6);\n\t\tcombo_1.setItems(new String[] {\"1 settimana\", \"1 mese\", \"3 mesi\", \"6 mesi\", \"1 anno\", \"Overall\"});\n\t\t\n\t\tLabel lblNumeroCanzoni = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoni.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblNumeroCanzoni.setText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tfinal CCombo combo = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo.setItems(new String[] {\"25\", \"50\"});\n\t\tcombo.setVisibleItemCount(2);\n\t\tcombo.setToolTipText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tLabel lblNumeroCanzoniDa = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoniDa.setText(\"Numero canzoni da consigliare\");\n\t\t\n\t\tfinal CCombo combo_2 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_2.setVisibleItemCount(3);\n\t\tcombo_2.setToolTipText(\"Numero canzoni da consigliare\");\n\t\tcombo_2.setItems(new String[] {\"5\", \"10\", \"20\"});\n\t\t\n\t\tButton btnAvviaRicerca = new Button(composite, SWT.NONE);\n\t\tbtnAvviaRicerca.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tfinal String username = txtUsername.getText();\n\t\t\t\tfinal String numSong = combo.getText();\n\t\t\t\tfinal String period = combo_1.getText();\n\t\t\t\tfinal String numConsigli = combo_2.getText();\n\t\t\t\tif(username.isEmpty() || numSong.isEmpty() || period.isEmpty() || numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"si prega di compilare tutti i campi\");\n\t\t\t\t}\n\t\t\t\tif(!username.isEmpty() && !numSong.isEmpty() && !period.isEmpty() && !numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"tutto ok\");\n\t\t\t\t\t\n\t\t\t\t\tFileOutputStream out;\n\t\t\t\t\tPrintStream ps;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tout = new FileOutputStream(\"datiutente.txt\");\n\t\t\t\t\t\tps = new PrintStream(out);\n\t\t\t\t\t\tps.println(username);\n\t\t\t\t\t\tps.println(numSong);\n\t\t\t\t\t\tps.println(period);\n\t\t\t\t\t\tps.println(numConsigli);\n\t\t\t\t\t\tps.close();\n\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\tSystem.err.println(\"Errore nella scrittura del file\");\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tPrincipaleParteA.main();\n\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t\t\n\t\t});\n\t\tGridData gd_btnAvviaRicerca = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);\n\t\tgd_btnAvviaRicerca.heightHint = 31;\n\t\tbtnAvviaRicerca.setLayoutData(gd_btnAvviaRicerca);\n\t\tbtnAvviaRicerca.setText(\"Avvia Ricerca\");\n\t}", "public AddValidatorWizard() {\n super();\n initPages();\n setWindowTitle(Messages.title_newValidator);\n }", "private void convert(IProject project, AcceleoProjectWizard wizard, IProgressMonitor monitor) {\n \t\tString projectName = wizard.newProjectPage.getProjectName();\n \t\tString generatorName = this.computeGeneratorName(projectName);\n \n \t\tAcceleoProject acceleoProject = AcceleowizardmodelFactory.eINSTANCE.createAcceleoProject();\n \t\tacceleoProject.setName(projectName);\n \t\tacceleoProject.setGeneratorName(generatorName);\n \n \t\tList<AcceleoModule> allModules = this.newAcceleoModulesCreationPage.getAllModules();\n \t\tfor (AcceleoModule acceleoModule : allModules) {\n \t\t\tString parentFolder = acceleoModule.getParentFolder();\n \n \t\t\tIProject moduleProject = ResourcesPlugin.getWorkspace().getRoot().getProject(\n \t\t\t\t\tacceleoModule.getProjectName());\n \t\t\tif (moduleProject.exists() && moduleProject.isAccessible()\n \t\t\t\t\t&& acceleoModule.getModuleElement() != null\n \t\t\t\t\t&& acceleoModule.getModuleElement().isIsMain()) {\n \t\t\t\tIPath parentFolderPath = new Path(parentFolder);\n \t\t\t\tIFolder folder = moduleProject.getFolder(parentFolderPath.removeFirstSegments(1));\n \t\t\t\tacceleoProject.getExportedPackages().add(\n \t\t\t\t\t\tfolder.getProjectRelativePath().removeFirstSegments(1).toString().replaceAll(\"/\", //$NON-NLS-1$\n \t\t\t\t\t\t\t\t\"\\\\.\")); //$NON-NLS-1$\n \t\t\t}\n \t\t}\n \t\t// Prepare Ant folder\n \t\tIFolder antTasksFolder = project.getFolder(\"tasks\"); //$NON-NLS-1$\n \t\tif (!antTasksFolder.exists()) {\n \t\t\ttry {\n \t\t\t\tantTasksFolder.create(true, false, monitor);\n \t\t\t} catch (CoreException e) {\n \t\t\t\tAcceleoUIActivator.log(e, true);\n \t\t\t}\n \t\t}\n \n \t\t// Generate files\n \t\ttry {\n \t\t\tIProjectDescription description = project.getDescription();\n \t\t\tString[] natureIds = new String[] {IAcceleoConstants.ACCELEO_NATURE_ID,\n \t\t\t\t\tIAcceleoConstants.PLUGIN_NATURE_ID, IAcceleoConstants.JAVA_NATURE_ID, };\n \t\t\tdescription.setNatureIds(natureIds);\n \t\t\tproject.setDescription(description, monitor);\n \t\t} catch (CoreException e) {\n \t\t\tAcceleoUIActivator.log(e, true);\n \t\t}\n \t\tmonitor.beginTask(AcceleoUIMessages.getString(\"AcceleoNewProjectWizard.Monitor\"), 100); //$NON-NLS-1$\n \t\tmonitor.worked(10);\n \t\tAcceleoUIGenerator.getDefault().generateProjectSettings(acceleoProject, project);\n \t\tmonitor.worked(10);\n \t\tAcceleoUIGenerator.getDefault().generateProjectClasspath(acceleoProject, project);\n \t\tmonitor.worked(10);\n \t\tAcceleoUIGenerator.getDefault().generateProjectManifest(acceleoProject, project);\n \t\tmonitor.worked(10);\n \t\tAcceleoUIGenerator.getDefault().generateBuildProperties(acceleoProject, project);\n \t\tmonitor.worked(10);\n \t\tAcceleoUIGenerator.getDefault().generateActivator(acceleoProject, project);\n \n \t\tfor (AcceleoModule acceleoModule : allModules) {\n \t\t\tmonitor.worked(10);\n \t\t\tString parentFolder = acceleoModule.getParentFolder();\n \n \t\t\tIProject moduleProject = ResourcesPlugin.getWorkspace().getRoot().getProject(\n \t\t\t\t\tacceleoModule.getProjectName());\n \t\t\tif (moduleProject.exists() && moduleProject.isAccessible()) {\n \t\t\t\tIPath parentFolderPath = new Path(parentFolder);\n \t\t\t\tIFolder folder = moduleProject.getFolder(parentFolderPath.removeFirstSegments(1));\n \t\t\t\tAcceleoUIGenerator.getDefault().generateAcceleoModule(acceleoModule, folder);\n \n \t\t\t\tif (acceleoModule.isIsInitialized()) {\n \t\t\t\t\tString initializationKind = acceleoModule.getInitializationKind();\n \t\t\t\t\tIAcceleoInitializationStrategy strategy = null;\n \t\t\t\t\tList<IAcceleoInitializationStrategy> initializationStrategy = AcceleoInitializationStrategyUtils\n \t\t\t\t\t\t\t.getInitializationStrategy();\n \t\t\t\t\tfor (IAcceleoInitializationStrategy iAcceleoInitializationStrategy : initializationStrategy) {\n \t\t\t\t\t\tif (iAcceleoInitializationStrategy.getDescription() != null\n \t\t\t\t\t\t\t\t&& iAcceleoInitializationStrategy.getDescription().equals(initializationKind)) {\n \t\t\t\t\t\t\tstrategy = iAcceleoInitializationStrategy;\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \n \t\t\t\t\tIFile file = folder.getFile(acceleoModule.getName()\n \t\t\t\t\t\t\t+ \".\" + IAcceleoConstants.MTL_FILE_EXTENSION); //$NON-NLS-1$\n \t\t\t\t\tIFile exampleFile = ResourcesPlugin.getWorkspace().getRoot().getFile(\n \t\t\t\t\t\t\tnew Path(acceleoModule.getInitializationPath()));\n \n \t\t\t\t\tString moduleElementKind = IAcceleoInitializationStrategy.TEMPLATE_KIND;\n \t\t\t\t\tif (acceleoModule.getModuleElement().getKind().equals(ModuleElementKind.QUERY)) {\n \t\t\t\t\t\tmoduleElementKind = IAcceleoInitializationStrategy.QUERY_KIND;\n \t\t\t\t\t}\n \n \t\t\t\t\tif (strategy != null && file.exists()) {\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tstrategy.configure(moduleElementKind, acceleoModule.getModuleElement()\n \t\t\t\t\t\t\t\t\t.isGenerateFile(), acceleoModule.getModuleElement().isIsMain(),\n \t\t\t\t\t\t\t\t\tacceleoModule.isGenerateDocumentation());\n \t\t\t\t\t\t\tString content = strategy.getContent(exampleFile, acceleoModule.getName(),\n \t\t\t\t\t\t\t\t\tacceleoModule.getMetamodelURIs(), acceleoModule.getModuleElement()\n \t\t\t\t\t\t\t\t\t\t\t.getParameterType());\n \t\t\t\t\t\t\tByteArrayInputStream javaStream = new ByteArrayInputStream(content\n \t\t\t\t\t\t\t\t\t.getBytes(\"UTF8\")); //$NON-NLS-1$\n \t\t\t\t\t\t\tfile.setContents(javaStream, true, false, new NullProgressMonitor());\n \t\t\t\t\t\t} catch (CoreException e) {\n \t\t\t\t\t\t\tAcceleoUIActivator.log(e, true);\n \t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\n \t\t\t\t\t\t\tAcceleoUIActivator.log(e, true);\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}\n \n \t}", "public void createControl(Composite parent) {\r\n \t\tinitializeDialogUnits(parent);\r\n \r\n \t\tComposite root = new Composite(parent, SWT.NONE);\r\n \t\tGridData gd = new GridData();\r\n \r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGridLayout gridLayout = new GridLayout(1, false);\r\n \t\troot.setLayout(gridLayout);\r\n \t\tGroup generalGroup = new Group(root, SWT.NONE);\r\n \t\tgeneralGroup.setLayoutData(gd);\r\n \t\tgeneralGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_GENERAL);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \r\n \t\tgeneralGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossSeamHomeEditor, generalGroup, 3);\r\n \t\tregisterEditor(jBossAsDeployAsEditor, generalGroup, 3);\r\n \r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGroup databaseGroup = new Group(root, SWT.NONE);\r\n \t\tdatabaseGroup.setLayoutData(gd);\r\n \t\tdatabaseGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE);\r\n \t\tgridLayout = new GridLayout(4, false);\r\n \t\tdatabaseGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossHibernateDbTypeEditor, databaseGroup, 4);\r\n \t\tregisterEditor(connProfileSelEditor, databaseGroup, 4);\r\n \t\tregisterEditor(dbSchemaName, databaseGroup, 4);\r\n \t\tregisterEditor(dbCatalogName, databaseGroup, 4);\r\n \t\tregisterEditor(dbTablesExists, databaseGroup, 4);\r\n \t\tregisterEditor(recreateTablesOnDeploy, databaseGroup, 4);\r\n \t\t// registerEditor(pathToJdbcDriverJar,databaseGroup, 4);\r\n \r\n \t\tGroup generationGroup = new Group(root, SWT.NONE);\r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tgenerationGroup.setLayoutData(gd);\r\n \t\tgenerationGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CODE_GENERATION);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \t\tgenerationGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(sessionBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(entityBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(testsPkgNameditor, generationGroup, 3);\r\n \r\n \t\tsetControl(root);\r\n \t\tNewProjectDataModelFacetWizard wizard = (NewProjectDataModelFacetWizard) getWizard();\r\n \r\n \t\tIDataModel model = wizard.getDataModel();\r\n \r\n \t\tif (validatorDelegate == null) {\r\n \t\t\tvalidatorDelegate = new DataModelValidatorDelegate(this.model, this);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(jBossSeamHomeEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.SEAM_RUNTIME_NAME_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(connProfileSelEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.CONNECTION_PROFILE_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(testsPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(testsPkgNameditor\r\n \t\t\t\t\t.getName(), \"tests\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), \"entity beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(sessionBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(\r\n \t\t\t\t\tsessionBeanPkgNameditor.getName(), \"session beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(\r\n \t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME, \r\n \t\t\t\t\tnew ProjectNamesDuplicationValidator(\r\n \t\t\t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME));\r\n \t\t}\r\n \r\n \t\tjBossHibernateDbTypeEditor\r\n \t\t\t\t.addPropertyChangeListener(new PropertyChangeListener() {\r\n \t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n \t\t\t\t\t\tSeamInstallWizardPage.this.model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_DIALECT,\r\n \t\t\t\t\t\tHIBERNATE_HELPER.getDialectClass(evt.getNewValue().toString()));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t);\r\n \r\n\r\n\r\n Dialog.applyDialogFont(parent);\r\n \t}", "@Override\r\n\tpublic void createPages() {\r\n\t\t// Creates the model from the editor input\r\n\t\t//\r\n\t\t\r\n\t\tcreateModel();\r\n\r\n\t\t// Only creates the other pages if there is something that can be edited\r\n\t\t//\r\n\t\t// if (!getEditingDomain().getResourceSet().getResources().isEmpty()) {\r\n\t\tif (editorModel != null) {\r\n\t\t\t// Create a page for the selection tree view.\r\n\t\t\t//\r\n\r\n\t\t\t/*\r\n\t\t\t * Tree tree = new Tree(getContainer(), SWT.MULTI); selectionViewer\r\n\t\t\t * = new TreeViewer(tree); setCurrentViewer(selectionViewer);\r\n\t\t\t * \r\n\t\t\t * selectionViewer.setContentProvider(new\r\n\t\t\t * AdapterFactoryContentProvider(adapterFactory));\r\n\t\t\t * selectionViewer.setLabelProvider(new\r\n\t\t\t * AdapterFactoryLabelProvider(adapterFactory));\r\n\t\t\t * selectionViewer.setInput(editingDomain.getResourceSet());\r\n\t\t\t * selectionViewer.setSelection(new\r\n\t\t\t * StructuredSelection(editingDomain\r\n\t\t\t * .getResourceSet().getResources().get(0)), true);\r\n\t\t\t * \r\n\t\t\t * new AdapterFactoryTreeEditor(selectionViewer.getTree(),\r\n\t\t\t * adapterFactory);\r\n\t\t\t * \r\n\t\t\t * createContextMenuFor(selectionViewer);\r\n\t\t\t */\r\n\t\t\tComposite parent = getContainer();\r\n\t\t\tformToolkit = new FormToolkit(parent.getDisplay());\r\n\t\t\tform = formToolkit.createForm(parent);\r\n//\t\t\tform.setText(\"SETTINGS - View and modify setting values in \"\r\n//\t\t\t\t\t+ editorModel.getName() + \".\");\r\n\t\t\tComposite client = form.getBody();\r\n\t\t\t// client.setBackground(Display.getCurrent().getSystemColor(\r\n\t\t\t// SWT.COLOR_WHITE));\r\n\t\t\tclient.setLayout(new FillLayout());\r\n\t\t\tfeatureViewer = new FeatureViewer(client);\r\n\r\n\t\t\tfeatureViewer.setContentProvider(new FeatureViewerContentProvider(\r\n\t\t\t\t\teditingDomain.getCommandStack(), this));\r\n\t\t\tfeatureViewer.setInput(editorModel);\r\n\t\t\tfeatureViewer.setLabelProvider(new FeatureViewerLabelProvider(CrmlBuilder.getResourceModelRoot()));\r\n\t\t\t// featureViewer.refresh();\r\n\r\n\t\t\tfeatureViewer.addSelectionChangedListener(new ISelectionChangedListener(){\r\n\t\t\t\t\r\n\t\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\r\n\t\t\t\t\tIStructuredSelection selection = (IStructuredSelection) event\r\n\t\t\t\t\t.getSelection();\r\n\r\n\t\t\t\t\tsetSelection(selection);\r\n\t\t\t\t\t\r\n\t\t\t\t/*\tISelection convertSelection = convertSelectionToMainModel(selection);\r\n\t\t\t\t\tSelectionChangedEvent newEvent = new SelectionChangedEvent(\r\n\t\t\t\t\t\t\tConfmlEditor.this, convertSelection);\r\n\t\t\t\t\tfireSelection(newEvent);*/\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tgetSite().setSelectionProvider(featureViewer);\r\n\t\t\t// create pop up menu actions\r\n\t\t\tresetToDefaults = new ResetToDefaultAction(featureViewer);\r\n\t\t\tmoveUpAction = new MoveUpAction(featureViewer,this);\r\n\t\t\tmoveDownAction = new MoveDownAction(featureViewer,this);\r\n\t\t\tduplicateAction = new DuplicateSequencesAction(featureViewer,this);\r\n\t\t\topenDataConfmlAction = new OpenDataConfmlAction(featureViewer);\r\n\t\t\topenConfmlAction = new OpenConfmlAction(featureViewer);\r\n\t\t\topenImplAction = new OpenImplementationAction(featureViewer);\r\n\t\t\t\r\n\t\t\tIWorkbenchWindow window = getSite().getWorkbenchWindow();\r\n\t\t\tresetToDefaults.init(window);\r\n\t\t\tmoveUpAction.init(window);\r\n\t\t\tmoveDownAction.init(window);\r\n\t\t\tduplicateAction.init(window);\r\n\t\t\topenDataConfmlAction.init(window);\r\n\t\t\topenConfmlAction.init(window);\r\n\t\t\topenImplAction.init(window);\r\n\t\t\tdisableActions();\r\n\t\t\t\r\n\t\t\t// create pop up menu with actions\r\n\t\t\tcontextMenuListener = contextMenuListener(form);\r\n\t\t\tmenuManager = new MenuManager();\r\n\t\t\tmenuManager.addMenuListener(contextMenuListener);\r\n\t\t\tmenuManager.setRemoveAllWhenShown(true);\r\n\t\t\tMenu menu = menuManager.createContextMenu(form);\r\n\t\t\tform.setMenu(menu);\r\n\t\t\t\r\n\t\t\tint pageIndex = addPage(form);\r\n\t\t\tsetPageText(pageIndex, getString(\"_UI_SelectionPage_label\"));\r\n\r\n\t\t\tgetSite().getShell().getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tsetActivePage(0);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// featureViewer.addDirtyButtonListener(new MouseListener() {\r\n\t\t//\r\n\t\t// public void mouseDoubleClick(MouseEvent e) {\r\n\t\t//\r\n\t\t// }\r\n\t\t//\r\n\t\t// public void mouseDown(MouseEvent e) {\r\n\t\t// LeafGroup selectedGroup = getSelectedGroup();\r\n\t\t// if (selectedGroup != null\r\n\t\t// && !(selectedGroup instanceof SummaryLeafGroup)) {\r\n\t\t// UIGroup group = createDirtyForGroup(selectedGroup);\r\n\t\t// settingsViewer.setInput(group);\r\n\t\t// refreshAndHandleWidgetState();\r\n\t\t// // settingsViewer.refresh();\r\n\t\t// dirtySorting = true;\r\n\t\t// errorSorting = false;\r\n\t\t// notesSorting = false;\r\n\t\t// }\r\n\t\t// }\r\n\t\t//\r\n\t\t// public void mouseUp(MouseEvent e) {\r\n\t\t//\r\n\t\t// }\r\n\t\t//\r\n\t\t// });\r\n\r\n\t\t// Ensures that this editor will only display the page's tab\r\n\t\t// area if there are more than one page\r\n\t\t//\r\n\t\tgetContainer().addControlListener(new ControlAdapter() {\r\n\t\t\tboolean guard = false;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void controlResized(ControlEvent event) {\r\n\t\t\t\tif (!guard) {\r\n\t\t\t\t\tguard = true;\r\n\t\t\t\t\thideTabs();\r\n\t\t\t\t\tguard = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n//\t\tgetSite().getShell().getDisplay().asyncExec(new Runnable() {\r\n//\t\t\tpublic void run() {\r\n//\t\t\t\tupdateProblemIndication();\r\n//\t\t\t}\r\n//\t\t});\r\n\t\t\r\n\t\tupdateErrors();\r\n\t}", "public NewTestWizardPage() {\n\t\tsuper(true, \"New Groovy Test Settings\");\n\n\t\tsetTitle(\"Groovy Test Class\");\n\t\tsetDescription(\"Create a new Groovy unit test class\");\n\t}", "protected DummyWizardPage()\n {\n super( \"\" ); //$NON-NLS-1$\n setTitle( Messages.getString( \"NewEntryWizard.NoConnectonSelected\" ) ); //$NON-NLS-1$\n setDescription( Messages.getString( \"NewEntryWizard.NoConnectonSelectedDescription\" ) ); //$NON-NLS-1$\n setImageDescriptor( BrowserCommonActivator.getDefault().getImageDescriptor(\n BrowserCommonConstants.IMG_ENTRY_WIZARD ) );\n setPageComplete( true );\n }", "protected void createContents() {\r\n\t\tsetText(\"SWT Application\");\r\n\t\tsetSize(450, 300);\r\n\r\n\t}", "@Override\r\n\tprotected void initPage() {\n\t\t\r\n\t\t\r\n\t\tJPanel paneLabel = new JPanel();\r\n\t\t//JPanel panelTabs = new JPanel();\r\n\t\t\r\n\t\t\r\n\t\t//pack.setVisible(false);\r\n\r\n\t\t//setlay out\r\n\t\t//panelTabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add label to label panel\r\n\t\tpaneLabel.add(new JLabel(\"Please select Objects To export\"));\r\n\t\t//tabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add tabs\r\n\t\ttabs.addTab(\"Packages\", null, pack, \"Packages\");\r\n\t\ttabs.addTab(\"Functions\", null, fun, \"Functions\");\r\n\t\ttabs.addTab(\"Procedures\", null, proc, \"Procedures\");\r\n\t\ttabs.addTab(\"Schemas\", null, sch, \"Schemas\");\r\n\t\t\r\n\t\t\r\n\t\ttabs.setTabPlacement(JTabbedPane.TOP);\r\n\t\t\r\n\t\t//add tabs to tabpanel panel\r\n\t\t//panelTabs.add(tabs);\r\n\t\t\r\n\t\t//add data tables to panels\r\n\t\tpackTbl = new JObjectTable(pack);\r\n\t\tfunTbl = new JObjectTable(fun);\r\n\t\tschTbl = new JObjectTable(sch);\r\n\t\tprocTbl = new JObjectTable(proc);\r\n\t\t\r\n\t\t//set layout\r\n\t\tsetLayout(new GridLayout(1,1));\r\n\t\t\r\n\t\t//add label & tabs to page panel\r\n\t\t//add(paneLabel, BorderLayout.NORTH);\r\n\t\t//add(panelTabs,BorderLayout.CENTER);\r\n\t\tadd(tabs);\r\n\t\t\r\n\t\t//init select all check boxes\r\n\t\tinitChecks();\r\n\t\t\r\n\t\t//add checks to panel\r\n\t\tpack.add(ckPack);\r\n\t\tfun.add(ckFun);\r\n\t\tsch.add(ckSchema);\r\n\t\tproc.add(ckProc);\r\n\t\t\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(1200, 1100);\n\t\tshell.setText(\"Zagreb Montaža d.o.o\");\n\n\t\tfinal Composite cmpMenu = new Composite(shell, SWT.NONE);\n\t\tcmpMenu.setBackground(SWTResourceManager.getColor(119, 136, 153));\n\t\tcmpMenu.setBounds(0, 0, 359, 1061);\n\t\t\n\t\tFormToolkit formToolkit = new FormToolkit(Display.getDefault());\n\t\tfinal Section sctnCalculator = formToolkit.createSection(cmpMenu, Section.TWISTIE | Section.TITLE_BAR);\n\t\tsctnCalculator.setExpanded(false);\n\t\tsctnCalculator.setBounds(10, 160, 339, 23);\n\t\tformToolkit.paintBordersFor(sctnCalculator);\n\t\tsctnCalculator.setText(\"Kalkulator temperature preddgrijavanja\");\n\n\t\tfinal Section sctn10112ce = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctn10112ce.setBounds(45, 189, 304, 23);\n\t\tformToolkit.paintBordersFor(sctn10112ce);\n\t\tsctn10112ce.setText(\"1011-2 CE\");\n\t\tsctn10112ce.setVisible(false);\n\n\t\tfinal Section sctn10112cet = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctn10112cet.setBounds(45, 218, 304, 23);\n\t\tformToolkit.paintBordersFor(sctn10112cet);\n\t\tsctn10112cet.setText(\"1011-2 CET\");\n\t\tsctn10112cet.setVisible(false);\n\n\t\tfinal Section sctnAws = formToolkit.createSection(cmpMenu, Section.TREE_NODE | Section.TITLE_BAR);\n\t\tsctnAws.setBounds(45, 247, 304, 23);\n\t\tformToolkit.paintBordersFor(sctnAws);\n\t\tsctnAws.setText(\"AWS\");\n\t\tsctnAws.setVisible(false);\n\t\t\n\t\tfinal Composite composite10112ce = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcomposite10112ce.setBounds(365, 0, 829, 1061);\n\t\tcomposite10112ce.setVisible(false);\n\t\t\n\t\tfinal Composite composite10112cet = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcomposite10112cet.setBounds(365, 0, 829, 1061);\n\t\tcomposite10112cet.setVisible(false);\n\t\t\n\t\tfinal Composite compositeAws = new Composite(shell, SWT.COLOR_DARK_GRAY);\n\t\t//composite10112ce.setBackground(SWTResourceManager.getColor(255, 255, 255));\n\t\tcompositeAws.setBounds(365, 0, 829, 1061);\n\t\tcompositeAws.setVisible(false);\n\t\t\n\t\tsctnCalculator.addExpansionListener(new IExpansionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\n\t\t\t\tif (sctnCalculator.isExpanded() == false) {\n\t\t\t\t\tsctn10112ce.setVisible(true);\n\t\t\t\t\tsctn10112cet.setVisible(true);\n\t\t\t\t\tsctnAws.setVisible(true);\n\n\t\t\t\t} else {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tsctnAws.setVisible(false);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\n\t\tsctn10112ce.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctn10112ce.isExpanded() == true) {\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t\t\tnew F10112ce(composite10112ce, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcomposite10112ce.setVisible(false);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tsctn10112cet.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctn10112cet.isExpanded() == true) {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t\t\tnew F10112cet(composite10112cet, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcomposite10112ce.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\tsctnAws.addExpansionListener(new IExpansionListener() {\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanging(ExpansionEvent arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void expansionStateChanged(ExpansionEvent arg0) {\n\t\t\t\tif (sctnAws.isExpanded() == true) {\n\t\t\t\t\tsctn10112ce.setVisible(false);\n\t\t\t\t\tsctn10112cet.setVisible(false);\n\t\t\t\t\tnew FAws(compositeAws, cmpMenu.getStyle());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcompositeAws.setVisible(false);\n\t\t\t}\n\t\t});\n\t}", "public GuidedWizardPanel()\r\n\t{\t\r\n\t\tVerticalPanel panel = new VerticalPanel();\r\n\t\t\r\n\t\twizardPanel = new WizardPanel(panelList, groupLabels);\r\n\t\twizardPanel.addSaveListener(this);\r\n\t\tpanel.add(wizardPanel);\r\n\r\n\t\t// set up listener relationships\r\n\t\tsolvingForPanel.addSolvingForListener(powerPanel);\r\n\t\tsolvingForPanel.addSolvingForListener(perGroupSampleSizePanel);\r\n\t\tsolvingForPanel.addSolvingForListener(resultsPanel);\r\n\t\t// listeners for outcome measures\r\n\t\toutcomesPanel.addOutcomesListener(hypothesisIndependentPanel);\r\n\t\toutcomesPanel.addOutcomesListener(hypothesisRepeatedPanel);\r\n\t\toutcomesPanel.addOutcomesListener(meanDifferencesIndependentPanel);\r\n\t\toutcomesPanel.addOutcomesListener(meanDifferencesPanel);\r\n\t\toutcomesPanel.addOutcomesListener(variabilityIndependentPanel);\r\n\t\toutcomesPanel.addOutcomesListener(variabilityRepeatedPanel);\r\n\t\toutcomesPanel.addOutcomesListener(variabilityCovariateOutcomePanel);\r\n\t\t// listeners for predictor information\r\n\t\tcatPredictorsPanel.addPredictorsListener(relativeGroupSizePanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(hypothesisIndependentPanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(hypothesisRepeatedPanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(meanDifferencesIndependentPanel);\r\n\t\tcatPredictorsPanel.addPredictorsListener(meanDifferencesPanel);\r\n\t\t// listeners for relative group sizes\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(hypothesisIndependentPanel);\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(hypothesisRepeatedPanel);\r\n\t\t// listeners for baseline covariates\r\n\t\tcovariatePanel.addCovariateListener(meanDifferencesIndependentPanel);\r\n\t\tcovariatePanel.addCovariateListener(meanDifferencesPanel);\r\n\t\t// TODO: covariatePanel.addCovariateListener(meanDifferencesRepeatedPanel);\r\n\t\tcovariatePanel.addCovariateListener(hypothesisIndependentPanel);\r\n\t\tcovariatePanel.addCovariateListener(hypothesisRepeatedPanel);\r\n\t\tcovariatePanel.addCovariateListener(variabilityIndependentPanel);\r\n\t\t// TODO: covariatePanel.addCovariateListener(variabilityRepeatedPanel);\r\n\t\tcovariatePanel.addCovariateListener(variabilityCovariatePanel);\r\n\t\tcovariatePanel.addCovariateListener(variabilityCovariateOutcomePanel);\r\n\t\tcovariatePanel.addCovariateListener(optionsTestsPanel);\r\n\t\tcovariatePanel.addCovariateListener(optionsPowerMethodsPanel);\r\n\t\t// listeners for repeated measures \r\n\t\trepeatedMeasuresPanel.addRepeatedMeasuresListener(hypothesisIndependentPanel);\r\n\t\trepeatedMeasuresPanel.addRepeatedMeasuresListener(hypothesisRepeatedPanel);\r\n\t\t// listeners for hypotheses\r\n\t\thypothesisIndependentPanel.addHypothesisListener(meanDifferencesIndependentPanel);\r\n\t\thypothesisRepeatedPanel.addHypothesisListener(meanDifferencesRepeatedPanel);\r\n\t\t// group size listeners\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(hypothesisIndependentPanel);\r\n\t\t// variability listeners\r\n\t\tvariabilityIndependentPanel.addVariabilityListener(variabilityCovariateOutcomePanel);\r\n\t\tvariabilityCovariatePanel.addVariabilityListener(variabilityCovariateOutcomePanel);\r\n\t\toptionsDisplayPanel.addChartOptionsListener(resultsPanel);\r\n\t\t// callbacks to fill in the power curve options screen\r\n\t\talphaPanel.addAlphaListener(optionsDisplayPanel);\r\n\t\toptionsTestsPanel.addTestListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addPowerMethodListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addQuantileListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addQuantileCheckboxListener(optionsDisplayPanel);\r\n\t\toptionsPowerMethodsPanel.addPowerCheckboxListener(optionsDisplayPanel);\r\n\t\tmeanDifferencesScalePanel.addBetaScaleListener(optionsDisplayPanel);\r\n\t\tperGroupSampleSizePanel.addPerGroupSampleSizeListener(optionsDisplayPanel);\r\n\t\trelativeGroupSizePanel.addRelativeGroupSizeListener(optionsDisplayPanel);\r\n\t\tvariabilityScalePanel.addSigmaScaleListener(optionsDisplayPanel);\r\n\t\t// initialize\r\n\t\tinitWidget(panel);\r\n\t}", "public WizardModel(){ \n wp = new HashMap<Object,WizardPanelDescriptor>();\n step = 1;\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(538, 450);\n\t\tshell.setText(\"SWT Application\");\n\n\t\tfinal DateTime dateTime = new DateTime(shell, SWT.BORDER | SWT.CALENDAR);\n\t\tdateTime.setBounds(10, 10, 514, 290);\n\n\t\tfinal DateTime dateTime_1 = new DateTime(shell, SWT.BORDER | SWT.TIME);\n\t\tdateTime_1.setBounds(10, 306, 135, 29);\n\t\tvideoPath = new Text(shell, SWT.BORDER);\n\t\tvideoPath.setBounds(220, 306, 207, 27);\n\n\t\tButton btnBrowseVideo = new Button(shell, SWT.NONE);\n\t\tbtnBrowseVideo.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFileDialog fileDialog = new FileDialog(shell, SWT.MULTI);\n\t\t\t\tString fileFilterPath = \"\";\n\t\t\t\tfileDialog.setFilterPath(fileFilterPath);\n\t\t\t\tfileDialog.setFilterExtensions(new String[] { \"*.*\" });\n\t\t\t\tfileDialog.setFilterNames(new String[] { \"Any\" });\n\t\t\t\tString firstFile = fileDialog.open();\n\t\t\t\tif (firstFile != null) {\n\t\t\t\t\tvideoPath.setText(firstFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBrowseVideo.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t}\n\t\t});\n\t\tbtnBrowseVideo.setBounds(433, 306, 91, 29);\n\t\tbtnBrowseVideo.setText(\"browse\");\n\t\ttorrentPath = new Text(shell, SWT.BORDER);\n\t\ttorrentPath.setBounds(220, 341, 207, 27);\n\t\tButton btnBrowseTorrent = new Button(shell, SWT.NONE);\n\t\tbtnBrowseTorrent.setText(\"browse\");\n\t\tbtnBrowseTorrent.setBounds(433, 339, 91, 29);\n\t\tbtnBrowseTorrent.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFileDialog fileDialog = new FileDialog(shell, SWT.MULTI);\n\t\t\t\tString fileFilterPath = \"\";\n\t\t\t\tfileDialog.setFilterPath(fileFilterPath);\n\t\t\t\tfileDialog.setFilterExtensions(new String[] { \"*.*\" });\n\t\t\t\tfileDialog.setFilterNames(new String[] { \"Any\" });\n\t\t\t\tString firstFile = fileDialog.open();\n\t\t\t\tif (firstFile != null) {\n\t\t\t\t\ttorrentPath.setText(firstFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tButton btnGenerateTorrent = new Button(shell, SWT.NONE);\n\t\tbtnGenerateTorrent.setBounds(10, 374, 516, 29);\n\t\tbtnGenerateTorrent.setText(\"Generate Torrent\");\n\n\t\tvideoLength = new Text(shell, SWT.BORDER);\n\t\tvideoLength.setBounds(10, 341, 135, 27);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.RIGHT);\n\t\tlblNewLabel.setAlignment(SWT.LEFT);\n\t\tlblNewLabel.setBounds(157, 315, 48, 18);\n\t\tlblNewLabel.setText(\"Video\");\n\t\t\n\t\tLabel lblTorrent = new Label(shell, SWT.RIGHT);\n\t\tlblTorrent.setText(\"Torrent\");\n\t\tlblTorrent.setBounds(157, 341, 48, 18);\n\t\tbtnGenerateTorrent.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tFile video = new File(videoPath.getText());\n\t\t\t\ttry {\n\t\t\t\t\tif (video.exists() && torrentPath.getText() != \"\") {\n\t\t\t\t\t\tMap parameters = new HashMap();\n\t\t\t\t\t\tparameters.put(\"start\", dateTime.getYear() + \"/\" + (dateTime.getMonth()+1) + \"/\" + dateTime.getDay() + \"-\" + dateTime_1.getHours() + \":\" + dateTime_1.getMinutes() + \":\" + dateTime_1.getSeconds());\n\t\t\t\t\t\tparameters.put(\"target\", torrentPath.getText());\n\t\t\t\t\t\tparameters.put(\"length\", videoLength.getText());\n\t\t\t\t\t\tSystem.out.println(\"start generating \"+parameters.get(\"length\"));\n\t\t\t\t\t\tnew MakeTorrent(videoPath.getText(), new URL(\"https://jomican.csie.org/~jimmy/tracker/announce.php\"), parameters);\n\t\t\t\t\t\tSystem.out.println(\"end generating\");\n\t\t\t\t\t\tFile var = new File(\"var.js\");\n\t\t\t\t\t\tPrintStream stream=new PrintStream(new FileOutputStream(var,false));\n\t\t\t\t\t\tstream.println(\"start_time = \"+(new SimpleDateFormat(\"yyyy/MM/dd-HH:mm:ss\").parse(dateTime.getYear() + \"/\" + (dateTime.getMonth()+1) + \"/\" + dateTime.getDay() + \"-\" + dateTime_1.getHours() + \":\" + dateTime_1.getMinutes() + \":\" + dateTime_1.getSeconds()).getTime() / 1000)+\";\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(\"jizz\");\n\t\t\t\t\t}\n\t\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}", "protected void createContents() {\n\t\tshlFaststone = new Shell();\n\t\tshlFaststone.setImage(SWTResourceManager.getImage(Edit.class, \"/image/all1.png\"));\n\t\tshlFaststone.setToolTipText(\"\");\n\t\tshlFaststone.setSize(944, 479);\n\t\tshlFaststone.setText(\"kaca\");\n\t\tshlFaststone.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tComposite composite = new Composite(shlFaststone, SWT.NONE);\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm = new SashForm(composite, SWT.VERTICAL);\n\t\t//\n\t\tMenu menu = new Menu(shlFaststone, SWT.BAR);\n\t\tshlFaststone.setMenuBar(menu);\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setSelection(true);\n\t\tmenuItem.setText(\"\\u6587\\u4EF6\");\n\t\t\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\t\t\n\t\tfinal Canvas down=new Canvas(shlFaststone,SWT.NONE|SWT.BORDER|SWT.DOUBLE_BUFFERED);\n\t\t\n\t\tComposite composite_4 = new Composite(sashForm, SWT.BORDER);\n\t\tcomposite_4.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_3 = new SashForm(composite_4, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_3);\n\t\tformToolkit.paintBordersFor(sashForm_3);\n\t\t\n\t\tToolBar toolBar = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.WRAP | SWT.RIGHT);\n\t\ttoolBar.setToolTipText(\"\");\n\t\t\n\t\tToolItem toolItem_6 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_6.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_2.notifyListeners(SWT.Selection,event1);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6253\\u5F00.jpg\"));\n\t\ttoolItem_6.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tToolItem tltmNewItem = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t\n\t\ttltmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttltmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\ttltmNewItem.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t//关闭\n\t\tToolItem tltmNewItem_4 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\ttltmNewItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttltmNewItem_4.setText(\"\\u5173\\u95ED\");\n\t\t\n\t\t\n\t\t\n\t\tToolItem tltmNewItem_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_1.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}\n\t\t});\n\t\t\n\t\t\n\t\t//缩放\n\t\t\n\t\t\n\t\ttltmNewItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u653E\\u5927.jpg\"));\n\t\t\n\t\t//工具栏:放大\n\t\t\n\t\ttltmNewItem_1.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tToolItem tltmNewItem_2 = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t//工具栏:缩小\n\t\ttltmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t\n\t\ttltmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F29\\u5C0F.jpg\"));\n\t\ttltmNewItem_2.setText(\"\\u7F29\\u5C0F\");\n\t\tToolItem toolItem_5 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttoolItem_5.setText(\"\\u9000\\u51FA\");\n\t\t\n\t\tToolBar toolBar_1 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\tformToolkit.adapt(toolBar_1);\n\t\tformToolkit.paintBordersFor(toolBar_1);\n\t\t\n\t\tToolItem toolItem_7 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:标题\n\t\ttoolItem_7.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_7.setText(\"\\u6807\\u9898\");\n\t\ttoolItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6807\\u9898.jpg\"));\n\t\t\n\t\tToolItem toolItem_1 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:调整大小\n\t\ttoolItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_1.setText(\"\\u8C03\\u6574\\u5927\\u5C0F\");\n\t\ttoolItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u8C03\\u6574\\u5927\\u5C0F.jpg\"));\n\t\t\n\t\tToolBar toolBar_2 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tformToolkit.adapt(toolBar_2);\n\t\tformToolkit.paintBordersFor(toolBar_2);\n\t\t\n\t\tToolItem toolItem_2 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:裁剪\n\t\ttoolItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_2.setText(\"\\u88C1\\u526A\");\n\t\ttoolItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u88C1\\u526A.jpg\"));\n\t\t\n\t\tToolItem toolItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:剪切\n\t\ttoolItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_3.setText(\"\\u526A\\u5207\");\n\t\ttoolItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u526A\\u5207.jpg\"));\n\t\t\n\t\tToolItem toolItem_4 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\n\t\t//工具栏:粘贴\n\t\ttoolItem_4.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\tcomposite_3.layout();\n\t\t\t\tFile f=new File(\"src/picture/beauty.jpg\");\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tButton lblNewLabel_3 = null;\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcomposite_3.layout();\n\t\t\t}\n\t\t});\n\t\t//omposite;\n\t\t//\n\t\t\n\t\ttoolItem_4.setText(\"\\u590D\\u5236\");\n\t\ttoolItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u590D\\u5236.jpg\"));\n\t\t\n\t\tToolItem tltmNewItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\ttltmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\ttltmNewItem_3.setText(\"\\u7C98\\u8D34\");\n\t\tsashForm_3.setWeights(new int[] {486, 165, 267});\n\t\t\n\t\tComposite composite_1 = new Composite(sashForm, SWT.NONE);\n\t\tformToolkit.adapt(composite_1);\n\t\tformToolkit.paintBordersFor(composite_1);\n\t\tcomposite_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_1 = new SashForm(composite_1, SWT.VERTICAL);\n\t\tformToolkit.adapt(sashForm_1);\n\t\tformToolkit.paintBordersFor(sashForm_1);\n\t\t\n\t\tComposite composite_2 = new Composite(sashForm_1, SWT.NONE);\n\t\tformToolkit.adapt(composite_2);\n\t\tformToolkit.paintBordersFor(composite_2);\n\t\tcomposite_2.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(composite_2, SWT.NONE);\n\t\ttabFolder.setTouchEnabled(true);\n\t\tformToolkit.adapt(tabFolder);\n\t\tformToolkit.paintBordersFor(tabFolder);\n\t\t\n\t\tTabItem tbtmNewItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem.setText(\"\\u65B0\\u5EFA\\u4E00\");\n\t\t\n\t\tTabItem tbtmNewItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_1.setText(\"\\u65B0\\u5EFA\\u4E8C\");\n\t\t\n\t\tTabItem tbtmNewItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_2.setText(\"\\u65B0\\u5EFA\\u4E09\");\n\t\t\n\t\tButton button = new Button(tabFolder, SWT.CHECK);\n\t\tbutton.setText(\"Check Button\");\n\t\t\n\t\tcomposite_3 = new Composite(sashForm_1, SWT.H_SCROLL | SWT.V_SCROLL);\n\t\t\n\t\tformToolkit.adapt(composite_3);\n\t\tformToolkit.paintBordersFor(composite_3);\n\t\tcomposite_3.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tLabel lblNewLabel_3 = new Label(composite_3, SWT.NONE);\n\t\tformToolkit.adapt(lblNewLabel_3, true, true);\n\t\tlblNewLabel_3.setText(\"\");\n\t\tsashForm_1.setWeights(new int[] {19, 323});\n\t\t\n\t\tComposite composite_5 = new Composite(sashForm, SWT.NONE);\n\t\tcomposite_5.setToolTipText(\"\");\n\t\tcomposite_5.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_2 = new SashForm(composite_5, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_2);\n\t\tformToolkit.paintBordersFor(sashForm_2);\n\t\t\n\t\tLabel lblNewLabel = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel, true, true);\n\t\tlblNewLabel.setText(\"1/1\");\n\t\t\n\t\tLabel lblNewLabel_2 = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_2, true, true);\n\t\tlblNewLabel_2.setText(\"\\u5927\\u5C0F\\uFF1A1366*728\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(sashForm_2, SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_1, true, true);\n\t\tlblNewLabel_1.setText(\"\\u7F29\\u653E\\uFF1A100%\");\n\t\t\n\t\tLabel label = new Label(sashForm_2, SWT.NONE);\n\t\tlabel.setAlignment(SWT.RIGHT);\n\t\tformToolkit.adapt(label, true, true);\n\t\tlabel.setText(\"\\u5494\\u5693\\u5DE5\\u4F5C\\u5BA4\\u7248\\u6743\\u6240\\u6709\");\n\t\tsashForm_2.setWeights(new int[] {127, 141, 161, 490});\n\t\tsashForm.setWeights(new int[] {50, 346, 22});\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMenuItem mntmNewItem = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u65B0\\u5EFA.jpg\"));\n\t\tmntmNewItem.setText(\"\\u65B0\\u5EFA\");\n\t\t\n\t\tmntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_2.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\t//Label lblNewLabel_3 = new Label(composite_1, SWT.NONE);\n\t\t\t\t//Canvas c=new Canvas(shlFaststone,SWT.BALLOON);\n\t\t\t\t\n\t\t\t\tFileDialog dialog = new FileDialog(shlFaststone,SWT.OPEN); \n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user_home\"));//设置初始路径\n\t\t\t\tdialog.setFilterNames(new String[] {\"文本文档(*txt)\",\"所有文档\"}); \n\t\t\t\tdialog.setFilterExtensions(new String[]{\"*.exe\",\"*.xls\",\"*.*\"});\n\t\t\t\tString path=dialog.open();\n\t\t\t\tString s=null;\n\t\t\t\tFile f=null;\n\t\t\t\tif(path==null||\"\".equals(path)) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t f=new File(path);\n\t\t\t\tbyte[] bs=Fileutil.readFile(f);\n\t\t\t s=new String(bs,\"UTF-8\");\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tMessageDialog.openError(shlFaststone, \"出错了\", \"打开\"+path+\"出错了\");\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t \n\t\t\t\ttext = new Text(composite_4, SWT.BORDER | SWT.WRAP\n\t\t\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL\n\t\t\t\t\t\t| SWT.MULTI);\n\t\t\t\ttext.setText(s);\n\t\t\t\tcomposite_1.layout();\n\t\t\t\tshlFaststone.setText(shlFaststone.getText()+\"\\t\"+f.getName());\n\t\t\t\t\t\n\t\t\t\tFile f1=new File(path);\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f1));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u6253\\u5F00.jpg\"));\n\t\tmntmNewItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem mntmNewItem_1 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_1.setText(\"\\u4ECE\\u526A\\u8D34\\u677F\\u5BFC\\u5165\");\n\t\t\n\t\tMenuItem mntmNewItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\tmntmNewItem_3.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t\n\t\t mntmNewItem_5 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t boolean result=MessageDialog.openConfirm(shlFaststone,\"退出\",\"是否确认退出\");\n\t\t\t\t if(result) {\n\t\t\t\t\t System.exit(0);\n\t\t\t\t }\n\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u4FDD\\u5B58.jpg\"));\n\t\tmntmNewItem_5.setText(\"\\u5173\\u95ED\");\n\t\tevent2=new Event();\n\t\tevent2.widget=mntmNewItem_5;\n\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u6355\\u6349\");\n\t\t\n\t\tMenu menu_2 = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(menu_2);\n\t\t\n\t\tMenuItem mntmNewItem_6 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_6.setText(\"\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_7 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6355\\u6349\\u7A97\\u53E3\\u6216\\u5BF9\\u8C61.jpg\"));\n\t\tmntmNewItem_7.setText(\"\\u6355\\u6349\\u7A97\\u53E3\\u5BF9\\u8C61\");\n\t\t\n\t\tMenuItem mntmNewItem_8 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_8.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.jpg\"));\n\t\tmntmNewItem_8.setText(\"\\u6355\\u6349\\u77E9\\u5F62\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_9 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_9.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u624B\\u7ED8\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_9.setText(\"\\u6355\\u6349\\u624B\\u7ED8\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_10 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_10.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6574\\u4E2A\\u5C4F\\u5E55.jpg\"));\n\t\tmntmNewItem_10.setText(\"\\u6355\\u6349\\u6574\\u4E2A\\u5C4F\\u5E55\");\n\t\t\n\t\tMenuItem mntmNewItem_11 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_11.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_11.setText(\"\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_12 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_12.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_12.setText(\"\\u6355\\u6349\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349.jpg\"));\n\t\tmenuItem_1.setText(\"\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349\");\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_2.setText(\"\\u7F16\\u8F91\");\n\t\t\n\t\tMenu menu_3 = new Menu(menuItem_2);\n\t\tmenuItem_2.setMenu(menu_3);\n\t\t\n\t\tMenuItem mntmNewItem_14 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_14.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_14.setText(\"\\u64A4\\u9500\");\n\t\t\n\t\tMenuItem mntmNewItem_13 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_13.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_13.setText(\"\\u91CD\\u505A\");\n\t\t\n\t\tMenuItem mntmNewItem_15 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_15.setText(\"\\u9009\\u62E9\\u5168\\u90E8\");\n\t\t\n\t\tMenuItem mntmNewItem_16 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_16.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7F16\\u8F91.\\u88C1\\u526A.jpg\"));\n\t\tmntmNewItem_16.setText(\"\\u88C1\\u526A\");\n\t\t\n\t\tMenuItem mntmNewItem_17 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_17.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u526A\\u5207.jpg\"));\n\t\tmntmNewItem_17.setText(\"\\u526A\\u5207\");\n\t\t\n\t\tMenuItem mntmNewItem_18 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_18.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u590D\\u5236.jpg\"));\n\t\tmntmNewItem_18.setText(\"\\u590D\\u5236\");\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_3, SWT.NONE);\n\t\tmenuItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\tmenuItem_4.setText(\"\\u7C98\\u8D34\");\n\t\t\n\t\tMenuItem mntmNewItem_19 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_19.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_3.setText(\"\\u7279\\u6548\");\n\t\t\n\t\tMenu menu_4 = new Menu(menuItem_3);\n\t\tmenuItem_3.setMenu(menu_4);\n\t\t\n\t\tMenuItem mntmNewItem_20 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_20.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6C34\\u5370.jpg\"));\n\t\tmntmNewItem_20.setText(\"\\u6C34\\u5370\");\n\t\t\n\t\tPanelPic ppn = new PanelPic();\n\t\tMenuItem mntmNewItem_21 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_21.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tflag[0]=true;\n\t\t\t\tflag[1]=false;\n\n\t\t\t}\n\n\t\t});\n\t\t\n\t\tdown.addMouseListener(new MouseAdapter(){\n\t\t\tpublic void mouseDown(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=true;\n\t\t\t\tpt=new Point(e.x,e.y);\n\t\t\t\tif(flag[1])\n\t\t\t\t{\n\t\t\t\t\trect=new Composite(down,SWT.BORDER);\n\t\t\t\t\trect.setLocation(e.x, e.y);\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=false;\n\t\t\t\tif(flag[1]&&dirty)\n\t\t\t\t{\n\t\t\t\t\trexx[n-1]=rect.getBounds();\n\t\t\t\t\trect.dispose();\n\t\t\t\t\tdown.redraw();\n\t\t\t\t\tdirty=false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdown.addMouseMoveListener(new MouseMoveListener(){\n\t\t\t@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n if(mouseDown)\n {\n \t dirty=true;\n\t\t\t\tif(flag[0])\n\t\t\t {\n \t GC gc=new GC(down);\n gc.drawLine(pt.x, pt.y, e.x, e.y);\n list.add(new int[]{pt.x,pt.y,e.x,e.y});\n pt.x=e.x;pt.y=e.y;\n\t\t\t }\n else if(flag[1])\n {\n \t if(rect!=null)\n \t rect.setSize(rect.getSize().x+e.x-pt.x, rect.getSize().y+e.y-pt.y);\n// \t down.redraw();\n \t pt.x=e.x;pt.y=e.y;\n }\n }\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tdown.addPaintListener(new PaintListener(){\n\t\t\t@Override\n\t\t\tpublic void paintControl(PaintEvent e) {\n\t\t\t\tfor(int i=0;i<list.size();i++)\n\t\t\t\t{\n\t\t\t\t\tint a[]=list.get(i);\n\t\t\t\t\te.gc.drawLine(a[0], a[1], a[2], a[3]);\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\t{\n\t\t\t\t\tif(rexx[i]!=null)\n\t\t\t\t\t\te.gc.drawRectangle(rexx[i]);\n\t\t\t\t}\n\t\t\t}});\n\n\t\t\n\t\tmntmNewItem_21.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6587\\u5B57.jpg\"));\n\t\tmntmNewItem_21.setText(\"\\u753B\\u7B14\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_1 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_1.setText(\"\\u67E5\\u770B\");\n\t\t\n\t\tMenu menu_5 = new Menu(mntmNewSubmenu_1);\n\t\tmntmNewSubmenu_1.setMenu(menu_5);\n\t\t\n\t\tMenuItem mntmNewItem_24 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_24.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u653E\\u5927.jpg\"));\n\t\tmntmNewItem_24.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tMenuItem mntmNewItem_25 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_25.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u7F29\\u5C0F.jpg\"));\n\t\tmntmNewItem_25.setText(\"\\u7F29\\u5C0F\");\n\t\t\n\t\tMenuItem mntmNewItem_26 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_26.setText(\"\\u5B9E\\u9645\\u5C3A\\u5BF8\\uFF08100%\\uFF09\");\n\t\t\n\t\tMenuItem mntmNewItem_27 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_27.setText(\"\\u9002\\u5408\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_28 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_28.setText(\"100%\");\n\t\t\n\t\tMenuItem mntmNewItem_29 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_29.setText(\"200%\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_2.setText(\"\\u8BBE\\u7F6E\");\n\t\t\n\t\tMenu menu_6 = new Menu(mntmNewSubmenu_2);\n\t\tmntmNewSubmenu_2.setMenu(menu_6);\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_5.setText(\"\\u5E2E\\u52A9\");\n\t\t\n\t\tMenu menu_7 = new Menu(menuItem_5);\n\t\tmenuItem_5.setMenu(menu_7);\n\t\t\n\t\tMenuItem menuItem_6 = new MenuItem(menu_7, SWT.NONE);\n\t\tmenuItem_6.setText(\"\\u7248\\u672C\");\n\t\t\n\t\tMenuItem mntmNewItem_23 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_23.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\t\n\t\tMenuItem mntmNewItem_30 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_30.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setModified(true);\n\t\tshell.setSize(512, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(null);\n\n\t\tLabel label = new Label(shell, SWT.SEPARATOR | SWT.VERTICAL);\n\t\tlabel.setBounds(253, 26, 2, 225);\n\n\t\tcomboCarBrandBuy = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarBrandBuy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tlabel_1.setText(\"Selected\");\n\t\t\t}\n\t\t});\n\t\tcomboCarBrandBuy.setItems(new String[] {\"Maruti\", \"Fiat\", \"Tata\", \"Ford\", \"Honda\", \"Hyundai\"});\n\t\tcomboCarBrandBuy.setBounds(87, 33, 123, 23);\n\t\tcomboCarBrandBuy.setText(\"--select--\");\n\n\t\tLabel lblCarBrand = new Label(shell, SWT.NONE);\n\t\tlblCarBrand.setAlignment(SWT.RIGHT);\n\t\tlblCarBrand.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblCarBrand.setBounds(12, 38, 71, 15);\n\t\tlblCarBrand.setText(\"Car Brand :\");\n\n\t\ttextCarNameBuy = new Text(shell, SWT.BORDER);\n\t\ttextCarNameBuy.setBounds(87, 67, 123, 21);\n\n\t\tLabel lblCarName = new Label(shell, SWT.NONE);\n\t\tlblCarName.setAlignment(SWT.RIGHT);\n\t\tlblCarName.setText(\"Car Name :\");\n\t\tlblCarName.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblCarName.setBounds(12, 70, 71, 15);\n\n\t\tcomboCarModelBuy = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarModelBuy.setItems(new String[] {\"2015\", \"2014\", \"2013\", \"2012\", \"2011\", \"2010\", \"2009\", \"2008\", \"2007\", \"2006\", \"2005\", \"2004\", \"2003\", \"2002\", \"2001\", \"2000\"});\n\t\tcomboCarModelBuy.setBounds(87, 99, 91, 23);\n\t\tcomboCarModelBuy.setText(\"--select--\");\n\n\t\tLabel lblModelYear = new Label(shell, SWT.NONE);\n\t\tlblModelYear.setAlignment(SWT.RIGHT);\n\t\tlblModelYear.setText(\"Model :\");\n\t\tlblModelYear.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlblModelYear.setBounds(12, 105, 71, 15);\n\n\t\tButton buttonBuy = new Button(shell, SWT.NONE);\n\t\tbuttonBuy.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\n\t\t\t\tString carName = textCarNameBuy.getText();\n\t\t\t\tString carModel = comboCarModelBuy.getText();\n\n\t\t\t\tif(comboCarBrandBuy.getText().equalsIgnoreCase(\"maruti\")){\n\t\t\t\t\tmarutiMap.put(carName, carModel);\n\t\t\t\t}\n\n\t\t\t\tlabel_1.setText(\"Added to Inventory\");\n\t\t\t\tSystem.out.println(marutiMap);\n\t\t\t}\n\t\t});\n\t\tbuttonBuy.setBounds(87, 138, 63, 25);\n\t\tbuttonBuy.setText(\"BUY\");\n\n\t\tlabel_1 = new Label(shell, SWT.BORDER | SWT.HORIZONTAL | SWT.CENTER);\n\t\tlabel_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_1.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\tlabel_1.setBounds(73, 198, 137, 19);\n\n\t\tLabel lblStatus = new Label(shell, SWT.NONE);\n\t\tlblStatus.setBounds(22, 198, 45, 15);\n\t\tlblStatus.setText(\"Status :\");\n\n\t\tLabel label_2 = new Label(shell, SWT.NONE);\n\t\tlabel_2.setText(\"Car Brand :\");\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_2.setAlignment(SWT.RIGHT);\n\t\tlabel_2.setBounds(280, 38, 71, 15);\n\n\t\tcomboCarBrandSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarBrandSell.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\n\t\t\t\tString carBrand = comboCarBrandSell.getText();\n\t\t\t\tcomboCarNameSell.clearSelection();\n\t\t\t\t\n\t\t\t\tif(carBrand.equalsIgnoreCase(\"maruti\")){\n\t\t\t\t\tSet<String> keyList = marutiMap.keySet();\n\t\t\t\t\tint i=0;\n\t\t\t\t\tfor(String key : keyList){\n\t\t\t\t\t\tcarNames.add(key);\n\t\t\t\t\t\t//comboCarNameSell.setItem(i, key);\n\t\t\t\t\t\t//i++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tString[] strArray = (String[]) carNames.toArray(new String[0]);\n\t\t\t\tSystem.out.println();\n\t\t\t\tcomboCarNameSell.setItems(strArray);\n\n\t\t\t}\n\t\t});\n\t\tcomboCarBrandSell.setItems(new String[] {\"Maruti\", \"Fiat\", \"Tata\", \"Ford\", \"Honda\", \"Hyundai\"});\n\t\tcomboCarBrandSell.setBounds(355, 33, 123, 23);\n\t\tcomboCarBrandSell.setText(\"--select--\");\n\n\t\tLabel label_3 = new Label(shell, SWT.NONE);\n\t\tlabel_3.setText(\"Car Name :\");\n\t\tlabel_3.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_3.setAlignment(SWT.RIGHT);\n\t\tlabel_3.setBounds(280, 70, 71, 15);\n\n\t\tLabel label_4 = new Label(shell, SWT.NONE);\n\t\tlabel_4.setText(\"Model :\");\n\t\tlabel_4.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlabel_4.setAlignment(SWT.RIGHT);\n\t\tlabel_4.setBounds(280, 105, 71, 15);\n\n\t\tCombo comboCarModelSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarModelSell.setItems(new String[] {\"2015\", \"2014\", \"2013\", \"2012\", \"2011\", \"2010\", \"2009\", \"2008\", \"2007\", \"2006\", \"2005\", \"2004\", \"2003\", \"2002\", \"2001\", \"2000\"});\n\t\tcomboCarModelSell.setBounds(355, 99, 91, 23);\n\t\tcomboCarModelSell.setText(\"--select--\");\n\n\t\tButton buttonSell = new Button(shell, SWT.NONE);\n\t\tbuttonSell.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tlabel_5.setText(\"Sold Successfully\");\n\t\t\t}\n\t\t});\n\t\tbuttonSell.setText(\"SELL\");\n\t\tbuttonSell.setBounds(355, 138, 63, 25);\n\n\t\tlabel_5 = new Label(shell, SWT.BORDER | SWT.HORIZONTAL | SWT.CENTER);\n\t\tlabel_5.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n\t\tlabel_5.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\tlabel_5.setBounds(341, 198, 137, 19);\n\n\t\tLabel label_6 = new Label(shell, SWT.NONE);\n\t\tlabel_6.setText(\"Status :\");\n\t\tlabel_6.setBounds(290, 198, 45, 15);\n\n\t\tcomboCarNameSell = new Combo(shell, SWT.READ_ONLY);\n\t\tcomboCarNameSell.setItems(new String[] {});\n\t\tcomboCarNameSell.setBounds(355, 65, 123, 23);\n\t\tcomboCarNameSell.setText(\"--select--\");\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tshell.setSize(599, 779);\r\n\t\tshell.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tButton logoBtn = new Button(shell, SWT.NONE);\r\n\t\tlogoBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tMainMenuKaff mm = new MainMenuKaff();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tmm.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogoBtn.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\logo for header button.png\"));\r\n\t\tlogoBtn.setBounds(497, 0, 64, 50);\r\n\r\n\t\tLabel headerLabel = new Label(shell, SWT.NONE);\r\n\t\theaderLabel.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\KaffPlatformheader.jpg\"));\r\n\t\theaderLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\theaderLabel.setBounds(0, 0, 607, 50);\r\n\r\n\t\tLabel bookInfoLabel = new Label(shell, SWT.NONE);\r\n\t\tbookInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\tbookInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\tbookInfoLabel.setAlignment(SWT.CENTER);\r\n\t\tbookInfoLabel.setBounds(177, 130, 192, 28);\r\n\t\tbookInfoLabel.setText(\"معلومات الكتاب\");\r\n\r\n\t\tLabel bookTitleLabel = new Label(shell, SWT.NONE);\r\n\t\tbookTitleLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookTitleLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookTitleLabel.setBounds(415, 203, 119, 28);\r\n\t\tbookTitleLabel.setText(\"عنوان الكتاب\");\r\n\r\n\t\tBookTitleTxt = new Text(shell, SWT.BORDER);\r\n\t\tBookTitleTxt.setBounds(56, 206, 334, 24);\r\n\r\n\t\tLabel bookIDLabel = new Label(shell, SWT.NONE);\r\n\t\tbookIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookIDLabel.setBounds(415, 170, 119, 32);\r\n\t\tbookIDLabel.setText(\"رمز الكتاب\");\r\n\r\n\t\tLabel editionLabel = new Label(shell, SWT.NONE);\r\n\t\teditionLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\teditionLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\teditionLabel.setBounds(415, 235, 119, 28);\r\n\t\teditionLabel.setText(\"إصدار الكتاب\");\r\n\r\n\t\teditionTxt = new Text(shell, SWT.BORDER);\r\n\t\teditionTxt.setBounds(271, 240, 119, 24);\r\n\r\n\t\tLabel lvlLabel = new Label(shell, SWT.NONE);\r\n\t\tlvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tlvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tlvlLabel.setText(\"المستوى\");\r\n\t\tlvlLabel.setBounds(415, 269, 119, 27);\r\n\r\n\t\tCombo lvlBookCombo = new Combo(shell, SWT.NONE);\r\n\t\tlvlBookCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\tlvlBookCombo.setBounds(326, 272, 64, 25);\r\n\t\tlvlBookCombo.select(0);\r\n\r\n\t\tLabel priceLabel = new Label(shell, SWT.NONE);\r\n\t\tpriceLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tpriceLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tpriceLabel.setText(\"السعر\");\r\n\t\tpriceLabel.setBounds(415, 351, 119, 28);\r\n\r\n\t\tGroup groupType = new Group(shell, SWT.NONE);\r\n\t\tgroupType.setBounds(56, 320, 334, 24);\r\n\r\n\t\tButton button = new Button(groupType, SWT.RADIO);\r\n\t\tbutton.setSelection(true);\r\n\t\tbutton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton.setBounds(21, 0, 73, 21);\r\n\t\tbutton.setText(\"مجاناً\");\r\n\r\n\t\tButton button_1 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_1.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_1.setBounds(130, 0, 73, 21);\r\n\t\tbutton_1.setText(\"إعارة\");\r\n\r\n\t\tButton button_2 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_2.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_2.setBounds(233, 0, 80, 21);\r\n\t\tbutton_2.setText(\"للبيع\");\r\n\r\n\t\tpriceTxtValue = new Text(shell, SWT.BORDER);\r\n\t\tpriceTxtValue.setBounds(326, 355, 64, 24);\r\n\r\n\t\tLabel ownerInfoLabel = new Label(shell, SWT.NONE);\r\n\t\townerInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\townerInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\townerInfoLabel.setText(\"معلومات صاحبة الكتاب\");\r\n\t\townerInfoLabel.setAlignment(SWT.CENTER);\r\n\t\townerInfoLabel.setBounds(147, 400, 242, 28);\r\n\r\n\t\tLabel ownerIDLabel = new Label(shell, SWT.NONE);\r\n\t\townerIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerIDLabel.setBounds(415, 441, 119, 34);\r\n\t\townerIDLabel.setText(\"الرقم الأكاديمي\");\r\n\r\n\t\townerIDValue = new Text(shell, SWT.BORDER);\r\n\t\townerIDValue.setBounds(204, 444, 186, 24);\r\n\t\t// need to check if the owner is already in the database...\r\n\r\n\t\tLabel nameLabel = new Label(shell, SWT.NONE);\r\n\t\tnameLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tnameLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tnameLabel.setBounds(415, 481, 119, 28);\r\n\t\tnameLabel.setText(\"الاسم الثلاثي\");\r\n\r\n\t\tnameTxt = new Text(shell, SWT.BORDER);\r\n\t\tnameTxt.setBounds(56, 485, 334, 24);\r\n\r\n\t\tLabel phoneLabel = new Label(shell, SWT.NONE);\r\n\t\tphoneLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tphoneLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tphoneLabel.setText(\"رقم الجوال\");\r\n\t\tphoneLabel.setBounds(415, 515, 119, 27);\r\n\r\n\t\tphoneTxt = new Text(shell, SWT.BORDER);\r\n\t\tphoneTxt.setBounds(204, 521, 186, 24);\r\n\r\n\t\tLabel ownerLvlLabel = new Label(shell, SWT.NONE);\r\n\t\townerLvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerLvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerLvlLabel.setBounds(415, 548, 119, 31);\r\n\t\townerLvlLabel.setText(\"المستوى\");\r\n\r\n\t\tCombo owneLvlCombo = new Combo(shell, SWT.NONE);\r\n\t\towneLvlCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\towneLvlCombo.setBounds(326, 554, 64, 25);\r\n\t\towneLvlCombo.select(0);\r\n\r\n\t\tLabel emailLabel = new Label(shell, SWT.NONE);\r\n\t\temailLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\temailLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\temailLabel.setBounds(415, 583, 119, 38);\r\n\t\temailLabel.setText(\"البريد الإلكتروني\");\r\n\r\n\t\temailTxt = new Text(shell, SWT.BORDER);\r\n\t\temailTxt.setBounds(56, 586, 334, 24);\r\n\r\n\t\tButton addButton = new Button(shell, SWT.NONE);\r\n\t\taddButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString bookQuery = \"INSERT INTO kaff.BOOK(bookID, bookTitle, price, level,available, type) VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\tString bookEdition = \"INSERT INTO kaff.bookEdition(bookID, edition, year) VALUES (?, ?, ?)\";\r\n\t\t\t\t\tString ownerQuery = \"INSERT INTO kaff.user(userID, fname, mname, lastname, phone, level, personalEmail, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n\t\t\t\t\tString bookID = bookIDTxt.getText();\r\n\t\t\t\t\tString bookTitle = BookTitleTxt.getText();\r\n\t\t\t\t\tint bookLevel = lvlBookCombo.getSelectionIndex();\r\n\t\t\t\t\tString type = groupType.getText();\r\n\t\t\t\t\tdouble price = Double.parseDouble(priceTxtValue.getText());\r\n\t\t\t\t\tboolean available = true;\r\n\r\n\t\t\t\t\t// must error handle\r\n\t\t\t\t\tString[] ed = editionTxt.getText().split(\" \");\r\n\t\t\t\t\tString edition = ed[0];\r\n\t\t\t\t\tString year = ed[1];\r\n\r\n\t\t\t\t\tString ownerID = ownerIDValue.getText();\r\n\r\n\t\t\t\t\t// error handle if the user enters two names or just first name\r\n\t\t\t\t\tString[] name = nameTxt.getText().split(\" \");\r\n\t\t\t\t\tString fname = \"\", mname = \"\", lname = \"\";\r\n\t\t\t\t\tSystem.out.println(\"name array\" + name);\r\n\t\t\t\t\tif (name.length > 2) {\r\n\t\t\t\t\t\tfname = name[0];\r\n\t\t\t\t\t\tmname = name[1];\r\n\t\t\t\t\t\tlname = name[2];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString phone = phoneTxt.getText();\r\n\t\t\t\t\tint userLevel = owneLvlCombo.getSelectionIndex();\r\n\t\t\t\t\tString email = emailTxt.getText();\r\n\r\n\t\t\t\t\tDatabase.openConnection();\r\n\t\t\t\t\tPreparedStatement bookStatement = Database.getConnection().prepareStatement(bookQuery);\r\n\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, bookTitle);\r\n\t\t\t\t\tbookStatement.setInt(3, bookLevel);\r\n\t\t\t\t\tbookStatement.setString(4, type);\r\n\t\t\t\t\tbookStatement.setDouble(5, price);\r\n\t\t\t\t\tbookStatement.setBoolean(6, available);\r\n\r\n\t\t\t\t\tint bookre = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tbookStatement = Database.getConnection().prepareStatement(bookEdition);\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, edition);\r\n\t\t\t\t\tbookStatement.setString(3, year);\r\n\r\n\t\t\t\t\tint edResult = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tPreparedStatement ownerStatement = Database.getConnection().prepareStatement(ownerQuery);\r\n\t\t\t\t\townerStatement.setString(1, ownerID);\r\n\t\t\t\t\townerStatement.setString(2, fname);\r\n\t\t\t\t\townerStatement.setString(3, mname);\r\n\t\t\t\t\townerStatement.setString(4, lname);\r\n\t\t\t\t\townerStatement.setString(5, phone);\r\n\t\t\t\t\townerStatement.setInt(6, userLevel);\r\n\t\t\t\t\townerStatement.setString(7, ownerID + \"iau.edu.sa\");\r\n\t\t\t\t\townerStatement.setString(8, email);\r\n\t\t\t\t\tint ownRes = ownerStatement.executeUpdate();\r\n\r\n\t\t\t\t\tSystem.out.println(\"results: \" + ownRes + \" \" + edResult + \" bookre\");\r\n\t\t\t\t\t// test result of excute Update\r\n\t\t\t\t\tif (ownRes != 0 && edResult != 0 && bookre != 0) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is updated\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is not updated\");\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDatabase.closeConnection();\r\n\t\t\t\t} catch (SQLException sql) {\r\n\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\taddButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\taddButton.setBounds(54, 666, 85, 26);\r\n\t\taddButton.setText(\"إضافة\");\r\n\r\n\t\tButton backButton = new Button(shell, SWT.NONE);\r\n\t\tbackButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tAdminMenu am = new AdminMenu();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tam.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbackButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbackButton.setBounds(150, 666, 85, 26);\r\n\t\tbackButton.setText(\"رجوع\");\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(177, 72, 192, 21);\r\n\t\tlabel.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(22, 103, 167, 21);\r\n\t\t// get user name here to display\r\n\t\tString name = getUserName();\r\n\t\tlabel_1.setText(\"مرحباً ...\" + name);\r\n\r\n\t\tbookIDTxt = new Text(shell, SWT.BORDER);\r\n\t\tbookIDTxt.setBounds(271, 170, 119, 24);\r\n\r\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(437, 529);\n\n\t}", "public void setupUI() {\r\n\t\t\r\n\t\tvPanel = new VerticalPanel();\r\n\t\thPanel = new HorizontalPanel();\r\n\t\t\r\n\t\titemName = new Label();\r\n\t\titemName.addStyleName(Styles.page_title);\r\n\t\titemDesc = new Label();\r\n\t\titemDesc.addStyleName(Styles.quest_desc);\r\n\t\titemType = new Label();\r\n\t\titemType.addStyleName(Styles.quest_lvl);\r\n\t\t\r\n\t\tVerticalPanel img = new VerticalPanel();\r\n\t\timg.add(new Image(imgDir));\r\n\t\t\r\n\t\tvPanel.add(itemName);\r\n\t\tvPanel.add(itemDesc);\r\n\t\tvPanel.add(img);\r\n\t\tvPanel.add(hPanel);\r\n\t\t\r\n\t\tVerticalPanel mainPanel = new VerticalPanel();\r\n\t\tmainPanel.setWidth(\"100%\");\r\n\t\tvPanel.addStyleName(NAME);\r\n\t\t\r\n\t\tmainPanel.add(vPanel);\r\n \tinitWidget(mainPanel);\r\n }", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(656, 296);\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setImage(SWTResourceManager.getImage(mainFrame.class, \"/imgCompand/main/logo.png\"));\r\n\t\tshell.setSize(935, 650);\r\n\t\tshell.setMinimumSize(920, 650);\r\n\t\tcenter(shell);\r\n\t\tshell.setText(\"三合一\");\r\n\t\tshell.setLayout(new GridLayout(8, false));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setText(\"面单图片:\");\r\n\t\t\r\n\t\ttext_mdtp = new Text(shell, SWT.BORDER);\r\n\t\ttext_mdtp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setMessage(\"setMessage\"); \r\n\t\t\t\tdd.setText(\"选择保存面单图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString mdtp=dd.open();\r\n\t\t\t\tif(mdtp!=null){\r\n\t\t\t\t\ttext_mdtp.setText(mdtp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_btnNewButton.widthHint = 95;\r\n\t\tbtnNewButton.setLayoutData(gd_btnNewButton);\r\n\t\tbtnNewButton.setText(\"浏览\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlblNewLabel = new Label(shell, SWT.NONE);\r\n\t\tGridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblNewLabel.widthHint = 87;\r\n\t\tlblNewLabel.setLayoutData(gd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"身份证图片:\");\r\n\t\t\r\n\t\ttext_sfztp = new Text(shell, SWT.BORDER);\r\n\t\ttext_sfztp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnNewButton_1 = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setMessage(\"setMessage\"); \r\n\t\t\t\tdd.setText(\"选择保存身份证图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString sfztp=dd.open();\r\n\t\t\t\tif(sfztp!=null){\r\n\t\t\t\t\ttext_sfztp.setText(sfztp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_btnNewButton_1.widthHint = 95;\r\n\t\tbtnNewButton_1.setLayoutData(gd_btnNewButton_1);\r\n\t\tbtnNewButton_1.setText(\"浏览\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setText(\"小票图片:\");\r\n\t\t\r\n\t\ttext_xptp = new Text(shell, SWT.BORDER);\r\n\t\ttext_xptp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbutton = new Button(shell, SWT.NONE);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setText(\"选择保存小票图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString xptp=dd.open();\r\n\t\t\t\tif(xptp!=null){\r\n\t\t\t\t\ttext_xptp.setText(xptp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_button = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_button.widthHint = 95;\r\n\t\tbutton.setLayoutData(gd_button);\r\n\t\tbutton.setText(\"浏览\");\r\n\t\t\r\n\t\tlabel_2 = new Label(shell, SWT.NONE);\r\n\t\tlabel_2.setText(\" \");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlblNewLabel_1 = new Label(shell, SWT.NONE);\r\n\t\tlblNewLabel_1.setText(\" \");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_5 = new Label(shell, SWT.NONE);\r\n\t\tlabel_5.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlabel_5.setText(\"三合一导入模板下载,请点击........\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbutton_1 = new Button(shell, SWT.NONE);\r\n\t\tGridData gd_button_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_button_1.widthHint = 95;\r\n\t\tbutton_1.setLayoutData(gd_button_1);\r\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\t\tdd.setText(\"请选择文件保存的位置\"); \r\n\t\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\t\tString saveFile=dd.open(); \r\n\t\t\t\t\tif(saveFile!=null){\r\n\t\t\t\t\t\tboolean flg = FileUtil.downloadLocal(saveFile, \"/template.xls\", \"三合一导入模板.xls\");\r\n\t\t\t\t\t\tif(flg){\r\n\t\t\t\t\t\t\tMessageDialog.openInformation(shell, \"系统提示\", \"模板下载成功!保存路径为:\"+saveFile+\"/三合一导入模板.xls\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tMessageDialog.openError(shell, \"系统提示\", \"模板下载失败!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t }catch(Exception ex){\r\n\t\t\t\t\t System.out.print(\"创建失败\");\r\n\t\t\t\t } \r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setText(\"导入模板\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_4 = new Label(shell, SWT.NONE);\r\n\t\tlabel_4.setText(\"合成信息:\");\r\n\t\t\r\n\t\ttext = new Text(shell, SWT.BORDER);\r\n\t\ttext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnexecl = new Button(shell, SWT.NONE);\r\n\t\tbtnexecl.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tFileDialog filedia = new FileDialog(shell, SWT.SINGLE);\r\n\t\t\t\tString filepath = filedia.open()+\"\";\r\n\t\t\t\ttext.setText(filepath.replace(\"null\",\"\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnexecl = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnexecl.widthHint = 95;\r\n\t\tbtnexecl.setLayoutData(gd_btnexecl);\r\n\t\tbtnexecl.setText(\"导入execl\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_3 = new Label(shell, SWT.NONE);\r\n\t\tlabel_3.setText(\"合成图片:\");\r\n\t\t\r\n\t\ttext_hctp = new Text(shell, SWT.BORDER);\r\n\t\ttext_hctp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnNewButton_2 = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setText(\"选择合成图片将要保存的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString hctp=dd.open();\r\n\t\t\t\tif(hctp!=null){\r\n\t\t\t\t\ttext_hctp.setText(hctp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton_2 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnNewButton_2.widthHint = 95;\r\n\t\tbtnNewButton_2.setLayoutData(gd_btnNewButton_2);\r\n\t\tbtnNewButton_2.setText(\"保存位置\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_6 = new Label(shell, SWT.NONE);\r\n\t\tlabel_6.setText(\"进度:\");\r\n\t\t\r\n\t\tprogressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tGridData gd_progressBar = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_progressBar.widthHint = 524;\r\n\t\tprogressBar.setMinimum(0);\r\n\t\tprogressBar.setMaximum(100);\r\n\t\tprogressBar.setLayoutData(gd_progressBar);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtn_doCompImg = new Button(shell, SWT.NONE);\r\n\t\tbtn_doCompImg.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//导入信息\r\n\t\t\t\tdrxx = text.getText();\r\n\t\t\t\t//保存路径\r\n\t\t\t\thctp = text_hctp.getText();\r\n\t\t\t\t//面单图片路径\r\n\t\t\t\tmdtp = text_mdtp.getText();\r\n\t\t\t\t//身份证图片路径\r\n\t\t\t\tsfztp = text_sfztp.getText();\r\n\t\t\t\t//小票图片路径\r\n\t\t\t\txptp = text_xptp.getText();\r\n\t\t\t\t//清空信息框\r\n\t\t\t\ttext_info.setText(\"\");\r\n\t\t\t\tif(!drxx.equals(\"\")&&!hctp.equals(\"\")&&!mdtp.equals(\"\")&&!sfztp.equals(\"\")&&!xptp.equals(\"\")){\r\n\t\t\t\t\t(new IncresingOperator()).start();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tMessageDialog.openWarning(shell, \"系统提示\",\"各路径选项不能为空!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btn_doCompImg = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btn_doCompImg.widthHint = 95;\r\n\t\tbtn_doCompImg.setLayoutData(gd_btn_doCompImg);\r\n\t\tbtn_doCompImg.setText(\"立即合成\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\ttext_info = new Text(shell, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tGridData gd_text_info = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n\t\tgd_text_info.heightHint = 217;\r\n\t\ttext_info.setLayoutData(gd_text_info);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\r\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(838, 649);\n\n\t}", "public NewReviewWizard() {\n super();\n setNeedsProgressMonitor(true);\n setWindowTitle(\"New Review\");\n setHelpAvailable(false);\n }", "private void createContents() {\r\n\t\tshlAboutGoko = new Shell(getParent(), getStyle());\r\n\t\tshlAboutGoko.setSize(376, 248);\r\n\t\tshlAboutGoko.setText(\"About Goko\");\r\n\t\tshlAboutGoko.setLayout(new GridLayout(1, false));\r\n\r\n\t\tComposite composite_1 = new Composite(shlAboutGoko, SWT.NONE);\r\n\t\tcomposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\r\n\t\tcomposite_1.setLayout(new GridLayout(1, false));\r\n\r\n\t\tLabel lblGokoIsA = new Label(composite_1, SWT.WRAP);\r\n\t\tGridData gd_lblGokoIsA = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblGokoIsA.widthHint = 350;\r\n\t\tlblGokoIsA.setLayoutData(gd_lblGokoIsA);\r\n\t\tlblGokoIsA.setText(\"Goko is an open source desktop application for CNC control and operation\");\r\n\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblAlphaVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblAlphaVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblAlphaVersion.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblAlphaVersion.setText(\"Version\");\r\n\r\n\t\tLabel lblVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblVersion.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(composite_1, SWT.NONE);\r\n\r\n\t\tLabel lblDate = new Label(composite_2, SWT.NONE);\r\n\t\tlblDate.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblDate.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblDate.setText(\"Build\");\r\n\t\t\r\n\t\tLabel lblBuild = new Label(composite_2, SWT.NONE);\r\n\t\tlblBuild.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\t\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tClassLoader loader = Thread.currentThread().getContextClassLoader(); \r\n\t\tInputStream stream = loader.getResourceAsStream(\"/version.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(stream);\r\n\t\t\tString version = prop.getProperty(\"goko.version\");\r\n\t\t\tString build = prop.getProperty(\"goko.build.timestamp\");\r\n\t\t\tlblVersion.setText(version);\r\n\t\t\tlblBuild.setText(build);\t\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tLOG.error(e);\r\n\t\t}\r\n\t\t\r\n\t\tComposite composite = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblMoreInformationOn = new Label(composite, SWT.NONE);\r\n\t\tGridData gd_lblMoreInformationOn = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblMoreInformationOn.widthHint = 60;\r\n\t\tlblMoreInformationOn.setLayoutData(gd_lblMoreInformationOn);\r\n\t\tlblMoreInformationOn.setText(\"Website :\");\r\n\r\n\t\tLink link = new Link(composite, SWT.NONE);\r\n\t\tlink.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://www.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tlink.setText(\"<a>http://www.goko.fr</a>\");\r\n\t\t\r\n\t\tComposite composite_3 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_3.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblForum = new Label(composite_3, SWT.NONE);\r\n\t\tGridData gd_lblForum = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblForum.widthHint = 60;\r\n\t\tlblForum.setLayoutData(gd_lblForum);\r\n\t\tlblForum.setText(\"Forum :\");\r\n\t\t\r\n\t\tLink link_1 = new Link(composite_3, 0);\r\n\t\tlink_1.setText(\"<a>http://discuss.goko.fr</a>\");\r\n\t\tlink_1.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://discuss.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tComposite composite_4 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_4.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblContact = new Label(composite_4, SWT.NONE);\r\n\t\tGridData gd_lblContact = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblContact.widthHint = 60;\r\n\t\tlblContact.setLayoutData(gd_lblContact);\r\n\t\tlblContact.setText(\"Contact :\");\r\n\t\t\t \r\n\t\tLink link_2 = new Link(composite_4, 0);\r\n\t\tlink_2.setText(\"<a>\"+toAscii(\"636f6e7461637440676f6b6f2e6672\")+\"</a>\");\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell(SWT.TITLE | SWT.CLOSE | SWT.BORDER);\n\t\tshell.setSize(713, 226);\n\t\tshell.setText(\"ALT Planner\");\n\t\t\n\t\tCalendarPop calendarComp = new CalendarPop(shell, SWT.NONE);\n\t\tcalendarComp.setBounds(5, 5, 139, 148);\n\t\t\n\t\tComposite composite = new PlannerInterface(shell, SWT.NONE, calendarComp);\n\t\tcomposite.setBounds(0, 0, 713, 200);\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmFile.setText(\"File\");\n\t\t\n\t\tMenu menu_1 = new Menu(mntmFile);\n\t\tmntmFile.setMenu(menu_1);\n\t\t\n\t\tMenuItem mntmSettings = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmSettings.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSettings settings = new Settings(Display.getDefault());\n\t\t\t\tsettings.open();\n\t\t\t}\n\t\t});\n\t\tmntmSettings.setText(\"Settings\");\n\t}", "private WizardDescriptor.Panel[] getPanels() {\n Project project = Templates.getProject(wizard);\n File f1 = new File(\"src\");\n \n // Templates.setTargetFolder(wizard);\n\n Sources sources = project.getLookup().lookup(Sources.class);\n SourceGroup[] sg = sources.getSourceGroups(Sources.TYPE_GENERIC);\n \n if (panels == null) {\n targetChooserPanel = \n Templates.createSimpleTargetChooser(project, sg);\n panels = new WizardDescriptor.Panel[]{\n targetChooserPanel\n };\n String[] steps = createSteps();\n for (int i = 0; i < panels.length; i++) {\n Component c = panels[i].getComponent();\n if (steps[i] == null) {\n // Default step name to component name of panel. Mainly\n // useful for getting the name of the target chooser to\n // appear in the list of steps.\n steps[i] = c.getName();\n }\n if (c instanceof JComponent) { // assume Swing components\n JComponent jc = (JComponent) c;\n // Sets step number of a component\n // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*:\n jc.putClientProperty(\"WizardPanel_contentSelectedIndex\", Integer.valueOf(i));\n // Sets steps names for a panel\n jc.putClientProperty(\"WizardPanel_contentData\", steps);\n // Turn on subtitle creation on each step\n jc.putClientProperty(\"WizardPanel_autoWizardStyle\", Boolean.TRUE);\n // Show steps on the left side with the image on the background\n jc.putClientProperty(\"WizardPanel_contentDisplayed\", Boolean.TRUE);\n // Turn on numbering of all steps\n jc.putClientProperty(\"WizardPanel_contentNumbered\", Boolean.TRUE);\n }\n }\n }\n return panels;\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tGroup group_1 = new Group(shell, SWT.NONE);\n\t\tgroup_1.setText(\"\\u65B0\\u4FE1\\u606F\\u586B\\u5199\");\n\t\tgroup_1.setBounds(0, 120, 434, 102);\n\t\t\n\t\tLabel label_4 = new Label(group_1, SWT.NONE);\n\t\tlabel_4.setBounds(10, 21, 61, 17);\n\t\tlabel_4.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel label_5 = new Label(group_1, SWT.NONE);\n\t\tlabel_5.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\tlabel_5.setBounds(10, 46, 61, 17);\n\t\t\n\t\tLabel label_6 = new Label(group_1, SWT.NONE);\n\t\tlabel_6.setText(\"\\u5BC6\\u7801\");\n\t\tlabel_6.setBounds(10, 75, 61, 17);\n\t\t\n\t\ttext = new Text(group_1, SWT.BORDER);\n\t\ttext.setBounds(121, 21, 140, 17);\n\t\t\n\t\ttext_1 = new Text(group_1, SWT.BORDER);\n\t\ttext_1.setBounds(121, 46, 140, 17);\n\t\t\n\t\ttext_2 = new Text(group_1, SWT.BORDER);\n\t\ttext_2.setBounds(121, 75, 140, 17);\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.setBounds(31, 228, 80, 27);\n\t\tbtnNewButton.setText(\"\\u63D0\\u4EA4\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(288, 228, 80, 27);\n\t\tbtnNewButton_1.setText(\"\\u91CD\\u586B\");\n\t\t\n\t\tGroup group = new Group(shell, SWT.NONE);\n\t\tgroup.setText(\"\\u539F\\u5148\\u4FE1\\u606F\");\n\t\tgroup.setBounds(0, 10, 320, 102);\n\t\t\n\t\tLabel label = new Label(group, SWT.NONE);\n\t\tlabel.setBounds(10, 20, 61, 17);\n\t\tlabel.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel lblNewLabel = new Label(group, SWT.NONE);\n\t\tlblNewLabel.setBounds(113, 20, 61, 17);\n\t\t\n\t\tLabel label_1 = new Label(group, SWT.NONE);\n\t\tlabel_1.setBounds(10, 43, 61, 17);\n\t\tlabel_1.setText(\"\\u6027\\u522B\");\n\t\t\n\t\tButton btnRadioButton = new Button(group, SWT.RADIO);\n\t\t\n\t\tbtnRadioButton.setBounds(90, 43, 97, 17);\n\t\tbtnRadioButton.setText(\"\\u7537\");\n\t\tButton btnRadioButton_1 = new Button(group, SWT.RADIO);\n\t\tbtnRadioButton_1.setBounds(208, 43, 97, 17);\n\t\tbtnRadioButton_1.setText(\"\\u5973\");\n\t\t\n\t\tLabel label_2 = new Label(group, SWT.NONE);\n\t\tlabel_2.setBounds(10, 66, 61, 17);\n\t\tlabel_2.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(113, 66, 61, 17);\n\t\t\n\t\tLabel label_3 = new Label(group, SWT.NONE);\n\t\tlabel_3.setBounds(10, 89, 61, 17);\n\t\tlabel_3.setText(\"\\u5BC6\\u7801\");\n\t\tLabel lblNewLabel_2 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_2.setBounds(113, 89, 61, 17);\n\t\t\n\t\ttry {\n\t\t\tUserDao userDao=new UserDao();\n\t\t\tlblNewLabel_2.setText(User.getPassword());\n\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\n\t\t\t\n\n\t\t\n\t\t\ttry {\n\t\t\t\tList<User> userList=userDao.query();\n\t\t\t\tString results[][]=new String[userList.size()][5];\n\t\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\t\tlblNewLabel_1.setText(User.getSex());\n\t\t\t\tlblNewLabel_2.setText(User.getUserPhone());\n\t\t\t\tButton button = new Button(shell, SWT.NONE);\n\t\t\t\tbutton.setBounds(354, 0, 80, 27);\n\t\t\t\tbutton.setText(\"\\u8FD4\\u56DE\");\n\t\t\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tbook book=new book();\n\t\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < userList.size(); i++) {\n\t\t\t\t\t\tUser user1 = (User)userList.get(i);\t\n\t\t\t\t\tresults[i][0] = user1.getUserName();\n\t\t\t\t\tresults[i][1] = user1.getSex();\t\n\t\t\t\t\tresults[i][2] = user1.getPassword();\t\n\t\n\t\t\t\t\tif(user1.getSex().equals(\"男\"))\n\t\t\t\t\t\tbtnRadioButton.setSelection(true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tbtnRadioButton_1.setSelection(true);\n\t\t\t\t\tlblNewLabel_1.setText(user1.getUserPhone());\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tif(!text_1.getText().equals(\"\")&&!text.getText().equals(\"\")&&!text_2.getText().equals(\"\"))\n\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\t\tif(!text_1.getText().equals(\"\")&&!text_2.getText().equals(\"\")&&!text.getText().equals(\"\"))\n\t\t\t\t\t{shell.dispose();\n\t\t\t\t\tbook book=new book();\n\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{JOptionPane.showMessageDialog(null,\"用户名或密码不能为空\",\"错误\",JOptionPane.PLAIN_MESSAGE);}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t});\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\ttext.setText(\"\");\n\t\t\t\t\ttext_1.setText(\"\");\n\t\t\t\t\ttext_2.setText(\"\");\n\t\t\t\n\t\t\t}\n\t\t});\n\t}", "public TableEditorWizard(Table table) {\t\n\t\tcreateDialog(table);\n\t}", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "public void run()\n\t{\n\t\tMSetup ms = new MSetup(Env.getCtx(), m_WindowNo);\n\t\tm_frame.setBusyTimer(45);\n\t\t// Step 1\n\t\tboolean ok = ms.createClient(fClientName.getText(), fOrgName.getText(),\n\t\t\tfUserClient.getText(), fUserOrg.getText());\n\t\tString info = ms.getInfo();\n\n\t\tif (ok)\n\t\t{\n\t\t\t// Generate Accounting\n\t\t\tKeyNamePair currency = (KeyNamePair)fCurrency.getSelectedItem();\n\t\t\tif (!ms.createAccounting(currency,\n\t\t\t\tfProduct.isSelected(), fBPartner.isSelected(), fProject.isSelected(),\n\t\t\t\tfMCampaign.isSelected(), fSRegion.isSelected(),\n\t\t\t\tm_file))\n\t\t\t{\n\t\t\t\tADialog.error(m_WindowNo, this, \"AccountSetupError\");\n\t\t\t\tdispose();\n\t\t\t}\n\t\t\t// Generate Entities\n\t\t\tKeyNamePair p = (KeyNamePair)fCountry.getSelectedItem();\n\t\t\tint C_Country_ID = p.getKey();\n\t\t\tp = (KeyNamePair)fRegion.getSelectedItem();\n\t\t\tint C_Region_ID = p.getKey();\n\t\t\tms.createEntities(C_Country_ID, fCity.getText(), C_Region_ID, currency.getKey());\n\t\t\tinfo += ms.getInfo();\n\t\t\t//\tCreate Print Documents\n\t\t\tPrintUtil.setupPrintForm(ms.getAD_Client_ID());\n\t\t}\n\n\t\tADialog.info(m_WindowNo, this, \"VSetup\", info);\n\t\tdispose();\n\t}", "public SelectProjectWizardPage build() {\r\n return new SelectProjectWizardPage(this);\r\n }", "CartogramWizardPanelZero (JFrame contentFrame)\n\t{\n\t\n\t\tthis.setLocation(160, 90);\n\t\tthis.setSize(440, 340);\n\t\tthis.setLayout(null);\n\t\t\t\t\n\t\t// Add the Next button\n\t\tJButton nextButton = new JButton(\"Next >\");\n\t\tnextButton.setLocation(340, 314);\n\t\tnextButton.setSize(100, 26);\n\t\tnextButton.setMnemonic(KeyEvent.VK_ENTER);\n\t\t\n\t\tnextButton.addActionListener(new \n\t\t\tCartogramWizardGoToStepAction((CartogramWizard)contentFrame, 1));\n\t\t\t\n\t\tthis.add(nextButton);\n\t\t\n\t\t\n\t\t\n\t\t// Create the text pane which displays the message.\n\t\t// The message itself is read from a RTF file.\n\t\t\n\t\tJTextPane text = new JTextPane();\n\t\t\n\t\t// Get the wizard content from a text file.\n\t\tClassLoader cldr = this.getClass().getClassLoader();\n\t\tURL wizardStepZeroURL = cldr.getResource(\"WizardIntroduction.html\");\n\t\n\t\t// Get the content from the text file.\n\t\tString wizardStepZeroContent = null;\n\t\ttry\n\t\t{\n\t\t\tInputStream inStream = wizardStepZeroURL.openStream();\n\t\t\tStringBuffer inBuffer = new StringBuffer();\n\t\t\tint c;\n\t\t\t\n\t\t\twhile ((c = inStream.read()) != -1)\n\t\t\t{\n\t\t\t\tinBuffer.append((char)c);\n\t\t\t}\n\t\t\t\n\t\t\tinStream.close();\n\t\t\t\n\t\t\twizardStepZeroContent = inBuffer.toString();\n\t\t\t\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace(); \n\t\t}\n\t\t\n\t\t\n\t\ttext.setContentType(\"text/html\");\n\t\ttext.setText(wizardStepZeroContent);\n\t\ttext.setEditable(false);\n\t\ttext.addHyperlinkListener(this);\n\t\ttext.setBackground(null);\n\t\ttext.setLocation(0, 0);\n\t\ttext.setSize(440, 300);\n\t\tthis.add(text);\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\t// Add the help button\n\t\t\n\t\t//ClassLoader cldr = this.getClass().getClassLoader();\n\t\t\n\t\tjava.net.URL imageURL = cldr.getResource(\"help-22.png\");\n\t\tImageIcon helpIcon = new ImageIcon(imageURL);\n\n\t\tJButton helpButton = \n\t\t\tnew JButton(helpIcon);\n\t\t\n\t\thelpButton.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\thelpButton.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\thelpButton.setSize(30, 30);\n\t\thelpButton.setLocation(0, 312);\n\t\thelpButton.setFocusable(false);\n\t\thelpButton.setContentAreaFilled(false);\n\t\thelpButton.setBorderPainted(false);\n\t\t\n\t\thelpButton.addActionListener(new CartogramWizardShowURL(\n\t\t\t\"http://chorogram.choros.ch/scapetoad/help/a-cartogram-creation.php\"));\n\t\t\n\t\tthis.add(helpButton);\n\t\t\n\t\t\n\t}", "public void createContents()\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"TTS - Task Tracker System\");\n\t\t\n\t\tbtnLogIn = new Button(shell, SWT.NONE);\n\t\tbtnLogIn.setBounds(349, 84, 75, 25);\n\t\tbtnLogIn.setText(\"Log In\");\n\t\tbtnLogIn.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tif (cboxUserDropDown.getText() != \"\"\n\t\t\t\t\t\t&& cboxUserDropDown.getSelectionIndex() >= 0)\n\t\t\t\t{\n\t\t\t\t\tString selectedUserName = cboxUserDropDown.getText();\n\t\t\t\t\tusers.setLoggedInUser(selectedUserName);\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tdisplay.sleep();\n\t\t\t\t\tnew TaskMainViewWindow(AccessUsers.getLoggedInUser());\n\t\t\t\t\tdisplay.wake();\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tshell.forceFocus();\n\t\t\t\t\tshell.setActive();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnQuit = new Button(shell, SWT.CENTER);\n\t\tbtnQuit.setBounds(349, 227, 75, 25);\n\t\tbtnQuit.setText(\"Quit\");\n\t\tbtnQuit.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\t\n\t\tcboxUserDropDown = new Combo(shell, SWT.READ_ONLY);\n\t\tcboxUserDropDown.setBounds(146, 86, 195, 23);\n\t\t\n\t\tinitUserDropDown();\n\t\t\n\t\tlblNewLabel = new Label(shell, SWT.CENTER);\n\t\tlblNewLabel.setBounds(197, 21, 183, 25);\n\t\tlblNewLabel.setFont(new Font(display, \"Times\", 14, SWT.BOLD));\n\t\tlblNewLabel.setForeground(new Color(display, 200, 0, 0));\n\t\tlblNewLabel.setText(\"Task Tracker System\");\n\t\t\n\t\ticon = new Label(shell, SWT.BORDER);\n\t\ticon.setLocation(0, 0);\n\t\ticon.setSize(140, 111);\n\t\ticon.setImage(new Image(null, \"images/task.png\"));\n\t\t\n\t\tbtnCreateUser = new Button(shell, SWT.NONE);\n\t\tbtnCreateUser.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tshell.setEnabled(false);\n\t\t\t\tnew CreateUserWindow(users);\n\t\t\t\tshell.setEnabled(true);\n\t\t\t\tinitUserDropDown();\n\t\t\t\tshell.forceFocus();\n\t\t\t\tshell.setActive();\n\t\t\t}\n\t\t});\n\t\tbtnCreateUser.setBounds(349, 115, 75, 25);\n\t\tbtnCreateUser.setText(\"Create User\");\n\t\t\n\t}", "private void inicialize() {\n\t\t\n\t\t/**\n\t\t * Labels e textField of the page:\n\t\t * Nome\n\t\t * Descrição\n\t\t */\n\n\t\tJLabel lblNome = new JLabel(\"Nome\");\n\t\tlblNome.setBounds(5, 48, 86, 28);\n\t\tlblNome.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\tcontentPanel.add(lblNome);\n\t\t\n\t\tJLabel lblDescricao = new JLabel(\"Descrição\");\n\t\tlblDescricao.setBounds(5, 117, 86, 51);\n\t\tlblDescricao.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\tcontentPanel.add(lblDescricao);\n\t\t\n\t\ttextFieldNome = new JTextField();\n\t\ttextFieldNome.setBounds(103, 45, 290, 35);\n\t\ttextFieldNome.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\ttextFieldNome.setColumns(10);\n\t\tcontentPanel.add(textFieldNome);\n\t\t\n\t\ttextFieldDescricao = new JTextArea();\n\t\ttextFieldDescricao.setBackground(Color.WHITE);\n\t\ttextFieldDescricao.setLineWrap(true);\n\t\ttextFieldDescricao.setBounds(101, 118, 290, 193);\n\t\ttextFieldDescricao.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\ttextFieldDescricao.setColumns(10);\n\t\tcontentPanel.add(textFieldDescricao);\n\n\t\t/**\n\t\t * Confirmation panel\n\t\t * Confirmation button\n\t\t * Cancellation button\n\t\t */\n\n\t\tpainelConfirmacaoSetup();\n\t}", "protected void createContents() {\n shell = new Shell();\n shell.setSize(1024, 650);\n shell.setText(\"GMToolsTD\");\n shell.setLayout(new GridLayout());\n\n\n /* Création du menu principal */\n Menu menuPrincipal = new Menu(shell, SWT.BAR);\n shell.setMenuBar(menuPrincipal);\n\n MenuItem mntmModule = new MenuItem(menuPrincipal, SWT.CASCADE);\n mntmModule.setText(\"Module\");\n\n Menu menuModule = new Menu(mntmModule);\n mntmModule.setMenu(menuModule);\n\n mntmSpoolUsage = new MenuItem(menuModule, SWT.NONE);\n mntmSpoolUsage.setText(\"Spool Usage\");\n\n mntmUser = new MenuItem(menuModule, SWT.NONE);\n mntmUser.setText(\"User Information\");\n\n new MenuItem(menuModule, SWT.SEPARATOR);\n\n mntmConfig = new MenuItem(menuModule, SWT.NONE);\n mntmConfig.setText(\"Configuration\");\n\n new MenuItem(menuModule, SWT.SEPARATOR);\n\n mntmExit = new MenuItem(menuModule, SWT.NONE);\n mntmExit.setText(\"Exit\");\n\n MenuItem mntmHelp = new MenuItem(menuPrincipal, SWT.CASCADE);\n mntmHelp.setText(\"Help\");\n\n Menu menuAbout = new Menu(mntmHelp);\n mntmHelp.setMenu(menuAbout);\n\n mntmAbout = new MenuItem(menuAbout, SWT.NONE);\n mntmAbout.setText(\"About\");\n\n\n /* Creation main screen elements */\n pageComposite = new Composite(shell, SWT.NONE);\n pageComposite.setLayout(new GridLayout(2,false));\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.verticalAlignment = SWT.FILL;\n gridData.grabExcessVerticalSpace = true;\n pageComposite.setLayoutData(gridData);\n\n\n grpConnexion = new Group(pageComposite, SWT.NONE );\n grpConnexion.setText(\"Connection\");\n grpConnexion.setLayout(new GridLayout(2,false));\n gridData = new GridData();\n gridData.heightHint = 110;\n grpConnexion.setLayoutData(gridData);\n\n\n Label lblServer = new Label(grpConnexion, SWT.NONE);\n lblServer.setText(\"Server :\");\n\n textServer = new Text(grpConnexion, SWT.NONE);\n textServer.setLayoutData(new GridData(110,20));\n\n Label lblUsername = new Label(grpConnexion, SWT.NONE);\n lblUsername.setSize(65, 20);\n lblUsername.setText(\"Username :\");\n\n textUsername = new Text(grpConnexion,SWT.NONE);\n textUsername.setLayoutData(new GridData(110,20));\n\n Label lblPassword = new Label(grpConnexion, SWT.NONE);\n lblPassword.setSize(65, 20);\n lblPassword.setText(\"Password :\");\n\n textPassword = new Text(grpConnexion, SWT.PASSWORD);\n textPassword.setLayoutData(new GridData(110,20));\n\n btnConnect = new Button(grpConnexion, SWT.NONE);\n btnConnect.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER, false, false));\n btnConnect.setText(\"Connect\");\n\n btnDisconnect = new Button(grpConnexion, SWT.NONE);\n btnDisconnect.setEnabled(false);\n btnDisconnect.setText(\"Disconnect\");\n\n\n\n groupInfo = new Group(pageComposite, SWT.NONE);\n groupInfo.setText(\"Information\");\n groupInfo.setLayout(new GridLayout(1, false));\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.heightHint = 110;\n groupInfo.setLayoutData(gridData);\n\n textInformation = new Text(groupInfo, SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.verticalAlignment = SWT.FILL;\n gridData.grabExcessVerticalSpace = true;\n textInformation.setLayoutData(gridData);\n\n\n // renseignement des informations provenant de config\n textServer.setText(conf.getValueConf(conf.SERVER_TD));\n textUsername.setText(conf.getValueConf(conf.USERNAME_TD));\n textPassword.setText(\"\");\n\n\n mntmSpoolUsage.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n majAffichage(AFFICHE_SPOOL);\n }\n });\n\n\n mntmUser.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n majAffichage(AFFICHE_USER);\n }\n });\n\n mntmConfig.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n majAffichage(AFFICHE_CONFIG);\n }\n });\n\n mntmAbout.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n MessageBox messageBox = new MessageBox(shell, SWT.ICON_INFORMATION);\n messageBox.setText(\"About...\");\n messageBox.setMessage(\"Not implemented yet ...\");\n messageBox.open();\n }\n });\n\n mntmExit.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n // afficher un message box avec du blabla\n shell.close();\n\n }\n });\n\n btnConnect.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n // connexion Teradata\n btnConnect.setEnabled(false);\n entryServer = textServer.getText();\n entryUsername = textUsername.getText();\n entryPassword = textPassword.getText();\n\n new Thread(new Runnable() {\n public void run() {\n try {\n\n tdConnect = new TDConnexion(entryServer, entryUsername, entryPassword, conf);\n majInformation(MESSAGE_INFORMATION,nomModuleConnexion,\"Connexion OK\");\n connexionStatut = true;\n } catch ( SQLException err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Connexion KO : \"+err.getMessage());\n connexionStatut = false;\n } catch (ClassNotFoundException err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Error ClassNotFoundException : \"+err.getMessage());\n connexionStatut = false;\n }\n if (connexionStatut) {\n try {\n nbrAMP = tdConnect.requestNumberAMP();\n } catch (Exception err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Calculation of AMPs KO : \"+err.getMessage());\n connexionStatut = false;\n tdConnect.deconnexion();\n }\n }\n\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n\n if (connexionStatut) {\n activationON();\n\n textServer.setEnabled(false);\n textUsername.setEnabled(false);\n textPassword.setEnabled(false);\n\n btnConnect.setEnabled(false);\n btnDisconnect.setEnabled(true);\n } else {\n btnConnect.setEnabled(true);\n }\n }\n });\n }\n }).start();\n\n\n\n\n }\n });\n\n\n btnDisconnect.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n manageDisconnection();\n }\n });\n\n\n //creating secondary screen\n ecranUser = new EcranUser(this);\n ecranSpool = new EcranSpool(this);\n ecranConfig = new EcranConfig(this);\n\n\n // update of the information message (log)\n new Thread(new Runnable() {\n public void run() {\n try {\n while (true) {\n if (!listMessageInfo.isEmpty()) {\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n refreshInformation();\n }\n });\n }\n try {\n Thread.sleep(500);\n } catch (Exception e) {\n //nothing to do\n }\n }\n } catch (Exception e) {\n //What to do when the while send an error ?\n }\n }\n }).start();\n\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tnum1 = new Text(shell, SWT.BORDER);\n\t\tnum1.setBounds(32, 51, 112, 19);\n\t\t\n\t\tnum2 = new Text(shell, SWT.BORDER);\n\t\tnum2.setBounds(32, 120, 112, 19);\n\t\t\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setBounds(32, 31, 92, 14);\n\t\tlblNewLabel.setText(\"First Number:\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(32, 100, 112, 14);\n\t\tlblNewLabel_1.setText(\"Second Number: \");\n\t\t\n\t\tfinal Label answer = new Label(shell, SWT.NONE);\n\t\tanswer.setBounds(35, 204, 60, 14);\n\t\tanswer.setText(\"Answer:\");\n\t\t\n\t\tButton plusButton = new Button(shell, SWT.NONE);\n\t\tplusButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint number1, number2;\n\t\t\t\ttry {\n\t\t\t\t\tnumber1 = Integer.parseInt(num1.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnumber2 = Integer.parseInt(num2.getText());\n\t\t\t\t}\n\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\tMessageDialog.openError(shell, \"Error\", \"Bad number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint ans = number1 + number2;\n\t\t\t\tanswer.setText(\"Answer: \" + ans);\n\t\t\t}\n\t\t});\n\t\tplusButton.setBounds(29, 158, 56, 28);\n\t\tplusButton.setText(\"+\");\n\t\t\n\t\t\n\n\t}", "public void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tIWorkbenchWizard wizard = new BasicNewProjectResourceWizard();\r\n\t\t\t\twizard.init(PlatformUI.getWorkbench(), new TreeSelection());\r\n\t\t\t\tWizardDialog dialog = new WizardDialog(getShell(), wizard);\r\n\t\t\t\tdialog.open();\r\n\t\t\t\tif (outputChooserTreeViewer.getTree().getItemCount() == 1) {\t\t\t\t\t\r\n\t\t\t\t\tvalidatePage();\r\n\t\t\t\t}\r\n\t\t\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(new Point(500, 360));\n\t\tshell.setMinimumSize(new Point(500, 360));\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setText(\"欢迎 \"+user.getName()+\" 同学使用学生成绩管理系统\");\n\t\tnew Label(shell, SWT.NONE);\n\t\t\n\t\tComposite compositeStdData = new Composite(shell, SWT.NONE);\n\t\tcompositeStdData.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\tGridLayout gl_compositeStdData = new GridLayout(2, false);\n\t\tgl_compositeStdData.verticalSpacing = 15;\n\t\tcompositeStdData.setLayout(gl_compositeStdData);\n\t\t\n\t\tLabel labelStdData = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdData.setAlignment(SWT.CENTER);\n\t\tlabelStdData.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 2, 1));\n\t\tlabelStdData.setText(\"成绩数据\");\n\t\t\n\t\tLabel labelStdDataNum = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdDataNum.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelStdDataNum.setText(\"学号:\");\n\t\t\n\t\ttextStdDataNum = new Text(compositeStdData, SWT.BORDER);\n\t\ttextStdDataNum.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n\t\t\n\t\tLabel labelStdDataName = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdDataName.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelStdDataName.setText(\"姓名:\");\n\t\t\n\t\ttextStdDataName = new Text(compositeStdData, SWT.BORDER);\n\t\ttextStdDataName.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n\t\t\n\t\tLabel labelStdDataLine = new Label(compositeStdData, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabelStdDataLine.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 2, 1));\n\t\tlabelStdDataLine.setText(\"New Label\");\n\t\t\n\t\tLabel labelCourseName = new Label(compositeStdData, SWT.NONE);\n\t\tlabelCourseName.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelCourseName.setText(\"课程名\");\n\t\t\n\t\tLabel labelScore = new Label(compositeStdData, SWT.NONE);\n\t\tlabelScore.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlabelScore.setText(\"成绩\");\n\t\t\n\t\ttextCourseName = new Text(compositeStdData, SWT.BORDER);\n\t\ttextCourseName.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\t\n\t\ttextScore = new Text(compositeStdData, SWT.BORDER);\n\t\ttextScore.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\t\n\t\tLabel labelStdDataFill = new Label(compositeStdData, SWT.NONE);\n\t\tlabelStdDataFill.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));\n\t\tnew Label(compositeStdData, SWT.NONE);\n\t\t\n\t\tComposite compositeStdOp = new Composite(shell, SWT.NONE);\n\t\tcompositeStdOp.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));\n\t\tGridLayout gl_compositeStdOp = new GridLayout(1, false);\n\t\tgl_compositeStdOp.verticalSpacing = 15;\n\t\tcompositeStdOp.setLayout(gl_compositeStdOp);\n\t\t\n\t\tLabel labelStdOP = new Label(compositeStdOp, SWT.NONE);\n\t\tlabelStdOP.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));\n\t\tlabelStdOP.setAlignment(SWT.CENTER);\n\t\tlabelStdOP.setText(\"操作菜单\");\n\t\t\n\t\tButton buttonStdOPFirst = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPFirst.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPFirst.setText(\"第一门课程\");\n\t\t\n\t\tButton buttonStdOPNext = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPNext.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPNext.setText(\"下一门课程\");\n\t\t\n\t\tButton buttonStdOPPrev = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPPrev.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPPrev.setText(\"上一门课程\");\n\t\t\n\t\tButton buttonStdOPLast = new Button(compositeStdOp, SWT.NONE);\n\t\tbuttonStdOPLast.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tbuttonStdOPLast.setText(\"最后一门课程\");\n\t\t\n\t\tCombo comboStdOPSele = new Combo(compositeStdOp, SWT.NONE);\n\t\tcomboStdOPSele.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\t\tcomboStdOPSele.setText(\"课程名?\");\n\t\t\n\t\tLabel labelStdOPFill = new Label(compositeStdOp, SWT.NONE);\n\t\tlabelStdOPFill.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\n\t}", "protected void createContents() throws Exception\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(755, 592);\n\t\tshell.setText(\"Impresor - Documentos v1.2\");\n\t\t\n\t\tthis.commClass.centrarVentana(shell);\n\t\t\n\t\tlistComandos = new List(shell, SWT.BORDER | SWT.H_SCROLL | SWT.COLOR_WHITE);\n\t\tlistComandos.setBounds(72, 22, 628, 498);\n\t\tlistComandos.setVisible(false);\n\n//Boton que carga los documentos\t\t\n\t\tButton btnLoaddocs = new Button(shell, SWT.NONE);\n\t\tbtnLoaddocs.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnLoaddocs.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tloadDocs(false, false);\n\t\t\t}\n\t\t});\n\t\tbtnLoaddocs.setBounds(10, 20, 200, 26);\n\t\tbtnLoaddocs.setText(\"Cargar documentos a imprimir\");\n\t\t\n//Browser donde se muestra el documento descargado\n\t\tbrowser = new Browser(shell, SWT.BORDER);\n\t\tbrowser.setBounds(10, 289, 726, 231);\n\t\tbrowser.addProgressListener(new ProgressListener() \n\t\t{\n\t\t\tpublic void changed(ProgressEvent event) {\n\t\t\t\t// Cuando cambia.\t\n\t\t\t}\n\t\t\tpublic void completed(ProgressEvent event) {\n\t\t\t\t/* Cuando se completo \n\t\t\t\t Se usa para parsear el documento una vez cargado, el documento\n\t\t\t\t puede ser un doc xml que contiene un mensaje de error\n\t\t\t\t o un doc html que dara error de parseo Xml,es decir,\n\t\t\t\t ante este error entendemos que se cargo bien el doc HTML.\n\t\t\t\t Paradojico verdad? */\n\t\t\t\tleerDocumentoCargado();\n\t\t\t}\n\t\t });\n\n///Boton para iniciar impresion\t\t\n\t\tButton btnIniPrintW = new Button(shell, SWT.NONE);\n\t\tbtnIniPrintW.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tiniciarImpresion(null);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnIniPrintW.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tiniciarImpresion(null);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnIniPrintW.setBounds(337, 532, 144, 26);\n\t\tbtnIniPrintW.setText(\"Iniciar impresion\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 52, 885, 2);\n\t\t\n\t\tButton btnSalir = new Button(shell, SWT.NONE);\n\t\tbtnSalir.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnSalir.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnSalir.setBounds(659, 532, 77, 26);\n\t\tbtnSalir.setText(\"Salir\");\n\t\t\n\t\tthreadLabel = new Label(shell, SWT.BORDER);\n\t\tthreadLabel.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\t//mostrar / ocultar el historial de mensajes\n\t\t\t\tMOCmsgHist();\n\t\t\t}\n\t\t});\n\t\tthreadLabel.setAlignment(SWT.CENTER);\n\t\tthreadLabel.setBackground(new Color(display, 255,255,255));\n\t\tthreadLabel.setBounds(10, 0, 891, 18);\n\t\tthreadLabel.setText(\"\");\n\t\t\n\t\tLabel label_1 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel_1.setBounds(10, 281, 726, 2);\n\n\t\ttablaDocs = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttablaDocs.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t//PabloGo, 12 de julio de 2013\n\t\t\t\t//verifUltDocSelected(e);\n\t\t\t\tseleccionarItemMouse(e);\n\t\t\t}\n\t\t});\n\t\ttablaDocs.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tseleccionarItem(e);\n\t\t\t}\n\t\t});\n\t\ttablaDocs.setBounds(10, 52, 726, 215);\n\t\ttablaDocs.setHeaderVisible(true);\n\t\ttablaDocs.setLinesVisible(true);\n\t\tcrearColumnas(tablaDocs);\n\t\t\n//Label que muestra los mensajes\n\t\tmensajeTxt = new Label(shell, SWT.NONE);\n\t\tmensajeTxt.setAlignment(SWT.CENTER);\n\t\tmensajeTxt.setBounds(251, 146, 200, 26);\n\t\tmensajeTxt.setText(\"Espere...\");\n\t\t\n//Listado donde se muestran los documentos cargados\n\t\tlistaDocumentos = new List(shell, SWT.BORDER);\n\t\tlistaDocumentos.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t//PabloGo, 12 de julio de 2013\n\t\t\t\t//verifUltDocSelected(e);\n\t\t\t\tseleccionarItemMouse(e);\n\t\t\t}\n\t\t});\n\t\tlistaDocumentos.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tseleccionarItem(e);\n\t\t\t}\n\t\t});\n\t\tlistaDocumentos.setBounds(10, 82, 726, 77);\n\t\t\n\t\tButton btnShowPreview = new Button(shell, SWT.CHECK);\n\t\tbtnShowPreview.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tif (((Button)e.getSource()).getSelection()){\n\t\t\t\t\tmostrarPreview = true;\n\t\t\t\t}else{\n\t\t\t\t\tmostrarPreview = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnShowPreview.setBounds(215, 28, 118, 18);\n\t\tbtnShowPreview.setText(\"Mostrar preview\");\n\t\t\n\t\tButton btnAutoRefresh = new Button(shell, SWT.CHECK);\n\t\tbtnAutoRefresh.addMouseListener(new MouseAdapter() {\n\t\t\tpublic void mouseUp(MouseEvent e) {\n\t\t\t\tif (((Button)e.getSource()).getSelection()){\n\t\t\t\t\tautoRefresh = true;\n\t\t\t\t\tbeginTarea();\n\t\t\t\t}else{\n\t\t\t\t\tautoRefresh = false;\n\t\t\t\t\tponerMsg(\"Carga automática desactivada\");\n\t\t\t\t\tfinishTarea();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnAutoRefresh.setBounds(353, 28, 128, 18);\n\t\tbtnAutoRefresh.setText(\"Recarga Automática\");\n\t\t\n\t\ttareaBack(this, autoRefresh).start();\n\t\tloadDocs(false, false);\n\t}", "private void createComponents() {\n\n add(createSetDataPanel(), BorderLayout.NORTH);\n add(createResourcesListAndButtonsPanel(), BorderLayout.CENTER);\n }", "private void createContents() {\r\n\t\tshlEventBlocker = new Shell(getParent(), getStyle());\r\n\t\tshlEventBlocker.setSize(167, 135);\r\n\t\tshlEventBlocker.setText(\"Event Blocker\");\r\n\t\t\r\n\t\tLabel lblRunningEvent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblRunningEvent.setBounds(10, 10, 100, 15);\r\n\t\tlblRunningEvent.setText(\"Running Event:\");\r\n\t\t\r\n\t\tLabel lblevent = new Label(shlEventBlocker, SWT.NONE);\r\n\t\tlblevent.setFont(SWTResourceManager.getFont(\"Segoe UI\", 15, SWT.BOLD));\r\n\t\tlblevent.setBounds(20, 31, 129, 35);\r\n\t\tlblevent.setText(eventName);\r\n\t\t\r\n\t\tButton btnFinish = new Button(shlEventBlocker, SWT.NONE);\r\n\t\tbtnFinish.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlEventBlocker.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFinish.setBounds(10, 72, 75, 25);\r\n\t\tbtnFinish.setText(\"Finish\");\r\n\r\n\t}", "public CreateProjectPanel() {\n isFinished = true;\n }" ]
[ "0.69989717", "0.6820229", "0.673835", "0.67283905", "0.67213607", "0.67124814", "0.6518928", "0.651366", "0.65055203", "0.6498539", "0.6477543", "0.64678425", "0.6467805", "0.6435733", "0.6425108", "0.6331127", "0.633104", "0.6325514", "0.6315328", "0.626534", "0.6240933", "0.62229514", "0.6198568", "0.6192634", "0.61898005", "0.6184264", "0.6177575", "0.61603206", "0.61426586", "0.61264044", "0.61125296", "0.61090374", "0.60446405", "0.60313445", "0.60312384", "0.60271037", "0.6015058", "0.60146487", "0.5990497", "0.5989427", "0.59809214", "0.596467", "0.59642965", "0.59522134", "0.5951555", "0.59509194", "0.5946526", "0.594547", "0.5937847", "0.59352785", "0.59324014", "0.59314346", "0.59287703", "0.5928487", "0.59263825", "0.5925834", "0.5919198", "0.59181124", "0.5916533", "0.5914608", "0.5914488", "0.5906784", "0.589426", "0.5894192", "0.58881843", "0.5883308", "0.58749235", "0.58680826", "0.58612263", "0.5855459", "0.5840646", "0.58363724", "0.5829567", "0.58249646", "0.5822612", "0.5814798", "0.581454", "0.5812041", "0.58108747", "0.5804975", "0.57982683", "0.57940507", "0.57900375", "0.578687", "0.57616127", "0.57435894", "0.57407886", "0.57165825", "0.5704416", "0.5703473", "0.5703182", "0.56994355", "0.56940544", "0.5692746", "0.5678453", "0.56760484", "0.5674155", "0.56666595", "0.5650741", "0.5649926", "0.56432873" ]
0.0
-1
Export script to a external XML file
protected void exportScriptToFile() { try { final MigrationConfiguration cfg = getMigrationWizard() .getMigrationConfig(); prepare4SaveScript(); ExportScriptDialog.exportScript(cfg, isSaveSchema()); } catch (Exception e) { // MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(), // Messages.msgWarning, Messages.setOptionPageErrMsg); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void savetoxml() throws FileNotFoundException, JAXBException {\n xml_methods.save(player);\n }", "public void dumpAsXmlFile(String pFileName);", "private void write(){\n\t\ttry {\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\t\n\t\t\tString pathSub = ManipXML.class.getResource(path).toString();\n\t\t\tpathSub = pathSub.substring(5, pathSub.length());\n\t\t\tStreamResult result = new StreamResult(pathSub);\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "String exportTo(CopybookExport exporter, String xmlCopybook);", "public void exportXML() throws Exception{\n\t\t \n\t\t try {\n\n\t // create DOMSource for source XML document\n\t\t Source xmlSource = new DOMSource(convertStringToDocument(iet.editorPane.getText()));\n\t\t \n\t\t JFileChooser c = new JFileChooser();\n\t\t\t\t\n\t\t\t\tint rVal = c.showSaveDialog(null);\n\t\t\t\tString name = c.getSelectedFile().getAbsolutePath() + \".xml\";\n\t \n\t File f = new File(name);\n\t \n\t if (rVal == JFileChooser.APPROVE_OPTION) {\n\n\t\t // create StreamResult for transformation result\n\t\t Result result = new StreamResult(new FileOutputStream(f));\n\n\t\t // create TransformerFactory\n\t\t TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n\t\t // create Transformer for transformation\n\t\t Transformer transformer = transformerFactory.newTransformer();\n\t\t transformer.setOutputProperty(\"indent\", \"yes\");\n\n\t\t // transform and deliver content to client\n\t\t transformer.transform(xmlSource, result);\n\t\t \n\t\t }\n\t\t }\n\t\t // handle exception creating TransformerFactory\n\t\t catch (TransformerFactoryConfigurationError factoryError) {\n\t\t System.err.println(\"Error creating \" + \"TransformerFactory\");\n\t\t factoryError.printStackTrace();\n\t\t } // end catch 1\n\t\t \t catch (TransformerException transformerError) {\n\t\t System.err.println(\"Error transforming document\");\n\t\t transformerError.printStackTrace();\n\t\t } //end catch 2 \n\t\t \t catch (IOException ioException) {\n\t\t ioException.printStackTrace();\n\t\t } // end catch 3\n\t\t \n\t }", "public void transformToSecondXml();", "void saveXML(String path,\n SourceParameters parameters)\n throws SAXException, ProcessingException, IOException;", "protected abstract void toXml(PrintWriter result);", "public void exec() {\n\n try {\n\n String webDotXMLPath = webAppPath + \"/WEB-INF/web.xml\";\n DocumentBuilderFactory builderFactory = DocumentBuilderFactory\n .newInstance();\n\n DocumentBuilder builder = DocumentBuilderFactory.newInstance()\n .newDocumentBuilder();\n Document doc = builder.parse(new File(webDotXMLPath));\n DocumentType docType = doc.getDoctype();\n if (docType != null) {\n doc.removeChild(docType);\n }\n Element webAppElement = (Element) doc.getFirstChild();\n webAppElement.setAttribute(\"version\", \"2.4\");\n webAppElement.setAttribute(\"xmlns\",\n \"http://java.sun.com/xml/ns/j2ee\");\n webAppElement.setAttribute(\"xmlns:xsi\",\n \"http://www.w3.org/2001/XMLSchema-instance\");\n webAppElement\n .setAttribute(\n \"xsi:schemaLocation\",\n \"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\");\n\n OutputFormat of = new OutputFormat();\n of.setIndenting(true);\n of.setIndent(4); // 2-space indention\n of.setLineWidth(16384);\n\n OutputStream outputStream = new FileOutputStream(webDotXMLPath);\n Writer writer = new OutputStreamWriter(outputStream, \"utf-8\");\n\n XMLSerializer serializer = new XMLSerializer(writer, of);\n serializer.serialize(doc);\n\n writer.close();\n\n } catch (Exception e) {\n throw new RuntimeException(\"Processing failed\", e);\n }\n\n }", "public void export(String URN) {\n try {\n DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();\n fabrique.setValidating(true);\n DocumentBuilder constructeur = fabrique.newDocumentBuilder();\n Document document = constructeur.newDocument();\n \n // Propriétés du DOM\n document.setXmlVersion(\"1.0\");\n document.setXmlStandalone(true);\n \n // Création de l'arborescence du DOM\n Element racine = document.createElement(\"monde\");\n racine.setAttribute(\"longueur\",Integer.toString(getLongueur()));\n racine.setAttribute(\"largeur\",Integer.toString(getLargeur()));\n document.appendChild(racine);\n for (Composant composant:composants) {\n racine.appendChild(composant.toElement(document)) ;\n }\n \n // Création de la source DOM\n Source source = new DOMSource(document);\n \n // Création du fichier de sortie\n File file = new File(URN);\n Result resultat = new StreamResult(URN);\n \n // Configuration du transformer\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"http://womby.zapto.org/monde.dtd\");\n \n // Transformation\n transformer.transform(source, resultat);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void xmlSave() {\r\n FileDialog fd = new FileDialog(new Frame(), \r\n \"Save as a jMusic XML file...\", \r\n FileDialog.SAVE);\r\n fd.show();\r\n if (fd.getFile() != null) {\r\n jm.util.Write.xml(score, fd.getDirectory() + fd.getFile());\r\n }\r\n }", "private void exportarXML(){\n \n String nombre_archivo=IO_ES.leerCadena(\"Inserte el nombre del archivo\");\n String[] nombre_elementos= {\"Modulos\", \"Estudiantes\", \"Profesores\"};\n Document doc=XML.iniciarDocument();\n doc=XML.estructurarDocument(doc, nombre_elementos);\n \n for(Persona estudiante : LEstudiantes){\n estudiante.escribirXML(doc);\n }\n for(Persona profesor : LProfesorado){\n profesor.escribirXML(doc);\n }\n for(Modulo modulo: LModulo){\n modulo.escribirXML(doc);\n }\n \n XML.domTransformacion(doc, RUTAXML, nombre_archivo);\n \n }", "public String writeFile1() throws IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"07010101\\\">\"); \n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>4</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>96</plot_lenX>\");\n oOut.write(\"<plot_lenY>96</plot_lenY>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\"/>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\"/>\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.54</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0614</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.5944</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.368</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.0269</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0241</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>NonSpatialDisperse</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>2</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>MastingDisperseAutocorrelation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>3</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>DensDepRodentSeedPredation</behaviorName>\");\n oOut.write(\"<version>1.0</version>\");\n oOut.write(\"<listPosition>4</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_1\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Seed\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<NonSpatialDisperse1>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_2\\\">0</di_nssolVal>\");\n oOut.write(\"<di_nssolVal species=\\\"Species_1\\\">0</di_nssolVal>\");\n oOut.write(\"</di_nonSpatialSlopeOfLambda>\");\n oOut.write(\"<di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_1\\\">1</di_nsiolVal>\");\n oOut.write(\"<di_nsiolVal species=\\\"Species_2\\\">2</di_nsiolVal>\");\n oOut.write(\"</di_nonSpatialInterceptOfLambda>\");\n oOut.write(\"</NonSpatialDisperse1>\");\n oOut.write(\"<MastingDisperseAutocorrelation2>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_1\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.49</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.04</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.89</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.29</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_1\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_1\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_1\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_1\\\">1</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_1\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_1\\\">0</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_1\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_1\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_1\\\">0.75</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_1\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_1\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_1\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_1\\\">1.76E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_1\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation2>\");\n oOut.write(\"<MastingDisperseAutocorrelation3>\");\n oOut.write(\"<di_minDbhForReproduction>\");\n oOut.write(\"<di_mdfrVal species=\\\"Species_2\\\">15.0</di_mdfrVal>\");\n oOut.write(\"</di_minDbhForReproduction>\");\n //Mast timeseries\n oOut.write(\"<di_mdaMastTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"1\\\">0.5</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"2\\\">0.29</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"3\\\">0.05</di_mdaMTS>\");\n oOut.write(\"<di_mdaMTS ts=\\\"4\\\">0.63</di_mdaMTS>\");\n oOut.write(\"</di_mdaMastTS>\");\n oOut.write(\"<di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_mdfseVal species=\\\"Species_2\\\">100</di_mdfseVal>\");\n oOut.write(\"</di_maxDbhForSizeEffect>\");\n oOut.write(\"<di_weibullCanopyBeta>\");\n oOut.write(\"<di_wcbVal species=\\\"Species_2\\\">1</di_wcbVal>\");\n oOut.write(\"</di_weibullCanopyBeta>\");\n oOut.write(\"<di_weibullCanopySTR>\");\n oOut.write(\"<di_wcsVal species=\\\"Species_2\\\">1000</di_wcsVal>\");\n oOut.write(\"</di_weibullCanopySTR>\");\n oOut.write(\"<di_mdaReproFracA>\");\n oOut.write(\"<di_mdarfaVal species=\\\"Species_2\\\">10000</di_mdarfaVal>\");\n oOut.write(\"</di_mdaReproFracA>\");\n oOut.write(\"<di_mdaReproFracB>\");\n oOut.write(\"<di_mdarfbVal species=\\\"Species_2\\\">1</di_mdarfbVal>\");\n oOut.write(\"</di_mdaReproFracB>\");\n oOut.write(\"<di_mdaReproFracC>\");\n oOut.write(\"<di_mdarfcVal species=\\\"Species_2\\\">1</di_mdarfcVal>\");\n oOut.write(\"</di_mdaReproFracC>\");\n oOut.write(\"<di_mdaRhoACF>\");\n oOut.write(\"<di_mdaraVal species=\\\"Species_2\\\">1</di_mdaraVal>\");\n oOut.write(\"</di_mdaRhoACF>\");\n oOut.write(\"<di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdarnsdVal species=\\\"Species_2\\\">0</di_mdarnsdVal>\");\n oOut.write(\"</di_mdaRhoNoiseSD>\");\n oOut.write(\"<di_mdaPRA>\");\n oOut.write(\"<di_mdapraVal species=\\\"Species_2\\\">100</di_mdapraVal>\");\n oOut.write(\"</di_mdaPRA>\");\n oOut.write(\"<di_mdaPRB>\");\n oOut.write(\"<di_mdaprbVal species=\\\"Species_2\\\">0.004</di_mdaprbVal>\");\n oOut.write(\"</di_mdaPRB>\");\n oOut.write(\"<di_mdaSPSSD>\");\n oOut.write(\"<di_mdaspssdVal species=\\\"Species_2\\\">0.1</di_mdaspssdVal>\");\n oOut.write(\"</di_mdaSPSSD>\");\n oOut.write(\"<di_canopyFunction>\");\n oOut.write(\"<di_cfVal species=\\\"Species_2\\\">0</di_cfVal>\");\n oOut.write(\"</di_canopyFunction>\");\n oOut.write(\"<di_weibullCanopyDispersal>\");\n oOut.write(\"<di_wcdVal species=\\\"Species_2\\\">1.82E-04</di_wcdVal>\");\n oOut.write(\"</di_weibullCanopyDispersal>\");\n oOut.write(\"<di_weibullCanopyTheta>\");\n oOut.write(\"<di_wctVal species=\\\"Species_2\\\">3</di_wctVal>\");\n oOut.write(\"</di_weibullCanopyTheta>\");\n oOut.write(\"</MastingDisperseAutocorrelation3>\");\n oOut.write(\"<DensDepRodentSeedPredation4>\");\n oOut.write(\"<pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_1\\\">0.9</pr_ddfrsVal>\");\n oOut.write(\"<pr_ddfrsVal species=\\\"Species_2\\\">0.05</pr_ddfrsVal>\");\n oOut.write(\"</pr_densDepFuncRespSlope>\");\n oOut.write(\"<pr_densDepFuncRespA>0.02</pr_densDepFuncRespA>\");\n oOut.write(\"<pr_densDepDensCoeff>0.07</pr_densDepDensCoeff>\");\n oOut.write(\"</DensDepRodentSeedPredation4>\");\n oOut.write(\"</paramFile>\");\n oOut.close();\n return sFileName;\n }", "public void writeXMLFinisher() {\n\t\tJavaIO.createXMLFile(getCurrentPath(), \"coveragePriorJ.xml\", \"</list>\", true);\n\t}", "public void exportFxwl(File dir) {\n File f = new File(dir,getName() + \".fxwl\");\n try {\n X.toXML(this, new BufferedWriter(new FileWriter(f)));\n } catch (IOException ex) {\n LOGGER.error(\"Unable to export component launcher for {} into {}\", getName(),f);\n }\n }", "public String exportXML() {\n\n\t\tXStream xstream = new XStream();\n\t\txstream.setMode(XStream.NO_REFERENCES);\n\n\t\treturn xstream.toXML(this);\n\t}", "private void writeXmlFile( Document doc, String file_path ) {\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\r\n\t\t\tTransformer transformer = tf.newTransformer();\r\n\t\t\tDOMSource source \t\t= new DOMSource( doc );\r\n\t\t\tStreamResult result \t= new StreamResult( new File( file_path ));\r\n\t\t\t\r\n\t\t\t// Output to console for testing\r\n\t\t\t// StreamResult result = new StreamResult(System.out);\r\n\r\n\t\t\ttransformer.transform( source, result );\r\n\t\t\tSystem.out.println( \"File saved!\" );\r\n\r\n\r\n\t\t} catch ( TransformerException e ) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void writeXML() throws IOException {\n OutputFormat format = OutputFormat.createPrettyPrint();//th format of xml file\n XMLWriter xmlWriter =new XMLWriter( new FileOutputStream(file), format);\n xmlWriter.write(document);//write the new xml into the file\n xmlWriter.flush();\n }", "private String writeValidXMLFile() throws java.io.IOException {\n String sFileName = \"\\\\testfile1.xml\";\n FileWriter oOut = new FileWriter(sFileName);\n\n oOut.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\");\n oOut.write(\"<paramFile fileCode=\\\"06010101\\\">\");\n oOut.write(\"<plot>\");\n oOut.write(\"<timesteps>3</timesteps>\");\n oOut.write(\"<yearsPerTimestep>1</yearsPerTimestep>\");\n oOut.write(\"<randomSeed>1</randomSeed>\");\n oOut.write(\"<plot_lenX>200.0</plot_lenX>\");\n oOut.write(\"<plot_lenY>200.0</plot_lenY>\");\n oOut.write(\"<plot_precip_mm_yr>1150.645781</plot_precip_mm_yr>\");\n oOut.write(\"<plot_temp_C>12.88171785</plot_temp_C>\");\n oOut.write(\"<plot_latitude>55.37</plot_latitude>\");\n oOut.write(\"</plot>\");\n oOut.write(\"<trees>\");\n oOut.write(\"<tr_speciesList>\");\n oOut.write(\"<tr_species speciesName=\\\"Species_1\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_2\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_3\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_4\\\" />\");\n oOut.write(\"<tr_species speciesName=\\\"Species_5\\\" />\");\n oOut.write(\"</tr_speciesList>\");\n oOut.write(\"<tr_seedDiam10Cm>0.1</tr_seedDiam10Cm>\");\n oOut.write(\"<tr_minAdultDBH>\");\n oOut.write(\"<tr_madVal species=\\\"Species_1\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_2\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_3\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_4\\\">10.0</tr_madVal>\");\n oOut.write(\"<tr_madVal species=\\\"Species_5\\\">10.0</tr_madVal>\");\n oOut.write(\"</tr_minAdultDBH>\");\n oOut.write(\"<tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_1\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_2\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_3\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_4\\\">1.35</tr_mshVal>\");\n oOut.write(\"<tr_mshVal species=\\\"Species_5\\\">1.35</tr_mshVal>\");\n oOut.write(\"</tr_maxSeedlingHeight>\");\n oOut.write(\"<tr_sizeClasses>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s1.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s10.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s20.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s30.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s40.0\\\"/>\");\n oOut.write(\"<tr_sizeClass sizeKey=\\\"s50.0\\\"/>\");\n oOut.write(\"</tr_sizeClasses>\");\n oOut.write(\"<tr_initialDensities>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_1\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_2\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_3\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_4\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"<tr_idVals whatSpecies=\\\"Species_5\\\">\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s20.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s30.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s40.0\\\">250</tr_initialDensity>\");\n oOut.write(\"<tr_initialDensity sizeClass=\\\"s50.0\\\">250</tr_initialDensity>\");\n oOut.write(\"</tr_idVals>\");\n oOut.write(\"</tr_initialDensities>\");\n oOut.write(\"</trees>\");\n oOut.write(\"<allometry>\");\n oOut.write(\"<tr_canopyHeight>\");\n oOut.write(\"<tr_chVal species=\\\"Species_1\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_2\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_3\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_4\\\">39.48</tr_chVal>\");\n oOut.write(\"<tr_chVal species=\\\"Species_5\\\">39.48</tr_chVal>\");\n oOut.write(\"</tr_canopyHeight>\");\n oOut.write(\"<tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_1\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_2\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_3\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_4\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"<tr_sacrVal species=\\\"Species_5\\\">0.0549</tr_sacrVal>\");\n oOut.write(\"</tr_stdAsympCrownRad>\");\n oOut.write(\"<tr_stdCrownRadExp>\");\n oOut.write(\"<tr_screVal species=\\\"Species_1\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_2\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_3\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_4\\\">1.0</tr_screVal>\");\n oOut.write(\"<tr_screVal species=\\\"Species_5\\\">1.0</tr_screVal>\");\n oOut.write(\"</tr_stdCrownRadExp>\");\n oOut.write(\"<tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_1\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_2\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_3\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_4\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"<tr_cdtdVal species=\\\"Species_5\\\">0.8008</tr_cdtdVal>\");\n oOut.write(\"</tr_conversionDiam10ToDBH>\");\n oOut.write(\"<tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_1\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_2\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_3\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_4\\\">0</tr_idtdVal>\");\n oOut.write(\"<tr_idtdVal species=\\\"Species_5\\\">0</tr_idtdVal>\");\n oOut.write(\"</tr_interceptDiam10ToDBH>\");\n oOut.write(\"<tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_1\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_2\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_3\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_4\\\">0.389</tr_sachVal>\");\n oOut.write(\"<tr_sachVal species=\\\"Species_5\\\">0.389</tr_sachVal>\");\n oOut.write(\"</tr_stdAsympCrownHt>\");\n oOut.write(\"<tr_stdCrownHtExp>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_1\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_2\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_3\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_4\\\">1.0</tr_scheVal>\");\n oOut.write(\"<tr_scheVal species=\\\"Species_5\\\">1.0</tr_scheVal>\");\n oOut.write(\"</tr_stdCrownHtExp>\");\n oOut.write(\"<tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_1\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_2\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_3\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_4\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"<tr_sohdVal species=\\\"Species_5\\\">0.03418</tr_sohdVal>\");\n oOut.write(\"</tr_slopeOfHeight-Diam10>\");\n oOut.write(\"<tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_1\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_2\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_3\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_4\\\">0.0299</tr_soahVal>\");\n oOut.write(\"<tr_soahVal species=\\\"Species_5\\\">0.0299</tr_soahVal>\");\n oOut.write(\"</tr_slopeOfAsymHeight>\");\n oOut.write(\"<tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_1\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_2\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_3\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_4\\\">0</tr_wsehdVal>\");\n oOut.write(\"<tr_wsehdVal species=\\\"Species_5\\\">0</tr_wsehdVal>\");\n oOut.write(\"</tr_whatSeedlingHeightDiam>\");\n oOut.write(\"<tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_1\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_2\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_3\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_4\\\">0</tr_wsahdVal>\");\n oOut.write(\"<tr_wsahdVal species=\\\"Species_5\\\">0</tr_wsahdVal>\");\n oOut.write(\"</tr_whatSaplingHeightDiam>\");\n oOut.write(\"<tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_1\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_2\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_3\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_4\\\">0</tr_wahdVal>\");\n oOut.write(\"<tr_wahdVal species=\\\"Species_5\\\">0</tr_wahdVal>\");\n oOut.write(\"</tr_whatAdultHeightDiam>\");\n oOut.write(\"<tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_1\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_2\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_3\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_4\\\">0</tr_wacrdVal>\");\n oOut.write(\"<tr_wacrdVal species=\\\"Species_5\\\">0</tr_wacrdVal>\");\n oOut.write(\"</tr_whatAdultCrownRadDiam>\");\n oOut.write(\"<tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_1\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_2\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_3\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_4\\\">0</tr_wachhVal>\");\n oOut.write(\"<tr_wachhVal species=\\\"Species_5\\\">0</tr_wachhVal>\");\n oOut.write(\"</tr_whatAdultCrownHeightHeight>\");\n oOut.write(\"<tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_1\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_2\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_3\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_4\\\">0</tr_wscrdVal>\");\n oOut.write(\"<tr_wscrdVal species=\\\"Species_5\\\">0</tr_wscrdVal>\");\n oOut.write(\"</tr_whatSaplingCrownRadDiam>\");\n oOut.write(\"<tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_1\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_2\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_3\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_4\\\">0</tr_wschhVal>\");\n oOut.write(\"<tr_wschhVal species=\\\"Species_5\\\">0</tr_wschhVal>\");\n oOut.write(\"</tr_whatSaplingCrownHeightHeight>\");\n oOut.write(\"</allometry>\");\n oOut.write(\"<behaviorList>\");\n oOut.write(\"<behavior>\");\n oOut.write(\"<behaviorName>QualityVigorClassifier</behaviorName>\");\n oOut.write(\"<version>1</version>\");\n oOut.write(\"<listPosition>1</listPosition>\");\n oOut.write(\"<applyTo species=\\\"Species_2\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_3\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_4\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"<applyTo species=\\\"Species_5\\\" type=\\\"Adult\\\"/>\");\n oOut.write(\"</behavior>\");\n oOut.write(\"</behaviorList>\");\n oOut.write(\"<QualityVigorClassifier1>\");\n oOut.write(\"<ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>10</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>20</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.78</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.88</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.61</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.64</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">1</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.55</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>20</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>30</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.33</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.81</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.64</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.32</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.32</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.69</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.33</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.58</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierSizeClass>\");\n oOut.write(\"<ma_classifierBeginDBH>30</ma_classifierBeginDBH>\");\n oOut.write(\"<ma_classifierEndDBH>40</ma_classifierEndDBH>\");\n oOut.write(\"<ma_classifierProbVigorous>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_2\\\">0.34</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_3\\\">0.57</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_4\\\">0.26</ma_cpvVal>\");\n oOut.write(\"<ma_cpvVal species=\\\"Species_5\\\">0.46</ma_cpvVal>\");\n oOut.write(\"</ma_classifierProbVigorous>\");\n oOut.write(\"<ma_classifierProbSawlog>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_2\\\">0.13</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_3\\\">0.36</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_4\\\">0.66</ma_cpsVal>\");\n oOut.write(\"<ma_cpsVal species=\\\"Species_5\\\">0.45</ma_cpsVal>\");\n oOut.write(\"</ma_classifierProbSawlog>\");\n oOut.write(\"</ma_classifierSizeClass>\");\n oOut.write(\"</ma_classifierInitialConditions>\");\n oOut.write(\"<ma_classifierVigBeta0>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_2\\\">0.1</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_3\\\">0</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_4\\\">0.3</ma_cvb0Val>\");\n oOut.write(\"<ma_cvb0Val species=\\\"Species_5\\\">0.4</ma_cvb0Val>\");\n oOut.write(\"</ma_classifierVigBeta0>\");\n oOut.write(\"<ma_classifierVigBeta11>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_2\\\">0.2</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_3\\\">2.35</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_4\\\">0.1</ma_cvb11Val>\");\n oOut.write(\"<ma_cvb11Val species=\\\"Species_5\\\">2.43</ma_cvb11Val>\");\n oOut.write(\"</ma_classifierVigBeta11>\");\n oOut.write(\"<ma_classifierVigBeta12>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_2\\\">-2.3</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_3\\\">1.12</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_4\\\">0.32</ma_cvb12Val>\");\n oOut.write(\"<ma_cvb12Val species=\\\"Species_5\\\">1.3</ma_cvb12Val>\");\n oOut.write(\"</ma_classifierVigBeta12>\");\n oOut.write(\"<ma_classifierVigBeta13>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_2\\\">0.13</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_3\\\">1</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_4\\\">-0.2</ma_cvb13Val>\");\n oOut.write(\"<ma_cvb13Val species=\\\"Species_5\\\">1</ma_cvb13Val>\");\n oOut.write(\"</ma_classifierVigBeta13>\");\n oOut.write(\"<ma_classifierVigBeta14>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_2\\\">0.9</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_3\\\">0</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_4\\\">-1</ma_cvb14Val>\");\n oOut.write(\"<ma_cvb14Val species=\\\"Species_5\\\">0</ma_cvb14Val>\");\n oOut.write(\"</ma_classifierVigBeta14>\");\n oOut.write(\"<ma_classifierVigBeta15>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_2\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_3\\\">0.25</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_4\\\">1</ma_cvb15Val>\");\n oOut.write(\"<ma_cvb15Val species=\\\"Species_5\\\">-0.45</ma_cvb15Val>\");\n oOut.write(\"</ma_classifierVigBeta15>\");\n oOut.write(\"<ma_classifierVigBeta16>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_2\\\">1</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_3\\\">0.36</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_4\\\">0</ma_cvb16Val>\");\n oOut.write(\"<ma_cvb16Val species=\\\"Species_5\\\">0.46</ma_cvb16Val>\");\n oOut.write(\"</ma_classifierVigBeta16>\");\n oOut.write(\"<ma_classifierVigBeta2>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_2\\\">0.01</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_3\\\">0.02</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_4\\\">0.04</ma_cvb2Val>\");\n oOut.write(\"<ma_cvb2Val species=\\\"Species_5\\\">0.1</ma_cvb2Val>\");\n oOut.write(\"</ma_classifierVigBeta2>\");\n oOut.write(\"<ma_classifierVigBeta3>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_2\\\">0.001</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_3\\\">0.2</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_4\\\">0.3</ma_cvb3Val>\");\n oOut.write(\"<ma_cvb3Val species=\\\"Species_5\\\">0.4</ma_cvb3Val>\");\n oOut.write(\"</ma_classifierVigBeta3>\");\n oOut.write(\"<ma_classifierQualBeta0>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_2\\\">0.25</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_3\\\">1.13</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_4\\\">0</ma_cqb0Val>\");\n oOut.write(\"<ma_cqb0Val species=\\\"Species_5\\\">1.15</ma_cqb0Val>\");\n oOut.write(\"</ma_classifierQualBeta0>\");\n oOut.write(\"<ma_classifierQualBeta11>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_2\\\">0.36</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_3\\\">0</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_4\\\">0.4</ma_cqb11Val>\");\n oOut.write(\"<ma_cqb11Val species=\\\"Species_5\\\">0</ma_cqb11Val>\");\n oOut.write(\"</ma_classifierQualBeta11>\");\n oOut.write(\"<ma_classifierQualBeta12>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_2\\\">0.02</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_3\\\">10</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_4\\\">0.3</ma_cqb12Val>\");\n oOut.write(\"<ma_cqb12Val species=\\\"Species_5\\\">30</ma_cqb12Val>\");\n oOut.write(\"</ma_classifierQualBeta12>\");\n oOut.write(\"<ma_classifierQualBeta13>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_2\\\">0.2</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_3\\\">10</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_4\\\">-0.3</ma_cqb13Val>\");\n oOut.write(\"<ma_cqb13Val species=\\\"Species_5\\\">30</ma_cqb13Val>\");\n oOut.write(\"</ma_classifierQualBeta13>\");\n oOut.write(\"<ma_classifierQualBeta14>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_2\\\">-0.2</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_3\\\">10</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_4\\\">-0.4</ma_cqb14Val>\");\n oOut.write(\"<ma_cqb14Val species=\\\"Species_5\\\">30</ma_cqb14Val>\");\n oOut.write(\"</ma_classifierQualBeta14>\");\n oOut.write(\"<ma_classifierQualBeta2>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_2\\\">-0.2</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_3\\\">10</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_4\\\">0</ma_cqb2Val>\");\n oOut.write(\"<ma_cqb2Val species=\\\"Species_5\\\">30</ma_cqb2Val>\");\n oOut.write(\"</ma_classifierQualBeta2>\");\n oOut.write(\"<ma_classifierQualBeta3>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_2\\\">1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_3\\\">10</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_4\\\">0.1</ma_cqb3Val>\");\n oOut.write(\"<ma_cqb3Val species=\\\"Species_5\\\">30</ma_cqb3Val>\");\n oOut.write(\"</ma_classifierQualBeta3>\");\n oOut.write(\"<ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_2\\\">0.1</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_3\\\">0.25</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_4\\\">0.5</ma_cnapvVal>\");\n oOut.write(\"<ma_cnapvVal species=\\\"Species_5\\\">0.74</ma_cnapvVal>\");\n oOut.write(\"</ma_classifierNewAdultProbVigorous>\");\n oOut.write(\"<ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_2\\\">0.9</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_3\\\">0.25</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_4\\\">0.3</ma_cnapsVal>\");\n oOut.write(\"<ma_cnapsVal species=\\\"Species_5\\\">0.74</ma_cnapsVal>\");\n oOut.write(\"</ma_classifierNewAdultProbSawlog>\");\n oOut.write(\"<ma_classifierDeciduous>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_2\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_3\\\">0</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_4\\\">1</ma_cdVal>\");\n oOut.write(\"<ma_cdVal species=\\\"Species_5\\\">0</ma_cdVal>\");\n oOut.write(\"</ma_classifierDeciduous>\");\n oOut.write(\"</QualityVigorClassifier1>\");\n oOut.write(\"</paramFile>\");\n\n oOut.close();\n return sFileName;\n }", "public void changeXMLFile() throws IOException {\n File orig = new File(RunnerClass.homedir + \"launch4j.xml\");\n File custom = new File(RunnerClass.homedir + \"launch4j2.xml\");\n BufferedReader br = new BufferedReader(new FileReader(orig));\n PrintWriter pw = new PrintWriter(new FileWriter(custom));\n int line = 0;\n String s;\n //Reads all lines, and replaces 5th line with new destination file\n while ((s = br.readLine()) != null) {\n line++;\n if (line == 5)\n pw.println(\" <outfile>\" + exeF.getCanonicalPath() + \"</outfile>\");\n else if(line == 18)\n pw.println(\" <minVersion>\"+ getFullVersion(RunnerClass.mf.generalOptionalPanel.javaVersion.getText().trim()) +\"</minVersion>\");\n else\n pw.println(s);\n }\n br.close();\n pw.close();\n //Deletes original file, renames temp to original\n RunnerClass.logger.info(\"del: \" + orig.delete());\n RunnerClass.logger.info(\"ren: \" + custom.renameTo(orig));\n }", "public void execute() throws XDocletException {\n\t\tsetPublicId(DD_PUBLICID_20);\n\t\tsetSystemId(DD_SYSTEMID_20);\n\n\t\t// will not work .... dumper.xdt does not exist\n\t\t/*\n\t\tsetTemplateURL(getClass().getResource(\"resources/dumper.xdt\"));\n\t\tsetDestinationFile(\"dump\");\n\t\tSystem.out.println(\"Generating dump\");\n\t\tstartProcess();\n\t\t*/\n\n\n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_EJB_JAR_XML_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"ejb-jar.xml\");\n\t\tSystem.out.println(\"Generating ejb-jar.xml\");\n\t\tstartProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_BND_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_BND_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_BND_FILE_NAME);\n startProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_FILE_NAME);\n startProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_PME_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_PME_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_PME_FILE_NAME);\n startProcess();\n\n /*\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_ACCESS_BEAN_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_ACCESS_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_ACCESS_FILE_NAME);\n startProcess();\n */\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_MAPXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tstartProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_DBXMI_TEMPLATE_FILE));\n setDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n System.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n startProcess();\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_SCHXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tstartProcess();\n\t\t\n\t\tCollection classes = getXJavaDoc().getSourceClasses();\n\t\tfor (ClassIterator i = XCollections.classIterator(classes); i.hasNext();) {\n\t\t\tXClass clazz = i.next();\n\t\t\t//System.out.print(\">> \" + clazz.getName());\n\t\t\t// check tag ejb:persistence + sub tag table-name\n\t\t\tXTag tag = clazz.getDoc().getTag(\"ejb:persistence\");\n\t\t\tif (tag != null) {\n\t\t\t\tString tableName = tag.getAttributeValue(\"table-name\");\n\t\t\t\t//System.out.println(\"ejb:persistence table-name = '\" + tableName + \"'\");\n\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\tSystem.out.println(\"Generating \" + destinationFileName);\n\t\t\t\t\n\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_TBLXMI_TEMPLATE_FILE));\n\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\tsetHavingClassTag(\"ejb:persistence\");\n\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\tstartProcess();\n\t\t\t}\n\t\t\t// Now, check for relationships \n\t\t\tfor (Iterator methods = clazz.getMethods().iterator(); methods.hasNext();) {\n\t\t\t\tXMethod method = (XMethod)methods.next();\n\t\t\t\tif (method.getDoc().hasTag(\"websphere:relation\")) {\n\t\t\t\t\tString tableName = method.getDoc().getTagAttributeValue(\"websphere:relation\",\"table-name\");\n\t\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_RELATIONSHIP_TBLXMI_TEMPLATE_FILE));\n\t\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\t\tsetCurrentMethod(method);\n\t\t\t\t\tSystem.out.println(\"\\tGenerating M-M Relationship table: \" + destinationFileName);\n\t\t\t\t\tstartProcess();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t}\n\n/*\n if (atLeastOneCmpEntityBeanExists()) {\n setTemplateURL(getClass().getResource(WEBSPHERE_SCHEMA_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_SCHEMA_FILE_NAME);\n startProcess();\n }\n*/\n }", "public void printToXML() {\n String fileString = \"outputDisposal.xml\";\n //Creating the path object of the file\n Path filePath = Paths.get(fileString);\n if (Files.notExists(filePath)) {\n try {\n Files.createFile(filePath);\n } catch (IOException e1) {\n\n e1.printStackTrace();\n }\n }\n //Converting the path object to file to use in the FileWriter constructor \n File newFile = filePath.toFile();\n\n /*\n Typical try-with-resources block that features three streams: FileWriter,BufferedWriter and PrintWriter.\n The FileWriter object connects the file tho the stream.\n The BufferedWriter object \n */\n try ( PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(newFile)))) {\n for (PickUp pck : pickups) {\n out.print(pck);\n }\n\n } catch (IOException e) {\n System.err.println(e);\n }\n\n }", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "public void createFile(){\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setAcceptAllFileFilterUsed(false);\r\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Only XML Files\", \"xml\");\r\n chooser.addChoosableFileFilter(filter);\r\n chooser.showSaveDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (!f.getName().endsWith(\".xml\")){\r\n f = new File(f.getAbsolutePath().concat(\".xml\"));\r\n }\r\n try {\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(f));\r\n try (PrintWriter pw = new PrintWriter(bw)) {\r\n pw.println(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\r\n pw.println(\"<osm>\");\r\n for (Node node : this.getListNodes()) {\r\n if(node.getType() == TypeNode.INCENDIE){\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" intensity=\\\"\"+node.getFire()+\"\\\" />\");\r\n } else {\r\n pw.println(\" <node id=\\\"\"+node.getId()+\"\\\" x=\\\"\"+node.getX()+\"\\\" y=\\\"\"+node.getY()+\"\\\" type=\\\"\"+node.getType()+\"\\\" />\");\r\n }\r\n }\r\n for (Edge edge : this.getListEdges()) {\r\n pw.println(\" <edge nd1=\\\"\"+edge.getNode1().getId()+\"\\\" nd2=\\\"\"+edge.getNode2().getId()+\"\\\" type=\\\"\"+edge.getType()+\"\\\" />\");\r\n }\r\n pw.println(\"</osm>\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Writing Error : \" + e.getMessage());\r\n }\r\n }", "public void writeToGameFile(String fileName) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element game = doc.createElement(\"Game\");\n rootElement.appendChild(game);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(\"001\"));\n game.appendChild(id);\n Element stories = doc.createElement(\"Stories\");\n game.appendChild(stories);\n\n for (int i = 1; i < 10; i++) {\n Element cap1 = doc.createElement(\"story\");\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(\"Mwheels\"));\n Element text = doc.createElement(\"Text\");\n text.appendChild(doc.createTextNode(\"STEP \" + i + \":\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu.\"));\n cap1.appendChild(image);\n cap1.appendChild(text);\n stories.appendChild(cap1);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.GAME_FILE_DIR + fileName + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }", "public void save() {\n int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\r\n int minute = Calendar.getInstance().get(Calendar.MINUTE);\r\n\r\n // Hierarchie: 2010/04/05/01_05042010_00002.xml\r\n File dir = getOutputDir();\r\n File f = new File(dir, getCode().replace(' ', '_') + \".xml\");\r\n Element topLevel = new Element(\"ticket\");\r\n topLevel.setAttribute(new Attribute(\"code\", this.getCode()));\r\n topLevel.setAttribute(\"hour\", String.valueOf(hour));\r\n topLevel.setAttribute(\"minute\", String.valueOf(minute));\r\n // Articles\r\n for (Pair<Article, Integer> item : this.items) {\r\n Element e = new Element(\"article\");\r\n e.setAttribute(\"qte\", String.valueOf(item.getSecond()));\r\n // Prix unitaire\r\n e.setAttribute(\"prix\", String.valueOf(item.getFirst().getPriceInCents()));\r\n e.setAttribute(\"prixHT\", String.valueOf(item.getFirst().getPriceHTInCents()));\r\n e.setAttribute(\"idTaxe\", String.valueOf(item.getFirst().getIdTaxe()));\r\n e.setAttribute(\"categorie\", item.getFirst().getCategorie().getName());\r\n e.setAttribute(\"codebarre\", item.getFirst().getCode());\r\n e.setText(item.getFirst().getName());\r\n topLevel.addContent(e);\r\n }\r\n // Paiements\r\n for (Paiement paiement : this.paiements) {\r\n final int montantInCents = paiement.getMontantInCents();\r\n if (montantInCents > 0) {\r\n final Element e = new Element(\"paiement\");\r\n String type = \"\";\r\n if (paiement.getType() == Paiement.CB) {\r\n type = \"CB\";\r\n } else if (paiement.getType() == Paiement.CHEQUE) {\r\n type = \"CHEQUE\";\r\n } else if (paiement.getType() == Paiement.ESPECES) {\r\n type = \"ESPECES\";\r\n }\r\n e.setAttribute(\"type\", type);\r\n e.setAttribute(\"montant\", String.valueOf(montantInCents));\r\n topLevel.addContent(e);\r\n }\r\n\r\n }\r\n try {\r\n final XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());\r\n out.output(topLevel, new FileOutputStream(f));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public static void exportXml(JButton inputButton, LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName)\r\n {\r\n inputButton.addActionListener((ActionEvent e) -> \r\n {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"xml\", \"xml\"));\r\n String selectedExtension = fileChooser.getFileFilter().getDescription();\r\n Document resultDoc = null;\r\n int option = fileChooser.showSaveDialog(null);\r\n if(option == JFileChooser.APPROVE_OPTION)\r\n {\r\n try\r\n {\r\n resultDoc = generateXmlFile(inputData, elementInGraph, graphName);\r\n } \r\n catch (ParserConfigurationException ex)\r\n {\r\n Logger.getLogger(drawMusicData_Utils.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n //Salvataggio nuovo file XML prendendo il file selezionato dal chooser e concatenando l'estensione\r\n Result output = new StreamResult(new File(fileChooser.getSelectedFile().getAbsolutePath()+\".\"+selectedExtension));\r\n Source input = new DOMSource(resultDoc);\r\n try\r\n {\r\n TransformerFactory tf = TransformerFactory.newInstance();\r\n Transformer t;\r\n t = tf.newTransformer();\r\n t.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n t.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"3\");\r\n t.transform(input, output);\r\n }\r\n catch (IllegalArgumentException | TransformerException ex)\r\n {\r\n \r\n }\r\n }\r\n }); \r\n }", "void save(String fileName) throws IOException, TransformerConfigurationException, ParserConfigurationException;", "public void xmlExporter(String path, short side, String extention) throws IOException {\r\n\t\tOutputStream fout = null;\r\n\t\tOutputStream bout = null;\r\n\t\tOutputStreamWriter output = null;\r\n\r\n\t\tString newPath = checkPath(path, extention);\r\n\r\n\t\ttry {\r\n\t\t\t// ovisno o odabranoj strani stvara se datoteka i poziva metoda koja\r\n\t\t\t// vrsi ispis\r\n\t\t\tif (side == (short) 1) {\r\n\t\t\t\tfout = new FileOutputStream(newPath);\r\n\t\t\t\tbout = new BufferedOutputStream(fout);\r\n\t\t\t\toutput = new OutputStreamWriter(bout, \"UTF-8\");\r\n\r\n\t\t\t\t// FileOutputStream output = new FileOutputStream(\"left.xml\");\r\n\t\t\t\tthis.writeToFile(output, idList1);\r\n\t\t\t\toutput.close();\r\n\t\t\t} else {\r\n\t\t\t\tfout = new FileOutputStream(newPath);\r\n\t\t\t\tbout = new BufferedOutputStream(fout);\r\n\t\t\t\toutput = new OutputStreamWriter(bout, \"UTF-8\");\r\n\r\n\t\t\t\t// output = new FileOutputStream(\"right.xml\");\r\n\t\t\t\tthis.writeToFile(output, idList2);\r\n\t\t\t\toutput.close();\r\n\t\t\t}\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new FileNotFoundException(\r\n\t\t\t\t\t\"File could not be found!\\r\\n\"\r\n\t\t\t\t\t\t\t+ \"- Verify that the file exists in the specified location.\\r\\n\"\r\n\t\t\t\t\t\t\t+ \"- Check the spelling of the name of the document.\\r\\n\\r\\n\"\r\n\t\t\t\t\t\t\t+ path);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IOException(\"I/O exception has occurred.\");\r\n\t\t}\r\n\r\n\t}", "private void exportGraphML()\r\n {\r\n // Create the file filter.\r\n SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n new SimpleFileFilter(\"xml\", \"Graph ML (*.xml)\")\r\n };\r\n \r\n // Save the file.\r\n String file = openFileChooser(false, filters);\r\n \r\n // Write the file.\r\n if (file != null)\r\n {\r\n String extension = file.substring(file.length() - 4);\r\n if (!extension.equals(\".xml\")) file = file + \".xml\";\r\n Writer.writeGraphML(m_graph, file);\r\n }\r\n }", "public static void exportXml(JButton inputButton, LinkedHashMap<String, Integer> inputData, String elementInGraph, String graphName, String inputDurationType)\r\n {\r\n inputButton.addActionListener((ActionEvent e) -> \r\n {\r\n JFileChooser fileChooser = new JFileChooser();\r\n fileChooser.setFileFilter(new FileNameExtensionFilter(\"xml\", \"xml\"));\r\n String selectedExtension = fileChooser.getFileFilter().getDescription();\r\n Document resultDoc = null;\r\n int option = fileChooser.showSaveDialog(null);\r\n if(option == JFileChooser.APPROVE_OPTION)\r\n {\r\n try\r\n {\r\n if(!inputDurationType.equals(\"\"))\r\n resultDoc = generateXmlFile(inputData, elementInGraph, graphName, inputDurationType);\r\n else\r\n resultDoc = generateXmlFile(inputData, elementInGraph, graphName); \r\n } \r\n catch (ParserConfigurationException ex)\r\n {\r\n Logger.getLogger(drawMusicData_Utils.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n //Salvataggio nuovo file XML prendendo il file selezionato dal chooser e concatenando l'estensione\r\n Result output = new StreamResult(new File(fileChooser.getSelectedFile().getAbsolutePath()+\".\"+selectedExtension));\r\n Source input = new DOMSource(resultDoc);\r\n try\r\n {\r\n TransformerFactory tf = TransformerFactory.newInstance();\r\n Transformer t;\r\n t = tf.newTransformer();\r\n t.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n t.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"3\");\r\n t.transform(input, output);\r\n }\r\n catch (IllegalArgumentException | TransformerException ex)\r\n {\r\n \r\n }\r\n }\r\n }); \r\n }", "private void export() {\n print(\"Outputting Instructions to file ... \");\n\n // Generate instructions right now\n List<Instruction> instructions = new ArrayList<Instruction>();\n convertToInstructions(instructions, shape);\n\n // Verify Instructions\n if (instructions == null || instructions.size() == 0) {\n println(\"failed\\nNo instructions!\");\n return;\n }\n\n // Prepare the output file\n output = createWriter(\"output/instructions.txt\");\n \n // TODO: Write configuration information to the file\n \n\n // Write all the Instructions to the file\n for (int i = 0; i < instructions.size(); i++) {\n Instruction instruction = instructions.get(i);\n output.println(instruction.toString());\n }\n\n // Finish the file\n output.flush();\n output.close();\n\n println(\"done\");\n }", "public void writeToXML() throws IOException, XMLStreamException {\n FileOutputStream outPC = new FileOutputStream(\"C:\\\\Users\\\\Ruben Joosen\\\\Documents\\\\AntwerpenU\\\\Semester 5\\\\Distributed Systems\\\\ProjectY\\\\DS\\\\ProjectY\\\\map.xml\");\n FileOutputStream out = new FileOutputStream(\"/home/pi/Documents/DS/ProjectY/map.xml\"); // \"/home/pi/Documents/DS/ProjectY/map.xml\"\n\n XMLStreamWriter xsw = null;\n try {\n try {\n XMLOutputFactory xof = XMLOutputFactory.newInstance();\n xsw = xof.createXMLStreamWriter(out, \"UTF-8\");\n xsw.writeStartDocument(\"utf-8\", \"1.0\");\n xsw.writeStartElement(\"entries\");\n\n // Do the Collection\n for (Map.Entry<Integer, String> e : this.IPmap.entrySet()) {\n xsw.writeStartElement(\"entry\");\n xsw.writeAttribute(\"key\", e.getKey().toString());\n xsw.writeAttribute(\"value\", e.getValue().toString());\n xsw.writeEndElement();\n }\n xsw.writeEndElement();\n xsw.writeEndDocument();\n } finally {\n if (out != null) {\n try {\n out.close();\n } catch (IOException e) { /* ignore */ }\n }\n }// end inner finally\n } finally {\n if (xsw != null) {\n try {\n xsw.close();\n } catch (XMLStreamException e) { /* ignore */ }\n }\n }\n }", "public void exportPropertiesToXML(PropertySet properties, String xmlPath){\n\t\t\n\t\t\n\t\ttry {\n\n\t\t\t//Call the method to get the root element of this document\n\t\t\tElement root = createJDOMRepresentation(properties);\n\t\t\t\n\t\t\t//Create an XML Outputter\n\t\t\tXMLOutputter outputter = new XMLOutputter();\n\t\t\t\n\t\t\t//Set the format of the outputted XML File\n\t\t\tFormat format = Format.getPrettyFormat();\n\t\t\toutputter.setFormat(format);\n\t\t\t\n\t\t\t//Output the XML File to standard output and the desired file\n\t\t\tFileWriter filew = new FileWriter(xmlPath);\n\t\t\t//outputter.output(root, System.out);\n\t\t\toutputter.output(root, filew);\n\t\t\t\n\t\t} catch (IOException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "int writeTo(OutputStream out, boolean withXmlDecl) throws IOException;", "public interface IXMLWriter {\n\n /**\n * @param game to serialize and output\n * @param outputFile to write to\n */\n void convertXMLToGame (IGame game, File outputFile);\n}", "public void writeXMLServer(String file_name)\n\t\t{\n\t\t\t\t \n\t\t\t\t//Attempt to write server to an XML file in current working directory\n\t\t\t\ttry {\n\t\t\t\t JAXBContext jaxbc = JAXBContext.newInstance(Server.class);\n\t\t\t\t Marshaller marshaller = jaxbc.createMarshaller();\n\t\t\t\t marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\t\t\t\t OutputStream out = null;\n\t\t\t\t try \n\t\t\t\t {\n\t\t\t\t out = new FileOutputStream(file_name);\n\t\t\t\t marshaller.marshal(this, out);\n\t\t\t\t } \n\t\t\t\t catch (FileNotFoundException e) \n\t\t\t\t {\n\t\t\t\t e.printStackTrace();\n\t\t\t\t } \n\t\t\t\t finally \n\t\t\t\t {\n\t\t\t\t try \n\t\t\t\t {\n\t\t\t\t out.close();\n\t\t\t\t } \n\t\t\t\t catch (IOException e) \n\t\t\t\t {\n\t\t\t\t \t e.printStackTrace();\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t } catch (JAXBException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t}", "public static void addEmployeeToXMLFile(Employee ee) {\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n\n Element rootElement;\n File xmlFile = new File(\"src/task2/employee.xml\");\n\n if (xmlFile.isFile()) {\n doc = docBuilder.parse(new FileInputStream(xmlFile));\n doc.getDocumentElement().normalize();\n rootElement = doc.getDocumentElement();\n } else {\n rootElement = doc.createElement(\"department\");\n doc.appendChild(rootElement);\n }\n\n Element employee = doc.createElement(\"employee\");\n rootElement.appendChild(employee);\n\n Element id = doc.createElement(\"id\");\n id.appendChild(doc.createTextNode(ee.getId()));\n employee.appendChild(id);\n\n Element name = doc.createElement(\"name\");\n name.appendChild(doc.createTextNode(ee.getName()));\n employee.appendChild(name);\n\n Element sex = doc.createElement(\"sex\");\n sex.appendChild(doc.createTextNode(Integer.toString(ee.sex)));\n employee.appendChild(sex);\n\n Element dateOfBirth = doc.createElement(\"dateOfBirth\");\n dateOfBirth.appendChild(doc.createTextNode(ee.dateOfBirth));\n employee.appendChild(dateOfBirth);\n\n Element salary = doc.createElement(\"salary\");\n salary.appendChild(doc.createTextNode(Double.toString(ee.salary)));\n employee.appendChild(salary);\n\n Element address = doc.createElement(\"address\");\n address.appendChild(doc.createTextNode(ee.address));\n employee.appendChild(address);\n\n Element idDepartment = doc.createElement(\"idDepartment\");\n idDepartment.appendChild(doc.createTextNode(ee.idDepartment));\n employee.appendChild(idDepartment);\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(xmlFile);\n transformer.transform(source, result);\n System.out.println(\"File saved\");\n\n } catch (ParserConfigurationException | SAXException | IOException | DOMException | TransformerException e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "public void writeXML(String xml){\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tDocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder documentBuilder = documentFactory.newDocumentBuilder(); \n\t\t\t// define root elements \n\t\t\tDocument document = documentBuilder.newDocument(); \n\t\t\tElement rootElement = document.createElement(\"graph\"); \n\t\t\tdocument.appendChild(rootElement);\n\t\t\t\n\t\t\tfor(int i=0;i<Rel.getChildCount();i++){\n\t\t\t\tif(Rel.getChildAt(i).getTag() != null){\n\t\t\t\t\tif(Rel.getChildAt(i).getTag().toString().compareTo(\"node\") == 0){\n\t\t\t\t\t\tArtifact artifact = (Artifact) Rel.getChildAt(i);\n\t\t\t\t\t\tElement node = addElement(rootElement, \"node\", document);\n\t\t\t\t\t\tElement id = addAttribute(\"id\",artifact.getId()+\"\", document); //we create an attribute for a node\n\t\t\t\t\t\tnode.appendChild(id);//and then we attach it to the node\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> fathers = artifact.getFathers();\n\t\t\t\t\t\tif(fathers != null){\n\t\t\t\t\t\t\taddElement(node, \"fathers\", document);//for complex attribute like array of fathers we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<fathers.size();j++){\n\t\t\t\t\t\t\t\tElement father = addAttribute(\"father\",fathers.get(j).getId()+\"\", document);//inside this element created in the node we add all its fathers as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(father);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tArrayList <Artifact> sons = artifact.getSons();\n\t\t\t\t\t\tif(sons != null){\n\t\t\t\t\t\t\taddElement(node, \"sons\", document);//for complex attribute like array of sons we add an element to the node\n\t\t\t\t\t\t\tfor(int j=0;j<sons.size();j++){\n\t\t\t\t\t\t\t\tElement son = addAttribute(\"son\",sons.get(j).getId()+\"\", document);//inside this element created in the node we add all its sons as attributes\n\t\t\t\t\t\t\t\tnode.appendChild(son);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement label = addAttribute(\"label\", artifact.getText()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(label);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement age = addAttribute(\"age\", artifact.getAge()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(age);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement type = addAttribute(\"type\", artifact.getType()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(type);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement information = addAttribute(\"information\", artifact.getInformation()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(information);\n\t\t\t\t\t\t\n\t\t\t\t\t\tElement position = addAttribute(\"position\", artifact.getPosition()+\"\", document);\n\t\t\t\t\t\tnode.appendChild(position);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// creating and writing to xml file \n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance(); \n\t\t\tTransformer transformer = transformerFactory.newTransformer(); \n\t\t\tDOMSource domSource = new DOMSource(document); \n\t\t\tStreamResult streamResult = new StreamResult(new File(xml)); \n\t\t\ttransformer.transform(domSource, streamResult);\n \n \n }catch(Exception e){\n \tLog.v(\"error writing xml\",e.toString());\n }\n\t\t\n\t\t\n\t}", "void save() throws IOException, ParserConfigurationException, TransformerConfigurationException;", "private void exportTreeML()\r\n {\r\n // Create the file filter.\r\n// SimpleFileFilter[] filters = new SimpleFileFilter[] {\r\n// new SimpleFileFilter(\"xml\", \"Tree ML (*.xml)\")\r\n// };\r\n// \r\n// // Save the file.\r\n// String file = openFileChooser(false, filters);\r\n// \r\n// // Write the file.\r\n// if (file != null)\r\n// {\r\n// String extension = file.substring(file.length() - 4);\r\n// if (!extension.equals(\".xml\")) file = file + \".xml\";\r\n// Writer.writeTreeML(m_gtree, file);\r\n// }\r\n }", "protected static void writeXML(String path, String ID, String abs,String cls) {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder dBuilder;\r\n try {\r\n dBuilder = dbFactory.newDocumentBuilder();\r\n Document doc = dBuilder.newDocument();\r\n //add elements to Document\r\n Element rootElement =doc.createElement(\"Data\");\r\n //append root element to document\r\n doc.appendChild(rootElement);\r\n\r\n rootElement.appendChild(getReviewsPositive(doc, ID, abs,cls));\r\n //for output to file, console\r\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n Transformer transformer = transformerFactory.newTransformer();\r\n //for pretty print\r\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n DOMSource source = new DOMSource(doc);\r\n\r\n //write to console or file\r\n StreamResult console = new StreamResult(System.out);\r\n StreamResult file = new StreamResult(new File(path+\"\"+ID+\".xml\"));\r\n\r\n //write data\r\n transformer.transform(source, console);\r\n transformer.transform(source, file);\r\n //System.out.println(\"DONE\");\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\t}", "protected void runXmlScript(String script, String scriptUrl) throws Throwable {\n XmlPullParser parser = new KXmlParser();\n \n try {\n ByteArrayInputStream is = new ByteArrayInputStream(script.getBytes(\"UTF-8\"));\n parser.setInput(is, \"UTF-8\");\n \n // Begin parsing\n nextSkipSpaces(parser);\n // If the first tag is not the SyncML start tag, then this is an\n // invalid message\n require(parser, parser.START_TAG, null, \"Script\");\n nextSkipSpaces(parser);\n // Keep track of the nesting level depth\n nestingDepth++;\n \n String currentCommand = null;\n boolean condition = false;\n boolean evaluatedCondition = false;\n Vector args = null;\n \n boolean ignoreCurrentScript = false;\n boolean ignoreCurrentBranch = false;\n \n while (parser.getEventType() != parser.END_DOCUMENT) {\n \n // Each tag here is a command. All commands have the same\n // format:\n // <Command>\n // <Arg>arg1</Arg>\n // <Arg>arg2</Arg>\n // </Command>\n //\n // The only exception is for conditional statements\n // <Condition>\n // <If>condition</If>\n // <Then><command>...</command></Then>\n // <Else><command>...</command>/Else>\n // </Condition>\n \n if (parser.getEventType() == parser.START_TAG) {\n String tagName = parser.getName();\n \n if (\"Condition\".equals(tagName)) {\n condition = true;\n } else if (\"If\".equals(tagName)) {\n // We just read the \"<If>\" tag, now we read the rest of the condition\n // until the </If>\n nextSkipSpaces(parser);\n evaluatedCondition = evaluateCondition(parser);\n nextSkipSpaces(parser);\n require(parser, parser.END_TAG, null, \"If\");\n } else if (\"Then\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (!evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else if (\"Else\".equals(tagName)) {\n if (!condition) {\n throw new ClientTestException(\"Syntax error: found Then tag without Condition\");\n }\n if (evaluatedCondition) {\n ignoreCurrentBranch = true;\n }\n } else {\n if (currentCommand == null) {\n currentCommand = tagName;\n args = new Vector();\n Log.trace(TAG_LOG, \"Found command \" + currentCommand);\n } else {\n // This can only be an <arg> tag\n if (\"Arg\".equals(tagName)) {\n parser.next();\n \n // Concatenate all the text tags until the end\n // of the argument\n StringBuffer arg = new StringBuffer();\n while(parser.getEventType() == parser.TEXT) {\n arg.append(parser.getText());\n parser.next();\n }\n String a = arg.toString().trim();\n Log.trace(TAG_LOG, \"Found argument \" + a);\n a = processArg(a);\n args.addElement(a);\n require(parser, parser.END_TAG, null, \"Arg\");\n }\n }\n }\n } else if (parser.getEventType() == parser.END_TAG) {\n String tagName = parser.getName();\n if (\"Condition\".equals(tagName)) {\n condition = false;\n currentCommand = null;\n ignoreCurrentBranch = false;\n } else if (tagName.equals(currentCommand)) {\n try {\n Log.trace(TAG_LOG, \"Executing accumulated command: \" + currentCommand + \",\" + ignoreCurrentScript + \",\" + ignoreCurrentBranch);\n if ((!ignoreCurrentScript && !ignoreCurrentBranch) || \"EndTest\".equals(currentCommand)) {\n runCommand(currentCommand, args);\n }\n } catch (IgnoreScriptException ise) {\n // This script must be ignored\n ignoreCurrentScript = true;\n nestingDepth = 0;\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SKIPPED);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n } catch (Throwable t) {\n \n Log.error(TAG_LOG, \"Error running command\", t);\n \n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Error \" + t.toString() + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n \n if (stopOnFailure) {\n throw t;\n } else {\n ignoreCurrentScript = true;\n nestingDepth = 0;\n }\n }\n currentCommand = null;\n } else if (\"Script\".equals(tagName)) {\n // end script found\n \n \n // If we get here and the current script is not being\n // ignored, then the execution has been successful\n if (!ignoreCurrentScript) {\n if (testKeys.get(scriptUrl) == null) {\n // This test is not a utility test, save its\n // status\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.SUCCESS);\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n }\n }\n \n if (nestingDepth == 0 && ignoreCurrentScript) {\n // The script to be ignored is completed. Start\n // execution again\n ignoreCurrentScript = false;\n }\n }\n }\n nextSkipSpaces(parser);\n }\n } catch (Exception e) {\n // This will block the entire execution\n TestStatus status = new TestStatus(scriptUrl);\n status.setStatus(TestStatus.FAILURE);\n status.setDetailedError(\"Syntax error in file \" + scriptUrl + \" at line \" + parser.getLineNumber());\n testResults.addElement(status);\n testKeys.put(scriptUrl, status);\n Log.error(TAG_LOG, \"Error parsing command\", e);\n throw new ClientTestException(\"Script syntax error\");\n }\n }", "private void save() throws FileNotFoundException {\n\t\tm.write(new FileOutputStream(OUTPUT), \"RDF/XML\");\n\t}", "int writeTo(OutputStream out, boolean withXmlDecl, Charset enc) throws IOException;", "public final void toFile(final File xmlFile) throws IOException {\n if (xmlFile == null) throw new FileNotFoundException(\"file is null\");\n\n PrintWriter pw = new PrintWriter(new FileWriter(xmlFile));\n pw.print(toString());\n pw.close();\n }", "String toXmlString() throws IOException;", "public void createModuleGeneratedXMLPath() {\n\t\tString[] onlyFolderNames = new String[] {\n\t\t\tmInstance.getModuleGeneratedXMLPath(),\n\t\t\tmModuleName\n\t\t};\n\t\t\n\t\tmModuleGeneratedXMLPath = StringUtils.makeFilePath (onlyFolderNames, false);\n\t}", "public void saveAsXML(String fname) {\n\tXMLUtil.writeXML(saveAsXML(), fname);\n }", "public void EjecutarXML(String path)\n {\n for(ArrayList<NodoXML> l : listaxml)\n {\n for(NodoXML n : l)\n {\n n.ejecutar(this);\n }\n }\n \n /*Ahora las importaciones*/\n// for(ArrayList<NodoXML> l : singlenton.listaAST)\n for(int cont = 0; cont<singlenton.listaAST.size(); cont++)\n {\n ArrayList<NodoXML> l = singlenton.listaAST.get(cont);\n for(NodoXML n : l)\n {\n n.ejecutar(this);\n }\n } \n \n mostrarTraduccion(path);\n }", "public void toXML(PrintWriter pw) {\n pw.println(\"<crontabentry>\");\n pw.println(\"<id>\" + id + \"</id> \");\n pw.println(\"<classname>\" + className + \"</classname> \");\n pw.println(\"<methodname>\" + methodName + \"</methodname> \");\n if (bextraInfo) {\n for (int i = 0; i < extraInfo.length; i++) {\n pw.println(\"<extrainfo parameter = \\\"\" + i + \"\\\" >\");\n pw.println(extraInfo[i] + \" </extrainfo>\");\n }\n }\n pw.println(\"<calendar>\" + cal + \" </calendar>\");\n pw.println(\"<timemillis>\" + timeMillis + \"</timemillis> \");\n pw.println(\"</crontabentry>\");\n }", "private static void createFile(String fileType) throws Exception {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\");\n LocalDateTime now = LocalDateTime.now();\n File xmlFile = new File(System.getProperty(\"user.dir\")+\"/data/saved/\"+dtf.format(now) + fileType + \".xml\");\n OutputFormat out = new OutputFormat();\n out.setIndent(5);\n FileOutputStream fos = new FileOutputStream(xmlFile);\n XML11Serializer serializer = new XML11Serializer(fos, out);\n serializer.serialize(xmlDoc);\n\n }", "public void dump( Result out ) throws JAXBException;", "public static void save() {\n Game.save(UI.askNgetString(\"Filename for this save file?\")+\".xml\");\n }", "public static boolean exportToXML() {\n\t\ttry {\n\t\t\tDocument doc = new Document();\n\t\t\tdoc.setRootElement(new Element(\"Transactions\"));\n\n\t\t\tFile file = new File(Consts.XML_EXPORT_FILE_PATH);\n\t\t\tfile.getParentFile().mkdirs();\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\n\t\t\tArrayList<Transaction> trans = BlockTransLogic.getInstance().getTrans();\n\n\t\t\tfor (Transaction t : trans) {\n\t\t\t\tif (t.getStatus().equals(E_TransStatus.Executed)) {\n\t\t\t\t\tElement element = new Element(\"Transaction\");\n\t\t\t\t\telement.setAttribute(\"ID\", String.valueOf(t.getID()));\n\t\t\t\t\telement.setAttribute(\"Size\", String.valueOf(t.getSize()));\n\t\t\t\t\telement.setAttribute(\"Type\", (t.getType() == null ? \"\" : t.getType().toString()));\n\t\t\t\t\telement.setAttribute(\"Fee\", String.valueOf(t.getFee()));\n\t\t\t\t\telement.setAttribute(\"Status\", (t.getStatus().toString()));\n\t\t\t\t\telement.setAttribute(\"ExecutaionDate\", t.getAdditionDate().toString());\n\t\t\t\t\tdoc.getRootElement().addContent(element);\n\t\t\t\t}\n\t\t\t}\n\t\t\tXMLOutputter xmlOutputter = new XMLOutputter(Format.getPrettyFormat());\n\t\t\txmlOutputter.output(doc, new FileOutputStream(file));\n\n\t\t\tSystem.out.println(\"Exported To XML XDXD\");\n\t\t\treturn true;\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public void convert(String inFile, String outFile) throws IOException, JAXBException;", "public abstract void saveLocationXml(Location location);", "Element toXML();", "public String generatedXmlFile(Document doc){\n\t\tStringWriter sw = new StringWriter();\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\r\n\t\t\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\r\n\t\t\t\t\tTransformer transformer = tf.newTransformer();\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\r\n\r\n\t\t\t\t\ttransformer.transform(new DOMSource(doc), new StreamResult(sw));\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tthrow new RuntimeException(\"Error converting to String\", ex);\r\n\t\t\t\t}\r\n\t\t\t\treturn sw.toString();\r\n\t}", "@Test\n public void example9() throws Exception { \n example6();\n File f = File.createTempFile(\"agraph-test\", \".rdf\");\n FileWriter out = new FileWriter(f);\n println(\"export to \" + f.getCanonicalFile());\n conn.exportStatements(null, RDF.TYPE, null, false, new RDFXMLWriter(out));\n close(out);\n assertFiles(new File(\"src/test/tutorial-test9-expected.rdf\"), f);\n f.delete(); // delete if success\n }", "public static void main(String[] args) throws SAXException, IOException, ParserConfigurationException {\n\t\tcheckwithnodesxmltoexcel excl= new checkwithnodesxmltoexcel();\n\t\texcl.xmltoexcelfile();\n\n\t}", "void createNewScriptFile(String scriptContent) {\n String fileName = prop.getProperty(\"FileName\");\n try {\n // Assume default encoding.\n FileWriter fileWriter = new FileWriter(fileName);\n // Always wrap FileWriter in BufferedWriter.\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n // Note that write() does not automatically append a newline character.\n bufferedWriter.write(scriptContent);\n // Always close files.\n bufferedWriter.close();\n } catch (IOException ex) {\n System.out.println(\"Error writing to file '\" + fileName + \"'\");\n }\n }", "public void writeDocumentToOutput() {\n log.debug(\"Statemend of XML document...\");\r\n // writeDocumentToOutput(root,0);\r\n log.debug(\"... end of statement\");\r\n }", "@Test\r\n\tpublic void shouldVerifyXMLExport() throws IOException, JAXBException, URISyntaxException {\n\t\tCriterion criterion = criterionService.getCriterionByClassFieldAndStringValue(Settings.class, \"name\",\r\n\t\t\t\t\"Intersections test\");\r\n\r\n\t\tList<Settings> settList = DAO.findAllWithRestrictions(Settings.class, criterion);\r\n\r\n\t\tassertEquals(1, settList.size());\r\n\r\n\t\tSettings setting = settList.get(0);\r\n\r\n\t\tList<SettingsConversion> conversionLines = setting.getConversion();\r\n\t\tassertThat(conversionLines.size()).isGreaterThan(0);\r\n\r\n\t\tSat sat = XMLExporter.exportSettingsConversionPresentationToSF5Format(conversionLines);\r\n\r\n\t\t// http://www.concretepage.com/spring/spring-jaxb-integration-annotation-pretty-print-example-with-jaxb2marshaller\r\n\t\t// try (FileOutputStream fos = new\r\n\t\t// FileOutputStream(\"sf5Jnitoutput.xml\");) {\r\n\t\t// springMarshaller.marshal(sat, new StreamResult(fos));\r\n\t\t// }\r\n\r\n\t\tStringWriter sw = new StringWriter();\r\n\r\n\t\tURL responseFile = ClassLoader.getSystemResource(\"xml/sf5Jnitoutput.xml\");\r\n\t\tassertThat(responseFile).isNotNull();\r\n\r\n\t\tURI uri = responseFile.toURI();\r\n\t\tassertThat(uri).isNotNull();\r\n\r\n\t\tString content = new String(Files.readAllBytes(Paths.get(uri)), Charset.forName(\"UTF-8\"));\r\n\r\n\t\tSat retrievedSat = (Sat) springMarshaller.unmarshal(new StringSource(content));\r\n\t\t// trying to compare resolved Sats.\r\n\t\tassertEquals(retrievedSat, sat);\r\n\r\n\t\t// assertThat(retrievedSat).isEqualTo(sat);\r\n\r\n\t\t// assertThat(retrievedSat.equals(sat)).isTrue();\r\n\r\n\t\t// content = content.replace(\"\\r\\n\\r\\n\", \"\\r\\n\"); // it adds\r\n\t\t// // superfluous\r\n\t\t// // \\r\\n\r\n\t\t//\r\n\t\t// // marshalling sat\r\n\t\t// springMarshaller.marshal(sat, new StreamResult(sw));\r\n\t\t//\r\n\t\t// assertEquals(content, sw.toString());\r\n\r\n\t}", "XmlStringTester(File in) throws Exception {\n\t\txml = Files.readFile(in).toString();\n\t\txml = SchemEditUtils.expandAmpersands(xml);\n\t\tdoc = Dom4jUtils.getXmlDocument(xml);\n\t\tstringWriter = getStringWriter();\n\t}", "public static void writeUAV(){\n System.out.println(\"Writing new UAV\");\n Document dom;\n Element e = null;\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n try {\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n dom = documentBuilder.newDocument();\n Element rootElement = dom.createElement(\"UAV\");\n\n // Create the name tag and write the name data\n e = dom.createElement(\"name\");\n e.appendChild(dom.createTextNode(name.getText()));\n rootElement.appendChild(e);\n\n // Create the weight tag and write the weight data\n e = dom.createElement(\"weight\");\n e.appendChild(dom.createTextNode(weight.getText()));\n rootElement.appendChild(e);\n\n // Create the turn radius tag and write the turn radius data\n e = dom.createElement(\"turn_radius\");\n e.appendChild(dom.createTextNode(turnRadius.getText()));\n rootElement.appendChild(e);\n\n // Create the max incline angle tag and write the max incline angle data\n e = dom.createElement(\"max_incline\");\n e.appendChild(dom.createTextNode(maxIncline.getText()));\n rootElement.appendChild(e);\n\n // Create the battery type tag and write the battery type data\n e = dom.createElement(\"battery\");\n e.appendChild(dom.createTextNode(battery.getText()));\n rootElement.appendChild(e);\n\n // Create the battery capacity tag and write the battery capacity data\n e = dom.createElement(\"battery_capacity\");\n e.appendChild(dom.createTextNode(batteryCapacity.getText()));\n rootElement.appendChild(e);\n\n dom.appendChild(rootElement);\n\n // Set the transforms to make the XML document\n Transformer tr = TransformerFactory.newInstance().newTransformer();\n tr.setOutputProperty(OutputKeys.INDENT,\"yes\");\n tr.setOutputProperty(OutputKeys.METHOD,\"xml\");\n tr.setOutputProperty(OutputKeys.ENCODING,\"UTF-8\");\n //tr.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"uav.dtd\");\n tr.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\",\"4\");\n\n // Write the data to the file\n tr.transform(new DOMSource(dom),new StreamResult(\n new FileOutputStream(\"src/uavs/\"+name.getText()+\".uav\")));\n\n }catch (IOException | ParserConfigurationException | TransformerException ioe){\n ioe.printStackTrace();\n // If error, show dialog box with the error message\n // If error, show dialog box with the error message\n Dialog.showDialog(\"Unable to write to write camera settings.\\n\\n\" +\n \"Ensure that \" + path + \" is visible by the application.\",\"Unable to write settings\");\n }\n }", "public void writeXML(OutputStream stream) throws IOException {\n\t\tPrintWriter out = new PrintWriter(stream);\n\t\tout.println(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tout.println(\"<VLDocking version=\\\"2.1\\\">\");\n\t\tfor(int i = 0; i < desktops.size(); i++) {\n\t\t\tWSDesktop desktop = (WSDesktop) desktops.get(i);\n\t\t\tdesktop.writeDesktopNode(out);\n\t\t}\n\t\tout.println(\"</VLDocking>\");\n\n\t\tout.flush();\n\t}", "private void printFile(Products print, String ufilename) {\n\t\tFile file = new File(\"output\"+File.separator+ufilename+fileId+\".xml\"); \n\t\tSystem.out.println(\"Exporting : \"+ file);\n\t\tJAXBContext jaxbContext;\n\t\ttry {\n\t\t\tjaxbContext = JAXBContext.newInstance(Products.class); \n\t\t\tMarshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);\n\t\t\tjaxbMarshaller.setProperty(\"com.sun.xml.internal.bind.xmlHeaders\", \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE);\n\t\t\tjaxbMarshaller.marshal(print, file); // prints the file\n\t\t\t// \t\t jaxbMarshaller.marshal(products, System.out);\n\t\t} catch (JAXBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void saveAs() {\n writeFile.Export();\n }", "public void transform(Node source, String outputFileName) throws Exception {\n FileOutputStream outFS = new FileOutputStream(outputFileName);\n Result result = new StreamResult(outFS);\n myTransformer.transform(new DOMSource(source), result);\n outFS.close();\n }", "public void writeToXmlFile(String xmlFile) {\n\t\twriteToXmlFile(xmlFile, null);\n\t}", "public void writeXML(InvCatalogImpl catalog, String filename) throws IOException {\n BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(filename));\n writeXML(catalog, os, false);\n os.close();\n }", "public void getXml(Writer fileout, boolean saveInvisible)\n\t\t\tthrows IOException {\n\t\tgetXml(fileout, saveInvisible, getRootNode());\n\t}", "public void createXml(String fileName) { \n\t\tElement root = this.document.createElement(\"TSETInfoTables\"); \n\t\tthis.document.appendChild(root); \n\t\tElement metaDB = this.document.createElement(\"metaDB\"); \n\t\tElement table = this.document.createElement(\"table\"); \n\t\t\n\t\tElement column = this.document.createElement(\"column\");\n\t\tElement columnName = this.document.createElement(\"columnName\");\n\t\tcolumnName.appendChild(this.document.createTextNode(\"test\")); \n\t\tcolumn.appendChild(columnName); \n\t\tElement columnType = this.document.createElement(\"columnType\"); \n\t\tcolumnType.appendChild(this.document.createTextNode(\"INTEGER\")); \n\t\tcolumn.appendChild(columnType); \n\t\t\n\t\ttable.appendChild(column);\n\t\tmetaDB.appendChild(table);\n\t\troot.appendChild(metaDB); \n\t\t\n\t\tTransformerFactory tf = TransformerFactory.newInstance(); \n\t\ttry { \n\t\t\tTransformer transformer = tf.newTransformer(); \n\t\t\tDOMSource source = new DOMSource(document); \n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"gb2312\"); \n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\"); \n\t\t\tPrintWriter pw = new PrintWriter(new FileOutputStream(fileName)); \n\t\t\tStreamResult result = new StreamResult(pw); \n\t\t\ttransformer.transform(source, result); \n\t\t\tlogger.info(\"Generate XML file success!\");\n\t\t} catch (TransformerConfigurationException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (IllegalArgumentException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (FileNotFoundException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (TransformerException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}", "private void rewriteXmlSource(){\n //Log.i(LOG_TAG, \"Updating radios.xml....\");\n String fileName = \"radios.xml\";\n String content = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\" +\n \"<playlist>\\n\";\n\n for (Radio radio : radioList) {\n content += \"<track>\\n\";\n content += \"<location>\" + radio.getUrl() + \"</location>\\n\";\n content += \"<title>\" + radio.getName() + \"</title>\\n\";\n content += \"</track>\\n\";\n }\n content += \"</playlist>\";\n\n FileOutputStream outputStream = null;\n try {\n //Log.i(LOG_TAG,\"write new radios.xml file\");\n outputStream = owner.openFileOutput(fileName, owner.getBaseContext().MODE_PRIVATE);\n outputStream.write(content.getBytes());\n outputStream.close();\n } catch (Exception e2) {\n e2.printStackTrace();\n }\n }", "public void outputToFile(String filemame)\n {\n }", "public void saveToFile(final File file) throws IOException, AnalysisConfigurationException;", "public static void main(String argv[])\n {\n\n /* start with blank line */\n System.out.println(\"\");\n\n /* get file from command line */\n File xmlFile = (argv.length > 0)? new File(argv[0]) : null;\n System.out.println(\"Loading XML file: \" + xmlFile);\n\n /* parse/validate XML */\n Document doc = XMLTools.getDocument(xmlFile, true);\n if (doc == null) {\n System.out.println(\"\");\n System.out.println(\"Fatal XML errors found!\");\n System.exit(99);\n }\n \n /* print */\n String xmlStr = XMLTools.nodeToString(doc);\n System.out.println(\"\");\n System.out.println(xmlStr);\n\n }", "public void writeToXML(){\n\t\t\n\t\t String s1 = \"\";\n\t\t String s2 = \"\";\n\t\t String s3 = \"\";\n\t\t Element lastElement= null;\n\t\t\n\t\tDocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dbElement;\n\t\tBufferedReader brRead=null;\n\n\t\ttry{\n\t\t\tdbElement = dbfactory.newDocumentBuilder();\n\t\t\t\n\t\t\t//Create the root\n\t\t\tDocument docRoot = dbElement.newDocument();\n\t\t\tElement rootElement = docRoot.createElement(\"ROYAL\");\n\t\t\tdocRoot.appendChild(rootElement);\n\t\t\t\n\t\t\t//Create elements\n\t\t\t\n\t\t\t//Element fam = docRoot.createElement(\"FAM\");\n\t\t\tElement e= null;\n\t\t\tbrRead = new BufferedReader(new FileReader(\"complet.ged\"));\n\t\t\tString line=\"\";\n\t\t\twhile((line = brRead.readLine()) != null){\n\t\t\t\tString lineTrim = line.trim();\n\t\t\t\tString str[] = lineTrim.split(\" \");\n\t\t\t\t//System.out.println(\"length = \"+str.length);\n\n\t\t\t\tif(str.length == 2){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3 = \"\";\n\t\t\t\t}else if(str.length ==3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2=\"\";\n\n\t\t\t\t\ts2 = str[1];\n//\t\t\t\t\tSystem.out.println(\"s2=\"+s2);\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\ts3 = str[2];\n//\t\t\t\t\ts3 = s[0];\n\t\t\t\t\t\n\t\t\t\t}else if(str.length >3){\n\t\t\t\t\ts1 = str[0];\n\t\t\t\t\ts2 = str[1];\n\t\t\t\t\ts3=\"\";\n\t\t\t\t\tfor(int i =2; i<str.length; i++){\n\t\t\t\t\t\ts3 = s3 + str[i]+ \" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//System.out.println(s1+\"!\"+s2+\"!\"+s3+\"!\");\n\t\t\t\t//Write to file xml\n\t\t\t\t//writeToXML(s1, s2, s3);\n\t\t\t//Element indi = docRoot.createElement(\"INDI\");\t\n\t\t\t//System.out.println(\"Check0 :\" + s1);\n\t\t\tif( Integer.parseInt(s1)==0){\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Check1\");\n\t\t\t\tif(s3.equalsIgnoreCase(\"INDI\")){\n\t\t\t\t\t//System.out.println(\"Check2\");\n\t\t\t\t\tSystem.out.println(\"This is a famille Individual!\");\n\t\t\t\t\te = docRoot.createElement(\"INDI\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t\n\t\t\t\t\t//Set attribute to INDI\n\t\t\t\t\tAttr indiAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tindiAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(indiAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"FAM\")){\n\t\t\t\t\t//System.out.println(\"Check3\");\n\t\t\t\t\tSystem.out.println(\"This is a famille!\");\n\t\t\t\t\te = docRoot.createElement(\"FAM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}if(s2.equalsIgnoreCase(\"HEAD\")){\n\t\t\t\t\tSystem.out.println(\"This is a head!\");\n\t\t\t\t\te = docRoot.createElement(\"HEAD\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\n\t\t\t\t}if(s3.equalsIgnoreCase(\"SUBM\")){\n\n\t\t\t\t\tSystem.out.println(\"This is a subm!\");\n\t\t\t\t\te = docRoot.createElement(\"SUBM\");\n\t\t\t\t\trootElement.appendChild(e);\n\t\t\t\t\t//Set attribute to FAM\n\t\t\t\t\tAttr famAttr = docRoot.createAttribute(\"id\");\n\t\t\t\t\ts2 = s2.substring(1, s2.length()-1);\n\t\t\t\t\tfamAttr.setValue(s2);\n\t\t\t\t\te.setAttributeNode(famAttr);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==1){\n\n\t\t\t\tString child = s2;\n\t\t\t\tif(child.equalsIgnoreCase(\"SOUR\")||child.equalsIgnoreCase(\"DEST\")||child.equalsIgnoreCase(\"DATE\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"FILE\")||child.equalsIgnoreCase(\"CHAR\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"NAME\")||child.equalsIgnoreCase(\"TITL\")||child.equalsIgnoreCase(\"SEX\")||child.equalsIgnoreCase(\"REFN\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"PHON\")||child.equalsIgnoreCase(\"DIV\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"HEAD\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\t\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"BIRT\")||child.equalsIgnoreCase(\"DEAT\")||child.equalsIgnoreCase(\"COMM\")\n\t\t\t\t\t\t||child.equalsIgnoreCase(\"BURI\")||child.equalsIgnoreCase(\"ADDR\")||child.equalsIgnoreCase(\"CHR\")){\n\t\t\t\t\t\n\t\t\t\t\tString name = lastElement.getNodeName();\t\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")||name.equalsIgnoreCase(\"SUBM\")){\t\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\te.setTextContent(s3);\n\t\t\t\t\t\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\tx.setTextContent(s3);\n\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"FAMS\")||child.equalsIgnoreCase(\"FAMC\")){\n\t\t\t\t\tString name = lastElement.getNodeName();\n\t\t\t\t\tif(name.equalsIgnoreCase(\"INDI\")||name.equalsIgnoreCase(\"FAM\")){\t\n\t\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\t\tlastElement = e;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tNode p = e.getParentNode();\n\t\t\t\t\t\t\tElement x= docRoot.createElement(child);\n\t\t\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\t\t\tx.setAttribute(\"id\",s3);\n\t\t\t\t\t\t\tp.appendChild(x);\n\t\t\t\t\t\t\tlastElement = x;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"HUSB\")||child.equalsIgnoreCase(\"WIFE\")||child.equalsIgnoreCase(\"CHIL\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\ts3 = s3.substring(1, s3.length()-1);\n\t\t\t\t\te.setAttribute(\"id\",s3);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t}\n\t\t\t\tif(child.equalsIgnoreCase(\"MARR\")){\n\t\t\t\t\te= docRoot.createElement(child);\n\t\t\t\t\tlastElement.appendChild(e);\n\t\t\t\t\tlastElement = e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(Integer.parseInt(s1)==2){\n\t\t\t\tString lastName = lastElement.getNodeName();\n\t\t\t\tif((lastName.equalsIgnoreCase(\"BIRT\"))||(lastName.equalsIgnoreCase(\"DEAT\"))||(lastName.equalsIgnoreCase(\"BURI\"))\n\t\t\t\t\t\t||(lastName.equalsIgnoreCase(\"MARR\"))||(lastName.equalsIgnoreCase(\"CHR\"))){\n\t\t\t\t\t//Add child nodes to birt, deat or marr\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"DATE\")){\n\t\t\t\t\t\tElement date = docRoot.createElement(\"DATE\");\n\t\t\t\t\t\tdate.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(date);\n\t\t\t\t\t}\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"PLAC\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"PLAC\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(lastName.equalsIgnoreCase(\"COMM\")||lastName.equalsIgnoreCase(\"ADDR\")){\n\t\t\t\t\tif(s2.equalsIgnoreCase(\"CONT\")){\n\t\t\t\t\t\tElement plac = docRoot.createElement(\"CONT\");\n\t\t\t\t\t\tplac.setTextContent(s3);\n\t\t\t\t\t\tlastElement.appendChild(plac);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//lastElement = e;\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\t//Saved this element for the next step\n\t\t\t\n\t\t\t//Write to file\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"iso-8859-1\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\t\t\ttransformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, \"Royal.dtd\");\n\t\t\tDOMSource source = new DOMSource(docRoot);\n\t\t\tStreamResult result = new StreamResult(new File(\"complet.xml\"));\n\t \n\t\t\t// Output to console for testing\n\t\t\t// StreamResult result = new StreamResult(System.out);\t \n\t\t\ttransformer.transform(source, result);\n\t \n\t\t\tSystem.out.println(\"\\nXML DOM Created Successfully.\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void testProXml(){\n\t}", "public void createXMLFileForGatePass(Report report) {\n\t\ttry{\n\t\t\tFile outDir = new File(report.getXmlFilePath()); \n\t\t\tboolean isDirCreated = outDir.mkdirs();\n\t\t\tif (isDirCreated)\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location created.\");\n\t\t\telse\n\t\t\t\tlogger.info(\"In FileUploadDownload class fileUpload() method: upload file folder location already exist.\");\n\t\t\t\n\t\t\tDocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\t\t\t\n\t\t\t// root elements\n\t\t\tDocument doc = docBuilder.newDocument();\n\t\t\tElement rootElement = doc.createElement(\"root\");\n\t\t\tdoc.appendChild(rootElement);\n\t\t\n\t\t\tElement studentList = doc.createElement(\"student\");\n\t\t\trootElement.appendChild(studentList);\n\t\t\t\n\t\t\tElement academicYear = doc.createElement(\"academicYear\");\n\t\t\tacademicYear.appendChild(doc.createTextNode((String) (report.getAcademicYear().getAcademicYearName()!= null ? report.getAcademicYear().getAcademicYearName() : \"\" )));\n\t\t\tstudentList.appendChild(academicYear);\n\t\t\t\t\n\t\t\tElement roll = doc.createElement(\"roll\");\n\t\t\troll.appendChild(doc.createTextNode((report.getReportCode().toString()!=null?report.getReportCode().toString():\"---------\")));\n\t\t\tstudentList.appendChild(roll);\n\t\t\t\n\t\t\tElement studentname = doc.createElement(\"studentname\");\n\t\t\tstudentname.appendChild(doc.createTextNode((report.getUpdatedBy()!=null?report.getUpdatedBy():\"---------------\")));\n\t\t\tstudentList.appendChild(studentname);\n\t\t\t\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\t\t\n\t\t\tStreamResult result = new StreamResult(new File(report.getXmlFilePath()+report.getXmlFileName()));\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t}catch (ParserConfigurationException pce) {\n\t\t\tpce.printStackTrace();\n\t\t\tlogger.error(\"\",pce);\n\t\t} catch (TransformerException tfe) {\n\t\t\ttfe.printStackTrace();\n\t\t\tlogger.error(tfe);\n\t\t}\n\n\t}", "public void setUpNewXMLFile(File file) {\n\t\tPrintWriter pw = null;\n\t\ttry {\n\t\t\tpw = new PrintWriter(file, \"UTF-8\");\n\t\t\tpw.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\\n\");\n\t\t\tpw.write(\"<\" + defaultDocumentElement + \">\\n\");\n\t\t\tpw.write(\"</\" + defaultDocumentElement + \">\\n\");\n\t\t\tpw.close();\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Error creating new XML File.\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tpw.close();\n\t\t\t} catch(Exception e) {\n\t\t\t\t//Seems like it was already closed.\n\t\t\t}\n\t\t}\n\t}", "public void writeXML(OutputStream stream) throws IOException {\n\t\tPrintWriter out = new PrintWriter(stream);\n\t\tout.println(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tout.println(\"<VLToolBars version=\\\"1.0\\\">\");\n\t\txmlWriteContainer(out);\n\n\t\tout.println(\"</VLToolBars>\");\n\t\tout.flush();\n\t}", "public void saveData(){\n try{\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.newDocument();\n\n Element rootElement = document.createElement(\"departments\");\n document.appendChild(rootElement);\n for (Department department : entities){\n Element dep = document.createElement(\"department\");\n rootElement.appendChild(dep);\n\n dep.setAttribute(\"id\", department.getId().toString());\n dep.appendChild(createElementFromDepartment(\n document, \"name\", department.getName()));\n dep.appendChild(createElementFromDepartment(\n document, \"numberOfPlaces\", department.getNumberOfPlaces().toString()));\n }\n\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(fileName);\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n transformer.transform(domSource, streamResult);\n\n } catch (ParserConfigurationException | TransformerException e) {\n e.printStackTrace();\n }\n }", "void addEntry(IvyXmlWriter xw) \n{\n xw.begin(\"USERFILE\");\n xw.field(\"NAME\",access_name);\n xw.field(\"JARNAME\",context_name);\n xw.field(\"ACCESS\",file_mode);\n xw.end(\"USERFILE\");\n}", "public void testXML() {\n // check XML Entity Catalogs\n\n // \"Tools\"\n String toolsItem = Bundle.getStringTrimmed(\"org.netbeans.core.ui.resources.Bundle\", \"Menu/Tools\"); // NOI18N\n // \"DTDs and XML Schemas\"\n String dtdsItem = Bundle.getStringTrimmed(\"org.netbeans.modules.xml.catalog.Bundle\", \"LBL_CatalogAction_Name\");\n new Action(toolsItem + \"|\" + dtdsItem, null).perform();\n // \"DTDs and XML Schemas\"\n String dtdsTitle = Bundle.getString(\"org.netbeans.modules.xml.catalog.Bundle\", \"LBL_CatalogPanel_Title\");\n NbDialogOperator dtdsOper = new NbDialogOperator(dtdsTitle);\n\n String publicID = \"-//DTD XMLCatalog//EN\";\n Node catalogNode = new Node(new JTreeOperator(dtdsOper),\n \"NetBeans Catalog|\"\n + publicID);\n // view and close it\n new ViewAction().perform(catalogNode);\n new EditorOperator(publicID).close();\n dtdsOper.close();\n\n // create an XML file\n\n // create xml package\n // select Source Packages to not create xml folder in Test Packages\n new SourcePackagesNode(SAMPLE_PROJECT_NAME).select();\n // \"Java Classes\"\n String javaClassesLabel = Bundle.getString(\"org.netbeans.modules.java.project.Bundle\", \"Templates/Classes\");\n NewJavaFileWizardOperator.create(SAMPLE_PROJECT_NAME, javaClassesLabel, \"Java Package\", null, \"xml\"); // NOI18N\n Node xmlNode = new Node(new SourcePackagesNode(SAMPLE_PROJECT_NAME), \"xml\"); //NOI18N\n // \"XML\"\n String xmlCategory = Bundle.getString(\"org.netbeans.api.xml.resources.Bundle\", \"Templates/XML\");\n // \"XML Document\"\n String xmlDocument = Bundle.getString(\"org.netbeans.modules.xml.resources.Bundle\", \"Templates/XML/XMLDocument.xml\");\n NewFileWizardOperator.invoke(xmlNode, xmlCategory, xmlDocument);\n NewJavaFileNameLocationStepOperator nameStepOper = new NewJavaFileNameLocationStepOperator();\n nameStepOper.setObjectName(\"XMLDocument\"); // NOI18N\n nameStepOper.next();\n nameStepOper.finish();\n // wait node is present\n Node xmlDocumentNode = new Node(xmlNode, \"XMLDocument.xml\"); // NOI18N\n // wait xml document is open in editor\n new EditorOperator(\"XMLDocument.xml\").close(); // NOI18N\n\n // \"Check XML\"\n\n String checkXMLItem = Bundle.getStringTrimmed(\"org.netbeans.modules.xml.tools.actions.Bundle\", \"NAME_Check_XML\");\n // invoke context action to check xml\n new Action(null, checkXMLItem).perform(xmlDocumentNode);\n // \"XML check\"\n String xmlCheckTitle = Bundle.getString(\"org.netbeans.modules.xml.actions.Bundle\", \"TITLE_XML_check_window\");\n // find and close an output with the result of xml check\n new OutputTabOperator(xmlCheckTitle).close();\n\n // \"Validate XML\"\n\n String validateItem = Bundle.getStringTrimmed(\"org.netbeans.modules.xml.tools.actions.Bundle\", \"NAME_Validate_XML\");\n // invoke context action to validate xml\n new Action(null, validateItem).perform(xmlDocumentNode);\n // find and close an output with the result of xml validation\n new OutputTabOperator(xmlCheckTitle).close();\n\n // \"Generate DTD...\"\n\n String generateDTDItem = Bundle.getStringTrimmed(\"org.netbeans.modules.xml.tools.generator.Bundle\", \"PROP_GenerateDTD\");\n new ActionNoBlock(null, generateDTDItem).perform(xmlDocumentNode);\n // \"Select File Name\"\n String selectTitle = Bundle.getString(\"org.netbeans.modules.xml.tools.generator.Bundle\", \"PROP_fileNameTitle\");\n NbDialogOperator selectDialog = new NbDialogOperator(selectTitle);\n // name has to be set because of issue http://www.netbeans.org/issues/show_bug.cgi?id=46049\n new JTextFieldOperator(selectDialog).setText(\"DTD\");\n String oKLabel = Bundle.getString(\"org.netbeans.core.windows.services.Bundle\", \"OK_OPTION_CAPTION\");\n new JButtonOperator(selectDialog, oKLabel).push();\n // wait DTD is open in editor\n new EditorOperator(\"DTD.dtd\").close(); // NOI18N\n Node dtdNode = new Node(xmlNode, \"DTD.dtd\"); // NOI18N\n\n // \"Check DTD\"\n\n String checkDTDItem = Bundle.getStringTrimmed(\"org.netbeans.modules.xml.tools.actions.Bundle\", \"NAME_Validate_DTD\");\n new Action(null, checkDTDItem).perform(dtdNode);\n // find and close an output with the result of dtd check\n new OutputTabOperator(xmlCheckTitle).close();\n\n // \"Generate DOM Tree Scanner\"\n String generateScannerItem = Bundle.getStringTrimmed(\"org.netbeans.modules.xml.tools.generator.Bundle\", \"PROP_GenerateDOMScanner\");\n new ActionNoBlock(null, generateScannerItem).perform(dtdNode);\n selectDialog = new NbDialogOperator(selectTitle);\n new JButtonOperator(selectDialog, oKLabel).push();\n // wait Scanner is open in editor\n new EditorOperator(\"DTDScanner.java\").close(); // NOI18N\n new Node(xmlNode, \"DTDScanner.java\"); // NOI18N\n }", "public void writeToFile(String fileName, String xml) {\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(fileName));\n\t\t\tbw.write(xml);\n\t\t\tbw.close();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void dump(String filename, ISOLayout layout) {\r\n System.out.println(xml(filename, layout));\r\n }", "void toXml(OutputStream out, boolean format) throws IOException;", "protected void actionPerformedExport ()\n {\n Preferences root = Preferences.userRoot ();\n Preferences node = root.node (OpenMarkovPreferences.OPENMARKOV_NODE_PREFERENCES);\n System.out.println (\"Export selected\");\n if (chooser.showSaveDialog (PreferencesDialog.this) == JFileChooser.APPROVE_OPTION)\n {\n try\n {\n OutputStream out = new FileOutputStream (chooser.getSelectedFile ());\n node.exportSubtree (out);\n out.close ();\n }\n catch (Exception e)\n {\n e.printStackTrace ();\n JOptionPane.showMessageDialog (this, stringDatabase.getString (e.getMessage ()),\n stringDatabase.getString (e.getMessage ()),\n JOptionPane.ERROR_MESSAGE);\n }\n }\n }", "public void output(IvyXmlWriter xw,S6SolutionSet ss)\n{\n xw.begin(\"SOLUTION\");\n String code = formatted_code;\n if (code == null) {\n code = getFragment().getFinalText(ss.getSearchType());\n\n }\n formatted_code = null;\n\n// if (code.contains(\"]]>\") || code.contains(\"<![\")) xw.textElement(\"CODE\",code);\n if (code.contains(\"]]>\")) xw.textElement(\"CODE\",code);\n else xw.cdataElement(\"CODE\",code);\n xw.textElement(\"SOLSRC\",for_source.getName());\n xw.textElement(\"NAME\",for_source.getDisplayName());\n xw.textElement(\"LICENSE\",for_source.getLicenseUid());\n\n xw.begin(\"COMPLEXITY\");\n xw.field(\"LINES\",getCodeLines(code));\n xw.field(\"CODE\",getFragment().getCodeComplexity());\n S6TestResults tr = getFragment().getTestResults();\n if (tr != null) xw.field(\"TESTTIME\",tr.getRequiredTime());\n xw.end(\"COMPLEXITY\");\n\n if (transform_set != null) {\n xw.begin(\"TRANSFORMS\");\n for (S6Transform.Memo m : transform_set) {\n\t xw.textElement(\"TRANSFORM\",m.getTransformName());\n }\n xw.end(\"TRANSFORMS\");\n }\n\n xw.end(\"SOLUTION\");\n}", "public void close(){\r\n Transformer t = null;\r\n\t\ttry {\r\n\t\t\tt = TransformerFactory.newInstance().newTransformer();\r\n\t\t\tt.setOutputProperty(OutputKeys.METHOD, \"xml\");\r\n\t\t\tt.setOutputProperty(OutputKeys.INDENT, \"yes\"); \r\n\t\t\tt.transform(new DOMSource(document), new StreamResult(new FileOutputStream(XMLFileName))); \t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public void save(File f) {\n\t\tif (f.exists()) {\r\n\t\t\tString filename = f.getName();\r\n\t\t\tString backName;\r\n\t\t\tif (filename.contains(\".\")) {\r\n\t\t\t\tbackName = filename.substring(0,filename.lastIndexOf('.'));\r\n\t\t\t\tbackName += \"_backup\";\r\n\t\t\t\tbackName += filename.substring(filename.lastIndexOf('.'));\r\n\t\t\t} else {\r\n\t\t\t\tbackName = filename + \"_backup\";\r\n\t\t\t}\r\n\t\t\tFile back = new File(f.getParent(),backName);\r\n\t\t\tSystem.out.println(\"Writing backup to: \"+back.getAbsolutePath());\r\n\t\t\tif (back.exists()) back.delete();\r\n\t\t\tFile newF = f;\r\n\t\t\tf.renameTo(back);\r\n\t\t\tf = newF;\r\n\t\t}\r\n\r\n\t\tFileOutputStream outputStream = null;\r\n\t\ttry {\r\n\t\t\tDocument doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();\r\n//\t\t\tb.append(\"<Map xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:noNamespaceSchemaLocation=\\\"map.xsd\\\">\");\r\n//\t\t\tProcessingInstruction pi = doc.createProcessingInstruction(\"xml-stylesheet\", \"type=\\\"text/xsl\\\" href=\\\"/assistantdm/static/CharacterSheetTemplate.xsl\\\"\");\r\n//\t\t\tdoc.appendChild(pi);\r\n\t\t\tXMLMapExporter processor = new XMLMapExporter(doc);\r\n\t\t\tmapPanel.executeProcess(processor);\r\n\t\t\tdoc.setXmlStandalone(true);\r\n\r\n\t\t\tTransformer trans = TransformerFactory.newInstance().newTransformer();\r\n\t\t\ttrans.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\ttrans.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\r\n\t\t\ttrans.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\r\n\t\t\toutputStream = new FileOutputStream(f);\r\n\t\t\ttrans.transform(new DOMSource(doc), new StreamResult(outputStream));\r\n\t\t\tmapPanel.modified = false;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tif (outputStream != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\toutputStream.close();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void saveXML(String path,\n SourceParameters parameters)\n throws SAXException, ProcessingException, IOException {\n if (this.saveResource == null) {\n throw new ProcessingException(\"The context \" + this.name + \" does not support saving.\");\n }\n DocumentFragment frag = this.getXML(path);\n if (frag == null) {\n // create empty fake document\n frag = DOMUtil.createDocument().createDocumentFragment();\n }\n\n XMLUtil.writeDOM(this.saveResource,\n null,\n parameters,\n frag,\n this.resolver,\n \"xml\");\n }", "public void createFirstXmlFile(ArrayList<Entry> entityList);", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "private void saveFitex(){\n Element pds = getPDS() ;\n JFileChooser aFileChooser = new JFileChooser();\n aFileChooser.setFileFilter(new MyFileFilterXML());\n if (lastUsedFile != null){\n aFileChooser.setCurrentDirectory(lastUsedFile.getParentFile());\n aFileChooser.setSelectedFile(lastUsedFile);\n }else{\n File file = new File(aFileChooser.getCurrentDirectory(), dataset.getName()+\".xml\");\n aFileChooser.setSelectedFile(file);\n }\n int r = aFileChooser.showSaveDialog(this);\n if (r == JFileChooser.APPROVE_OPTION){\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\n File file = aFileChooser.getSelectedFile();\n if(!MyUtilities.isXMLFile(file)){\n file = MyUtilities.getXMLFile(file);\n }\n lastUsedFile = file;\n OutputStreamWriter fileWriter = null;\n try{\n fileWriter = new OutputStreamWriter(new FileOutputStream(file), \"utf-8\");\n\t\txmlOutputter.output(pds, fileWriter);\n datasetModif = false;\n dataProcessToolPanel.logSaveDataset(dataset);\n }catch (IOException e){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_SAVE\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }finally{\n if (fileWriter != null){\n try{\n fileWriter.close();\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }catch (IOException e){\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_SAVE\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n }\n }\n }\n }", "public String toXML() {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter, true);\n toXML(printWriter);\n return stringWriter.toString();\n }" ]
[ "0.6168482", "0.6129763", "0.61245847", "0.6119861", "0.60914516", "0.6088731", "0.5909971", "0.59038615", "0.5891314", "0.5889447", "0.58502513", "0.58251756", "0.57546276", "0.5748819", "0.5687903", "0.5657584", "0.5649611", "0.56421906", "0.5609379", "0.55974567", "0.5594077", "0.5580247", "0.55744886", "0.55744886", "0.55744886", "0.55639505", "0.5555536", "0.55164903", "0.54772836", "0.54489183", "0.54330677", "0.54098606", "0.54044974", "0.53942645", "0.53647405", "0.534722", "0.5333686", "0.5318061", "0.5301379", "0.5290964", "0.5288339", "0.5268422", "0.52646023", "0.5250246", "0.5217651", "0.5208564", "0.5205572", "0.5204294", "0.5176479", "0.51646245", "0.51593226", "0.5148357", "0.5146782", "0.51420194", "0.51334065", "0.5124264", "0.51141983", "0.5113549", "0.5106808", "0.51064056", "0.510429", "0.510342", "0.5101631", "0.5097277", "0.5096448", "0.5085579", "0.5081934", "0.5081384", "0.5073105", "0.50654894", "0.50622153", "0.5060794", "0.505192", "0.5049568", "0.5039915", "0.5038933", "0.50347316", "0.5021709", "0.5020045", "0.50196016", "0.5017549", "0.5012869", "0.50116533", "0.5009192", "0.5005742", "0.49977896", "0.4996047", "0.4995481", "0.49942365", "0.49896193", "0.49844658", "0.4974526", "0.4970465", "0.49430183", "0.49406588", "0.4933805", "0.49304938", "0.4920249", "0.49064356", "0.49044147" ]
0.6454647
0
Prepare for saving migration script.
protected void prepare4SaveScript() { MigrationConfiguration cfg = getMigrationWizard().getMigrationConfig(); cfg.cleanNoUsedConfigForStart(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void resetTestDatabase() {\n String URL = \"jdbc:mysql://localhost:3306/?serverTimezone=CET\";\n String USER = \"fourthingsplustest\";\n\n InputStream stream = UserStory1Test.class.getClassLoader().getResourceAsStream(\"init.sql\");\n if (stream == null) throw new RuntimeException(\"init.sql\");\n try (Connection conn = DriverManager.getConnection(URL, USER, null)) {\n conn.setAutoCommit(false);\n ScriptRunner runner = new ScriptRunner(conn);\n runner.setStopOnError(true);\n runner.runScript(new BufferedReader(new InputStreamReader(stream)));\n conn.commit();\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n System.out.println(\"Done running migration\");\n }", "protected abstract void finalizeMigration();", "protected void exportScriptToFile() {\n\t\ttry {\n\t\t\tfinal MigrationConfiguration cfg = getMigrationWizard()\n\t\t\t\t\t.getMigrationConfig();\n\t\t\tprepare4SaveScript();\n\t\t\tExportScriptDialog.exportScript(cfg, isSaveSchema());\n\t\t} catch (Exception e) {\n\t\t\t// MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n\t\t\t// Messages.msgWarning, Messages.setOptionPageErrMsg);\n\t\t}\n\t}", "private void saveBeforeRun() {\n if ( _helper != null && _settings.getSaveBeforeRun() )\n _helper.saveBeforeRun();\n }", "public void startMigrating();", "public void prepare() {\n\t}", "public void prepare() {\n this.taskHandler.run(this::inlinePrepare);\n }", "@Override\n protected void doPrepare()\n {\n iwriter.prepareToCommit();\n super.doPrepare();\n }", "public void prepare()\n\t{\n\t\tsuper.prepare();\n\t}", "public RepositorioPalestraScript(Context ctx) {\n\t\t// Criar utilizando um script SQL\n\t\tdbHelper = new SQLiteHelper(ctx, RepositorioPalestraScript.NOME_BANCO, RepositorioPalestraScript.VERSAO_BANCO,\n\t\t\t\tRepositorioPalestraScript.SCRIPT_DATABASE_CREATE, RepositorioPalestraScript.SCRIPT_DATABASE_DELETE);\n\n\t\t// abre o banco no modo escrita para poder alterar tamb�m\n\t\tdb = dbHelper.getWritableDatabase();\n\t}", "@Override\n protected void prepare()\n throws CommandException, CommandValidationException {\n Set<ValidOption> opts = new LinkedHashSet<ValidOption>();\n addOption(opts, \"file\", 'f', \"FILE\", false, null);\n printPromptOption =\n addOption(opts, \"printprompt\", '\\0', \"BOOLEAN\", false, null);\n addOption(opts, \"encoding\", '\\0', \"STRING\", false, null);\n addOption(opts, \"help\", '?', \"BOOLEAN\", false, \"false\");\n commandOpts = Collections.unmodifiableSet(opts);\n operandType = \"STRING\";\n operandMin = 0;\n operandMax = 0;\n\n processProgramOptions();\n }", "void PrepareRun() {\n }", "public void saveBeforeCompile() { }", "public void saveBeforeCompile() { }", "protected void setupDB() {\n\t\tlog.info(\"------------------------------------------\");\n\t\tlog.info(\"Initialization database started\");\n\t\tlog.info(\"ddl: db-config.xml\");\n\t\tlog.info(\"------------------------------------------\");\n\t\ttry {\n\t\t\tfinal List<String> lines = Files.readAllLines(Paths.get(this.getClass()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getClassLoader()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getResource(\"create-campina-schema.sql\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toURI()), Charset.forName(\"UTF-8\"));\n\n\t\t\tfinal List<String> statements = new ArrayList<>(lines.size());\n\t\t\tString statement = \"\";\n\t\t\tfor (String string : lines) {\n\t\t\t\tstatement += \" \" + string;\n\t\t\t\tif (string.endsWith(\";\")) {\n\t\t\t\t\tstatements.add(statement);\n\t\t\t\t\tstatement = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry (final Connection con = conManager.getConnection(Boolean.FALSE)) {\n\t\t\t\ttry (final PreparedStatement pstmt = con.prepareStatement(\"DROP SCHEMA IF EXISTS campina\")) {\n\t\t\t\t\tpstmt.executeUpdate();\n\t\t\t\t}\n\t\t\t\tfor (String string : statements) {\n\t\t\t\t\tlog.info(\"Executing ddl: \" + string);\n\t\t\t\t\ttry (final PreparedStatement pstmt = con.prepareStatement(string)) {\n\t\t\t\t\t\tpstmt.executeUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new IllegalStateException(\"Could not setup db\", e);\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tlog.error(\"Could not setup database\", e);\n\t\t\tthrow new IllegalStateException(\"ddl file load failed\", e);\n\t\t}\n\t\tlog.info(\"------------------------------------------\");\n\t\tlog.info(\"Initialization database finished\");\n\t\tlog.info(\"------------------------------------------\");\n\t}", "@Override\n\tpublic void prepare() throws Exception {\n\t\tsuper.prepare();\n\t\t//setto il titolo di pagina:\n\t\tthis.model.setTitolo(\"Storno - Importo\");\n\t}", "@Override\n\tprotected void prepareForSave() throws WorkflowException {\n\n\t}", "File prepareEnvironment();", "public void prepare() {\n // make sure the user didn't hide the sketch folder\n ensureExistence();\n\n current.setProgram(editor.getText());\n\n // TODO record history here\n //current.history.record(program, SketchHistory.RUN);\n\n // if an external editor is being used, need to grab the\n // latest version of the code from the file.\n if (Preferences.getBoolean(\"editor.external\")) {\n // history gets screwed by the open..\n //String historySaved = history.lastRecorded;\n //handleOpen(sketch);\n //history.lastRecorded = historySaved;\n\n // set current to null so that the tab gets updated\n // http://dev.processing.org/bugs/show_bug.cgi?id=515\n current = null;\n // nuke previous files and settings, just get things loaded\n load();\n }\n\n // in case there were any boogers left behind\n // do this here instead of after exiting, since the exit\n // can happen so many different ways.. and this will be\n // better connected to the dataFolder stuff below.\n cleanup();\n\n// // handle preprocessing the main file's code\n// return build(tempBuildFolder.getAbsolutePath());\n }", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "boolean doMigration();", "protected abstract boolean isMigrationNecessary();", "@Override\n\tpublic void prepare() {\n\t\t\n\t}", "@Override\n\tpublic void prepare() {\n\t}", "public abstract void prepare();", "protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\t\n\t\t\tif (name.equals(\"Action\"))\n\t\t\t\tp_Action = para[i].getParameterAsString();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\tp_Hospitalization_ID=getRecord_ID();\n\t}", "public void prepare()\n {\n // First, we assign the payload a new UUID if it does not already have one\n if(getId() == null)\n setId(UUID.randomUUID());\n \n // Set the submission date to now\n setSubmissionDate(new Date());\n }", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "public final void prepareForSaving() {\r\n\t\tbi_image.pack();\r\n\t}", "private void setScriptFormatCorrectly()\n\t{\n\t\tint scriptFormatNeeded = 0;\n\t\tif(isMime(m_databaseFile, GZIP_MAGIC_NUMBERS))\n\t\t{\n\t\t\tm_logger.debug(\"Database is gzipped\");\n\t\t\tscriptFormatNeeded = 3;\n\t\t}\n\t\t\n\t\tboolean propsExists = Files.exists(m_databasePropertiesFile);\n\t\t\n\t\tProperties properties = new Properties();\n\t\ttry {\n\t\t properties.load(new FileInputStream(m_databasePropertiesFile.toFile()));\n\t\t} catch (IOException e) {\n\t\t}\n\t\t\n\t\tproperties.setProperty(\"hsqldb.script_format\", \"\" + scriptFormatNeeded);\n\t\tif(! propsExists) // write other info\n\t\t{\n\t\t\tproperties.setProperty(\"version\",\"2.2.8\");\n\t\t\tproperties.setProperty(\"modified\", \"yes\");\n\t\t}\n\t\t\n\t\t// Write properties file.\n\t\ttry {\n\t\t properties.store(new FileOutputStream(m_databasePropertiesFile.toFile()), null);\n\t\t} catch (IOException e) {\n\t\t}\n\t\t\n\t}", "abstract void prepare();", "String prepareFile();", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (name.equals(\"AD_Client_ID\"))\n\t\t\t\tm_AD_Client_ID = 1000000;\n\t\t\telse if (name.equals(\"AD_Org_ID\"))\n\t\t\t\tm_AD_Org_ID = 1000000;\n\t\t\telse if (name.equals(\"DeleteOldImported\"))\n\t\t\t;//\tm_deleteOldImported = \"Y\".equals(para[i].getParameter());\n\t\t\telse if (name.equals(\"DocAction\"))\n\t\t;//\t\tm_docAction = (String)para[i].getParameter();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t}", "@Override\r\n\tpublic void prepare(Map stormConf, String schedulerLocalDir) {\n\r\n\t}", "void onTaskPrepare();", "public void setup() {\n\t\tif (!new File(plugin.getDataFolder() + path).exists())\r\n\t\t\tnew File(plugin.getDataFolder() + path).mkdir();\r\n\r\n\t\tif (!new File(plugin.getDataFolder() + path, name + \".yml\").exists())\r\n\t\t\ttry {\r\n\t\t\t\tnew File(plugin.getDataFolder() + path, name + \".yml\").createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tplugin.getLogger().log(Level.SEVERE, \"Could not generate \" + name + \".yml\");\r\n\t\t\t}\r\n\t}", "protected void prepare()\n\t{\n\t\tlog.info(\"\");\n\t\tm_ctx = Env.getCtx();\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (name.equals(\"C_BankStatementLoader_ID\"))\n\t\t\t\tm_C_BankStmtLoader_ID = ((BigDecimal)para[i].getParameter()).intValue();\n\t\t\telse if (name.equals(\"FileName\"))\n\t\t\t\tfileName = (String)para[i].getParameter();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\tm_AD_Client_ID = Env.getAD_Client_ID(m_ctx);\n\t\tlog.info(\"AD_Client_ID=\" + m_AD_Client_ID);\n\t\tm_AD_Org_ID = Env.getAD_Org_ID(m_ctx);\n\t\tlog.info(\"AD_Org_ID=\" + m_AD_Org_ID);\n\t\tlog.info(\"C_BankStatementLoader_ID=\" + m_C_BankStmtLoader_ID);\n\t}", "protected void prepare()\r\n\t{\r\n\t\tProcessInfoParameter[] para = getParameter();\r\n\t\tfor (int i = 0; i < para.length; i++)\r\n\t\t{\r\n\t\t\tString name = para[i].getParameterName();\r\n\t\t\tif (name.equals(\"DeleteOldImported\"))\r\n\t\t\t\tp_deleteOldImported = \"Y\".equals(para[i].getParameter());\r\n\t\t\telse if (name.equals(\"IsValidateOnly\"))\r\n\t\t\t\tp_IsValidateOnly = para[i].getParameterAsBoolean();\r\n\t\t\telse\r\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\r\n\t\t}\r\n\r\n\t\tm_AD_Client_ID = getProcessInfo().getAD_Client_ID();\r\n\r\n\t}", "@Before\n public void prepare() {\n MetaStore metadb = prepareTestDB();\n testObj = new SdbSchemeRewriter(metadb.getAllDBs().get(0));\n }", "public void prepare() throws Exception {\n\r\n\t}", "@Before\n public void seedDatabase() {\n final String seedDataScript = loadAsString(\"pacmabooks.sql\");\n\n try (Connection connection = ds.getConnection()) {\n for (String statement : splitStatements(new StringReader(\n seedDataScript), \";\")) {\n connection.prepareStatement(statement).execute();\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n System.out.println(\"--------------------------------------------------- Seeding DID NOT WOKK\");\n e.printStackTrace();\n throw new RuntimeException(\"Failed seeding database\", e);\n }\n System.out.println(\"Seeding works\");\n\n }", "protected void setDDLText() {\n\t\tMigrationConfiguration cfg = getMigrationWizard().getMigrationConfig();\n\t\tif (cfg.sourceIsSQL()) {\n\t\t\tbtnPreviewDDL.setSelection(false);\n\t\t\tbtnPreviewDDL.setEnabled(false);\n\t\t\tswitchText(false);\n\t\t\treturn;\n\t\t}\n\t\ttxtDDL.setText(\"\");\n\t\tprepare4SaveScript();\n\t\tList<Table> tables = new ArrayList<Table>();\n\t\tfinal CUBRIDSQLHelper ddlUtils = CUBRIDSQLHelper.getInstance(null);\n\t\tStringBuffer sbConstrains = new StringBuffer();\n\t\t\n\t\tappendSchemaDDL(cfg);\n\t\t\n\t\tfor (SourceEntryTableConfig setc : cfg.getExpEntryTableCfg()) {\n\n\t\t\tif (!setc.isCreateNewTable()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = null;\n\t\t\t\n\t\t\ttarTbl = cfg.getTargetTableSchema(setc.getTargetOwner(), setc.getTarget());\n\t\t\t\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (setc != null && setc.getComment() != null) {\n\t\t\t\tif (tarTbl.getComment() == null || tarTbl.getComment() != setc.getComment()) {\n\t\t\t\t\ttarTbl.setComment(setc.getComment());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttarTbl.setComment(null);\n\t\t\t}\n\t\t\tfor (Column tarCol : tarTbl.getColumns()) {\n\t\t\t\tSourceColumnConfig sourceCol = setc.getColumnConfigIgnoreCase(tarCol.getName());\n\t\t\t\tif (sourceCol != null && tarCol != null){\n\t\t\t\t\tif (sourceCol.getComment() != null) {\n\t\t\t\t\t\tif (tarCol.getComment() == null || tarCol.getComment() != sourceCol.getComment()){\n\t\t\t\t\t\t\ttarCol.setComment(sourceCol.getComment());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarCol.setComment(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\n\t\t\tfinal PK pk = tarTbl.getPk();\n\t\t\tif (setc.isCreatePK() && pk != null) {\n\t\t\t\tString ddl = ddlUtils.getPKDDL(tarTbl.getOwner(), tarTbl.getName(), pk.getName(), pk.getPkColumns(), cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t\tfor (FK fk : tarTbl.getFks()) {\n\t\t\t\tString ddl = ddlUtils.getFKDDL(tarTbl.getOwner(), tarTbl.getName(), fk, cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t\tfor (Index idx : tarTbl.getIndexes()) {\n\t\t\t\tString ddl = ddlUtils.getIndexDDL(tarTbl.getOwner(), tarTbl.getName(), idx, \"\", cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t}\n\t\tfor (SourceSQLTableConfig sstc : cfg.getExpSQLCfg()) {\n\t\t\tif (!sstc.isCreateNewTable()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = cfg.getTargetTableSchema(sstc.getTarget());\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceViewConfig sc : cfg.getExpViewCfg()) {\n\t\t\tif (!sc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tView vw = cfg.getTargetViewSchema(sc.getTargetOwner(), sc.getTarget());\n\t\t\tString ddl = ddlUtils.getViewDDL(vw, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(ddl);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceSequenceConfig sc : cfg.getExpSerialCfg()) {\n\t\t\tif (!sc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSequence sq = cfg.getTargetSerialSchema(sc.getTargetOwner(), sc.getTarget());\n\t\t\tString ddl = ddlUtils.getSequenceDDL(sq, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(ddl);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceCSVConfig sstc : cfg.getCSVConfigs()) {\n\t\t\tif (!sstc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = cfg.getTargetTableSchema(sstc.getTarget());\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\ttxtDDL.append(sbConstrains.toString());\n\t}", "@Override\r\n\tpublic void prepare() throws Exception {\n\t\t\r\n\t}", "protected void migrate() {\r\n java.util.Date dateNow = new java.util.Date();\r\n SQLiteBuilder builder = createBuilder();\r\n for (AbstractTable<?, ?, ?> table : tables) {\r\n if (table.migrated() < table.migrations()) {\r\n //FIXME this doesn't yet implement table updates.\r\n builder.createMigration(table).up(this);\r\n VersionRecord<DBT> v = _versions.create();\r\n v.table.set(table.helper.getTable().getRecordSource().tableName);\r\n v.version.set(1);\r\n v.updated.set(dateNow);\r\n v.insert();\r\n }\r\n }\r\n }", "@Override\n\t\tprotected void onPreExecute()\n\n\t\t{\n\n\t\t\tthis.dialog.setMessage(\"Exporting database...\");\n\n\t\t\tthis.dialog.show();\n\n\t\t}", "public void prepareDatabase(String testName) throws Exception {\n prepareDatabaseFromPath('/' + testName + \"/\" + prepareFileName);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tthis.dialog.setMessage(\"Exporting database...\");\n\t\t\tthis.dialog.show();\n\t\t}", "@Override\n\tpublic void svnLogPrepare() {\n\t}", "public void preMigration(Context context , String[]args) throws Exception\r\n {\r\n\t try {\r\n\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\t\t mqlLogRequiredInformationWriter(\"Inside PreMigration method to stamp the ids ----->\"+ \"\\n\");\r\n\t\t //loadResourceFile(context, \"emxConfigurationMigration\");\r\n\t\t mqlLogRequiredInformationWriter(\"Resource file loaded ------> emxConfigurationMigration.properties\");\r\n\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\r\n\t\t String strMqlCommandOff = \"trigger off\";\r\n\t\t MqlUtil.mqlCommand(context,strMqlCommandOff,true);\r\n\t\t mqlLogRequiredInformationWriter(\" 'trigger off' done at the start of preMigration \" + \"\\n\");\r\n\r\n\t\t IS_CONFLICT = false;\r\n\t\t StringBuffer sbRelPattern = new StringBuffer(50);\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM);\r\n\t\t sbRelPattern.append(\",\");\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO);\r\n\t\t sbRelPattern.append(\",\");\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM);\r\n\r\n\t\t StringBuffer sbTypePattern1 = new StringBuffer(50);\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t sbTypePattern1.append(\",\");\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_FEATURE_LIST);\r\n\t\t sbTypePattern1.append(\",\");\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\r\n\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO jpoInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t StringList slDerivationChangedType1 = jpoInst.getDerivationChangedType(context,new String[0]);\r\n\t\t for(int i=0;i<slDerivationChangedType1.size();i++){\r\n\t\t\t sbTypePattern1.append(\",\");\r\n\t\t\t sbTypePattern1.append(slDerivationChangedType1.get(i));\r\n }\r\n\r\n\t\t StringList fsObjSelects = new StringList();\r\n\t\t fsObjSelects.addElement(SELECT_ID);\r\n\t\t fsObjSelects.addElement(SELECT_TYPE);\r\n\t\t fsObjSelects.addElement(SELECT_NAME);\r\n\t\t fsObjSelects.addElement(SELECT_REVISION);\r\n\t\t fsObjSelects.addElement(SELECT_LEVEL);\r\n\t\t fsObjSelects.addElement(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE + \"]\");\r\n\t\t fsObjSelects.addElement(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.type\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.id\");\r\n\t\t fsObjSelects.addElement(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE + \"]\");\r\n\r\n\t\t //Added to check for GBOM connection if any\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_TO+\"].to.id\");\r\n\r\n\r\n\t\t StringBuffer sbRelPattern1 = new StringBuffer(50);\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_GBOM_FROM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_CUSTOM_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_VARIES_BY);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(RELATIONSHIP_MANAGED_SERIES);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_QUANTITY_RULE);\r\n\r\n\t\t StringBuffer sbTypePattern2 = new StringBuffer(50);\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_GBOM);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_QUANTITY_RULE);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_MASTER_FEATURE);\r\n\r\n\r\n\t\t warningLog = new FileWriter(documentDirectory + \"migration.log\", true);\r\n\r\n\r\n\t\t documentDirectory = args[0];\r\n\t\t String fileSeparator = java.io.File.separator;\r\n\t\t if(documentDirectory != null && !documentDirectory.endsWith(fileSeparator)){\r\n\t\t\t documentDirectory = documentDirectory + fileSeparator;\r\n\t\t }\r\n\r\n\r\n\t\t if(args.length > 3){\r\n\r\n\t\t\t RESOLVE_CONFLICTS = args[3];\r\n\t\t\t mqlLogRequiredInformationWriter( \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"This step will also resolve the conflicts related \"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"to 'Mixed Composition' and 'Malformed GBOM/Feature List' Object ids\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"at the end of the step, \"\r\n \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"NOTE : User has to resolve the conflicts related \"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"to 'Mixed Usage' and 'Incorrect Mapping' related Object ids\"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"at the end of the step, \"\r\n\t\t\t\t\t \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\");\r\n\r\n\t\t }else{\r\n\r\n\t\t\t mqlLogRequiredInformationWriter( \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"This step will resolve the conflicts related \"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"to 'Malformed GBOM/Feature List' Object ids\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"at the end of the step, \"\r\n \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"NOTE : User has to resolve the conflicts related \"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"to 'Mixed Composition','Mixed Usage' and 'Incorrect Mapping' related Object ids\"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"at the end of the step, \"\r\n\t\t\t\t\t \t\t\t\t\t\t + \" if present.\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\");\r\n\t\t }\r\n\r\n\t\t\t String strMinRange = args[1].toString();\r\n\t\t\t minRange = Integer.parseInt(strMinRange);\r\n\t\t\t if (\"n\".equalsIgnoreCase(args[2])){\r\n\t\t\t\t maxRange = getTotalFilesInDirectory();\r\n\t\t\t } else {\r\n\t\t\t\t maxRange = Integer.parseInt(args[2]);\r\n\t\t\t }\r\n\r\n\t\t\t // Execute schema changes needed for migration\r\n\t\t\t //we should only call this once the first time the Find Objects Pre Migration is called.\r\n\t\t\t //If In process of PreMigration, do not call again\r\n\t\t\t int migrationStatus = getAdminMigrationStatus(context);\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is -------> 0 \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"'VariantConfigurationR212SchemaChangesForMigration.tcl' will be executed.\"+\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is ------->'PreMigrationInProcess' \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"'VariantConfigurationR212SchemaChangesForMigration.tcl' will not be executed\"\r\n\t\t\t \t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t \t\t\t\t\t\t\t\t + \"as this TCL is already executed\"+\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is ------->'PreMigrationComplete' \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"Pre Migration step is done.\"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"Please execute the next step to continue with Migration.\"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"Now the Migration Status is \"+ migrationStatus +\"\\n\\n\");\r\n\r\n\t\t\t if(migrationStatus == 0){\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"'VariantConfigurationR212SchemaChangesForMigration.tcl' execution started...\" + \"\\n\\n\");\r\n\t\t\t\t String cmdString = \"execute program VariantConfigurationR212SchemaChangesForMigration.tcl\";\r\n\t\t\t\t ContextUtil.pushContext(context);\r\n\t\t\t\t MqlUtil.mqlCommand(context, cmdString);\r\n\r\n\t\t\t\t //${CLASS:emxAdminCache}.reloadSymbolicName(context, \"type_ConfigurationFeature\");\r\n\r\n\t\t\t\t TYPE_CONFIGURATION_FEATURE = getSchemaProperty(context, \"type_ConfigurationFeature\");\r\n\r\n\t\t\t\t ContextUtil.popContext(context);\r\n\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"'VariantConfigurationR212SchemaChangesForMigration.tcl' execution is done...\"+ \"\\n\");\r\n\t\t\t }\r\n\t\t\t //------------------------------------------------\r\n\t\t\t //Now to read the files\r\n\t\t\t //------------------------------------------------\r\n\t\t\t int m = 0;\r\n\t\t\t for( m = minRange;m <= maxRange; m++){\r\n\t\t\t\t StringList objectList = new StringList();\r\n\t\t\t\t try{\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration in process for objects in objectids_\"+ m +\".txt file. \\n\\n\");\r\n\r\n\t\t\t\t\t //setting admin property MigrationR212VariantConfiguration in eServiceSystemInformation.tcl\r\n\t\t\t\t\t setAdminMigrationStatus(context,\"PreMigrationInProcess\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Migration Status set to value ----->\"+ \"'PreMigrationInProcess'\" +\"\\n\\n\");\r\n\r\n\t\t\t\t\t objectList = readFiles(m);\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"objectids_\"+ m +\".txt file traversal started \" + \"\\n\\n\");\r\n\t\t\t\t\t for(int iCntObjList=0 ;iCntObjList<objectList.size();iCntObjList++){\r\n\t\t\t\t\t\t String topLevelObjectId = (String)objectList.get(iCntObjList);\r\n\r\n\t\t\t\t\t\t String topLevelObjectType =\"\";\r\n\t\t\t\t\t\t DomainObject domTopLevelObject = DomainObject.newInstance(context, topLevelObjectId);\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"topLevelObjectType------------\"+ topLevelObjectType + \"\\n\");\r\n\t\t\t\t\t\t //topLevelObjectType = domTopLevelObject.getInfo(context, ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t Map htTopLevelObjData = (Map) domTopLevelObject.getInfo(context, fsObjSelects);\r\n\t\t\t\t\t\t topLevelObjectType = (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t String topLevelObjectName= (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_NAME);\r\n\t\t\t\t\t\t String topLevelObjectRevision = (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_REVISION);\r\n\t\t\t\t\t\t Integer iCnt;\r\n\t\t\t\t\t\t iCnt= iCntObjList+1;\r\n\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Stamping of objects for below Top level object's structure started----->\"+\" --- \"+now()+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object Count in text file ----->\"+iCnt+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Id ----------->\"+topLevelObjectId+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Type --------->\"+topLevelObjectType+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Name --------->\"+topLevelObjectName+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Revision ----->\"+topLevelObjectRevision+\"\\n\");\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t //Check if \"GBOM\" object is connected to Configuration Feature or Configuration Option\r\n\t\t\t\t\t\t //DomainObject domFeatObj = new DomainObject(strFeatureId);\r\n\t\t\t\t\t\t StringList TopLevelfeatureObjSelects = new StringList();\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_TYPE);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_NAME);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_REVISION);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t //topLevelObjectType = domTopLevelObject.getInfo(context, ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t topLevelObjectType = (String)htTopLevelObjData.get(SELECT_TYPE);\r\n\r\n\t\t\t\t\t\t\t StringList sLTopLevelGBOMIds = new StringList();\r\n\r\n\t\t\t\t\t\t\t String TopLevelGBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t Object objTopLevelGBOMId = htTopLevelObjData.get(TopLevelGBOMSelect);\r\n\r\n\t\t\t\t\t\t\t if (objTopLevelGBOMId instanceof StringList) {\r\n\t\t\t\t\t\t\t\t sLTopLevelGBOMIds = (StringList) htTopLevelObjData.get(TopLevelGBOMSelect);\r\n\t\t\t\t\t\t\t } else if (objTopLevelGBOMId instanceof String) {\r\n\t\t\t\t\t\t\t\t sLTopLevelGBOMIds.addElement((String) htTopLevelObjData.get(TopLevelGBOMSelect));\r\n\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO VariantConfigInterObjMigrationInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t\t\t\t\t StringList slDerivationChangedType = VariantConfigInterObjMigrationInst.getDerivationChangedType(context,new String[0]);\r\n\r\n\r\n\t StringBuffer sbWhereClause = new StringBuffer(50);\r\n\t\tsbWhereClause.append(\"((\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.type.kindof != \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\")||(\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.type.kindof != \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"))||\");\r\n\t\tsbWhereClause.append(\"((\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"&&\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.id == \"+topLevelObjectId +\"\");\r\n\t\tsbWhereClause.append(\")||(\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"&&\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.id == \"+topLevelObjectId +\"\");\r\n\t\tsbWhereClause.append(\")\");\r\n\t\tsbWhereClause.append(\")\");\r\n\r\n\t\t\t\t\t\t\tStringBuffer sbObjWhere = new StringBuffer(50);\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"(\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\t\t\t\t\t\t\tfor(int i=0;i<slDerivationChangedType.size();i++){\r\n\t\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\t\t\t\t \t\t\tsbObjWhere.append(\"type == \\\"\" + slDerivationChangedType.get(i).toString() + \"\\\"\");\r\n\t\t\t\t }\r\n\t\t\t\t\t\t\tsbObjWhere.append(\")\");\r\n\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"(\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type == \\\"\" + ConfigurationConstants.TYPE_FEATURE_LIST + \"\\\"\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"&&\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(sbWhereClause);\r\n\t\t\t\t\t\t\tsbObjWhere.append(\")\");\r\n\r\n\r\n\t\t\t\t\t\t\tDomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to get the Top level object structure started ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\r\n\t\t\t\t\t\t MapList featureStructureList = domTopLevelObject.getRelatedObjects(context,\r\n\t\t\t\t\t\t\t\t sbRelPattern.toString(), // relationshipPattern\r\n\t\t\t\t\t\t\t\t sbTypePattern1.toString(), // typePattern\r\n\t\t\t\t\t\t\t\t fsObjSelects, // objectSelects\r\n\t\t\t\t\t\t\t\t null, // relationshipSelects\r\n\t\t\t\t\t\t\t\t false, // getTo\r\n\t\t\t\t\t\t\t\t true, // getFrom\r\n\t\t\t\t\t\t\t\t (short) 0, // recurseToLevel\r\n\t\t\t\t\t\t\t\t sbObjWhere.toString(), // objectWhere,\r\n\t\t\t\t\t\t\t\t null, // relationshipWhere\r\n\t\t\t\t\t\t\t\t (int)0); // limit\r\n\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to get the Top level object structure ended ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\\n\\n\");\r\n\r\n\t\t\t\t\t\t String strNewFeatureType = \"\";\r\n\t\t\t\t\t\t String strResolvedNewFeatureType= \"\";\r\n\r\n\t\t\t\t\t\t // use case for standalone features\r\n\t\t\t\t\t\t if (featureStructureList.size() == 0){\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\" This Top level object structure doesn't have 'Feature List From' and 'Feature List To' connections \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" Check if this feature has 'Design Variants'or 'GBOM' or 'Managed Series' or 'Quantity Rules' connected \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If 'Yes' then stamp this Feature as 'type_LogicalFeature'\"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If 'No' then check for the property setting for this Feature \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If property setting not found for the given type..Check for Parent Type and then set the Type \"+\"\\n\\n\\n\");\r\n\r\n\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to check for 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections started ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\t\t\t\t\t\t MapList LF_RelatedList = domTopLevelObject.getRelatedObjects(context,\r\n\t\t\t\t\t\t\t\t\t sbRelPattern1.toString(), // relationshipPattern\r\n\t\t\t\t\t\t\t\t\t sbTypePattern2.toString(), // typePattern\r\n\t\t\t\t\t\t\t\t\t null, // objectSelects\r\n\t\t\t\t\t\t\t\t\t null, // relationshipSelects\r\n\t\t\t\t\t\t\t\t\t true, // getTo\r\n\t\t\t\t\t\t\t\t\t true, // getFrom\r\n\t\t\t\t\t\t\t\t\t (short) 1, // recurseToLevel\r\n\t\t\t\t\t\t\t\t\t null, // objectWhere,\r\n\t\t\t\t\t\t\t\t\t null, // relationshipWhere\r\n\t\t\t\t\t\t\t\t\t (int) 0); // limit\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to check for 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections ended ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\r\n\r\n\t\t\t\t\t\t\t // if feature has DVs or GBOM or Managed Series or Quantity Rules, it should be stamped as Logical\r\n\t\t\t\t\t\t\t if (!LF_RelatedList.isEmpty()) {\r\n\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"This Top level object has 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections'\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Hence stamp this Feature as attribute ---> NewFeatureType=type_LogicalFeature \"+\"\\n\");\r\n\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.TechnicalFeatureType\");\r\n\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.TechnicalFeatureType\");\r\n\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,\"\",EMPTY_STRINGLIST);\r\n\r\n\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"This Top level object doesn't have the 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections'\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t if(topLevelObjectType!=null\r\n\t\t\t\t\t\t\t\t\t\t && !topLevelObjectType.equalsIgnoreCase(ConfigurationConstants.TYPE_PRODUCT_LINE)\r\n\t\t\t\t\t\t\t\t\t\t && !topLevelObjectType.equalsIgnoreCase(ConfigurationConstants.TYPE_GBOM)\r\n\t\t\t\t\t\t\t\t\t\t && !mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_PRODUCTS)){\r\n\t\t\t\t\t\t\t\t\t\t //&& !isOfDerivationChangedType(context,topLevelObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t String strSymbolicType = FrameworkUtil.getAliasForAdmin(context,DomainConstants.SELECT_TYPE, topLevelObjectType, true);\r\n\t\t\t\t\t\t\t\t\t try{\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.\"+strSymbolicType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.\"+strSymbolicType);\r\n\t\t\t\t\t\t\t\t\t }catch (Exception e){\r\n\t\t\t\t\t\t\t\t\t\t //If property setting not found for the given type..Check for Parent Type and then set the Type\r\n\t\t\t\t\t\t\t\t\t\t String strParentType = UICache.getParentTypeName(context,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t\t\t String strParSymbolicType = FrameworkUtil.getAliasForAdmin(context,DomainConstants.SELECT_TYPE, strParentType, true);\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.\"+strParSymbolicType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.\"+strParSymbolicType);\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t // stamping the features\r\n\t\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,\"\",EMPTY_STRINGLIST);\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }else{ // usecase for structures\r\n\r\n\t\t\t\t\t\t\t boolean isMixedUsage = false;\r\n\t\t\t\t\t\t\t boolean isMixedComposition = false;\r\n\t\t\t\t\t\t\t String referenceContextUsage=\"\";\r\n\r\n\t\t\t\t\t\t\t StringList featureTypesList = new StringList();\r\n\t\t\t\t\t\t\t // if toplevelobject is feature\r\n\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object is of Type :: \"+ topLevelObjectType +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t if (mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, topLevelObjectType)){\r\n\t\t\t\t\t\t\t\t // check for mixed usage\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Usage starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t StringList allFeatureTypesList = new StringList();\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tList of Features where this Toplevel Object is used. \"+ featureStructureList.size() +\"\\n\");\r\n\t\t\t\t\t\t\t\t outer: for (int j = 0; j < featureStructureList.size(); j++){\r\n\r\n\t\t\t\t\t\t\t\t\t Map fsMap = new HashMap();\r\n\r\n\t\t\t\t\t\t\t\t\t fsMap = (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t String strObjectType = (String) fsMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t referenceContextUsage = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\r\n\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, strObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tObject Type. \"+ strObjectType +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t String featureTypeSelect = \"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\";\r\n\t\t\t\t\t\t\t\t\t\t Object objFeatureTypes = fsMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t featureTypesList.clear();\r\n\r\n\t\t\t\t\t\t\t\t\t\t if (objFeatureTypes instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList = (StringList) fsMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t } else if (objFeatureTypes instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList.addElement((String) fsMap.get(featureTypeSelect));\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tList of 'Feature Type' attribute values of connected 'Feature List' objects. \"+ featureTypesList +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t if (featureTypesList.size() > 0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t for (int k = 0; k < featureTypesList.size(); k++){\r\n\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) featureTypesList.get(k);\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals((String) featureTypesList.get(0))){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"As the above list is not consisitent Feature will be marked as 'MixedUsage'.\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedUsage = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedUsage\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Usage ends \"+ \"\\n\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Composition starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t // check for mixed composition\r\n\t\t\t\t\t\t\t\t\t if (!isMixedUsage) {\r\n\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURE_LIST)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t allFeatureTypesList.addElement(strFeatureType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\t\tList of 'Feature Type' attribute values of connected 'Feature List' objects. \"+ allFeatureTypesList +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!strFeatureType.equals(allFeatureTypesList.get(0))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"As the above list is not consisitent Feature will be marked as 'MixedComposition'.\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t isMixedComposition = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedComposition\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Composition ends \"+ \"\\n\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t //Code to check the \"Feature List\" attribute \"Feature Type\" is correctly mapped against the Type\r\n\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Incorrect Mapping starts \"+ \"\\n\");\r\n\t\t\t\t\t\t\t\t\t\tif (!isMixedUsage\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !isMixedComposition\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURE_LIST)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_PRODUCTS)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t if (strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_TECHNICAL)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t }else if(strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MARKETING)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\tmqlLogRequiredInformationWriter(\"\tCode to check Incorrect Mapping ends \"+ \"\\n\\n\");\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t // stamp the structure including topLevelObject.\r\n\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Stamp starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t for (int j = 0; j < featureStructureList.size(); j++) {\r\n\t\t\t\t\t\t\t\t\t Map fsMap = (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t StringList sLGBOMIds = new StringList();\r\n\r\n\t\t\t\t\t\t\t\t\t String GBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t\t\t Object objGBOMType = fsMap.get(GBOMSelect);\r\n\r\n\t\t\t\t\t\t\t\t\t if (objGBOMType instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t sLGBOMIds = (StringList) fsMap.get(GBOMSelect);\r\n\t\t\t\t\t\t\t\t\t } else if (objGBOMType instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t sLGBOMIds.addElement((String) fsMap.get(GBOMSelect));\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t String strObjectId = (String) fsMap.get(SELECT_ID);\r\n\t\t\t\t\t\t\t\t\t String strObjectType = (String) fsMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t boolean isLeafLevel = false;\r\n\r\n\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t int subFeatureCount = Integer.parseInt((String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\"));\r\n\t\t\t\t\t\t\t\t\t\t if(subFeatureCount==0)\r\n\t\t\t\t\t\t\t\t\t\t\t isLeafLevel = true;\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t if(!isMixedUsage && !isMixedComposition){\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getNewFeatureType(context,(String)featureTypesList.get(0),isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,(String)allFeatureTypesList.get(0),isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t }else if(isMixedComposition){\r\n\t\t\t\t\t\t\t\t\t\t //Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top Level Feature Type..\"+referenceContextUsage);\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Is this feature LeafLevel..\"+isLeafLevel);\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Type of Object..\"+strObjectType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t strResolvedNewFeatureType = getNewFeatureType(context,referenceContextUsage,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_FEATURES) ||\r\n\t\t\t\t\t\t\t\t\t\t\t mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_PRODUCTS)||\r\n\t\t\t\t\t\t\t\t\t\t\t isOfDerivationChangedType(context, strObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t stampFeature(context,strObjectId,strNewFeatureType,strResolvedNewFeatureType,sLGBOMIds);\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t //toplevel object stamping\r\n\t\t\t\t\t\t\t\t //strNewFeatureType = getNewFeatureType(context,(String)featureTypesList.get(0),false,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,(String)allFeatureTypesList.get(0),false,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,strResolvedNewFeatureType,sLTopLevelGBOMIds);\r\n mqlLogRequiredInformationWriter(\"Stamp ends \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t }//end if toplevelobject is feature\r\n\t\t\t\t\t\t\t // if top level object is Product or ProductLine\r\n\t\t\t\t\t\t\t if (mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,topLevelObjectType, ConfigurationConstants.TYPE_PRODUCT_LINE)) {\r\n\r\n\t\t\t\t\t\t\t\t Map fsMap=new HashMap();\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t for (int j = 0; j < featureStructureList.size(); j++) {\r\n\r\n\t\t\t\t\t\t\t\t\t fsMap= (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t int level = Integer.parseInt((String) fsMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t if (level == 1) {\r\n\t\t\t\t\t\t\t\t\t\t String referenceContextUsage2 = (String)fsMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t // check for substructure mixed usage\r\n\t\t\t\t\t\t\t\t\t\t StringList allFeatureTypesList = new StringList();\r\n\t\t\t\t\t\t\t\t\t\t outer2:for (int k = j; k < featureStructureList.size(); k++) {\r\n\t\t\t\t\t\t\t\t\t\t\t Map subFSMap = (Map) featureStructureList.get(k);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t String strObjectType = (String) subFSMap.get(SELECT_TYPE);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t int currentLevel = Integer.parseInt((String) subFSMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t\t\t if (currentLevel == 1 && k > j) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList.clear();\r\n\t\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t ||isOfDerivationChangedType(context, strObjectType)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t String featureTypeSelect = \"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t Object objFeatureTypes = subFSMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (objFeatureTypes instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t featureTypesList = (StringList) subFSMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t\t } else if (objFeatureTypes instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t featureTypesList.addElement((String) subFSMap.get(featureTypeSelect));\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t objFeatureTypes=null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (featureTypesList.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t for (int l = 0; l < featureTypesList.size(); l++) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) featureTypesList.get(l);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals((String) featureTypesList.get(0))) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedUsage = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedUsage\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t break outer2;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t if(!isMixedUsage){\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURE_LIST)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) subFSMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t allFeatureTypesList.addElement(strFeatureType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals(allFeatureTypesList.get(0))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedComposition = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedComposition\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n \t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t subFSMap=null;\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t allFeatureTypesList=null;\r\n\t\t\t\t\t\t\t\t\t\t // stamp\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\nstamp started -----> \"+now()+\"\\n\\n\");\r\n\t\t\t\t\t\t\t\t\t\t String strObjectType=\"\";\r\n\t\t\t\t\t\t\t\t\t\t String strObjectId =\"\";\r\n\r\n\t\t\t\t\t\t\t\t\t\t for (int k = j + 1; k < featureStructureList.size(); k++) {\r\n\t\t\t\t\t\t\t\t\t\t\t Map subFSMap= (Map) featureStructureList.get(k);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectType = (String) subFSMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectId = (String) subFSMap.get(SELECT_ID);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t StringList sLGBOMIds = new StringList();\r\n\t\t\t\t\t\t\t\t\t\t\t String GBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t\t\t\t\t Object objGBOMType = subFSMap.get(GBOMSelect);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if (objGBOMType instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t sLGBOMIds = (StringList) subFSMap.get(GBOMSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t } else if (objGBOMType instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t sLGBOMIds.addElement((String) subFSMap.get(GBOMSelect));\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t int currentLevel = Integer.parseInt((String) subFSMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t\t\t if (currentLevel == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"\\ncurrentLevel == 1\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t //j=k;\r\n\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if ((mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURES)\r\n \t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, strObjectType)))\r\n\t\t\t\t\t\t\t\t\t\t\t //)&&\r\n \t\t\t\t\t\t\t\t\t\t\t//!isOfDerivationChangedType(context, strObjectType)) {\r\n \t\t\t\t\t\t\t\t\t\t {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t boolean isLeafLevel = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t && currentLevel != 2){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t int subFeatureCount = Integer.parseInt((String) subFSMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t if(subFeatureCount==0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t isLeafLevel = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t if(!isMixedUsage && !isMixedComposition &&\r\n\t\t\t\t\t\t\t\t\t\t\t\t !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURE_LIST)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_PRODUCTS)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t //Code to check the \"Feature List\" attribute \"Feature Type\" is correctly mapped against the Type\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_TECHNICAL)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(!(mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_PRODUCTS))){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else if(strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MARKETING)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t }else if(!isMixedUsage && !isMixedComposition && (mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t ||mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_PRODUCTS))){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t }else if(isMixedComposition){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t //Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top Level Feature Type..\"+referenceContextUsage);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Is this feature LeafLevel..\"+isLeafLevel);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Type of Object..\"+strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t strResolvedNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t stampFeature(context,strObjectId,strNewFeatureType,strResolvedNewFeatureType,sLGBOMIds);\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t subFSMap=null;\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectType=null;\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectId=null;\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t //System.gc();\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\nstamp END -----> \"+now()+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t featureTypesList=null;\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object Count in text file DONE ----->\"+ iCnt + \"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Toplevel id.DONE ----->\"+ topLevelObjectId +\"--\"+now()+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t domTopLevelObject=null;\r\n\t\t\t\t\t\t topLevelObjectId=null;\r\n\t\t\t\t\t\t //System.gc();\r\n\t\t\t\t\t }\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration done for \"+objectList.size()+\" objects in objectids_\"+m+\".txt file. \\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t }catch(FileNotFoundException fnfExp){\r\n\t\t\t\t\t // throw exception if file does not exists\r\n\t\t\t\t\t throw fnfExp;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\t // Getting top level objects (this includes Feature,Products and ProductLines and also standalone features\r\n\t\t\t StringBuffer sbTypePattern = new StringBuffer(50);\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t\t sbTypePattern.append(\",\");\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\t\t\t sbTypePattern.append(\",\");\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_PRODUCT_LINE);\r\n\r\n\t\t\t StringBuffer sbObjWhere = new StringBuffer(50);\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==False\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\t\t\t sbObjWhere.append(\"||\");\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==False\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"]==True\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\"||\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCT_LINE + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\r\n\t\t\t StringList objSelects = new StringList();\r\n\t\t\t objSelects.addElement(SELECT_ID);\r\n\t\t\t objSelects.addElement(SELECT_TYPE);\r\n\t\t\t objSelects.addElement(SELECT_NAME);\r\n\r\n\r\n\t\t\t //finding if any Feature objects in database or Product objects which have FLT relationship are not stamped\r\n\t\t\t StringBuffer unStampedTypePattern = new StringBuffer(50);\r\n\t\t\t unStampedTypePattern.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t\t unStampedTypePattern.append(\",\");\r\n\t\t\t unStampedTypePattern.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\r\n\t\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO VariantConfigInterObjMigrationInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t\t StringList slDerivationChangedType = VariantConfigInterObjMigrationInst.getDerivationChangedType(context,new String[0]);\r\n\r\n\t\t\t\tStringBuffer sbWhereClause = new StringBuffer(50);\r\n\t\t\t\tsbWhereClause.append(\"(\");\r\n\t\t\t\tsbWhereClause.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\r\n\t\t for(int i=0;i<slDerivationChangedType.size();i++){\r\n\t\t \tunStampedTypePattern.append(\",\");\r\n\t\t \tunStampedTypePattern.append(slDerivationChangedType.get(i));\r\n\t \t\t\tsbWhereClause.append(\"||\");\r\n\t \t\t\tsbWhereClause.append(\"type.kindof == \\\"\" + slDerivationChangedType.get(i).toString() + \"\\\"\");\r\n\t\t }\r\n\t\t sbWhereClause.append(\")\");\r\n\r\n StringBuffer unStampedObjWhere = new StringBuffer(100);\r\n unStampedObjWhere.append(\"(\");\r\n unStampedObjWhere.append(sbWhereClause);\r\n unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"interface[\"+ INTERFACE_FTRIntermediateObjectMigration +\"]==FALSE\");\r\n\t\t\t unStampedObjWhere.append(\")\");\r\n\t\t\t /*unStampedObjWhere.append(\"||\");\r\n\t\t\t unStampedObjWhere.append(\"(\");\r\n\t\t\t unStampedObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==True\");\r\n\t\t\t unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"interface[\"+ INTERFACE_FTRIntermediateObjectMigration +\"]==FALSE\");\r\n\t\t\t unStampedObjWhere.append(\")\");*/\r\n\r\n\t\t\t StringList sLobjSelects = new StringList();\r\n\t\t\t sLobjSelects.addElement(SELECT_NAME);\r\n\t\t\t sLobjSelects.addElement(SELECT_TYPE);\r\n\t\t\t sLobjSelects.addElement(SELECT_ID);\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"Check for unStamped Objects starts \"+\"\\n\");\r\n\r\n\t\t\t List unStampedObjectsList = DomainObject.findObjects(\r\n\t\t\t\t\t context,\r\n\t\t\t\t\t unStampedTypePattern.toString(),\r\n\t\t\t\t\t DomainConstants.QUERY_WILDCARD,\r\n\t\t\t\t\t unStampedObjWhere.toString(),\r\n\t\t\t\t\t sLobjSelects);\r\n\t\t\t mqlLogRequiredInformationWriter(\"Check for unStamped Objects ends \"+\"\\n\");\r\n\r\n\t\t\t //setting premigration status\r\n\t\t\t if(unStampedObjectsList.size()==0)\r\n\t\t\t {\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Unstamped object list size is 0.\\n\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration is complete.\\n\");\r\n\t\t\t\t setAdminMigrationStatus(context,\"PreMigrationComplete\");\r\n\t\t\t }\r\n\t\t\t else\r\n\t {\r\n\t \tMap unStampedObjMap = new HashMap();\r\n\t \tfor(int i=0;i<unStampedObjectsList.size();i++){\r\n\r\n\t \t\tunStampedObjMap= (Map)unStampedObjectsList.get(i);\r\n\t \t\tString strUnStampId =(String)unStampedObjMap.get(SELECT_ID);\r\n\t \t\twriteOIDToTextFile(strUnStampId,\"unStampedOIDs\");\r\n\t \t}\r\n\r\n\t mqlLogRequiredInformationWriter(\"Pre-migration is not complete.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"WARNING: Some Feature objects are not stamped.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"Please refer unStampedOIDs.txt for details.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\r\n\t }\r\n\r\n\t\t\t if(IS_CONFLICT){\r\n\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"WARNING: Conflict MixedUsage/MixedComposition/MarketingGBOM exist.\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Please view file 'Conflict.txt'for a list of these objects\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"These objects need to be deleted or fixed in order to proceed with the next step of migration..\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t }\r\n\r\n\r\n\t\t\t String strMqlCommandOn = \"trigger on\";\r\n\t\t\t MqlUtil.mqlCommand(context,strMqlCommandOn,true);\r\n\t\t\t mqlLogRequiredInformationWriter(\"End of preMigration 'trigger on' done\" + \"\\n\");\r\n\r\n\t }catch (Exception e) {\r\n \t\t\te.printStackTrace();\r\n \t\t\tmqlLogRequiredInformationWriter(\"Pre-migration failed. \\n\"+e.getMessage() + \"\\n\");\r\n \t\t}\r\n \t}", "protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (para[i].getParameter() == null)\n\t\t\t\t;\n\t\t\telse if (name.equals(\"M_Requisition_ID\"))\n\t\t\t\tp_M_RequisitionFrom_ID = ((BigDecimal)para[i].getParameter()).intValue();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t}", "public void prepare()\n\t{\n\t\tSystem.out.println(getClass().getName()+\" is preparing to go outside.\");\n\t}", "public void prepare()\n\t{\n\t\tsuper.prepare();\n\n\t\tojTreeNode_prepare();\n\t\tmenu_prepare();\n\t}", "protected void prepareUninstallation() {\n\t\t//\n\t}", "@Before\n\tpublic void initialize() {\n\t\tnullParserSQLGenerator = new SQLStringGenerator(null);\n\t\toneArgParserSQLGenerator = new SQLStringGenerator(new OneArgParser());\n\t}", "private void setupDBs()\n {\n\t mSetupDBTask = new SetupDBTask(this);\n\t\tmSetupDBTask.execute((Void[])null);\n }", "public void prepare() {\n long millis, nanos;\n TestCaseImpl tc = _testCase;\n \n nanos = Util.currentTimeNanos();\n prepare(tc);\n nanos = Util.currentTimeNanos() - nanos;\n tc.setDoubleParam(Constants.ACTUAL_PREPARE_TIME, \n Util.nanosToMillis(nanos));\n }", "@Override\n public void prepare() {\n if (prepared) return;\n ApplicationId applicationId = session.getApplicationId();\n try (ActionTimer timer = applicationRepository.timerFor(applicationId, \"deployment.prepareMillis\")) {\n TimeoutBudget timeoutBudget = new TimeoutBudget(clock, timeout);\n\n PrepareParams.Builder params = new PrepareParams.Builder().applicationId(applicationId)\n .timeoutBudget(timeoutBudget)\n .ignoreValidationErrors(!validate)\n .vespaVersion(version.toString())\n .isBootstrap(isBootstrap);\n dockerImageRepository.ifPresent(params::dockerImageRepository);\n athenzDomain.ifPresent(params::athenzDomain);\n Optional<ApplicationSet> activeApplicationSet = applicationRepository.getCurrentActiveApplicationSet(tenant, applicationId);\n tenant.getSessionRepository().prepareLocalSession(session, logger, params.build(), activeApplicationSet,\n tenant.getPath(), clock.instant());\n this.prepared = true;\n }\n }", "@Before\n public void init() throws ConnectionException, IOException {\n\n final ConnectionPool pool = ConnectionPool.getInstance();\n//\n final Connection connection = pool.takeConnection();\n\n final ScriptRunner scriptRunner = new ScriptRunner(connection);\n\n Reader reader = new BufferedReader(new FileReader(UserDaoTest.class.getClassLoader().getResource(\"db_v2.sql\").getPath()));\n\n scriptRunner.runScript(reader);\n\n pool.closeConnection(connection);\n\n }", "protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (para[i].getParameter() == null)\n\t\t\t\t;\n\t\t\telse if (name.equals(\"SRI_Authorization_ID\"))\n\t\t\t\tp_SRI_Authorization_ID = para[i].getParameterAsInt();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\t\n\t\tm_AD_Client_ID = getAD_Client_ID();\n\t\t\n\t\tif (p_SRI_Authorization_ID == 0)\n\t\t\tp_SRI_Authorization_ID = getRecord_ID();\n\n\t}", "protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}", "@Override\n public void prepareRun(BatchSourceContext context) throws IOException {\n Map<String, String> arguments = new HashMap<>();\n FileSetArguments.setInputPaths(arguments, config.files);\n context.setInput(Input.ofDataset(config.fileSetName, arguments));\n }", "@Before\r\n\tpublic void setup() {\n\t\tH2Bootstrap.loadSchema(\r\n\t\t\t\tdataSourceLondon, \r\n\t\t\t\t\"/sql/create_bnk_database_h2.sql\", \r\n\t\t\t\t\"/sql/insert_bnk_static_data.sql\",\r\n\t\t\t\t\"/sql/drop_bnk_database.sql\");\r\n\r\n\t\t// H2Boostrap will create and insert the schema just once\r\n\t\tH2Bootstrap.loadSchema(\r\n\t\t\t\tdataSourceNewYork, \r\n\t\t\t\t\"/sql/create_bnk_database_h2.sql\", \r\n\t\t\t\t\"/sql/insert_bnk_static_data.sql\",\r\n\t\t\t\t\"/sql/drop_bnk_database.sql\");\r\n\t}", "public abstract void prepareInternal() throws IOException;", "@Override\n\tpublic void prepare() throws Exception {\n\n\t\tsuper.prepare();\n\t\tmaintainDBService.truncateTables();\n\t}", "@Override\r\n\t\tpublic void prepare() throws Exception\r\n\t\t\t{\n\r\n\t\t\t}", "@Test\n public void testSetScript_1()\n throws Exception {\n LogicStep fixture = new LogicStep();\n fixture.setScript(\"\");\n fixture.setName(\"\");\n fixture.setOnFail(\"\");\n fixture.setScriptGroupName(\"\");\n fixture.stepIndex = 1;\n String script = \"\";\n\n fixture.setScript(script);\n\n }", "protected void doRun() {\n\n\t\tFile dirFile = null;\n\t\ttry {\n\t\t\tdirFile = new File(exportConfig.getDataFileFolder() + File.separator + \"ddl\");\n\t\t\tif (!dirFile.exists()) {\n\t\t\t\tdirFile.mkdir();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"create schema dir error : \", e);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tString schemaFile = null;\n\t\t\tString indexFile = null;\n\t\t\tString triggerFile = null;\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\tschemaFile = dirFile + File.separator + \"schema.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\tindexFile = dirFile + File.separator + \"index.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\ttriggerFile = dirFile + File.separator + \"trigger.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\n\t\t\tSet<String> tableSet = new HashSet<String>();\n\t\t\ttableSet.addAll(exportConfig.getTableNameList());\n\t\t\tExprotToOBSHandler.exportSchemaToOBSFile(dbInfo, exportDataEventHandler, tableSet,\n\t\t\t\t\tschemaFile, indexFile, triggerFile, exportConfig.getFileCharset(),\n\t\t\t\t\texportConfig.isExportSerialStartValue(), false);\n\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\t\t\tLOGGER.error(\"create schema index trigger error : \", e);\n\t\t}\n\n\t\ttry {\n\t\t\tif (exportConfig.isExportSerial()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t\tString serialFile = dirFile + File.separator + \"serial.sql\";\n\t\t\t\texportSerial(serialFile);\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\tLOGGER.error(\"create serial.sql error : \", e);\n\t\t}\n\n\t\ttry {\n\t\t\tif (exportConfig.isExportView()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\tString viewFile = dirFile + File.separator + \"view.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\texportView(viewFile);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\tLOGGER.error(\"create view.sql error : \", e);\n\t\t}\n\t}", "private static void prepareSaveFile(String filename) {\n\t\tFile f = new File(filename);\n\t\tif(!f.exists()) {\n\t\t\ttry {\n\t\t\t\tf.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@BeforeClass (alwaysRun = true)\n public void dataPreparation()\n {\n serverHealth.isServerReachable();\n serverHealth.assertServerIsOnline();\n\n // Before we start testing the live indexing we need to use the reindexing component to index the system nodes.\n Step.STEP(\"Index system nodes.\");\n AlfrescoStackInitializer.reindexEverything();\n\n Step.STEP(\"Create a test user and private site.\");\n testUser = dataUser.createRandomTestUser();\n testSite = helper.createPrivateSite(testUser);\n }", "void onPrepare() throws Exception {\n\t\t_person = getPersonService().findPerson(_personId);\n\n\t\tif (_person == null) {\n\t\t\tif (_personId < 4) {\n\t\t\t\tthrow new IllegalStateException(\"Database data has not been set up!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Exception(\"Person \" + _personId + \" does not exist.\");\n\t\t\t}\n\t\t}\n\t}", "public void setup() {\n\t\tif(!plugin.getDataFolder().exists()) {\n\t\t\tplugin.getDataFolder().mkdir();\n\t\t}\n\n\t\t// Create main file\n\t\tString FileLocation = plugin.getDataFolder().toString() + File.separator + \"Storage\" + \".yml\";\n\t\tFile tmp = new File(FileLocation);\n\t\tstoragefile = tmp;\n\t\t// Check if file exists\n\t\tif (!storagefile.exists()) {\n\t\t\ttry {\n\t\t\t\tstoragefile.createNewFile();\n\t\t\t}catch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tBukkit.getServer().getConsoleSender().sendMessage(net.md_5.bungee.api.ChatColor.RED + \"Storage file unable to be created!\");\n\t\t\t}\n\t\t}\n\t\tstoragecfg = YamlConfiguration.loadConfiguration(storagefile);\n\t\tcreateStorageValues();\n\t}", "@Override\n public void onCreate(SQLiteDatabase db) {\n //SQLiteDatabase es semejante al session de hibernate\n ejecutarScript(db,R.array.scriptCreate);\n }", "public void prepareDEBreeder(EvolutionState state)\r\n {\r\n }", "private void beginSetup() {\n try {\n if (dbType.equals(\"mysql\")) {\n Class.forName(\"gwe.sql.gweMysqlDriver\");\n }\n else if (dbType.equals(\"postgresql\")) {\n Class.forName(\"org.postgresql.Driver\");\n }\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"setup constructor ClassNotFound: \"+cnfe);\n System.out.println(\"Could not load the mysql driver: please check your classpath\");\n System.exit(-1);\n }\n\n try {\n if (!tableExists(DEFAULT_DB_CONFIG_TABLE)) {\n createConfigTable(DEFAULT_DB_CONFIG_TABLE);\n }\n } catch (SQLException sqle) {\n System.out.println(\"setup beginSetup SQLException: \"+sqle);\n System.out.println(\"Trouble interacting with vizConfig database table\");\n System.exit(-2);\n }\n prepareFrame();\n }", "private void backUpDb() throws FileNotFoundException, IOException {\n backUpDb(Options.toString(Options.DATABASE));\n }", "private void prepareClone(final MasterProcedureEnv env) throws IOException {\n final TableName tableName = getTableName();\n if (env.getMasterServices().getTableDescriptors().exists(tableName)) {\n throw new TableExistsException(tableName);\n }\n\n // check whether ttl has expired for this snapshot\n if (\n SnapshotDescriptionUtils.isExpiredSnapshot(snapshot.getTtl(), snapshot.getCreationTime(),\n EnvironmentEdgeManager.currentTime())\n ) {\n throw new SnapshotTTLExpiredException(ProtobufUtil.createSnapshotDesc(snapshot));\n }\n\n validateSFT();\n }", "@BeforeAll\n public void prepare() {\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}", "protected void prepareSave() {\r\n EObject cur;\r\n for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {\r\n cur = iter.next();\r\n \r\n EStructuralFeature idAttr = cur.eClass().getEIDAttribute();\r\n if (idAttr != null && !cur.eIsSet(idAttr)) {\r\n cur.eSet(idAttr, EcoreUtil.generateUUID());\r\n }\r\n }\r\n }", "@Before\n public void prepare() throws Exception {\n Operation operation =\n sequenceOf(InitializeOperations.DELETE_ALL);\n DbSetup dbSetup = new DbSetup(new DataSourceDestination(dataSource), operation);\n dbSetup.launch();\n }", "@Override\n\tpublic void prepare(Map stormConf, TopologyContext context,\n\t\t\tOutputCollector collector) {\n\t\tthis.collector=collector;\n\t\tGlobalVar.numberOfNodes = Integer.parseInt(stormConf.get(\"numberOfNodes\").toString());\n\t\tthis.fileName = stormConf.get(\"wordsFile\").toString();\n\t\t\n\t}", "public void init() {\r\n\t\tdbVersion = new DBVersion( getDefaultDatabase(), progress, upgradeFile.versionTableName, upgradeFile.logTableName );\r\n\t}", "@Override\n public void onCreate(SQLiteDatabase db) {\n for (int i = 0; i<onCreateScripts.length; i++)\n db.execSQL(onCreateScripts[i]);\n }", "public static void main(String[] args) {\n MySQLScriptGen databaseobject = new MySQLScriptGen();\n\n //this is same for every model\n JsonFileReader jsonFileReader = JsonFileReader.getInstance();\n JSONObject pim = jsonFileReader.getplatformIndependentModel();\n String ddl_script = databaseobject.createDDLScript(pim);\n String dml_script = databaseobject.createDMLScript(pim);\n String dql_script = databaseobject.createDQLScript(pim);\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\\n\");\n System.out.println(ddl_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dml_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dql_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n }", "void prepareTables();", "@Override\r\n\tpublic void beforeExecuteScript() throws Exception\r\n\t{\n\t}", "public void initialDatabaseAutomatikFunctionInformation () {\n Calendar calendar = Calendar.getInstance();\n Integer currentYear = calendar.get(Calendar.YEAR);\n Integer month = calendar.get(Calendar.MONTH); //Januar wird als \"0\" übergeben.\n Integer currentMonth = month + 1;\n\n String initialDateName = \"AutoDBFunction\" + currentYear.toString() + currentMonth.toString();\n\n //erstelle Speicherdatei und anlegen von Eintrag\n SharedPreferences sharedPreferences = getSharedPreferences(\"SP_DBFunction\", 0);\n SharedPreferences.Editor editor = sharedPreferences.edit(); //Editorklasse initialisieren (um zu schreiben)\n editor.putBoolean(initialDateName, true); //Inhalt übergeben (Key, Value)\n editor.commit();\n }", "@java.lang.SuppressWarnings(\"unused\") // This method is called by Hybris to start the init scripts\n @SystemSetup(type = SystemSetup.Type.ALL, process = SystemSetup.Process.INIT, extension = CoreConstants.EXTENSIONNAME)\n public void runInitDeploymentScripts(final SystemSetupContext hybrisContext) {\n if (getConfiguredCreateDataStep().equals(hybrisContext.getType())) {\n if (LOG.isInfoEnabled()) {\n LOG.info(\"Running all INIT deployment scripts.\");\n }\n this.runAllPendingScriptsInAllExtensions(true);\n } else {\n if (LOG.isTraceEnabled()) {\n LOG.trace(String.format(\"Not running the init deployment scripts because were are in the %s data creation.\", hybrisContext.getType()));\n }\n\n }\n }", "public void copyDatabaseFromAsset() {\n\n /** Just to calculate time How much it will take to copy database */\n //Utility t = new Utility();\n\n\t\t/* Insert Database */\n DBHelper db = new DBHelper(this);\n\n try {\n boolean dbExist = db.isDataBaseAvailable();\n\n if (!dbExist)\n db.copyDataBaseFromAsset();\n\n /* Force fully calling onCreate to create table of Favourite*/\n //db.onCreate(db.getWritableDatabase());\n\n } catch (Exception e) {\n AppLogger.writeLog(\"state \" + TAG + \" -- \" + e.toString());\n\n if (AppConstants.DEBUG)\n Log.e(\"\", e.toString());\n }\n }", "public void createDB() {\n\t\ttry {\n\t\t\tBufferedReader br= new BufferedReader(new FileReader(\"db_schema.txt\"));\n\t\t\tString line= null;\n\t\t\tStringBuilder sb= new StringBuilder();\n\t\t\twhile ((line=br.readLine())!=null){\n\t\t\t\tsb.append(line);\n\t\t\t\tif(sb.length()>0 && sb.charAt(sb.length()-1)==';'){//see if it is the end of one line of command\n\t\t\t\t\tstatement.executeUpdate(sb.toString());\n\t\t\t\t\tsb= new StringBuilder();\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.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} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void insertTestDataExport() throws ArcException {\n\t\tinsertTestData(\"BdDTest/script_test_export.sql\");\n\t}", "private void prepare()\n {\n // Add three lines to this doc with your class constructor and your row and seat number\n // Make sure to match your first and last name to the class file you created.\n\n /* Example */\n KilgoreTrout kilgoretrout = new KilgoreTrout(\"Kilgore\", \"Trout\", 1, 1);\n addObject(kilgoretrout, 1, 1);\n kilgoretrout.sitDown();\n \n riajain = new RiaJain(\"Ria\", \"Jain\", 2, 1);\n addObject(riajain, riajain.myRow, riajain.mySeat);\n riajain.sitDown();\n }", "@Override\n public void prepare() {\n applicationDeployer.initialize();\n this.initialize();\n }", "public void prepare() {\n\t\tSystem.out.println(\"NYStyleCheesePizza prepared!!\");\r\n\t}", "@Before\n public void setUp() {\n JdbcTestUtils.executeSqlScript(jdbcTemplate,\n new ClassPathResource(\"sql/category.sql\"), false);\n }", "private void prepare(AdminCommandContext c, String arg, OutputType type) {\n outputType = type;\n context = c;\n prepareReporter();\n // DAS runs the show on this command. If we are running in an\n // instance -- that means we should call runLocally() AND it also\n // means that the pattern is already perfect!\n\n if (isDas())\n prepareDas(arg);\n else\n prepareInstance(arg);\n }", "private void prepare()\n {\n Victoria victoria = new Victoria();\n addObject(victoria,190,146);\n Salir salir = new Salir();\n addObject(salir,200,533);\n Volver volver = new Volver();\n addObject(volver,198,401);\n }", "public void preSetup() {\r\n // Any of your pre setup before the loop starts should go here\r\n }", "@Override\n\tprotected void prepare() {\n\t\tfor(ProcessInfoParameter parameter :getParameter()){\n\t\t\tString name = parameter.getParameterName();\n\t\t\tif(parameter.getParameter() == null){\n\t\t\t\t;\n\t\t\t}else if(name.equals(\"XX_TipoRetencion\")){\n\t\t\t\tp_TypeRetention = (String) parameter.getParameter();\n\t\t\t}\n\t\t\telse if(name.equals(\"C_Invoice_From_ID\"))\n\t\t\t\tp_Invoice_From = parameter.getParameterAsInt();\t\n\t\t\telse if(name.equals(\"C_Invoice_To_ID\"))\n\t\t\t\tp_Invoice_To = parameter.getParameterAsInt();\t\n\t\t\telse if(name.equals(\"DateDoc\"))\n\t\t\t\tp_DateDoc = (Timestamp) parameter.getParameter();\t\t\n\t\t}\n\t}" ]
[ "0.58498555", "0.58103496", "0.5704054", "0.5702856", "0.56893915", "0.5662129", "0.56269336", "0.5598559", "0.5554486", "0.5547343", "0.5538641", "0.54936886", "0.5488337", "0.5488337", "0.5437661", "0.543161", "0.5420078", "0.53942126", "0.5348435", "0.5339684", "0.5325557", "0.5312015", "0.528962", "0.52895635", "0.52894175", "0.5280101", "0.52599096", "0.5236345", "0.5235397", "0.5218301", "0.5197465", "0.51973885", "0.5189064", "0.5137061", "0.51340735", "0.51121", "0.51060855", "0.510587", "0.5105142", "0.5102407", "0.50929534", "0.50832015", "0.50799143", "0.505906", "0.50523674", "0.5051748", "0.50492364", "0.5013025", "0.5012717", "0.5012306", "0.49980626", "0.49762625", "0.49738786", "0.49650303", "0.49635553", "0.49621785", "0.49591115", "0.49581093", "0.49545386", "0.4940755", "0.49199322", "0.49189258", "0.4911157", "0.49072245", "0.49032748", "0.49003348", "0.48999193", "0.48995656", "0.48732957", "0.48572037", "0.48352858", "0.48311892", "0.48040423", "0.47824407", "0.47820956", "0.47798514", "0.47767958", "0.47763175", "0.47760049", "0.47714868", "0.47681525", "0.4759098", "0.47578722", "0.47570673", "0.47560376", "0.4752059", "0.47448838", "0.47407362", "0.4732253", "0.47304204", "0.47298524", "0.47271013", "0.4723072", "0.47206408", "0.47201177", "0.47182754", "0.4699895", "0.46941084", "0.46838623", "0.4676314" ]
0.7731438
0
Set DDL to text area.
protected void setDDLText() { MigrationConfiguration cfg = getMigrationWizard().getMigrationConfig(); if (cfg.sourceIsSQL()) { btnPreviewDDL.setSelection(false); btnPreviewDDL.setEnabled(false); switchText(false); return; } txtDDL.setText(""); prepare4SaveScript(); List<Table> tables = new ArrayList<Table>(); final CUBRIDSQLHelper ddlUtils = CUBRIDSQLHelper.getInstance(null); StringBuffer sbConstrains = new StringBuffer(); appendSchemaDDL(cfg); for (SourceEntryTableConfig setc : cfg.getExpEntryTableCfg()) { if (!setc.isCreateNewTable()) { continue; } Table tarTbl = null; tarTbl = cfg.getTargetTableSchema(setc.getTargetOwner(), setc.getTarget()); if (tarTbl == null || tables.contains(tarTbl)) { continue; } if (setc != null && setc.getComment() != null) { if (tarTbl.getComment() == null || tarTbl.getComment() != setc.getComment()) { tarTbl.setComment(setc.getComment()); } } else { tarTbl.setComment(null); } for (Column tarCol : tarTbl.getColumns()) { SourceColumnConfig sourceCol = setc.getColumnConfigIgnoreCase(tarCol.getName()); if (sourceCol != null && tarCol != null){ if (sourceCol.getComment() != null) { if (tarCol.getComment() == null || tarCol.getComment() != sourceCol.getComment()){ tarCol.setComment(sourceCol.getComment()); } } else { tarCol.setComment(null); } } } tables.add(tarTbl); String sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema()); txtDDL.append(sql); txtDDL.append(NEWLINE); final PK pk = tarTbl.getPk(); if (setc.isCreatePK() && pk != null) { String ddl = ddlUtils.getPKDDL(tarTbl.getOwner(), tarTbl.getName(), pk.getName(), pk.getPkColumns(), cfg.isAddUserSchema()); sbConstrains.append(ddl); sbConstrains.append(";"); sbConstrains.append(NEWLINE); sbConstrains.append(NEWLINE); } for (FK fk : tarTbl.getFks()) { String ddl = ddlUtils.getFKDDL(tarTbl.getOwner(), tarTbl.getName(), fk, cfg.isAddUserSchema()); sbConstrains.append(ddl); sbConstrains.append(";"); sbConstrains.append(NEWLINE); sbConstrains.append(NEWLINE); } for (Index idx : tarTbl.getIndexes()) { String ddl = ddlUtils.getIndexDDL(tarTbl.getOwner(), tarTbl.getName(), idx, "", cfg.isAddUserSchema()); sbConstrains.append(ddl); sbConstrains.append(";"); sbConstrains.append(NEWLINE); sbConstrains.append(NEWLINE); } } for (SourceSQLTableConfig sstc : cfg.getExpSQLCfg()) { if (!sstc.isCreateNewTable()) { continue; } Table tarTbl = cfg.getTargetTableSchema(sstc.getTarget()); if (tarTbl == null || tables.contains(tarTbl)) { continue; } tables.add(tarTbl); String sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema()); txtDDL.append(sql); txtDDL.append(NEWLINE); } for (SourceViewConfig sc : cfg.getExpViewCfg()) { if (!sc.isCreate()) { continue; } View vw = cfg.getTargetViewSchema(sc.getTargetOwner(), sc.getTarget()); String ddl = ddlUtils.getViewDDL(vw, cfg.isAddUserSchema()); txtDDL.append(ddl); txtDDL.append(NEWLINE); txtDDL.append(NEWLINE); } for (SourceSequenceConfig sc : cfg.getExpSerialCfg()) { if (!sc.isCreate()) { continue; } Sequence sq = cfg.getTargetSerialSchema(sc.getTargetOwner(), sc.getTarget()); String ddl = ddlUtils.getSequenceDDL(sq, cfg.isAddUserSchema()); txtDDL.append(ddl); txtDDL.append(NEWLINE); txtDDL.append(NEWLINE); } for (SourceCSVConfig sstc : cfg.getCSVConfigs()) { if (!sstc.isCreate()) { continue; } Table tarTbl = cfg.getTargetTableSchema(sstc.getTarget()); if (tarTbl == null || tables.contains(tarTbl)) { continue; } tables.add(tarTbl); String sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema()); txtDDL.append(sql); txtDDL.append(NEWLINE); } txtDDL.append(sbConstrains.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void putDataToTextArea() {\n jTextArea1.setEditable(false);\n jTextArea1.setText(selectedFoods);\n }", "public void setAreaText(String text) {\n description.setText(text);\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 void setText(String aText) {\n\t\tif (aText != null) {\n\t\t\tif (aText.length() == 0) {\n\t\t\t\taText = \"Sorry, no valid SQL.\";\n\t\t\t}\n\t\t\tmEditor.setEditable(true);\n\t\t\tmEditor.setText(aText);\n\t\t\tmEditor.setEditable(false);\n\t\t}\n\t}", "protected native void setTextAreaToTinyMCE(String id) /*-{\r\n\t\t$wnd.tinyMCE.execCommand('mceAddControl', true, id);\r\n\t}-*/;", "public void setTextTablaEd(String text) { doSetText(this.$element_TablaEd, text); }", "public static void designTextEditor() {\n\t\t\n\t}", "public void modifyText(ModifyEvent e) {\n \t\t\tdialectSetting = comboDialect.getText();\r\n \t\t}", "@Override\n public void startEdit() {\n super.startEdit();\n\n if (text_field == null) {\n createTextField();\n }\n setText(null);\n setGraphic(text_field);\n text_field.selectAll();\n }", "TEXTAREA createTEXTAREA();", "private void setupTextField() {\n getNodes();\n List<String> nodeLongNames = new LinkedList<String>(nodeIDs.keySet());\n TextFields.bindAutoCompletion(nodeSelectTextField, nodeLongNames.toArray());\n\n nodeSelectTextField.setOnAction(param -> {\n if(!new LinkedList<String>(nodeIDs.keySet()).contains(nodeSelectTextField.getText())) {\n nodeSelectTextField.setText(\"\");\n return;\n }\n longName = nodeSelectTextField.getText();\n nodeID = nodeIDs.get(longName);\n if(eventHandler != null) {\n eventHandler.handle(param);\n }\n });\n }", "public void setDDTEXT(java.lang.String value)\n {\n if ((__DDTEXT == null) != (value == null) || (value != null && ! value.equals(__DDTEXT)))\n {\n _isDirty = true;\n }\n __DDTEXT = value;\n }", "protected void switchText(boolean flag) {\n\t\ttxtDDL.setVisible(flag);\n\t\tGridData gd = (GridData) txtDDL.getLayoutData();\n\t\tgd.exclude = !flag;\n\t\ttxtSummary.setVisible(!flag);\n\t\tgd = (GridData) txtSummary.getLayoutData();\n\t\tgd.exclude = flag;\n\t\ttxtDDL.getParent().layout();\n\t\tbtnPreviewDDL.setSelection(flag);\n\t}", "private void setTextArea(String type)\n\t{\n\t\tif (type.equals(\"CreditTransaction\"))\n\t\t\ttaDSIXML.setText(mCreditTran);\n\t\telse if (type.equals(\"GiftTransaction\"))\n\t\t\ttaDSIXML.setText(mGiftTran);\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADMLE.Admin_DDL_Create();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "@Override\r\n\tpublic DTextArea setHtmlId(String id) {\r\n\t\tsuper.setHtmlId(id) ;\r\n\t\treturn this ;\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADMLE.Admin_DDL_Alter();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "public void setTxtId(String txtId) {\n this.txtId.setText(txtId);\n }", "public void setLinedText(JTextArea textbox, ArrayList<String> ppltolist){\n String list = \" \";\n for (String fl : ppltolist){\n list = list.concat( fl + \"\\n\");\n }\n textbox.setText(list);\n textbox.setBorder(BorderFactory.createEmptyBorder(3, 5, 5, 5));\n textbox.setPreferredSize(new Dimension(400,7+ 17*ppltolist.size()));\n }", "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 void setText(String text) {\n\t\tthis.smartField.setContents(text);\n\t}", "public void setDefinition(String definition){\n\t\tdefinitionArea.setText(definition);\n\t}", "@Override\r\n\tpublic DTextArea setHtmlOnFocus(final String script) {\r\n\t\tsuper.setHtmlOnFocus(script) ;\r\n\t\treturn this ;\r\n\t}", "public void switchToEdit() {\n if (isReadOnly || deckPanel.getVisibleWidget() == TEXTAREA_INDEX) {\n return;\n }\n\n textArea.setText(getValue());\n deckPanel.showWidget(TEXTAREA_INDEX);\n textArea.setFocus(true);\n }", "public void setGUIMode (final TextArea text)\n {\n this.text = text;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADMLE.Admin_DDL_Drop();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "public void setSqlText(java.lang.String value) {\n\t\tsetValue(org.jooq.examples.oracle.sys.packages.dbms_xplan.DiffPlanOutline.SQL_TEXT, value);\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n String text = tagIdInsertTextBox.getText();\n if (text != null && text.length() > 0) {\n jTextAreaId.setText(jTextAreaId.getText() + \"\\n\" + text);\n tagIdInsertTextBox.setText(\"\");\n jTextAreaId.setRows(jTextAreaId.getLineCount());\n //f1.validate();\n }\n }", "public EditorTxt() {\n initComponents();\n }", "@Override\r\n\tpublic DTextArea setHtmlItem(final String item) {\r\n\t\tsuper.setHtmlItem(item) ;\r\n\t\treturn this ;\r\n\t}", "public void refreshDatabaseTextArea() {\n\ttry {\n\tList<OfficesList> offices = db.showOffices();\n\tdatabaseTextArea.setText(\"\");\n\t\tfor (OfficesList officesList : offices) {\n\t\t\tdatabaseTextArea.append(officesList.getOfficeCode() + \": \" + officesList.getCity() + \", \" + officesList.getPhone() + \", \" + officesList.getAddressLine1() + \", \" + officesList.getAddressLine2() + \", \" + officesList.getState() + \", \" + officesList.getCountry() + \", \" + officesList.getPostalCode() + \", \" + officesList.getTerritory() + \"\\n\");\n\t\t}\n\t} catch (SQLException err) {\n\t\terr.printStackTrace();\n\t}\n}", "public void setTextFechaInsercionEd(String text) { doSetText(this.$element_FechaInsercionEd, text); }", "public void setTextElMenu(String text) { doSetText(this.$element_ElMenu, text); }", "public void setTextElMenu(String text) { doSetText(this.$element_ElMenu, text); }", "public void setTextElMenu(String text) { doSetText(this.$element_ElMenu, text); }", "public void setTxt(String txt) {\n this.txt = txt;\n }", "public void setOptionText(String newText) {\n this.option = newText;\n\n this.database.update(\"AnswerOptions\", \"option = '\" + option + \"'\", \"optionId = \" + this.optionId);\n }", "public void setTextDivTableroControl(String text) { doSetText(this.$element_DivTableroControl, text); }", "public SrtEditorPanel_txtFieldOut()\n {\n initComponents();\n }", "void copyTextToTextBox(String text,boolean isMaxSet);", "void onNewTextSet(CodeEditor editor);", "public void setTextUsuarioInsercionEd(String text) { doSetText(this.$element_UsuarioInsercionEd, text); }", "@Override\n public void setText(String text) {\n label.setText(text);\n textArea.setText(text);\n }", "public void ajouterTexteAide(String texte) {\r\n\t\tif (bulleAide != null)\r\n\t\t\tbulleAide.setText(\"<HTML><BODY>\" + texte + \"</HTML></BODY>\");\r\n\t}", "public DatosTextFieldPanel() {\n initComponents();\n }", "@Override\r\n\tpublic DTextArea setHtmlDraggable(final String draggable) { // true, false, auto\r\n\t\tsuper.setHtmlDraggable(draggable) ;\r\n\t\treturn this ;\r\n\t}", "@Override\n\t\tpublic void addText(String txt) {\n\t\t\t\n\t\t}", "private void updateText(){\n\t\tif(propertiesObj == null)\n\t\t\treturn;\n\n\t\tif(propertiesObj instanceof QuestionDef)\n\t\t\t((QuestionDef)propertiesObj).setText(txtText.getText());\n\t\telse if(propertiesObj instanceof OptionDef)\n\t\t\t((OptionDef)propertiesObj).setText(txtText.getText());\n\t\telse if(propertiesObj instanceof PageDef)\n\t\t\t((PageDef)propertiesObj).setName(txtText.getText());\n\t\telse if(propertiesObj instanceof FormDef)\n\t\t\t((FormDef)propertiesObj).setName(txtText.getText());\n\n\t\tformChangeListener.onFormItemChanged(propertiesObj);\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 void editTextEditorButton(){\n TextEditorTextfield.setText(textEditorPref);\n TextEditorDialog.setVisible(true);\n }", "private void add(){\r\n ArrayAdapter<String> adp3 = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, list);\r\n adp3.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n txtAuto3.setThreshold(1);\r\n txtAuto3.setAdapter(adp3);\r\n }", "private void init(String text)\n\t{\n\t\tthis.text = text;\n\n\t\tsetColor(ClassEntityView.getBasicColor());\n\t\tpopupMenu.addSeparator();\n\t\tfinal JMenuItem item = new JMenuItem(\"Delete commentary\", PersonalizedIcon.createImageIcon(Slyum.ICON_PATH + \"delete16.png\"));\n\t\titem.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tdelete();\n\t\t\t}\n\t\t});\n\t\t\n\t\tparent.selectOnly(this);\n\t\tpopupMenu.add(item);\n\t}", "private void setDataInFields() \n {\n quantityTxtFld.setText(farmer.getCropQuantity()+\"\");\n quantityTxtFld.setEnabled(false);\n }", "private void setText(Text text) {\n \t\tthis.text = text;\n \t}", "@Override\r\n\tpublic DTextArea setHtmlContentEditable(final String editable) {\r\n\t\tsuper.setHtmlContentEditable(editable) ;\r\n\t\treturn this ;\r\n\t}", "public void setDescription(String text)\n\t{\n\t\tthis.description = text;\n\t\tthis.repaint();\n\t}", "public void addTextAreaValue(String str){\n\t\tcenterPanel.addTextAreaValue(str);\n\t}", "public void limpaTextFields() {\n tfMatricula.setText(\"\");\n tfNome.setText(\"\");\n tfDataNascimento.setText(\"\");\n tfTelefone.setText(\"\");\n tfSalario.setText(\"\");\n }", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增员工\",\"输入员工信息,用空格分开,例如:001 Manager Tommy f 312039\",\"\",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 Staff values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"','\"+str[3]+\"','\"+str[4]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\tshowStaff();\r\n\t\t\t}", "public void setText(String text)\n {\n field.setText(text);\n }", "public void setText(String text) {\r\n\r\n\t}", "public void setTextDivEdicion(String text) { doSetText(this.$element_DivEdicion, text); }", "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\n\tprotected void setReferenceText(String reference) {\n\t\tgetRoot().setText(CoreDataTypeHelpers.createEDWithReference(reference));\n\t}", "public void setInputText(String text) {\n if (mTxtContent != null) {\n mTxtContent.setText(text);\n }\n }", "void copyItemInEdt() {\n\t\tedtMessage.setText(messageToPasteFromTheListView);\n\t}", "public void praticien_zone(){\n\n JLabel lbl_Praticien = new JLabel(\"Praticien :\");\n lbl_Praticien.setBounds(40, 50, 119, 16);\n add(lbl_Praticien);\n\n\n\n JTextField praticien = new JTextField();\n praticien.setBounds(200, 50, 200, 22);\n praticien.setEditable(false);\n try {\n praticien.setText((DAO_Praticien.nomPraticien(rapport_visite.elementAt(DAO_Rapport.indice)[1])));\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n add(praticien);\n\n }", "private void setupTextUI(TextField t, String ff, double f, double w, Pos p, double x, double y, boolean e) {\n\t\tt.setFont(Font.font(ff, f));\n\t\tt.setMinWidth(w);\n\t\tt.setMaxWidth(w);\n\t\tt.setAlignment(p);\n\t\tt.setLayoutX(x);\n\t\tt.setLayoutY(y);\n\t\tt.setEditable(e);\n\t}", "public TextArea()\n {\n super(AreaId.TEXT, new AsciiByteFormatter());\n }", "public void motif_zone(){\n\n JLabel lbl_Motif = new JLabel(\"Motif du Rapport :\");\n lbl_Motif.setBounds(40, 130, 119, 16);\n add(lbl_Motif);\n\n motif_content = new JTextField();\n motif_content.setBounds(200, 130, 200, 22);\n motif_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[4]);\n motif_content.setEditable(false);\n add(motif_content);\n\n\n\n }", "public void setText(String text) {\n\t\t\n\t}", "public void setText(String text) {\n\t\ttextField.setText(text);\n\t}", "public void setTextDataPathName(String txtPath){\n\t\ttxtDataPath.setText(txtPath);\n\t}", "public void limparCampos() {\n\t\tcodigoField.setText(\"\");\n\t\tdescricaoField.setText(\"\");\n\t\tcodigoField.setEditable(true);\n\t\tBorder border = BorderFactory.createLineBorder(Color.RED);\n\t\tcodigoField.setBorder(border);\n\t\tcodigoField.requestFocus();\n\t\tBorder border1 = BorderFactory.createLineBorder(Color.BLACK);\n\t\tdescricaoField.setBorder(border1);\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic DTextArea setHtmlId(CssIdConstant id) {\r\n\t\tsuper.setHtmlId(id) ;\r\n\t\treturn this ;\r\n\t}", "private void dropBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dropBox1ActionPerformed\n int sqlSelector = getSelections();\n sqlBuilder(sqlSelector);\n }", "private void createContents() throws SQLException {\n\t\tshell = new Shell(getParent(), SWT.SHELL_TRIM);\n\t\tshell.setImage(user.getIcondata().BaoduongIcon);\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\tsetText(\"Tạo Công việc (Đợt Bảo dưỡng)\");\n\t\tshell.setSize(777, 480);\n\t\tnew FormTemplate().setCenterScreen(shell);\n\n\t\tFill_ItemData fi = new Fill_ItemData();\n\n\t\tSashForm sashForm = new SashForm(shell, SWT.NONE);\n\t\tsashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));\n\n\t\tSashForm sashForm_3 = new SashForm(sashForm, SWT.VERTICAL);\n\n\t\tSashForm sashForm_2 = new SashForm(sashForm_3, SWT.NONE);\n\t\tComposite composite = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setText(\"Tên đợt Bảo dưỡng*:\");\n\n\t\ttext_Tendot_Baoduong = new Text(composite, SWT.BORDER);\n\t\ttext_Tendot_Baoduong.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\n\t\tLabel label_3 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_3 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_3.verticalIndent = 3;\n\t\tlabel_3.setLayoutData(gd_label_3);\n\t\tlabel_3.setText(\"Loại phương tiện:\");\n\n\t\tcombo_Loaiphuongtien = new Combo(composite, SWT.READ_ONLY);\n\t\tcombo_Loaiphuongtien.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\tFill_ItemData f = new Fill_ItemData();\n\t\t\t\t\tif ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Xemay()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Xemay());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t} else if ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Oto()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Oto());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcombo_Loaiphuongtien.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));\n\t\tfi.setComboBox_LOAIPHUONGTIEN_Phuongtien_Giaothong(combo_Loaiphuongtien, 0);\n\n\t\tLabel label_4 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_4 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_4.verticalIndent = 3;\n\t\tlabel_4.setLayoutData(gd_label_4);\n\t\tlabel_4.setText(\"Mô tả:\");\n\n\t\ttext_Mota = new Text(composite, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\n\t\ttext_Mota.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1));\n\t\tnew Label(composite, SWT.NONE);\n\n\t\tbtnNgunSaCha = new Button(composite, SWT.NONE);\n\t\tGridData gd_btnNgunSaCha = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnNgunSaCha.widthHint = 85;\n\t\tbtnNgunSaCha.setLayoutData(gd_btnNgunSaCha);\n\t\tbtnNgunSaCha.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tChonNguonSuachua_Baoduong cnsb = new ChonNguonSuachua_Baoduong(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\tcnsb.open();\n\t\t\t\t\tnsb = cnsb.getResult();\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null) {\n\t\t\t\t\t\tfillNguonSuachuaBaoduong(nsb);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (nsb == null) {\n\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CLOSE);\n\t\t\t\t\t\tm.setText(\"Xóa dữ liệu cũ?\");\n\t\t\t\t\t\tm.setMessage(\"Bạn muốn xóa dữ liệu cũ?\");\n\t\t\t\t\t\tint rc = m.open();\n\t\t\t\t\t\tswitch (rc) {\n\t\t\t\t\t\tcase SWT.CANCEL:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.YES:\n\t\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(-1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.NO:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t}\n\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG(ViewAndEdit_MODE_dsb);\n\t\t\t\t\tfillNguonSuachuaBaoduong(ViewAndEdit_MODE_dsb);\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnNgunSaCha.setText(\"Liên hệ\");\n\t\tbtnNgunSaCha.setImage(user.getIcondata().PhoneIcon);\n\n\t\tComposite composite_1 = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite_1.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblSXut = new Label(composite_1, SWT.NONE);\n\t\tlblSXut.setText(\"Số đề xuất: \");\n\n\t\ttext_Sodexuat = new Text(composite_1, SWT.NONE);\n\t\ttext_Sodexuat.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Sodexuat.setEditable(false);\n\t\ttext_Sodexuat.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyThng = new Label(composite_1, SWT.NONE);\n\t\tlblNgyThng.setText(\"Ngày tháng: \");\n\n\t\ttext_NgaythangVanban = new Text(composite_1, SWT.NONE);\n\t\ttext_NgaythangVanban.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_NgaythangVanban.setEditable(false);\n\t\ttext_NgaythangVanban.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblnV = new Label(composite_1, SWT.NONE);\n\t\tlblnV.setText(\"Đơn vị: \");\n\n\t\ttext_Donvi = new Text(composite_1, SWT.NONE);\n\t\ttext_Donvi.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Donvi.setEditable(false);\n\t\ttext_Donvi.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyXL = new Label(composite_1, SWT.NONE);\n\t\tlblNgyXL.setText(\"Ngày xử lý:\");\n\n\t\ttext_Ngaytiepnhan = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaytiepnhan.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaytiepnhan.setEditable(false);\n\t\ttext_Ngaytiepnhan.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyGiao = new Label(composite_1, SWT.NONE);\n\t\tlblNgyGiao.setText(\"Ngày giao:\");\n\n\t\ttext_Ngaygiao = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaygiao.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaygiao.setEditable(false);\n\t\ttext_Ngaygiao.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblTrchYu = new Label(composite_1, SWT.NONE);\n\t\tGridData gd_lblTrchYu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblTrchYu.verticalIndent = 3;\n\t\tlblTrchYu.setLayoutData(gd_lblTrchYu);\n\t\tlblTrchYu.setText(\"Ghi chú: \");\n\n\t\ttext_Trichyeu = new Text(composite_1, SWT.NONE);\n\t\ttext_Trichyeu.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Trichyeu.setEditable(false);\n\t\tGridData gd_text_Trichyeu = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n\t\tgd_text_Trichyeu.heightHint = 27;\n\t\ttext_Trichyeu.setLayoutData(gd_text_Trichyeu);\n\t\tnew Label(composite_1, SWT.NONE);\n\n\t\tbtnThemDexuat = new Button(composite_1, SWT.NONE);\n\t\tbtnThemDexuat.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tInsert_dx = null;\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null\n\t\t\t\t\t\t\t&& ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() > 0) {\n\t\t\t\t\t\tInsert_dx = controler.getControl_DEXUAT().get_DEXUAT(ViewAndEdit_MODE_dsb);\n\t\t\t\t\t}\n\t\t\t\t\tif (Insert_dx != null) {\n\t\t\t\t\t\tTAPHOSO ths = controler.getControl_TAPHOSO().get_TAP_HO_SO(Insert_dx.getMA_TAPHOSO());\n\t\t\t\t\t\tTaphoso_View thsv = new Taphoso_View(shell, SWT.DIALOG_TRIM, user, ths, false);\n\t\t\t\t\t\tthsv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tNhapDeXuat ndx = new NhapDeXuat(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\t\tndx.open();\n\t\t\t\t\t\tInsert_dx = ndx.result;\n\t\t\t\t\t\tif (Insert_dx == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tboolean ict = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(\n\t\t\t\t\t\t\t\t\t\tViewAndEdit_MODE_dsb, Ma_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tif (ict) {\n\t\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_WORKING);\n\t\t\t\t\t\t\tm.setText(\"Hoàn tất\");\n\t\t\t\t\t\t\tm.setMessage(\"Thêm Đề xuất Hoàn tất\");\n\t\t\t\t\t\t\tm.open();\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (NullPointerException | SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnThemDexuat.setImage(user.getIcondata().DexuatIcon);\n\t\tbtnThemDexuat.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));\n\t\tbtnThemDexuat.setText(\"Thêm Hồ sơ\");\n\t\tsashForm_2.setWeights(new int[] { 1000, 618 });\n\n\t\tSashForm sashForm_1 = new SashForm(sashForm_3, SWT.NONE);\n\t\ttree_PTTS = new Tree(sashForm_1, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);\n\t\ttree_PTTS.setLinesVisible(true);\n\t\ttree_PTTS.setHeaderVisible(true);\n\t\ttree_PTTS.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event arg0) {\n\t\t\t\tTreeItem[] til = tree_PTTS.getSelection();\n\t\t\t\tif (til.length > 0) {\n\t\t\t\t\tRow_PTTSthamgia_Baoduong pttg = (Row_PTTSthamgia_Baoduong) til[0].getData();\n\t\t\t\t\tsetHinhthuc_Baoduong(pttg.getHtbd());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttree_PTTS.addListener(SWT.SetData, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tif (tree_PTTS.getItems().length > 0) {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tTreeColumn trclmnStt = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnStt.setWidth(50);\n\t\ttrclmnStt.setText(\"Stt\");\n\n\t\tTreeColumn trclmnTnMT = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnTnMT.setWidth(100);\n\t\ttrclmnTnMT.setText(\"Tên, mô tả\");\n\n\t\tTreeColumn trclmnHngSnXut = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnHngSnXut.setWidth(100);\n\t\ttrclmnHngSnXut.setText(\"Hãng sản xuất\");\n\n\t\tTreeColumn trclmnDngXe = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnDngXe.setWidth(100);\n\t\ttrclmnDngXe.setText(\"Dòng xe\");\n\n\t\tTreeColumn trclmnBinS = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBinS.setWidth(100);\n\t\ttrclmnBinS.setText(\"Biển số\");\n\n\t\tTreeColumn trclmnNgySDng = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnNgySDng.setWidth(100);\n\t\ttrclmnNgySDng.setText(\"Ngày sử dụng\");\n\n\t\tTreeColumn trclmnMPhngTin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnMPhngTin.setWidth(90);\n\t\ttrclmnMPhngTin.setText(\"Mã PTTS\");\n\n\t\tMenu menu = new Menu(tree_PTTS);\n\t\ttree_PTTS.setMenu(menu);\n\n\t\tMenuItem mntmThmPhngTin = new MenuItem(menu, SWT.NONE);\n\t\tmntmThmPhngTin.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tThem_PTGT();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmntmThmPhngTin.setText(\"Thêm phương tiện tài sản\");\n\n\t\tMenuItem mntmXoa = new MenuItem(menu, SWT.NONE);\n\t\tmntmXoa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tdelete();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tmntmXoa.setText(\"Xóa\");\n\n\t\tTreeColumn trclmnThayNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayNht.setWidth(70);\n\t\ttrclmnThayNht.setText(\"Thay nhớt\");\n\n\t\tTreeColumn trclmnThayLcNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNht.setWidth(100);\n\t\ttrclmnThayLcNht.setText(\"Thay lọc nhớt\");\n\n\t\tTreeColumn trclmnThayLcGi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcGi.setWidth(100);\n\t\ttrclmnThayLcGi.setText(\"Thay lọc gió\");\n\n\t\tTreeColumn trclmnThayLcNhin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNhin.setWidth(100);\n\t\ttrclmnThayLcNhin.setText(\"Thay lọc nhiên liệu\");\n\n\t\tTreeColumn trclmnThayDuPhanh = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuPhanh.setWidth(100);\n\t\ttrclmnThayDuPhanh.setText(\"Thay Dầu phanh - ly hợp\");\n\n\t\tTreeColumn trclmnThayDuHp = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuHp.setWidth(100);\n\t\ttrclmnThayDuHp.setText(\"Thay Dầu hộp số\");\n\n\t\tTreeColumn trclmnThayDuVi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuVi.setWidth(100);\n\t\ttrclmnThayDuVi.setText(\"Thay Dầu vi sai\");\n\n\t\tTreeColumn trclmnLcGiGin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnLcGiGin.setWidth(100);\n\t\ttrclmnLcGiGin.setText(\"Lọc gió giàn lạnh\");\n\n\t\tTreeColumn trclmnThayDuTr = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuTr.setWidth(100);\n\t\ttrclmnThayDuTr.setText(\"Thay dầu trợ lực lái\");\n\n\t\tTreeColumn trclmnBoDngKhcs = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBoDngKhcs.setWidth(100);\n\t\ttrclmnBoDngKhcs.setText(\"Bảo dưỡng khác\");\n\n\t\tExpandBar expandBar = new ExpandBar(sashForm_1, SWT.V_SCROLL);\n\t\texpandBar.setForeground(SWTResourceManager.getColor(SWT.COLOR_LIST_FOREGROUND));\n\n\t\tExpandItem xpndtmLoiHnhBo = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setText(\"Loại hình bảo dưỡng\");\n\n\t\tComposite grpHnhThcBo = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setControl(grpHnhThcBo);\n\t\tgrpHnhThcBo.setLayout(new GridLayout(1, false));\n\n\t\tbtnDaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDaudongco.setText(\"Dầu động cơ\");\n\n\t\tbtnLocdaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocdaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocdaudongco.setText(\"Lọc dầu động cơ\");\n\n\t\tbtnLocgio = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgio.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgio.setText(\"Lọc gió\");\n\n\t\tbtnLocnhienlieu = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocnhienlieu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocnhienlieu.setText(\"Lọc nhiên liệu\");\n\n\t\tbtnDauphanh_lyhop = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauphanh_lyhop.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauphanh_lyhop.setText(\"Dầu phanh và dầu ly hợp\");\n\n\t\tbtnDauhopso = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauhopso.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauhopso.setText(\"Dầu hộp số\");\n\n\t\tbtnDauvisai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauvisai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauvisai.setText(\"Dầu vi sai\");\n\n\t\tbtnLocgiogianlanh = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgiogianlanh.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgiogianlanh.setText(\"Lọc gió giàn lạnh\");\n\n\t\tbtnDautroluclai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDautroluclai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDautroluclai.setText(\"Dầu trợ lực lái\");\n\n\t\tbtnBaoduongkhac = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnBaoduongkhac.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBaoduongkhac.setText(\"Bảo dưỡng khác\");\n\t\txpndtmLoiHnhBo.setHeight(xpndtmLoiHnhBo.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);\n\n\t\tExpandItem xpndtmLinH = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLinH.setText(\"Liên hệ\");\n\n\t\tComposite composite_2 = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLinH.setControl(composite_2);\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblTnLinH = new Label(composite_2, SWT.NONE);\n\t\tlblTnLinH.setText(\"Tên liên hệ: \");\n\n\t\ttext_Tenlienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Tenlienhe.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblGiiThiu = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblGiiThiu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblGiiThiu.verticalIndent = 3;\n\t\tlblGiiThiu.setLayoutData(gd_lblGiiThiu);\n\t\tlblGiiThiu.setText(\"Giới thiệu: \");\n\n\t\ttext_Gioithieu = new Text(composite_2, SWT.BORDER);\n\t\ttext_Gioithieu.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\n\t\tLabel lblLinH = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblLinH = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblLinH.verticalIndent = 3;\n\t\tlblLinH.setLayoutData(gd_lblLinH);\n\t\tlblLinH.setText(\"Liên hệ: \");\n\n\t\ttext_Lienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Lienhe.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\txpndtmLinH.setHeight(120);\n\t\tsashForm_1.setWeights(new int[] { 543, 205 });\n\t\tsashForm_3.setWeights(new int[] { 170, 228 });\n\t\tsashForm.setWeights(new int[] { 1000 });\n\n\t\tbtnLuu = new Button(shell, SWT.NONE);\n\t\tbtnLuu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (dataCreate != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tTaoMoi_DotSuachua_Baoduong();\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate void TaoMoi_DotSuachua_Baoduong() throws SQLException {\n\t\t\t\tif (checkTextNotNULL()) {\n\t\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = getDOT_SUACHUA_BAODUONG();\n\t\t\t\t\tint key = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.InsertDOT_THUCHIEN_SUACHUA_BAODUONG(dsb, null, null);\n\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\tif (key >= 0) {\n\t\t\t\t\t\tif (nsb != null)\n\t\t\t\t\t\t\tdsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG().update_DOT_THUCHIEN_SUACHUA_BAODUONG(dsb);\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien > 0)\n\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(dsb,\n\t\t\t\t\t\t\t\t\t\t\tMa_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tTreeItem[] til = tree_PTTS.getItems();\n\t\t\t\t\t\tif (til.length > 0) {\n\t\t\t\t\t\t\tfor (TreeItem ti : til) {\n\t\t\t\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\t\t\t\tRow_PTTSthamgia_Baoduong rp = (Row_PTTSthamgia_Baoduong) ti.getData();\n\t\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG_TAISAN()\n\t\t\t\t\t\t\t\t\t\t.set_DOT_THUCHIEN_SUACHUA_TAISAN(dsb, rp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tshowMessage_Succes();\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tGiaoViec gv = new GiaoViec(user);\n\t\t\t\t\t\tgv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowMessage_Fail();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tshowMessage_FillText();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate DOT_THUCHIEN_SUACHUA_BAODUONG getDOT_SUACHUA_BAODUONG() {\n\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = new DOT_THUCHIEN_SUACHUA_BAODUONG();\n\t\t\t\tdsb.setTEN_DOT_THUCHIEN_SUACHUA_BAODUONG(text_Tendot_Baoduong.getText());\n\t\t\t\tdsb.setLOAI_PHUONG_TIEN(\n\t\t\t\t\t\tInteger.valueOf((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText())));\n\t\t\t\tdsb.setSUACHUA_BAODUONG(fi.getInt_Baoduong());\n\t\t\t\tdsb.setMO_TA(text_Mota.getText());\n\t\t\t\treturn dsb;\n\t\t\t}\n\n\t\t});\n\t\tGridData gd_btnLu = new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1);\n\t\tgd_btnLu.widthHint = 75;\n\t\tbtnLuu.setLayoutData(gd_btnLu);\n\t\tbtnLuu.setText(\"Xong\");\n\n\t\tbtnDong = new Button(shell, SWT.NONE);\n\t\tbtnDong.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if (Insert_dx != null)\n\t\t\t\t\t\t// controler.getControl_DEXUAT().delete_DEXUAT(Insert_dx);\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tGridData gd_btnDong = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnDong.widthHint = 75;\n\t\tbtnDong.setLayoutData(gd_btnDong);\n\t\tbtnDong.setText(\"Đóng\");\n\t\tinit_loadMODE();\n\t\tinit_CreateMode();\n\t}", "public void setText( String text );", "@Override\r\n\tpublic DTextArea setHtmlOnEnded(final String script) {\r\n\t\tsuper.setHtmlOnEnded(script) ;\r\n\t\treturn this ;\r\n\t}", "private JTextArea getTxtDsDocPendente() {\r\n\t\tif (txtDsDocPendente == null) {\r\n\t\t\ttxtDsDocPendente = new JTextArea();\r\n\t\t\ttxtDsDocPendente.setBounds(new Rectangle(12, 94, 375, 126));\r\n\t\t\ttxtDsDocPendente.setToolTipText(\"Descrição do documento pendente do aluno\");\r\n\t\t}\r\n\t\treturn txtDsDocPendente;\r\n\t}", "public void setDatabaseName(String text) {\n txtDatabaseName().setText(text);\n }", "public void setText(String text) {\n\t\tthis.text = text;\n\t\thandleConfig(\"text\", text);\n\t}", "public StringEditor() {\n\t\tsuper();\n\t\tmEditor = new JTextField();\n\t\t\n\t}", "public void setText(String text) {\n this.textData = text;\n }", "public void setTextAreaValue(String str){\n\t\tcenterPanel.setTextAreaValue(str);\n\t}", "public void setText(String t) {\n\t\t\ttext.set(t);\n\t\t}", "public void appendSchemaDDL(MigrationConfiguration cfg) {\n\t\tMigrationConfiguration config = getMigrationWizard().getMigrationConfig();\n\t\t\n\t\tList<String> schemaList = config.getNewTargetSchema();\n\t\t\n\t\tfor (String schemaName : schemaList) {\n\t\t\ttxtDDL.append(\"CREATE USER \" + schemaName);\n\t\t\ttxtDDL.append(\";\");\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t}", "private void createTextContextMenu() {\n String id = \"de.loskutov.bco.views.BytecodeOutlineView#ContextMenu\"; //$NON-NLS-1$\n contextMenuManager = new MenuManager(\"#ContextMenu\", id); //$NON-NLS-1$\n contextMenuManager.setRemoveAllWhenShown(true);\n contextMenuManager.addMenuListener(new IMenuListener() {\n\n @Override\n public void menuAboutToShow(IMenuManager m) {\n contextMenuAboutToShow(m);\n }\n });\n Menu menu = contextMenuManager.createContextMenu(textControl);\n textControl.setMenu(menu);\n\n getSite().registerContextMenu(id, contextMenuManager, textViewer);\n }", "public void setTextEstadoEd(String text) { doSetText(this.$element_EstadoEd, text); }", "@Override\r\n\tpublic DTextArea setHtmlOnEmptied(final String script) {\r\n\t\tsuper.setHtmlOnEmptied(script) ;\r\n\t\treturn this ;\r\n\t}", "public void limpar() {\n textArea.setText(\"\");\n }", "@Override\r\n\tpublic void setText() {\n\t\t\r\n\t}", "public static void editTextArea(String context) {\r\n\t\ttextArea.append(context+\"\\n\");\r\n\t}", "@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}", "public void select()\n {\n super.select();\n SwingUtilities.invokeLater(() -> _sqlPanel.getSQLEntryPanel().requestFocus());\n }", "private JTextField getTextFieldDescription() {\r\n JTextField textFieldDescription = makeJTextField(1, 100, 130, 200, 25);\r\n textFieldDescription.setName(\"Desc\");\r\n return textFieldDescription;\r\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 }", "@Override\r\n\tpublic DTextArea dsfAccept(final IDNodeVisitor visitor) {\r\n\t\tsuper.dsfAccept(visitor) ;\r\n\t\treturn this;\r\n\t}", "private void set_autotext_adapters(){\n ArrayAdapter<String> amount_adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_dropdown_item_1line, amount_autos);\n amount_text = (AutoCompleteTextView)\n findViewById(R.id.add_group_transaction_amount);\n amount_text.setAdapter(amount_adapter);\n ArrayAdapter<String> memo_adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_dropdown_item_1line, memo_autos);\n memo_text = (AutoCompleteTextView)\n findViewById(R.id.add_group_transaction_memo);\n memo_text.setAdapter(memo_adapter);\n }", "public void SetTextField()\r\n\t{\n\t\tLoadSettings();\r\n\r\n\t\ttextView_reader.setFileName(fileName);\r\n\t\ttextView_reader.setTextSize(Setting_text_size);\r\n\t\ttextView_reader.setTextColor(DefaultSetting.color[Setting_text_color]);\r\n//\t\ttextView_reader.setBackgroundColor(DefaultSetting.color[Setting_bg_color]);\r\n\t\ttextView_reader.setTextCode(Setting_text_code);\r\n\t\tSystem.out.println(\"Setting_text_size = \" + Setting_text_size);\r\n\t}" ]
[ "0.6229173", "0.6106782", "0.5993547", "0.5787741", "0.5778346", "0.5775866", "0.5762888", "0.5741137", "0.57362074", "0.569331", "0.560512", "0.5586123", "0.5578929", "0.5565633", "0.5498321", "0.5485064", "0.5443642", "0.544112", "0.5424272", "0.53972936", "0.53889143", "0.5384424", "0.5361292", "0.53411996", "0.5329334", "0.5324009", "0.53172684", "0.5306009", "0.5302155", "0.5299853", "0.52822167", "0.52660584", "0.5256292", "0.5256292", "0.5256292", "0.52379763", "0.5235234", "0.5232811", "0.5223336", "0.5219509", "0.52152854", "0.52065355", "0.5204533", "0.52031237", "0.520146", "0.51871914", "0.5173571", "0.51683295", "0.51563054", "0.5150787", "0.51483613", "0.5125074", "0.5108254", "0.51012737", "0.50866216", "0.5081913", "0.50792027", "0.5078681", "0.5077844", "0.50768334", "0.50762874", "0.50746447", "0.50639534", "0.5055823", "0.5053113", "0.5051406", "0.50494844", "0.5042138", "0.5041762", "0.50400275", "0.5031714", "0.5028195", "0.5023359", "0.50232565", "0.50157136", "0.50134814", "0.5013241", "0.50121105", "0.50073695", "0.50046", "0.49853107", "0.49818608", "0.49811065", "0.49788448", "0.4978696", "0.49758947", "0.49752668", "0.4974922", "0.49685413", "0.49607444", "0.49588117", "0.4955516", "0.49512964", "0.4949269", "0.49473637", "0.49447137", "0.4938018", "0.49369216", "0.49344745", "0.49332654" ]
0.72129804
0
Set "create user" query
public void appendSchemaDDL(MigrationConfiguration cfg) { MigrationConfiguration config = getMigrationWizard().getMigrationConfig(); List<String> schemaList = config.getNewTargetSchema(); for (String schemaName : schemaList) { txtDDL.append("CREATE USER " + schemaName); txtDDL.append(";"); txtDDL.append(NEWLINE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void createMysqlUser(Eleve e) {\n Session session = HibernateUtils.getSessionFactory().openSession();\r\n String SQLRequest = \"CREATE USER '\" + e.getAbreviation() + \"'@'%' IDENTIFIED BY '\" + e.getPwd() + \"'; \";\r\n System.out.println(SQLRequest);\r\n session.beginTransaction();\r\n session.createSQLQuery(SQLRequest).executeUpdate();\r\n session.getTransaction().commit();\r\n session.close();\r\n\r\n }", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "public void userCreated(UserCreateCommand command) {\n\t\t}", "private String getCreateUserSQL(String targetSchemaName) {\n\t\treturn \"CREATE USER \" + targetSchemaName + \";\";\n\t}", "Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);", "public void creatUser(String name, String phone, String email, String password);", "public void createUser(User user) {\n\n\t}", "private String createUser(String name) {\n\t\treturn null;\n\t}", "public static void CreateUser(Messenger esql){\n try{\n System.out.print(\"\\tEnter user login: \");\n String login = in.readLine();\n System.out.print(\"\\tEnter user password: \");\n String password = in.readLine();\n System.out.print(\"\\tEnter user phone: \");\n String phone = in.readLine();\n //Creating empty contact\\block lists for a user\n esql.executeUpdate(\"INSERT INTO USER_LIST(list_type) VALUES ('block')\");\n int block_id = esql.getCurrSeqVal(\"user_list_list_id_seq\");\n esql.executeUpdate(\"INSERT INTO USER_LIST(list_type) VALUES ('contact')\");\n int contact_id = esql.getCurrSeqVal(\"user_list_list_id_seq\");\n String query = String.format(\"INSERT INTO USR (phoneNum, \" +\n \"login, password, block_list, \" + \n \"contact_list) VALUES ('%s','%s','%s',%s,%s)\"\n , phone, login, password, block_id, contact_id);\n\n esql.executeUpdate(query);\n System.out.println (\"User successfully created!\");\n }catch(Exception e){\n System.err.println (e.getMessage ());\n }\n }", "private void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }", "public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public Builder setCreateUser(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n createUser_ = value;\n onChanged();\n return this;\n }", "public void setCreateUser(String createUser)\r\n\t{\r\n\t\tthis.createUser = createUser;\r\n\t}", "public void createUser(String userName, String password,\n boolean createDB) throws Exception;", "public void createUser(User user);", "void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser;\n }", "public void setCreateUser(String createUser) {\n this.createUser = createUser;\n }", "public void setCreateUser (String createUser) {\r\n\t\tthis.createUser = createUser;\r\n\t}", "public void setupUser() {\n }", "@Override\n\tpublic String createUserAccountQuery(String username, String password, String firstName, String lastName,\n\t\t\tString dob, String accountType, String accountID, String creationDate, String requestDate,\n\t\t\tString phoneNumber, String email, boolean isApproved) {\n\t\treturn null;\n\t}", "public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n\tpublic String createUserAccountQuery(AuthenticatedUser user) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String createUserAccountQuery(AuthenticatedUser user) {\n\t\treturn null;\r\n\t}", "public void initializeUser() {\n try {\n Connection connection = connect();\n\n PreparedStatement createCategoryTable = connection.prepareStatement(\"CREATE TABLE IF NOT EXISTS user (\"\n + \"id INTEGER PRIMARY KEY, \"\n + \"username VARCHAR(100),\"\n + \"password VARCHAR(100),\"\n + \"UNIQUE(username, password)\"\n + \");\"\n );\n createCategoryTable.execute();\n createCategoryTable.close();\n\n connection.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "private ServerCommand processCreateUserCommand(RoMClient client, CreateUserClientCommand createUserCommand) {\r\n \t\tboolean success = false;\r\n \r\n \t\t// Check if user is admin\r\n \t\tif (client.getIsAdmin()) {\r\n \t\t\tsuccess = this.dataLayer.addUser(createUserCommand.getNewUserName(), createUserCommand.getSHA1EncryptedPassword());\r\n \t\t}\r\n \r\n \t\tServerCommand serverResponseCommand = new CreateUserServerCommand(success, createUserCommand);\r\n \r\n \t\treturn serverResponseCommand;\r\n \t}", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "public void setCreateUser(String createUser) {\r\n\t\tthis.createUser = createUser;\r\n\t}", "public void setCreateUser(String createUser) {\r\n\t\tthis.createUser = createUser;\r\n\t}", "public void setCreateUser(Integer createUser) {\n this.createUser = createUser;\n }", "public void setCreateUser(Integer createUser) {\n this.createUser = createUser;\n }", "public void setCreateuser(Integer createuser) {\n this.createuser = createuser;\n }", "@Override\n\tpublic IUser creatUser() {\n\t\treturn new SqlServerUser();\n\t}", "public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }", "public void insertUser() {}", "User createUser(ResultSet resultSet, User user) throws SQLException;", "User createUser();", "int newUser(String username, String password, Time creationTime);", "CreateUserResult createUser(CreateUserRequest createUserRequest);", "public String getCreateUser () {\r\n\t\treturn createUser;\r\n\t}", "public String getCreateUser()\r\n\t{\r\n\t\treturn createUser;\r\n\t}", "public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void create(User user) {\n\t\t\n\t}", "boolean createUser(String username, String password);", "public void setCreateUser(User createUser)\r\n/* */ {\r\n/* 151 */ this.createUser = createUser;\r\n/* */ }", "UserCreateResponse createUser(UserCreateRequest request);", "public void setCreatedByUser(String createdByUser);", "public String getCreateUser() {\r\n\t\treturn createUser;\r\n\t}", "public String getCreateUser() {\r\n\t\treturn createUser;\r\n\t}", "public void setCreateUser(String newVal) {\n if ((newVal != null && this.createUser != null && (newVal.compareTo(this.createUser) == 0)) || \n (newVal == null && this.createUser == null && createUser_is_initialized)) {\n return; \n } \n this.createUser = newVal; \n\n createUser_is_modified = true; \n createUser_is_initialized = true; \n }", "void addUser(String uid, String firstname, String lastname, String pseudo);", "public boolean createNewUser(String username){\n boolean isCreated=false;\n try{\n\n database = dbH.getWritableDatabase();\n dbH.openDataBase();\n database.execSQL(\"INSERT INTO CurrentUser (Username) VALUES ('\" + username + \"');\");\n isCreated=true;\n dbH.close();\n }\n catch (SQLException e){\n }\n return isCreated;\n }", "public void setCreateUser(Long createUser) {\r\n this.createUser = createUser;\r\n }", "public void setCreateUser(Long createUser) {\r\n this.createUser = createUser;\r\n }", "public static void createAdministrator(OpBroker broker) {\n OpQuery query = broker.newQuery(OpUser.ADMINISTRATOR_ID_QUERY);\r\n Iterator result = broker.iterate(query);\r\n if (!result.hasNext()) {\r\n OpTransaction t = broker.newTransaction();\r\n OpUser administrator = new OpUser();\r\n administrator.setName(OpUser.ADMINISTRATOR_NAME);\r\n administrator.setDisplayName(OpUser.ADMINISTRATOR_DISPLAY_NAME);\r\n administrator.setDescription(OpUser.ADMINISTRATOR_DESCRIPTION);\r\n administrator.setPassword(OpUser.BLANK_PASSWORD);\r\n administrator.doSetLevel(new Byte(OpUser.MANAGER_USER_LEVEL));\r\n broker.makePersistent(administrator);\r\n OpContact contact = new OpContact();\r\n contact.setUser(administrator);\r\n broker.makePersistent(contact);\r\n t.commit();\r\n }\r\n }", "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "int createUser(User data) throws Exception;", "Human_User createHuman_User();", "@Override\r\n\tpublic Object createUser() throws DataAccessException, SQLException {\n\t\treturn null;\r\n\t}", "private void createUser(final String email, final String password) {\n\n }", "private void initUser() {\n\t}", "public void new_user(){\n }", "public UserAuthToken createUser(CreateUserRequest request);", "public void buildUsers() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS users (id TEXT, name TEXT,\"\n + \" cell TEXT, password INT, stripe_id TEXT, url TEXT,\"\n + \" PRIMARY KEY (id));\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "public void createSystemUser(String nam, String surnam, String id, String username, String password) {\n\t\ttry {\n\t\t\trestaurant.addUser(nam, surnam, id, username, password);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "String createUserRequest(String username, UserRequestType type);", "Boolean registerNewUser(User user);", "public String getCreateUser() {\r\n return createUser;\r\n }", "public String getCreateUser() {\r\n return createUser;\r\n }", "@Test (priority = 0)\n public void test001createUserWithUserNameOnlyTest() {\n close();\n login();\n\n checkLoginIsPerformed();\n //create user with filled user name only\n createUser(SIMPLE_USER_NAME, new HashMap<String, String>());\n checkOperationStatusOk(\"Save (GUI)\");\n\n //search for the created in users list\n searchForElement(SIMPLE_USER_NAME);\n $(By.linkText(SIMPLE_USER_NAME)).shouldBe(visible).click();\n }", "@Create\n public void create()\n {\n \n log.debug(\"Creating users and mailboxes\");\n //MailboxService ms = MMJMXUtil.getMBean(\"meldware.mail:type=MailboxManager,name=MailboxManager\", MailboxService.class);\n AdminTool at = MMJMXUtil.getMBean(\"meldware.mail:type=MailServices,name=AdminTool\", AdminTool.class);\n \n for (MeldwareUser meldwareUser : getUsers())\n {\n at.createUser(meldwareUser.getUsername(), meldwareUser.getPassword(), meldwareUser.getRoles());\n // TODO This won't work on AS 4.2\n /*Mailbox mbox = ms.createMailbox(meldwareUser.getUsername());\n for (String alias : meldwareUser.getAliases())\n {\n ms.createAlias(mbox.getId(), alias);\n }*/\n log.debug(\"Created #0 #1 #2\", meldwareUser.isAdministrator() ? \"administrator\" : \"user\", meldwareUser.getUsername(), meldwareUser.getAliases() == null || meldwareUser.getAliases().size() == 0 ? \"\" : \"with aliases \" + meldwareUser.getAliases());\n }\n }", "public void setUserCreate(Long userCreate) {\n this.userCreate = userCreate;\n }", "User getUser(boolean autocreate);", "public void newUser(User user);", "public void createUserAccount(UserAccount account);", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "public void setCreateUsername(String createUsername) {\r\n\t\tthis.createUsername = createUsername;\r\n\t}", "void handle_signup(LinkedList<Object> args) {\n try {\n String user = (String) args.get(1);\n String passwd = (String) args.get(2);\n\n PreparedStatement pst =\n con.prepareStatement(\"SELECT id FROM users WHERE username=?\");\n pst.setString(1, user);\n rsl = pst.executeQuery();\n if(rsl.next()) { //查询到结果表明该用户已经存在\n args.set(1, \"no\");\n args.set(2, \"该用户名已经注册\");\n return;\n }\n pst = con.prepareStatement(\"INSERT INTO users\" +\n \"(username, password) VALUES (?,?)\");\n pst.setString(1, user);\n pst.setString(2, passwd);\n pst.executeUpdate();\n args.set(1, \"yes\");\n System.out.println(\"New user signup:\" + user);\n } catch (Exception e) {\n e.printStackTrace();\n args.set(1, \"no\");\n args.set(2, e.toString());\n }\n }", "User create(final User user) throws DatabaseException;", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String getCreateUser() {\n return createUser;\n }", "public String createUserAction()throws Exception{\n\t\tString response=\"\";\n\t\tresponse=getService().getUserMgmtService().createNewUser(\n\t\t\t\tgetAuthBean().getUserName(),\n\t\t\t\tgetAuthBean().getFirstName(),\n\t\t\t\tgetAuthBean().getLastName(),\n\t\t\t\tgetAuthBean().getEmailId(),\n\t\t\t\tgetAuthBean().getRole()\n\t\t);\n\t\tgetAuthBean().setResponse(response);\n\t\tinputStream = new StringBufferInputStream(response);\n\t\tinputStream.close();\n\t\treturn SUCCESS;\n\t}", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "public void setCreateUser(entity.User value) {\n __getInternalInterface().setFieldValue(CREATEUSER_PROP.get(), value);\n }", "private Command createUserCommand(Command command) {\n int count = command.getParameters().get(0).getParameters().size();\n var param = new ListBody();\n while(count > 0) {\n param.addParameter(getCommandTree());\n count--;\n }\n command.addParameter(param);\n return command;\n }", "public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}", "boolean create(User user) throws Exception;", "void addUserpan(String userid,String username,String userpwd);" ]
[ "0.6705294", "0.66732204", "0.6593883", "0.65915805", "0.6502107", "0.65018165", "0.65001875", "0.6464256", "0.64564764", "0.64138144", "0.6404393", "0.6373691", "0.63542265", "0.63486624", "0.6345757", "0.63158053", "0.6305113", "0.6305113", "0.62794363", "0.6269848", "0.6253753", "0.6240141", "0.62271", "0.62271", "0.6226665", "0.6218182", "0.6188881", "0.6183319", "0.6183319", "0.61830294", "0.61830294", "0.6157544", "0.6141626", "0.6141579", "0.6120948", "0.6070481", "0.6045298", "0.60394555", "0.6009297", "0.60082513", "0.5987603", "0.5985572", "0.5971099", "0.5964134", "0.596304", "0.5954779", "0.59467185", "0.5929195", "0.5929195", "0.59248513", "0.5920047", "0.59145164", "0.5912425", "0.5912425", "0.5912292", "0.59106404", "0.5901375", "0.5899037", "0.58975506", "0.58958733", "0.58472264", "0.58459127", "0.58457917", "0.5839008", "0.5836604", "0.58290035", "0.5828291", "0.580858", "0.58058476", "0.58058476", "0.5805043", "0.5803511", "0.5797681", "0.5794893", "0.5785389", "0.5770205", "0.5759737", "0.57571095", "0.57553005", "0.5749793", "0.5737855", "0.5737855", "0.5737855", "0.5737855", "0.5737855", "0.5737855", "0.5737855", "0.5737855", "0.5737855", "0.5737855", "0.5737855", "0.5737855", "0.5737855", "0.5731167", "0.5723344", "0.5716431", "0.5715581", "0.571438", "0.57059467", "0.57027704", "0.56894326" ]
0.0
-1
Show or hide the DDL text.
protected void switchText(boolean flag) { txtDDL.setVisible(flag); GridData gd = (GridData) txtDDL.getLayoutData(); gd.exclude = !flag; txtSummary.setVisible(!flag); gd = (GridData) txtSummary.getLayoutData(); gd.exclude = flag; txtDDL.getParent().layout(); btnPreviewDDL.setSelection(flag); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setDDLText() {\n\t\tMigrationConfiguration cfg = getMigrationWizard().getMigrationConfig();\n\t\tif (cfg.sourceIsSQL()) {\n\t\t\tbtnPreviewDDL.setSelection(false);\n\t\t\tbtnPreviewDDL.setEnabled(false);\n\t\t\tswitchText(false);\n\t\t\treturn;\n\t\t}\n\t\ttxtDDL.setText(\"\");\n\t\tprepare4SaveScript();\n\t\tList<Table> tables = new ArrayList<Table>();\n\t\tfinal CUBRIDSQLHelper ddlUtils = CUBRIDSQLHelper.getInstance(null);\n\t\tStringBuffer sbConstrains = new StringBuffer();\n\t\t\n\t\tappendSchemaDDL(cfg);\n\t\t\n\t\tfor (SourceEntryTableConfig setc : cfg.getExpEntryTableCfg()) {\n\n\t\t\tif (!setc.isCreateNewTable()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = null;\n\t\t\t\n\t\t\ttarTbl = cfg.getTargetTableSchema(setc.getTargetOwner(), setc.getTarget());\n\t\t\t\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (setc != null && setc.getComment() != null) {\n\t\t\t\tif (tarTbl.getComment() == null || tarTbl.getComment() != setc.getComment()) {\n\t\t\t\t\ttarTbl.setComment(setc.getComment());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttarTbl.setComment(null);\n\t\t\t}\n\t\t\tfor (Column tarCol : tarTbl.getColumns()) {\n\t\t\t\tSourceColumnConfig sourceCol = setc.getColumnConfigIgnoreCase(tarCol.getName());\n\t\t\t\tif (sourceCol != null && tarCol != null){\n\t\t\t\t\tif (sourceCol.getComment() != null) {\n\t\t\t\t\t\tif (tarCol.getComment() == null || tarCol.getComment() != sourceCol.getComment()){\n\t\t\t\t\t\t\ttarCol.setComment(sourceCol.getComment());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarCol.setComment(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\n\t\t\tfinal PK pk = tarTbl.getPk();\n\t\t\tif (setc.isCreatePK() && pk != null) {\n\t\t\t\tString ddl = ddlUtils.getPKDDL(tarTbl.getOwner(), tarTbl.getName(), pk.getName(), pk.getPkColumns(), cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t\tfor (FK fk : tarTbl.getFks()) {\n\t\t\t\tString ddl = ddlUtils.getFKDDL(tarTbl.getOwner(), tarTbl.getName(), fk, cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t\tfor (Index idx : tarTbl.getIndexes()) {\n\t\t\t\tString ddl = ddlUtils.getIndexDDL(tarTbl.getOwner(), tarTbl.getName(), idx, \"\", cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t}\n\t\tfor (SourceSQLTableConfig sstc : cfg.getExpSQLCfg()) {\n\t\t\tif (!sstc.isCreateNewTable()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = cfg.getTargetTableSchema(sstc.getTarget());\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceViewConfig sc : cfg.getExpViewCfg()) {\n\t\t\tif (!sc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tView vw = cfg.getTargetViewSchema(sc.getTargetOwner(), sc.getTarget());\n\t\t\tString ddl = ddlUtils.getViewDDL(vw, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(ddl);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceSequenceConfig sc : cfg.getExpSerialCfg()) {\n\t\t\tif (!sc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSequence sq = cfg.getTargetSerialSchema(sc.getTargetOwner(), sc.getTarget());\n\t\t\tString ddl = ddlUtils.getSequenceDDL(sq, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(ddl);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceCSVConfig sstc : cfg.getCSVConfigs()) {\n\t\t\tif (!sstc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = cfg.getTargetTableSchema(sstc.getTarget());\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\ttxtDDL.append(sbConstrains.toString());\n\t}", "public void showDescription() {\r\n\t\tshowDescription(true);\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADMLE.Admin_DDL_Alter();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADMLE.Admin_DDL_Create();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADMLE.Admin_DDL_Drop();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "public void show_text (Boolean show) {\n if (show)\n instructions.setText(instr_str);\n if (!show)\n instructions.setText(default_str);\n }", "private void hideDescription() {\r\n\t\tdescriptionText.hide();\r\n\t\tdescriptionInputMatrix.hide();\r\n\t\tdescriptionOutputMatrix.hide();\r\n\t\tdescriptionArrow.hide();\r\n\t}", "public void show() {\n\t\thidden = false;\n\t}", "@Override\n public void showCategoryOtherEditTextField() {\n mEditTextProductCategoryOther.setVisibility(View.VISIBLE);\n }", "public void show() {\n hidden = false;\n }", "public void showDescription(boolean _show) {\r\n\t\tif (descriptionDialog != null)\r\n\t\t\tdescriptionDialog.setVisible(_show);\r\n\t}", "public void showButtonText( boolean b ) {\n if ( b ) {\n _run_btn.setText( \"Run\" );\n _trace_btn.setText( \"Trace\" );\n _edit_btn.setText( \"Edit\" );\n _props_btn.setText( \"Properties\" );\n _options_btn.setText( \"Options\" );\n _reload_btn.setText( \"Reload\" );\n }\n else {\n _run_btn.setText( \"\" );\n _trace_btn.setText( \"\" );\n _edit_btn.setText( \"\" );\n _props_btn.setText( \"\" );\n _options_btn.setText( \"\" );\n _reload_btn.setText( \"\" );\n }\n }", "public void showSelection () {\n checkWidget();\n if( selectedIndex != -1 ) {\n showItem( getSelection() );\n }\n }", "public void setDisplayTextLabel (boolean value)\r\n {\r\n displayTextLabelInformation_ = value;\r\n }", "private void displaySponsor() {\r\n if(selectedNode != null && !selectedNode.getAllowsChildren()) {\r\n SponsorMaintenanceForm sponsorForm = new SponsorMaintenanceForm(TypeConstants.DISPLAY_MODE, selectedValue.substring(0,selectedValue.indexOf(\":\")));\r\n sponsorForm.showForm(mdiForm, \"Display Sponsor\", true);\r\n }\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tLinearLayout downLayout = (LinearLayout)findViewById(R.id.extraInfo);\n\t\t\t\tString additionalText = additional.getText().toString();\n\t\t\t\t\n\t\t\t\tif(additionalText.equals(\"Show Additional Fields\")) {\n\t\t\t\t\tdownLayout.setVisibility(View.VISIBLE);\n\t\t\t\t} else {\n//\t\t\t\t\tadditional.setText(\"Hide Additional Fields\");\n\t\t\t\t\tdownLayout.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t}", "private void hideEditDelete() {\n\t\tButton editButton = (Button) findViewById(R.id.b_recipeEdit);\n\t\tButton deleteButton = (Button) findViewById(R.id.b_recipeDelete);\n\t\teditButton.setVisibility(4);\n\t\tdeleteButton.setVisibility(4);\n\t}", "private void showTextViews(Boolean show) {\n if (show) {\n this.lblTitle.setVisibility(View.VISIBLE);\n this.lblDescription.setVisibility(View.VISIBLE);\n this.lblDateCreated.setVisibility(View.VISIBLE);\n return;\n }\n this.lblTitle.setVisibility(View.INVISIBLE);\n this.lblDescription.setVisibility(View.INVISIBLE);\n this.lblDateCreated.setVisibility(View.INVISIBLE);\n }", "public void hideDeleteButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.HIDE_DELETE_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }", "private void setDisplay() {\n\t\tDisplayOpt.add(\"-sd\");\n\t\tDisplayOpt.add(\"/sd\");\n\t\tDisplayOpt.add(\"showdetails\");\n\n\t}", "private void showDropOverlay() {\n dropOverlay.setVisible(true);\n dropOverlayLabel.setVisible(true);\n }", "private void displayEditMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Edit Menu ------------\");\r\n System.out.println(\"(1) Edit Car Colour\");\r\n System.out.println(\"(2) Edit Car Price\");\r\n System.out.println(\"(3) Back to Main Menu\");\r\n }", "protected void showOptions(){\n mOptionList.setClickable(true);\n mOptionList.setVisibility(View.VISIBLE);\n }", "private void openDropdown() {\n if (dropdownLinearLayout.getVisibility() != View.VISIBLE) {\n ScaleAnimation anim = new ScaleAnimation(1, 1, 0, 1);\n anim.setDuration(getResources().getInteger(R.integer.dropdown_amination_time));\n dropdownLinearLayout.startAnimation(anim);\n dropdownTextView.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.icn_dropdown_close, 0);\n// feelTextsListView\n dropdownLinearLayout.setVisibility(View.VISIBLE);\n }\n }", "public void showError(boolean showOrHide, String errorText){\n errorLabel.setText(errorText);\n errorLabel.setVisible(showOrHide);\n }", "public void setDisplay(boolean val) {\n \tdisplay = val; \n }", "public static void displayMenu() {\r\n System.out.print(\"\\nName Saver Server Menu\\n\\n\"\r\n +\"1. Add a name\\n2. Remove a name\\n3. List all names\\n\"\r\n +\"4. Check if name recorded\\n5. Exit\\n\\n\"\r\n +\"Enter selection [1-5]:\");\r\n }", "private void showThatEditable() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"You may now edit this recipe!\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Edit Mode\");\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}", "public void show() {\n visible=true;\n }", "private void hideMe() {\n\t\tthis.setVisible(false);\n\t\ttxtName.setText(\"\");\n\t\ttxtEmail.setText(\"\");\n\t\ttxtPhone.setText(\"\");\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADCLE.Admin_DDL_Grant();\n\t\t\t\tADCL.setVisible(false);\n\t\t\t}", "public void showMenu() {\n\t\tSystem.out.println(\"Please, choose one option!\");\n\t\tSystem.out.println(\"[ 1 ] - Highest Company Capital\");\n\t\tSystem.out.println(\"[ 2 ] - Lowest Company Capital\");\n\t\tSystem.out.println(\"[ 3 ] - Best Investor of the Day\");\n\t\tSystem.out.println(\"[ 4 ] - Worst Investor of the Day\");\n\t\tSystem.out.println(\"[ 0 ] - Exit\");\n\t}", "@Override\n\tpublic boolean isShowing() {\n\t\treturn false;\n\t}", "@Override\n public void hideCategoryOtherEditTextField() {\n mEditTextProductCategoryOther.setVisibility(View.INVISIBLE);\n }", "public String show() {\r\n\t\treturn \"show\";\r\n\t}", "void showOrdersText();", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (!isEdit) {\r\n\t\t\t\t\txb_popup.showAsDropDown(xbet, 0, 1, xbet.getWidth(),\r\n\t\t\t\t\t\t\tLayoutParams.WRAP_CONTENT);\r\n\t\t\t\t}\r\n\t\t\t}", "public void showDeleteButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.SHOW_DELETE_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n \r\n }", "public void show() {\r\n\t\ttry {\r\n\t\t\tdisplayTable();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Show Table SQL Exception: \" + e.getMessage());\r\n\t\t}\r\n\t}", "void setDisplayText(final String displayText);", "public boolean isDisplayed_txt_Pick_Up_Text(){\r\n\t\tif(txt_Pick_Up_Text.isDisplayed()) { return true; } else { return false;} \r\n\t}", "@Override\n \t\t\t\tpublic void modifyText(ModifyEvent e) {\n \t\t\t\t\tString result = fp.getValidator().validate(text.getText());\n \t\t\t\t\tif (result == null)\n \t\t\t\t\t\tdecorator.hide();\n \t\t\t\t\telse {\n \t\t\t\t\t\tdecorator.setDescriptionText(result);\n \t\t\t\t\t\tdecorator.show();\n \t\t\t\t\t}\n \t\t\t\t\tupdateState();\n \t\t\t\t}", "private void displayTextView() {\n wellnessEntryErrorTextView.setText(\"This is an error message e.g no data\");\n wellnessEntryErrorTextView.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.GONE);\n }", "public void hide() {\n hidden = true;\n }", "private void toggleOptions() {\r\n if (_optionsHidden) {\r\n // Update the button to \"Hide Options\"\r\n _optionsBtn.setLabel(\"Hide Options\");\r\n\r\n // Show connection options\r\n add(_optionFieldsManager);\r\n _optionsHidden = false;\r\n\r\n } else {\r\n // Update the button to \"Show Options\"\r\n _optionsBtn.setLabel(\"Show Options\");\r\n\r\n // Hide connection options\r\n delete(_optionFieldsManager);\r\n _optionsHidden = true;\r\n }\r\n }", "public void hide() {\n\t\thidden = true;\n\t}", "private void show(){\n mStartupNameTextView.setText(startup.getmStartupName());\n mStartupDomainTextView.setText(startup.getmDomain());\n mStartupFondTextView.setText(startup.getmFond());\n mStartupChiffreTextView.setText(startup.getmChiffre());\n mStartupNeedTextView.setText(startup.getmNeed());\n mStartupJuridiqueTextView.setText(startup.getmJuridiqueSatatus());\n mStartupCreateDateTextView.setText(startup.getmCreationDate());\n mStartupNumberEmployees.setText(startup.getmNumberEmployees());\n }", "public void showOptions() {\n\t\tCIVLTable tbl_optionTable = (CIVLTable) getComponentByName(\"tbl_optionTable\");\n\t\tDefaultTableModel optionModel = (DefaultTableModel) tbl_optionTable\n\t\t\t\t.getModel();\n\n\t\tif (optionModel.getRowCount() != 0) {\n\t\t\toptionModel.setRowCount(0);\n\t\t\ttbl_optionTable.clearSelection();\n\t\t\ttbl_optionTable.revalidate();\n\t\t}\n\n\t\tGMCSection section = currConfig.getGmcConfig().getSection(\n\t\t\t\tGMCConfiguration.ANONYMOUS_SECTION);\n\t\tObject[] opts = currConfig.getGmcConfig().getOptions().toArray();\n\t\tCollection<Option> options = currConfig.getGmcConfig().getOptions();\n\t\tIterator<Option> iter_opt = options.iterator();\n\t\tList<Object> vals = new ArrayList<Object>();\n\n\t\twhile (iter_opt.hasNext()) {\n\t\t\tOption curr = iter_opt.next();\n\t\t\tvals.add(section.getValueOrDefault(curr));\n\t\t}\n\n\t\t// Sets all of the default-ize buttons\n\t\tnew ButtonColumn(tbl_optionTable, defaultize, 2);\n\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tOption currOpt = (Option) opts[i];\n\t\t\t/*\n\t\t\t * if (currOpt.name().equals(\"sysIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"sysIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t * \n\t\t\t * else if (currOpt.name().equals(\"userIncludePath\")) {\n\t\t\t * optionModel.addRow(new Object[] { currOpt, \"userIncludePath\",\n\t\t\t * \"Default\" }); }\n\t\t\t */\n\t\t\t// else {\n\t\t\toptionModel\n\t\t\t\t\t.addRow(new Object[] { currOpt, vals.get(i), \"Default\" });\n\t\t\t// }\n\t\t}\n\t}", "public void showPanelToNewPlayList() {\n\t\tjpIntroduceNameList.setVisible(true);\n\t\tjpIntroduceNameList.setFocusable(true);\n\t\tjpIntroduceNameList.requestFocus(true);\n\t\tjpIntroduceNameList.setRequestFocusEnabled(true);\n\t\tjpIntroduceNameList.requestFocus();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public void displaySentence() {\n\t\tremoveArrows();\n\t\tlayoutArrow(sent.getWords());\n\t\tsetSelectedItem(null);\n\t}", "public void showSuggestionList() {\n \t\tif (isAttached()) {\n \t\t\tcurrentText = null;\n \t\t\trefreshSuggestions();\n \t\t}\n \t}", "private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }", "public void hideDetails () {\n\t\tdetailDisplay.show(\"empty\");\n\t}", "public void visibility(boolean state){ this.table.setVisible(state);}", "public String getDisplayText()\n {\n return (getName().length() > 0) ? getName() : \"Neuer Diätplan\";\n }", "public void visMedlemskabsMenu ()\r\n {\r\n System.out.println(\"Du har valgt medlemskab.\");\r\n System.out.println(\"Hvad Oensker du at foretage dig?\");\r\n System.out.println(\"1: Oprette et nyt medlem\");\r\n System.out.println(\"2: Opdatere oplysninger paa et eksisterende medlem\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "public void show()\r\n {\r\n\tshow(\"\");\r\n }", "public void setLblVisible(boolean value) {\n lblVisible = value;\n }", "@Override\n public String displayUponBeingSelected() {\n\n StringBuilder sb = new StringBuilder();\n sb.append(String.format(\"Information about '%s'\\n\", foodLabel));\n sb.append(String.format(\"Brand: %s\\n\", brand));\n sb.append(String.format(\"Category: %s\\n\", category));\n sb.append(String.format(\"Item type: %s\\n\", StringUtils.capitalize(categoryLabel)));\n sb.append(String.format(\"Measure(s): %s\\n\", StringUtils.join(measures, \", \")));\n sb.append(String.format(\"Food ID: %s\\n\", foodId));\n sb.append(String.format(\"Food URI: %s\\n\", foodUri));\n sb.append(String.format(\"Image link: %s\\n\", imageLink));\n sb.append(String.format(\"Yielding search term: %s\\n\", yieldingSearchTerm));\n sb.append(formatBasicNutrients());\n\n return sb.toString();\n\n }", "private static Label makeColumn2(Composite comp, final String text, boolean hide) {\n\t\tLabel hint = new Label(comp, SWT.NONE);\n\t\thint.setToolTipText(\"Click for Hint Text\");\n\t\tGridData gd = new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1);\n\t\tgd.exclude = hide;\n\t\thint.setLayoutData(gd);\t\t\n\t\thint.setBackground(C.APP_BGCOLOR);\n\t\thint.setImage(C.getImage(\"hint.png\"));\n\t\thint.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\t\t\t\tEsmApplication.hint(text);\n\t\t\t}\n\t\t});\n\t\treturn hint;\n\t}", "public void actionPerformed(boolean showSQL) {\n String selection = (String)this.getSelectedItem();\n\n try {\n String cursorId = \"\";\n \n if (selection.equals(\"MTS Dispatchers\")) { \n cursorId = \"dispatchers.sql\";\n }\n \n if (selection.equals(\"MTS Shared Servers\")) {\n cursorId = \"sharedServers.sql\";\n }\n\n Cursor myCursor = new Cursor(cursorId,true);\n Parameters myPars = new Parameters();\n ExecuteDisplay.executeDisplay(myCursor,myPars, scrollP, statusBar, showSQL, resultCache, true);\n }\n catch (Exception e) {\n ConsoleWindow.displayError(e,this);\n }\n }", "@SuppressLint(\"InlinedApi\")\n private void show() {\n mVisible = true;\n\n // Schedule a runnable to display UI elements after a delay\n mHideHandler.removeCallbacks(mHidePart2Runnable);\n mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);\n }", "public void setLabelToBeShown(String label);", "public String displayShort(){\n return \"\\tId: \" + id + \"\\n\" +\n \"\\tName: \" + name + \"\\n\" +\n \"\\tDescription: \" + description + \"\\n\";\n }", "private void printCRUDDoctorOption() {\n\t\tSystem.out.println(\"\\n\\n----Edit DOCTOR----\");\n\t\tSystem.out.println(\"1. Insert a new doctor\");\n\t\tSystem.out.println(\"2. List all doctors\");\n\t\tSystem.out.println(\"3. Update doctor data\");\n\t\tSystem.out.println(\"4. Remove doctor\");\n\t\tSystem.out.println(\"5. Back\");\n\t\tSystem.out.println(\"Enter your choice: \");\n\t}", "private void showListSelectCheckBox(){\n DisplayListWithCheckBox();\n //wordList.setSelection(FirstVisiblePosition);\n\n FloatingActionButton fab_plus = findViewById(R.id.fab_plus);\n fab_plus.setVisibility(View.INVISIBLE);\n FloatingActionButton fab_play = findViewById(R.id.fab_play);\n fab_play.setVisibility(View.INVISIBLE);\n FloatingActionButton fab_delete = findViewById(R.id.fab_delete);\n fab_delete.setVisibility(View.VISIBLE);\n }", "protected boolean setTextOrHide(TextView view, String text) {\n\t\tif (!TextUtilities.isEmpty(text)) {\n\t\t\tview.setText(text);\n\t\t\tview.setVisibility(View.VISIBLE);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tview.setVisibility(View.GONE);\n\t\t\treturn false;\n\t\t}\n\t}", "private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }", "public void showRuleDescription() {\n PopUpAlerts.ruleDescription(gOL.getRuleName(), gOL.getRuleString(), gOL.getRuleDescription());\n }", "@Override\n\tpublic void setDisplayShowTitleEnabled(boolean showTitle) {\n\t\t\n\t}", "public String show() {\r\n return \"show\";\r\n }", "private void hideAdvanceFeatures() {\n sourceLabel.setVisible(false);\n sourceTextField.setVisible(false);\n threadsTextField.setEnabled(false);\n adminLabel.setVisible(false);\n adminTextField.setVisible(false);\n tracerPanel.setVisible(false);\n simulateCheckBox.setVisible(false);\n useScriptCheckBox.setVisible(false);\n editScriptButton.setVisible(false);\n batchImportCheckBox.setVisible(false);\n numResourceToCopyLabel.setVisible(false);\n numResourceToCopyTextField.setVisible(false);\n recordURIComboBox.setVisible(false);\n paramsLabel.setVisible(false);\n paramsTextField.setVisible(false);\n viewRecordButton.setVisible(false);\n testRecordButton.setVisible(false);\n basicUIButton.setVisible(false);\n\n isBasicUI = true;\n }", "public void show() {\r\n\t\tshowMembers();\r\n\t\tshowFacilities();\r\n\t}", "public void SelectVisibleTextByName(String Id, String Value) {\n\t\t\r\n\t}", "public void showMemberCategoryMenu() {\n System.out.println(\"Visa lista med: \");\n System.out.println(\"\\t1. Barnmedlemmar\");\n System.out.println(\"\\t2. Ungdomsmedlemmar\");\n System.out.println(\"\\t3. Vuxenmedlemmar\");\n System.out.println(\"\\t4. Seniormedlemmar\");\n System.out.println(\"\\t5. VIP-medlemmar\");\n System.out.print(\"Ange val: \");\n }", "public void show() {\n if(heading.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in heading, nothing to show\");\r\n return;\r\n }\r\n if(rows.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in rows, nothing to show\");\r\n return;\r\n }\r\n for(String h : heading) {\r\n System.out.print(h + \" | \");\r\n }\r\n System.out.println(\"\");\r\n Set<String> keys = rows.keySet();\r\n for(String k : keys) {\r\n rows.get(k).show();\r\n System.out.println(\"\");\r\n }\r\n System.out.println(\"\");\r\n }", "public boolean Admin() {\n\t\tif (choiceAdmin.getSelectedIndex() == 0 || choiceAdmin.getSelectedIndex() == 2) {\n\t\t\tlblCorreoDelAdministrador.setVisible(true);\n\t\t\ttextField.setVisible(true);\n\t\t\tadmin = 0;\n\t\t\treturn false;\n\t\t} else {\n\t\t\tlblCorreoDelAdministrador.setVisible(false);\n\t\t\ttextField.setVisible(false);\n\t\t\tadmin = 1;\n\t\t\treturn true;\n\t\t}\n\t}", "public void show() {\r\n show(\"\");\r\n }", "public void setShortDisplay(boolean value)\r\n {\r\n if (shortDisplay != value)\r\n {\r\n shortDisplay = value;\r\n\r\n titleLabel.setVisible(!value);\r\n infos2Label.setVisible(!value);\r\n }\r\n }", "public void getGroupHideColumn() {\r\n\t\tString showHide = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(WsrdConstants.HIDESHOWCOLUMN);\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.SHOW_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setGroupShowHide(WsrdConstants.HIDE_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(true);\r\n\t\t}\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.HIDE_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setGroupShowHide(WsrdConstants.SHOW_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(false);\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void comboselection(ActionEvent e) {\n\t\tint selectedIndex = this.combobox.getSelectedIndex();\n\t\tif (selectedIndex == 0) {\n\t\t\tthis.add(field1, BorderLayout.CENTER);\n\t\t\tthis.field2.setVisible(false);\n\t\t\tthis.field3.setVisible(false);\n\t\t\tthis.field1.setVisible(true);\n\t\t} else if (selectedIndex == 1) {\n\t\t\tthis.add(field2, BorderLayout.CENTER);\n\t\t\tthis.field1.setVisible(false);\n\t\t\tthis.field3.setVisible(false);\n\t\t\tthis.field2.setVisible(true);\n\t\t} else {\n\t\t\tthis.add(field3, BorderLayout.CENTER);\n\t\t\tthis.field1.setVisible(false);\n\t\t\tthis.field2.setVisible(false);\n\t\t\tthis.field3.setVisible(true);\n\t\t}\n\t}", "private void showPassword(){\n\t\tpasswordLabel.setVisible(true);\n\t\tconfirmPasswordLabel.setVisible(true);\n\t\tuserPasswordField.setVisible(true);\n\t\tuserConfirmPasswordField.setVisible(true);\n\t}", "protected void hideOptions(){\n mOptionList.setClickable(false);\n mOptionList.setVisibility(View.INVISIBLE);\n }", "public void displayActionItemScreen() throws SQLException, ClassNotFoundException {\n String item = console_actionItemList.getSelectionModel().getSelectedItem();\n all_teams();\n all_members();\n if(item != null && !item.isEmpty())\n getAction_Name().setDisable(true);\n actionItemClass obj = new actionItemClass();\n obj.displayActionItemScreen(this,item);\n }", "@Override\n\tpublic void showAds(boolean show) {\n\t\thandler.sendEmptyMessage(show ? SHOW_ADS : HIDE_ADS);\n\t}", "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "public void hidePanelToNewPlayList() {\n\t\tjpIntroduceNameList.setVisible(false);\n\t}", "public void getUnitHideColumn() {\r\n\t\tString showHide = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(WsrdConstants.HIDESHOWCOLUMN);\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.SHOW_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setUnitShowHide(WsrdConstants.HIDE_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(true);\r\n\t\t}\r\n\t\tif(showHide.equalsIgnoreCase(WsrdConstants.HIDE_AUTHOR_INFO)) {\r\n\t\t\twsrdModel.setUnitShowHide(WsrdConstants.SHOW_AUTHOR_INFO);\r\n\t\t\twsrdModel.setShowHideFlag(false);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void show() {\r\n\t\tif (getSpawnLocation() == null)\r\n\t\t\treturn;\r\n\r\n\t\tif (!checkItem()) {\r\n\t\t\titem \t= getWorld().dropItem(getSpawnLocation(), getItemStack());\r\n\t\t\titem.setVelocity(new Vector(0, 0.1, 0));\r\n\t\t\titem.setPickupDelay(1000);\r\n\t\t\t\r\n\t\t}\r\n\t\tisVisible \t= true;\r\n\t}", "public String showHelp() {\r\n return ctrlDomain.getHidatoDescription();\r\n }", "private void viewEditTblArticle() {\n\t\tAdminComposite.display(\"\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\tTableItem[] items = tblArticle.getSelection();\n\t\tint len = items.length;\n\t\tif (len == 1) {\n\n\t\t\ttxtArticleName.setText(items[0].getText(0));\n\t\t\ttxtCW.setText(items[0].getText(1));\n\t\t\tcbCCC.setText(items[0].getText(2));\n\t\t\t/*if (items[0].getText(2).equalsIgnoreCase(\"open\") || items[0].getText(2).equalsIgnoreCase(\"Dont Charge\")) {\n\t\t\t\ttxtCCCValue.setEnabled(false);\n\t\t\t} else {\n\t\t\t\ttxtCCCValue.setEnabled(true);\n\t\t\t}*/\n\t\t\ttxtCCCValue.setText(items[0].getText(3));\n\t\t\thandleCCCTypeChange();\n\t\t\t\n\t\t\tcbDCC.setText(items[0].getText(4));\n\t\t\t/*if (items[0].getText(4).equalsIgnoreCase(\"open\") || items[0].getText(4).equalsIgnoreCase(\"Dont Charge\")) {\n\t\t\t\ttxtDCCValue.setEnabled(false);\n\t\t\t} else {\n\t\t\t\ttxtDCCValue.setEnabled(true);\n\t\t\t}*/\n\t\t\ttxtDCCValue.setText(items[0].getText(5));\n\t\t\thandleDCCTypeChange();\n\t\t\t\n\t\t\tcbIEC.setText(items[0].getText(6));\n\t\t\t/*if (items[0].getText(6).equalsIgnoreCase(\"Dont Charge\")) {\n\t\t\t\ttxtIEC_article.setEnabled(false);\n\t\t\t} else {\n\t\t\t\ttxtIEC_article.setEnabled(true);\n\t\t\t}*/\n\t\t\ttxtIEC_article.setText(items[0].getText(7));\n\t\t\thandleIECTypeChange();\n\t\t\t\n\t\t\tcbLoadingCharge.setText(items[0].getText(8));\n\t\t\t/*if (items[0].getText(8).equalsIgnoreCase(\"Dont Charge\")) {\n\t\t\t\ttxtLC_article.setEnabled(false);\n\t\t\t} else {\n\t\t\t\ttxtLC_article.setEnabled(true);\n\t\t\t}*/\n\t\t\ttxtLC_article.setText((items[0].getText(9)));\n\t\t\thandleLCTypeChange();\n\t\t\t\n\t\t\tcbDDC.setText(items[0].getText(10));\n\t\t\tif (items[0].getText(10).equalsIgnoreCase(\"extra\")) {\n\t\t\t\ttxtDDC_minPerLR.setEnabled(false);\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(false);\n\t\t\t} else if ((items[0].getText(10).equalsIgnoreCase(\"free\"))) {\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(true);\n\t\t\t\ttxtDDC_minPerLR.setEnabled(false);\n\t\t\t} else {\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(true);\n\t\t\t\ttxtDDC_minPerLR.setEnabled(true);\n\t\t\t}\n\t\t\ttxtDDC_minPerLR.setText(((items[0].getText(11))));\n\t\t\ttxtDDC_chargeArticle.setText(((items[0].getText(12))));\n\n\t\t\t// }\n\t\t}\n\t\thandleMixedArticleDropdown();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADCLE.Admin_DDL_Revoke();\n\t\t\t\tADCL.setVisible(false);\n\t\t\t}", "void onSuffixVisibilityChanged(boolean visible) {}", "public void showName() {\n\t\tSystem.out.println(\"Object id: \" + id + \", \" + description + \": \" + name);\n\t\t//System.out.println(description);\n\t}", "@Override\n public void showText(String s){\n }", "private void showPlayerOptions() {\n playStartLinearLayout.setVisibility(View.INVISIBLE);\n timeInfoLinearLayout.setVisibility(View.INVISIBLE);\n gsOpenPlayImage.setVisibility(View.VISIBLE);\n\n\n }", "@Override\n\tpublic String getDisplayText() {\n\t\tif (userType == null)\n\t\t\treturn \"New user type\"; //$NON-NLS-1$\n\n\t\treturn \"Edit user type\"; //$NON-NLS-1$\n\t}", "static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}", "private void showText(String msg)\n {\n\n popup.setText(msg);\n\n listView.animate().alpha(0.3f).setDuration(1000);\n\n popup.setVisibility(View.VISIBLE);\n\n }", "private void doSelect() {\n this.setVisible(false);\n }" ]
[ "0.6280625", "0.5967288", "0.59668916", "0.5887942", "0.5818264", "0.5808294", "0.5651355", "0.5639726", "0.5631478", "0.56156677", "0.5518617", "0.53366476", "0.53050554", "0.528976", "0.52827305", "0.5268417", "0.52133626", "0.5184602", "0.5177947", "0.5165406", "0.51459455", "0.51085556", "0.510174", "0.5077144", "0.507665", "0.5072221", "0.5058346", "0.50460255", "0.50315934", "0.5007952", "0.50048524", "0.5003319", "0.49771708", "0.49758363", "0.4968543", "0.4965577", "0.4960576", "0.494799", "0.494614", "0.494608", "0.49378002", "0.49310935", "0.49251196", "0.49240667", "0.49223778", "0.49181998", "0.4905301", "0.48958823", "0.489527", "0.4887037", "0.48647192", "0.48615408", "0.48549858", "0.4853907", "0.48499557", "0.48490685", "0.48474762", "0.48465207", "0.48451522", "0.4837538", "0.48368287", "0.4834573", "0.48344058", "0.4829149", "0.48275518", "0.48247066", "0.48209244", "0.4809486", "0.480616", "0.4801126", "0.4799606", "0.47968888", "0.4793373", "0.47929037", "0.47764963", "0.4755767", "0.4751247", "0.475042", "0.47485277", "0.4745063", "0.4743538", "0.47407463", "0.47310063", "0.47247556", "0.4720669", "0.47193113", "0.47181872", "0.47117925", "0.47102368", "0.47072545", "0.47033235", "0.47025582", "0.47016364", "0.46870905", "0.46828106", "0.46758774", "0.46727404", "0.467192", "0.4665054", "0.46607536" ]
0.66228604
0
If saving source schema into migration script file
protected boolean isSaveSchema() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void recreateDatabaseSchema() {\n\t\t// Fetch database schema\n\t\tlogger.info(\"Reading database schema from file\");\n\t\tString[] schemaSql = loadFile(\"blab_schema.sql\", new String[] { \"--\", \"/*\" }, \";\");\n\n\t\tConnection connect = null;\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\t// Get the Database Connection\n\t\t\tlogger.info(\"Getting Database connection\");\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconnect = DriverManager.getConnection(Constants.create().getJdbcConnectionString());\n\n\t\t\tstmt = connect.createStatement();\n\n\t\t\tfor (String sql : schemaSql) {\n\t\t\t\tsql = sql.trim(); // Remove any remaining whitespace\n\t\t\t\tif (!sql.isEmpty()) {\n\t\t\t\t\tlogger.info(\"Executing: \" + sql);\n\t\t\t\t\tSystem.out.println(\"Executing: \" + sql);\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassNotFoundException | SQLException ex) {\n\t\t\tlogger.error(ex);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\tstmt.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tlogger.error(ex);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (connect != null) {\n\t\t\t\t\tconnect.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tlogger.error(ex);\n\t\t\t}\n\t\t}\n\t}", "public void startMigrating();", "boolean doMigration();", "protected void prepare4SaveScript() {\n\t\tMigrationConfiguration cfg = getMigrationWizard().getMigrationConfig();\n\t\tcfg.cleanNoUsedConfigForStart();\n\t}", "private void processAlterSchema() throws HsqlException {\n processAlterSchemaRename();\n }", "public void createDB() {\n\t\ttry {\n\t\t\tBufferedReader br= new BufferedReader(new FileReader(\"db_schema.txt\"));\n\t\t\tString line= null;\n\t\t\tStringBuilder sb= new StringBuilder();\n\t\t\twhile ((line=br.readLine())!=null){\n\t\t\t\tsb.append(line);\n\t\t\t\tif(sb.length()>0 && sb.charAt(sb.length()-1)==';'){//see if it is the end of one line of command\n\t\t\t\t\tstatement.executeUpdate(sb.toString());\n\t\t\t\t\tsb= new StringBuilder();\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.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} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void type() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/type\");\n flyway.migrate();\n flyway.clean();\n flyway.migrate();\n }", "protected abstract boolean isMigrationNecessary();", "@Override\n public void handleSchemaChange(ConnectSchema lastSchema, ConnectSchema currSchema, String\n dpSchemaName, PrimaryKey primaryKey, boolean shouldStageData) {\n System.out.println(\"New schema has fields as \" + currSchema.fields().stream().map\n (Field::name).collect(Collectors.joining(\", \")));\n\n List<Field> lastFilelds = lastSchema.fields();\n List<Field> currFilelds = currSchema.fields();\n\n }", "public void schemaUpdated() throws SQLException, IOException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n String newDBName = \"OSM\"+uniqueID;\n ProcessBuilder processBuilder = new ProcessBuilder(\"src/main/resources/schema/schemaUploader.sh\", newDBName, password);\n Process process = processBuilder.start();\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n String line = null; // This is here for testing purposes\n while ((line = bufferedReader.readLine()) != null ) {\n System.out.println(line);\n }\n }", "protected void preUpdateSchema(CiDb db) throws OrmException, SQLException {\n }", "@Ignore(\"Disabled due to missing functionality in Oracle XE.\")\n @Test\n public void javaSource() throws FlywayException, SQLException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/javasource\");\n flyway.migrate();\n flyway.clean();\n }", "@Test\r\n public void exportSQLServerDatabaseScriptFromAnnotations() throws Exception\r\n {\r\n Properties props = PropertyLoader.loadProperties(\"./build.properties\");\r\n String classesDirPath = props.getProperty(\"classes.dir\");\r\n SchemaGenerator sgen = new SchemaGenerator(new String[] {\"uk.co.utilisoft.parms.domain\"},\r\n classesDirPath,\r\n new String[] {\".*UnitTest.*\", \".*Test.*\", \".*Interface.*\", \".*\\\\$.*\"});\r\n sgen.generate(Dialect.SQLSERVER, mTestFilePath);\r\n mTestFiles = getSavedFiles(mTestFilePath);\r\n assertTrue(!mTestFiles.isEmpty());\r\n\r\n for (int i = 0; i < mTestFiles.size(); i++)\r\n {\r\n File file = mTestFiles.get(i);\r\n InputStream is = new FileInputStream(file);\r\n long length = file.length();\r\n\r\n if (length > Integer.MAX_VALUE)\r\n {\r\n fail(\"Failed to read file \" + file.getName() + \" because file length \" + length + \" is too long\");\r\n }\r\n\r\n byte[] bytes = new byte[(int)length];\r\n int offset = 0;\r\n int numRead = 0;\r\n\r\n while (offset < bytes.length\r\n && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)\r\n {\r\n offset += numRead;\r\n }\r\n\r\n if (offset < bytes.length)\r\n {\r\n fail(\"Failed to finish reading file \" + file.getName());\r\n }\r\n\r\n is.close();\r\n\r\n // test file contains some data\r\n assertNotNull(bytes);\r\n assertTrue(\"File \" + file.getName() + \" contains zero bytes\", bytes.length > 0);\r\n }\r\n }", "void schema(String schema);", "void schema(String schema);", "@Test\n public void text() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/text\");\n flyway.migrate();\n flyway.clean();\n flyway.migrate();\n }", "protected void exportScriptToFile() {\n\t\ttry {\n\t\t\tfinal MigrationConfiguration cfg = getMigrationWizard()\n\t\t\t\t\t.getMigrationConfig();\n\t\t\tprepare4SaveScript();\n\t\t\tExportScriptDialog.exportScript(cfg, isSaveSchema());\n\t\t} catch (Exception e) {\n\t\t\t// MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(),\n\t\t\t// Messages.msgWarning, Messages.setOptionPageErrMsg);\n\t\t}\n\t}", "protected void executeSchemaOperations() {\n }", "static void resetTestDatabase() {\n String URL = \"jdbc:mysql://localhost:3306/?serverTimezone=CET\";\n String USER = \"fourthingsplustest\";\n\n InputStream stream = UserStory1Test.class.getClassLoader().getResourceAsStream(\"init.sql\");\n if (stream == null) throw new RuntimeException(\"init.sql\");\n try (Connection conn = DriverManager.getConnection(URL, USER, null)) {\n conn.setAutoCommit(false);\n ScriptRunner runner = new ScriptRunner(conn);\n runner.setStopOnError(true);\n runner.runScript(new BufferedReader(new InputStreamReader(stream)));\n conn.commit();\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n System.out.println(\"Done running migration\");\n }", "public SchemaDef getSourceSchema();", "public void appendSchemaDDL(MigrationConfiguration cfg) {\n\t\tMigrationConfiguration config = getMigrationWizard().getMigrationConfig();\n\t\t\n\t\tList<String> schemaList = config.getNewTargetSchema();\n\t\t\n\t\tfor (String schemaName : schemaList) {\n\t\t\ttxtDDL.append(\"CREATE USER \" + schemaName);\n\t\t\ttxtDDL.append(\";\");\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t}", "protected abstract void finalizeMigration();", "protected void setDDLText() {\n\t\tMigrationConfiguration cfg = getMigrationWizard().getMigrationConfig();\n\t\tif (cfg.sourceIsSQL()) {\n\t\t\tbtnPreviewDDL.setSelection(false);\n\t\t\tbtnPreviewDDL.setEnabled(false);\n\t\t\tswitchText(false);\n\t\t\treturn;\n\t\t}\n\t\ttxtDDL.setText(\"\");\n\t\tprepare4SaveScript();\n\t\tList<Table> tables = new ArrayList<Table>();\n\t\tfinal CUBRIDSQLHelper ddlUtils = CUBRIDSQLHelper.getInstance(null);\n\t\tStringBuffer sbConstrains = new StringBuffer();\n\t\t\n\t\tappendSchemaDDL(cfg);\n\t\t\n\t\tfor (SourceEntryTableConfig setc : cfg.getExpEntryTableCfg()) {\n\n\t\t\tif (!setc.isCreateNewTable()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = null;\n\t\t\t\n\t\t\ttarTbl = cfg.getTargetTableSchema(setc.getTargetOwner(), setc.getTarget());\n\t\t\t\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (setc != null && setc.getComment() != null) {\n\t\t\t\tif (tarTbl.getComment() == null || tarTbl.getComment() != setc.getComment()) {\n\t\t\t\t\ttarTbl.setComment(setc.getComment());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttarTbl.setComment(null);\n\t\t\t}\n\t\t\tfor (Column tarCol : tarTbl.getColumns()) {\n\t\t\t\tSourceColumnConfig sourceCol = setc.getColumnConfigIgnoreCase(tarCol.getName());\n\t\t\t\tif (sourceCol != null && tarCol != null){\n\t\t\t\t\tif (sourceCol.getComment() != null) {\n\t\t\t\t\t\tif (tarCol.getComment() == null || tarCol.getComment() != sourceCol.getComment()){\n\t\t\t\t\t\t\ttarCol.setComment(sourceCol.getComment());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarCol.setComment(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\n\t\t\tfinal PK pk = tarTbl.getPk();\n\t\t\tif (setc.isCreatePK() && pk != null) {\n\t\t\t\tString ddl = ddlUtils.getPKDDL(tarTbl.getOwner(), tarTbl.getName(), pk.getName(), pk.getPkColumns(), cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t\tfor (FK fk : tarTbl.getFks()) {\n\t\t\t\tString ddl = ddlUtils.getFKDDL(tarTbl.getOwner(), tarTbl.getName(), fk, cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t\tfor (Index idx : tarTbl.getIndexes()) {\n\t\t\t\tString ddl = ddlUtils.getIndexDDL(tarTbl.getOwner(), tarTbl.getName(), idx, \"\", cfg.isAddUserSchema());\n\t\t\t\tsbConstrains.append(ddl);\n\t\t\t\tsbConstrains.append(\";\");\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t\tsbConstrains.append(NEWLINE);\n\t\t\t}\n\n\t\t}\n\t\tfor (SourceSQLTableConfig sstc : cfg.getExpSQLCfg()) {\n\t\t\tif (!sstc.isCreateNewTable()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = cfg.getTargetTableSchema(sstc.getTarget());\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceViewConfig sc : cfg.getExpViewCfg()) {\n\t\t\tif (!sc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tView vw = cfg.getTargetViewSchema(sc.getTargetOwner(), sc.getTarget());\n\t\t\tString ddl = ddlUtils.getViewDDL(vw, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(ddl);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceSequenceConfig sc : cfg.getExpSerialCfg()) {\n\t\t\tif (!sc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSequence sq = cfg.getTargetSerialSchema(sc.getTargetOwner(), sc.getTarget());\n\t\t\tString ddl = ddlUtils.getSequenceDDL(sq, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(ddl);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\tfor (SourceCSVConfig sstc : cfg.getCSVConfigs()) {\n\t\t\tif (!sstc.isCreate()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTable tarTbl = cfg.getTargetTableSchema(sstc.getTarget());\n\t\t\tif (tarTbl == null || tables.contains(tarTbl)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttables.add(tarTbl);\n\t\t\tString sql = ddlUtils.getTableDDL(tarTbl, cfg.isAddUserSchema());\n\t\t\ttxtDDL.append(sql);\n\t\t\ttxtDDL.append(NEWLINE);\n\t\t}\n\t\ttxtDDL.append(sbConstrains.toString());\n\t}", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "public void doSaveAs()\n {\n super.doSaveAs();\n revalidateSyntax();\n }", "@Test\n\tpublic void convertingWithEqualsSourceAndDatabaseFileTest() throws FileNotFoundException\n\t{\n\t\t/*try\n\t\t {\n\t\t OsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter();\n\t\t converter.convert(IOTester.TEST_FILE_NAME, IOTester.TEST_FILE_NAME, new TestMapObjectsIdentifiersFinder());\n\t\t fail();\n\t\t }\n\t\t catch (IllegalArgumentException ex)\n\t\t {\n\t\t // ok\n\t\t }*/\n\t}", "@Override\n\tpublic void moveToPublicSchema(DwcaResourceModel resourceModel) {\n\n\t}", "String getSchemaFile();", "public void saveBeforeCompile() { }", "public void saveBeforeCompile() { }", "private void setScriptFormatCorrectly()\n\t{\n\t\tint scriptFormatNeeded = 0;\n\t\tif(isMime(m_databaseFile, GZIP_MAGIC_NUMBERS))\n\t\t{\n\t\t\tm_logger.debug(\"Database is gzipped\");\n\t\t\tscriptFormatNeeded = 3;\n\t\t}\n\t\t\n\t\tboolean propsExists = Files.exists(m_databasePropertiesFile);\n\t\t\n\t\tProperties properties = new Properties();\n\t\ttry {\n\t\t properties.load(new FileInputStream(m_databasePropertiesFile.toFile()));\n\t\t} catch (IOException e) {\n\t\t}\n\t\t\n\t\tproperties.setProperty(\"hsqldb.script_format\", \"\" + scriptFormatNeeded);\n\t\tif(! propsExists) // write other info\n\t\t{\n\t\t\tproperties.setProperty(\"version\",\"2.2.8\");\n\t\t\tproperties.setProperty(\"modified\", \"yes\");\n\t\t}\n\t\t\n\t\t// Write properties file.\n\t\ttry {\n\t\t properties.store(new FileOutputStream(m_databasePropertiesFile.toFile()), null);\n\t\t} catch (IOException e) {\n\t\t}\n\t\t\n\t}", "@Override\n public String toSql(ToSqlOptions options) {\n StringBuilder sb = new StringBuilder(\"LOAD DATA INPATH '\");\n sb.append(sourceDataPath_ + \"' \");\n if (overwrite_) sb.append(\"OVERWRITE \");\n sb.append(\"INTO TABLE \" + tableName_.toString());\n if (partitionSpec_ != null) sb.append(\" \" + partitionSpec_.toSql(options));\n return sb.toString();\n }", "@Override\n\tpublic void CreateDatabaseFromFile() {\n\t\tfinal String FILENAME = \"fandv.sql\";\n\t\tint[] updates = null;\n\t\ttry {\n\t\t\tMyDatabase db = new MyDatabase();\n\t\t\tupdates = db.updateAll(FILENAME);\n\t\t} catch (FileNotFoundException | SQLException | ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Database issue\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < updates.length; i++) {\n\t\t\tsum += updates[i];\n\t\t}\n\t\tSystem.out.println(\"Number of updates: \" + sum);\n\t}", "public void createDBSchema() throws NoConnectionToDBException, SQLException, IOException {\n \n InputStream in = EDACCApp.class.getClassLoader().getResourceAsStream(\"edacc/resources/edacc.sql\");\n if (in == null) {\n throw new SQLQueryFileNotFoundException();\n }\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String line;\n String text = \"\";\n String l;\n while ((line = br.readLine()) != null) {\n if (!(l = line.replaceAll(\"\\\\s\", \"\")).isEmpty() && !l.startsWith(\"--\")) {\n text += line + \" \";\n }\n }\n in.close();\n Vector<String> queries = new Vector<String>();\n String query = \"\";\n String delimiter = \";\";\n int i = 0;\n while (i < text.length()) {\n if (text.toLowerCase().startsWith(\"delimiter\", i)) {\n i += 10;\n delimiter = text.substring(i, text.indexOf(' ', i));\n i = text.indexOf(' ', i);\n } else if (text.startsWith(delimiter, i)) {\n queries.add(query);\n i += delimiter.length();\n query = \"\";\n } else {\n query += text.charAt(i);\n i++;\n }\n }\n if (!query.replaceAll(\" \", \"\").equals(\"\")) {\n queries.add(query);\n }\n boolean autoCommit = getConn().getAutoCommit();\n try {\n getConn().setAutoCommit(false);\n Statement st = getConn().createStatement();\n for (String q : queries) {\n st.execute(q);\n }\n st.close();\n getConn().commit();\n } catch (SQLException e) {\n getConn().rollback();\n throw e;\n } finally {\n getConn().setAutoCommit(autoCommit);\n }\n }", "Schema createSchema();", "@Ignore(\"Disabled due to missing functionality in Oracle XE 10g. Works fine with XE 11g.\")\n @Test\n public void xml() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/xml\");\n flyway.migrate();\n flyway.clean();\n flyway.migrate();\n }", "protected void migrate() {\r\n java.util.Date dateNow = new java.util.Date();\r\n SQLiteBuilder builder = createBuilder();\r\n for (AbstractTable<?, ?, ?> table : tables) {\r\n if (table.migrated() < table.migrations()) {\r\n //FIXME this doesn't yet implement table updates.\r\n builder.createMigration(table).up(this);\r\n VersionRecord<DBT> v = _versions.create();\r\n v.table.set(table.helper.getTable().getRecordSource().tableName);\r\n v.version.set(1);\r\n v.updated.set(dateNow);\r\n v.insert();\r\n }\r\n }\r\n }", "void migrate(AggregateManager source, Settings settings);", "@Test\r\n public void exportOracleDatabaseScriptFromAnnotations() throws Exception\r\n {\r\n Properties props = PropertyLoader.loadProperties(\"./build.properties\");\r\n String classesDirPath = props.getProperty(\"classes.dir\");\r\n SchemaGenerator sgen = new SchemaGenerator(new String[] {\"uk.co.utilisoft.parms.domain\"},\r\n classesDirPath,\r\n new String[] {\".*UnitTest.*\", \".*Test.*\", \".*Interface.*\", \".*\\\\$.*\"});\r\n sgen.generate(Dialect.ORACLE, mTestFilePath);\r\n mTestFiles = getSavedFiles(mTestFilePath);\r\n assertTrue(!mTestFiles.isEmpty());\r\n\r\n for (int i = 0; i < mTestFiles.size(); i++)\r\n {\r\n File file = mTestFiles.get(i);\r\n InputStream is = new FileInputStream(file);\r\n long length = file.length();\r\n\r\n if (length > Integer.MAX_VALUE)\r\n {\r\n fail(\"Failed to read file \" + file.getName() + \" because file length \" + length + \" is too long\");\r\n }\r\n\r\n byte[] bytes = new byte[(int)length];\r\n int offset = 0;\r\n int numRead = 0;\r\n\r\n while (offset < bytes.length\r\n && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)\r\n {\r\n offset += numRead;\r\n }\r\n\r\n if (offset < bytes.length)\r\n {\r\n fail(\"Failed to finish reading file \" + file.getName());\r\n }\r\n\r\n is.close();\r\n\r\n // test file contains some data\r\n assertNotNull(bytes);\r\n assertTrue(\"File \" + file.getName() + \" contains zero bytes\", bytes.length > 0);\r\n }\r\n }", "private static void atualizarBD(){\n SchemaUpdate se = new SchemaUpdate(hibernateConfig);\n se.execute(true, true);\n }", "private void runSqlFromFile(String fileName) throws IOException {\n String[] sqlStatements = StreamUtils.copyToString( new ClassPathResource(fileName).getInputStream(), Charset.defaultCharset()).split(\";\");\n for (String sqlStatement : sqlStatements) {\n sqlStatement = sqlStatement.replace(\"CREATE TABLE \", \"CREATE TABLE OLD\");\n sqlStatement = sqlStatement.replace(\"REFERENCES \", \"REFERENCES OLD\");\n sqlStatement = sqlStatement.replace(\"INSERT INTO \", \"INSERT INTO OLD\");\n jdbcTemplate.execute(sqlStatement);\n }\n }", "@Override\n public boolean commitSMO() {\n return true;\n }", "private void generate(Dialect dialect, String directory) {\n cfg.setProperty(\"hibernate.dialect\", dialect.getDialectClass());\n SchemaExport export = new SchemaExport(cfg);\n export.setFormat(true);\n export.setDelimiter(\";\");\n export.setOutputFile(directory + \"create_db_\" + dialect.name().toLowerCase() + \".sql\");\n export.create(true, false);\n export.setOutputFile(directory + \"drop_db_\" + dialect.name().toLowerCase() + \".sql\");\n export.drop(true, false);\n }", "@Test\n public void procedure() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/procedure\");\n flyway.migrate();\n }", "void syncSchema(org.kaleta.entity.xml.Schema data);", "public void migrateLogsFromRcToDb();", "protected void doRun() {\n\n\t\tFile dirFile = null;\n\t\ttry {\n\t\t\tdirFile = new File(exportConfig.getDataFileFolder() + File.separator + \"ddl\");\n\t\t\tif (!dirFile.exists()) {\n\t\t\t\tdirFile.mkdir();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"create schema dir error : \", e);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tString schemaFile = null;\n\t\t\tString indexFile = null;\n\t\t\tString triggerFile = null;\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\tschemaFile = dirFile + File.separator + \"schema.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\tindexFile = dirFile + File.separator + \"index.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\ttriggerFile = dirFile + File.separator + \"trigger.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\n\t\t\tSet<String> tableSet = new HashSet<String>();\n\t\t\ttableSet.addAll(exportConfig.getTableNameList());\n\t\t\tExprotToOBSHandler.exportSchemaToOBSFile(dbInfo, exportDataEventHandler, tableSet,\n\t\t\t\t\tschemaFile, indexFile, triggerFile, exportConfig.getFileCharset(),\n\t\t\t\t\texportConfig.isExportSerialStartValue(), false);\n\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tif (exportConfig.isExportSchema()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SCHEMA));\n\t\t\t}\n\t\t\tif (exportConfig.isExportIndex()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_INDEX));\n\t\t\t}\n\t\t\tif (exportConfig.isExportTrigger()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_TRIGGER));\n\t\t\t}\n\t\t\tLOGGER.error(\"create schema index trigger error : \", e);\n\t\t}\n\n\t\ttry {\n\t\t\tif (exportConfig.isExportSerial()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t\tString serialFile = dirFile + File.separator + \"serial.sql\";\n\t\t\t\texportSerial(serialFile);\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\tExportConfig.TASK_NAME_SERIAL));\n\t\t\tLOGGER.error(\"create serial.sql error : \", e);\n\t\t}\n\n\t\ttry {\n\t\t\tif (exportConfig.isExportView()) {\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataBeginOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\tString viewFile = dirFile + File.separator + \"view.sql\";\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataSuccessEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\texportDataEventHandler.handleEvent(new ExportDataFinishOneTableEvent(\n\t\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\t\texportView(viewFile);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\texportDataEventHandler.handleEvent(new ExportDataFailedOneTableEvent(\n\t\t\t\t\tExportConfig.TASK_NAME_VIEW));\n\t\t\tLOGGER.error(\"create view.sql error : \", e);\n\t\t}\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.404 -0500\", hash_original_method = \"CD5C82C799E78C74801FDB521CEE7324\", hash_generated_method = \"CD5C82C799E78C74801FDB521CEE7324\")\n \nContext ()\n {\n copyTables();\n }", "public static void saveDrops() {\n DropTable.serialize(file);\n }", "public File getOutputDb();", "@Test\n\tpublic void convertingWithNullSourceFileTest() throws FileNotFoundException\n\t{\n\t\t/*try\n\t\t {\n\t\t OsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter();\n\t\t converter.convert(null, IOTester.TEST_FILE_NAME, new TestMapObjectsIdentifiersFinder());\n\t\t fail();\n\t\t }\n\t\t catch (IllegalArgumentException ex)\n\t\t {\n\t\t // ok\n\t\t }*/\n\t}", "private void generateChangeLog() {\n // get the database connection\n }", "public String getSchemaLocation();", "public void preMigration(Context context , String[]args) throws Exception\r\n {\r\n\t try {\r\n\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\t\t mqlLogRequiredInformationWriter(\"Inside PreMigration method to stamp the ids ----->\"+ \"\\n\");\r\n\t\t //loadResourceFile(context, \"emxConfigurationMigration\");\r\n\t\t mqlLogRequiredInformationWriter(\"Resource file loaded ------> emxConfigurationMigration.properties\");\r\n\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\r\n\t\t String strMqlCommandOff = \"trigger off\";\r\n\t\t MqlUtil.mqlCommand(context,strMqlCommandOff,true);\r\n\t\t mqlLogRequiredInformationWriter(\" 'trigger off' done at the start of preMigration \" + \"\\n\");\r\n\r\n\t\t IS_CONFLICT = false;\r\n\t\t StringBuffer sbRelPattern = new StringBuffer(50);\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM);\r\n\t\t sbRelPattern.append(\",\");\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO);\r\n\t\t sbRelPattern.append(\",\");\r\n\t\t sbRelPattern.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM);\r\n\r\n\t\t StringBuffer sbTypePattern1 = new StringBuffer(50);\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t sbTypePattern1.append(\",\");\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_FEATURE_LIST);\r\n\t\t sbTypePattern1.append(\",\");\r\n\t\t sbTypePattern1.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\r\n\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO jpoInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t StringList slDerivationChangedType1 = jpoInst.getDerivationChangedType(context,new String[0]);\r\n\t\t for(int i=0;i<slDerivationChangedType1.size();i++){\r\n\t\t\t sbTypePattern1.append(\",\");\r\n\t\t\t sbTypePattern1.append(slDerivationChangedType1.get(i));\r\n }\r\n\r\n\t\t StringList fsObjSelects = new StringList();\r\n\t\t fsObjSelects.addElement(SELECT_ID);\r\n\t\t fsObjSelects.addElement(SELECT_TYPE);\r\n\t\t fsObjSelects.addElement(SELECT_NAME);\r\n\t\t fsObjSelects.addElement(SELECT_REVISION);\r\n\t\t fsObjSelects.addElement(SELECT_LEVEL);\r\n\t\t fsObjSelects.addElement(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE + \"]\");\r\n\t\t fsObjSelects.addElement(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.type\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.id\");\r\n\t\t fsObjSelects.addElement(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE + \"]\");\r\n\r\n\t\t //Added to check for GBOM connection if any\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t fsObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_TO+\"].to.id\");\r\n\r\n\r\n\t\t StringBuffer sbRelPattern1 = new StringBuffer(50);\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_GBOM_FROM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_CUSTOM_GBOM);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_VARIES_BY);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_INACTIVE_VARIES_BY);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(RELATIONSHIP_MANAGED_SERIES);\r\n\t\t sbRelPattern1.append(\",\");\r\n\t\t sbRelPattern1.append(ConfigurationConstants.RELATIONSHIP_QUANTITY_RULE);\r\n\r\n\t\t StringBuffer sbTypePattern2 = new StringBuffer(50);\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_GBOM);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_QUANTITY_RULE);\r\n\t\t sbTypePattern2.append(\",\");\r\n\t\t sbTypePattern2.append(ConfigurationConstants.TYPE_MASTER_FEATURE);\r\n\r\n\r\n\t\t warningLog = new FileWriter(documentDirectory + \"migration.log\", true);\r\n\r\n\r\n\t\t documentDirectory = args[0];\r\n\t\t String fileSeparator = java.io.File.separator;\r\n\t\t if(documentDirectory != null && !documentDirectory.endsWith(fileSeparator)){\r\n\t\t\t documentDirectory = documentDirectory + fileSeparator;\r\n\t\t }\r\n\r\n\r\n\t\t if(args.length > 3){\r\n\r\n\t\t\t RESOLVE_CONFLICTS = args[3];\r\n\t\t\t mqlLogRequiredInformationWriter( \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"This step will also resolve the conflicts related \"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"to 'Mixed Composition' and 'Malformed GBOM/Feature List' Object ids\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"at the end of the step, \"\r\n \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"NOTE : User has to resolve the conflicts related \"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"to 'Mixed Usage' and 'Incorrect Mapping' related Object ids\"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"at the end of the step, \"\r\n\t\t\t\t\t \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\");\r\n\r\n\t\t }else{\r\n\r\n\t\t\t mqlLogRequiredInformationWriter( \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"This step will resolve the conflicts related \"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"to 'Malformed GBOM/Feature List' Object ids\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"at the end of the step, \"\r\n \t\t\t\t\t\t + \" if present.\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n \t\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t\t \t\t\t\t\t + \"NOTE : User has to resolve the conflicts related \"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"to 'Mixed Composition','Mixed Usage' and 'Incorrect Mapping' related Object ids\"\r\n\t\t\t\t\t + \"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"at the end of the step, \"\r\n\t\t\t\t\t \t\t\t\t\t\t + \" if present.\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t\t\t\t\t\t\t +\"\\n\");\r\n\t\t }\r\n\r\n\t\t\t String strMinRange = args[1].toString();\r\n\t\t\t minRange = Integer.parseInt(strMinRange);\r\n\t\t\t if (\"n\".equalsIgnoreCase(args[2])){\r\n\t\t\t\t maxRange = getTotalFilesInDirectory();\r\n\t\t\t } else {\r\n\t\t\t\t maxRange = Integer.parseInt(args[2]);\r\n\t\t\t }\r\n\r\n\t\t\t // Execute schema changes needed for migration\r\n\t\t\t //we should only call this once the first time the Find Objects Pre Migration is called.\r\n\t\t\t //If In process of PreMigration, do not call again\r\n\t\t\t int migrationStatus = getAdminMigrationStatus(context);\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is -------> 0 \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"'VariantConfigurationR212SchemaChangesForMigration.tcl' will be executed.\"+\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is ------->'PreMigrationInProcess' \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"'VariantConfigurationR212SchemaChangesForMigration.tcl' will not be executed\"\r\n\t\t\t \t\t\t\t\t\t\t\t +\"\\n\"\r\n\t\t\t \t\t\t\t\t\t\t\t + \"as this TCL is already executed\"+\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"If Migration Status is ------->'PreMigrationComplete' \"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"Pre Migration step is done.\"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\"\r\n\t\t\t\t\t \t\t\t\t\t\t + \"Please execute the next step to continue with Migration.\"\r\n\t\t\t\t\t \t\t\t\t\t\t +\"\\n\\n\");\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"Now the Migration Status is \"+ migrationStatus +\"\\n\\n\");\r\n\r\n\t\t\t if(migrationStatus == 0){\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"'VariantConfigurationR212SchemaChangesForMigration.tcl' execution started...\" + \"\\n\\n\");\r\n\t\t\t\t String cmdString = \"execute program VariantConfigurationR212SchemaChangesForMigration.tcl\";\r\n\t\t\t\t ContextUtil.pushContext(context);\r\n\t\t\t\t MqlUtil.mqlCommand(context, cmdString);\r\n\r\n\t\t\t\t //${CLASS:emxAdminCache}.reloadSymbolicName(context, \"type_ConfigurationFeature\");\r\n\r\n\t\t\t\t TYPE_CONFIGURATION_FEATURE = getSchemaProperty(context, \"type_ConfigurationFeature\");\r\n\r\n\t\t\t\t ContextUtil.popContext(context);\r\n\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"'VariantConfigurationR212SchemaChangesForMigration.tcl' execution is done...\"+ \"\\n\");\r\n\t\t\t }\r\n\t\t\t //------------------------------------------------\r\n\t\t\t //Now to read the files\r\n\t\t\t //------------------------------------------------\r\n\t\t\t int m = 0;\r\n\t\t\t for( m = minRange;m <= maxRange; m++){\r\n\t\t\t\t StringList objectList = new StringList();\r\n\t\t\t\t try{\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration in process for objects in objectids_\"+ m +\".txt file. \\n\\n\");\r\n\r\n\t\t\t\t\t //setting admin property MigrationR212VariantConfiguration in eServiceSystemInformation.tcl\r\n\t\t\t\t\t setAdminMigrationStatus(context,\"PreMigrationInProcess\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Migration Status set to value ----->\"+ \"'PreMigrationInProcess'\" +\"\\n\\n\");\r\n\r\n\t\t\t\t\t objectList = readFiles(m);\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"objectids_\"+ m +\".txt file traversal started \" + \"\\n\\n\");\r\n\t\t\t\t\t for(int iCntObjList=0 ;iCntObjList<objectList.size();iCntObjList++){\r\n\t\t\t\t\t\t String topLevelObjectId = (String)objectList.get(iCntObjList);\r\n\r\n\t\t\t\t\t\t String topLevelObjectType =\"\";\r\n\t\t\t\t\t\t DomainObject domTopLevelObject = DomainObject.newInstance(context, topLevelObjectId);\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"topLevelObjectType------------\"+ topLevelObjectType + \"\\n\");\r\n\t\t\t\t\t\t //topLevelObjectType = domTopLevelObject.getInfo(context, ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t Map htTopLevelObjData = (Map) domTopLevelObject.getInfo(context, fsObjSelects);\r\n\t\t\t\t\t\t topLevelObjectType = (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t String topLevelObjectName= (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_NAME);\r\n\t\t\t\t\t\t String topLevelObjectRevision = (String)htTopLevelObjData.get(ConfigurationConstants.SELECT_REVISION);\r\n\t\t\t\t\t\t Integer iCnt;\r\n\t\t\t\t\t\t iCnt= iCntObjList+1;\r\n\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Stamping of objects for below Top level object's structure started----->\"+\" --- \"+now()+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object Count in text file ----->\"+iCnt+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Id ----------->\"+topLevelObjectId+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Type --------->\"+topLevelObjectType+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Name --------->\"+topLevelObjectName+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object Revision ----->\"+topLevelObjectRevision+\"\\n\");\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t //Check if \"GBOM\" object is connected to Configuration Feature or Configuration Option\r\n\t\t\t\t\t\t //DomainObject domFeatObj = new DomainObject(strFeatureId);\r\n\t\t\t\t\t\t StringList TopLevelfeatureObjSelects = new StringList();\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_TYPE);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_NAME);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(SELECT_REVISION);\r\n\t\t\t\t\t\t TopLevelfeatureObjSelects.addElement(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t //topLevelObjectType = domTopLevelObject.getInfo(context, ConfigurationConstants.SELECT_TYPE);\r\n\t\t\t\t\t\t topLevelObjectType = (String)htTopLevelObjData.get(SELECT_TYPE);\r\n\r\n\t\t\t\t\t\t\t StringList sLTopLevelGBOMIds = new StringList();\r\n\r\n\t\t\t\t\t\t\t String TopLevelGBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t Object objTopLevelGBOMId = htTopLevelObjData.get(TopLevelGBOMSelect);\r\n\r\n\t\t\t\t\t\t\t if (objTopLevelGBOMId instanceof StringList) {\r\n\t\t\t\t\t\t\t\t sLTopLevelGBOMIds = (StringList) htTopLevelObjData.get(TopLevelGBOMSelect);\r\n\t\t\t\t\t\t\t } else if (objTopLevelGBOMId instanceof String) {\r\n\t\t\t\t\t\t\t\t sLTopLevelGBOMIds.addElement((String) htTopLevelObjData.get(TopLevelGBOMSelect));\r\n\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO VariantConfigInterObjMigrationInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t\t\t\t\t StringList slDerivationChangedType = VariantConfigInterObjMigrationInst.getDerivationChangedType(context,new String[0]);\r\n\r\n\r\n\t StringBuffer sbWhereClause = new StringBuffer(50);\r\n\t\tsbWhereClause.append(\"((\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.type.kindof != \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\")||(\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.type.kindof != \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"))||\");\r\n\t\tsbWhereClause.append(\"((\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"&&\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"].from.id == \"+topLevelObjectId +\"\");\r\n\t\tsbWhereClause.append(\")||(\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\tsbWhereClause.append(\"&&\");\r\n\t\tsbWhereClause.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_INACTIVE_FEATURE_LIST_FROM+ \"].from.id == \"+topLevelObjectId +\"\");\r\n\t\tsbWhereClause.append(\")\");\r\n\t\tsbWhereClause.append(\")\");\r\n\r\n\t\t\t\t\t\t\tStringBuffer sbObjWhere = new StringBuffer(50);\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"(\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\t\t\t\t\t\t\tfor(int i=0;i<slDerivationChangedType.size();i++){\r\n\t\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\t\t\t\t \t\t\tsbObjWhere.append(\"type == \\\"\" + slDerivationChangedType.get(i).toString() + \"\\\"\");\r\n\t\t\t\t }\r\n\t\t\t\t\t\t\tsbObjWhere.append(\")\");\r\n\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"||\");\r\n\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"(\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"type == \\\"\" + ConfigurationConstants.TYPE_FEATURE_LIST + \"\\\"\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(\"&&\");\r\n\t\t\t\t\t\t\tsbObjWhere.append(sbWhereClause);\r\n\t\t\t\t\t\t\tsbObjWhere.append(\")\");\r\n\r\n\r\n\t\t\t\t\t\t\tDomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to get the Top level object structure started ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\r\n\t\t\t\t\t\t MapList featureStructureList = domTopLevelObject.getRelatedObjects(context,\r\n\t\t\t\t\t\t\t\t sbRelPattern.toString(), // relationshipPattern\r\n\t\t\t\t\t\t\t\t sbTypePattern1.toString(), // typePattern\r\n\t\t\t\t\t\t\t\t fsObjSelects, // objectSelects\r\n\t\t\t\t\t\t\t\t null, // relationshipSelects\r\n\t\t\t\t\t\t\t\t false, // getTo\r\n\t\t\t\t\t\t\t\t true, // getFrom\r\n\t\t\t\t\t\t\t\t (short) 0, // recurseToLevel\r\n\t\t\t\t\t\t\t\t sbObjWhere.toString(), // objectWhere,\r\n\t\t\t\t\t\t\t\t null, // relationshipWhere\r\n\t\t\t\t\t\t\t\t (int)0); // limit\r\n\r\n\t\t\t\t\t\t DomainConstants.MULTI_VALUE_LIST.remove(\"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to get the Top level object structure ended ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\\n\\n\");\r\n\r\n\t\t\t\t\t\t String strNewFeatureType = \"\";\r\n\t\t\t\t\t\t String strResolvedNewFeatureType= \"\";\r\n\r\n\t\t\t\t\t\t // use case for standalone features\r\n\t\t\t\t\t\t if (featureStructureList.size() == 0){\r\n\r\n\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\" This Top level object structure doesn't have 'Feature List From' and 'Feature List To' connections \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" Check if this feature has 'Design Variants'or 'GBOM' or 'Managed Series' or 'Quantity Rules' connected \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If 'Yes' then stamp this Feature as 'type_LogicalFeature'\"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If 'No' then check for the property setting for this Feature \"+\"\\n\");\r\n\t\t\t\t\t //mqlLogRequiredInformationWriter(\" If property setting not found for the given type..Check for Parent Type and then set the Type \"+\"\\n\\n\\n\");\r\n\r\n\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to check for 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections started ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\t\t\t\t\t\t MapList LF_RelatedList = domTopLevelObject.getRelatedObjects(context,\r\n\t\t\t\t\t\t\t\t\t sbRelPattern1.toString(), // relationshipPattern\r\n\t\t\t\t\t\t\t\t\t sbTypePattern2.toString(), // typePattern\r\n\t\t\t\t\t\t\t\t\t null, // objectSelects\r\n\t\t\t\t\t\t\t\t\t null, // relationshipSelects\r\n\t\t\t\t\t\t\t\t\t true, // getTo\r\n\t\t\t\t\t\t\t\t\t true, // getFrom\r\n\t\t\t\t\t\t\t\t\t (short) 1, // recurseToLevel\r\n\t\t\t\t\t\t\t\t\t null, // objectWhere,\r\n\t\t\t\t\t\t\t\t\t null, // relationshipWhere\r\n\t\t\t\t\t\t\t\t\t (int) 0); // limit\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Query to check for 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections ended ------------>\"+\" --- \"+ now() +\"\\n\");\r\n\r\n\r\n\t\t\t\t\t\t\t // if feature has DVs or GBOM or Managed Series or Quantity Rules, it should be stamped as Logical\r\n\t\t\t\t\t\t\t if (!LF_RelatedList.isEmpty()) {\r\n\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"This Top level object has 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections'\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Hence stamp this Feature as attribute ---> NewFeatureType=type_LogicalFeature \"+\"\\n\");\r\n\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.TechnicalFeatureType\");\r\n\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.TechnicalFeatureType\");\r\n\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,\"\",EMPTY_STRINGLIST);\r\n\r\n\t\t\t\t\t\t\t } else {\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"This Top level object doesn't have the 'Design Variants' or 'GBOM' or 'Managed Series' or 'Quantity Rules' connections'\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t if(topLevelObjectType!=null\r\n\t\t\t\t\t\t\t\t\t\t && !topLevelObjectType.equalsIgnoreCase(ConfigurationConstants.TYPE_PRODUCT_LINE)\r\n\t\t\t\t\t\t\t\t\t\t && !topLevelObjectType.equalsIgnoreCase(ConfigurationConstants.TYPE_GBOM)\r\n\t\t\t\t\t\t\t\t\t\t && !mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_PRODUCTS)){\r\n\t\t\t\t\t\t\t\t\t\t //&& !isOfDerivationChangedType(context,topLevelObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t String strSymbolicType = FrameworkUtil.getAliasForAdmin(context,DomainConstants.SELECT_TYPE, topLevelObjectType, true);\r\n\t\t\t\t\t\t\t\t\t try{\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.\"+strSymbolicType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.\"+strSymbolicType);\r\n\t\t\t\t\t\t\t\t\t }catch (Exception e){\r\n\t\t\t\t\t\t\t\t\t\t //If property setting not found for the given type..Check for Parent Type and then set the Type\r\n\t\t\t\t\t\t\t\t\t\t String strParentType = UICache.getParentTypeName(context,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t\t\t String strParSymbolicType = FrameworkUtil.getAliasForAdmin(context,DomainConstants.SELECT_TYPE, strParentType, true);\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getResourceProperty(context,\"emxConfiguration.Migration.\"+strParSymbolicType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.\"+strParSymbolicType);\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t // stamping the features\r\n\t\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,\"\",EMPTY_STRINGLIST);\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }else{ // usecase for structures\r\n\r\n\t\t\t\t\t\t\t boolean isMixedUsage = false;\r\n\t\t\t\t\t\t\t boolean isMixedComposition = false;\r\n\t\t\t\t\t\t\t String referenceContextUsage=\"\";\r\n\r\n\t\t\t\t\t\t\t StringList featureTypesList = new StringList();\r\n\t\t\t\t\t\t\t // if toplevelobject is feature\r\n\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top level object is of Type :: \"+ topLevelObjectType +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t if (mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, topLevelObjectType)){\r\n\t\t\t\t\t\t\t\t // check for mixed usage\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Usage starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t StringList allFeatureTypesList = new StringList();\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tList of Features where this Toplevel Object is used. \"+ featureStructureList.size() +\"\\n\");\r\n\t\t\t\t\t\t\t\t outer: for (int j = 0; j < featureStructureList.size(); j++){\r\n\r\n\t\t\t\t\t\t\t\t\t Map fsMap = new HashMap();\r\n\r\n\t\t\t\t\t\t\t\t\t fsMap = (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t String strObjectType = (String) fsMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t referenceContextUsage = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\r\n\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, strObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tObject Type. \"+ strObjectType +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t String featureTypeSelect = \"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\";\r\n\t\t\t\t\t\t\t\t\t\t Object objFeatureTypes = fsMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t featureTypesList.clear();\r\n\r\n\t\t\t\t\t\t\t\t\t\t if (objFeatureTypes instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList = (StringList) fsMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t } else if (objFeatureTypes instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList.addElement((String) fsMap.get(featureTypeSelect));\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tList of 'Feature Type' attribute values of connected 'Feature List' objects. \"+ featureTypesList +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t if (featureTypesList.size() > 0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t for (int k = 0; k < featureTypesList.size(); k++){\r\n\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) featureTypesList.get(k);\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals((String) featureTypesList.get(0))){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"As the above list is not consisitent Feature will be marked as 'MixedUsage'.\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedUsage = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedUsage\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Usage ends \"+ \"\\n\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Composition starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t // check for mixed composition\r\n\t\t\t\t\t\t\t\t\t if (!isMixedUsage) {\r\n\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURE_LIST)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t allFeatureTypesList.addElement(strFeatureType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\t\tList of 'Feature Type' attribute values of connected 'Feature List' objects. \"+ allFeatureTypesList +\"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!strFeatureType.equals(allFeatureTypesList.get(0))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"As the above list is not consisitent Feature will be marked as 'MixedComposition'.\"+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t isMixedComposition = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedComposition\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Mixed Composition ends \"+ \"\\n\\n\");\r\n\r\n\t\t\t\t\t\t\t\t\t //Code to check the \"Feature List\" attribute \"Feature Type\" is correctly mapped against the Type\r\n\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\tCode to check Incorrect Mapping starts \"+ \"\\n\");\r\n\t\t\t\t\t\t\t\t\t\tif (!isMixedUsage\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !isMixedComposition\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURE_LIST)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_PRODUCTS)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t if (strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_TECHNICAL)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t }else if(strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MARKETING)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t break outer;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\tmqlLogRequiredInformationWriter(\"\tCode to check Incorrect Mapping ends \"+ \"\\n\\n\");\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t // stamp the structure including topLevelObject.\r\n\r\n\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Stamp starts \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t\t for (int j = 0; j < featureStructureList.size(); j++) {\r\n\t\t\t\t\t\t\t\t\t Map fsMap = (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t StringList sLGBOMIds = new StringList();\r\n\r\n\t\t\t\t\t\t\t\t\t String GBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t\t\t Object objGBOMType = fsMap.get(GBOMSelect);\r\n\r\n\t\t\t\t\t\t\t\t\t if (objGBOMType instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t sLGBOMIds = (StringList) fsMap.get(GBOMSelect);\r\n\t\t\t\t\t\t\t\t\t } else if (objGBOMType instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t sLGBOMIds.addElement((String) fsMap.get(GBOMSelect));\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t String strObjectId = (String) fsMap.get(SELECT_ID);\r\n\t\t\t\t\t\t\t\t\t String strObjectType = (String) fsMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t boolean isLeafLevel = false;\r\n\r\n\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t int subFeatureCount = Integer.parseInt((String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\"));\r\n\t\t\t\t\t\t\t\t\t\t if(subFeatureCount==0)\r\n\t\t\t\t\t\t\t\t\t\t\t isLeafLevel = true;\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t if(!isMixedUsage && !isMixedComposition){\r\n\t\t\t\t\t\t\t\t\t\t //strNewFeatureType = getNewFeatureType(context,(String)featureTypesList.get(0),isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,(String)allFeatureTypesList.get(0),isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t }else if(isMixedComposition){\r\n\t\t\t\t\t\t\t\t\t\t //Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top Level Feature Type..\"+referenceContextUsage);\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Is this feature LeafLevel..\"+isLeafLevel);\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Type of Object..\"+strObjectType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t strResolvedNewFeatureType = getNewFeatureType(context,referenceContextUsage,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_FEATURES) ||\r\n\t\t\t\t\t\t\t\t\t\t\t mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_PRODUCTS)||\r\n\t\t\t\t\t\t\t\t\t\t\t isOfDerivationChangedType(context, strObjectType)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t stampFeature(context,strObjectId,strNewFeatureType,strResolvedNewFeatureType,sLGBOMIds);\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t //toplevel object stamping\r\n\t\t\t\t\t\t\t\t //strNewFeatureType = getNewFeatureType(context,(String)featureTypesList.get(0),false,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,(String)allFeatureTypesList.get(0),false,topLevelObjectType);\r\n\t\t\t\t\t\t\t\t stampFeature(context,topLevelObjectId,strNewFeatureType,strResolvedNewFeatureType,sLTopLevelGBOMIds);\r\n mqlLogRequiredInformationWriter(\"Stamp ends \"+ \"\\n\");\r\n\r\n\t\t\t\t\t\t\t }//end if toplevelobject is feature\r\n\t\t\t\t\t\t\t // if top level object is Product or ProductLine\r\n\t\t\t\t\t\t\t if (mxType.isOfParentType(context, topLevelObjectType,ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,topLevelObjectType, ConfigurationConstants.TYPE_PRODUCT_LINE)) {\r\n\r\n\t\t\t\t\t\t\t\t Map fsMap=new HashMap();\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t for (int j = 0; j < featureStructureList.size(); j++) {\r\n\r\n\t\t\t\t\t\t\t\t\t fsMap= (Map) featureStructureList.get(j);\r\n\r\n\t\t\t\t\t\t\t\t\t int level = Integer.parseInt((String) fsMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t if (level == 1) {\r\n\t\t\t\t\t\t\t\t\t\t String referenceContextUsage2 = (String)fsMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\r\n\t\t\t\t\t\t\t\t\t\t // check for substructure mixed usage\r\n\t\t\t\t\t\t\t\t\t\t StringList allFeatureTypesList = new StringList();\r\n\t\t\t\t\t\t\t\t\t\t outer2:for (int k = j; k < featureStructureList.size(); k++) {\r\n\t\t\t\t\t\t\t\t\t\t\t Map subFSMap = (Map) featureStructureList.get(k);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t String strObjectType = (String) subFSMap.get(SELECT_TYPE);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t int currentLevel = Integer.parseInt((String) subFSMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t\t\t if (currentLevel == 1 && k > j) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t featureTypesList.clear();\r\n\t\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t ||isOfDerivationChangedType(context, strObjectType)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t String featureTypeSelect = \"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"].from.attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t Object objFeatureTypes = subFSMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (objFeatureTypes instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t featureTypesList = (StringList) subFSMap.get(featureTypeSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t\t } else if (objFeatureTypes instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t featureTypesList.addElement((String) subFSMap.get(featureTypeSelect));\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t objFeatureTypes=null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (featureTypesList.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t for (int l = 0; l < featureTypesList.size(); l++) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) featureTypesList.get(l);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals((String) featureTypesList.get(0))) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedUsage = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedUsage\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t break outer2;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t if(!isMixedUsage){\r\n\t\t\t\t\t\t\t\t\t\t\t\t if (mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURE_LIST)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) subFSMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t allFeatureTypesList.addElement(strFeatureType);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t if (!strFeatureType.equals(allFeatureTypesList.get(0))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t isMixedComposition = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"MixedComposition\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n \t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t subFSMap=null;\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t allFeatureTypesList=null;\r\n\t\t\t\t\t\t\t\t\t\t // stamp\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\nstamp started -----> \"+now()+\"\\n\\n\");\r\n\t\t\t\t\t\t\t\t\t\t String strObjectType=\"\";\r\n\t\t\t\t\t\t\t\t\t\t String strObjectId =\"\";\r\n\r\n\t\t\t\t\t\t\t\t\t\t for (int k = j + 1; k < featureStructureList.size(); k++) {\r\n\t\t\t\t\t\t\t\t\t\t\t Map subFSMap= (Map) featureStructureList.get(k);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectType = (String) subFSMap.get(SELECT_TYPE);\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectId = (String) subFSMap.get(SELECT_ID);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t StringList sLGBOMIds = new StringList();\r\n\t\t\t\t\t\t\t\t\t\t\t String GBOMSelect = \"from[\"+ConfigurationConstants.RELATIONSHIP_GBOM_FROM+\"].to.id\";\r\n\t\t\t\t\t\t\t\t\t\t\t Object objGBOMType = subFSMap.get(GBOMSelect);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if (objGBOMType instanceof StringList) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t sLGBOMIds = (StringList) subFSMap.get(GBOMSelect);\r\n\t\t\t\t\t\t\t\t\t\t\t } else if (objGBOMType instanceof String) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t sLGBOMIds.addElement((String) subFSMap.get(GBOMSelect));\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t int currentLevel = Integer.parseInt((String) subFSMap.get(SELECT_LEVEL));\r\n\t\t\t\t\t\t\t\t\t\t\t if (currentLevel == 1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t //mqlLogRequiredInformationWriter(\"\\ncurrentLevel == 1\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t //j=k;\r\n\t\t\t\t\t\t\t\t\t\t\t\t break;\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t if ((mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_FEATURES)\r\n \t\t\t\t\t\t\t\t\t\t || mxType.isOfParentType(context,strObjectType, ConfigurationConstants.TYPE_PRODUCTS)\r\n\t\t\t\t\t\t\t\t\t\t || isOfDerivationChangedType(context, strObjectType)))\r\n\t\t\t\t\t\t\t\t\t\t\t //)&&\r\n \t\t\t\t\t\t\t\t\t\t\t//!isOfDerivationChangedType(context, strObjectType)) {\r\n \t\t\t\t\t\t\t\t\t\t {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t boolean isLeafLevel = false;\r\n\t\t\t\t\t\t\t\t\t\t\t\t if(mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t && currentLevel != 2){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t int subFeatureCount = Integer.parseInt((String) subFSMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT + \"]\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t if(subFeatureCount==0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t isLeafLevel = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t if(!isMixedUsage && !isMixedComposition &&\r\n\t\t\t\t\t\t\t\t\t\t\t\t !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_FEATURE_LIST)\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& !mxType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.isOfParentType(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstrObjectType,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tConfigurationConstants.TYPE_PRODUCTS)){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t //Code to check the \"Feature List\" attribute \"Feature Type\" is correctly mapped against the Type\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t //Check for incorrect mapping\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t String strFeatureType = (String) fsMap.get(\"attribute[\"+ ConfigurationConstants.ATTRIBUTE_FEATURE_TYPE+ \"]\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t if (strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_TECHNICAL)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(!(mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)||\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_PRODUCTS))){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else if(strFeatureType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MARKETING)) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t if(!mxType.isOfParentType(context, strObjectType,ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = \"IncorrectMapping\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t\t }else if(!isMixedUsage && !isMixedComposition && (mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_FEATURES)\r\n\t\t\t\t\t\t\t\t\t\t\t\t ||mxType.isOfParentType(context,strObjectType,ConfigurationConstants.TYPE_PRODUCTS))){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t strNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t }else if(isMixedComposition){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t //Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t//Need to get the NewResolvedFeatureType\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Top Level Feature Type..\"+referenceContextUsage);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Is this feature LeafLevel..\"+isLeafLevel);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Type of Object..\"+strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t strResolvedNewFeatureType = getNewFeatureType(context,referenceContextUsage2,isLeafLevel,strObjectType);\r\n\t\t\t\t\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t stampFeature(context,strObjectId,strNewFeatureType,strResolvedNewFeatureType,sLGBOMIds);\r\n\t\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t subFSMap=null;\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectType=null;\r\n\t\t\t\t\t\t\t\t\t\t\t strObjectId=null;\r\n\t\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t //System.gc();\r\n\t\t\t\t\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\nstamp END -----> \"+now()+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t featureTypesList=null;\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Object Count in text file DONE ----->\"+ iCnt + \"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"Toplevel id.DONE ----->\"+ topLevelObjectId +\"--\"+now()+\"\\n\");\r\n\t\t\t\t\t\t mqlLogRequiredInformationWriter(\"------------------------------------------------------------\\n\");\r\n\t\t\t\t\t\t domTopLevelObject=null;\r\n\t\t\t\t\t\t topLevelObjectId=null;\r\n\t\t\t\t\t\t //System.gc();\r\n\t\t\t\t\t }\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration done for \"+objectList.size()+\" objects in objectids_\"+m+\".txt file. \\n\");\r\n\t\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t }catch(FileNotFoundException fnfExp){\r\n\t\t\t\t\t // throw exception if file does not exists\r\n\t\t\t\t\t throw fnfExp;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\t // Getting top level objects (this includes Feature,Products and ProductLines and also standalone features\r\n\t\t\t StringBuffer sbTypePattern = new StringBuffer(50);\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t\t sbTypePattern.append(\",\");\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\t\t\t sbTypePattern.append(\",\");\r\n\t\t\t sbTypePattern.append(ConfigurationConstants.TYPE_PRODUCT_LINE);\r\n\r\n\t\t\t StringBuffer sbObjWhere = new StringBuffer(50);\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==False\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\t\t\t sbObjWhere.append(\"||\");\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==False\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"from[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+ \"]==True\");\r\n\t\t\t sbObjWhere.append(\"&&\");\r\n\t\t\t sbObjWhere.append(\"(\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\"||\");\r\n\t\t\t sbObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCT_LINE + \"\\\"\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\t\t\t sbObjWhere.append(\")\");\r\n\r\n\t\t\t StringList objSelects = new StringList();\r\n\t\t\t objSelects.addElement(SELECT_ID);\r\n\t\t\t objSelects.addElement(SELECT_TYPE);\r\n\t\t\t objSelects.addElement(SELECT_NAME);\r\n\r\n\r\n\t\t\t //finding if any Feature objects in database or Product objects which have FLT relationship are not stamped\r\n\t\t\t StringBuffer unStampedTypePattern = new StringBuffer(50);\r\n\t\t\t unStampedTypePattern.append(ConfigurationConstants.TYPE_FEATURES);\r\n\t\t\t unStampedTypePattern.append(\",\");\r\n\t\t\t unStampedTypePattern.append(ConfigurationConstants.TYPE_PRODUCTS);\r\n\r\n\t\t\t emxVariantConfigurationIntermediateObjectMigration_mxJPO VariantConfigInterObjMigrationInst= new emxVariantConfigurationIntermediateObjectMigration_mxJPO(context, new String[0]);\r\n\t\t\t StringList slDerivationChangedType = VariantConfigInterObjMigrationInst.getDerivationChangedType(context,new String[0]);\r\n\r\n\t\t\t\tStringBuffer sbWhereClause = new StringBuffer(50);\r\n\t\t\t\tsbWhereClause.append(\"(\");\r\n\t\t\t\tsbWhereClause.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_FEATURES + \"\\\"\");\r\n\r\n\t\t for(int i=0;i<slDerivationChangedType.size();i++){\r\n\t\t \tunStampedTypePattern.append(\",\");\r\n\t\t \tunStampedTypePattern.append(slDerivationChangedType.get(i));\r\n\t \t\t\tsbWhereClause.append(\"||\");\r\n\t \t\t\tsbWhereClause.append(\"type.kindof == \\\"\" + slDerivationChangedType.get(i).toString() + \"\\\"\");\r\n\t\t }\r\n\t\t sbWhereClause.append(\")\");\r\n\r\n StringBuffer unStampedObjWhere = new StringBuffer(100);\r\n unStampedObjWhere.append(\"(\");\r\n unStampedObjWhere.append(sbWhereClause);\r\n unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"interface[\"+ INTERFACE_FTRIntermediateObjectMigration +\"]==FALSE\");\r\n\t\t\t unStampedObjWhere.append(\")\");\r\n\t\t\t /*unStampedObjWhere.append(\"||\");\r\n\t\t\t unStampedObjWhere.append(\"(\");\r\n\t\t\t unStampedObjWhere.append(\"type.kindof == \\\"\" + ConfigurationConstants.TYPE_PRODUCTS + \"\\\"\");\r\n\t\t\t unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"to[\"+ ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+ \"]==True\");\r\n\t\t\t unStampedObjWhere.append(\"&&\");\r\n\t\t\t unStampedObjWhere.append(\"interface[\"+ INTERFACE_FTRIntermediateObjectMigration +\"]==FALSE\");\r\n\t\t\t unStampedObjWhere.append(\")\");*/\r\n\r\n\t\t\t StringList sLobjSelects = new StringList();\r\n\t\t\t sLobjSelects.addElement(SELECT_NAME);\r\n\t\t\t sLobjSelects.addElement(SELECT_TYPE);\r\n\t\t\t sLobjSelects.addElement(SELECT_ID);\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"Check for unStamped Objects starts \"+\"\\n\");\r\n\r\n\t\t\t List unStampedObjectsList = DomainObject.findObjects(\r\n\t\t\t\t\t context,\r\n\t\t\t\t\t unStampedTypePattern.toString(),\r\n\t\t\t\t\t DomainConstants.QUERY_WILDCARD,\r\n\t\t\t\t\t unStampedObjWhere.toString(),\r\n\t\t\t\t\t sLobjSelects);\r\n\t\t\t mqlLogRequiredInformationWriter(\"Check for unStamped Objects ends \"+\"\\n\");\r\n\r\n\t\t\t //setting premigration status\r\n\t\t\t if(unStampedObjectsList.size()==0)\r\n\t\t\t {\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Unstamped object list size is 0.\\n\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Pre-migration is complete.\\n\");\r\n\t\t\t\t setAdminMigrationStatus(context,\"PreMigrationComplete\");\r\n\t\t\t }\r\n\t\t\t else\r\n\t {\r\n\t \tMap unStampedObjMap = new HashMap();\r\n\t \tfor(int i=0;i<unStampedObjectsList.size();i++){\r\n\r\n\t \t\tunStampedObjMap= (Map)unStampedObjectsList.get(i);\r\n\t \t\tString strUnStampId =(String)unStampedObjMap.get(SELECT_ID);\r\n\t \t\twriteOIDToTextFile(strUnStampId,\"unStampedOIDs\");\r\n\t \t}\r\n\r\n\t mqlLogRequiredInformationWriter(\"Pre-migration is not complete.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"WARNING: Some Feature objects are not stamped.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"Please refer unStampedOIDs.txt for details.\\n\");\r\n\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\r\n\t }\r\n\r\n\t\t\t if(IS_CONFLICT){\r\n\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"WARNING: Conflict MixedUsage/MixedComposition/MarketingGBOM exist.\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"Please view file 'Conflict.txt'for a list of these objects\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"These objects need to be deleted or fixed in order to proceed with the next step of migration..\" + \"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t\t mqlLogRequiredInformationWriter(\"\\n\");\r\n\t\t\t }\r\n\r\n\r\n\t\t\t String strMqlCommandOn = \"trigger on\";\r\n\t\t\t MqlUtil.mqlCommand(context,strMqlCommandOn,true);\r\n\t\t\t mqlLogRequiredInformationWriter(\"End of preMigration 'trigger on' done\" + \"\\n\");\r\n\r\n\t }catch (Exception e) {\r\n \t\t\te.printStackTrace();\r\n \t\t\tmqlLogRequiredInformationWriter(\"Pre-migration failed. \\n\"+e.getMessage() + \"\\n\");\r\n \t\t}\r\n \t}", "void storeSchema(LogSequenceNumber lsn, Table table);", "@Override\n protected SourceXmlSchemaHelper setUpSchema() {\n return null; // cause a plugin exception to get thrown\n }", "@Override\n protected SourceXmlSchemaHelper setUpSchema() {\n return null; // cause a plugin exception to get thrown\n }", "@Test\n public void objectNames() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/objectnames\");\n flyway.migrate();\n }", "private void exportToInsertSql() {\n\n if (destTableNameList.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"No table is selected.\");\n return;\n }\n final StringBuilder sb = new StringBuilder();\n for (final String tableName : destTableNameList) {\n utils.executeQuerySql(\"SELECT * FROM \" + tableName + \" WHERE 1=2\", new DataMetaUtils.QueryAction<Object>() {\n @Override\n public Object callback(ResultSet rs) throws SQLException {\n StringBuilder tableTriggerSb = new StringBuilder();\n ResultSetMetaData metaData = rs.getMetaData();\n String auditTableName = tableName + \"_AL\";\n tableTriggerSb.append(\"CREATE TABLE \").append(auditTableName).append(\" (\\n\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n tableTriggerSb.append(\" \");\n tableTriggerSb.append(metaData.getColumnName(i + 1));\n String typeName = metaData.getColumnTypeName(i + 1);\n tableTriggerSb.append(\" \")\n .append(typeName);\n if (metaData.getPrecision(i + 1) > 0) {\n tableTriggerSb.append(\"(\")\n .append(metaData.getPrecision(i + 1));\n if (metaData.getScale(i + 1) > 0) {\n tableTriggerSb.append(\",\")\n .append(metaData.getScale(i + 1));\n }\n tableTriggerSb.append(\")\");\n }\n\n tableTriggerSb.append(\",\\n\");\n\n }\n tableTriggerSb.append(\" ACT_TYPE CHAR(1),\\n\")\n .append(\" ACT_BY VARCHAR2(50),\\n\")\n .append(\" ACT_TIME DATE\\n\");\n tableTriggerSb.append(\");\\n\");\n\n\n //create trigger\n StringBuilder newInsert = new StringBuilder();\n StringBuilder delInsert = new StringBuilder();\n newInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n delInsert.append(\"INSERT INTO \").append(auditTableName).append(\"(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n delInsert.append(\"ACT_TYPE,\")\n .append(\"ACT_BY,\")\n .append(\"ACT_TIME) VALUES(\");\n\n for (int i = 0; i < metaData.getColumnCount(); i++) {\n\n newInsert.append(\":NEWROW.\").append(metaData.getColumnName(i + 1));\n newInsert.append(\",\");\n delInsert.append(\":OLDROW.\").append(metaData.getColumnName(i + 1));\n delInsert.append(\",\");\n }\n newInsert.append(\"v_actType,\")\n .append(\":NEWROW.UPDATED_BY,\")\n .append(\"sysdate);\\n\");\n delInsert.append(\"'D',\")\n .append(\"USER,\")\n .append(\"sysdate);\\n\");\n\n tableTriggerSb.append(\"CREATE OR REPLACE TRIGGER \")\n .append(\"TR_AL_\")\n .append(tableName)\n .append(\" \\n\")\n .append(\"AFTER INSERT OR DELETE OR UPDATE ON \")\n .append(tableName)\n .append(\" \\n\")\n .append(\"REFERENCING OLD AS \\\"OLDROW\\\" NEW AS \\\"NEWROW\\\" \\n\"\n + \"FOR EACH ROW \\n\"\n + \"ENABLE\\n\")\n .append(\"DECLARE\\n\")\n .append(\"v_actType char(1);\\n\")\n .append(\"BEGIN\\n\")\n .append(\"IF INSERTING OR UPDATING THEN \\n\"\n + \"BEGIN \\n\"\n + \"IF INSERTING THEN \\n v_actType := 'I'; \\nELSE\\n v_actType := 'U';\\n END IF;\\n\");\n tableTriggerSb.append(newInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \" ELSIF DELETING THEN \\n\"\n + \" BEGIN \\n\");\n\n tableTriggerSb.append(delInsert.toString());\n tableTriggerSb.append(\"END;\\n\"\n + \"END IF;\\n\"\n + \"END;\\n/\\n\");\n sb.append(tableTriggerSb.toString());\n\n return null;\n }\n });\n }\n\n SqlResultForm form = new SqlResultForm(null, true);\n form.setLocationRelativeTo(null);\n form.setSqlResult(sb.toString());\n form.setTestDsKey(((ValueName) cmbDs.getSelectedItem()).getValue());\n form.setVisible(true);\n\n }", "private void processAlterSchemaRename() throws HsqlException {\n\n String name = tokenizer.getSimpleName();\n\n tokenizer.getThis(Token.T_RENAME);\n tokenizer.getThis(Token.T_TO);\n\n String newName = tokenizer.getSimpleName();\n boolean isQuoted = tokenizer.wasQuotedIdentifier();\n\n database.schemaManager.renameSchema(name, newName, isQuoted);\n }", "@Test\n public void createPackage() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/package\");\n flyway.migrate();\n }", "private void backUpDb() throws FileNotFoundException, IOException {\n backUpDb(Options.toString(Options.DATABASE));\n }", "@Override\n public void review( IMigrationAction action ) throws MigrationException {\n if( ! ( action instanceof CopyFileAction ) ) return;\n CopyFileAction ca = (CopyFileAction) action;\n\n // It may have Ant-like $pathMaks instead of $src.\n if( ca.getSrc() == null ) return;\n \n String fName = ca.getSrc().getName();\n if( ! fName.endsWith(\"-beans.xml\")) return;\n \n // Check each <bean class=\"...\">. If the class is org.jboss.*, WARN.\n List<Bean> beans = extractBeans( ca.getSrc() );\n for( Bean bean : beans ) {\n if( bean.cls.startsWith(\"org.jboss.\")){\n action.getWarnings().add(\"A bean in \" + fName + \" uses org.jboss.* class: \" + bean.cls + \"\\n\"\n + \"Using MBeans is only supported as a legacy technology.\\n\"\n + \"Server boot may fail with ClassNotFoundException.\\n\"\n + \"Consult server documentation about classloading and modules.\");\n }\n }\n }", "public void stopMigrating();", "void setSchema(S schema);", "private void processCreateSchema() throws HsqlException {\n\n String name = tokenizer.getSimpleName();\n boolean isquoted = tokenizer.wasQuotedIdentifier();\n\n if (session.isSchemaDefintion()) {\n throw Trace.error(Trace.INVALID_IDENTIFIER);\n }\n\n tokenizer.getThis(Token.T_AUTHORIZATION);\n tokenizer.getThis(GranteeManager.DBA_ADMIN_ROLE_NAME);\n\n if (database.schemaManager.schemaExists(name)) {\n if (!session.isProcessingScript) {\n throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS);\n }\n } else {\n database.schemaManager.createSchema(name, isquoted);\n }\n\n HsqlName schemaName = database.schemaManager.getSchemaHsqlName(name);\n\n database.logger.writeToLog(session,\n DatabaseScript.getSchemaCreateDDL(database,\n schemaName));\n database.logger.writeToLog(session,\n \"SET SCHEMA \" + schemaName.statementName);\n session.startSchemaDefinition(name);\n\n session.loggedSchema = session.currentSchema;\n }", "public void export(\n Path generationPath,\n SqlTableMetamodelRepository sqlTableModelRepository,\n String tablePrefix,\n String context) {\n Map<String, Object> dataModel = new HashMap<>();\n dataModel.put(\"representation\", sqlTableModelRepository);\n dataModel.put(\"tablePrefix\", tablePrefix);\n\n freemarkerService.export(\n dataModel,\n \"polygenesis-generator-java-sql-flyway/script.sql.ftl\",\n makeFileName(generationPath, context));\n }", "public static void updatePOFiles(){\n\t\tfor(TableInfo tableInfo: tables.values()){\n\t\t\tJavaFileUtils.createJavaPOFile(tableInfo,new MySQLTypeConvertor());\n\t\t}\n\t}", "boolean supportsRollbackAfterDDL();", "public void writeDatabase();", "public void createNewSchema() throws SQLException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n if(uniqueID != 0) {\n uniqueID++;\n databaseStatement.executeQuery(\"CREATE DATABASE OSM\"+uniqueID+\";\");\n }\n }", "@Test\n\tpublic void convertingWithEmptySourceFileTest() throws FileNotFoundException\n\t{\n\t\t/*try\n\t\t {\n\t\t OsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter();\n\t\t converter.convert(\"\", IOTester.TEST_FILE_NAME, new TestMapObjectsIdentifiersFinder());\n\t\t fail();\n\t\t }\n\t\t catch (IllegalArgumentException ex)\n\t\t {\n\t\t // ok\n\t\t }*/\n\t}", "@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "@Transactional\n\tpublic void saveSchemaNative(SchemaMtl docMtl){\n\t\tlog.debug(\"---------------------\"+docMtl.getTestT());\n//\t\tdelete(docMtl);\n\t\tdeleteNative(docMtl);\n\t\tlog.debug(\"---------------------\"+docMtl.getTestT());\n\t\tnewDrugTradeSource(docMtl);\n\t\tlog.debug(\"---------------------\"+docMtl.getTestT());\n\t\treviseSourceNative(docMtl.getClassM(), docMtl);\n\t\tlog.debug(\"---------------------\"+docMtl.getTestT());\n\t\tif(docMtl.getPatientMtl()!=null){\n\t\t\tlog.debug(\"---------------------\");\n\t\t\tfor (Tree tree : docMtl.getPatientMtl().getRemoveNodeS()){\n\t\t\t\tlog.debug(\"---------------------\");\ndeleteNative(tree);\n\t\t\t}\n\t\t\treviseSourceNative(docMtl.getPatientMtl().getClassM(), docMtl.getPatientMtl());\n\t\t\tmergeTreeNative(docMtl.getPatientMtl().getDocT());\n\t\t}\n\t\tmergeTreeNative(docMtl.getDocT());\n\t\tlog.debug(\"---------------------\"+docMtl.getTestT());\n\t\tif(\"copyTaskAll\".equals(docMtl.getAction())){\n\t\t\tlog.debug(\"---copyTaskAll------------------\");\n\t\t\tTree fromSchemaT = docMtl.getCopyNodeT();\n\t\t\tTask fromSchemaO = (Task) fromSchemaT.getMtlO();\n\t\t\tTask schemaO = (Task) docMtl.getDocT().getMtlO();\n\t\t\tschemaO.setDuration(fromSchemaO.getDuration());\n\t\t\tem.merge(schemaO);\n\t\t\tcopyTaskAll(docMtl, fromSchemaT);\n\t\t}\n//\t\tem.flush();\n\t\tlog.debug(\"---------------------\");\n\t\towsSession.setDocMtl(null);\n//\t\towsSession.getUserCareSession().setDocMtl(null);\n\t}", "public static void insertTestDataExport() throws ArcException {\n\t\tinsertTestData(\"BdDTest/script_test_export.sql\");\n\t}", "@Test\n void migrate() {\n }", "public static void main(String[] args) {\n MySQLScriptGen databaseobject = new MySQLScriptGen();\n\n //this is same for every model\n JsonFileReader jsonFileReader = JsonFileReader.getInstance();\n JSONObject pim = jsonFileReader.getplatformIndependentModel();\n String ddl_script = databaseobject.createDDLScript(pim);\n String dml_script = databaseobject.createDMLScript(pim);\n String dql_script = databaseobject.createDQLScript(pim);\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\\n\");\n System.out.println(ddl_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dml_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dql_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n }", "protected abstract String getAlterTable(boolean nextLine, boolean only);", "@Test\n public void function() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/function\");\n flyway.migrate();\n }", "@Test\n public void trigger() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/trigger\");\n flyway.migrate();\n flyway.clean();\n flyway.migrate();\n }", "@Override\r\n\t\tpublic void setSchema(String schema) throws SQLException {\n\t\t\t\r\n\t\t}", "@Test\n public void atSchemaLocationTest() {\n // TODO: test atSchemaLocation\n }", "public SchemaMigrationTest(String testName) {\n\t\tsuper(testName);\n\t\t\n\t\tcollection = new SchemaCollection();\n\t\t\n\t\tcollection.registerSchema(new Sample1MigrationSchema());\n\t\tcollection.registerSchema(new Sample2MigrationsSchema());\n\t\t\n\t\ttry {\n\t\t\tcollection.createOrMigrateSchema();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void updateSchemaVersion() {\n // The schema version should never regress, so make sure we don't change\n // anything if this code is older than what's currently in the database\n if (latestCodeVersion > getVersionForSchema()) {\n updateSchemaVersionId(this.latestCodeVersion);\n }\n }", "@Override\n public boolean rollbackSMO() {\n String alterTableString = \"ALTER TABLE %s RENAME TO %s;\";\n String cmdString = String.format(alterTableString, toName, fromName);\n try {\n Statement stmt = conn.createStatement(); \n stmt.executeUpdate( (cmdString));\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return true;\n }", "public void convertCsvDataToSQLScrip(List<CorruptionIndex> data, String destinationFile){\n\n }", "private void createSchema() throws Exception\n {\n LOG.info(\"Creating schema\");\n HibernateUtil.currentSession();\n }", "public boolean writePlicSnapshotToFile(File f, String dbSchema, String dataSource){\n try{\n //Obtener la conexion JDBC del proyecto\n InitialContext ctx = new InitialContext();\n DataSource ds = (DataSource) ctx.lookup(dataSource);\n Connection connection = ds.getConnection();\n\n\t String query = \"SELECT '\\\"'||REPLACE(COALESCE(globaluniqueidentifier,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(institutioncode,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datelastmodified,'YYYY-MM-DD HH24:MI:SS'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(taxonrecordid,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(language,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(creators,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(distribution,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(abstract,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(kingdomtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(phylumtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(classtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ordertaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(familytaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(genustaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(synonyms,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(authoryearofscientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(speciespublicationreference,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(commonnames,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(typification,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(contributors,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datecreated,'YYYY-MM-DD'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habit,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(lifecycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(reproduction,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(annualcycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(briefdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(feeding,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(behavior,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(interactions,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(chromosomicnumbern,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(moleculardata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(populationbiology,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(threatstatus,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(legislation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habitat,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(territory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(endemicity,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(theuses,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(themanagement,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(folklore,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(thereferences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructureddocumentation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(otherinformationsources,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(papers,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(identificationkeys,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(migratorydata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ecologicalsignificance,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructurednaturalhistory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(invasivenessdata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(targetaudiences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(version,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage3,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage3,''),'\\r\\n', ' ')||'\\\"'\"+\n\t\t\t \" AS aux \"+\n\t\t\t \"FROM \"+dbSchema+\".plic_snapshot;\";\n\n System.out.println(query);\n\n\t\t\tStatement st = connection.createStatement();\n\t\t\tResultSet rs = st.executeQuery(query); \n\n //Imprimir los datos en el archivo\n BufferedWriter out = new BufferedWriter(new FileWriter(f));\n\t\t\twhile (rs.next()) {\n\t\t\t\tout.write(rs.getString(\"aux\")+\"\\n\");\n\t\t\t}\n out.close();\n\n //Cerrar el resultset y el statement\n rs.close();\n\t\t\tst.close();\n\n //Resultado\n return true;\n }\n catch(Exception e){\n e.printStackTrace();\n return false;}\n }", "@Test\n public void migrationsWithPlaceholders() throws Exception {\n int countUserObjects1 = jdbcTemplate.queryForInt(\"SELECT count(*) FROM user_objects\");\n\n Map<String, String> placeholders = new HashMap<String, String>();\n placeholders.put(\"tableName\", \"test_user\");\n flyway.setPlaceholders(placeholders);\n flyway.setLocations(\"migration/dbsupport/oracle/sql/placeholders\");\n\n flyway.migrate();\n MigrationVersion version = flyway.info().current().getVersion();\n assertEquals(\"1.1\", version.toString());\n assertEquals(\"Populate table\", flyway.info().current().getDescription());\n\n assertEquals(\"Mr. T triggered\", jdbcTemplate.queryForString(\"select name from test_user\"));\n\n flyway.clean();\n\n int countUserObjects2 = jdbcTemplate.queryForInt(\"SELECT count(*) FROM user_objects\");\n assertEquals(countUserObjects1, countUserObjects2);\n\n MigrationInfo[] migrationInfos = flyway.info().applied();\n for (MigrationInfo migrationInfo : migrationInfos) {\n assertNotNull(migrationInfo.getScript() + \" has no checksum\", migrationInfo.getChecksum());\n }\n }", "public String[] getSqlStrings()\n {\n ArrayList<String> statements = new ArrayList<String>();\n statements.add(\"create schema bruce;\"); // hibernate won't create the schema for us\n\n try\n {\n // schema ddl is in a .sql file at the root of bruce.jar\n final String ddlString = readFileResource(\"cluster-ddl.sql\").toString();\n final StringTokenizer tokenizer = new StringTokenizer(ddlString, DDL_DELIMITER);\n while (tokenizer.hasMoreTokens())\n {\n statements.add(tokenizer.nextToken());\n }\n }\n catch (IOException e)\n {\n LOGGER.error(\"Cannot load SQL strings\", e);\n }\n return statements.toArray(new String[statements.size()]);\n }", "private void migrate (String name)\t{\n\t\ttry{\n\t\t\tFile f1 = new File( sourceDir + name);\n\t\t\t\n\t\t\tif (!f1.exists())\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tFile f2 = new File(targetDir +name);\n\t\t\t\n\t\t InputStream in = new FileInputStream(f1);\n\t\t \n\t\t OutputStream out = new FileOutputStream(f2);\n\n\t\t byte[] buf = new byte[1024];\n\t\t int len;\n\t\t while ((len = in.read(buf)) > 0){\n\t\t out.write(buf, 0, len);\n\t\t }\n\t\t in.close();\n\t\t out.close();\n\t\t System.out.println(\"File copied.\");\n\t\t }\n\t\t catch(FileNotFoundException ex){\n\t\t System.out.println(ex.getMessage() + \" in the specified directory.\");\n\t\t System.exit(0);\n\t\t }\n\t\t catch(IOException e){\n\t\t System.out.println(e.getMessage()); \n\t\t }\n\t}", "@Ignore(\"Disabled due to missing flashback functionality in Oracle XE.\")\n @Test\n public void flashback() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/flashback\");\n flyway.migrate();\n flyway.clean();\n flyway.migrate();\n }", "GraphQLSchema transform(GraphQLSchema originalSchema);", "public void copyDatabaseFromAsset() {\n\n /** Just to calculate time How much it will take to copy database */\n //Utility t = new Utility();\n\n\t\t/* Insert Database */\n DBHelper db = new DBHelper(this);\n\n try {\n boolean dbExist = db.isDataBaseAvailable();\n\n if (!dbExist)\n db.copyDataBaseFromAsset();\n\n /* Force fully calling onCreate to create table of Favourite*/\n //db.onCreate(db.getWritableDatabase());\n\n } catch (Exception e) {\n AppLogger.writeLog(\"state \" + TAG + \" -- \" + e.toString());\n\n if (AppConstants.DEBUG)\n Log.e(\"\", e.toString());\n }\n }", "public abstract boolean migrate(int userId, String uuid, String tarHost, String content, String conid);", "protected void setupDB() {\n\t\tlog.info(\"------------------------------------------\");\n\t\tlog.info(\"Initialization database started\");\n\t\tlog.info(\"ddl: db-config.xml\");\n\t\tlog.info(\"------------------------------------------\");\n\t\ttry {\n\t\t\tfinal List<String> lines = Files.readAllLines(Paths.get(this.getClass()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getClassLoader()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getResource(\"create-campina-schema.sql\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toURI()), Charset.forName(\"UTF-8\"));\n\n\t\t\tfinal List<String> statements = new ArrayList<>(lines.size());\n\t\t\tString statement = \"\";\n\t\t\tfor (String string : lines) {\n\t\t\t\tstatement += \" \" + string;\n\t\t\t\tif (string.endsWith(\";\")) {\n\t\t\t\t\tstatements.add(statement);\n\t\t\t\t\tstatement = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry (final Connection con = conManager.getConnection(Boolean.FALSE)) {\n\t\t\t\ttry (final PreparedStatement pstmt = con.prepareStatement(\"DROP SCHEMA IF EXISTS campina\")) {\n\t\t\t\t\tpstmt.executeUpdate();\n\t\t\t\t}\n\t\t\t\tfor (String string : statements) {\n\t\t\t\t\tlog.info(\"Executing ddl: \" + string);\n\t\t\t\t\ttry (final PreparedStatement pstmt = con.prepareStatement(string)) {\n\t\t\t\t\t\tpstmt.executeUpdate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new IllegalStateException(\"Could not setup db\", e);\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tlog.error(\"Could not setup database\", e);\n\t\t\tthrow new IllegalStateException(\"ddl file load failed\", e);\n\t\t}\n\t\tlog.info(\"------------------------------------------\");\n\t\tlog.info(\"Initialization database finished\");\n\t\tlog.info(\"------------------------------------------\");\n\t}", "protected void migrateData(CiDb db, UpdateUI ui) throws OrmException, SQLException {\n }", "@Override\n\tpublic void doSaveAs() {\n\n\t}", "public void analyzeCreateTableStmt(TCreateTableSqlStatement stmt) {\n\t\tString tableName=stmt.getTargetTable().toString();\n\t\tif(Input.tablesInfo.get(tableName)!=null){System.out.println(\"Table already exists..\"); return;}\n\t\tTColumnDefinition column;\n\t\ttry \n\t\t{\n\t\tFile file =new File(\"Resources/metadata.txt\");\n\t\tString NF=\"Resources/\"+tableName+\".csv\";\n\t\tFile newFile =new File(NF);\n\t\tif(!newFile.exists())\n\t\t\tnewFile.createNewFile();\n\t\tif(!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\t\t\n\t\t\tFileWriter fileWritter = new FileWriter(file,true);\n\t\t\tBufferedWriter bufferWritter = new BufferedWriter(fileWritter);\n\t\t\t//bufferWritter.newLine(); \n\t\t\tbufferWritter.write(\"<begin_table>\".trim());\n\t\t\tbufferWritter.newLine(); bufferWritter.write(tableName);\n\t\t\n\t\t\tfor(int i=0;i<stmt.getColumnList().size();i++)\n\t\t{\n bufferWritter.newLine();\n column = stmt.getColumnList().getColumn(i);\n bufferWritter.write(column.getColumnName().toString().trim());\n \n }\n\t\t\n\t\tbufferWritter.newLine();\n\t\tbufferWritter.write(\"<end_table>\".trim());bufferWritter.newLine(); \n\t\tbufferWritter.close();\n\t\tSystem.out.println(\"Table created successfully...\");\n\t\t}\t\n\t\t catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}" ]
[ "0.6353746", "0.6002483", "0.59397507", "0.59152514", "0.58107615", "0.5778524", "0.5760724", "0.5737137", "0.5714637", "0.5703406", "0.568981", "0.56543124", "0.5649789", "0.56202275", "0.56202275", "0.56197965", "0.56134", "0.5611582", "0.5608942", "0.55973935", "0.5592502", "0.55546147", "0.5547761", "0.55454046", "0.547846", "0.5392914", "0.53620887", "0.5346403", "0.5342452", "0.5342452", "0.5312657", "0.5312395", "0.5307512", "0.5302803", "0.5263079", "0.5261082", "0.525234", "0.52370965", "0.5224644", "0.52211124", "0.5196809", "0.5186313", "0.5184941", "0.5176897", "0.5155792", "0.51504225", "0.5136277", "0.5125819", "0.5116775", "0.5112301", "0.51105356", "0.5098003", "0.50936383", "0.50888073", "0.50596505", "0.5034634", "0.5034634", "0.50342315", "0.5026375", "0.5025041", "0.50170135", "0.5005058", "0.49995825", "0.49979615", "0.49954832", "0.49844438", "0.498112", "0.49801618", "0.49690652", "0.49665806", "0.4965214", "0.4964304", "0.49518192", "0.49516988", "0.49481615", "0.49438787", "0.49422657", "0.493389", "0.49333608", "0.49282718", "0.49271402", "0.4921742", "0.49158904", "0.49139446", "0.49113703", "0.49069196", "0.49026328", "0.48962265", "0.48855", "0.48841295", "0.48830456", "0.48811638", "0.4876842", "0.48736593", "0.48642704", "0.48598343", "0.48474264", "0.48448563", "0.483432", "0.4829818" ]
0.6028849
1
Gets a single FractalNode out of an FScript value: If arg is a FractalNode, returns it. If arg is a nonempty nodeset (i.e. a FractalNode[]), returns one element of the set. Otherwise, returns null.
public static Node getSingleNode(Object arg) { if (arg instanceof Node) { return (Node) arg; } else if (arg instanceof Iterable<?>) { return (Node) Iterables.getOnlyElement((Iterable<?>) arg, null); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object get(Node node);", "private SearchNode findFirstNode(HashSet<SearchNode> set){\n\t\t\tSearchNode min = null;\n\t\t\tfor (SearchNode cur : set){\n\t\t\t\tif (min == null || cur.fScore < min.fScore)\n\t\t\t\t\tmin = cur;\n\t\t\t}\n\t\t\treturn min;\n\t\t}", "public Node<E> getFirst(){\n Node<E> toReturn = head.getNext();\n return toReturn == tail ? null: toReturn;\n }", "public GraphNode<?> get(String name) {\n\t\tfor(GraphNode<?> node : nodes) {\n\t\t\tif(node.data.equals(name))\n\t\t\t\treturn node;\n\t\t}\n\t\treturn null;\n\t}", "public Node getFirst() {\r\n\t\treturn getNode(1);\r\n\t}", "public T getSet( T obj )\n {\n \tNode temp = nodes.get(obj);\n \tif(temp!=null){\n \t\treturn getRoot(temp).data;\n \t}\n // If here, no such data object; throw exception.\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj );\n }", "public Node<E> get(E e){\n Node<E> current = head.getNext();\n while (current != tail) {\n if (current.getValue() == e) {\n return current;\n }\n current = current.getNext();\n }\n return null;\n }", "public Node get(String tag)\n {\n if(_list!=null)\n {\n for(int i=0;i<_list.size();i++)\n {\n Object o=_list.get(i);\n if(o instanceof Node)\n {\n Node n=(Node)o;\n if(tag.equals(n._tag))\n return n;\n }\n }\n }\n return null;\n }", "private SearchNode findNodeWithCoords(HashSet<SearchNode> set, int x, int y){\n\t\t\tfor (SearchNode cur : set){\n\t\t\t\tif (cur.posX == x && cur.posY == y)\n\t\t\t\t\treturn cur;\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "Node get(URI uri);", "Node getSingleNode(String path)\n throws ProcessingException;", "public Object getFirst()\n {\n return ((Node)nodes.elementAt(0)).data;\n }", "public Value get(String key) {\n Node x = get(root, key, 0);\n if (x == null) return null; //node does not exist\n else return (Value) x.val; //found node, but key could be null\n }", "public Node<T> getFirst() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.next;\r\n }", "private T bestValue(MatchTreeNode<T> node) {\n T value = null;\n if (node != null) {\n if (node.child(\"/\") != null) {\n value = node.child(\"/\").value();\n } else {\n value = bestValue(node.parent());\n }\n }\n return value;\n }", "Node getNode();", "public Node<T> getFirst() {\r\n\t\treturn first;\r\n\t}", "N getNode(int id);", "public Node<E> getNodeFromCache() {\n if (this.cacheSize == 0) {\n return null;\n }\n Node<E> node = this.firstCachedNode;\n this.firstCachedNode = node.next;\n node.next = null;\n this.cacheSize--;\n return node;\n }", "public Node getNode();", "@Override\n public R visit(GraphNode n, A argu) {\n R _ret = null;\n n.nodeChoice.accept(this, argu);\n return _ret;\n }", "public node getFirst() {\n\t\treturn head;\n\t\t//OR\n\t\t//getAt(0);\n\t}", "public Object lookup(String key){\n ListNode<String,Object> temp = getNode(key);\n if(temp != null)\n return temp.value;\n else\n return null;\n }", "public native VertexNode first();", "public Node returnNodeById(Id id){\n\t\tif(id.indice >= listOfNodes.size()) return null;\n\t\tNode n = listOfNodes.elementAt(id.indice);\n\t\tif(n == null) return null;\n\t\tId nid = n.getId();\n\t\tif(nid.indice != id.indice || nid.unique != id.unique) return null; \n\t\treturn n;\n\t}", "public Node getNode(String key) {\n \ttmp = first;\n \tint i;\n \tfor (i=0;i<len;i++) {\n \t\tif (tmp.key == key) {\n \t\t\treturn tmp;\n \t\t}\n \t\ttmp = tmp.getNext();\n \t}\n \treturn null;\n }", "public Node get(double x, double y){\n\t\t\treturn null;\n\t\t}", "public static Optional<Node> findFirst(@Nonnull final NodeList nodeList) {\n\t\treturn nodeList.getLength() > 0 ? Optional.of(nodeList.item(0)) : Optional.empty();\n\t}", "private Node find_inputNode() {\r\n Node node = null;\r\n for (Node n : NodeSet) {\r\n if (n instanceof InputNode) {\r\n node = n;\r\n }\r\n }\r\n return node;\r\n }", "public Node getNode(Object element) {\n return nodes.get(element);\n }", "public static<T> Optional<Node<T>> search(T value, Node<T> start ){\n\n Queue<Node> queue = new ArrayDeque<>();//inicializar cola\n queue.add(start);// se agraga a la cola el inicial\n\n Node<T> currentNode = null; //creacion de variable currenteNode\n\n Node<T> father = null;\n\n Set<Node<T>> closed = new HashSet<>(); //memoria //una coleccion de nodos existentes\n\n while(!queue.isEmpty()){ //1-verificar si puede continuar\n\n currentNode = queue.remove();\n\n System.out.println(\"Visitando el nodo... \" + currentNode.getValue()); //se convierte en string\n\n //2-verificar si se encuentra en la meta\n if(currentNode.getValue().equals(value)){\n return Optional.of(currentNode);\n }\n else{\n if (!closed.contains(currentNode)){ // existe o no en memoria (no repetir caminos.\n closed.add(currentNode); // 3-espacio explorado\n queue.addAll(currentNode.getNeighbors()); // sucesor // expande\n }\n queue.removeAll(closed);//elimina el recien visitado\n }\n\n }\n return Optional.empty();\n }", "public BPGNode get(int in) {\n return in == 0 ? n1 : (in == 1 ? n2 : null);\n }", "@Override\n public R visit(TriplesSameSubject n, A argu) {\n R _ret = null;\n n.nodeChoice.accept(this, argu);\n return _ret;\n }", "private Node getLowestNode(Set<Node> openSet)\r\n {\r\n // find the node with the least f\r\n double minF = Double.MAX_VALUE;\r\n Node[] openArray = openSet.toArray(new Node[0]);\r\n\r\n Node q = null;\r\n for (int i = 0; i < openArray.length; ++i)\r\n {\r\n if (openArray[i].f < minF) \r\n {\r\n minF = openArray[i].f;\r\n q = openArray[i];\r\n }\r\n }\r\n return q;\r\n }", "public static Node getSingleNode(Node node, String path) throws UMROException {\r\n NodeList nodeList = getMultipleNodes(node, path);\r\n if (nodeList.getLength() == 0) {\r\n throw new UMROException(\"Did not find any nodes for path \" + path);\r\n }\r\n if (nodeList.getLength() > 1) {\r\n throw new UMROException(\"Found \" + nodeList.getLength() + \" but expected only one node for path \" + path);\r\n }\r\n return nodeList.item(0);\r\n }", "CMSObject getFirstNodeById(String id, Object session) throws RepositoryAccessException;", "public Node findNode(E val) {\n\t\tif (val == null) return null;\n\t\treturn findNode(root, val);\n\t}", "Node getNode(String path);", "@Override\n\tpublic T get(T elem) {\n\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\tif (values[i].equals(elem)) {\n\t\t\t\treturn values[i];\n\t\t\t} else if (comp.compare(values[i],elem) < 0) { // finds the set of children that can possibly contain elem\n\t\t\t\treturn children[i].get(elem);\n\t\t\t}\n\t\t}\n\t\tif (childCount > 1) { // check final set of children\n\t\t\treturn children[valCount - 1].get(elem);\n\t\t}\n\t\treturn null;\n\t}", "public Node searchElement(Object el) {\n\t\n\t\tfor (Node elemento : this.set) {\n\t\t\tif(elemento.getElemento().equals(el)) {\n\t\t\t\treturn elemento;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Jode first() {\n return children().first();\n }", "public Node getNode(Reference ref, Presentation presentation);", "public Node getChild(String... args) throws ChildNotFoundException {\n\t\tNode child = null;\n\t\tfor(Node node : selected_nodes) {\n\t\t\ttry {\n\t\t\t\tchild = node.getChild(args);\n\t\t\t} catch (ChildNotFoundException e) {}\n\t\t}\n\t\tif(child == null) {\n\t\t\tthrow new ChildNotFoundException(\"No child found with that path\");\n\t\t}\n\t\treturn child;\n\t}", "abstract Function get(Object arg);", "@Override\r\n\tpublic CacheTreeNode getOneRootNode(String key) {\n\t\treturn searchTreeNode(key);\r\n\t}", "public Node getFirst()\n {\n return this.first;\n }", "Set<Node<K, V>> entrySet();", "public E choose() throws JMLNoSuchElementException {\n if (the_list != null) {\n E entry = the_list.val;\n if (entry == null) {\n //@ assume containsNull;\n return null;\n } else {\n E o = entry ;\n //@ assume o instanceof Object;\n //@ assume \\typeof(o) <: elementType;\n return o;\n }\n } else {\n throw new JMLNoSuchElementException(\"Tried to .choose() \"\n + \"with JMLObjectSet empty\");\n }\n }", "public T get(T key) {\n\t\tNode<T> node = root;\n\t\twhile (node != null) {\n\t\t\tif (key.compareTo(node.value) == 0) {\n\t\t\t\treturn node.value;\n\t\t\t} else if (key.compareTo(node.value) < 0) {\n\t\t\t\tnode = node.right;\n\t\t\t} else {\n\t\t\t\tnode = node.left;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Object call(Context context, List args) throws FunctionCallException\n {\n if ( args.size() == 1 ) {\n return evaluate( context.getNodeSet(),\n args.get(0), context.getNavigator() );\n }\n\n throw new FunctionCallException( \"id() requires one argument\" );\n }", "private Node findNode(Graph g, int id){\r\n for(Node n : g.getListNodes()){\r\n if (n.getId() == id){\r\n return n;\r\n }\r\n }\r\n return null;\r\n }", "public CircosNode getNode(String id){\n\t\tfor(int i = 0; i < nodes.size(); i++){\n\t\t\tif(nodes.get(i).getID().equals(id)){\n\t\t\t\treturn nodes.get(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n <T extends GraphNode<N, E>> T getNodeOrFail(N val) {\n T node = (T) getNode(val);\n if (node == null) {\n throw new IllegalArgumentException(val + \" does not exist in graph\");\n }\n return node;\n }", "public Node getOne(int identifier) throws SQLException, NodeNotFoundException {\n var statement = connection.prepareStatement(\"SELECT identifier, x, y, parentx, parenty, status, owner, description FROM nodes WHERE identifier = ?\");\n statement.setInt(1, identifier);\n var result = statement.executeQuery();\n try {\n if (result.next()) {\n return new Node(\n result.getInt(\"identifier\"),\n result.getInt(\"x\"),\n result.getInt(\"y\"),\n result.getInt(\"parentx\"),\n result.getInt(\"parenty\"),\n result.getString(\"status\"),\n result.getString(\"owner\"),\n result.getString(\"description\")\n );\n } else {\n throw new NodeNotFoundException();\n }\n }\n finally {\n statement.close();\n result.close();\n }\n }", "@Override\n public R visit(TriplesNode n, A argu) {\n R _ret = null;\n n.nodeChoice.accept(this, argu);\n return _ret;\n }", "<O> N getNode(Function<N, O> map, O value);", "public T getFirst()\n\t{\n\t\treturn getFirstNode().getData();\n\t}", "public E getFirst()// you finish (part of HW#4)\n\t{\n\t\tif (root == null)\n\t\t\treturn null;\n\t\tBinaryNode<E> iteratorNode = root;\n\t\twhile (iteratorNode.hasLeftChild())\n\t\t\titeratorNode = iteratorNode.getLeftChild();\n\t\treturn iteratorNode.getData();\n\t}", "public String lookup(String key){\n Node N = front;\n while( N != null){\n if( N.key.equals(key)){\n return N.value;\n }\n N = N.next;\n }\n return null;\n }", "public ListNode getNode(ListNode node){\n\t\tif(firstNode == null) return null;\n\t\tListNode temp = firstNode;\n\t\twhile(temp!=null){\n\t\t\tif(temp.equals(node)) return temp;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\t\treturn null;\n\t}", "public T caseGraphicalNode(GraphicalNode object) {\n\t\treturn null;\n\t}", "CMSObject getFirstNodeByPath(String path, Object session) throws RepositoryAccessException;", "Node dequeue() {\n Node n = queue.removeFirst();\n queueSet.remove(n);\n return n;\n }", "public Node getNodeByCache(String label)\r\n\t{\r\n\t\treturn cacheNodes.get(label);\r\n\t}", "private Node getNode(String n1)\n\t{\n\t\tif (n1 == null) throw new RuntimeException(\"Attempt to add null node\");\n\t\tif (nodes.containsKey(n1)) return nodes.get(n1);\n\t\tnodes.put(n1, new Node(n1));\n\t\treturn nodes.get(n1);\n\t}", "public T getExactMatch(String arg)\n\t{\n\t\treturn null;\n\t}", "public Object removeFirst()\n {\n return ((Node)nodes.remove(0)).data;\n }", "public LinkedListNode<T> getFirstNode()\n\t{\n\t\treturn this.head;\n\t}", "public Node getFirstNode() {\n\t return firstNode;\r\n\t }", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "Node firstNode() {\r\n\t\treturn first.next.n;\r\n\t}", "public T get(int index) {\n \n if(head == null) {\n return null;\n }\n \n int i = 0;\n Node<T> node = head;\n while(i < index && node.getNext() != null) {\n node = node.getNext();\n i++;\n }\n \n if(i == index) {\n return node.getValue();\n } else {\n return null;\n }\n }", "Node getNode(int n) {\n switch (type) {\n\n case EDGE:\n case PATH:\n case EVAL:\n\n if (n < edge.nbNode()) {\n return edge.getNode(n);\n } else {\n return edge.getEdgeVariable();\n }\n\n case OPT_BIND:\n return get(n).getNode();\n }\n return null;\n }", "private GraphNode findGraphNode(T nodeId)\n {\n return nodeList.get(nodeId);\n }", "public ReferenceNode searchMatchNode(Set<String> data) {\n // Try the first first\n ReferenceNode node = nodeList.get(0);\n double similarity = node.calculateSimilarity(data);\n ReferenceNode winningNode = node;\n double newSim = 0.0;\n for (int i = 1; i < nodeList.size(); i++) {\n node = nodeList.get(i);\n newSim = node.calculateSimilarity(data);\n if (newSim > similarity) {\n winningNode = node;\n similarity = newSim;\n }\n if (newSim == 1.0d)\n break; // The highest\n }\n if (similarity == 0.0d) {\n // Try to find an empty node. Otherwise, pathways will be grouped in the\n // first node\n for (ReferenceNode tmp : nodeList) {\n if (tmp.isEmpty()) {\n winningNode = tmp;\n break;\n }\n }\n }\n return winningNode;\n }", "public LinkedListNode<T> getFirstNode()\n\t{\n\t\treturn head;\n\t}", "private Node getRefTo(T item){\n Node n = first;\n while(n != null && !n.value.equals(item))\n n = n.next;\n return n;\n }", "public T findOne(String arg0) {\n\t\treturn null;\n\t}", "TreeNode getTreeNode();", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public OSMNode firstNode() {\n return nodes.get(0);\n }", "public Jode single(String nodeName) {\n return children().single(nodeName);\n }", "java.lang.String getEntryNode();", "CMSObject getFirstNodeByName(String name, Object session) throws RepositoryAccessException;", "public E getFirst(){\n return head.getNext().getElement();\n }", "public T get(int index) {\r\n if (index==0) {\r\n return getFront();\r\n }\r\n else if (index==length()-1)\r\n return getBack();\r\n else if (index>=length())\r\n return null;\r\n else {\r\n ListNode currentNode = head; \r\n for(int i=1; i<=index; i++)\r\n currentNode = currentNode.getLink();\r\n return (T) currentNode.getData(); \r\n }\r\n }", "@Override\n public R visit(BuiltInCall n, A argu) {\n R _ret = null;\n n.nodeChoice.accept(this, argu);\n return _ret;\n }", "public Node<E> getPresentNode(E data){\n for(Node<E> node: nodes.keySet()){\n if(node.data.equals(data)){\n return node;\n }\n }\n return null;\n }", "Node currentNode();", "public DefaultMutableTreeNode getRequestedNode()\n {\n // Reset node to be displayed\n displayNode = root;\n \n // Iterate trough the path array\n for (int i = 0; i < pathArray.length; i++)\n {\n if (displayNode.getDepth() > 1)\n {\n displayNode = (DefaultMutableTreeNode)\n displayNode.getChildAt(pathArray[i]);\n }\n }\n \n // Return node to be displayed\n return displayNode;\n }", "Node getFirst() {\n return this.first;\n }", "public static Node lookupNode(Universe universe, String name) {\n return getAutoNodeIndex(universe).get(\"name\", name).getSingle();\n }", "public String getNodeValue ();", "public final IRNode getNode() {\r\n return f_node;\r\n }", "public static FuzzyXMLElement getFirstElement(FuzzyXMLElement element){\r\n\t\tFuzzyXMLNode[] nodes = element.getChildren();\r\n\t\tfor(int i=0;i<nodes.length;i++){\r\n\t\t\tif(nodes[i] instanceof FuzzyXMLElement){\r\n\t\t\t\treturn (FuzzyXMLElement)nodes[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n public Optional<Node<T>> findBy(T value) {\n Optional<Node<T>> rsl = Optional.empty();\n Queue<Node<T>> data = new LinkedList<>();\n data.offer(this.root);\n while (!data.isEmpty()) {\n Node<T> el = data.poll();\n if (el.eqValues(value)) {\n rsl = Optional.of(el);\n break;\n }\n for (Node<T> child : el.leaves()) {\n data.offer(child);\n }\n }\n return rsl;\n }", "public NodeD find(Object data){\n if (this.isEmpty()){\n return null;\n }else{\n if (this.head.getObject()==data){\n return this.head;\n }else{\n NodeD tmp = this.head.getNext();\n\n while(tmp!=null){\n if (tmp.getObject()==data){\n return tmp;\n }\n tmp = tmp.getNext();\n }\n return null;\n }\n }\n }", "private Node getNode(String name) {\n for(Iterator<Node> i = nodes.iterator(); i.hasNext();) {\n Node n = i.next();\n if(n.getName().equalsIgnoreCase(name)){\n return n;\n };\n }\n return null;\n }", "public Jode first(String nodeName) {\n return children().first(nodeName);\n }", "public static java.util.Set singleton(java.lang.Object arg0)\n { return null; }" ]
[ "0.5516778", "0.55043364", "0.5219712", "0.5123319", "0.50245345", "0.49792024", "0.496716", "0.49603647", "0.49130645", "0.49105418", "0.48693162", "0.48580074", "0.48475227", "0.47954994", "0.47800106", "0.47237945", "0.4713893", "0.4700424", "0.469751", "0.46938974", "0.46764314", "0.46739015", "0.4670293", "0.4663335", "0.46576637", "0.46574944", "0.46551505", "0.46434575", "0.46348947", "0.4628936", "0.46068898", "0.4604451", "0.45964533", "0.45924902", "0.45907795", "0.45883197", "0.45674938", "0.45627588", "0.45620394", "0.45613268", "0.4555058", "0.45518297", "0.4551076", "0.45490193", "0.45428044", "0.45274508", "0.4516601", "0.4514182", "0.45070034", "0.44928384", "0.44923624", "0.44887438", "0.44779247", "0.44701216", "0.4463087", "0.44611633", "0.44600865", "0.4456757", "0.44447553", "0.44379106", "0.44171917", "0.44159916", "0.44108388", "0.44021067", "0.44016024", "0.4399993", "0.43916145", "0.43827897", "0.43823624", "0.43809143", "0.43807256", "0.43666205", "0.43663496", "0.43636477", "0.43587497", "0.43516123", "0.43504462", "0.4348713", "0.4341219", "0.43408185", "0.43391278", "0.43382114", "0.433534", "0.43347806", "0.43345737", "0.4333793", "0.4331439", "0.43272802", "0.43211302", "0.4319545", "0.4318699", "0.43185857", "0.43181255", "0.4314681", "0.43100557", "0.43080714", "0.43054834", "0.43041384", "0.4303345", "0.43012604" ]
0.6654697
0
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.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 public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\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\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 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\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic 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.7246874", "0.72017205", "0.71953726", "0.7177551", "0.7107639", "0.7040628", "0.7038909", "0.70122313", "0.7010098", "0.69809204", "0.6946122", "0.6940016", "0.6934117", "0.6917838", "0.6917838", "0.6891204", "0.6883838", "0.6875593", "0.6874913", "0.6862368", "0.6862368", "0.6862368", "0.6862368", "0.68527925", "0.684758", "0.68196976", "0.6817324", "0.6813345", "0.68129027", "0.68129027", "0.68057096", "0.68008226", "0.6797857", "0.6791331", "0.6790169", "0.6788319", "0.678351", "0.6759506", "0.6757522", "0.6748293", "0.67441195", "0.67441195", "0.6741131", "0.67401105", "0.6725893", "0.67239493", "0.6722708", "0.6722708", "0.67209524", "0.67124516", "0.67071265", "0.67046547", "0.6699903", "0.66986626", "0.6696521", "0.66949654", "0.6686405", "0.6683668", "0.6683668", "0.6683436", "0.66803485", "0.66796863", "0.6677369", "0.6668993", "0.6668162", "0.66629726", "0.6657424", "0.6657424", "0.6657424", "0.6656569", "0.6654796", "0.6654796", "0.6654796", "0.6652567", "0.6651887", "0.66503876", "0.66491556", "0.664731", "0.66468877", "0.6646478", "0.6646267", "0.6645108", "0.6644973", "0.66440386", "0.664294", "0.6642042", "0.66392493", "0.663475", "0.6633584", "0.66329664", "0.6632311", "0.6632311", "0.6632311", "0.66300714", "0.66283756", "0.66270864", "0.6626683", "0.66246134", "0.66206646", "0.6618862", "0.6618862" ]
0.0
-1
Action for Cancel button.
@Action public void acCancel() { setChangeObj(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void cancelButtonActionPerformed(ActionEvent e) {\n }", "void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }", "void btnCancel();", "void onCancelClicked();", "private void actionCancel() {\n\t\tselectedDownload.cancel();\n\t\tupdateButtons();\n\t}", "public void onCancelClick()\r\n {\r\n\r\n }", "CancelAction getCancelAction();", "public void cancel() { Common.exitWindow(cancelBtn); }", "public void cancel() throws Exception {\n\t\tgetControl(\"cancelButton\").click();\n\t}", "void onCancelButtonPressed();", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcancel();\n\t\t\t}", "@Override\n public void OnCancelButtonPressed() {\n }", "public void handleCancelButton(ActionEvent e) {\n\t\tclose();\n\t}", "@Override\n public void OnCancelButtonPressed() {\n }", "HasClickHandlers getCancelButton();", "public void onCancelButtonClick() {\n close();\n }", "public void onCancelClicked() {\n close();\n }", "public void handleCancelButton(ActionEvent actionEvent) throws IOException {\n ScreenLoader.display(\"customerSearchScreen\",\"Customer Search\",actionEvent);\n }", "public void cancelButtonPressed(ActionEvent event) throws IOException {\n returnToMainScreen(event);\n }", "private void jButton_CancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_CancelActionPerformed\n // TODO add your handling code here:\n }", "public void clickOnCancelButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Cancel\"));\r\n\t}", "@Override\n public void onClick(View v) {\n buttonCancelClicked();\n }", "@Override\r\n\tprotected void onCancelActionSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Cancel button implementation\");\r\n\t}", "@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 }", "private Component cancelButton(){\n cancelButton = new Button(\"cancelButton\"){\n @Override\n public void onSubmit() {\n super.onSubmit();\n personFormPanel.clearFormValues();\n }\n };\n //Reset default form processing: validation and model update\n cancelButton.setDefaultFormProcessing(false);\n return cancelButton;\n }", "public void cancel() {\n writeData(ESC.CMD_CANCEL);\n }", "public void cancelButtonAction(ActionEvent event){\n Stage stage = (Stage) cancelButton.getScene().getWindow();\n stage.close();\n }", "public void setCancel(javafx.event.ActionEvent actionEvent) {\n backToMenu(actionEvent);\n }", "public void cancel()\n\t{\n\t}", "public void onClickCancel()\n\t{\n\t\tsetVisible(false);\n\t\tdispose();\t\n\t}", "public void onCancelClicked() {\r\n // Get a reference to the stage\r\n Stage stage = (Stage) btnCancel.getScene().getWindow();\r\n // Close the window\r\n stage.close();\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttext.setText(cancel.getText());\n\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }", "public void onCancel();", "public void cancelButtonPressed(View view) {\r\n\t\tthis.finish();\r\n\t}", "public void cancelButtonPressed(ActionEvent actionEvent) throws IOException {\n mainMenuWindow.returnToMainMenu(actionEvent);\n }", "@Override\n\tpublic void cancel() {\n\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\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 }", "public void cancel() {\n btCancel().push();\n }", "public javax.swing.JButton getBtnCancel() {\n return btnCancel;\n }", "private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}", "void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }", "void onCancel();", "public void setCancelAction(ActionListener action) {\n\t\t\n\t}", "protected abstract void onCancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "private void decorateCancelButton() {\n cancelButton.setVisible(false);\n ResourceUtils.resButton(cancelButton, Res.getString(\"cancel\"));\n cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196)));\n cancelButton.setForeground(new Color(73, 113, 196));\n cancelButton.setFont(new Font(\"Dialog\", Font.BOLD, 10));\n \n cancelButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n cancelTransfer();\n }\n });\n \n cancelButton.addMouseListener(new MouseAdapter() {\n public void mouseEntered(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.HAND_CURSOR));\n \n }\n \n public void mouseExited(MouseEvent e) {\n cancelButton.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }\n });\n \n }", "@Override\n\tpublic void cancel() {\n\t\t\n\t}", "protected abstract void handleCancel();", "public void cancel(Button.ClickEvent event) {\n Notification.show(\"Cancelled\", Notification.Type.TRAY_NOTIFICATION);\n view.getContactList().select(null);\n }", "public void cancelPressed() {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Albums.fxml\"));\r\n\t\ttry{\r\n\t\t\tParent parent = (Parent) loader.load();\r\n\t\t\tAlbumsController controller = loader.<AlbumsController>getController();\r\n\t\t\tScene scene = new Scene(parent);\r\n\t\t\t\r\n\t\t\t// ok is the button pressed action event\r\n\t\t\tStage stage = (Stage) ((Node) ok).getScene().getWindow();\r\n\t\t\tcontroller.start(stage,AlbumsController.getCurrentUser());\r\n\t\t\tstage.setScene(scene);\r\n\t\t\tstage.centerOnScreen();\r\n\t\t\tstage.show();\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\texception.printStackTrace();\r\n\t\t}\t\r\n\t}", "public void cancel() {\n\t}", "@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}", "public void clickedCancel(View view) {\n \treturnResult(Activity.RESULT_CANCELED);\n }", "private void btnCancelActionPerformed(ActionEvent e) {\n processWindowEvent(new WindowEvent(this,WindowEvent.WINDOW_CLOSING));\n }", "public Object getBtnCancel() {\n return btnCancel;\n }", "public abstract boolean cancel();", "public void onCancelPressed(View view) {\n finish();\n }", "@Override\n\t\t\tpublic void onCancel() {\n\t\t\t\t\n\t\t\t}", "public void cancelButton() {\n this.setMultQuestionSet(null);\n this.setSingleQuestionSet(null);\n this.setTextQuestionSet(null);\n this.setDateQuestionSet(null);\n System.out.println(\"Done pressing cancel button\");\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Pressed Cancel\",\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickCancel();\n\t\t\t}", "public void onCancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "public JButtonOperator btCancel() {\n if (_btCancel==null) {\n _btCancel = new JButtonOperator(this, Bundle.getStringTrimmed(\"org.openide.Bundle\", \"CTL_CANCEL\"));\n }\n return _btCancel;\n }", "private Component getCancelButton() {\n\t\tif (cancelButton == null) {\r\n\t\t\tcancelButton = new JButton();\r\n\t\t\tcancelButton.setText(\"Cancel\");\r\n\t\t\tcancelButton.addActionListener(new ActionListener() {\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t \r\n\t\t\t\t\t\tdispose();\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 cancelButton;\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 cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed\n this.dispose();\n }", "@FXML\n private void Cancel(ActionEvent e) {\n Stage stage = (Stage) btnCancel.getScene().getWindow();\n stage.hide();\n stage.close();\n }", "@Override\r\n\t\tpublic void onCancel() {\n\t\t}", "@Override\n\t\tpublic void onCancel() {\n \n \t}", "public void cancel( String reason );", "public void onCancel() {\n\t\t\t\t\t}", "public void cancel();", "public void onCancelPressed(View v) {\n finish();\n }", "public void cancelDialog() {dispose();}", "@Override\n public void cancel() {\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 String getCancelReason() {\n return cancelReason;\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\tif (e.getSource() == button1) {\r\n\t\t\tcancel();\r\n\t\t}\r\n\t}", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n public void onCancel() {\n Log.w(tag, \"post cancel\" + this.getRequestURI());\n cancelmDialog();\n super.onCancel();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmListener.onCancelPressed();\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onCancel() {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@FXML\n\tprivate void cancelButtonAction(ActionEvent clickEvent) throws IOException {\n\t\t\n\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Pressing OK will exit to the Main Screen without Saving input.\\n\\n\" + \"Are you sure you want to exit?\");\n\t\t\n\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\n\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\n\t\t\tString buttonId = ((Button)clickEvent.getSource()).getId();\n\t\t\tSceneSelector.loadScene(buttonId);\n\t\t}\n\t}", "public boolean cancel();", "public javax.swing.JButton getCancelBtn() {\n\t\treturn cancelBtn;\n\t}" ]
[ "0.8303044", "0.82837737", "0.82590556", "0.81451356", "0.814405", "0.8119098", "0.811594", "0.79297745", "0.78919744", "0.7885027", "0.78391755", "0.7687486", "0.7658327", "0.7651064", "0.7600984", "0.7587857", "0.75639904", "0.7544679", "0.75306845", "0.749404", "0.74939495", "0.7411932", "0.74090856", "0.73745114", "0.7335094", "0.7301277", "0.7292361", "0.72870433", "0.72836447", "0.7282316", "0.7256945", "0.7255667", "0.7244855", "0.72366405", "0.7226719", "0.72174096", "0.71919304", "0.71785885", "0.71785885", "0.71785885", "0.7175888", "0.7174898", "0.71674013", "0.71663797", "0.71627116", "0.7158398", "0.7151411", "0.7150306", "0.71420896", "0.7142073", "0.7137206", "0.7137206", "0.7137206", "0.7137206", "0.7137206", "0.7137206", "0.7134008", "0.7131452", "0.7115214", "0.71097106", "0.7093653", "0.7088909", "0.70814466", "0.70758224", "0.7069587", "0.7067782", "0.706268", "0.7052468", "0.7034087", "0.7033584", "0.7028628", "0.7026323", "0.7024807", "0.7015157", "0.70086384", "0.69995", "0.6994798", "0.6992649", "0.69892573", "0.6985347", "0.6984193", "0.6981397", "0.6969414", "0.69674075", "0.696077", "0.6960209", "0.69519866", "0.69500196", "0.6946809", "0.6944095", "0.6940662", "0.6940662", "0.6940662", "0.69399047", "0.6939433", "0.69393396", "0.6937249", "0.6936526", "0.693486" ]
0.73578185
25
Action for OK button.
@Action public void acOk() { if (checkFormattedTextFieldNullNoSupposed(jftfDiameter, 0.1, 1.5)) { return; } if (checkFormattedTextFieldNullNoSupposed(jftfThickness, 1e-3, 0.1)) { return; } if (checkFormattedTextFieldNullNoSupposed(jftfDepth, 0.5, 50.0)) { return; } if (checkFormattedTextFieldNullNoSupposed(jftfValueBegin, -1e5, 1e5)) { return; } if (checkFormattedTextFieldNullNoSupposed(jftfValueStep, 0.1, 1e3)) { return; } getTempObj().setDiameter(getDoubleFromFormattedTextField(jftfDiameter)); getTempObj().setThickness(getDoubleFromFormattedTextField(jftfThickness)); getTempObj().setDepth(getDoubleFromFormattedTextField(jftfDepth)); getTempObj().setCoordBegin(getDoubleFromFormattedTextField(jftfValueBegin)); getTempObj().setCoordStep(getDoubleFromFormattedTextField(jftfValueStep)); getTempObj().setCoordCount((Integer) jspValueCount.getValue()); setChangeObj(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void okButtonClicked();", "public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}", "protected abstract boolean onOkClicked();", "public void cmdOk() {\n\n\t\tif (!m_actionscombo.isValueInModel()) {\n\t\t\tString msg = I18N.getLocalizedMessage(\"Invalid Action Name\");\n\t\t\tString title = I18N.getLocalizedMessage(\"Error\");\n\t\t\tJOptionPane.showMessageDialog(null, msg, title, JOptionPane.ERROR_MESSAGE);\n\t\t} else\n\t\t\tsuper.cmdOk();\n\t}", "protected void okPressed() {\n\t\tconfig.setExportThreadCount(txtThreadCount.getSelection());\n\t\tconfig.setImportThreadCount(txtMaxImportThreadCountPerTable.getSelection());\n\t\tconfig.setCommitCount(txtCommitCount.getSelection());\n\t\tif (txtPageCount != null) {\n\t\t\tconfig.setPageFetchCount(txtPageCount.getSelection());\n\t\t}\n\t\tif (txtFileMaxSize != null) {\n\t\t\tconfig.setMaxCountPerFile(txtFileMaxSize.getSelection());\n\t\t}\n\t\tconfig.setImplicitEstimate(btnImplicitEstimate.getSelection());\n\t\tsuper.okPressed();\n\t}", "void onOkButtonPressed();", "@Override\r\n\tprotected void onOkSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Ok button implementation\");\r\n\t}", "@FXML public void handleOk() {\n\t\tSystem.out.println(\"OK clicked!\");\n\t\t\n\t\tif (checkParameters().equals(ErrorCode.BatchSize)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Batch Size]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.ConfidenceFactor)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Confidence Factor]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.MinNumObj)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Min Num Obj]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumDecimalPlaces)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Decimal Places]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumFolds)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Folds]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Seed)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Seed]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Fine)) {\n\t\t\tsaveParameters();\n\t\t\tClassifiersWindowsManager.stage.close();\n\t\t}\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttext.setText(ok.getText());\n\t\t\t}", "protected abstract void pressedOKButton( );", "public void OnOkClick()\r\n {\r\n\r\n }", "protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}", "public void handleActionOk() {\n\t\tsuper.handleActionOk();\n\t\tnewModeOkApply();\n\t\tthis.getDocumentView().close();\n\t}", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n actualizarEntidad(this.entidad);\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "@Override\n\tpublic void okPressed() {\n\t\t_text = _noteTextField.getText();\n\t\tsetReturnCode(OK);\n\t\tclose();\n\t}", "private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }", "private void onOK() {\n isOkClicked = true;\n dispose();\n }", "private void onOkButtonPressed() {\n\t\tconfirm = true;\n\t\tif (template.getAskDimension()) {\n\t\t\ttry {\n\t\t\t\twidth = Integer.parseInt(widthInputField.getFieldString());\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\theight = Integer.parseInt(heightInputField.getFieldString());\n\t\t\t\theightInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\theightInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\tif(!confirm)\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (template.getAskLoading()) {\n\t\t\tint result = savefileChooser.showOpenDialog(this);\n\t\t\tif (result != JFileChooser.APPROVE_OPTION) {\n\t\t\t\tconfirm = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tdispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\n\t}", "public static void okButtonAction(ActionContext actionContext){\n World world = World.getInstance();\n Thing form = actionContext.getObject(\"form\");\n Shell shell = actionContext.getObject(\"shell\");\n \n Thing dataObject = world.getThing(\"xworker.app.test.dataObject.thing.Sex\");\n form.doAction(\"setDataObject\", actionContext, \"dataObject\", dataObject);\n shell.pack();\n }", "protected void okPressed()\n\t{\n\t\t((NewProjectComposite) this.getDialogArea()).updateProject(project);\n\t\tsuper.okPressed();\n\t}", "public JButton getOkButton(){\n\t\treturn okButton;\n\t}", "@FXML\n\tprivate void handleOk() {\n\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\n\t}", "private void okButtonActionPerformed() {\n\n saveConsoleText(consoleTextArea);\n\n setVisible(false);\n\n if (mainFrame == null && !isBasicUI) {\n System.exit(0);\n }\n }", "void CloseOkDialog();", "protected void okPressed() {\r\n \t\tArrayList resources= new ArrayList(10);\r\n \t\tfindCheckedResources(resources, (IContainer)fTree.getInput());\r\n \t\tif (fWorkingSet == null)\r\n \t\t\tfWorkingSet= new WorkingSet(getText().getText(), resources.toArray());\r\n \t\telse if (fWorkingSet instanceof WorkingSet) {\r\n \t\t\t// Add not accessible resources\r\n \t\t\tIResource[] oldResources= fWorkingSet.getResources();\r\n \t\t\tfor (int i= 0; i < oldResources.length; i++)\r\n \t\t\t\tif (!oldResources[i].isAccessible())\r\n \t\t\t\t\tresources.add(oldResources[i]);\r\n \r\n \t\t\t((WorkingSet)fWorkingSet).setName(getText().getText());\r\n \t\t\t((WorkingSet)fWorkingSet).setResources(resources.toArray());\r\n \t\t}\r\n \t\tsuper.okPressed();\r\n \t}", "public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}", "public void actionPerformed(ActionEvent e) {\n\t\toptionPane.setValue(okString);\n\t}", "private void okAction()\r\n\t{\r\n\t\tString navn = txfInput[0].getText().trim();\r\n\r\n\t\tint telefonNr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\ttelefonNr = Integer.parseInt(txfInput[1].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString vej = txfInput[2].getText().trim();\r\n\r\n\t\tint nr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tnr = Integer.parseInt(txfInput[3].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString etage = txfInput[4].getText().trim();\r\n\r\n\t\tint postNr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tpostNr = Integer.parseInt(txfInput[5].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString by = txfInput[6].getText().trim();\r\n\t\tString land = txfInput[7].getText().trim();\r\n\r\n\t\tif (navn.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Navn er tom\");\r\n\t\t\treturn;\r\n\t\t} else if (telefonNr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Telefon nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\telse if (vej.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Vej er tom\");\r\n\t\t\treturn;\r\n\t\t} else if (nr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (postNr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Post Nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (by.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"By er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (land.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Land er tom\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tFirma firma = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfirma = lvwFirmaer.getSelectionModel().getSelectedItem();\r\n\t\t} catch (NullPointerException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\r\n\t\tLedsager ledsager = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tledsager = lvwLedsagere.getSelectionModel().getSelectedItem();\r\n\t\t} catch (NullPointerException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif (deltager != null)\r\n\t\t{\r\n\t\t\tService.updateDeltager(deltager, firma, ledsager, navn, telefonNr, null, vej, nr, etage, postNr, by, land);\r\n\t\t} else\r\n\t\t{\r\n\t\t\tService.createDeltager(navn, telefonNr, null, vej, nr, etage, postNr, by, land);\r\n\t\t}\r\n\r\n\t\tthis.hide();\r\n\t}", "@FXML\n\tprivate void handleOk() {\n\t\tif (isValidInput()) {\n\t\t\tsaveCurrentAcknowledgment();\n\t\t\t\n\t\t\tif (isNew) {\n\t\t\t\tmain.getDbHelper().insertAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\n\t\t\t} else {\n\t\t\t\tmain.getDbHelper().updateAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\t\n\t\t\t}\n\t\t\t\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}", "void okButton_actionPerformed(ActionEvent e)\n\t{\n\t\tpropertiesEditPanel.saveChanges();\n\t\tcloseDlg();\n\t\tokPressed = true;\n }", "public void okPressed() {\r\n\t\t\r\n\t\tif (albumname.getText().trim().toString().equals(\"\")) {\r\n\t\t\t\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n\t\t\talert.setTitle(\"ALERT\");\r\n\t\t\talert.setHeaderText(\"Error\");\r\n\t\t\talert.setContentText(\"Must enter an album name.\");\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\r\n\t\tString albumName = albumname.getText().trim().toString();\r\n\t\t\r\n\t\tif (checkForDuplicateAlbumNames(albumName)==true) {\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n\t\t\talert.setTitle(\"ALERT\");\r\n\t\t\talert.setHeaderText(\"Duplicate Names\");\r\n\t\t\talert.setContentText(\"An album already has that name. \\n Enter a new name.\");\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tAlbum newalbum = new Album(albumName);\r\n\t\tAlbumsController.getCurrentUser().addAlbumToUser(newalbum);\r\n\t\tLoginController.saveData(LoginController.users);\r\n\t\t\r\n\t\t\r\n\t\t//go to albums controller and load corresponding fxml\r\n\t\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Albums.fxml\"));\r\n\t\t\t\ttry{\r\n\t\t\t\t\tParent parent = (Parent) loader.load();\r\n\t\t\t\t\tAlbumsController controller = loader.<AlbumsController>getController();\r\n\t\t\t\t\tScene scene = new Scene(parent);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// ok is the button pressed action event\r\n\t\t\t\t\tStage stage = (Stage) ((Node) ok).getScene().getWindow();\r\n\t\t\t\t\tcontroller.start(stage,AlbumsController.getCurrentUser());\r\n\t\t\t\t\tstage.setScene(scene);\r\n\t\t\t\t\tstage.centerOnScreen();\r\n\t\t\t\t\tstage.show();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception exception) {\r\n\t\t\t\t\texception.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "@Action\n public void acOk() {\n if (checkFormattedTextFieldNullNoSupposed(jftfCoord1, -1e5, 1e5)) {\n return;\n }\n if (checkFormattedTextFieldNullNoSupposed(jftfCoord2, -1e5, 1e5)) {\n return;\n }\n if (checkTextField(jtfName)) {\n return;\n }\n getTempObj().setType(jcbType.getSelectedIndex());\n getTempObj().setCoord1(getDoubleFromFormattedTextField(jftfCoord1));\n getTempObj().setCoord2(getDoubleFromFormattedTextField(jftfCoord2));\n getTempObj().setName(jtfName.getText());\n setChangeObj(true);\n }", "public JButton getOkButton() {\n return okButton;\n }", "public void clickedOk(View view) {\n \t\n \t// validate the data set\n \tif (!getData()) return;\n \t\n \t// confirm values that are in range, but possibly wrong\n \tif (!confirmData(0)) return;\n \t\n \t// success\n \t\treturnResult(Activity.RESULT_OK);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n Object source = e.getSource();\n if (source == confirmButton) {\n var newResult = new Result(result, name.getText());\n try {\n newResult.saveResult();\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n }\n }", "@FXML\n\tprivate void handleOk() {\n\t\tif (isInputValid()) {\n\t\t\titem.setDate(DateUtil.parse(dateField.getText()));\n\t\t\titem.setCategory(categoryField.getSelectionModel().getSelectedItem());\n\t\t\titem.setUse(useField.getText());\n\t\t\t\n\t\t\tString textBefore = amountField.getText();\n\t\t\tString textAfter = null;\n\t\t\tif(textBefore.contains(\",\")) {\n\t\t\t\ttextAfter = textBefore.replace(\",\", \".\");\n\t\t\t} else {\n\t\t\t\ttextAfter = textBefore;\n\t\t\t}\n\t\t\titem.setAmount(Double.parseDouble(textAfter));\n\t\t\titem.setDistributionKind(distributionKindField.getText());\n\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tif (e.getActionCommand().equals(\"确定\"))\r\n\t\t\t\t\tonOK();\r\n\t\t\t\tif (e.getActionCommand().equals(\"取消\"))\r\n\t\t\t\t\tonCancel();\r\n\t\t\t\tif (e.getActionCommand().equals(\"应用\"))\r\n\t\t\t\t\tonApply();\r\n\t\t\t}", "void okButton_actionPerformed(ActionEvent e) {\n setItskey(keyTextField.getText());\n setItsvalue(valueTextField.getText());\n setUserAction(OK);\n setVisible(false);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this out\");\n }", "@FXML\n private void handleOk() {\n if (isInputValid()) {\n gem.setGemName(gemNameField.getText());\n gem.setGemValue(Integer.parseInt(gemValueField.getText()));\n gem.setDescription(gemDescripField.getText());\n\n okClicked = true;\n dialogStage.close();\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this\");\n }", "public boolean isOkClicked() {\r\n\t\treturn okClicked;\r\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public boolean isOkClicked() {\n\t\treturn okClicked;\n\t}", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Pressed OK\",\n Toast.LENGTH_SHORT).show();\n }", "public void clickOnSuccessOkBtn() throws Exception {\r\n\t\r\n\t\t\tclickOnButton(btnOKSuccess);\r\n\t\t\tlog(\"clicked on OK button and object is:-\" + btnOKSuccess.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t}", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public boolean isOkClicked() {\r\n return okClicked;\r\n }", "public void ok() {\n btOK().push();\n }", "private JButton getBtnOK() {\n if (btnOK == null) {\n btnOK = new JButton();\n btnOK.setText(\" OK \");\n btnOK.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n selected = true;\n setVisible(false);\n }\n });\n getRootPane().setDefaultButton(btnOK);\n }\n return btnOK;\n }", "private JButton getOkButton() {\n\t\tif (okButton == null) {\n\t\t\tokButton = new JButton();\n\t\t\tokButton.setText(\"OK\");\n\t\t\tokButton.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tdoOK();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okButton;\n\t}", "public boolean isOkClicked() {\n return okClicked;\n }", "public boolean isOkClicked() {\n return okClicked;\n }", "public boolean isOkClicked(){\n\t\treturn okClicked;\n\t}", "public boolean getOK() {\n return userAction.equals(OK);\n }", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tupdateOkState();\r\n\t\t\t}", "@FXML\n\tprivate void handleOk() {\n\t\ttry {\n\t\t\ttypeDAO.supprimerType(new Type(listIdType.get(comboboxtype.getSelectionModel().getSelectedIndex()),\"\",\"\"));\n\t\t\tnew Popup(\"Type \"+comboboxtype.getValue()+\" supprimer !\");\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJOptionPane.showConfirmDialog(null, \"BOTAO CLICADO\", \"VALOR\", JOptionPane.PLAIN_MESSAGE);\n\n\t\t}", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n \temployee.setId(Integer.parseInt(idLabel.getText()));\r\n \temployee.setFirstName(firstNameField.getText());\r\n \temployee.setLastName(lastNameField.getText());\r\n \temployee.setIndustry(industryField.getText());\r\n \temployee.setWorkType(workTypeField.getText());\r\n \temployee.setAddress(addressField.getText());\r\n \t\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JButton button = (JButton) e.getSource();\n if (button.getText().toString().equals(\"OK\")) {\n this.dispose();\n }\n\n else {\n ip = null;\n this.dispose();\n }\n }", "private JButton getJButtonOk() {\n\t\tif (jButtonOk == null) {\n\t\t\tjButtonOk = new JButton();\n\t\t\tjButtonOk.setText(\"I agree\");\n\t\t\tjButtonOk.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tok = true;\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn jButtonOk;\n\t}", "public void okButtonRegisterHandler( ActionListener actionListener )\r\n\t{\r\n\t\t// register event handler for the OK Button\r\n\t\tokButton.addActionListener( actionListener );\r\n\t}", "private RButton getOkButton() {\n if (okButton == null) {\n okButton = new RButton();\n okButton.setText(\"<%= ivy.cms.co(\\\"/Buttons/ok\\\") %>\");\n okButton.setName(\"okButton\");\n }\n return okButton;\n }", "void setOk();", "private void okPressed() {\n String destPath = pathField.getText();\n \n // Resolves destination folder\n // TODO: move those I/O bound calls to job as they can lock the main thread\n Object ret[] = FileToolkit.resolvePath(destPath, mainFrame.getActiveTable().getCurrentFolder());\n // The path entered doesn't correspond to any existing folder\n if (ret==null || (files.size()>1 && ret[1]!=null)) {\n showErrorDialog(Translator.get(\"this_folder_does_not_exist\", destPath));\n return;\n }\n \n AbstractFile destFolder = (AbstractFile)ret[0];\n String newName = (String)ret[1];\n \t\t\n // Retrieve default action when a file exists in destination, default choice\n // (if not specified by the user) is 'Ask'\n int defaultFileExistsAction = fileExistsActionComboBox.getSelectedIndex();\n if(defaultFileExistsAction==0)\n defaultFileExistsAction = FileCollisionDialog.ASK_ACTION;\n else\n defaultFileExistsAction = DEFAULT_ACTIONS[defaultFileExistsAction-1];\n // We don't remember default action on purpose: we want the user to specify it each time,\n // it would be too dangerous otherwise.\n \t\t\n startJob(destFolder, newName, defaultFileExistsAction);\n }", "void ShowOkDialog(String title, String message, OnClickListener listener);", "public void actionPerformed(ActionEvent oEvent) {\n if (oEvent.getActionCommand().equals(\"OK\")) {\n try {\n addFinishedData();\n } catch (ModelException e) {\n ErrorGUI oHandler = new ErrorGUI(this);\n oHandler.writeErrorMessage(e);\n return;\n }\n\n //Close this window\n this.setVisible(false);\n this.dispose();\n }\n else if (oEvent.getActionCommand().equals(\"Cancel\")) {\n //Close this window\n this.setVisible(false);\n this.dispose();\n } \n }", "@Override\n\tpublic boolean performOk() {\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\t// Set the values from the fields\n\t\tpreferenceStore.setValue(DEFAULT_PASSWORD_LENGTH, spiLength.getSelection());\n\t\tpreferenceStore.setValue(USE_LOWERCASE_LETTERS, btnUseLowercase.getSelection());\n\t\tpreferenceStore.setValue(USE_UPPERCASE_LETTERS, btnUserUppercase.getSelection());\n\t\tpreferenceStore.setValue(USE_DIGITS, btnUseDigits.getSelection());\n\t\tpreferenceStore.setValue(USE_SYMBOLS, btnUseSymbols.getSelection());\n\t\tpreferenceStore.setValue(USE_EASY_TO_READ, btnUseEaseToRead.getSelection());\n\t\tpreferenceStore.setValue(USE_HEX_ONLY, btnUseHexOnly.getSelection());\n\n\t\t// Return true to allow dialog to close\n\t\treturn true;\n\t}", "private JButton getOkButton() {\n if (okButton == null) {\n okButton = new JButton();\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent e) {\n canceled = false;\n dispose();\n }\n });\n }\n return okButton;\n }", "private void okEvent() {\n\t\tYAETMMainView.PRIVILEGE = (String)loginBox.getSelectedItem();\n\t\tshowMain();\n\t\tcloseDialog();\n\t}", "@Override\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t\tcon.setResult(btnName);\n\t\t\t}", "public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }", "public JButtonOperator btOK() {\n if (_btOK==null) {\n _btOK = new JButtonOperator(this, Bundle.getStringTrimmed(\"org.openide.Bundle\", \"CTL_OK\"));\n }\n return _btOK;\n }", "private void onOK() {\n show.setText(null);\n String s = (new ArithmeticExpressions(text.getText()).checkExpression());\n System.out.println(s);\n show.setText(s);\n }", "private JButton getJButtonOK() {\n\t\tif (jButtonOK == null) {\n\t\t\tjButtonOK = new JButton();\n\t\t\tjButtonOK.setLocation(new Point(100, 200));\n\t\t\tjButtonOK.setText(\"OK\");\n\t\t\tjButtonOK.addActionListener( new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\tcloseFrameSobre();\n\t\t\t\t}\n\t\t\t});\n\t\t\tjButtonOK.setSize(new Dimension(100, 30));\n\t\t}\n\t\treturn jButtonOK;\n\t}", "protected void buttonPressed(String label)\r\n\t\t{\r\n\t\t\tif(label.equals(\"OK\"))\r\n\t\t\t{\r\n\t\t\t\t// Retrieve the mapping cell type setting\r\n\t\t\t\tString type = typeFilter.getSelectedButton();\r\n\t\t\t\tInteger typeSetting = type.equals(\"All\") ? MappingController.ALL : type.equals(\"System\") ? MappingController.SYSTEM : MappingController.USER;\r\n\t\t\t\t\r\n\t\t\t\t// Retrieve the mapping cell focus setting\r\n\t\t\t\tString focus = focusFilter.getSelectedButton();\r\n\t\t\t\tInteger focusSetting = focus.equals(\"All\") ? MappingController.ALL : focus.equals(\"Focused\") ? MappingController.FOCUSED : MappingController.UNFOCUSED;\r\n\t\t\t\t\r\n\t\t\t\t// Retrieve the mapping cell visibility setting\r\n\t\t\t\tString visibility = visibilityFilter.getSelectedButton();\r\n\t\t\t\tInteger visibilitySetting = visibility.equals(\"All\") ? MappingController.ALL : visibility.equals(\"Visible\") ? MappingController.VISIBLE : MappingController.HIDDEN;\r\n\t\t\t\t\r\n\t\t\t\t// Select or delete mapping cells\r\n\t\t\t\tif(mode.equals(SELECT))\r\n\t\t\t\t\tMappingController.selectMappingCells(harmonyModel, typeSetting, focusSetting, visibilitySetting);\r\n\t\t\t\telse MappingController.deleteMappingCells(harmonyModel, typeSetting, focusSetting, visibilitySetting);\r\n\t\t\t}\r\n\t\t\tdispose();\r\n\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"保存成功\");\n\t\t}", "private JButton addOKButton(String actionCommand) {\n JButton button = new JButton(\"OK\");\n button.setActionCommand(\"OK \" + actionCommand);\n return button;\n }", "private void btnConfirmActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Test\n\tpublic void testClickOnOkayButton() {\n\n\t\tvar prompt = openPrompt();\n\t\tprompt.getOkayButton().click();\n\t\tassertNoDisplayedModalDialog();\n\t\tassertPromptInputApplied();\n\t}", "@FXML\n private void handleOk() {\n System.out.println(\"handleOk AdresEditController\");\n if (isInputValid()) {\n //aby udalo sie select\n adres.setPrev_adres_id(adres.getAdres_id());\n\n adres.setAdres_id(Integer.parseInt(adres_id_textField.getText()));\n adres.setWojewodztwo(wojewodztwo_textField.getText());\n adres.setMiejscowosc(miejscowosc_textField.getText());\n adres.setUlica(ulica_textField.getText());\n adres.setKraj(kraj_textField.getText());\n adres.setKod_pocztowy(kod_pocztowy_textField.getText());\n\n adres.update();\n\n okClicked = true;\n dialogStage.close();\n }\n }", "@Override\r\n\tprotected void okPressed() {\r\n\t\tcomputeResult();\r\n\t\tObject obj[] = getResult();\r\n\t\t\r\n\t\tif (obj != null && obj.length > 0) {\r\n\t\t\tif (ensureXSDTypeNamespaceMappings ( obj[0] ) == false) {\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\thandleAddImport ( obj[0] );\r\n\t\t\t\r\n\t\t\t// only if we have a mapping do we dismiss the dialog\r\n\t\t\tsuper.okPressed();\r\n\t\t}\r\n\t\t\r\n\t}", "public void actionPerformed(ActionEvent e) {\n if(e.getSource() == confirmButton) {\n setVisible(false); // causes all the add text \n }\n else if(e.getSource() == exitButton) {\n System.exit(0);\n }\n }", "protected GuiTestObject okbutton() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"okbutton\"));\n\t}", "@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n video.setName(nameField.getText());\r\n video.setUrl(urlField.getText());\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }", "public void actionPerformed(ActionEvent e) {\r\n String command = e.getActionCommand();\r\n if (command.equals(\"OK\")) {\r\n if (validateData()) {\r\n validData = true;\r\n setVisible(false);\r\n int index = aggList.getSelectedIndex();\r\n if (index != 0) {\r\n TASKAggInfo agg = (TASKAggInfo)aggregators.elementAt(aggList.getSelectedIndex()-1);\r\n }\r\n }\r\n }\r\n else if (command.equals(\"Cancel\")) {\r\n setVisible(false);\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 }", "@FXML\n private void handleOKPressed() {\n\n if (Authenticator.validatePassword(accountId.getText(), password.getText())) {\n application.accountLogging(accountId.getText());\n confirmLogin = true;\n dialogStage.close();\n } else {\n errorMessage.setVisible(true);\n }\n }", "private JButton getJButtonOK() {\r\n\t\tif (jButtonOK == null) {\r\n\t\t\tjButtonOK = new JButton();\r\n\t\t\tjButtonOK.setText(BOTONCREAR);\r\n\t\t\tjButtonOK.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\tcambiarPass();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn jButtonOK;\r\n\t}", "private javax.swing.JButton getBtnOK() {\r\n\tif (ivjBtnOK == null) {\r\n\t\ttry {\r\n\t\t\tivjBtnOK = new javax.swing.JButton();\r\n\t\t\tivjBtnOK.setName(\"BtnOK\");\r\n\t\t\tivjBtnOK.setText(\"OK\");\r\n\t\t\t// user code begin {1}\r\n\t\t\t// user code end\r\n\t\t} catch (java.lang.Throwable ivjExc) {\r\n\t\t\t// user code begin {2}\r\n\t\t\t// user code end\r\n\t\t\thandleException(ivjExc);\r\n\t\t}\r\n\t}\r\n\treturn ivjBtnOK;\r\n}", "public void actionPerformed(ActionEvent e)\n { /* actionPerformed */\n String\n cmd= e.getActionCommand();\n \n /* [1] see which button was pushed and do the right thing,\n * hide window and return default/altered data */\n if (cmd.equals(\" Cancel\") || cmd.equals(\"Continue\"))\n { /* send default data back - data is already stored into this.data */\n this.setVisible(false); /* hide frame which can be shown later */\n } /* send default data back */\n else\n if(cmd.equals(\"Ok\"))\n { /* hide window and return data back entered by user */\n data= textField.getText(); /* altered data returned */\n this.setVisible(false); /* hide frame which can be shown later*/\n }\n alertDone= true;\n }", "@FXML\r\n\tprivate void handleOk() {\r\n\tif (isDateInputValid()) {\r\n\t\t\tLocalDate date = startdate.getValue();\r\n\t\t\tLocalDate findate = enddate.getValue();\r\n\t\t\tleavedata.setStartdate(date);\r\n\t\t\tleavedata.setEnddate(findate);\r\n\r\n\t\t\tEmployee employee = namefield.getSelectionModel().getSelectedItem();\r\n\t\t\tleavedata.setEmployee(employee);\r\n\t\t\t\r\n\t\t\tokClicked = true;\r\n\t\t\trosterService.addLeaveData(leavedata);\r\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION);\r\n\t\t\talert.setTitle(\"Information Dialog\");\r\n\t\t\talert.setHeaderText(null);\r\n\t\t\talert.setContentText(\"Update Succesfull\");\r\n\t\t\talert.showAndWait();\r\n\t\t\tdialogStage.close();\r\n\t\t}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n setOnVacationOk(atc, guiD, sm);\n }", "private void mIesireActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mIesireActionPerformed\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa parasiti aplicatia?\", \"Confirmare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "@Override\n public void handle(ActionEvent event) {\n alert = new Alert(AlertType.CONFIRMATION);\n //Optional title. If not used the standard title \"Confiramation\" will be displayed\n //To remove the title use alert.setTitle(null);\n alert.setTitle(\"Confirmation Dialog\");\n //Optional header.If not used the standard header \"Confiramation\" will be displayed\n //To remove the title use alert.setHeaderText(null); \n alert.setHeaderText(\"Please answer the question!\");\n alert.setContentText(initText);\n //Display the dialog and get the result from the user action\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK){\n // the user clicked OK\n alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"Information Dialog\");\n alert.setHeaderText(\"Important message for you!\");\n alert.setContentText(\"Happiness is ephemeral!\");\n alert.showAndWait(); \n //the user clocked Cancel\n } else {\n // ... user chose CANCEL or closed the dialog\n //Warning Dialog\n alert = new Alert(AlertType.WARNING);\n alert.setTitle(\"Warning Dialog\");\n alert.setHeaderText(\"Read the Warning!\");\n alert.setContentText(\"You must like Java - Shall make you Happy!\");\n alert.showAndWait(); \n }\n }" ]
[ "0.82498163", "0.7735042", "0.76717913", "0.76620084", "0.7599956", "0.7563331", "0.74849004", "0.74773395", "0.74751794", "0.7474995", "0.7465549", "0.7388835", "0.7280969", "0.7170516", "0.7117098", "0.71012646", "0.70957196", "0.70934623", "0.7088997", "0.7025616", "0.69952047", "0.6992246", "0.6980184", "0.6979802", "0.69740874", "0.69634575", "0.69555646", "0.6937122", "0.69261175", "0.6891192", "0.68709856", "0.6850384", "0.68388915", "0.68368363", "0.68296874", "0.6813652", "0.6811795", "0.6809463", "0.6801886", "0.6792261", "0.6783658", "0.6771277", "0.6734777", "0.6734777", "0.6734777", "0.6734777", "0.6734777", "0.6721343", "0.67201716", "0.6680152", "0.6680152", "0.6680152", "0.6680152", "0.6656856", "0.6642127", "0.6636973", "0.66298014", "0.66298014", "0.6628894", "0.66180193", "0.66107595", "0.6602099", "0.65851897", "0.6578124", "0.65752745", "0.65649825", "0.65646917", "0.65539247", "0.6551504", "0.65437317", "0.6541729", "0.65348744", "0.6489703", "0.64848614", "0.6482156", "0.64698875", "0.64673406", "0.64513326", "0.6447988", "0.6431476", "0.6422944", "0.64195436", "0.64192796", "0.64152735", "0.64128953", "0.64013016", "0.6397447", "0.6395078", "0.63949335", "0.63941234", "0.63807017", "0.63666713", "0.63145417", "0.63138324", "0.63083124", "0.6304115", "0.6303661", "0.62961775", "0.62842923", "0.6272987", "0.62667274" ]
0.0
-1
CHECKSTYLE:OFF This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jlbDiameter = new javax.swing.JLabel(); jftfDiameter = new javax.swing.JFormattedTextField(); jlbThickness = new javax.swing.JLabel(); jftfThickness = new javax.swing.JFormattedTextField(); jlbDepth = new javax.swing.JLabel(); jftfDepth = new javax.swing.JFormattedTextField(); jPanel2 = new javax.swing.JPanel(); jlbValueBegin = new javax.swing.JLabel(); jftfValueBegin = new javax.swing.JFormattedTextField(); jlbValueStep = new javax.swing.JLabel(); jftfValueStep = new javax.swing.JFormattedTextField(); jlbValueCount = new javax.swing.JLabel(); jspValueCount = new javax.swing.JSpinner(); jbtnOk = new javax.swing.JButton(); jbtnCancel = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(ru.gss.pmfsearcher.PMFSearcherApp.class).getContext().getResourceMap(DlgParameterEdit.class); setTitle(resourceMap.getString("Form.title")); // NOI18N setModal(true); setName("Form"); // NOI18N setResizable(false); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel1.border.title"))); // NOI18N jPanel1.setName("jPanel1"); // NOI18N jlbDiameter.setText(resourceMap.getString("jlbDiameter.text")); // NOI18N jlbDiameter.setName("jlbDiameter"); // NOI18N jftfDiameter.setName("jftfDiameter"); // NOI18N jlbThickness.setText(resourceMap.getString("jlbThickness.text")); // NOI18N jlbThickness.setName("jlbThickness"); // NOI18N jftfThickness.setName("jftfThickness"); // NOI18N jlbDepth.setText(resourceMap.getString("jlbDepth.text")); // NOI18N jlbDepth.setName("jlbDepth"); // NOI18N jftfDepth.setName("jftfDepth"); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jlbThickness) .addComponent(jlbDepth) .addComponent(jlbDiameter)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 176, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jftfDiameter) .addComponent(jftfThickness) .addComponent(jftfDepth, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbDiameter) .addComponent(jftfDiameter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbThickness) .addComponent(jftfThickness, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbDepth) .addComponent(jftfDepth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel2.border.title"))); // NOI18N jPanel2.setName("jPanel2"); // NOI18N jlbValueBegin.setText(resourceMap.getString("jlbValueBegin.text")); // NOI18N jlbValueBegin.setName("jlbValueBegin"); // NOI18N jftfValueBegin.setName("jftfValueBegin"); // NOI18N jlbValueStep.setText(resourceMap.getString("jlbValueStep.text")); // NOI18N jlbValueStep.setName("jlbValueStep"); // NOI18N jftfValueStep.setName("jftfValueStep"); // NOI18N jlbValueCount.setText(resourceMap.getString("jlbValueCount.text")); // NOI18N jlbValueCount.setName("jlbValueCount"); // NOI18N jspValueCount.setName("jspValueCount"); // NOI18N javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addComponent(jlbValueBegin) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)) .addComponent(jlbValueStep) .addComponent(jlbValueCount)) .addGap(67, 67, 67) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jspValueCount) .addComponent(jftfValueStep) .addComponent(jftfValueBegin, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbValueBegin) .addComponent(jftfValueBegin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbValueStep) .addComponent(jftfValueStep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbValueCount) .addComponent(jspValueCount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ru.gss.pmfsearcher.PMFSearcherApp.class).getContext().getActionMap(DlgParameterEdit.class, this); jbtnOk.setAction(actionMap.get("acOk")); // NOI18N jbtnOk.setName("jbtnOk"); // NOI18N jbtnCancel.setAction(actionMap.get("acCancel")); // NOI18N jbtnCancel.setName("jbtnCancel"); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jbtnOk, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jbtnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jbtnOk) .addComponent(jbtnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public FormListRemarking() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public GUIForm() { \n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public frmRectangulo() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public PatientUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public Interfax_D() {\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public Ablak() {\n initComponents();\n }", "public MusteriEkle() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UI() {\n initComponents();\n }", "private FrmMainForm() {\n }", "public ScheduleForm() {\n initComponents();\n }", "public Modification() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public FrmInCadLocal() {\n initComponents();\n }", "public FormCadastroAutomovel() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public uitax() {\n initComponents();\n }", "private void initComponents() {\n\n\t\tsetName(\"Form\"); // NOI18N\n\t\tsetLayout(new java.awt.BorderLayout());\n\t}", "public formdatamahasiswa() {\n initComponents();\n }", "public Designer() {\n initComponents();\n }", "public kunde() {\n initComponents();\n }", "public cargamasiva() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public asignatura() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public Pregunta23() {\n initComponents();\n }", "public frmAfiliado() {\n initComponents();\n \n }", "public sinavlar2() {\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmAdminAccount() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public Carrera() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public soal2GUI() {\n initComponents();\n }", "public JFFornecedores() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public Soru1() {\n initComponents();\n }", "public KullaniciSil() {\n initComponents();\n }", "public AnaPencere() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public MainForm() {\n initComponents();\n \n Utility.centerScreen(this);\n myself = this;\n }", "public FrmKashidashi() {\n initComponents();\n }", "public ValidFrequencyForm() {\r\n initComponents();\r\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public DesigningSec() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public frmDashBoard() {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public FrCadFabricante() {\n initComponents();\n }", "private void initComponentsCustom() {\n SGuiUtils.setWindowBounds(this, 480, 300);\n\n moTextUnitSymbol.setTextSettings(jlUnitSymbol.getText(), 15, 1);\n moTextUnitName.setTextSettings(jlName.getText(), 150, 1);\n moTextShortName.setTextSettings(SGuiUtils.getLabelName(jlAnalysisShortName.getText()), 10, 1);\n moTextName.setTextSettings(SGuiUtils.getLabelName(jlName.getText()), 100, 1);\n moKeyAnalysisType.setKeySettings(miClient, SGuiUtils.getLabelName(jlAnalysisType), true);\n\n moFields.addField(moTextUnitSymbol);\n moFields.addField(moTextUnitName);\n \n moFields.addField(moTextShortName);\n moFields.addField(moTextName);\n \n moFields.addField(moKeyAnalysisType);\n\n moFields.setFormButton(jbSave);\n }", "public frmPessoa() {\n initComponents();\n }", "public form2() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public C_AdminForm() {\n initComponents();\n }", "public JMCF() {\n initComponents();\n }", "public PDMRelationshipForm() {\r\n initComponents();\r\n }", "public nokno() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }" ]
[ "0.7394902", "0.730535", "0.730535", "0.730535", "0.72993475", "0.72569805", "0.7242906", "0.7213646", "0.71623415", "0.71535647", "0.7134446", "0.709741", "0.7095053", "0.70120686", "0.70061785", "0.6997782", "0.6991662", "0.69877446", "0.69771487", "0.69716275", "0.69444615", "0.6865857", "0.6860077", "0.6841213", "0.68297654", "0.6826997", "0.6824258", "0.682107", "0.6819012", "0.6817695", "0.68074006", "0.6801719", "0.6797682", "0.6796937", "0.6795269", "0.6785045", "0.6784733", "0.6763316", "0.67632", "0.6748005", "0.67439884", "0.6742051", "0.67412084", "0.6736795", "0.6730366", "0.67296404", "0.67286575", "0.67281115", "0.67220026", "0.67173773", "0.67132425", "0.67113215", "0.67077", "0.67003864", "0.6699526", "0.6699114", "0.6698134", "0.6695147", "0.66942716", "0.66911894", "0.66911745", "0.66900206", "0.6688825", "0.6686845", "0.6686845", "0.66849375", "0.6677891", "0.6675608", "0.6675048", "0.66748136", "0.6671474", "0.6670716", "0.66663325", "0.6665632", "0.6665431", "0.66652", "0.66628844", "0.66624445", "0.66595906", "0.665843", "0.66536754", "0.6650463", "0.66492695", "0.6646186", "0.66317934", "0.66316456", "0.6630866", "0.6629417", "0.6623116", "0.6619173", "0.6618105", "0.6611244", "0.6609261", "0.66081524", "0.66076267", "0.6602227", "0.65959644", "0.65907", "0.6590258", "0.65901", "0.65845734" ]
0.0
-1
22:09 22:29 22:38 22:46 22:50 22:54 23:02
public static void main(String[] args) { String[] input = new String[]{"A,E,N,S", "S,H,N", "E,N", "H", "N"}; List<String> list = costOfModules(input); for (String str : list) { System.out.println(str); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n String time =\"16:49:40\".substring(0,2);\n System.out.println(time);\n\n }", "static String timeCount_1(List<String> Arr){\n int timeHH = 0;\n int timeMI = 0;\n int timeSS = 0;\n \n String r_hh = \"\";\n String r_mi = \"\";\n String r_ss = \"\";\n\n for(int i = 0; i < Arr.size(); i++ ){\n \n if (Pattern.matches(\"\\\\d{2}:\\\\d{2}:\\\\d{2}\", Arr.get(i))){\n \n String[] s = Arr.get(i).split(\":\");\n int hh = Integer.parseInt(s[0]);\n int mi = Integer.parseInt(s[1]);\n int ss = Integer.parseInt(s[2]);\n \n timeHH += hh;\n timeMI += mi;\n timeSS += ss;\n \n }\n else{\n continue;\n }\n }\n \n timeMI += timeSS / 60;\n timeSS %= 60;\n \n timeHH += timeMI / 60;\n timeMI %= 60; \n\n \n if (timeHH < 10){\n r_hh = \"0\" + timeHH;\n }\n else{\n r_hh = Integer.toString(timeHH);\n }\n \n if (timeMI < 10){\n r_mi = \"0\" + timeMI;\n }\n else{\n r_mi = Integer.toString(timeMI);\n }\n \n if (timeSS < 10){\n r_ss = \"0\" + timeSS;\n }\n else{\n r_ss = Integer.toString(timeSS);\n }\n \n \n \n String result = r_hh + \":\" + r_mi + \":\" + r_ss;\n //String result = timeHH + \":\" + timeMI + \":\" + timeSS;\n \n return result;\n }", "public static void main(String[] args) {\n\t\t long ms = 671684;\r\n\t\t long ms1 = 607222 ;\r\n\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\r\n\t formatter.setTimeZone(TimeZone.getTimeZone(\"GMT+00:00\"));\r\n\t String hms = formatter.format(416970);\r\n\t String hms1 = formatter.format(710036);\r\n\t System.out.println(hms);\r\n\t System.out.println(hms1);\r\n\t //��ʦ���������ExecutorService������һ��\r\n\t}", "static String timeCount_2(List<String> Arr){\n int timeHH = 0;\n int timeMI = 0;\n int timeSS = 0;\n \n int timeSum_second = 0;\n \n String r_hh = \"\";\n String r_mi = \"\";\n String r_ss = \"\";\n\n for(int i = 0; i < Arr.size(); i++ ){\n \n if (Pattern.matches(\"\\\\d{2}:\\\\d{2}:\\\\d{2}\", Arr.get(i))){\n \n String[] s = Arr.get(i).split(\":\");\n int hh = Integer.parseInt(s[0]);\n int mi = Integer.parseInt(s[1]);\n int ss = Integer.parseInt(s[2]);\n\n timeSum_second += hh*60*60 + mi*60 + ss;\n \n }\n else{\n continue;\n }\n }\n \n timeHH = timeSum_second/60/60;\n timeMI = (timeSum_second%(60*60))/60;\n timeSS = timeSum_second%60;\n \n if (timeHH < 10){\n r_hh = \"0\" + timeHH;\n }\n else{\n r_hh = Integer.toString(timeHH);\n }\n \n if (timeMI < 10){\n r_mi = \"0\" + timeMI;\n }\n else{\n r_mi = Integer.toString(timeMI);\n }\n \n if (timeSS < 10){\n r_ss = \"0\" + timeSS;\n }\n else{\n r_ss = Integer.toString(timeSS);\n }\n \n String result = r_hh + \":\" + r_mi + \":\" + r_ss;\n \n return result;\n }", "private String intTime(long l){\r\n String s=\"\";\r\n s+=(char)(((l/1000)/60)+'0')+\":\"+(char)((((l/1000)%60)/10)+'0')+(char)((((l/1000)%60)%10)+'0'); \r\n return s;\r\n }", "public static long TimeInformationToSeconds(String info){\n\t\tif(info.indexOf(':') > 0){\n\t\t\tString[] data = info.split(\":\");\n\t\t\tlong hours = Long.parseLong(data[0]);\n\t\t\tlong minutes = Long.parseLong(data[1]);\n\t\t\tlong seconds = Long.parseLong(data[2].split(\"[.]\")[0]);\n\t\t\tlong milliseconds = Long.parseLong(data[2].split(\"[.]\")[1]);\n\t\t\treturn (hours * 3600000) + (minutes * 60000) + (seconds * 1000) + milliseconds;\n\t\t}else{\n\t\t\n\t\t/*\n\t\tSystem.out.println(info.substring(0, info.indexOf(\"day\")));\n\t\tSystem.out.println(info.substring(0, info.indexOf(\"day\")));\n\t\tSystem.out.println(info.substring(info.indexOf(\" \"), info.indexOf(\":\")));\n\t\tSystem.out.println(info.substring(info.indexOf(':'), info.lastIndexOf(':')));\n\t\tSystem.out.println(info.substring(info.lastIndexOf(':'), info.indexOf('.')));\n\t\tSystem.out.println(info.substring(info.indexOf('.')));\n/*\t\tlong days = Long.parseLong(info.substring(0, info.indexOf(\"day\")));\n\t\tlong hours = Long.parseLong(info.substring(info.indexOf(\" \"), info.indexOf(\":\")));\n\t\tlong minutes = Long.parseLong(info.substring(info.indexOf(':'), info.lastIndexOf(':')));\n\t\tlong seconds = Long.parseLong(info.substring(info.lastIndexOf(':'), info.indexOf('.')));\n\t\tlong milliseconds = Long.parseLong(info.substring(info.indexOf('.')));\n\t*/\t\n\t\t}\n\t\treturn 1;//(days * 86400000) + (hours * 3600000) + (minutes * 60000) + (seconds * 1000) + milliseconds;\n\t}", "static String timeConversion1(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2);\n\n int hour = Integer.parseInt(hours);\n\n int differential = 0;\n if (\"PM\".equals(ampm) && hour != 12) {\n differential = 12;\n }\n\n\n hour += differential;\n hour = hour % 24;\n\n hours = String.format(\"%02d\", hour);\n\n return hours + \":\" + minutes + \":\" + seconds;\n\n }", "@Test\n public void testSplitTime(){\n \tCountDownTimer s = new CountDownTimer();\n \ts.splitTime(3975);\n \tassertEquals(s.toString(), \"1:06:15\");\n \t\n \ts.splitTime(45);\n \tassertEquals(s.toString(), \"0:00:45\");\n \t\n }", "public static String m34537a(long j) {\n Formatter format;\n if (j <= 0 || j >= LogBuilder.MAX_INTERVAL) {\n return \"00:00\";\n }\n long j2 = j / 1000;\n int i = (int) (j2 % 60);\n int i2 = (int) ((j2 / 60) % 60);\n int i3 = (int) (j2 / 3600);\n Formatter formatter = new Formatter(new StringBuilder(), Locale.getDefault());\n if (i3 > 0) {\n format = formatter.format(\"%d:%02d:%02d\", Integer.valueOf(i3), Integer.valueOf(i2), Integer.valueOf(i));\n } else {\n format = formatter.format(\"%02d:%02d\", Integer.valueOf(i2), Integer.valueOf(i));\n }\n return format.toString();\n }", "public static String hoursMinutesSeconds(double t) {\n int hours = (int) t/3600;\n int rem = (int) t - hours*3600;\n int mins = rem / 60;\n int secs = rem - mins*60;\n //return String.format(\"%2d:%02d:%02d\", hours, mins, secs);\n return String.format(\"%d:%02d:%02d\", hours, mins, secs);\n }", "private int toTime(int i) {\n int count = 0;\n\n //hours units\n count += toLeds((i / 6000) % 10);\n //hours tens\n count += toLeds(((i / 6000) % 100) / 10);\n\n //minutes units\n count += toLeds((i / 60) % 10);\n //minutes tens\n count += toLeds(((i / 60) % 100) / 10);\n\n //seconds units\n count += toLeds((i % 60) % 10);\n //seconds tens\n count += toLeds(((i % 60) % 100) / 10);\n\n return count;\n }", "private static int computeTime(String time) {\n\t\tint ret = 0;\n\t\tint multiply = 1;\n\t\tint decimals = 1;\n\t\tfor (int i = time.length() - 1; i >= 0; --i) {\n\t\t\tif (time.charAt(i) == ':') {\n\t\t\t\tmultiply *= 60;\n\t\t\t\tdecimals = 1;\n\t\t\t} else {\n\t\t\t\tret += (time.charAt(i) - '0') * multiply * decimals;\n\t\t\t\tdecimals *= 10;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "void milestone4(int inputSeconds){\n int days = inputSeconds / 86400;\n int seconds = inputSeconds % 86400;\n int hours = seconds / 3600;\n seconds = seconds % 3600;\n int minutes = seconds / 60;\n seconds = seconds % 60;\n\n System.out.println(\"Day/s: \" + days);\n System.out.println(\"Hour/s: \" + hours);\n System.out.println(\"Minute/s: \" + minutes);\n System.out.println(\"Second/s: \" + seconds);\n }", "private static String hhhmmss(double totalseconds)\n {\n final int SECONDS_PER_MINUTE = 60;\n final int SECONDS_PER_HOUR = SECONDS_PER_MINUTE * 60;\n\n int hours = (int) (totalseconds / SECONDS_PER_HOUR);\n int minutes = (int) ((totalseconds % SECONDS_PER_HOUR)) / SECONDS_PER_MINUTE;\n double seconds = totalseconds % SECONDS_PER_MINUTE;\n\n return String.format(\"%d:%02d:%05.2f\", hours, minutes, seconds);\n }", "private static String hhhmmss(double totalseconds)\n {\n final int SECONDS_PER_MINUTE = 60;\n final int SECONDS_PER_HOUR = SECONDS_PER_MINUTE * 60;\n\n int hours = (int) (totalseconds / SECONDS_PER_HOUR);\n int minutes = (int) ((totalseconds % SECONDS_PER_HOUR)) / SECONDS_PER_MINUTE;\n double seconds = totalseconds % SECONDS_PER_MINUTE;\n\n return String.format(\"%d:%02d:%05.2f\", hours, minutes, seconds);\n }", "String formatTime(int time) {\r\n\t\tint h = time / 3600;\r\n\t\ttime %= 3600;\r\n\t\tint m = time / 60;\r\n\t\ttime %= 60;\r\n\t\tint s = time;\r\n\t\treturn String.format(\"%02d:%02d:%02d\", h, m, s);\r\n\t}", "int getTime();", "int getTime();", "private String formatTime(long length) {\n\t\tString hms = \"\";\n\t\tif(length < 3600000) {\n\t\t\thms = String.format(\"%02d:%02d\",\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t} else {\n\t\t\thms = String.format(\"%02d:%02d:%02d\", TimeUnit.MILLISECONDS.toHours(length),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t}\n\n\t\treturn hms;\n\t}", "private String secondsToMinutesAndSeconds(double seconds) {\n\t\tint numberOfminutes = (int) (seconds / 60);\n\t\tint numberOfSeconds = (int) (seconds % 60);\n\t\tif (numberOfSeconds < 10) {\n\t\t\treturn numberOfminutes + \":0\" + numberOfSeconds;\n\t\t} else {\n\t\t\treturn numberOfminutes + \":\" + numberOfSeconds;\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\tint time = 32150;\n\t\n\t\t\tSystem.out.print((time / 3600)+\" 시간 \");\n\t\t\tSystem.out.print((time % 3600 / 60)+\" 분 \");\n\t\t\tSystem.out.println((time % 3600 % 60)+\" 초\");\n\t\t\n\t\t\n\t}", "public static String getHHMM()\r\n/* 74: */ {\r\n/* 75: 94 */ String nowTime = \"\";\r\n/* 76: 95 */ Date now = new Date();\r\n/* 77: 96 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 78: 97 */ nowTime = formatter.format(now);\r\n/* 79: 98 */ return nowTime;\r\n/* 80: */ }", "private String formatTime(int seconds){\n return String.format(\"%02d:%02d\", seconds / 60, seconds % 60);\n }", "int main()\n{\n cin>>a.h>>a.m>>a.s>>b.h>>b.m>>b.s;\n int x=a.s-b.s;\n int y=a.m-b.m;\n int z=a.h-b.h;\n if(y<0){\n y+=60;\n z--;\n }\n if(x<0){\n x+=60;\n y--;\n }\n cout<<z<<\":\"<<y<<\":\"<<x;\n}", "@Test\n\tpublic void test() throws InterruptedException {\n\t\tString firstTime = Time.main();\n\t\tString[] splitFirst = firstTime.split(\":\");\n\t\tThread.sleep(5000);\n\t\tString secondTime = Time.main();\n\t\tString[] splitSecond = secondTime.split(\":\");\n\t\t\n\t\t\n\t\tif(Integer.parseInt(splitFirst[2])>=55) //if first time was >= 55 seconds\n\t\t{\n\t\t\tassertEquals(Integer.parseInt(splitSecond[2]),(Integer.parseInt(splitFirst[2])+5)%60); //seconds should increase by 5 mod 60\n\n\t\t\tif(Integer.parseInt(splitFirst[1])==59) //if first time was 59 minutes\n\t\t\t{ \n\t\t\t\tassertTrue(splitFirst[1].equals(\"00\")); //reset to zero minutes\n\t\t\t\t\n\t\t\t\tif(Integer.parseInt(splitFirst[0])==23) //if first time was 23 hours\n\t\t\t\t\tassertTrue(splitFirst[0].equals(\"00\")); //reset to zero hours\n\t\t\t\telse //if first time is not 23 hours\n\t\t\t\t\tassertEquals(Integer.parseInt(splitFirst[0])+1, Integer.parseInt(splitSecond[0])); //hours should increase by 1\n\t\t\t}\n\t\t\telse //if first time was not 59 minutes\n\t\t\t{\n\t\t\t\tassertEquals(Integer.parseInt(splitFirst[1])+1, Integer.parseInt(splitSecond[1])); //minutes should increase by 1\n\t\t\t\tassertTrue(splitFirst[0].equals(splitSecond[0])); //hours should not change\n\t\t\t}\n\t\t}\n\t\telse //if first time was <= 55 seconds\n\t\t{\n\t\t\tassertEquals(Integer.parseInt(splitSecond[2]),(Integer.parseInt(splitFirst[2])+5)); //seconds should increase by 5\n\t\t\tassertTrue(splitFirst[1].equals(splitSecond[1])); //minutes should not change\n\t\t\tassertTrue(splitFirst[0].equals(splitSecond[0])); //hours should not change\n\t\t\t\n\t\t}\n\t\t\n\t}", "public String TI()\n\t{\n\t\tDateTimeFormatter f = DateTimeFormatter.ofPattern(\"hh:mm a\");\n\t\tString ti = f.format(st);\n\t\tString ti2 = f.format(et);\n\t\treturn ti + \" - \" + ti2;\n \t}", "public static double getAttHour(String time1, String time2)\r\n/* 178: */ throws ParseException\r\n/* 179: */ {\r\n/* 180:258 */ double hour = 0.0D;\r\n/* 181:259 */ DateFormat fulDate = new SimpleDateFormat(\"HH:mm\");\r\n/* 182:260 */ long t12 = fulDate.parse(\"12:00\").getTime();\r\n/* 183:261 */ long t13 = fulDate.parse(\"13:00\").getTime();\r\n/* 184:262 */ long t1 = fulDate.parse(time1).getTime();\r\n/* 185:263 */ long PERHOUR = 3600000L;\r\n/* 186:264 */ if (time2 == null)\r\n/* 187: */ {\r\n/* 188:265 */ if (t12 - t1 > 0L) {\r\n/* 189:266 */ hour = (t12 - t1) / PERHOUR;\r\n/* 190: */ }\r\n/* 191: */ }\r\n/* 192: */ else\r\n/* 193: */ {\r\n/* 194:269 */ long t2 = fulDate.parse(time2).getTime();\r\n/* 195:270 */ if ((t1 <= t12) && (t2 >= t12) && (t2 <= t13)) {\r\n/* 196:271 */ hour = (t12 - t1) / PERHOUR;\r\n/* 197:272 */ } else if ((t1 <= t12) && (t2 >= t13)) {\r\n/* 198:273 */ hour = (t2 - t1) / PERHOUR - 1.0D;\r\n/* 199:274 */ } else if ((t1 >= t12) && (t1 <= t13) && (t2 >= t12) && (t2 <= t13)) {\r\n/* 200:275 */ hour = 0.0D;\r\n/* 201:276 */ } else if ((t1 >= t12) && (t1 <= t13) && (t2 >= t13)) {\r\n/* 202:277 */ hour = (t2 - t13) / PERHOUR;\r\n/* 203: */ } else {\r\n/* 204:279 */ hour = (t2 - t1) / PERHOUR;\r\n/* 205: */ }\r\n/* 206: */ }\r\n/* 207:282 */ DecimalFormat df = new DecimalFormat(\"#.0\");\r\n/* 208:283 */ return Double.parseDouble(df.format(hour));\r\n/* 209: */ }", "private static int getNodeTime(String node) {\n int offSet = 4;\n return (int) node.toCharArray()[0] - offSet;\n }", "@Test public void Time_len_6()\t\t\t\t\t\t\t\t\t{tst_time_(\"041526\"\t\t\t\t\t, \"04:15:26.000\");}", "public static String time_str(double t) {\n int hours = (int) t/3600;\n int rem = (int) t - hours*3600;\n int mins = rem / 60;\n int secs = rem - mins*60;\n return String.format(\"%02d:%02d:%02d\", hours, mins, secs);\n //return hoursMinutesSeconds(t);\n }", "public static void main(String[] args) {\n\t\tString s = \"12:45:54PM\";\r\n\t\tString temp=\":\";\r\n\t\tString Result=\"\";\r\n\t\t\r\n\t\tif(s.charAt(8)=='P' || s.charAt(8)=='p')\r\n\t\t {\r\n\t\t\tString s1[] = s.split(\":\");\r\n\t int Hour = Integer.parseInt(s1[0]);\r\n\t String Actual_Hour = \"\";\r\n\t if(Hour == 12)\r\n\t {\r\n\t \tActual_Hour = \"12\";\r\n\t }\r\n\t else\r\n\t {\r\n\t \tint data = 12 + Hour;\r\n\t \tActual_Hour = String.valueOf(data);\r\n\t }\r\n\t \r\n\t \r\n\t Result = Actual_Hour +temp+s1[1]+temp+s1[2].substring(0, 2);\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t \tString s1[] = s.split(\":\");\r\n\t\t \tint Hour = Integer.parseInt(s1[0]);\r\n\t\t String Actual_Hour = \"\";\r\n\t\t if(Hour == 12)\r\n\t\t {\r\n\t\t \tActual_Hour = \"00\";\r\n\t\t \tResult = Actual_Hour +temp+s1[1]+temp+s1[2].substring(0, 2); \r\n\t\t }\r\n\t\t else {\r\n\t\t \tString s2[] = s.split(\"AM\");\r\n\t\t\t for(int i=0; i<s2.length; i++)\r\n\t\t\t {\r\n\t\t\t \tResult = s2[i];\r\n\t\t\t }\t\r\n\t\t }\r\n\t\t \t\r\n\t\t }\r\n\t\t\r\n\t\t\t\tSystem.out.println(Result);\r\n}", "public static void main(String[] args) {\n\t\tint seconds = 3910 ; // 1 hour 5 minutes and 10 seconds \r\n\t\t\r\n\t\tint minutes , hours ; \r\n\t\t\r\n\t\tminutes = seconds / 60 ; \r\n\t\tSystem.out.println(\" The minutes is : \" + minutes );\r\n\t\t\r\n\t\t// how many seconds remaining after getting minutes part \r\n\t\t\r\n\t\tint remainingSecondsAfterMinute = seconds % 60 ; \r\n\t\tSystem.out.println(\" The remianing seconds after minute is : \" + remainingSecondsAfterMinute );\r\n\t\t\r\n\t\t// we can use minute as below \r\n\t\t// hours = minutes / 60 ; \r\n\t\t// or we can use seconds directly\r\n\t\thours = seconds / 3600 ; \r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\" Hours is \" + hours);\r\n\t\t\r\n\t\t// Task : convert the seconds to real life example of \r\n\t\t// 3910 seconds is 1 hour 5 minute and 10 seconds \r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "static String getTime(int time) {\r\n\t\tint hours = time / 60;\r\n\t\tint minutes = time % 60;\r\n\r\n\t\tString ampm;\r\n\t\tif (time >= 720) ampm = \"PM\";\r\n\t\telse ampm = \"AM\";\r\n\r\n\t\treturn (String.format(\"%d:%02d%s\", hours, minutes, ampm));\r\n\t}", "int getTimeInstants();", "@Test public void shouldGive240MinFor950cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 4 * 60 /*minutes*/ , rs.calculateTime(950) ); \r\n }", "public static void main(String[] args) {\n System.out.println(solution(\"02:03:55\",\"00:14:15\",\n new String[] {\"01:20:15-01:45:14\", \n \"00:40:31-01:00:00\",\n \"00:25:50-00:48:29\",\n \"01:30:59-01:53:29\", \n \"01:37:44-02:02:30\"}));\n \n // \"01:00:00\"\n System.out.println(solution(\"99:59:59\", \"25:00:00\",\n new String[] {\"69:59:59-89:59:59\",\n \"01:00:00-21:00:00\",\n \"79:59:59-99:59:59\",\n \"11:00:00-31:00:00\"}));\n \n // \"00:00:00\"\n System.out.println(solution(\"50:00:00\", \"50:00:00\",\n new String[] {\"15:36:51-38:21:49\",\n \"10:14:18-15:36:51\",\n \"38:21:49-42:51:45\"}));\n \n }", "public static int compareTime(String time1, String time2)\r\n/* 83: */ {\r\n/* 84:110 */ String[] timeArr1 = (String[])null;\r\n/* 85:111 */ String[] timeArr2 = (String[])null;\r\n/* 86:112 */ timeArr1 = time1.split(\":\");\r\n/* 87:113 */ timeArr2 = time2.split(\":\");\r\n/* 88:114 */ int minute1 = Integer.valueOf(timeArr1[0]).intValue() * 60 + \r\n/* 89:115 */ Integer.valueOf(timeArr1[1]).intValue();\r\n/* 90:116 */ int minute2 = Integer.valueOf(timeArr2[0]).intValue() * 60 + \r\n/* 91:117 */ Integer.valueOf(timeArr2[1]).intValue();\r\n/* 92:118 */ return minute1 - minute2;\r\n/* 93: */ }", "int getTtiSeconds();", "private String obtenerMilisegundos(){\n\n String fecha = java.time.LocalDateTime.now().toString();\n int longitudPunto = fecha.lastIndexOf(\".\");\n try{\n this.milisegundos = java.time.LocalDateTime.now().toString().substring((longitudPunto+1),fecha.length());\n }catch (StringIndexOutOfBoundsException sioobe){\n this.milisegundos = \"000\";\n }\n\n return milisegundos;\n }", "public static void main(String [] args)\n\t{\n\tSystem.out.println(\"Enter your GMT ofset (ei: -5): \");\n Scanner input = new Scanner(System.in);\n long totalMilliSeconds=System.currentTimeMillis(); \n long totalSeconds=totalMilliSeconds/1000; \n int second=(int)(totalSeconds%60); \n long totalMinutes=totalSeconds/60; \n int minute=(int)(totalMinutes%60); \n long totalHours=totalMinutes/60; \n int hour=(int)((totalHours - 8)%24); \n //print result\n\tSystem.out.println(\"The current time is: \"+ hour + \":\" + minute + \":\" + second);\n\t}", "private int compareTimes(String time1, String time2) {\n \n String[] timeOneSplit = time1.trim().split(\":\");\n String[] timeTwoSplit = time2.trim().split(\":\");\n \n \n if (timeOneSplit.length == 2 && timeTwoSplit.length == 2) {\n \n String[] minutesAmPmSplitOne = new String[2];\n minutesAmPmSplitOne[1] = timeOneSplit[1].trim().substring(0, timeOneSplit[1].length() - 2);\n minutesAmPmSplitOne[1] = timeOneSplit[1].trim().substring(timeOneSplit[1].length() - 2, timeOneSplit[1].length());\n\n String[] minutesAmPmSplitTwo = new String[2];\n minutesAmPmSplitTwo[1] = timeTwoSplit[1].trim().substring(0, timeTwoSplit[1].length() - 2);\n minutesAmPmSplitTwo[1] = timeTwoSplit[1].trim().substring(timeTwoSplit[1].length() - 2, timeTwoSplit[1].length());\n \n int hourOne = Integer.parseInt(timeOneSplit[0]);\n int hourTwo = Integer.parseInt(timeTwoSplit[0]);\n \n //increment hours depending on am or pm\n if (minutesAmPmSplitOne[1].trim().equalsIgnoreCase(\"pm\")) {\n hourOne += 12;\n }\n if (minutesAmPmSplitTwo[1].trim().equalsIgnoreCase(\"pm\")) {\n hourTwo += 12;\n }\n \n if (hourOne < hourTwo) {\n \n return -1;\n }\n else if (hourOne > hourTwo) {\n \n return 1;\n }\n else {\n \n int minutesOne = Integer.parseInt(minutesAmPmSplitOne[0]);\n int minutesTwo = Integer.parseInt(minutesAmPmSplitTwo[0]);\n \n if (minutesOne < minutesTwo) {\n \n return -1;\n }\n else if (minutesOne > minutesTwo) {\n \n return 1;\n }\n else {\n \n return 0;\n }\n }\n }\n //time1 exists, time 2 doesn't, time 1 comes first!\n else if (timeOneSplit.length == 2 && timeTwoSplit.length != 2) {\n return -1;\n }\n else {\n return 1;\n }\n }", "public static String getTimeStamp() {\r\n\r\n\t\tlong now = (System.currentTimeMillis() - startTime) / 1000;\r\n\r\n\t\tlong hours = (now / (60 * 60)) % 24;\r\n\t\tnow -= (hours / (60 * 60)) % 24;\r\n\r\n\t\tlong minutes = (now / 60) % 60;\r\n\t\tnow -= (minutes / 60) % 60;\r\n\r\n\t\tlong seconds = now % 60;\r\n\r\n\t return String.format(\"%02d:%02d:%02d\", hours, minutes, seconds);\r\n\t}", "private String getTimingt(Long pastvalue) {\n DateTime zulu = DateTime.now(DateTimeZone.UTC);\n // DateTimeFormatter formatter = DateTimeFormat.forPattern(\"HH:mm:ss am\");\n Date date = new Date(pastvalue);\n// formattter\n SimpleDateFormat formatter= new SimpleDateFormat(\"hh:mm a\");\n formatter.setTimeZone(TimeZone.getDefault());\n// Pass date object\n return formatter.format(date );\n /*\n long mint = TimeUnit.MILLISECONDS.toMinutes(zulu.toInstant().getMillis() - pastvalue);\n\n if (mint < 60) {\n if (mint > 1)\n return \"Hace \" + mint + \" minutos\";\n else\n return \"Hace \" + mint + \" minuto\";\n } else {\n long horas = TimeUnit.MILLISECONDS.toHours(zulu.toDate().getTime() - pastvalue);\n\n if (horas < 24) {\n if (horas > 1)\n return \"Hace \" + horas + \" horas\";\n else\n return \"Hace \" + horas + \" hora\";\n } else {\n long dias = TimeUnit.MILLISECONDS.toDays(zulu.toDate().getTime() - pastvalue);\n\n if (dias > 1) {\n return \"Hace \" + dias + \" dias\";\n } else\n return \"Hace \" + dias + \" dia\";\n }\n\n\n }*/\n }", "public int getTotalTime();", "private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date = (raw[30]) & 0x1F;\n month = ((raw[30] & 0xE0) >> 5) + ((raw[31] & 0x01) << 3);\n year = (((raw[31] & 0xFE) >> 1) & 255) + 2000;\n\n\n\n return hR(month) + \"/\" + hR(date) + \"/\" + year + \" \" + hR(hours) + \":\" + hR(minutes) + \":\" + hR(seconds) + \":00\";\n }", "public String getTime(){\n String mt=\"\";\n String hr=\"\";\n if(minute<10){\n mt=0+(String.valueOf(minute));\n }\n\n else{\n mt=String.valueOf(minute);\n }\n\n if(hour<10){\n hr=0+(String.valueOf(hour));\n }\n else{\n hr=String.valueOf(hour);\n }\n //return hour:minute\n return (hr+\":\"+mt);\n }", "private String findMaximumValidTime1(int a, int b, int c, int d) {\n int[] arr = {a,b,c,d};\n int maxHr = -1;\n int hr_i = 0, hr_j = 0;\n\n //Find maximum HR\n for(int i=0; i < arr.length; i++){\n for(int j=i+1; j < arr.length; j++){\n int value1 = arr[i] * 10 + arr[j];\n int value2 = arr[j] * 10 + arr[i];\n if(value1 < 24 && value2 < 24){\n if(value1 > value2 && value1 > maxHr) {\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 > value1 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n }else if(value1 < 24 && value2 > 24 && value1 > maxHr){\n maxHr = value1;\n hr_i = i;\n hr_j = j;\n }else if(value2 < 24 && value1 > 24 && value2 > maxHr){\n maxHr = value2;\n hr_i = i;\n hr_j = j;\n }\n\n }\n }\n System.out.println(maxHr);\n\n //Find maximum MM\n int[] mArr = new int[2]; //minutes array\n int k=0;\n for(int i=0; i < arr.length; i++){\n if(i != hr_i && i != hr_j){\n mArr[k++] = arr[i];\n }\n }\n\n System.out.println(Arrays.toString(mArr));\n int maxMin = -1;\n int val1 = mArr[0] * 10 + mArr[1];\n int val2 = mArr[1] * 10 + mArr[0];\n\n if(val1 < 60 && val2 < 60){\n maxMin = Math.max(val1,val2);\n }else if(val1 < 60 && val2 > 60) {\n maxMin = val1;\n }else if(val2 < 60 && val1 > 60){\n maxMin = val2;\n }\n System.out.println(maxMin);\n\n //Create answer\n StringBuilder sb = new StringBuilder();\n if(maxHr == -1 || maxMin == -1){\n return \"Not Possible\";\n }\n\n if(Integer.toString(maxHr).length() < 2){ //HR\n sb.append(\"0\"+maxHr+\":\");\n }else {\n sb.append(maxHr+\":\");\n }\n\n if(Integer.toString(maxMin).length() < 2){ //MM\n sb.append(\"0\"+maxMin);\n }else {\n sb.append(maxMin);\n }\n\n return sb.toString();\n }", "public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}", "private String multipleStartTimes() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (startTimes.size() > 1) {\n\t\t\tsb.append(\"Flera starttider? \");\n\t\t\tfor (int i = 1; i < startTimes.size(); i++) {\n\t\t\t\tsb.append(startTimes.get(i) + \" \");\n\t\t\t}\n\t\t\tsb.append(\"; \");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\tString readLine = reader.readLine();\n\t\treader.close();\n\t\tString[] split = readLine.split(\" \");\n\t\tint num=Integer.valueOf(split[1])-Integer.valueOf(split[0]);\n\t\tint rs=(int)Math.rint((double)num/100.0);\n\t\tint s=rs%60;\n\t\tint m=(rs/60)%60;\n\t\tint h=rs/3600;\n\t\tSystem.out.println((h<10?(\"0\"+h):h)+\":\"+(m<10?(\"0\"+m):m)+\":\"+(s<10?(\"0\"+s):s));\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println( getDurationString(61, 61));\r\n\t\t System.out.println(getDurationString(60, 59));\r\n\t\t System.out.println(getDurationString(-610, 9));\r\n\t\t System.out.println( getDurationString(1, 6));\r\n\t\t System.out.println( getDurationString(3722));\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void Keypad() {\n Assert.assertEquals(11, Computation.keypadTime(\"91566165\",\"639485712\"));\n Assert.assertEquals(1, Computation.keypadTime(\"5111\",\"752961348\"));\n }", "public static String timeInWords(final int h, final int m) {\n\n\t\tif(m == 0) {\n\t\t\treturn getFromNumber(h).getWord() + \" \" + minuteInWord(m);\n\t\t} else if (m > 30) {\n\t\t\treturn minuteInWord(60 - m) + \" to \" + getFromNumber(h + 1).getWord();\n\t\t} else {\n\t\t\treturn minuteInWord(m) + \" past \" + getFromNumber(h).getWord();\n\t\t}\n\n }", "public static String timeConversion(String s) {\n // Write your code here\n String end = s.substring(2, s.length() - 2);\n String ans = s.substring(0, s.length() - 2);\n if (s.charAt(8) == 'A') {\n return s.startsWith(\"12\") ? \"00\" + end : ans;\n }\n\n return s.startsWith(\"12\") ? ans : (Integer.parseInt(s.substring(0, 2)) + 12) + end;\n }", "public String getResult(){\n\t\tString result = String.format(\"%-10s%10d\", p1time,found);\n\t\treturn result;\n\t}", "private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }", "private void parseCPUSpeedTimes(){\n\t\tString str = parser.readFile(SYS_CPU_SPEED_STEPS, 512);\n\t\tif(str == null)\n\t\t\treturn;\n\t\t\n\t\tString[] vals;\n\t\tint index = 0;\n\t\tlong time;\n\t\t\n\t\tfor(String token : str.split(\"\\n\")){\n\t\t\tif(str.trim().length() == 0) continue;\n\t\t\ttry{\n\t\t\t\tvals = token.split(\" \");\n\t\t\t\ttime = Long.valueOf(vals[1]);\n\t\t\t\tmRelCpuSpeedTimes[index] = time - mBaseCpuSpeedTimes[index];\n\t\t\t\tmBaseCpuSpeedTimes[index] = time;\n\t\t\t}catch (NumberFormatException nfe){\n\t\t\t\tnfe.printStackTrace();\n\t\t\t}finally{\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t}", "public String getAvailableTime() {\n String output = \"\";\n for (int i = 0; i < 24; ++i) {\n if (availableTime[i] == true) {\n output += i;\n break;\n }\n }\n output += \" to \";\n for (int i = 23; i >= 0; --i) {\n if (availableTime[i] == true) {\n output += i;\n break;\n }\n }\n return output;\n }", "public static String TimeConverter(long t)\r\n {\r\n int h, m, s, ms;\r\n ms = (int)t;\r\n h = ms / 3600000;\r\n ms = ms % 3600000;\r\n m = ms / 60000;\r\n ms = ms % 60000;\r\n s = ms / 1000;\r\n ms = ms % 1000;\r\n return h + \" :: \" + m + \" :: \" + s + \" :: \" + ms;\r\n }", "public static String getUserFriendlyInterval(long i) {\r\n long interval = i;\r\n \r\n if(interval != 0) {\r\n long remainMs;\r\n String result = \"\";\r\n \r\n // time categories in milliseconds\r\n int secMs = 1000;\r\n int minMs = secMs*60;\r\n int hourMs = minMs*60;\r\n int dayMs = hourMs*24;\r\n\r\n int days = (int)interval/dayMs;\r\n remainMs = interval%dayMs;\r\n //#debug\r\n//# System.out.println(\"days: \"+days);\r\n\r\n int hours = (int)remainMs/hourMs;\r\n remainMs = remainMs%hourMs;\r\n //#debug\r\n//# System.out.println(\"hours: \"+hours);\r\n\r\n int min = (int)remainMs/minMs;\r\n remainMs = remainMs%minMs;\r\n //#debug\r\n//# System.out.println(\"minutes: \"+min);\r\n\r\n int sec = (int)remainMs/secMs;\r\n //#debug\r\n//# System.out.println(\"seconds: \"+sec);\r\n\r\n if(days > 0) {\r\n result = days+Locale.get(\"text.days\")+\" \";\r\n }\r\n if(hours > 0 || days > 0) {\r\n result += hours+Locale.get(\"text.hours\")+\" \";\r\n }\r\n if(min > 0 || hours > 0) {\r\n result += min+Locale.get(\"text.min\")+\" \";\r\n }\r\n if(sec > 0 || min > 0) {\r\n result += sec+Locale.get(\"text.sec\");\r\n }\r\n return result;\r\n }\r\n return \"0 \"+Locale.get(\"text.sec\");\r\n }", "public static void main(String[] args) {\n\t\tString n = \"수 10:00~18:30/목,토 09:00~13:00\";\n\t\t\n\t\tSystem.out.println(isTimePatternIn(n));\n\t}", "int getTonicNote(){\n String lastnote=\"\";\n int result;\n lastnote += Strinput.toCharArray()[Strinput.length()-4];\n lastnote += Strinput.toCharArray()[Strinput.length()-3];\n result = Integer.parseInt(lastnote);\n if(result<72){\n return result-60;\n }else{\n return result-12-60;\n }\n }", "static String timeConversion(String s) throws ParseException {\n SimpleDateFormat to = new SimpleDateFormat(\"HH:mm:ss\");\n SimpleDateFormat from = new SimpleDateFormat(\"hh:mm:ssa\");\n Date parse = from.parse(s);\n return to.format(parse);\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner input=new Scanner(System.in);\n\t\t\n\t\tint sec=input.nextInt();\n\t\tint hour=sec/3600;\n\t\tint minutes=(sec-(3600*hour))/60;\n\t\tint seconds=sec-(3600*hour)-(60*minutes);\n\t\t\n\t\tSystem.out.println(hour+\":\"+minutes+\":\"+seconds);\n\t\n\t\n\t}", "public int findMinDifference(List<String> timePoints) {\n List<Integer> p = new ArrayList<>();\n for(String time:timePoints){\n String[] hm = time.split(\":\");\n int h = Integer.parseInt(hm[0]);\n int m = Integer.parseInt(hm[1]);\n p.add(h*60 + m);\n if(h<12){\n p.add((h+24)*60+m);\n }\n }\n int diff = Integer.MAX_VALUE;\n Collections.sort(p);\n for(int i=1; i<p.size(); i++){\n diff = Math.min(p.get(i)-p.get(i-1), diff);\n }\n return diff;\n }", "public String formatTime() {\n if ((myGameTicks / 16) + 1 != myOldGameTicks) {\n myTimeString = \"\";\n myOldGameTicks = (myGameTicks / 16) + 1;\n int smallPart = myOldGameTicks % 60;\n int bigPart = myOldGameTicks / 60;\n myTimeString += bigPart + \":\";\n if (smallPart / 10 < 1) {\n myTimeString += \"0\";\n }\n myTimeString += smallPart;\n }\n return (myTimeString);\n }", "public static void main(String[] args) {\n System.out.println(getDurationString(65,45));\n\n System.out.println(getDurationString(3945));\n }", "private String computeTime(long l_time){\n \tString studyTime = \" \";\n \tlong hours, mins, secs;\n \t\n \tif (l_time > 3600) {\n \t\thours = l_time / 3600;\n \t\tl_time = l_time % 3600;\n \t\tmins = l_time / 60;\n \t\tsecs = l_time % 60;\n \t\tif (hours > 1) {\n \t\t\tstudyTime = Long.toString(hours) + \" hours \" + Long.toString(mins) + \" minutes and \" + Long.toString(secs) + \" seconds\";\n \t\t} else {\n \t\t\tstudyTime = Long.toString(hours) + \" hour \" + Long.toString(mins) + \" minutes and \" + Long.toString(secs) + \" seconds\";\n \t\t}\n \t} else if (l_time > 60 ){\n \t\tmins = l_time / 60;\n \t\tsecs = l_time % 60;\n \t\tif (mins > 1) {\n \t\t\tstudyTime = Long.toString(mins) + \" minutes and \" + Long.toString(secs) + \" seconds\";\n \t\t} else {\n \t\t\tstudyTime = Long.toString(mins) + \" minute and \" + Long.toString(secs) + \" seconds\";\n \t\t}\n \t} else {\n \t\tif (l_time > 1) {\n \t\t\tstudyTime = Long.toString(l_time) + \" seconds\";\n \t\t} else {\n \t\t\tstudyTime = Long.toString(l_time) + \" second\";\n \t\t}\n \t}\n \treturn studyTime;\n }", "public String getTimeInString() {\n int minutes = (time % 3600) / 60;\n int seconds = time % 60;\n String timeString = String.format(\"%02d:%02d\", minutes, seconds);\n\n return timeString;\n }", "public static void main(String [] args){//inicio del main\r\n\r\n Scanner sc= new Scanner(System.in); \r\n\r\nSystem.out.println(\"ingrese los segundos \");//mesaje\r\nint num=sc.nextInt();//total de segundos\r\nint hor=num/3600;//total de horas en los segundos\r\nint min=(num-(3600*hor))/60;//total de min en las horas restantes\r\nint seg=num-((hor*3600)+(min*60));//total de segundo sen los miniutos restantes\r\nSystem.out.println(\"Horas: \" + hor + \" Minutos: \" + min + \" Segundos: \" + seg);//salida del tiempo\r\n\r\n}", "static String timeConversion(String s) {\n String[] sTime = s.split(\":\");\n\n int x = 0;\n\n // if PM and hours >12, add additional 12 to hours\n // for AM and hour = 12, set hour to 00\n if(sTime[sTime.length - 1].contains(\"PM\") && !sTime[0].equals(\"12\"))\n x = 12;\n\n String val1 = \"\";\n if(x == 12)\n val1 = (Integer.parseInt(sTime[0]) + x) + \"\";\n else {\n if(sTime[0].equals(\"12\") && sTime[sTime.length - 1].contains(\"AM\"))\n val1 = \"00\";\n else\n val1 = sTime[0];\n }\n\n // merge the string and return the result\n String result = val1 + \":\" + sTime[1] + \":\" + sTime[2].substring(0,2);\n return result;\n }", "public static String getWorkTimeSecondsInFormattedString(long seconds) {\r\n int totalMinutos = (int) (seconds/60);\r\n int totalHoras = totalMinutos / 60;\r\n int restoMinutos = totalMinutos % 60;\r\n int restoSegundos = (int) (seconds % 60);\r\n\r\n return (totalHoras + \":\" + restoMinutos + \":\" + restoSegundos);\r\n\r\n }", "private static int convertTimeToSecs(String time){\n if (time == null) return 0;\n String hours = time.substring(0, 2);\n String mins = time.substring(3,5);\n return Integer.parseInt(hours)*3600 + Integer.parseInt(mins)*60;\n }", "public String tiempoRestanteHMS(Integer segundos) {\n\t\tint hor = segundos / 3600;\n\t\tint min = (segundos - (3600 * hor)) / 60;\n\t\tint seg = segundos - ((hor * 3600) + (min * 60));\n\t\treturn String.format(\"%02d\", hor) + \" : \" + String.format(\"%02d\", min)\n\t\t\t\t+ \" : \" + String.format(\"%02d\", seg);\n\t}", "public String stats()\n\t{\n\t\tString a = \"\"; //initialize string\n\t\t\n\t\tString size1 = points.length + \"\"; //put size into string\n\t\t\n\t\twhile(size1.length() < 12) //go until string is 12 long\n\t\t{\n\t\t\tsize1 += \" \"; //add a new blank space\n\t\t}\n\t\ta = a + algorithm + \" \" + size1 + time; //put string together \n\t\treturn a; \n\t}", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "java.lang.String getTime();", "public String dimeTuTiempo()\n {\n String cadResultado=\"\";\n if (horas<10)\n {\n cadResultado=cadResultado+\"0\";\n }\n cadResultado=cadResultado+horas;\n cadResultado=cadResultado+\":\";\n if(minutos<10)\n {\n cadResultado=cadResultado+\"0\";\n }\n cadResultado=cadResultado+minutos;\n \n return cadResultado;\n }", "private String readableTime(Integer minutes) {\r\n String time = \"\";\r\n if (minutes / 60.0 > 1) {\r\n time = (minutes / 60) + \" hrs, \"\r\n + (minutes % 60) + \" min\";\r\n } else {\r\n time = minutes + \" min\";\r\n }\r\n return time;\r\n }", "private static String getTime() {\n\t\tDate getDate = new Date();\n\t\tString timeFormat = \"M/d/yy hh:mma\";\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(timeFormat);\n\t\treturn \"[\" + sdf.format(getDate) + \"]\\t\";\n\t}", "public static String getYYYYMMDDHHMMSS()\r\n/* 56: */ {\r\n/* 57: 68 */ String nowTime = \"\";\r\n/* 58: 69 */ Date now = new Date();\r\n/* 59: 70 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n/* 60: 71 */ nowTime = formatter.format(now);\r\n/* 61: 72 */ return nowTime;\r\n/* 62: */ }", "int getPaceSeconds() {\r\n\t\tint m = getContents(minutes);\r\n\t\tint s = getContents(seconds);\r\n\t\treturn 60*m +s;\r\n\t}", "double getTime();", "public static String getDurationString(long minutes, long seconds) {\n if(minutes>=0 && (seconds >=0 && seconds<=59)){\n// minutes = hours/60;\n// seconds = hours/3600;\n long hours = minutes / 60;\n long remainingMinutes = minutes % 60;\n\n return hours + \" h \" + remainingMinutes + \"m \" + seconds + \"s\";\n }\n else\n\n {\n return \"invalid value\";\n }\n }", "BigInteger getResponse_time();", "public String toString(){\r\n String strout = \"\";\r\n strout = String.format(\"%02d:%02d\", this.getMinutes(), this.getSeconds());\r\n return strout;\r\n }", "public String duration(){\n long duration =beginTime.getTime()-endTime.getTime();\n long diffMinutes = duration / (60 * 1000) % 60;\n long diffHours = duration / (60 * 60 * 1000);\n if(diffHours ==0)\n return -1*diffMinutes + \" minutes\";\n else\n return \" \"+-1*diffHours+\":\"+ -1*diffMinutes +\"min\";\n }", "@Test(timeout = 4000)\n public void test49() throws Throwable {\n String string0 = EWrapperMsgGenerator.currentTime((-532L));\n assertEquals(\"current time = -532 (Dec 31, 1969 11:51:08 PM)\", string0);\n }", "public static void main(String[] args) {\n\t\tint total_sec,hr,min,sec;\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter total seconds:\");\r\n\t\ttotal_sec=s.nextInt();\r\n\t\thr=total_sec/3600;\r\n\t\tmin=(total_sec-(hr*3600))/60;\r\n\t\tsec=total_sec-((hr*3600)+(min*60));\r\n\t\tSystem.out.println(\"H:M:S format is:\");\r\n\t\tSystem.out.println(hr+\":\"+min+\":\"+sec);\r\n\r\n\t}", "static String timeConversion(String s) {\n if(s.indexOf('P') >= 0 && s.substring(0, 2).equals(\"12\")){\n }\n else if(s.indexOf('P') >= 0){\n Integer n = Integer.parseInt(s.substring(0, 2));\n s = removeHour(s);\n n += 12;\n String hour = Integer.toString(n);\n s = hour + s;\n }\n else if (s.indexOf('A') >= 0 && s.substring(0, 2).equals(\"12\")){\n s = \"00\" + s.substring(2);\n }\n return removeHourFormat(s);\n }" ]
[ "0.6474335", "0.63276905", "0.61444616", "0.61444414", "0.6036842", "0.5951158", "0.5923497", "0.59002167", "0.58312565", "0.58045167", "0.57501584", "0.5737751", "0.5712253", "0.5653274", "0.5653274", "0.56355226", "0.56326634", "0.56326634", "0.56041557", "0.5595833", "0.5593354", "0.5589477", "0.558371", "0.55787385", "0.55715114", "0.5562841", "0.5559133", "0.5540999", "0.55358315", "0.5518649", "0.551279", "0.5509127", "0.5501547", "0.5498988", "0.5497138", "0.5492973", "0.549045", "0.5476116", "0.547501", "0.54460984", "0.5429024", "0.54179037", "0.54177725", "0.54163986", "0.5416145", "0.5415963", "0.5412548", "0.5405257", "0.5403454", "0.5400108", "0.5392583", "0.5377055", "0.5376937", "0.5375668", "0.53714484", "0.5364525", "0.535969", "0.53546363", "0.53519285", "0.53471965", "0.53395563", "0.53367496", "0.53354585", "0.5324722", "0.53190076", "0.5310939", "0.5309654", "0.5309223", "0.5303523", "0.52963156", "0.52920276", "0.5285295", "0.5279557", "0.52778167", "0.5275626", "0.52755886", "0.52755886", "0.52755886", "0.52755886", "0.52755886", "0.52755886", "0.52755886", "0.52755886", "0.52755886", "0.52755886", "0.52755886", "0.52755886", "0.5268761", "0.5264743", "0.52604145", "0.52568054", "0.52560747", "0.5252495", "0.52517986", "0.52516186", "0.52466834", "0.5242499", "0.5242263", "0.52370214", "0.52355605", "0.52345407" ]
0.0
-1
assert input: ["A,E,N,S", "S,H,N", "E,N", "H", "N"]
static List<String> costOfModules(String[] input) { if (input == null || input.length == 0) return null; String[] allModules = new String[input.length]; Map<String, Set<String>> map = revertMappings(input, allModules); // sort all modules Arrays.sort(allModules); Map<String, Boolean> visited = new HashMap<>(); List<String> resultList = new ArrayList<>(); for (String module : allModules) { // visited used to avoid cycle dependencies initVisited(visited, allModules); resultList.add(module + "," + dfs(module, map, visited)); visited.clear(); } return resultList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\n\t\tString s1 = (k.replace(\"[\", \"\").replace(\"]\", \"\"));\r\n\t\tString s2 = (s1.replace(\",\", \"\"));\r\n\t\tString s3 = s2.replaceAll(\"\\\\s\", \"\");\r\n\t\t//String stringss = strings.toString();\r\n\t\t//String[] stringss = strings.replaceAll(\"\\\\s\", \"\").split(\"\");\r\n\t\t\r\n\t\tint Startindex = 0;\r\n\t\tint Endindex = 0;\r\n\t\tArrayList<String> ai = new ArrayList<String>();\r\n\t\tfor (int i =0;i<=strings.length-1;i++) {\r\n\t\t\tint result = Integer.parseInt(strings[i]);\r\n\t\t\t\r\n\t\t\tif (result==1 && !start) {\r\n\t\t\t\t\r\n\t\t\t\tstart = true;\r\n\t\t\t\tStartindex = i;\r\n\t\t\t\t\r\n\t\t\t}else if (result==1 && start) {\r\n\t\t\t\tstart = false;\r\n\t\t\t\tEndindex = i;\r\n\t\t\t\ts = s3.substring(Startindex, Endindex+1);\r\n\t\t\t\tai.add(s);\r\n\t\t\t\ti =i-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\nSystem.out.println(ai);\r\n\t}", "@Test\n\tpublic void common() {\n\t\tString testString = \"Monday,Tuesday,Thursday,Friday,,\";\n\t\tIterable<String> parts = Splitter.on(\",\").split(testString);\n\t\tfor (String s : parts)\n\t\t\tSystem.out.println(s);\n\t}", "static List<Intervall> handleInput(String input) {\n\t\tList<Intervall> listIntervall = new ArrayList<>();\n\t\tif (input.length() > 0) {\n\t\t\tString[] inputArray = input.split(\" \");\n\n\t\t\tfor (String s : inputArray) {\n\t\t\t\tString sTrimmed = s.substring(1, s.length() - 1);\n\t\t\t\tString[] inputValues = sTrimmed.split(\",\");\n\t\t\t\tlistIntervall.add(new Intervall(Integer.parseInt(inputValues[0]), Integer.parseInt(inputValues[1])));\n\t\t\t}\n\t\t}\n\t\treturn listIntervall;\n\t}", "@Test\n void labTask() {\n String s = \"abczefoh\";\n List<String> result = StringSplitter.labTask(s);\n\n String first = result.get(0);\n assertEquals(3, first.length());\n assertEquals('a', first.charAt(0));\n assertFalse(\"abc\".contains(String.valueOf(first.charAt(1))));\n assertEquals('c', first.charAt(2));\n\n String second = result.get(1);\n assertEquals(2, second.length());\n assertEquals('o', second.charAt(0));\n assertFalse(\"oh\".contains(String.valueOf(second.charAt(1))));\n\n String third = result.get(2);\n assertEquals(3, third.length());\n assertEquals('z', third.charAt(0));\n assertFalse(\"zef\".contains(String.valueOf(second.charAt(1))));\n assertEquals('f', third.charAt(2));\n }", "public static String buildCommaSeperatedValues(ArrayList input) throws Exception{\r\n\t\tString retString = \"\";\r\n\t\tif(input != null){\r\n\t\tfor(int i=0; i<input.size(); i++){\r\n\t\t\tretString = retString + \",\" +input.get(i);\r\n\t\t}\r\n\t\tretString = retString.substring(1);\r\n\t\t}\r\n\t\treturn retString;\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n int n=Integer.parseInt(br.readLine());\r\n String[] strings=br.readLine().split(\",\");\r\n //System.out.println( printNoofUniqueStrings(n,strings));\r\n System.out.println(printAnswer(n,strings));\r\n \r\n /*List<String> list=new LinkedList<String>();\r\n //list.add(\"def\");\r\n //list.add(\"abc\");\r\n //list.remove(\"abc\");\r\n //list.add(0, \"abc\");\r\n \r\n list.add(\"2\");\r\n list.add(\"5\");\r\n list.add(\"9\");\r\n \r\n list.remove(\"5\");\r\n list.add(0,\"5\");\r\n \r\n for(String a:list){\r\n \tSystem.out.println(a);\r\n }*/\r\n\t}", "public void question4(List<String> input){\n Set<String> s = new HashSet<>(input);\n }", "public static Set<String> commaDelimitedStringToSet(String s) {\n Set<String> set = new HashSet<String>();\n String[] split = s.split(\",\");\n for (String aSplit : split) {\n String trimmed = aSplit.trim();\n if (trimmed.length() > 0)\n set.add(trimmed);\n }\n return set;\n }", "private ArrayList parseStringToList(String data){\n ArrayList<String> result = new ArrayList<String>();\n String[] splitResult = data.split(\",\");\n for(String substring : splitResult){\n result.add(substring);\n }\n return result;\n }", "public static void main(String[] args) {\n\t\t\n\t\tString listS=\"[1, 2, 3, 5, 4, 6, 9, 7, 8, 0]\";\n//\t\tString s4=listS.substring(1, listS.length()-1);\n//\t\tSystem.out.println(s4);\n//\t\tString s5=s4.replace(\", \", \"\");\n//\t\tSystem.out.println(s5);\n//\t\tSystem.out.println(s5.contains(\"1234\"));\n//\t\tSystem.out.println(s5.contains(\"1235\"));\n\t\t\n//\t\tString[] sss =listS.split(\"\\\\[|,\\\\s|\\\\]\");\n//\t\tfor(String tmp:sss) {\n//\t\t\tSystem.out.println(tmp);\n//\t\t}\n\t\t\n\t\tString rlistS=listS.replaceFirst(\"[4567]\", \"x\");\n\t\tSystem.out.println(rlistS);\n\t}", "@Test\n public void removeDuplicatesFromString() {\n\n assertEquals(\"IAMDREW\", Computation.removeDuplicates(\"IIIAAAAMDREEEWW\"));\n }", "public static void main (String[]args){\n String[] test = {\"1, 3, 4, 7, 13\", \"1, 2, 4, 13, 15\"};\n Stream<String> testStrings = Arrays.stream(test);\n testStrings.map(s -> s.split(\",\"))\n .flatMap(Arrays::stream).distinct()\n .collect(Collectors.toList())\n .forEach(System.out::print);\n //FindIntersection(test);\n //System.out.println(LongWord(test));\n\n }", "public List<String> GetAssegnamentiInCorso() {\n String str = \"Guillizzoni-Coca Cola Spa1-DRYSZO,Rossi-Coca Cola Spa2-DRYSZ2\";\n StringaAssegnamenti = str;\n StringaAssegnamenti = \"\";\n \n\tList<String> items = Arrays.asList(str.split(\"\\\\s*,\\\\s*\"));\n return items;\n }", "public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testFetchMappedValuesForInValidDataNotConsecutive() {\n\t\tString input = \"2041\";\n\t\tList<String> expectedOutput = Arrays.asList(\"A,B,C\", \"0\", \"G,H,I\", \"1\");\n\t\tList<String> actualOutput = GeneralUtility.fetchMappedValues(input);\n\t\tAssert.assertArrayEquals(expectedOutput.toArray(), actualOutput.toArray());\n\t}", "public List<PairOfInts> convertInputToPairsOfNumbers(String input) {\n\t\tList<PairOfInts> pairsOfIntsList = new ArrayList<PairOfInts>();\n\t\tif(input != null) {\n\t\t\tList<String> list = Stream.of(input\n\t\t\t\t\t.split(\"]\"))\n\t\t\t\t\t.map(line -> line.replace(\"{\", \"\"))\n\t\t\t\t\t.map(line -> line.replace(\"[\", \"\"))\n\t\t\t\t\t.map(line -> line.replace(\"]\", \"\"))\n\t\t\t\t\t.map(line -> line.replace(\"}\", \"\"))\n\t\t\t\t\t.map(line -> line.replace(\", \", \"\"))\n\t\t\t\t\t.map(line -> line.trim())\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\n\t\t\tfor(String s : list) {\n\t\t\t\tString[] numberPair = s.split(\",\");\n\t\t\t\tif((numberPair != null) && (!numberPair[0].equals(\"\"))) {\n\t\t\t\t\tPairOfInts pairOfInts = new PairOfInts();\n\t\t\t\t\tpairOfInts.setNumber1(Integer.parseInt(numberPair[0]));\n\t\t\t\t\tpairOfInts.setNumber2(Integer.parseInt(numberPair[1]));\n\t\t\t\t\tpairsOfIntsList.add(pairOfInts);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn pairsOfIntsList;\n\t}", "public static void main(String a[])throws IOException\n {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n LinkedHashSet set = new LinkedHashSet();\n String num = reader.readLine();\n String arr[] = num.split(\",\");\n for( int i=0; i<arr.length; i++ ){\n set.add(arr[i]);\n }\n System.out.println(set);\n }", "public static void main(String a[])throws IOException\n {\n BufferedReader b= new BufferedReader(new InputStreamReader(System.in));\n TreeSet<String> t = new TreeSet<String>();\n String mon = b.readLine();\n String[] arr = mon.split(\",\");\n for(int i = 0;i<arr.length;i++)\n {\n t.add(arr[i]);\n }\n System.out.println(t);\n Object arr1[] = t.toArray();\n int c = arr1.length-1;\n while(t.isEmpty()!=true)\n {\n Object m = arr1[c];\n t.remove(m);\n System.out.println(t);\n --c;\n }\n \n }", "private List<String> splitCommaSeparatedString(String defaults) {\r\n\t\tString[] split = defaults.split(\",\");\r\n\t\tList<String> keyList = new LinkedList<String>();\r\n\t\tfor (int i = 0; i < split.length; i++) {\r\n\t\t\tkeyList.add(split[i].trim());\r\n\t\t}\r\n\t\treturn keyList;\r\n\t}", "private Set<String> parseStringToSet(final String data) {\n String[] splits;\n\n if (data != null && data.length() > 0) {\n splits = data.split(\",\");\n } else {\n splits = new String[] {};\n }\n\n Set<String> set = new HashSet<String>();\n if (splits.length > 0) {\n for (String split : splits) {\n set.add(split.trim());\n }\n }\n\n return set;\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int N = Integer.parseInt(in.nextLine());\n HashSet<Character> first = new HashSet<Character>();\n HashSet<Character> second = new HashSet<Character>();\n int i=0;\n char temp = 'a';\n for(temp='a';temp<='z';temp++){\n \t first.add(temp);\n }\n int j;\n while(i<N){\n \t second.clear();\n \t char[] stringArray = in.nextLine().toCharArray();\n \t for(j=0;j<stringArray.length;j++){\n \t\t second.add(stringArray[j]); \n \t }\n \t first.retainAll(second);\n \t i++;\n }\n System.out.println(first.size());\n }", "@Test\n\tpublic void NotExamtestListToString() {\n\t\t\n\t\tassertEquals(\"[a,b,c]\",listToString(list));\n\t\tassertEquals(\"[a,b,c,aaa,a,a,d,a]\",listToString(list2));\n\t\tassertEquals(\"[]\",listToString(empty));\n\t\tassertEquals(\"[hello]\",listToString(onlyOne));\n\n\t}", "@Test\n\tpublic void testFetchMappedValuesForInValidData() {\n\t\tString input = \"231\";\n\t\tList<String> expectedOutput = Arrays.asList(\"A,B,C\", \"D,E,F\", \"1\");\n\t\tList<String> actualOutput = GeneralUtility.fetchMappedValues(input);\n\t\tAssert.assertArrayEquals(expectedOutput.toArray(), actualOutput.toArray());\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}", "@Test\n public void testRedis() {\n\n String str = \"1\";\n\n String[] strings = StrUtil.splitToArray(str, ',');\n\n System.out.println(strings[0]);\n }", "private boolean anyOfSetInString(String inputStr, Set<String> items) {\n\n for (String s : items) {\n if (inputStr.contains(s)) {\n // Didn't use String.equals() as user can have the number saved with or without country code\n\n return true;\n }\n }\n\n return false;\n }", "public void processList(List<String> inList);", "void LoesungAusgeben (String strA) { createOutput ()\n //\n // println(\"strA = \"+strA);\n //\n String[] list1 = { \n strA\n };\n list1=split(strA, ',');\n // now write the strings to a file, each on a separate line\n // saveStrings (\"c:\\\\soft\\\\SolProcess\\\\result\" + Date1() + \"_\" + Now1() + \".txt\", list1);\n // saveStrings (\"result\" + Date1() + \"_\" + Now1() + \".txt\", list1);\n saveStrings (\"result.txt\", list1);\n}", "public static Boolean validateInput(String str) {\n String[] lines = str.split(\"\\n\");\r\n // System.out.println(\"lines array:\"+lines.length);\r\n Boolean validate = true;\r\n String[] lineParameters;\r\n int countFor =0;\r\n for (String line : lines) {\r\n if(countFor > 1){\r\n lineParameters = line.split(\",\");\r\n\r\n if (lineParameters.length != 5) {\r\n validate = false;\r\n break;\r\n }\r\n }\r\n countFor++;\r\n \r\n\r\n }\r\n return validate;\r\n }", "public static void main(String args[]){\n \"abc\".chars().forEach(System.out::println);\n\n\n //breaks a String into sub-strings according to specified RegEx:\n Stream<String> stream =\n Pattern.compile(\", \").splitAsStream(\"a, b, c\");\n\n stream.forEach(System.out::println);\n\n }", "public void removeAll(String c) {\r\n int[] elements = new int[(c.length() / 2) + 1];\r\n if (containsAll(c)) {\r\n for (int i = 0; i < elements.length; i++) {\r\n elements[i] = Integer.parseInt(c.substring(0, c.indexOf(\",\")));\r\n c = c.substring((c.indexOf(\",\") + 1));\r\n remove(elements[i]);\r\n }\r\n } else {\r\n throw new RuntimeException(\"some or all elements dont exist in List.\");\r\n }\r\n }", "public InputArray(String sInputList) \n\t{\n\t\t//String array for storing each element after ectracting them from the input string\n\t\tString[] splitString = new String[sInputList.length()];\n\t\t\n\t\t//Gives the number of elements in the input List \n\t\tint len = 0;\n\t\t\n\t\t//Checking the input string for presence of spaces\n\t\tfor(int i=0; i < sInputList.length(); i++)\n\t\t{\n\t\t\t\n\t\t\t//Checking whether the character at the current position is a space or not\n\t\t\tif(sInputList.charAt(i) != ' ')\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//Extracting each element from the string and storing them in a string array\n\t\t\t\tsplitString[len] = sInputList.substring(i, sInputList.indexOf(' ', i) == -1 ? sInputList.length() : sInputList.indexOf(' ', i));\n\t\t\t\t\n\t\t\t\t//Updating the value of i\n\t\t\t\ti = sInputList.indexOf(' ', i) == -1 ? sInputList.length() : sInputList.indexOf(' ', i);\n\t\t\t\t\n\t\t\t\t//Incrementing len\n\t\t\t\tlen++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Instantiating the array with size equal to len\n\t\tinputArray=new int[len];\n\t\t\n\t\t//Getting the Integer value of the element which are stored as string \n\t\t//in the string array and assigning them to the List array\n\t\tfor(int i = 0; i < len; i++)\n\t\t{\n\t\t\tinputArray[i] = Integer.parseInt(splitString[i]);\n\t\t}\n\t}", "private String commaDelimited(String strs[]) {\n StringBuffer sb = new StringBuffer();\n if (strs.length > 0) {\n sb.append(Utils.encToURL(strs[0]));\n for (int i=1;i<strs.length;i++) sb.append(\",\" + Utils.encToURL(strs[i]));\n }\n return sb.toString();\n }", "public static List<String> formPossibleValues(String enumeraion){\n\t\tList<String> ret = new ArrayList<String>();\n\t\tfor (String value : enumeraion.split(\";\"))\n\t\t\tret.add(value);\n\t\t\n\t\treturn ret;\n\t}", "ArrayList<String> createList(String finalInput);", "public static String[] split(String s,boolean check)\r\n\t{\r\n\t\tif(check)\r\n\t\t{\r\n\t\t\tif(!checksum(s))\r\n\t\t\t\tthrow new OpenNMEAException(\"Invalid or missing checksum\");\r\n\t\t\ttrim(s);\r\n\t\t}\r\n\t\ts+='*';\r\n\t\tString[] a=s.split(\",\");\r\n\t\ta[a.length-1]=a[a.length-1].substring(0,a[a.length-1].length()-1);\r\n\t\treturn a;\r\n\t}", "private List<String> normalizeCsv(String text) {\n logger.info (\"Text = \" + text);\n List<String> rr = new ArrayList<> ();\n\n StringBuilder line = new StringBuilder ();\n for (int i = 0; i < text.length (); i++) {\n\n String curr = \"\" + text.charAt (i);\n line.append (curr);\n try {\n\n if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"1 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"2 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"3 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"4 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"5 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"6 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"7 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n }\n\n } catch (Exception ex) {\n //System.out.println(ex.getMessage());\n }\n\n }\n return rr;\n }", "public boolean containsAll(String c) {\r\n int[] elements = new int[(c.length() / 2) + 1];\r\n for (int i = 0; i < elements.length; i++) {\r\n elements[i] = Integer.parseInt(c.substring(0, c.indexOf(\",\")));\r\n if (!contains(elements[i])) {\r\n return false;\r\n }\r\n c = c.substring((c.indexOf(\",\") + 1));\r\n }\r\n return true;\r\n }", "abstract List<String> splitStringToCollection(String inputString, String separator);", "private String[] commaDelimited(String str) {\n StringTokenizer st = new StringTokenizer(str,\",\");\n String strs[] = new String[st.countTokens()];\n for (int i=0;i<strs.length;i++) strs[i] = Utils.decFmURL(st.nextToken());\n return strs;\n }", "private static String[] sepInst(String inst){\n\n String[] separated = new String[3];\n separated[0] = inst.substring(0, inst.indexOf(' '));\n if(-1 == inst.indexOf(',')){//enters if when only one variable\n separated[1] = inst.substring(inst.indexOf(' ')+1, inst.length());\n }else{//enters else when only when two variables\n separated[1] = inst.substring(inst.indexOf(' ')+1, inst.indexOf(','));\n separated[2] = inst.substring(inst.indexOf(',')+2, inst.length());\n }//end ifelse\n\n return separated;\n }", "@Test\n public void testSplitOnWhitespaceAndCommas() {\n assertEquals(0, Strings.splitOnWhitespaceAndCommas(null).size());\n assertEquals(0, Strings.splitOnWhitespaceAndCommas(\"\").size());\n assertEquals(0, Strings.splitOnWhitespaceAndCommas(\" ,, \\n,\\t, ,, ,\").size());\n \n List<String> split = Strings.splitOnWhitespaceAndCommas(\" ,, hello, \\nthere\\t,,\");\n assertEquals(2, split.size());\n assertEquals(\"hello\", split.get(0));\n assertEquals(\"there\", split.get(1));\n }", "public void testToString() {\r\n assertEquals(\"[]\",\r\n list.toString());\r\n list.add(\"A\");\r\n assertEquals(\"[A]\",\r\n list.toString());\r\n list.add(\"B\");\r\n assertEquals(\"[A, B]\",\r\n list.toString());\r\n }", "@Test\n public void hasSameItems() throws IOException {\n Assert.assertEquals(true, Utils.hasSameItems(\"a,b,c\", \"d,e,c,f\"));\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String[] list = scanner.nextLine().split(\" \");\n int count = 0;\n for (int i = 0; i < list.length - 1; i++) {\n if (list[i + 1].compareTo(list[i]) >= 0) {\n count++;\n }\n }\n if (count == list.length - 1) {\n System.out.println(\"true\");\n } else {\n System.out.println(\"false\");\n }\n }", "public static List toListOfStringsDelimitedByCommaOrSemicolon(String s) {\n if (s == null) {\n return Collections.EMPTY_LIST;\n }\n\n List results = new ArrayList();\n // include empty last one, cft. http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#split%28java.lang.String,%20int%29\n String[] terms = s.split(SEPARATOR,-1);\n\n for (int i = 0; i < terms.length; i++) {\n //this has empty string if nothing is found\n String term = terms[i].trim();\n results.add(term);\n }\n\n return results;\n }", "public static String[] parseCommaSeparatedList(String line) {\n \tArrayList myList = new ArrayList();\n \t\n \tString myLine = new String(line);\n \t\n \twhile(myLine.contains(\",\")) {\n \t\tString item = myLine.substring(0, myLine.indexOf(\",\"));\n \t\titem = StringUtilities.removeEdgeWhitespace(item);\n \t\tmyList.add(item);\n \t\tmyLine = myLine.substring((myLine.indexOf(\",\") + 1));\n \t}\n \tmyLine = StringUtilities.removeEdgeWhitespace(myLine);\n \tif(myLine.compareTo(\"\") != 0) myList.add(myLine);\n\n \tString[] list = new String[myList.size()];\n \tfor(int i = 0; i < myList.size(); i++) {\n \t\tlist[i] = new String((String)myList.get(i));\n \t}\n \t\n \treturn list;\n }", "public void addAll(String c) {\r\n int[] elements = new int[(c.length() / 2) + 1];\r\n for (int i = 0; i < elements.length; i++) {\r\n if (NumItems == MAX_LIST) {\r\n throw new ListFullException(\"List is Full!\");\r\n }\r\n elements[i] = Integer.parseInt(c.substring(0, c.indexOf(\",\")));\r\n c = c.substring((c.indexOf(\",\") + 1));\r\n items[++NumItems] = elements[i];\r\n }\r\n }", "@Test\n void splitAndReplace_WorksCorrectly_abcdefgh() {\n String s = \"abcdefgh\";\n List<String> result = StringSplitter.splitAndReplace(s, 3, 1);\n assertEquals(3, result.size());\n\n String first = result.get(0);\n assertEquals(3, first.length());\n assertEquals('a', first.charAt(0));\n assertFalse(\"abc\".contains(String.valueOf(first.charAt(1))));\n assertEquals('c', first.charAt(2));\n\n String second = result.get(1);\n assertEquals(3, second.length());\n assertEquals('d', second.charAt(0));\n assertFalse(\"def\".contains(String.valueOf(second.charAt(1))));\n assertEquals('f', second.charAt(2));\n\n String third = result.get(2);\n assertEquals(2, third.length());\n assertEquals('g', third.charAt(0));\n assertFalse(\"gh\".contains(String.valueOf(second.charAt(1))));\n }", "private String[] BreakDiscoveryMessageToStrings(String input) {\n return input.split(\"[\" + Constants.STANDART_FIELD_SEPERATOR + \"]\"); //parse the string by the separator char\n }", "@Test\n void splitAndReplace_WorksCorrectly_abcdefg() {\n String s = \"abcdefg\";\n List<String> result = StringSplitter.splitAndReplace(s, 3, 1);\n assertEquals(3, result.size());\n\n String first = result.get(0);\n assertEquals(3, first.length());\n assertEquals('a', first.charAt(0));\n assertFalse(\"abc\".contains(String.valueOf(first.charAt(1))));\n assertEquals('c', first.charAt(2));\n\n String second = result.get(1);\n assertEquals(3, second.length());\n assertEquals('d', second.charAt(0));\n assertFalse(\"def\".contains(String.valueOf(second.charAt(1))));\n assertEquals('f', second.charAt(2));\n\n String third = result.get(2);\n assertEquals(1, third.length());\n assertEquals('g', third.charAt(0));\n }", "@Test\n public void testFindOrientedPairs() {\n System.out.println(\"findOrientedPairs\");\n \n CCGeneticDrift instance = new CCGeneticDrift();\n String input = \"6 3 1 6 5 -2 4\";\n List<Integer> numbers = instance.inputStringToIntegerList(input);\n String expResult = \"[1 -2, 3 -2]\";\n List result = instance.findOrientedPairs(numbers);\n assertEquals(result.toString(), expResult);\n assertEquals(result.size(), 2);\n }", "public static String[] split(String value) {\r\n\t\tif(value == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn value.trim().split(\",\");\r\n\t}", "public static void main(String[] args) {\n List<String> names = new ArrayList<>();\n StringBuilder sb = new StringBuilder();\n\n names.add(\"melissa\");\n names.add(\"joile\");\n names.add(\"clemence\");\n names.add(\"daniko\");\n for (String name : names) {\n sb.append(name + \",\");\n }\n System.out.println(\"index of last , \" + sb.lastIndexOf(\",\"));\n sb.replace(sb.lastIndexOf(\",\"), sb.lastIndexOf(\",\")+1, \"\");\n System.out.println(\"sb = \" + sb);\n }", "static public String [] parseList (String listString, String startToken, String endToken,\n String delimiter)\n{\n String s = listString.trim ();\n if (s.startsWith (startToken) && s.endsWith (endToken)) {\n s = s.substring (1, s.length()-1); \n return s.split (delimiter);\n }\n else {\n String [] unparseableResult = new String [1];\n unparseableResult [0] = listString;\n return unparseableResult;\n }\n \n /*********************\n StringTokenizer strtok = new StringTokenizer (deparenthesizedString, delimiter);\n int count = strtok.countTokens ();\n for (int i=0; i < count; i++)\n list.add (strtok.nextToken ());\n }\n else\n list.add (listString);\n\n return (String []) list.toArray (new String [0]);\n **********************/\n\n\n}", "@Test\n void splitAndReplace_WorksCorrectly_abcdefghi() {\n String s = \"abcdefghi\";\n List<String> result = StringSplitter.splitAndReplace(s, 3, 1);\n assertEquals(3, result.size());\n\n String first = result.get(0);\n assertEquals(3, first.length());\n assertEquals('a', first.charAt(0));\n assertFalse(\"abc\".contains(String.valueOf(first.charAt(1))));\n assertEquals('c', first.charAt(2));\n\n String second = result.get(1);\n assertEquals(3, second.length());\n assertEquals('d', second.charAt(0));\n assertFalse(\"def\".contains(String.valueOf(second.charAt(1))));\n assertEquals('f', second.charAt(2));\n\n String third = result.get(2);\n assertEquals(3, third.length());\n assertEquals('g', third.charAt(0));\n assertFalse(\"gh\".contains(String.valueOf(second.charAt(1))));\n assertEquals('i', third.charAt(2));\n }", "void mo54419a(List<String> list);", "public static ArrayList<Song> convertToSongs(ArrayList<String> songsStrings) {\r\n ArrayList<Song> songs = new ArrayList<>();\r\n songsStrings.remove(0);\r\n for(String songString : songsStrings) {\r\n String[] parts = songString.split(\",\");\r\n int ranks = Integer.valueOf(parts[0]);\r\n String songN = parts[1];\r\n String artist = parts[2];\r\n int views = Integer.valueOf(parts[3]);\r\n songs.add(new Song(ranks, songN, artist, views));\r\n }\r\n\r\n//Sorting Song names\r\n\r\n Collections.sort(songs, new Comparator<Song>() {\r\n @Override\r\n public int compare(Song o1, Song o2) {\r\n return o1.compareTo(o2);\r\n } \r\n });\r\n return songs;\r\n}", "private static Set<String> getFriendsFromString(String line, SocialNetwork r) {\n Set<String> friends = new HashSet<>();\n String[] splitString = line.split(\",\");\n for (String string : splitString) {\n\n friends.add(string);\n }\n return friends;\n }", "public static String[] split(String string) {\n String[] result = string.split(\",\");\n for (int i = 0; i < result.length; i++) {\n result[i] = result[i].trim();\n }\n return result;\n }", "static int twoCharaters(String s) {\n\t\tList<String> list = Arrays.asList(s.split(\"\"));\n\t\tHashSet<String> uniqueValues = new HashSet<>(list);\n\t\tSystem.out.println(uniqueValues);\n\t\tString result;\n\t\twhile(check(list,1,list.get(0))) {\n\t\t\tresult = replace(list,1,list.get(0));\n\t\t\tif(result != null) {\n\t\t\t\tSystem.out.println(result);\n\t\t\t\ts = s.replaceAll(result,\"\");\n\t\t\t\tlist = Arrays.asList(s.split(\"\"));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t\treturn 5;\n }", "private ArrayList<Card> readHandString(String handLine)\n {\n ArrayList<Card> hand = new ArrayList<Card>();\n Scanner handLineScanner = new Scanner(handLine);\n handLineScanner.useDelimiter(\",\");\n while (handLineScanner.hasNext())\n {\n String cardString = handLineScanner.next();\n Card card = readCardString(cardString);\n hand.add(card);\n }\n handLineScanner.close();\n return hand;\n }", "static public boolean isList (String listString, String startToken, String endToken,\n String delimiter)\n{\n String s = listString.trim ();\n Vector list = new Vector ();\n\n if (s.startsWith (startToken) && s.endsWith (endToken)) \n return true;\n else\n return false;\n\n\n}", "private String constructList(String[] elements) throws UnsupportedEncodingException {\n if (null == elements || 0 == elements.length)\n return null;\n StringBuffer elementList = new StringBuffer();\n\n for (int i = 0; i < elements.length; i++) {\n if (0 < i)\n elementList.append(\",\");\n elementList.append(elements[i]);\n }\n return elementList.toString();\n }", "public void BreakInput(String l){\n l+=\" \";\n int k = 0;\n for(int i =0; i<size; i++){\n String temp =\"\";\n while(!(\" \".equals(String.valueOf(l.charAt(k))))){\n temp+=String.valueOf(l.charAt(k));\n k++;\n }\n k++;\n temps.add(i,temp);\n }\n }", "private static String[] checkInput(String input) throws Exception{\n String[] in = input.trim().split(\" \");\n\n if(in.length == 0){\n throw new CommandException(ExceptionEnum.INCORRECT_COMMAND_EXCEPTION);\n }\n\n if(CommandEnum.getCommandEnumFrom(in[0]) == null){\n throw new CommandException(ExceptionEnum.INCORRECT_COMMAND_EXCEPTION);\n }\n\n if(isSpecificCommandENum(in[0],BYE)){\n return in;\n }\n if(isSpecificCommandENum(in[0],TERMINATE)){\n return in;\n }\n\n if(in.length < MIN_PARAM){\n throw new CommandException(ExceptionEnum.LESS_INPUT_EXCEPTION);\n }\n\n if(in.length > MAX_PARAM){\n throw new CommandException(ExceptionEnum.EXTRA_INPUT_EXCEPTION);\n }\n\n //check input value\n for(int i = 1; i < in.length; i++){\n try{\n Integer.parseInt(in[i]);\n }catch(NumberFormatException e){\n throw new CommandException(ExceptionEnum.INVALID_INPUT_EXCEPTION);\n }\n }\n\n return in;\n }", "private static void skipSplitAdd(String s, List<String> list) {\n String tmp[] = s.split(\" \");\n\n for (int i = 1; i < tmp.length; i++) {\n list.add(tmp[i]);\n\n // System.out.println(tmp[i]);\n }\n }", "private static List<String> convertCommaDelimitedStringToList(String delimitedString) {\n\n\t\tList<String> result = new ArrayList<String>();\n\n\t\tif (!StringUtils.isEmpty(delimitedString)) {\n\t\t\tresult = Arrays.asList(StringUtils.delimitedListToStringArray(delimitedString, \",\"));\n\t\t}\n\t\treturn result;\n\n\t}", "protected List<String> convertToList(final String data) {\n\t\tif (data == null || data.length() == 0) {\n\t\t\treturn new ArrayList<String>();\n\t\t}\n\t\tString[] result = data.split(\",\");\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor (String val : result) {\n\t\t\tlist.add(val.trim());\n\t\t}\n\t\treturn list;\n\t}", "private static String[] tokenizeInput(String input) {\r\n\t\tArrayList<String> tokens = new ArrayList<String>(8);\r\n\t\t\r\n\t\tScanner inputScanner = new Scanner(input);\r\n\t\twhile (inputScanner.hasNext()) {\r\n\t\t\ttokens.add(inputScanner.next());\r\n\t\t}\r\n\t\treturn tokens.toArray(new String[tokens.size()]);\r\n\t}", "@VisibleForTesting\n\tList<String> parseKeys(List<String> keys) {\n\t\t// Assert.notEmpty(keys);\n\t\tList<String> parsedKeys = new ArrayList<String>();\n\t\tfor (String key : keys) {\n\t\t\tparsedKeys.addAll(Arrays.asList(StringUtils.split(\n\t\t\t\t\tStringUtils.trim(key), \",\")));\n\t\t}\n\t\treturn parsedKeys;\n\t}", "public List<String> splitCommaSepareatedValues(String commaSepareatedValues) {\n\t\treturn Arrays.asList(commaSepareatedValues.split(\",\"));\n\t}", "public void splitter(String values) {\n\n\t\tfor(int i=0; i < values.length(); i++) {\n\t\t\tnewString += values.charAt(i);\n\n\t\t\tif(semi == values.charAt(i)) {\n\t\t\t\tnewString = newString.replaceAll(\";\", \"\");\n\t\t\t\tnewString = newString.replaceAll(\"\\n\", \"\");\n\t\t\t\tsplittedString.add(newString);\n\t\t\t\tnewString = \"\";\n\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0; i < splittedString.size()-1; i++) {\n\t\t\tsection = splittedString.get(i);\n\t\t\tString[] dev = section.split(\",\");\n\t\t\tboolean validValues = true;\n\t\t\tfor(int x1 = 0; x1 < dev.length; x1+=3) {\n\t\t\t\tString xx1 = dev[x1];\n\t\t\t\tif(isInteger(xx1) && validValues) {\n\t\t\t\t\tx.add(Integer.parseInt(xx1));\n\t\t\t\t} else {\n\t\t\t\t\tvalidValues = false;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tfor(int y1= 1; y1 <dev.length; y1+=3) {\n\t\t\t\tString yy1 = dev[y1];\n\t\t\t\tif(isInteger(yy1) && validValues) {\n\t\t\t\t\ty.add(Integer.parseInt(yy1));\n\t\t\t\t} else {\n\t\t\t\t\tvalidValues = false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tfor(int z1= 2; z1 <dev.length; z1+=3) {\n\t\t\t\tString zz1 = dev[z1];\n\t\t\t\tif(isInteger(zz1) && validValues) {\n\t\t\t\t\tz.add(Integer.parseInt(zz1));\n\t\t\t\t} else {\n\t\t\t\t\tvalidValues = false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "void mo100443a(List<String> list);", "@Test\n public void testCreateRouterArrayList() throws Exception {\n System.out.println(\"createRouterArrayList\");\n //Scanner input = new Scanner(System.in);\n java.io.File file = new java.io.File(\"sample.csv\");\n Scanner input = new Scanner(file);\n ArrayList<String> expResult = new ArrayList<>(Arrays.asList(\n \"A.example.COM,1.1.1.1,NO,11,Faulty fans\",\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n \"C.EXAMPLE.COM,1.1.1.3,no,12.1,\",\n \"d.example.com,1.1.1.4,yes,14,\",\n \"c.example.com,1.1.1.5,no,12,Case a bit loose\",\n \"e.example.com,1.1.1.6,no,12.3,\",\n \"f.example.com,1.1.1.7,No,12.200,\",\n \"g.example.com,1.1.1.6,no,15.0,Guarded by sharks with lasers on their heads\"\n ));\n ArrayList<String> result = BTRouterPatch.createRouterArrayList(input);\n assertEquals(expResult, result);\n }", "public static void main(String[] args) {\n String[] input = new String[]{\"A,E,N,S\", \"S,H,N\", \"E,N\", \"H\", \"N\"};\n List<String> list = costOfModules(input);\n for (String str : list) {\n System.out.println(str);\n }\n }", "public static void main(String[] args) throws NumberFormatException,IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint T = Integer.parseInt(br.readLine());\n\t\t\n\t\tfor(int test_case=1;test_case<=T;test_case++) {\n\t\t\tArrayList list = new ArrayList<>();\n\t\t\tint N = Integer.parseInt(br.readLine());\n\t\t\tStringBuilder str = new StringBuilder(br.readLine());\n\t\t\tfor(int i=0; i<str.length(); i++) {\n\t\t\t\tfor(int j=i+1;j<=str.length();j++) {\n\t\t\t\tlist.add(str.substring(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.sort(null);\n\t\t\tSystem.out.println(\"#\"+test_case+\" \"+list.get(N-1));\n\t\t}\n\n\t}", "private String[] fixStringArray(String[] input) {\n\n List<String> loutput = new ArrayList<String>();\n\n for (String st : input) {\n if (!\"\".equalsIgnoreCase(st)) {\n loutput.add(st);\n }\n }\n String[] output = new String[loutput.size()];\n for (int i = 0; i < loutput.size(); i++) {\n output[i] = loutput.get(i);\n }\n return output;\n }", "private static String[] transformToUnique(final String... input) {\n final Set<String> inputSet = new HashSet<>(Arrays.asList(input));\n return inputSet.toArray(new String[0]);\n }", "@Test public void testEuropeanComma() {\n char comma = ';';\n int n = random.nextInt(10) + 10;\n String[] src = new String[n];\n for (int i = 0; i < n; i++) {\n src[i] = randomString();\n }\n println(Arrays.toString(src));\n try (CSVUtil.Writer writer = CSVUtil.newWriter(path, comma)) {\n for (String s : src) {\n writer.write(s);\n }\n } catch (IOException e) {\n e.printStackTrace();\n assert false;\n }\n\n try {\n List<String[]> strings = CSVUtil.read(path, comma);\n assert strings.size() == 1;\n println(Arrays.toString(strings.get(0)));\n assert Arrays.toString(src).equals(Arrays.toString(strings.get(0)));\n } catch (IOException e) {\n e.printStackTrace();\n assert false;\n }\n\n try {\n List<String[]> strings = CSVUtil.read(path);\n assert strings.size() == 1;\n println(Arrays.toString(strings.get(0)));\n assert Arrays.toString(src).equals(Arrays.toString(strings.get(0)));\n } catch (IOException e) {\n e.printStackTrace();\n assert false;\n }\n }", "List<String> mo5877c(String str);", "@Test\n public void testStringToList() {\n // test whether empty string converts to empty list\n logger.trace(\"Empty string handled?\");\n String string = \"\";\n List<String> list = Util.stringToList(string);\n Assert.assertEquals(list.size(), 0);\n\n // test whether single space converts to empty list\n logger.trace(\"Single space handled?\");\n string = \" \";\n list = Util.stringToList(string);\n Assert.assertEquals(list.size(), 0);\n\n // test whether single item surrounded by spaces converts to list of size 1\n logger.trace(\"Item surrounded by spaces handled?\");\n string = \" foo \";\n list = Util.stringToList(string);\n Assert.assertEquals(list.size(), 1);\n\n // test whether two item string converts to list of size 2\n logger.trace(\"Two item string handled?\");\n string = \" foo bar \";\n list = Util.stringToList(string);\n Assert.assertEquals(list.size(), 2);\n }", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tString str=s.nextLine();\r\n\t\tchar []ch=str.toCharArray();\r\n\t\tint i;\r\n\t\tint j;\r\n\t\t\r\n\t\tString s1=\"\";\r\n\t\tLinkedHashSet set=new LinkedHashSet();\r\n\t\tfor(i=0;i<ch.length;i++){\r\n\t\t\tset.add(ch[i]);\r\n\t\t}\r\n\t\tfor(Object o:set){\r\n\t\t\ts1=s1+o;\r\n\t\t}\r\n\t\tSystem.out.println(s1);\r\n\t}", "public static void main(String[] args) {\n\t\tString record =\"px123,kingstone,340,1|3|4|1\";\n\t\tString record1 =\"px125,electronics,storege,pendrive,kingstone,340,1|3|4|1\";\n\t\tString record2 =\"px125,electronics,storege,pendrive,kingstone,340\";\n\t\tString what = \"\\\\d+,(\\\\d\\\\|*)+$\";\n\t\tPattern p=Pattern.compile(what);\n\t\tMatcher m=p.matcher(record);\n\t\tif(m.find())\n\t\t{\n\t\t\tSystem.out.println(\"correct\");\n\t\t\tString str[]=m.group().split(\",\");\n\t\t\tSystem.out.println(str[1]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"wrong\");\n\t\t}\n\t\t\n\t}", "public static void sortStringsNumAs( ArrayList<String> lst )\n {\n PredicateStringPair p = (a, b) -> {\n String[] A = a.split(\"\");\n String[] B = b.split(\"\");\n int acount = 0;\n int bcount = 0;\n for (String i : A){\n if (i == \"a\" || i == \"A\"){\n acount += 1;\n }\n }\n for (String i : B){\n if (i == \"a\" || i == \"A\"){\n bcount += 1;\n }\n }\n\n if (acount > bcount) return true;\n else return false;\n };\n sortStrings(lst, p);\n \n }", "static List<String> removeDuplicates(List<String> list) {\n // Store unique items in result.\n List<String> result = new ArrayList<String>();\n // Loop over argument list.\n for (String token : list) {\n if (result.indexOf(token) == -1) { \n result.add(token);\n }\n }\n return result;\n }", "String getStringList();", "private void kbuild(String input) {\n\r\n\t\tArrayList<String> a = new ArrayList<String>();\r\n\t\tHashMap<String, Integer> counts = new HashMap<String, Integer>();\r\n\t\tSet<String> k = new HashSet<String>();\r\n\t\tPattern p = Pattern.compile(\"(\\\\w+)\\\\s*\\\\[([a-zA-Z-0-9,]+)\\\\]\");\r\n\t\tMatcher m = p.matcher(input);\r\n\r\n\t\twhile (m.find()) {\r\n\t\t\tString[] temp = m.group(2).split(\",\");\r\n\r\n\t\t\tfor (int j = 0; j < temp.length; j++) {\r\n\t\t\t\ta.add(temp[j]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < a.size(); i++) {\r\n\t\t\tif (counts.containsKey(a.get(i))) {\r\n\t\t\t\tcounts.put(a.get(i), counts.get(a.get(i)) + 1);\r\n\t\t\t} else {\r\n\t\t\t\tcounts.put(a.get(i), 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\tObject[] ckeys = counts.keySet().toArray();\r\n\t\tfor (int i = 0; i < counts.size(); i++) {\r\n\t\t\tif (counts.get(ckeys[i]) > 1) {\r\n\t\t\t\tk.add((String) ckeys[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tkeys.addAll(k);\r\n\t}", "public static String[] variableList(String s) {\n String[] vl = null;\n if (s == null) {\n return vl;\n }\n String st = s.trim();\n if (st.length() == 0) {\n return new String[0];\n }\n if (st.charAt(0) == '(') {\n st = st.substring(1);\n }\n if (st.charAt(st.length() - 1) == ')') {\n st = st.substring(0, st.length() - 1);\n }\n st = st.replaceAll(\",\", \" \");\n List<String> sl = new ArrayList<String>();\n Scanner sc = new Scanner(st);\n while (sc.hasNext()) {\n String sn = sc.next();\n sl.add(sn);\n }\n vl = new String[sl.size()];\n int i = 0;\n for (String si : sl) {\n vl[i] = si;\n i++;\n }\n return vl;\n }", "@Test(testName = \"splitFunctioanlity\")\n\t public static void splitFunction() \n\t { \n\t String str = \"geekss@for@geekss\"; \n\t String[] arrOfStr = str.split(\"s\", 5); \n\t \n\t for (String a : arrOfStr) \n\t System.out.println(a); \n\t \t}", "@Test\r\npublic void multiplesNumerosSeparadosPorComa() {\r\n try {\r\n assertEquals(Calculadora.add(\"1,6,11,6\"), 24);\r\n assertEquals(Calculadora.add(\"1,2,3,5,6,7,8\"), 32);\r\n assertEquals(Calculadora.add(\"1,4,12,5,20\"), 42);\r\n } catch (Exception ex) {\r\n fail(\"Error probando la calculadora con varios números separados por una coma\");\r\n }\r\n}", "@Test\r\n\tvoid testsplitStringHandout2() {\n\t\tString input = Main.TEXT_2;\r\n\t\tString expected[] = {\"A\",\"long\",\"time\",\"ago\",\"in\",\"a\",\"galaxy\",\"far,\",\"far\",\"away...\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\t\t\r\n\t\tassertEquals(7, Main.maxWordLength(Main.splitString(input)));\r\n\r\n\t}", "public ConsList<String> tryToConsumeInput( ConsList<String> unprocessedInput );", "private String getAntsOnBoard(Board inputBoard) {\n\ninputBoard.sortAntsName();\nString result = \"\";\nfor (int k = 0; k < inputBoard.getAntsOnBoard().size(); k++) {\nresult += inputBoard.getAntsOnBoard().get(k).getName().toLowerCase() + \",\";\n}\n\nif (inputBoard.getAntsOnBoard().size() == 0) {\nresult = \"Eror: No more ants\";\n} else {\nresult = result.substring(0, result.length() - 1);\n}\nreturn result;\n}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\tString a = input.nextLine();//=> untuk mengambil inputan dari user\r\n\t\t\r\n\t\t/*\r\n\t\t *trim() , digunakan untuk menghapus Whitespace sebelum atau sesudah suatu string\r\n\t\t *split, untuk men-split atau membagi string dari suatu karakter tertentu\r\n\t\t *String[]arr => akan menampung hasil dari trim dan split yang telah dilakukan program \r\n\t\t * */\r\n String[]arr = a.trim().split(\"[ !,?._'@]+\");\r\n \r\n /*\r\n * ArrayList<String> berbeda dengan array biasa\r\n * Perbedaannya adalah:\r\n * array biasa apabila kita menghapus/menambah elemen maka tidak akan mengubah ukurannya\r\n * ArrayList , akan berubah ukuran ketika kita menambah atau mengurangi isi dari array\r\n */\r\n ArrayList<String>listOfStrings = new ArrayList<String>(Arrays.asList(arr));\r\n \r\n //untuk mengetahui berapa banyak elemen dari array \r\n System.out.println(listOfStrings.size());\r\n \r\n for(String str:listOfStrings){\r\n System.out.println(str);\r\n }\r\n\r\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t int n = sc.nextInt();\r\n\t int k=0;\r\n\t int count = 0;\r\n\t String []str = new String[n];\r\n\t for(int i=0;i<str.length;i++) {\r\n\t \tstr[i] = sc.next();\r\n\t }\r\n\t while( k<n-1) {\r\n\t \tif(k > str.length-3) {\r\n\t \t\tk+=1;\r\n\t \t}else {\r\n\t \t\tk+=2;\r\n\t \t}\r\n\t \tif(!str[k].equals(\"B\")) {\r\n\t \t\tcount++;\r\n\t \t}else {\r\n\t \t\tk -=1;\r\n\t \t\tcount++;\r\n\t \t}\r\n\t }\r\n\t \tSystem.out.println(count);\r\n\t \tsc.close();}", "public static void main(String[] args) {\n String input = \"ABC\";\n List<String> result = new ArrayList <> ();\n result = permutations(input);\n System.out.println(Arrays.asList(result)); \n }", "public static void parseEdge(String[] list)\n {\n for (int i = 0; i < list.length; i++) {\n String element = list[i].replace(\" \", \"\");\n if (element.length() > 4) {\n throw new RuntimeException(\"element not handled\");\n }\n Graph.getNode(element.substring(0, 1)).addDestination(\n Graph.getNode(element.substring(1,2)),\n Integer.parseInt(element.substring(2))\n );\n }\n return;\n }", "private String getValue(String s)\n {\n if(s.contains(\",\"))\n {\n return s.split(\",\")[0];\n }\n else\n {\n s = s.replaceAll(\"\\\\)\",\"\");\n return s;\n }\n }", "public static void main(String[] args) {\n\t\tString text = \"Hello,hi,\";\n\t\tSystem.out.println(text);\n\t\tSystem.out.println(text.length());\n\t\tSystem.out.println(text.charAt(2));\n\n\t\tchar[] c = text.toCharArray();\n\t\tSystem.out.println(c[0]);\n\t\tSystem.out.println(text.replace(\"H\", \"h\"));\n\n\t\tString[] t = text.split(\",\");\n\t\tSystem.out.println(t[0]);\n\t\tSystem.out.println(t[1]);\n\t\t\n\t\ttry {\n\t\t\tSystem.out.println(t[2]);\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"Error!\");\n\t\t\tSystem.out.println(\"Reason : There is no element in t[2].\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public static void loopThroughListOfStrings(List<String> input) {\n\t\t\n\t\tList<String> output = input.stream().filter(i -> i.length()>=4).collect(Collectors.toList());\n\t\t\n\t\tSystem.out.println(output);\n\t}" ]
[ "0.6039737", "0.60155874", "0.5927434", "0.5845983", "0.577116", "0.57703984", "0.5658499", "0.56534535", "0.56207556", "0.5578883", "0.55612236", "0.55561507", "0.5467849", "0.5463126", "0.54466015", "0.5434874", "0.5428981", "0.5394985", "0.53780776", "0.53761363", "0.5308461", "0.5300435", "0.527202", "0.5253616", "0.522742", "0.520377", "0.52005714", "0.5190262", "0.5178982", "0.5178728", "0.51706374", "0.516639", "0.51310754", "0.51235515", "0.5114994", "0.51131433", "0.5098148", "0.5096075", "0.50919807", "0.50886345", "0.5076991", "0.5076403", "0.5058639", "0.5057902", "0.50477296", "0.50402385", "0.50335866", "0.503109", "0.50164324", "0.50157607", "0.49930432", "0.49897265", "0.49846604", "0.49835062", "0.49826184", "0.4982485", "0.49815047", "0.49731663", "0.49650636", "0.4964435", "0.49589923", "0.49563003", "0.49543318", "0.49511543", "0.49496314", "0.4943752", "0.49426037", "0.49275294", "0.4924622", "0.4918027", "0.49168077", "0.4909134", "0.4909091", "0.4905963", "0.4903663", "0.4899875", "0.48919836", "0.48911732", "0.48905477", "0.4890226", "0.48886514", "0.48876494", "0.48838496", "0.48789382", "0.48696998", "0.4869183", "0.48668125", "0.48651987", "0.48585582", "0.48536456", "0.4851375", "0.48446912", "0.48419762", "0.48396802", "0.48338202", "0.482802", "0.48152262", "0.4807811", "0.48051998", "0.48049212", "0.4800357" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { calculate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View arg0) { txtEpd.setText(""); txtDpd.setText(""); txtRate.setText(""); txtFvalue.setText(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
construct tree for test
@Test public void testHandleIndexNodeUnderflowed(){ LeafNode<Integer, Integer> leaf1 = new LeafNode<Integer, Integer>(2, 2); leaf1.insertSorted(3, 3); LeafNode<Integer, Integer> leaf2 = new LeafNode<Integer, Integer>(5, 5); leaf2.insertSorted(7, 7); leaf2.insertSorted(8, 8); LeafNode<Integer, Integer> leaf3 = new LeafNode<Integer, Integer>(14, 14); leaf3.insertSorted(16, 16); LeafNode<Integer, Integer> leaf4 = new LeafNode<Integer, Integer>(22,22); leaf4.insertSorted(27, 27); leaf4.insertSorted(29, 29); LeafNode<Integer, Integer> leaf5 = new LeafNode<Integer, Integer>(33, 33); leaf5.insertSorted(34, 34); leaf5.insertSorted(38, 38); leaf5.insertSorted(39, 39); leaf1.nextLeaf = leaf2; leaf2.previousLeaf = leaf1; leaf2.nextLeaf = leaf3; leaf3.previousLeaf = leaf2; leaf3.nextLeaf = leaf4; leaf4.previousLeaf = leaf3; leaf4.nextLeaf = leaf5; leaf5.previousLeaf = leaf4; ArrayList<Integer> leftkeys = new ArrayList<>(); leftkeys.add(5); leftkeys.add(13); ArrayList<Node<Integer, Integer>> leftNodeChilds = new ArrayList<>(); leftNodeChilds.add(leaf1); leftNodeChilds.add(leaf2); leftNodeChilds.add(leaf3 ); IndexNode<Integer, Integer> left = new IndexNode<>(leftkeys, leftNodeChilds); IndexNode<Integer, Integer> right = new IndexNode<>(30, leaf4, leaf5); IndexNode<Integer, Integer> parent = new IndexNode<>(17, left, right); left.parent = parent; right.parent = parent; // -----end construction BPlusTree<Integer, Integer> tree = new BPlusTree<>(); int index = tree.handleIndexNodeUnderflow(left, right, parent); System.out.println(index); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}", "@Test\n\tpublic void testBuildTree() {\n\t\tTree<Integer> tree = new Tree<Integer> ();\n\t\t//add first level children, 1\n\t\tNode<Integer> root = tree.getRoot();\n\t\troot.addChild(new Node<Integer>());\n\t\tNode<Integer> c1 = root.getFirstChild();\n\t\tassertTrue(c1.getData() == null);\n\t\t//add second level children, 3\n\t\tc1.addChild(new Node<Integer> ());\n\t\tc1.addChild(new Node<Integer> ());\n\t\tc1.addChild(new Node<Integer> ());\n\t\tassertTrue(c1.countChildren() == 3);\n\t\t//add third level children, 3 * 3\n\t\tint[][] leafData = {\n\t\t\t\t{8,7,2},\n\t\t\t\t{9,1,6},\n\t\t\t\t{2,4,1}\n\t\t};\n\t\tNode<Integer> c2 = c1.getFirstChild();\n\t\tint i = 0;\n\t\twhile (c2 != null) {\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][0]));\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][1]));\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][2]));\n\t\t\tc2 = c2.next();\n\t\t\ti++;\n\t\t}\n\t\tassertTrue(tree.countDepth() == 3);\n\t\tNode<Integer> leaf = root;\n\t\twhile (leaf.countChildren() > 0) {\n\t\t\tleaf = leaf.getFirstChild();\n\t\t}\n\t\tassertTrue(leaf.getData() == 8);\t\t\t\n\t}", "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "@Before\n public void prepareTree() {\n tree = new TreeNode();\n nodeOne = new TreeNode();\n nodeTwo = new TreeNode();\n nodeThree = new TreeNode();\n }", "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode111());\n structure.getNode11().branchList.add(structure.getNode112());\n structure.getNode11().branchList.add(structure.getNode113());\n\n structure.getNode13().branchList.add(structure.getNode131());\n\n structure.getNode112().branchList.add(structure.getNode1121());\n\n }", "@Test\n public void testPhylogeneticTreeParserNoNamesNoDistance() {\n // create the actual tree\n String tree = \"(,,(,));\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "public TreeTest(String name) {\r\n super(name);\r\n }", "public void createTree() {\n Node<String> nodeB = new Node<String>(\"B\", null, null);\n Node<String> nodeC = new Node<String>(\"C\", null, null);\n Node<String> nodeD = new Node<String>(\"D\", null, null);\n Node<String> nodeE = new Node<String>(\"E\", null, null);\n Node<String> nodeF = new Node<String>(\"F\", null, null);\n Node<String> nodeG = new Node<String>(\"G\", null, null);\n root.leftChild = nodeB;\n root.rightChild = nodeC;\n nodeB.leftChild = nodeD;\n nodeB.rightChild = nodeE;\n nodeC.leftChild = nodeF;\n nodeC.rightChild = nodeG;\n\n }", "public void testBuildTreeDeepStructure() {\n TreeNode root = buildRootNodeFromFile(\"testWihManyLevels.js\");\n\n // Ensure the hierarchy is correct.\n assertEquals(\"suite1\", root.getNodeValue().getTestText());\n assertEquals(4, root.getChildCount());\n }", "@Before\r\n public void setUp() throws Exception {\r\n Node childTwo = new Node(5, new Node(2), null);\r\n Node childOne = new Node(3, new Node(9), new Node(12));\r\n Node rootNode = new Node(1, childOne, childTwo);\r\n tree = new Tree();\r\n tree.root = rootNode;\r\n }", "public static Node constructTree() {\n\n Node node2 = new Node(2, null, null);\n Node node8 = new Node(8, null, null);\n Node node12 = new Node(12, null, null);\n Node node17 = new Node(17, null, null);\n\n Node node6 = new Node(6, node2, node8);\n Node node15 = new Node(15, node12, node17);\n\n //Root Node\n Node node10 = new Node(10, node6, node15);\n\n return node10;\n }", "@Before\n\tpublic void buildCategories()\n\t{\n\t\t// make a root node for the tree (i.e. like a franchise in the CR data set\n\t\tCategoryNode rootParent = null;\n\t\taRootCategory = new CategoryNode(\"rootCategoryId\", \"rootCategoryName\", rootParent);\n\t\t\n\t\t// Add a subtree containing a singleton. The singleton should get removed\n\t\tCategoryNode singleton = new CategoryNode(\"singletonId\", \"singletonName\", aRootCategory);\n\t\taRootCategory.addSubcategory(singleton);\n\t\tCategoryNode childOfSingleton = new CategoryNode(\"childOfSingletonId\", \"childOfSingletonName\", singleton);\n\t\tsingleton.addSubcategory(childOfSingleton);\n\t\tCategoryNode leaf0 = new CategoryNode(\"leaf0Id\", \"leaf0Name\", childOfSingleton);\n\t\tchildOfSingleton.addSubcategory(leaf0);\n\t\tCategoryNode leaf1 = new CategoryNode(\"leaf1Id\", \"leaf1Name\", childOfSingleton);\n\t\tchildOfSingleton.addSubcategory(leaf1);\n\t\t\n\t\t// Add a subtree will have similar leaves, so the subtree should be turned into an equivalence class\n\t\tCategoryNode equivalenceClass = new CategoryNode(\"equivalenceClassId\", \"equivalenceClassName\", aRootCategory);\n\t\taRootCategory.addSubcategory(equivalenceClass);\n\t\tCategoryNode similarNode0 = new CategoryNode(\"similarNode0Id\", \"similarNode0Name\", equivalenceClass);\n\t\tequivalenceClass.addSubcategory(similarNode0);\n\t\tCategoryNode similarNode1 = new CategoryNode(\"similarNode1Id\", \"similarNode1Name\", equivalenceClass);\n\t\tequivalenceClass.addSubcategory(similarNode1);\n\t\t\n\t\t// This subtree has dissimilar leaves, so the subtree shouldn't be turned into an equivalence class\n\t\tCategoryNode nonEquivalenceClass = new CategoryNode(\"nonEquivalenceClassId\", \"nonEquivalenceClassName\", aRootCategory);\n\t\taRootCategory.addSubcategory(nonEquivalenceClass);\n\t\tCategoryNode dissimilarNode0 = new CategoryNode(\"dissimilarNode0Id\", \"dissimilarNode0Name\", nonEquivalenceClass);\n\t\tnonEquivalenceClass.addSubcategory(dissimilarNode0);\n\t\tCategoryNode dissimilarNode1 = new CategoryNode(\"dissimilarNode1Id\", \"dissimilarNode1Name\", nonEquivalenceClass);\n\t\tnonEquivalenceClass.addSubcategory(dissimilarNode1);\n\t}", "public RBTree() {\r\n\t\t// well its supposed just create a new Red Black Tree\r\n\t\t// Maybe create a new one that does a array of Objects\r\n\t}", "void create(Node node) {\n if (node.table.negatives() == 0) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n if (node.table.positives() == 0) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n\r\n //If no test split the data, make it a leaf with the majoriti of the target atribute\r\n int atr;\r\n //Choose the best atribute\r\n atr = this.chooseBestAtrib(node);\r\n node.atribute = atr;\r\n\r\n //No atribute split the data, so make the node a leaf with the majoriti of the class (either positive or negative)\r\n if (node.atribute == -1) {\r\n //System.out.println(\"Atribute is -1 in TeeBuidler.create\");\r\n if (node.table.negatives() > node.table.positives()) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n if (node.table.positives() >= node.table.negatives()) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n }\r\n\r\n Table table_left = new Table(), table_right = new Table();\r\n node.table.splitByAtrib(node.atribute, table_left, table_right);\r\n\r\n //Create two children for the current node //parameters: identifier,parent_result,atribute of split,id_child1, id_child2, table\r\n node.child_left = new Node(node.id + node.id, \"1\", -1, -1, -1, table_left);\r\n node.child_right = new Node(node.id + node.id+1, \"0\", -1, -1, -1, table_right);\r\n node.id_child_left = node.id + node.id;\r\n node.id_child_right = node.id + node.id+1;\r\n\r\n\r\n TreeBuilder builder = new TreeBuilder();\r\n builder.create(node.child_left);\r\n builder.create(node.child_right);\r\n\r\n }", "private CategoryView buildComplicatedExpectedTree() {\n\n CategoryView root = new CategoryView(\"ROOT\");\n CategoryView a = new CategoryView(\"a\");\n CategoryView b = new CategoryView(\"b\");\n CategoryView c = new CategoryView(\"c\");\n CategoryView d = new CategoryView(\"d\");\n CategoryView e = new CategoryView(\"e\");\n\n root.addChild(a);\n root.addChild(e);\n root.addChild(new CategoryView(\"f\"));\n root.addChild(new CategoryView(\"g\"));\n root.addChild(new CategoryView(\"z\"));\n a.addChild(b);\n b.addChild(c);\n a.addChild(c);\n c.addChild(d);\n d.addChild(e);\n c.addChild(e);\n\n root.addChild(new CategoryView(\"1\") {{\n addChild(new CategoryView(\"2\") {{\n addChild(new CategoryView(\"3\"));\n }});\n }});\n root.addChild(new CategoryView(\"x\") {{\n addChild(new CategoryView(\"y\"));\n }});\n\n return root;\n }", "public static TreeNode constructTreeNode(String testData) {\n\n if (testData == null || testData.equals(\"[]\")) {\n System.out.printf(\"%s\\n\", \"construct tree failed, input data is null or empty\");\n return null;\n }\n\n if (testData.indexOf(\"[\") != 0 || testData.indexOf(\"]\") != testData.length()-1) {\n System.out.printf(\"%s\\n\", \"construct tree failed, input data is invalid\");\n return null;\n }\n\n String data = testData.substring(1, testData.length()-1);\n String[] dataList = data.split(\",\");\n TreeNode[] nodeArray = new TreeNode[dataList.length];\n\n for (int i=0; i<dataList.length; i++) {\n if (!dataList[i].equals(\"null\")) {\n TreeNode node = new TreeNode(Integer.valueOf(dataList[i]));\n nodeArray[i] = node;\n }\n }\n\n // Construct binary tree\n // If the index of root = 0\n // The index of left of the node(index = m) is 2*m +1\n // If the index of root = 1\n // Then the index of left of the node(index = m) is 2*m -1\n\n for (int i=0; i<nodeArray.length; i++) {\n if (nodeArray[i] != null) {\n int indexOfLeft = i * 2 + 1;\n int indexOfRight = indexOfLeft + 1;\n\n if (indexOfLeft < nodeArray.length && nodeArray[indexOfLeft] != null) {\n nodeArray[i].left = nodeArray[indexOfLeft];\n }\n\n if (indexOfRight < nodeArray.length && nodeArray[indexOfRight] != null) {\n nodeArray[i].right = nodeArray[indexOfRight];\n }\n }\n }\n\n return nodeArray[0];\n }", "private void setup(){\n buildTree(2);\n }", "public static Node buildRandomTree() {\n\t\tNode root = createNode(15);\n\t\troot.leftChild = createNode(10);\n\t\troot.rightChild = createNode(4);\n\t\troot.leftChild.leftChild = createNode(25);\n\t\troot.leftChild.leftChild.rightChild = createNode(27);\n\t\troot.leftChild.leftChild.leftChild = createNode(13);\n\t\troot.leftChild.rightChild = createNode(25);\n\t\troot.leftChild.rightChild.rightChild = createNode(7);\n\t\t\n\t\treturn root;\n\t}", "public MorseCodeTree()\r\n\t{\r\n\t\tbuildTree();\r\n\t}", "TestNode createTestNode();", "private Node constructParsedTree(Node[] nodes) {\n int rootIndex = 0;\n for (int i = 0; i < nodes.length; i++) {\n if (nodes[i].getFather() > 0)\n nodes[nodes[i].getFather() - 1].addChild(nodes[i]);\n else\n rootIndex = i;\n }\n return nodes[rootIndex];\n }", "@Test\n public void testPhylogeneticTreeParserNamedLeafsNoDistance() {\n // create the actual tree\n String tree = \"(A,B,(C,D));\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setName(\"A\");\n current = new PhylogeneticTreeItem();\n current.setName(\"B\");\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"C\");\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"D\");\n\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "@Before\n public void setUp() {\n this.tree = new SimpleBinarySearchTree<>();\n }", "private TreeNode createTree() {\n // Map<String, String> map = new HashMap<>();\n // map.put(\"dd\", \"qq\");\n // 叶子节点\n TreeNode G = new TreeNode(\"G\");\n TreeNode D = new TreeNode(\"D\");\n TreeNode E = new TreeNode(\"E\", G, null);\n TreeNode B = new TreeNode(\"B\", D, E);\n TreeNode H = new TreeNode(\"H\");\n TreeNode I = new TreeNode(\"I\");\n TreeNode F = new TreeNode(\"F\", H, I);\n TreeNode C = new TreeNode(\"C\", null, F);\n // 构造根节点\n TreeNode root = new TreeNode(\"A\", B, C);\n return root;\n }", "public void createTree() {\n\t\taddNodeToParent(nodeMap);\n\t}", "@Test\n public void testAllConstructions() throws IOException, LexerException, ParseException {\n TreeNode<ASTNode> tree = getTree(\"all.txt\");\n System.out.println(tree);\n }", "public HIRTree(){\r\n\t\t\r\n\t}", "@Test\n public void testPhylogeneticTreeParserNamednodesNoDistance() {\n // create the actual tree\n String tree = \"(A,B,(C,D)E)F;\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n rootExpected.setName(\"F\");\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setName(\"A\");\n current = new PhylogeneticTreeItem();\n current.setName(\"B\");\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setName(\"E\");\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"C\");\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"D\");\n\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "public BuildTree createBuildTree() {\n BuildTree buildTree = new BuildTree();\n createBuildTree(0, buildTree);\n return buildTree;\n }", "public void setUp() {\r\n tree = new Lab14BinarySearchTree<String>();\r\n }", "public static TreeNode buildTree01() {\n\t\t\n\t\tTreeNode root = new TreeNode(5);\n\t\t\n\t\troot.left = new TreeNode(4);\n\t\troot.left.left = new TreeNode(11);\n\t\troot.left.left.left = new TreeNode(7);\n\t\troot.left.left.right = new TreeNode(2);\n\t\t\n\t\troot.right = new TreeNode(8);\n\t\troot.right.left = new TreeNode(13);\n\t\troot.right.right = new TreeNode(4);\n\t\troot.right.right.right = new TreeNode(1);\n\t\t\n\t\treturn root;\n\t}", "FractalTree() {\r\n }", "@Test\n public void whenAddNodesOnDifferentLevelsThenResultThreeNodeFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 2, 1]\"));\n }", "@Test\n\tpublic void testTreeData_1()\n\t\tthrows Exception {\n\n\t\tTreeData result = new TreeData();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.getType());\n\t\tassertEquals(null, result.getDescription());\n\t\tassertEquals(0, result.getCount());\n\t\tassertEquals(null, result.getIfile());\n\t}", "@Test\n public void whenAddNodesOnOneLevelThenResultThreeNodesInLine() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(nodeTwo, \"2\");\n tree.addChild(nodeThree, \"3\");\n assertThat(tree.getChildren().toString(), is(\"[1, 2, 3]\"));\n }", "public static TreeNode buildTree02() {\n\t\t\n\t\tTreeNode root = new TreeNode(5);\n\t\t/*\n\t\troot.left = new TreeNode(4);\n\t\troot.left.left = new TreeNode(11);\n\t\troot.left.left.left = new TreeNode(7);\n\t\troot.left.left.right = new TreeNode(2);\n\t\t\n\t\troot.right = new TreeNode(8);\n\t\troot.right.left = new TreeNode(13);\n\t\troot.right.right = new TreeNode(4);\n\t\troot.right.right.left = new TreeNode(5);\n\t\troot.right.right.right = new TreeNode(1);\n\t\t*/\n\t\treturn root;\n\t}", "private static void test1() {\n BinaryTreeNode node1 = new BinaryTreeNode(8);\n BinaryTreeNode node2 = new BinaryTreeNode(6);\n BinaryTreeNode node3 = new BinaryTreeNode(10);\n BinaryTreeNode node4 = new BinaryTreeNode(5);\n BinaryTreeNode node5 = new BinaryTreeNode(7);\n BinaryTreeNode node6 = new BinaryTreeNode(9);\n BinaryTreeNode node7 = new BinaryTreeNode(11);\n node1.left = node2;\n node1.right = node3;\n node2.left = node4;\n node2.right = node5;\n node3.left = node6;\n node3.right = node7;\n test(\"Test1\", node1, true);\n }", "@Test\n\tpublic void testTreeData_2()\n\t\tthrows Exception {\n\t\tIFile ifile = null;\n\t\tString description = \"\";\n\t\tint count = 1;\n\t\tint type = 1;\n\n\t\tTreeData result = new TreeData(ifile, description, count, type);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(1, result.getType());\n\t\tassertEquals(\"\", result.getDescription());\n\t\tassertEquals(1, result.getCount());\n\t\tassertEquals(null, result.getIfile());\n\t}", "public static TreeNode buildTree() {\n\t\t\n\t\tTreeNode root = new TreeNode(1);\n\t\t\n\t\tTreeNode left = new TreeNode(2);\n\t\tleft.left = new TreeNode(4);\n\t\tleft.right = new TreeNode(5);\n\t\tleft.right.right = new TreeNode(8);\n\t\t\n\t\tTreeNode right = new TreeNode(3);\n\t\tright.left = new TreeNode(6);\n\t\tright.right = new TreeNode(7);\n\t\tright.right.left = new TreeNode(9);\n\t\t\n\t\troot.left = left;\n\t\troot.right = right;\n\t\t\n\t\treturn root;\n\t}", "static private DecisionTree buildTree(ItemSet learningSet, \n\t\t\t\t\t AttributeSet testAttributes, \n\t\t\t\t\t SymbolicAttribute goalAttribute) {\n\tDecisionTreeBuilder builder = \n\t new DecisionTreeBuilder(learningSet, testAttributes,\n\t\t\t\t goalAttribute);\n\t\n\treturn builder.build();\n }", "public BinaryTree() {\n\t}", "public TwoFourTree()\r\n\t{\r\n\t\troot = new TreeNode(); //assign the root to a new tree node\r\n\t}", "public BinaryTree(){}", "@Test\n public void testPhylogeneticTreeParserUnnamednodesAndDistance() {\n // create the actual tree\n String tree = \"(:0.1,:0.2,(:0.3,:0.4):0.5);\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setDistance(0.2);\n current = new PhylogeneticTreeItem();\n current.setDistance(0.1);\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setDistance(0.5);\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setDistance(0.3);\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setDistance(0.4);\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "@Override\r\n\tpublic void buildTree() {\r\n\t\t\r\n\t\t// root level \r\n\t\trootNode = new TreeNode<String>(\"\");\r\n\t\t\r\n\t\t//first level\r\n\t\tinsert(\".\", \"e\");\r\n\t\tinsert(\"-\", \"t\");\r\n\t\t\r\n\t\t//second level\r\n\t\t\r\n\t\tinsert(\". .\", \"i\");\r\n\t\tinsert(\".-\", \"a\");\r\n\t\tinsert(\"-.\", \"n\"); \r\n\t\tinsert(\"--\", \"m\");\r\n\t\t\r\n\t\t//third level\r\n\t\tinsert(\"...\", \"s\");\r\n\t\tinsert(\"..-\", \"u\");\r\n\t\tinsert(\".-.\", \"r\");\r\n\t\tinsert(\".--\", \"w\");\r\n\t\tinsert(\"-..\", \"d\");\r\n\t\tinsert(\"-.-\", \"k\");\r\n\t\tinsert(\"--.\", \"g\");\r\n\t\tinsert(\"---\", \"o\");\r\n\t\t\r\n\t\t//fourth level\r\n\t\tinsert(\"....\", \"h\");\r\n\t\tinsert(\"...-\", \"v\");\r\n\t\tinsert(\"..-.\", \"f\");\r\n\t\tinsert(\".-..\", \"l\");\r\n\t\tinsert(\".--.\", \"p\");\r\n\t\tinsert(\".---\", \"j\");\r\n\t\tinsert(\"-...\", \"b\");\r\n\t\tinsert(\"-..-\", \"x\");\r\n\t\tinsert(\"-.-.\", \"c\");\r\n\t\tinsert(\"-.--\", \"y\");\r\n\t\tinsert(\"--..\", \"z\");\r\n\t\tinsert(\"--.-\", \"q\");\r\n\t\t\r\n\t}", "public Tree(){\n root = null;\n }", "private BinaryTree<Character> constructTree(){\n if(pq.size() == 1) return pq.poll().data;\n if(pq.size() == 0) return null;\n // Poll the lowest two trees, combine them, then stick them back in the queue.\n Helper<BinaryTree<Character>> temp0 = pq.poll(), temp1 = pq.poll(),\n result = new Helper<>(temp0.priority + temp1.priority, new BinaryTree<>(temp0.data, null , temp1.data));\n pq.add(result);\n // Call again to keep constructing.\n return constructTree();\n }", "@Test\r\n\tpublic void firstTest() {\r\n\t\t\r\n\t\tTree tree = new Tree(\"greg\");\r\n\t\ttree.addElement(\"opera\");\r\n\t\ttree.addElement(\"qwerty\");\r\n\t\ttree.addElement(\"odf\");\r\n\t\ttree.addElement(7363);\r\n\t\ttree.addElement(new Double(23.3));\r\n\t\t\r\n\t\tassertTrue(tree.contains(7363));\r\n\t\tassertTrue(tree.contains(\"greg\"));\r\n\t\tassertTrue(tree.contains(\"opera\"));\r\n\t\tassertTrue(tree.contains(\"odf\"));\r\n\t}", "private static void test2() {\n BinaryTreeNode node1 = new BinaryTreeNode(1);\n BinaryTreeNode node2 = new BinaryTreeNode(2);\n BinaryTreeNode node3 = new BinaryTreeNode(3);\n BinaryTreeNode node4 = new BinaryTreeNode(4);\n BinaryTreeNode node5 = new BinaryTreeNode(5);\n BinaryTreeNode node6 = new BinaryTreeNode(6);\n BinaryTreeNode node7 = new BinaryTreeNode(7);\n node1.left = node2;\n node1.right = node3;\n node2.left = node4;\n node2.right = node5;\n node5.left = node7;\n node3.right = node6;\n test(\"Test2\", node1, true);\n }", "static private DecisionTree buildTree(ItemSet learningSet, \n\t\t\t\t\t AttributeSet testAttributes, \n\t\t\t\t\t SymbolicAttribute goalAttribute) {\n\tDecisionTreeBuilder builder = \n\t new DecisionTreeBuilder(learningSet, testAttributes,\n\t\t\t\t goalAttribute);\n\t\n\treturn builder.build().decisionTree();\n }", "@Test\n public void testPhylogeneticTreeParserNamednodesAndDistance() {\n // create the actual tree\n String tree = \"(A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F;\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n rootExpected.setName(\"F\");\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setName(\"A\");\n current.setDistance(0.1);\n current = new PhylogeneticTreeItem();\n current.setName(\"B\");\n current.setDistance(0.2);\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setName(\"E\");\n current.setDistance(0.5);\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"C\");\n current2.setDistance(0.3);\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"D\");\n current2.setDistance(0.4);\n\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "@Test\n public void treeSample() {\n this.pool.invoke(JobTrees.buildTree());\n }", "public TernaryTree() {\n root = null;\n\n }", "@org.junit.Test\n public void constrCompelemNested1() {\n final XQuery query = new XQuery(\n \"element elem {1, element a {2, element b {element c {}, element d {3}}, 4}}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertSerialization(\"<elem>1<a>2<b><c/><d>3</d></b>4</a></elem>\", false)\n );\n }", "public KdTree() \r\n\t{\r\n\t}", "private void constructBSTree(Node<T> u, int n, String lr) {\n\t\tn++;\n\t\taddToPT(n, lr + \" \" + u.x.toString());\n\t\telements.add(u.x);\n\t\tif (u.left != nil)\n\t\t\tconstructBSTree(u.left, n, lr + \"L\");\n\t\tif (u.right != nil)\n\t\t\tconstructBSTree(u.right, n, lr + \"R\");\n\t}", "public static TreeNode getTree() {\n\t\tTreeNode a = new TreeNode(\"a\", 314);\n\t\tTreeNode b = new TreeNode(\"b\", 6);\n\t\tTreeNode c = new TreeNode(\"c\", 271);\n\t\tTreeNode d = new TreeNode(\"d\", 28);\n\t\tTreeNode e = new TreeNode(\"e\", 0);\n\t\tTreeNode f = new TreeNode(\"f\", 561);\n\t\tTreeNode g = new TreeNode(\"g\", 3);\n\t\tTreeNode h = new TreeNode(\"h\", 17);\n\t\tTreeNode i = new TreeNode(\"i\", 6);\n\t\tTreeNode j = new TreeNode(\"j\", 2);\n\t\tTreeNode k = new TreeNode(\"k\", 1);\n\t\tTreeNode l = new TreeNode(\"l\", 401);\n\t\tTreeNode m = new TreeNode(\"m\", 641);\n\t\tTreeNode n = new TreeNode(\"n\", 257);\n\t\tTreeNode o = new TreeNode(\"o\", 271);\n\t\tTreeNode p = new TreeNode(\"p\", 28);\n\t\t\n\t\ta.left = b; b.parent = a;\n\t\tb.left = c; c.parent = b;\n\t\tc.left = d;\t d.parent = c;\n\t\tc.right = e; e.parent = c;\n\t\tb.right = f; f.parent = b;\n\t\tf.right = g; g.parent = f;\n\t\tg.left = h; h.parent = g;\n\t\ta.right = i; i.parent = a;\n\t\ti.left = j; j.parent = i;\n\t\ti.right = o; o.parent = i;\n\t\tj.right = k; k.parent = j;\n\t\to.right = p; p.parent = o;\n\t\tk.right = n; n.parent = k;\n\t\tk.left = l; l.parent = k;\n\t\tl.right = m; m.parent = l;\n\t\t\n\t\td.childrenCount = 0;\n\t\te.childrenCount = 0;\n\t\tc.childrenCount = 2;\n\t\tb.childrenCount = 6;\n\t\tf.childrenCount = 2;\n\t\tg.childrenCount = 1;\n\t\th.childrenCount = 0;\n\t\tl.childrenCount = 1;\n\t\tm.childrenCount = 0;\n\t\tn.childrenCount = 0;\n\t\tk.childrenCount = 3;\n\t\tj.childrenCount = 4;\n\t\to.childrenCount = 1;\n\t\tp.childrenCount = 0;\n\t\ti.childrenCount = 7;\n\t\ta.childrenCount = 15;\n\t\t\n\t\treturn a;\n\t}", "@Override\n\tpublic TreeNode buildTree(String[] exp) {\n\t\tStack<TreeNode> stk = new Stack<TreeNode>();\n\t\tTreeNode tmpL, tmpR, tmpRoot;\n\t\tint i;\n\n\t\tfor(String s: exp) {\n\t\t\tif(s.equals(EMPTY))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\ti = Integer.parseInt(s);\n\t\t\t\tstk.push(new TreeNode(EMPTY + i));\n\t\t\t}\n\t\t\tcatch (NumberFormatException n) {\n\t\t\t\ttmpR = stk.pop();\n\t\t\t\ttmpL = stk.pop();\n\t\t\t\ttmpRoot = new TreeNode(s, tmpL, tmpR);\n\t\t\t\tstk.push(tmpRoot);\n\t\t\t}\n\t\t}\n\n\t\treturn stk.pop();\n\n\t}", "public BSTTreeBlueJTest()\n {\n }", "private void createTree() {\n\n // custom brown color\n Color brown = new Color(149, 99, 57);\n\n // trunk\n NscComponent trunk = new NscRectangle(49, 164, 13, 51);\n createShape(trunk, brown, true);\n\n // branches\n drawLine(50, 125, 50, 165, 10, brown);\n drawLine(25, 125, 50, 165, 10, brown);\n drawLine(75, 125, 50, 165, 10, brown);\n\n // branch outlines\n drawLine(49, 125, 49, 150, 1, Color.black);\n drawLine(60, 125, 60, 150, 1, Color.black);\n drawLine(24, 125, 49, 165, 1, Color.black);\n drawLine(35, 125, 50, 150, 1, Color.black);\n drawLine(85, 125, 60, 165, 1, Color.black);\n drawLine(74, 125, 60, 150, 1, Color.black);\n\n // leafs\n NscEllipse leafs2 = new NscEllipse(0, 5, 60, 122);\n NscEllipse leafs3 = new NscEllipse(50, 5, 60, 122);\n NscEllipse leafs = new NscEllipse(25, 0, 60, 127);\n NscEllipse leafs4 = new NscEllipse(25, 1, 60, 124);\n createShape(leafs2, treeColor, true);\n createShape(leafs3, treeColor, true);\n createShape(leafs, treeColor, true);\n createShape(leafs4, treeColor, false);\n\n repaint();\n }", "@Test\n public void whenAddNineNodesOnDifferentLevelsThenResultNineNodesFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(new TreeNode(), \"1\");\n tree.addChild(new TreeNode(), \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 3, 3, 2, 2, 2, 1, 1, 1]\"));\n }", "@Test\n public void testExpandTree() {\n // TODO: test ExpandTree\n }", "public TreeNode() {\n }", "public Tree()\n\t{\n\t\tsuper(\"Tree\", \"tree\", 0);\n\t}", "public Tree() // constructor\n\t{ root = null; }", "protected PhraseTree() {}", "private static SVIntervalTree<String> initTree() {\n final SVIntervalTree<String> tree = new SVIntervalTree<>();\n final String[] genes = {\"A\", \"B\", \"C\", \"D\", \"E\"};\n if (transcriptionStartSites.length != genes.length) {\n throw new TestException(\"Transcription start sites list and genes array are not the same length\");\n }\n for ( int idx = 0; idx < genes.length; ++idx ) {\n tree.put(transcriptionStartSites[idx], genes[idx]);\n }\n return tree;\n }", "public static Node createLargeTree() {\n final int dcCount = 2;\n final int rackCount = 6;\n final int snCount = 6;\n final int hdCount = 12;\n\n int id = 0;\n // root\n Node root = new Node();\n root.setName(\"root\");\n root.setId(id++);\n root.setType(Types.ROOT);\n root.setSelection(Selection.STRAW);\n // DC\n List<Node> dcs = new ArrayList<Node>();\n for (int i = 1; i <= dcCount; i++) {\n Node dc = new Node();\n dcs.add(dc);\n dc.setName(\"dc\" + i);\n dc.setId(id++);\n dc.setType(Types.DATA_CENTER);\n dc.setSelection(Selection.STRAW);\n dc.setParent(root);\n // racks\n List<Node> racks = new ArrayList<Node>();\n for (int j = 1; j <= rackCount; j++) {\n Node rack = new Node();\n racks.add(rack);\n rack.setName(dc.getName() + \"rack\" + j);\n rack.setId(id++);\n rack.setType(StorageSystemTypes.RACK);\n rack.setSelection(Selection.STRAW);\n rack.setParent(dc);\n // storage nodes\n List<Node> sns = new ArrayList<Node>();\n for (int k = 1; k <= snCount; k++) {\n Node sn = new Node();\n sns.add(sn);\n sn.setName(rack.getName() + \"sn\" + k);\n sn.setId(id++);\n sn.setType(StorageSystemTypes.STORAGE_NODE);\n sn.setSelection(Selection.STRAW);\n sn.setParent(rack);\n // hds\n List<Node> hds = new ArrayList<Node>();\n for (int l = 1; l <= hdCount; l++) {\n Node hd = new Node();\n hds.add(hd);\n hd.setName(sn.getName() + \"hd\" + l);\n hd.setId(id++);\n hd.setType(StorageSystemTypes.DISK);\n hd.setWeight(100);\n hd.setParent(sn);\n }\n sn.setChildren(hds);\n }\n rack.setChildren(sns);\n }\n dc.setChildren(racks);\n }\n root.setChildren(dcs);\n return root;\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n byte[] byteArray0 = new byte[0];\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0, 1, 1);\n JavaParser javaParser0 = new JavaParser(byteArrayInputStream0);\n SimpleNode simpleNode0 = new SimpleNode(javaParser0, (-120811353));\n Node[] nodeArray0 = new Node[6];\n nodeArray0[0] = (Node) simpleNode0;\n nodeArray0[1] = (Node) simpleNode0;\n nodeArray0[2] = (Node) simpleNode0;\n nodeArray0[3] = (Node) simpleNode0;\n nodeArray0[4] = (Node) simpleNode0;\n SimpleNode simpleNode1 = new SimpleNode(javaParser0, 1);\n nodeArray0[5] = (Node) simpleNode1;\n simpleNode0.children = nodeArray0;\n int int0 = simpleNode0.jjtGetNumChildren();\n assertEquals(6, int0);\n }", "public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }", "private void buildTree() {\n\t\tfinal TreeSet<Tree> treeSet = new TreeSet<Tree>();\n\t\tfor (char i = 0; i < 256; i++) {\n\t\t\tif (characterCount[i] > 0) {\n\t\t\t\ttreeSet.add(new Tree(i, characterCount[i]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge the trees to one Tree\n\t\tTree left;\n\t\tTree right;\n\t\twhile (treeSet.size() > 1) {\n\t\t\tleft = treeSet.pollFirst();\n\t\t\tright = treeSet.pollFirst();\n\t\t\ttreeSet.add(new Tree(left, right));\n\t\t}\n\n\t\t// There is only our final tree left\n\t\thuffmanTree = treeSet.pollFirst();\n\t}", "public TreeNode() { \n this.name = \"\"; \n this.rule = new ArrayList<String>(); \n this.child = new ArrayList<TreeNode>(); \n this.datas = null; \n this.candAttr = null; \n }", "public void testSimpleManual() {\n\t\tBoard b = new Board();\n\t\tColoredAlligator a = new ColoredAlligator(true, true, new Color(0),\n\t\t\t\ttrue);\n\t\tb.addChild(a);\n\t\tEgg e1 = new Egg(true, true, new Color(0), true);\n\t\ta.addChild(e1);\n\t\tEgg e2 = new Egg(true, true, new Color(1), true);\n\t\tb.addChild(e2);\n\n\t\tString expected = \"{\\n\\t\\\"\" + \"families\\\" : [\\n\" + \"\\t\\t{\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"type\\\" : \\\"colored alligator\\\",\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"color\\\" : 0,\\n\" + \"\\t\\t\\t\\\"movable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"removable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"recolorable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"children\\\" : [\\n\" + \"\\t\\t\\t\\t{\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\t\\t\\\"type\\\" : \\\"egg\\\",\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\t\\t\\\"color\\\" : 0,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\t\\t\\\"movable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\t\\t\\\"removable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\t\\t\\\"recolorable\\\" : true\\n\" + \"\\t\\t\\t\\t}\\n\"\n\t\t\t\t+ \"\\t\\t\\t]\\n\" + \"\\t\\t},\\n\" + \"\\t\\t{\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"type\\\" : \\\"egg\\\",\\n\" + \"\\t\\t\\t\\\"color\\\" : 1,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"movable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"removable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"recolorable\\\" : true\\n\" + \"\\t\\t}\\n\\t]\\n\" + \"}\\n\";\n\t\tSystem.out.println(expected);\n\t\tassertEquals(expected, AlligatorToJson.convert(b));\n\t}", "@Before\n public void setUp()\n { example = new BSTTreeBlueJ<Integer>();\n example2 = new BSTTreeBlueJ<Integer>();\n example3 = new BSTTreeBlueJ<Integer>();\n }", "private void buildTree(int n, double x, double y, double a, double branchLength) {\n tree = new ArrayList<>();\n populateTree(n, x, y, a, branchLength);\n }", "public static Path genSimpleTestTree(Path root, String name) throws IOException {\n Path tmp = root.resolve(name);\n\n Path t1 = tmp.resolve(\"test.txt\");\n Path t2 = tmp.resolve(Paths.get(\"dir\", \"file.txt\"));\n Path t3 = tmp.resolve(Paths.get(\"dir\", \"subDir\", \"child.txt\"));\n\n PathHelper.mkdirs(t2.getParent());\n PathHelper.mkdirs(t3.getParent());\n Files.write(t1, TEST1.getBytes(StandardCharsets.UTF_8));\n Files.write(t2, TEST2.getBytes(StandardCharsets.UTF_8));\n Files.write(t3, TEST3.getBytes(StandardCharsets.UTF_8));\n\n return tmp;\n }", "void createTree() throws IOException {\n\n // create root\n rootTreeItem = createTreeRoot();\n\n // create tree structure recursively\n createTree(rootTreeItem);\n\n // sort tree structure by name\n rootTreeItem.getChildren()\n .sort(Comparator.comparing(new Function<TreeItem<FilePath>, String>() {\n @Override\n public String apply(TreeItem<FilePath> t) {\n return t.getValue().toString().toLowerCase();\n }\n }));\n\n }", "protected void init(String tree){\n\t\tJSONObject tree_model = null;\n\t\ttry {\n\t\t\ttree_model = (JSONObject)new JSONParser().parse(tree);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t\tJSONArray phys_tree = (JSONArray)tree_model.get(\"tree_diagram\");\n\t\troot_scheme = new TreeNode();\n\t\tbuildTree(phys_tree,root_scheme);\n\t}", "private static void test4() {\n BinaryTreeNode node1 = new BinaryTreeNode(5);\n BinaryTreeNode node2 = new BinaryTreeNode(4);\n BinaryTreeNode node3 = new BinaryTreeNode(3);\n BinaryTreeNode node4 = new BinaryTreeNode(2);\n BinaryTreeNode node5 = new BinaryTreeNode(1);\n node1.left = node2;\n node2.left = node3;\n node3.left = node4;\n node4.left = node5;\n test(\"Test4\", node1, false);\n }", "public static void main (String[] args) {\n\t\t\n\t\t//Tests\n\t\tTree testTree = new Leaf(null);\n\t\ttestTree = testTree.setUpTree(1);\n\t\ttestStuff(testTree.getValue(), 1);\n\t\ttestTree = testTree.setUpTree(2);\n\t\ttestStuff(testTree.getValue(), 1);\n\t\ttestStuff(testTree.getLeft().getValue(), 1);\n\t\ttestStuff(testTree.getRight().getValue(), 1);\n\t\ttestTree = testTree.setUpTree(4);\n\t\ttestStuff(testTree.getValue(), 1);\n\t\ttestStuff(testTree.getLeft().getValue(), 1);\n\t\ttestStuff(testTree.getLeft().getRight().getValue(), 2);\n\t\ttestStuff(testTree.getLeft().getLeft().getValue(), 1);\n\t\ttestStuff(testTree.getLeft().getLeft().getRight().getValue(), 3);\n\t\ttestStuff(testTree.getLeft().getRight().getRight().getValue(), 4);\n\t\ttestStuff(testTree.getRight().getLeft().getLeft().getValue(), \n\t\t\t\ttestTree.getLeft().getRight().getRight().getValue());\n\t\t//End of tests\n\t\t\n\t\tSystem.out.println(\"There were \" + Integer.toString(errors) + \" errors from the tests.\");\n\t\tSystem.out.println(\"Hi! Welcome to the NeuroScouting Tree Creator!\");\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tint input = -1;\n\t\t\n\t\twhile (input != 0) {\n\t\t\tSystem.out.print(\"Please enter your tree's height as an integer. Enter 0 to end: \");\n\t\t\tinput = in.nextInt();\n\t\t\tif (input != 0) {\n\t\t\t\ttestTree = testTree.setUpTree(input);\n\t\t\t\ttestTree.printTree();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Thank you for using NeuroScouting Tree Generator! Have a good day!\");\n\t}", "public JdbTree() {\r\n this(new Object [] {});\r\n }", "public BinaryTree(String expression) {\n \tString[] arr = expression.split(\" \");\n \troot = parse(arr);\n }", "public KdTree() \n\t {\n\t\t \n\t }", "public KdTree() {\n }", "public FamilyTree(){\r\n super();\r\n }", "public Tree(E value) {\n this.root = new Node<E>(value);\n this.length = 0;\n }", "public void createBinaryTree()\r\n\t{\n\t\t\r\n\t\tNode node = new Node(1);\r\n\t\tnode.left = new Node(2);\r\n\t\tnode.right = new Node(3);\r\n\t\tnode.left.left = new Node(4);\r\n\t\tnode.left.right = new Node(5);\r\n\t\tnode.left.right.right = new Node(10);\r\n\t\tnode.left.left.left = new Node(8);\r\n\t\tnode.left.left.left.right = new Node(15);\r\n\t\tnode.left.left.left.right.left = new Node(17);\r\n\t\tnode.left.left.left.right.left.left = new Node(18);\r\n\t\tnode.left.left.left.right.right = new Node(16);\r\n\t\tnode.left.left.right = new Node(9);\r\n\t\tnode.right.left = new Node(6);\r\n\t\tnode.right.left.left = new Node(13);\r\n\t\tnode.right.left.left.left = new Node(14);\r\n\t\tnode.right.right = new Node(7);\r\n\t\tnode.right.right.right = new Node(11);\r\n\t\tnode.right.right.right.right = new Node(12);\r\n\t\troot = node;\r\n\t\t\r\n\t}", "public static void main(String[] args) \n\t{\n\t\ttree x = new tree(0);\n\t\t\n\t\ttreenode r = x.root;\n\t\t\n//\t\ttreenode c = r;\n//\t\tfor(int i =1;i<=4;i++)\n//\t\t{\n//\t\t\tfor(int j=0;j<=8;j=j+4)\n//\t\t\t{\n//\t\t\t\ttreenode n = new treenode(i+j);\n//\t\t\t\tif(j==0)\n//\t\t\t\t{\n//\t\t\t\t\tr.child.add(n);\n//\t\t\t\t\tc = n;\n//\t\t\t\t}\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\tc.child.add(n);\n//\t\t\t\t\tc = n;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\ttreenode c1 = r;\n\t\ttreenode c2 = r;\n\t\ttreenode c3 = r;\n\t\ttreenode c4 = r;\n\t\tfor(int i=1;i<13;i++)\n\t\t{\n\t\t\ttreenode n = new treenode(i);\n\t\t\tif(i%4==1)\n\t\t\t{\n\t\t\t\tc1.child.add(n);\n\t\t\t\tc1 = n;\n\t\t\t}\n\t\t\tif(i%4==2)\n\t\t\t{\n\t\t\t\tc2.child.add(n);\n\t\t\t\tc2 = n;\n\t\t\t}\n\t\t\tif(i%4==3)\n\t\t\t{\n\t\t\t\tc3.child.add(n);\n\t\t\t\tc3 = n;\n\t\t\t}\n\t\t\tif(i%4==0)\n\t\t\t{\n\t\t\t\tc4.child.add(n);\n\t\t\t\tc4 = n;\n\t\t\t}\n\t\t}\n\t\tx.traverse(r);\n\t}", "public static void main(String[] args) {\n\n\n\t\tArrayList<Node> N = new ArrayList<Node>();\n\t\t\n\t\t/*\n\t\t * ##### Encoding Model 2 ###### \n\t\t */\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the privilege nodes\n\t\t */\n\t\tfor(int i=1; i<7; i++)\n\t\t{\n\t\t\tN.add(new Node(\"p\"+i, 1));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the exploit nodes\t\t \n\t\t */\n\t\tfor(int i=1; i<8; i++)\n\t\t{\n\t\t\tN.add(new Node(\"e\"+i, 2));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the child nodes\n\t\t */\n\t\tfor(int i=1; i<12; i++)\n\t\t{\n\t\t\tN.add(new Node(\"c\"+i, 0));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Assigning the children and parent(s) for each node according to model 2\n\t\t */\n\t\t\n\t\tArrayList<Node> nil = new ArrayList<Node>();\n\t\t\n\t\tN.get(0).setParents(nil);\n\t\tN.get(0).addChild(N.get(6));\n\t\t\n\t\tN.get(6).addParent(N.get(0));\n\t\tN.get(6).addChild(N.get(1));\n\t\tN.get(6).addChild(N.get(13));\n\t\tN.get(6).addChild(N.get(14));\n\t\t\n\t\tN.get(1).addParent(N.get(6));\n\t\tN.get(1).addChild(N.get(7));\n\t\tN.get(1).addChild(N.get(8));\n\t\t\n\t\tN.get(7).addParent(N.get(1));\n\t\tN.get(7).addChild(N.get(15));\n\t\tN.get(7).addChild(N.get(2));\n\t\t\n\t\tN.get(2).addParent(N.get(7));\n\t\tN.get(2).addChild(N.get(10));\t\t\n\t\t\n\t\tN.get(8).addParent(N.get(1));\n\t\tN.get(8).addChild(N.get(16));\n\t\tN.get(8).addChild(N.get(3));\n\t\t\n\t\tN.get(3).addParent(N.get(8));\n\t\tN.get(3).addChild(N.get(9));\n\t\t\n\t\tN.get(10).addParent(N.get(2));\n\t\tN.get(10).addChild(N.get(5));\n\t\tN.get(10).addChild(N.get(19));\n\t\tN.get(10).addChild(N.get(20));\n\t\t\n\t\tN.get(9).addParent(N.get(3));\n\t\tN.get(9).addChild(N.get(4));\n\t\tN.get(9).addChild(N.get(17));\n\t\tN.get(9).addChild(N.get(18));\n\t\t\n\t\tN.get(4).addParent(N.get(9));\n\t\tN.get(4).addChild(N.get(12));\n\t\t\n\t\tN.get(5).addParent(N.get(10));\n\t\tN.get(5).addChild(N.get(11));\n\t\t\n\t\tN.get(12).addParent(N.get(4));\n\t\tN.get(12).addChild(N.get(22));\n\t\tN.get(12).addChild(N.get(23));\n\t\t\n\t\tN.get(11).addParent(N.get(5));\n\t\tN.get(11).addChild(N.get(21));\n\t\tN.get(11).addChild(N.get(23));\n\t\t\n\t\tN.get(13).addParent(N.get(6));\n\t\tN.get(14).addParent(N.get(6));\n\t\tN.get(15).addParent(N.get(7));\n\t\tN.get(16).addParent(N.get(8));\n\t\tN.get(17).addParent(N.get(9));\n\t\tN.get(18).addParent(N.get(9));\n\t\tN.get(19).addParent(N.get(10));\n\t\tN.get(20).addParent(N.get(10));\n\t\tN.get(21).addParent(N.get(11));\n\t\tN.get(22).addParent(N.get(12));\n\t\tN.get(23).addParent(N.get(11));\n\t\tN.get(23).addParent(N.get(12));\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the C,I,A values for each node\n\t\t */\n\t\t\n\t\tN.get(0).setImpacts(4, 4, 4);\n\t\tN.get(1).setImpacts(1, 2, 3);\n\t\tN.get(2).setImpacts(2, 2, 1);\n\t\tN.get(3).setImpacts(1, 2, 1);\n\t\tN.get(4).setImpacts(1, 1, 1);\n\t\tN.get(5).setImpacts(3, 2, 3);\n\t\tN.get(13).setImpacts(3,3,3);\n\t\tN.get(14).setImpacts(3,3,3);\n\t\tN.get(15).setImpacts(3,3,3);\n\t\tN.get(16).setImpacts(3,3,3);\n\t\tN.get(17).setImpacts(3,3,3);\n\t\tN.get(18).setImpacts(3,3,3);\n\t\tN.get(19).setImpacts(3,3,3);\n\t\tN.get(20).setImpacts(3,3,3);\n\t\tN.get(21).setImpacts(3,3,3);\n\t\tN.get(22).setImpacts(3,3,3);\n\t\tN.get(23).setImpacts(2,2,1);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * This block helps see the setup of the whole tree. \n\t\t * Comment out if not required to see the parent children relationship of each node.\n\t\t */\n\t\t\n\t\tfor(int i=0; i<24; i++)\n\t\t{\n\t\t\tSystem.out.println(\"\\n\\n\" + N.get(i).getName() + \" < C=\" + N.get(i).getImpactC() + \", I=\" + N.get(i).getImpactI() + \", A=\" + N.get(i).getImpactA() + \" >\" );\n\t\t\tSystem.out.println(\"Parents: \");\n\t\t\tfor(int j=0; j<N.get(i).getParents().size(); j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getParents().get(j).getName() + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nChildren: \");\n\t\t\tfor(int k=0; k<N.get(i).getChildren().size(); k++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getChildren().get(k).getName() + \" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * Calling the method which will perform the C,I,A impact analysis \n\t\t */\n\t\t\n\t\t//Node n = new Node(); //Commented out as extended Main to Node and declared impactAnalysis() as static \n\t\t\n\t\tImpactAnalyzer ia = new ImpactAnalyzer();\n\t\tia.analyze(2, 2, 1, N);\n\t\t\n\t\t\n\t\t\n\t}", "private void createNodes( DefaultMutableTreeNode top ) {\n DefaultMutableTreeNode leaf = null;\n \n leaf = new DefaultMutableTreeNode( new treeInfo(\"Insert Transaction\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Item\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Report\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Employee\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Suplier\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Salesman\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Customer\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Commisioner\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Edit Transaction\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Producer\"));\n top.add(leaf);\n }", "public SegmentTree() {}", "public TreeImpl(T dato) {\r\n\t\traiz = new NodeImpl<T>(dato, null);// El null dice que es raiz\r\n\t}", "private void buildTree(int random_attr){\n String[] schema = new String[]{\"min, max, avg, label\"};\n CassandraDriver driver = CassandraDriver.getInstance();\n ArrayList<int[]> train = driver.queryData(\"data\", schema);\n RandomForest forest = new RandomForest();\n forest.numAttr = RandomForestTrainingMapReduce.N;\n forest.numAttrRandom = random_attr;\n RealDecisionTree tree = new RealDecisionTree(train, forest, RandomForestTrainingMapReduce.N);\n\n // serialize this tree and write to Cassandra.\n byte[] t = serialize(tree);\n try {\n driver.insertData(t, \"Forest\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void constructTree(List<String> signatures) {\r\n // If no signatures present throw exception\r\n if(signatures.size() == 0){\r\n throw new IllegalArgumentException(\"Must provide a transaction signature to construct Merkle Tree\");\r\n }\r\n\r\n // If only one transaction, return as root node\r\n if(signatures.size() == 1){\r\n root = new Node(Utility.SHA512(signatures.get(0)));\r\n }\r\n\r\n List<Node> parents = constructBase(signatures);\r\n root = constructInternal(parents);\r\n }", "public MockTopologyNode createManualTree() throws ServiceFactory.ServiceNotAvailableException {\n // get a new submitter to create a new tree\n final TopologyDataSubmissionService3.TopologySubmitter3 mysubmitter = mServiceFactory.getService\n (TopologyDataSubmissionService3.class).getTopologySubmitter();\n\n TopologyNode topnode = mysubmitter.createTopLevelNode(\"__top_of_tree__\", 0);\n MockTopologyNode node = (MockTopologyNode) topnode;\n\n MockTopologyNode node1 = createMockNode(node, \"HostDiscoveryData\", null, 0, 0, false, false);\n MockTopologyValue value1 = (MockTopologyValue) node1.createValue(\"name\");\n value1.setSampleValue(\"HostDiscoveryData\");\n value1.setIsIdentity(true);\n value1.setNodeFrequency(0);\n\n MockTopologyNode node2 = createMockNode(node1, \"host\", \"Host\", 0, 0, false, false);\n MockTopologyValue value2 = (MockTopologyValue) node2.createValue(\"name\");\n value2.setSampleValue(\"198.51.100.0\");\n value2.setIsIdentity(true);\n value2.setNodeFrequency(0);\n\n return node;\n}", "@Test\n public void test() {\n try {\n Long userId = Long.valueOf(1);\n User user = new User(userId, \"testUser\", new Date());\n // Creates tree of 6 accounts\n // AccountTreeRoot treeRoot = TestDataFactory.buildAccounts(userId);\n // Account boligAccount = new Account(Long.valueOf(1), Long.valueOf(-1), userId, \"Bolig\", \"\", 0, Type.TYPE_REGULAR, new Date());\n // Account boligAccountFinans = new Account(Long.valueOf(2), Long.valueOf(1), userId,\"Finans\", \"Bolig\", 1, Type.TYPE_REGULAR, new Date());\n // Account boligAccountFinansLaan = new Account(Long.valueOf(3), Long.valueOf(2), userId, \"Lån\", \"Bolig/Finans\", 2, Type.TYPE_REGULAR, new Date());\n //\n // Account boligAccountTag = new Account(Long.valueOf(4), Long.valueOf(1), userId, \"Tag\", \"Bolig\", 1, Type.TYPE_REGULAR, new Date());\n //\n // Account boligAccountVVS = new Account(Long.valueOf(5), Long.valueOf(1), userId, \"VVS\", \"Bolig\", 1 , Type.TYPE_NON_REGULAR, new Date());\n // Account boligAccountVVSExtra = new Account(Long.valueOf(6), Long.valueOf(5), userId, \"Extra\", \"Bolig/VVS\", 2 , Type.TYPE_EXTRAORDINAIRE, new Date());\n // Account boligAccountVVSCheck = new Account(Long.valueOf(7), Long.valueOf(5), userId, \"Check\", \"Bolig/VVS\", 2 , Type.TYPE_NON_REGULAR, new Date());\n\n // regular, Bolig/Finans/Lån\n Match match = null;\n match = new Match(null, null, userId, new Long(3), new Long(1), null, null);\n Line line1 = new Line(new Long(1), userId, \"test1\", sdFormat.parse(\"2013-09-20\"), \"Lån1\", new BigDecimal(-4000), null, match);\n match = new Match(null, null, userId, new Long(3), new Long(2), null, null);\n Line line2 = new Line(new Long(2), userId, \"test2\", sdFormat.parse(\"2013-09-21\"), \"Lån2\", new BigDecimal(-400), null, match);\n\n // regular, Bolig/tag\n match = new Match(null, null, userId, new Long(4), new Long(3), null, null);\n Line line3 = new Line(new Long(3), userId, \"test3\", sdFormat.parse(\"2013-09-23\"), \"Tag\", new BigDecimal(-3000), null, match);\n match = new Match(null, null, userId, new Long(4), new Long(4), null, null);\n Line line4 = new Line(new Long(4), userId, \"test4\", sdFormat.parse(\"2013-11-20\"), \"Tag2\", new BigDecimal(-300), null, match);\n\n // extra, Bolig/VVS/Extra\n match = new Match(null, null, userId, new Long(6), new Long(5), null, null);\n Line line5 = new Line(new Long(5), userId, \"test\", sdFormat.parse(\"2013-09-20\"), \"VVSExt1\", new BigDecimal(-2000), null, match);\n match = new Match(null, null, userId, new Long(6), new Long(6), null, null);\n Line line6 = new Line(new Long(6), userId, \"test\", sdFormat.parse(\"2013-10-20\"), \"VVSExt2\", new BigDecimal(-200), null, match);\n match = new Match(null, null, userId, new Long(6), new Long(7), null, null);\n Line line7 = new Line(new Long(7), userId, \"test\", sdFormat.parse(\"2013-11-20\"), \"VVSExt3\", new BigDecimal(-20), null, match);\n\n // regular, Bolig/Finans/Lån\n match = new Match(null, null, userId, new Long(3), new Long(8), null, null);\n Line line8 = new Line(new Long(8), userId, \"test\", sdFormat.parse(\"2013-09-22\"), \"Lån3\", new BigDecimal(-40), null, match);\n // nonregular, Bolig/VVS/Check\n match = new Match(null, null, userId, new Long(7), new Long(9), null, null);\n Line line9 = new Line(new Long(9), userId, \"test\", sdFormat.parse(\"2013-10-12\"), \"VVSBesøg\", new BigDecimal(-500), null, match);\n\n // // regular, Bolig/Finans/Lån\n // Line line1 = new Line(new Long(1), new Long(3), userId, \"test1\", sdFormat.parse(\"2013-09-20\"), \"Lån1\", new BigDecimal(-4000), null);\n // Line line2 = new Line(new Long(2), new Long(3), userId, \"test2\", sdFormat.parse(\"2013-09-21\"), \"Lån2\", new BigDecimal(-400), null);\n //\n // // regular, Bolig/tag\n // Line line3 = new Line(new Long(3), new Long(4), userId, \"test3\", sdFormat.parse(\"2013-09-23\"), \"Tag\", new BigDecimal(-3000), null);\n // Line line4 = new Line(new Long(4), new Long(4), userId, \"test4\", sdFormat.parse(\"2013-11-20\"), \"Tag2\", new BigDecimal(-300), null);\n //\n // // extra, Bolig/VVS/Extra\n // Line line5 = new Line(new Long(5), new Long(6), userId, \"test\", sdFormat.parse(\"2013-09-20\"), \"VVSExt1\", new BigDecimal(-2000), null);\n // Line line6 = new Line(new Long(6), new Long(6), userId, \"test\", sdFormat.parse(\"2013-10-20\"), \"VVSExt2\", new BigDecimal(-200), null);\n // Line line7 = new Line(new Long(7), new Long(6), userId, \"test\", sdFormat.parse(\"2013-11-20\"), \"VVSExt3\", new BigDecimal(-20), null);\n //\n // // regular, Bolig/Finans/Lån\n // Line line8 = new Line(new Long(8), new Long(3), userId, \"test\", sdFormat.parse(\"2013-09-22\"), \"Lån3\", new BigDecimal(-40), null);\n // // nonregular, Bolig/VVS/Check\n // Line line9 = new Line(new Long(9), new Long(7), userId, \"test\", sdFormat.parse(\"2013-10-12\"), \"VVSBesøg\", new BigDecimal(-500), null);\n\n // Bolig:\n // 09: total=4000+400+3000+40+2000, reg=4000+400+3000+40, nonreg=0,extra=2000\n BigDecimal per1Total = new BigDecimal(\"-9440.00\");\n BigDecimal per1Reg = new BigDecimal(\"-7440.00\");\n BigDecimal per1NonReg = new BigDecimal(\"0.00\");\n BigDecimal per1Extra = new BigDecimal(\"-2000.00\");\n // 10 total=200+500, reg=0, nonreg=500,extra=200\n BigDecimal per2Total = new BigDecimal(\"-700.00\");\n BigDecimal per2Reg = new BigDecimal(\"0.00\");\n BigDecimal per2NonReg = new BigDecimal(\"-500.00\");\n BigDecimal per2Extra = new BigDecimal(\"-200.00\");\n // 11: total=300,29 reg=300, nonreg=0,extra=20\n BigDecimal per3Total = new BigDecimal(\"-320.00\");\n BigDecimal per3Reg = new BigDecimal(\"-300.00\");\n BigDecimal per3NonReg = new BigDecimal(\"0.00\");\n BigDecimal per3Extra = new BigDecimal(\"-20.00\");\n\n // VisitorLogTree treeLogger = new VisitorLogTree(true);\n // treeRoot.accept(treeLogger);\n\n TimeLineImpl timeLine = new TimeLineImpl();\n AccountPersisterTestIFactorympl accPersister = new AccountPersisterTestIFactorympl(user);\n AccountTreeRoot buildAccountTree = accPersister.buildAccountTree(user.getId());\n VisitorLogTree visitorLogTree = new VisitorLogTree();\n buildAccountTree.accept(visitorLogTree);\n timeLine.setUser(user);\n timeLine.setAccountPersister(accPersister);\n timeLine.createTimelineForPeriod(line1.getDate(), line7.getDate());\n List<Period> periods = timeLine.getPeriods();\n assertEquals(3, periods.size());\n assertEquals(sdFormat.parse(\"2013-09-01\"), periods.get(0).getStartDate());\n assertEquals(sdFormat.parse(\"2013-10-01\"), periods.get(1).getStartDate());\n assertEquals(sdFormat.parse(\"2013-11-01\"), periods.get(2).getStartDate());\n\n // Creates 3 periods\n timeLine.addLine(line1);\n timeLine.addLine(line2);\n timeLine.addLine(line3);\n timeLine.addLine(line4);\n timeLine.addLine(line5);\n timeLine.addLine(line6);\n timeLine.addLine(line7);\n timeLine.addLine(line8);\n timeLine.addLine(line9);\n\n //*************************************************\n\n OutputChartDataBuilder dataBuilder = null;\n\n dataBuilder = new OutputChartDataBuilderBigDecimalRegular();\n dataBuilder.buildOutData(timeLine, \"/Bolig\", 1);\n\n Date[] dates = dataBuilder.getDates();\n assertEquals(3, dates.length);\n assertEquals(sdFormat.parse(\"2013-09-01\"), dates[0]);\n assertEquals(sdFormat.parse(\"2013-10-01\"), dates[1]);\n assertEquals(sdFormat.parse(\"2013-11-01\"), dates[2]);\n\n BigDecimal[][] values = (BigDecimal[][]) dataBuilder.getValues();\n assertEquals(3, values.length);\n assertEquals(1, values[0].length);\n assertEquals(1, values[1].length);\n assertEquals(1, values[2].length);\n\n assertEquals(per1Reg, values[0][0]);\n assertEquals(per2Reg, values[1][0]);\n assertEquals(per3Reg, values[2][0]);\n\n String[][] categories = dataBuilder.getCategories();\n assertEquals(categories.length, 1);\n assertEquals(categories[0].length, 1);\n assertEquals(\"/Bolig\", categories[0][0]);\n\n //***************************\n\n // Account boligAccountVVS = new Account(Long.valueOf(5), Long.valueOf(1), userId, \"VVS\", \"Bolig\", 1 , Type.TYPE_NON_REGULAR, new Date());\n // Account boligAccountVVSExtra = new Account(Long.valueOf(6), Long.valueOf(5), userId, \"Extra\", \"Bolig/VVS\", 2 , Type.TYPE_EXTRAORDINAIRE, new Date());\n // Account boligAccountVVSCheck = new Account(Long.valueOf(7), Long.valueOf(5), userId, \"Check\", \"Bolig/VVS\", 2 , Type.TYPE_NON_REGULAR, new Date());\n\n // extra, Bolig/VVS/Extra\n // Line line5 = new Line(new Long(5), new Long(6), userId, \"test\", sdFormat.parse(\"2013-09-20\"), \"VVSExt1\", new BigDecimal(-2000), null);\n // Line line6 = new Line(new Long(6), new Long(6), userId, \"test\", sdFormat.parse(\"2013-10-20\"), \"VVSExt2\", new BigDecimal(-200), null);\n // Line line7 = new Line(new Long(7), new Long(6), userId, \"test\", sdFormat.parse(\"2013-11-20\"), \"VVSExt3\", new BigDecimal(-20), null);\n\n // nonregular, Bolig/VVS/Check\n // Line line9 = new Line(new Long(9), new Long(7), userId, \"test\", sdFormat.parse(\"2013-10-12\"), \"VVSBesøg\", new BigDecimal(-500), null);\n\n BigDecimal zero = new BigDecimal(\"0.00\");\n\n dataBuilder = new OutputChartDataBuilderBigDecimalRegular();\n dataBuilder.buildOutData(timeLine, \"/Bolig/VVS\", 2);\n\n values = (BigDecimal[][]) dataBuilder.getValues();\n categories = dataBuilder.getCategories();\n dates = dataBuilder.getDates();\n\n assertEquals(0, categories.length);\n assertEquals(0, values.length);\n assertEquals(0, dates.length);\n\n // ******************************\n dataBuilder = new OutputChartDataBuilderBigDecimalNonRegular();\n dataBuilder.buildOutData(timeLine, \"/Bolig/VVS\", 2);\n\n values = (BigDecimal[][]) dataBuilder.getValues();\n categories = dataBuilder.getCategories();\n dates = dataBuilder.getDates();\n\n assertEquals(6, values.length);\n assertEquals(2, values[0].length);\n assertEquals(2, values[1].length);\n assertEquals(2, values[2].length);\n assertEquals(2, values[3].length);\n assertEquals(2, values[4].length);\n assertEquals(2, values[5].length);\n\n assertEquals(zero, values[0][0]);\n assertEquals(null, values[0][1]);\n assertEquals(null, values[1][0]);\n assertEquals(zero, values[1][1]);\n\n assertEquals(new BigDecimal(\"-500.00\"), values[2][0]);\n assertEquals(null, values[2][1]);\n assertEquals(null, values[3][0]);\n assertEquals(new BigDecimal(\"-500.00\"), values[3][1]);\n\n assertEquals(zero, values[4][0]);\n assertEquals(null, values[4][1]);\n assertEquals(null, values[5][0]);\n assertEquals(zero, values[5][1]);\n\n assertEquals(\"/Bolig/VVS\", categories[0][0]);\n assertEquals(\"/Bolig/VVS\", categories[0][1]);\n assertEquals(null, categories[1][0]);\n assertEquals(\"Check\", categories[1][1]);\n\n assertEquals(3, dates.length);\n assertEquals(sdFormat.parse(\"2013-09-01\"), dates[0]);\n assertEquals(sdFormat.parse(\"2013-10-01\"), dates[1]);\n assertEquals(sdFormat.parse(\"2013-11-01\"), dates[2]);\n\n //***************************\n\n dataBuilder = new OutputChartDataBuilderBigDecimalExtraordinaire();\n dataBuilder.buildOutData(timeLine, \"/Bolig/VVS\", 2);\n\n values = (BigDecimal[][]) dataBuilder.getValues();\n categories = dataBuilder.getCategories();\n dates = dataBuilder.getDates();\n\n assertEquals(6, values.length);\n assertEquals(2, values[0].length);\n assertEquals(2, values[1].length);\n assertEquals(2, values[2].length);\n assertEquals(2, values[3].length);\n assertEquals(2, values[4].length);\n assertEquals(2, values[5].length);\n\n // BigDecimal zero = new BigDecimal(\"0.00\");\n assertEquals(new BigDecimal(\"-2000.00\"), values[0][0]);\n assertEquals(null, values[0][1]);\n assertEquals(null, values[1][0]);\n assertEquals(new BigDecimal(\"-2000.00\"), values[1][1]);\n\n assertEquals(new BigDecimal(\"-200.00\"), values[2][0]);\n assertEquals(null, values[2][1]);\n assertEquals(null, values[3][0]);\n assertEquals(new BigDecimal(\"-200.00\"), values[3][1]);\n\n assertEquals(new BigDecimal(\"-20.00\"), values[4][0]);\n assertEquals(null, values[4][1]);\n assertEquals(null, values[5][0]);\n assertEquals(new BigDecimal(\"-20.00\"), values[5][1]);\n\n assertEquals(\"/Bolig/VVS\", categories[0][0]);\n assertEquals(\"/Bolig/VVS\", categories[0][1]);\n assertEquals(null, categories[1][0]);\n assertEquals(\"Extra\", categories[1][1]);\n\n assertEquals(3, dates.length);\n assertEquals(sdFormat.parse(\"2013-09-01\"), dates[0]);\n assertEquals(sdFormat.parse(\"2013-10-01\"), dates[1]);\n assertEquals(sdFormat.parse(\"2013-11-01\"), dates[2]);\n\n //***************************\n\n dataBuilder = new OutputChartDataBuilderBigDecimalTotal();\n dataBuilder.buildOutData(timeLine, \"/Bolig/VVS\", 2);\n\n values = (BigDecimal[][]) dataBuilder.getValues();\n categories = dataBuilder.getCategories();\n dates = dataBuilder.getDates();\n\n assertEquals(6, values.length);\n assertEquals(3, values[0].length);\n assertEquals(3, values[1].length);\n assertEquals(3, values[2].length);\n assertEquals(3, values[3].length);\n assertEquals(3, values[4].length);\n assertEquals(3, values[5].length);\n\n // BigDecimal zero = new BigDecimal(\"0.00\");\n assertEquals(new BigDecimal(\"-2000.00\"), values[0][0]);\n assertEquals(null, values[0][1]);\n assertEquals(null, values[0][2]);\n assertEquals(null, values[1][0]);\n assertEquals(new BigDecimal(\"-2000.00\"), values[1][1]);\n assertEquals(zero, values[1][2]);\n\n assertEquals(new BigDecimal(\"-700.00\"), values[2][0]);\n assertEquals(null, values[2][1]);\n assertEquals(null, values[2][2]);\n assertEquals(null, values[3][0]);\n assertEquals(new BigDecimal(\"-200.00\"), values[3][1]);\n assertEquals(new BigDecimal(\"-500.00\"), values[3][2]);\n\n assertEquals(new BigDecimal(\"-20.00\"), values[4][0]);\n assertEquals(null, values[4][1]);\n assertEquals(null, values[4][2]);\n assertEquals(null, values[5][0]);\n assertEquals(new BigDecimal(\"-20.00\"), values[5][1]);\n assertEquals(zero, values[5][2]);\n\n assertEquals(\"/Bolig/VVS\", categories[0][0]);\n assertEquals(\"/Bolig/VVS\", categories[0][1]);\n assertEquals(\"/Bolig/VVS\", categories[0][2]);\n assertEquals(null, categories[1][0]);\n assertEquals(\"Extra\", categories[1][1]);\n assertEquals(\"Check\", categories[1][2]);\n\n assertEquals(3, dates.length);\n assertEquals(sdFormat.parse(\"2013-09-01\"), dates[0]);\n assertEquals(sdFormat.parse(\"2013-10-01\"), dates[1]);\n assertEquals(sdFormat.parse(\"2013-11-01\"), dates[2]);\n //**************************************************\n dataBuilder = new OutputChartDataBuilderAccount();\n dataBuilder.buildOutData(timeLine, \"/Bolig/VVS\", 2);\n\n Account[][] accountValues = (Account[][]) dataBuilder.getValues();\n categories = dataBuilder.getCategories();\n dates = dataBuilder.getDates();\n\n assertEquals(6, accountValues.length);\n assertEquals(3, accountValues[0].length);\n assertEquals(3, accountValues[1].length);\n assertEquals(3, accountValues[2].length);\n assertEquals(3, accountValues[3].length);\n assertEquals(3, accountValues[4].length);\n assertEquals(3, accountValues[5].length);\n\n // BigDecimal zero = new BigDecimal(\"0.00\");\n assertEquals(new BigDecimal(\"-2000.00\"), accountValues[0][0].getExpensesTotal());\n assertEquals(null, accountValues[0][1]);\n assertEquals(null, accountValues[0][2]);\n assertEquals(null, accountValues[1][0]);\n assertEquals(new BigDecimal(\"-2000.00\"), accountValues[1][1].getExpensesTotal());\n assertEquals(zero, accountValues[1][2].getExpensesTotal());\n\n assertEquals(new BigDecimal(\"-700.00\"), accountValues[2][0].getExpensesTotal());\n assertEquals(null, accountValues[2][1]);\n assertEquals(null, accountValues[2][2]);\n assertEquals(null, accountValues[3][0]);\n assertEquals(new BigDecimal(\"-200.00\"), accountValues[3][1].getExpensesTotal());\n assertEquals(new BigDecimal(\"-500.00\"), accountValues[3][2].getExpensesTotal());\n\n assertEquals(new BigDecimal(\"-20.00\"), accountValues[4][0].getExpensesTotal());\n assertEquals(null, accountValues[4][1]);\n assertEquals(null, accountValues[4][2]);\n assertEquals(null, accountValues[5][0]);\n assertEquals(new BigDecimal(\"-20.00\"), accountValues[5][1].getExpensesTotal());\n assertEquals(zero, accountValues[5][2].getExpensesTotal());\n\n assertEquals(\"/Bolig/VVS\", categories[0][0]);\n assertEquals(\"/Bolig/VVS\", categories[0][1]);\n assertEquals(\"/Bolig/VVS\", categories[0][2]);\n assertEquals(null, categories[1][0]);\n assertEquals(\"Extra\", categories[1][1]);\n assertEquals(\"Check\", categories[1][2]);\n\n assertEquals(3, dates.length);\n assertEquals(sdFormat.parse(\"2013-09-01\"), dates[0]);\n assertEquals(sdFormat.parse(\"2013-10-01\"), dates[1]);\n assertEquals(sdFormat.parse(\"2013-11-01\"), dates[2]);\n\n } catch (Exception e) {\n LOG.error(e.getMessage(), e);\n fail(e.getMessage());\n }\n\n }", "@org.junit.Test\n public void constrCompelemNested2() {\n final XQuery query = new XQuery(\n \"element elem {}\",\n ctx);\n try {\n query.context(node(file(\"prod/CompAttrConstructor/DupNode.xml\")));\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertSerialization(\"<elem/>\", false)\n );\n }", "public TreeBuilder() {\n\t\troot = null;\n\t}", "@BeforeAll\n\tstatic void setNodes() {\n\t\tLCA = new LowestCommonAncestor();\n\t\tnine = new Node(9,null);\n\t\tten = new Node(10, null);\n\t\teight = new Node(8, null);\n\t\tseven = new Node(7, new Node[] {ten});\n\t\tfour = new Node(4, new Node[] {ten});\n\t\tthree = new Node(3, new Node[] {four});\n\t\tfive = new Node(5, new Node[] {nine, eight, seven});\n\t\ttwo = new Node(2, new Node[] {three, five});\n\t\tone = new Node(1, new Node[] {two});\n\t}", "public static void createTree(SuccessorGenerator generator, GameState initialState)\n {\n LinkedList<GameState> currentLevel = new LinkedList<GameState>();\n currentLevel.add(initialState);\n Player currentPlayer = Player.PLAYER_MAX;\n \n int level = 0;\n while(true)\n {\n LinkedList<GameState> nextLevel = new LinkedList<GameState>();\n \n /*Gerando todas as ações possíveis para o nível atual.*/\n for(GameState state : currentLevel)\n {\n generator.generateSuccessors(state, currentPlayer);\n \n for(int i = 0; i < state.getChildren().size(); i++)\n {\n GameState successorState = state.getChildren().get(i);\n nextLevel.add(successorState);\n }\n }\n System.out.println(\"Expandindo nível \"+(level++)+\" com \"+nextLevel.size()+\" estados.\");\n \n /*Alternando jogadores*/\n currentPlayer = (currentPlayer == Player.PLAYER_MAX)?\n Player.PLAYER_MIN:\n Player.PLAYER_MAX; \n \n /*Busca termina quando todos os estados foram explorados*/\n if(nextLevel.isEmpty()) break;\n \n currentLevel.clear();\n currentLevel.addAll(nextLevel);\n }\n \n }" ]
[ "0.71319634", "0.69619876", "0.6959782", "0.69512796", "0.67706496", "0.6709603", "0.66832757", "0.66421175", "0.6597268", "0.6556422", "0.64988804", "0.64983124", "0.649758", "0.648163", "0.6480373", "0.6469369", "0.6454014", "0.6453771", "0.64506316", "0.6432978", "0.64208704", "0.6420495", "0.6410889", "0.6392417", "0.6387165", "0.63811505", "0.63694507", "0.6358472", "0.6350044", "0.63238025", "0.6305517", "0.6285502", "0.6283186", "0.62795097", "0.62687206", "0.6244782", "0.6237615", "0.62301993", "0.62279373", "0.621174", "0.6208779", "0.62052166", "0.6201004", "0.6195067", "0.619204", "0.61879665", "0.6167953", "0.6153212", "0.61397684", "0.6137159", "0.61370087", "0.61336565", "0.61261946", "0.6125575", "0.6120782", "0.6109917", "0.6109183", "0.6105582", "0.6083577", "0.60654014", "0.6060077", "0.60423523", "0.6032321", "0.60303813", "0.60287637", "0.6021256", "0.60149384", "0.601113", "0.6005624", "0.5998083", "0.59950036", "0.59907234", "0.5988561", "0.59784985", "0.5971298", "0.59709245", "0.59703743", "0.5968642", "0.59668344", "0.5960508", "0.59577066", "0.5954703", "0.59472173", "0.59446687", "0.5939168", "0.5933212", "0.59277946", "0.59266067", "0.592445", "0.5920359", "0.59185994", "0.59178394", "0.5916572", "0.59159994", "0.59133005", "0.5911198", "0.590628", "0.59022474", "0.58994246", "0.5886763", "0.5885692" ]
0.0
-1
construct tree for test
@Test public void testIndexNodeRedistribute(){ LeafNode<Integer, Integer> leaf1 = new LeafNode<Integer, Integer>(2, 2); leaf1.insertSorted(3, 3); LeafNode<Integer, Integer> leaf2 = new LeafNode<Integer, Integer>(5, 5); leaf2.insertSorted(7, 7); leaf2.insertSorted(8, 8); LeafNode<Integer, Integer> leaf3 = new LeafNode<Integer, Integer>(14, 14); leaf3.insertSorted(16, 16); LeafNode<Integer, Integer> leaf3_3 = new LeafNode<Integer, Integer>(17, 17); leaf3_3.insertSorted(18, 18); leaf3_3.insertSorted(19, 19); LeafNode<Integer, Integer> leaf4 = new LeafNode<Integer, Integer>(22,22); leaf4.insertSorted(27, 27); leaf4.insertSorted(29, 29); LeafNode<Integer, Integer> leaf5 = new LeafNode<Integer, Integer>(33, 33); leaf5.insertSorted(34, 34); leaf5.insertSorted(38, 38); leaf5.insertSorted(39, 39); leaf1.nextLeaf = leaf2; leaf2.previousLeaf = leaf1; leaf2.nextLeaf = leaf3; leaf3.previousLeaf = leaf2; leaf3.nextLeaf = leaf4; leaf4.previousLeaf = leaf3; leaf4.nextLeaf = leaf5; leaf5.previousLeaf = leaf4; ArrayList<Integer> leftkeys = new ArrayList<>(); leftkeys.add(5); leftkeys.add(13); leftkeys.add(17); ArrayList<Node<Integer, Integer>> leftNodeChilds = new ArrayList<>(); leftNodeChilds.add(leaf1); leftNodeChilds.add(leaf2); leftNodeChilds.add(leaf3 ); leftNodeChilds.add(leaf3_3); IndexNode<Integer, Integer> left = new IndexNode<>(leftkeys, leftNodeChilds); IndexNode<Integer, Integer> right = new IndexNode<>(30, leaf4, leaf5); IndexNode<Integer, Integer> parent = new IndexNode<>(20, left, right); left.parent = parent; right.parent = parent; // -----end construction BPlusTree<Integer, Integer> tree = new BPlusTree<>(); tree.root = parent; int index = tree.handleIndexNodeUnderflow(left, right, parent); System.out.println(index); Integer a = tree.search(17); System.out.println(a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}", "@Test\n\tpublic void testBuildTree() {\n\t\tTree<Integer> tree = new Tree<Integer> ();\n\t\t//add first level children, 1\n\t\tNode<Integer> root = tree.getRoot();\n\t\troot.addChild(new Node<Integer>());\n\t\tNode<Integer> c1 = root.getFirstChild();\n\t\tassertTrue(c1.getData() == null);\n\t\t//add second level children, 3\n\t\tc1.addChild(new Node<Integer> ());\n\t\tc1.addChild(new Node<Integer> ());\n\t\tc1.addChild(new Node<Integer> ());\n\t\tassertTrue(c1.countChildren() == 3);\n\t\t//add third level children, 3 * 3\n\t\tint[][] leafData = {\n\t\t\t\t{8,7,2},\n\t\t\t\t{9,1,6},\n\t\t\t\t{2,4,1}\n\t\t};\n\t\tNode<Integer> c2 = c1.getFirstChild();\n\t\tint i = 0;\n\t\twhile (c2 != null) {\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][0]));\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][1]));\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][2]));\n\t\t\tc2 = c2.next();\n\t\t\ti++;\n\t\t}\n\t\tassertTrue(tree.countDepth() == 3);\n\t\tNode<Integer> leaf = root;\n\t\twhile (leaf.countChildren() > 0) {\n\t\t\tleaf = leaf.getFirstChild();\n\t\t}\n\t\tassertTrue(leaf.getData() == 8);\t\t\t\n\t}", "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "@Before\n public void prepareTree() {\n tree = new TreeNode();\n nodeOne = new TreeNode();\n nodeTwo = new TreeNode();\n nodeThree = new TreeNode();\n }", "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode111());\n structure.getNode11().branchList.add(structure.getNode112());\n structure.getNode11().branchList.add(structure.getNode113());\n\n structure.getNode13().branchList.add(structure.getNode131());\n\n structure.getNode112().branchList.add(structure.getNode1121());\n\n }", "@Test\n public void testPhylogeneticTreeParserNoNamesNoDistance() {\n // create the actual tree\n String tree = \"(,,(,));\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "public TreeTest(String name) {\r\n super(name);\r\n }", "public void createTree() {\n Node<String> nodeB = new Node<String>(\"B\", null, null);\n Node<String> nodeC = new Node<String>(\"C\", null, null);\n Node<String> nodeD = new Node<String>(\"D\", null, null);\n Node<String> nodeE = new Node<String>(\"E\", null, null);\n Node<String> nodeF = new Node<String>(\"F\", null, null);\n Node<String> nodeG = new Node<String>(\"G\", null, null);\n root.leftChild = nodeB;\n root.rightChild = nodeC;\n nodeB.leftChild = nodeD;\n nodeB.rightChild = nodeE;\n nodeC.leftChild = nodeF;\n nodeC.rightChild = nodeG;\n\n }", "public void testBuildTreeDeepStructure() {\n TreeNode root = buildRootNodeFromFile(\"testWihManyLevels.js\");\n\n // Ensure the hierarchy is correct.\n assertEquals(\"suite1\", root.getNodeValue().getTestText());\n assertEquals(4, root.getChildCount());\n }", "@Before\r\n public void setUp() throws Exception {\r\n Node childTwo = new Node(5, new Node(2), null);\r\n Node childOne = new Node(3, new Node(9), new Node(12));\r\n Node rootNode = new Node(1, childOne, childTwo);\r\n tree = new Tree();\r\n tree.root = rootNode;\r\n }", "public static Node constructTree() {\n\n Node node2 = new Node(2, null, null);\n Node node8 = new Node(8, null, null);\n Node node12 = new Node(12, null, null);\n Node node17 = new Node(17, null, null);\n\n Node node6 = new Node(6, node2, node8);\n Node node15 = new Node(15, node12, node17);\n\n //Root Node\n Node node10 = new Node(10, node6, node15);\n\n return node10;\n }", "@Before\n\tpublic void buildCategories()\n\t{\n\t\t// make a root node for the tree (i.e. like a franchise in the CR data set\n\t\tCategoryNode rootParent = null;\n\t\taRootCategory = new CategoryNode(\"rootCategoryId\", \"rootCategoryName\", rootParent);\n\t\t\n\t\t// Add a subtree containing a singleton. The singleton should get removed\n\t\tCategoryNode singleton = new CategoryNode(\"singletonId\", \"singletonName\", aRootCategory);\n\t\taRootCategory.addSubcategory(singleton);\n\t\tCategoryNode childOfSingleton = new CategoryNode(\"childOfSingletonId\", \"childOfSingletonName\", singleton);\n\t\tsingleton.addSubcategory(childOfSingleton);\n\t\tCategoryNode leaf0 = new CategoryNode(\"leaf0Id\", \"leaf0Name\", childOfSingleton);\n\t\tchildOfSingleton.addSubcategory(leaf0);\n\t\tCategoryNode leaf1 = new CategoryNode(\"leaf1Id\", \"leaf1Name\", childOfSingleton);\n\t\tchildOfSingleton.addSubcategory(leaf1);\n\t\t\n\t\t// Add a subtree will have similar leaves, so the subtree should be turned into an equivalence class\n\t\tCategoryNode equivalenceClass = new CategoryNode(\"equivalenceClassId\", \"equivalenceClassName\", aRootCategory);\n\t\taRootCategory.addSubcategory(equivalenceClass);\n\t\tCategoryNode similarNode0 = new CategoryNode(\"similarNode0Id\", \"similarNode0Name\", equivalenceClass);\n\t\tequivalenceClass.addSubcategory(similarNode0);\n\t\tCategoryNode similarNode1 = new CategoryNode(\"similarNode1Id\", \"similarNode1Name\", equivalenceClass);\n\t\tequivalenceClass.addSubcategory(similarNode1);\n\t\t\n\t\t// This subtree has dissimilar leaves, so the subtree shouldn't be turned into an equivalence class\n\t\tCategoryNode nonEquivalenceClass = new CategoryNode(\"nonEquivalenceClassId\", \"nonEquivalenceClassName\", aRootCategory);\n\t\taRootCategory.addSubcategory(nonEquivalenceClass);\n\t\tCategoryNode dissimilarNode0 = new CategoryNode(\"dissimilarNode0Id\", \"dissimilarNode0Name\", nonEquivalenceClass);\n\t\tnonEquivalenceClass.addSubcategory(dissimilarNode0);\n\t\tCategoryNode dissimilarNode1 = new CategoryNode(\"dissimilarNode1Id\", \"dissimilarNode1Name\", nonEquivalenceClass);\n\t\tnonEquivalenceClass.addSubcategory(dissimilarNode1);\n\t}", "public RBTree() {\r\n\t\t// well its supposed just create a new Red Black Tree\r\n\t\t// Maybe create a new one that does a array of Objects\r\n\t}", "void create(Node node) {\n if (node.table.negatives() == 0) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n if (node.table.positives() == 0) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n\r\n //If no test split the data, make it a leaf with the majoriti of the target atribute\r\n int atr;\r\n //Choose the best atribute\r\n atr = this.chooseBestAtrib(node);\r\n node.atribute = atr;\r\n\r\n //No atribute split the data, so make the node a leaf with the majoriti of the class (either positive or negative)\r\n if (node.atribute == -1) {\r\n //System.out.println(\"Atribute is -1 in TeeBuidler.create\");\r\n if (node.table.negatives() > node.table.positives()) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n if (node.table.positives() >= node.table.negatives()) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n }\r\n\r\n Table table_left = new Table(), table_right = new Table();\r\n node.table.splitByAtrib(node.atribute, table_left, table_right);\r\n\r\n //Create two children for the current node //parameters: identifier,parent_result,atribute of split,id_child1, id_child2, table\r\n node.child_left = new Node(node.id + node.id, \"1\", -1, -1, -1, table_left);\r\n node.child_right = new Node(node.id + node.id+1, \"0\", -1, -1, -1, table_right);\r\n node.id_child_left = node.id + node.id;\r\n node.id_child_right = node.id + node.id+1;\r\n\r\n\r\n TreeBuilder builder = new TreeBuilder();\r\n builder.create(node.child_left);\r\n builder.create(node.child_right);\r\n\r\n }", "private CategoryView buildComplicatedExpectedTree() {\n\n CategoryView root = new CategoryView(\"ROOT\");\n CategoryView a = new CategoryView(\"a\");\n CategoryView b = new CategoryView(\"b\");\n CategoryView c = new CategoryView(\"c\");\n CategoryView d = new CategoryView(\"d\");\n CategoryView e = new CategoryView(\"e\");\n\n root.addChild(a);\n root.addChild(e);\n root.addChild(new CategoryView(\"f\"));\n root.addChild(new CategoryView(\"g\"));\n root.addChild(new CategoryView(\"z\"));\n a.addChild(b);\n b.addChild(c);\n a.addChild(c);\n c.addChild(d);\n d.addChild(e);\n c.addChild(e);\n\n root.addChild(new CategoryView(\"1\") {{\n addChild(new CategoryView(\"2\") {{\n addChild(new CategoryView(\"3\"));\n }});\n }});\n root.addChild(new CategoryView(\"x\") {{\n addChild(new CategoryView(\"y\"));\n }});\n\n return root;\n }", "public static TreeNode constructTreeNode(String testData) {\n\n if (testData == null || testData.equals(\"[]\")) {\n System.out.printf(\"%s\\n\", \"construct tree failed, input data is null or empty\");\n return null;\n }\n\n if (testData.indexOf(\"[\") != 0 || testData.indexOf(\"]\") != testData.length()-1) {\n System.out.printf(\"%s\\n\", \"construct tree failed, input data is invalid\");\n return null;\n }\n\n String data = testData.substring(1, testData.length()-1);\n String[] dataList = data.split(\",\");\n TreeNode[] nodeArray = new TreeNode[dataList.length];\n\n for (int i=0; i<dataList.length; i++) {\n if (!dataList[i].equals(\"null\")) {\n TreeNode node = new TreeNode(Integer.valueOf(dataList[i]));\n nodeArray[i] = node;\n }\n }\n\n // Construct binary tree\n // If the index of root = 0\n // The index of left of the node(index = m) is 2*m +1\n // If the index of root = 1\n // Then the index of left of the node(index = m) is 2*m -1\n\n for (int i=0; i<nodeArray.length; i++) {\n if (nodeArray[i] != null) {\n int indexOfLeft = i * 2 + 1;\n int indexOfRight = indexOfLeft + 1;\n\n if (indexOfLeft < nodeArray.length && nodeArray[indexOfLeft] != null) {\n nodeArray[i].left = nodeArray[indexOfLeft];\n }\n\n if (indexOfRight < nodeArray.length && nodeArray[indexOfRight] != null) {\n nodeArray[i].right = nodeArray[indexOfRight];\n }\n }\n }\n\n return nodeArray[0];\n }", "private void setup(){\n buildTree(2);\n }", "public static Node buildRandomTree() {\n\t\tNode root = createNode(15);\n\t\troot.leftChild = createNode(10);\n\t\troot.rightChild = createNode(4);\n\t\troot.leftChild.leftChild = createNode(25);\n\t\troot.leftChild.leftChild.rightChild = createNode(27);\n\t\troot.leftChild.leftChild.leftChild = createNode(13);\n\t\troot.leftChild.rightChild = createNode(25);\n\t\troot.leftChild.rightChild.rightChild = createNode(7);\n\t\t\n\t\treturn root;\n\t}", "public MorseCodeTree()\r\n\t{\r\n\t\tbuildTree();\r\n\t}", "TestNode createTestNode();", "private Node constructParsedTree(Node[] nodes) {\n int rootIndex = 0;\n for (int i = 0; i < nodes.length; i++) {\n if (nodes[i].getFather() > 0)\n nodes[nodes[i].getFather() - 1].addChild(nodes[i]);\n else\n rootIndex = i;\n }\n return nodes[rootIndex];\n }", "@Test\n public void testPhylogeneticTreeParserNamedLeafsNoDistance() {\n // create the actual tree\n String tree = \"(A,B,(C,D));\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setName(\"A\");\n current = new PhylogeneticTreeItem();\n current.setName(\"B\");\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"C\");\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"D\");\n\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "@Before\n public void setUp() {\n this.tree = new SimpleBinarySearchTree<>();\n }", "private TreeNode createTree() {\n // Map<String, String> map = new HashMap<>();\n // map.put(\"dd\", \"qq\");\n // 叶子节点\n TreeNode G = new TreeNode(\"G\");\n TreeNode D = new TreeNode(\"D\");\n TreeNode E = new TreeNode(\"E\", G, null);\n TreeNode B = new TreeNode(\"B\", D, E);\n TreeNode H = new TreeNode(\"H\");\n TreeNode I = new TreeNode(\"I\");\n TreeNode F = new TreeNode(\"F\", H, I);\n TreeNode C = new TreeNode(\"C\", null, F);\n // 构造根节点\n TreeNode root = new TreeNode(\"A\", B, C);\n return root;\n }", "public void createTree() {\n\t\taddNodeToParent(nodeMap);\n\t}", "@Test\n public void testAllConstructions() throws IOException, LexerException, ParseException {\n TreeNode<ASTNode> tree = getTree(\"all.txt\");\n System.out.println(tree);\n }", "public HIRTree(){\r\n\t\t\r\n\t}", "@Test\n public void testPhylogeneticTreeParserNamednodesNoDistance() {\n // create the actual tree\n String tree = \"(A,B,(C,D)E)F;\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n rootExpected.setName(\"F\");\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setName(\"A\");\n current = new PhylogeneticTreeItem();\n current.setName(\"B\");\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setName(\"E\");\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"C\");\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"D\");\n\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "public BuildTree createBuildTree() {\n BuildTree buildTree = new BuildTree();\n createBuildTree(0, buildTree);\n return buildTree;\n }", "public void setUp() {\r\n tree = new Lab14BinarySearchTree<String>();\r\n }", "public static TreeNode buildTree01() {\n\t\t\n\t\tTreeNode root = new TreeNode(5);\n\t\t\n\t\troot.left = new TreeNode(4);\n\t\troot.left.left = new TreeNode(11);\n\t\troot.left.left.left = new TreeNode(7);\n\t\troot.left.left.right = new TreeNode(2);\n\t\t\n\t\troot.right = new TreeNode(8);\n\t\troot.right.left = new TreeNode(13);\n\t\troot.right.right = new TreeNode(4);\n\t\troot.right.right.right = new TreeNode(1);\n\t\t\n\t\treturn root;\n\t}", "FractalTree() {\r\n }", "@Test\n public void whenAddNodesOnDifferentLevelsThenResultThreeNodeFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 2, 1]\"));\n }", "@Test\n\tpublic void testTreeData_1()\n\t\tthrows Exception {\n\n\t\tTreeData result = new TreeData();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.getType());\n\t\tassertEquals(null, result.getDescription());\n\t\tassertEquals(0, result.getCount());\n\t\tassertEquals(null, result.getIfile());\n\t}", "@Test\n public void whenAddNodesOnOneLevelThenResultThreeNodesInLine() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(nodeTwo, \"2\");\n tree.addChild(nodeThree, \"3\");\n assertThat(tree.getChildren().toString(), is(\"[1, 2, 3]\"));\n }", "public static TreeNode buildTree02() {\n\t\t\n\t\tTreeNode root = new TreeNode(5);\n\t\t/*\n\t\troot.left = new TreeNode(4);\n\t\troot.left.left = new TreeNode(11);\n\t\troot.left.left.left = new TreeNode(7);\n\t\troot.left.left.right = new TreeNode(2);\n\t\t\n\t\troot.right = new TreeNode(8);\n\t\troot.right.left = new TreeNode(13);\n\t\troot.right.right = new TreeNode(4);\n\t\troot.right.right.left = new TreeNode(5);\n\t\troot.right.right.right = new TreeNode(1);\n\t\t*/\n\t\treturn root;\n\t}", "private static void test1() {\n BinaryTreeNode node1 = new BinaryTreeNode(8);\n BinaryTreeNode node2 = new BinaryTreeNode(6);\n BinaryTreeNode node3 = new BinaryTreeNode(10);\n BinaryTreeNode node4 = new BinaryTreeNode(5);\n BinaryTreeNode node5 = new BinaryTreeNode(7);\n BinaryTreeNode node6 = new BinaryTreeNode(9);\n BinaryTreeNode node7 = new BinaryTreeNode(11);\n node1.left = node2;\n node1.right = node3;\n node2.left = node4;\n node2.right = node5;\n node3.left = node6;\n node3.right = node7;\n test(\"Test1\", node1, true);\n }", "@Test\n\tpublic void testTreeData_2()\n\t\tthrows Exception {\n\t\tIFile ifile = null;\n\t\tString description = \"\";\n\t\tint count = 1;\n\t\tint type = 1;\n\n\t\tTreeData result = new TreeData(ifile, description, count, type);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(1, result.getType());\n\t\tassertEquals(\"\", result.getDescription());\n\t\tassertEquals(1, result.getCount());\n\t\tassertEquals(null, result.getIfile());\n\t}", "public static TreeNode buildTree() {\n\t\t\n\t\tTreeNode root = new TreeNode(1);\n\t\t\n\t\tTreeNode left = new TreeNode(2);\n\t\tleft.left = new TreeNode(4);\n\t\tleft.right = new TreeNode(5);\n\t\tleft.right.right = new TreeNode(8);\n\t\t\n\t\tTreeNode right = new TreeNode(3);\n\t\tright.left = new TreeNode(6);\n\t\tright.right = new TreeNode(7);\n\t\tright.right.left = new TreeNode(9);\n\t\t\n\t\troot.left = left;\n\t\troot.right = right;\n\t\t\n\t\treturn root;\n\t}", "static private DecisionTree buildTree(ItemSet learningSet, \n\t\t\t\t\t AttributeSet testAttributes, \n\t\t\t\t\t SymbolicAttribute goalAttribute) {\n\tDecisionTreeBuilder builder = \n\t new DecisionTreeBuilder(learningSet, testAttributes,\n\t\t\t\t goalAttribute);\n\t\n\treturn builder.build();\n }", "public BinaryTree() {\n\t}", "public TwoFourTree()\r\n\t{\r\n\t\troot = new TreeNode(); //assign the root to a new tree node\r\n\t}", "public BinaryTree(){}", "@Test\n public void testPhylogeneticTreeParserUnnamednodesAndDistance() {\n // create the actual tree\n String tree = \"(:0.1,:0.2,(:0.3,:0.4):0.5);\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setDistance(0.2);\n current = new PhylogeneticTreeItem();\n current.setDistance(0.1);\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setDistance(0.5);\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setDistance(0.3);\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setDistance(0.4);\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "@Override\r\n\tpublic void buildTree() {\r\n\t\t\r\n\t\t// root level \r\n\t\trootNode = new TreeNode<String>(\"\");\r\n\t\t\r\n\t\t//first level\r\n\t\tinsert(\".\", \"e\");\r\n\t\tinsert(\"-\", \"t\");\r\n\t\t\r\n\t\t//second level\r\n\t\t\r\n\t\tinsert(\". .\", \"i\");\r\n\t\tinsert(\".-\", \"a\");\r\n\t\tinsert(\"-.\", \"n\"); \r\n\t\tinsert(\"--\", \"m\");\r\n\t\t\r\n\t\t//third level\r\n\t\tinsert(\"...\", \"s\");\r\n\t\tinsert(\"..-\", \"u\");\r\n\t\tinsert(\".-.\", \"r\");\r\n\t\tinsert(\".--\", \"w\");\r\n\t\tinsert(\"-..\", \"d\");\r\n\t\tinsert(\"-.-\", \"k\");\r\n\t\tinsert(\"--.\", \"g\");\r\n\t\tinsert(\"---\", \"o\");\r\n\t\t\r\n\t\t//fourth level\r\n\t\tinsert(\"....\", \"h\");\r\n\t\tinsert(\"...-\", \"v\");\r\n\t\tinsert(\"..-.\", \"f\");\r\n\t\tinsert(\".-..\", \"l\");\r\n\t\tinsert(\".--.\", \"p\");\r\n\t\tinsert(\".---\", \"j\");\r\n\t\tinsert(\"-...\", \"b\");\r\n\t\tinsert(\"-..-\", \"x\");\r\n\t\tinsert(\"-.-.\", \"c\");\r\n\t\tinsert(\"-.--\", \"y\");\r\n\t\tinsert(\"--..\", \"z\");\r\n\t\tinsert(\"--.-\", \"q\");\r\n\t\t\r\n\t}", "public Tree(){\n root = null;\n }", "private BinaryTree<Character> constructTree(){\n if(pq.size() == 1) return pq.poll().data;\n if(pq.size() == 0) return null;\n // Poll the lowest two trees, combine them, then stick them back in the queue.\n Helper<BinaryTree<Character>> temp0 = pq.poll(), temp1 = pq.poll(),\n result = new Helper<>(temp0.priority + temp1.priority, new BinaryTree<>(temp0.data, null , temp1.data));\n pq.add(result);\n // Call again to keep constructing.\n return constructTree();\n }", "@Test\r\n\tpublic void firstTest() {\r\n\t\t\r\n\t\tTree tree = new Tree(\"greg\");\r\n\t\ttree.addElement(\"opera\");\r\n\t\ttree.addElement(\"qwerty\");\r\n\t\ttree.addElement(\"odf\");\r\n\t\ttree.addElement(7363);\r\n\t\ttree.addElement(new Double(23.3));\r\n\t\t\r\n\t\tassertTrue(tree.contains(7363));\r\n\t\tassertTrue(tree.contains(\"greg\"));\r\n\t\tassertTrue(tree.contains(\"opera\"));\r\n\t\tassertTrue(tree.contains(\"odf\"));\r\n\t}", "private static void test2() {\n BinaryTreeNode node1 = new BinaryTreeNode(1);\n BinaryTreeNode node2 = new BinaryTreeNode(2);\n BinaryTreeNode node3 = new BinaryTreeNode(3);\n BinaryTreeNode node4 = new BinaryTreeNode(4);\n BinaryTreeNode node5 = new BinaryTreeNode(5);\n BinaryTreeNode node6 = new BinaryTreeNode(6);\n BinaryTreeNode node7 = new BinaryTreeNode(7);\n node1.left = node2;\n node1.right = node3;\n node2.left = node4;\n node2.right = node5;\n node5.left = node7;\n node3.right = node6;\n test(\"Test2\", node1, true);\n }", "static private DecisionTree buildTree(ItemSet learningSet, \n\t\t\t\t\t AttributeSet testAttributes, \n\t\t\t\t\t SymbolicAttribute goalAttribute) {\n\tDecisionTreeBuilder builder = \n\t new DecisionTreeBuilder(learningSet, testAttributes,\n\t\t\t\t goalAttribute);\n\t\n\treturn builder.build().decisionTree();\n }", "@Test\n public void testPhylogeneticTreeParserNamednodesAndDistance() {\n // create the actual tree\n String tree = \"(A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F;\";\n PhylogeneticTreeItem rootActual = PhylogeneticTreeParser.parse(tree);\n\n // create the expected Tree\n // root node\n PhylogeneticTreeItem rootExpected = new PhylogeneticTreeItem();\n rootExpected.setName(\"F\");\n // add 3 child nodes\n PhylogeneticTreeItem current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setName(\"A\");\n current.setDistance(0.1);\n current = new PhylogeneticTreeItem();\n current.setName(\"B\");\n current.setDistance(0.2);\n current.setParent(rootExpected);\n current = new PhylogeneticTreeItem();\n current.setParent(rootExpected);\n current.setName(\"E\");\n current.setDistance(0.5);\n // add 2 child nodes to the third node\n PhylogeneticTreeItem current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"C\");\n current2.setDistance(0.3);\n current2 = new PhylogeneticTreeItem();\n current2.setParent(current);\n current2.setName(\"D\");\n current2.setDistance(0.4);\n\n // compare the trees\n assertEquals(\"both trees do not match\", rootExpected, rootActual);\n\n }", "@Test\n public void treeSample() {\n this.pool.invoke(JobTrees.buildTree());\n }", "public TernaryTree() {\n root = null;\n\n }", "@org.junit.Test\n public void constrCompelemNested1() {\n final XQuery query = new XQuery(\n \"element elem {1, element a {2, element b {element c {}, element d {3}}, 4}}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertSerialization(\"<elem>1<a>2<b><c/><d>3</d></b>4</a></elem>\", false)\n );\n }", "public KdTree() \r\n\t{\r\n\t}", "private void constructBSTree(Node<T> u, int n, String lr) {\n\t\tn++;\n\t\taddToPT(n, lr + \" \" + u.x.toString());\n\t\telements.add(u.x);\n\t\tif (u.left != nil)\n\t\t\tconstructBSTree(u.left, n, lr + \"L\");\n\t\tif (u.right != nil)\n\t\t\tconstructBSTree(u.right, n, lr + \"R\");\n\t}", "public static TreeNode getTree() {\n\t\tTreeNode a = new TreeNode(\"a\", 314);\n\t\tTreeNode b = new TreeNode(\"b\", 6);\n\t\tTreeNode c = new TreeNode(\"c\", 271);\n\t\tTreeNode d = new TreeNode(\"d\", 28);\n\t\tTreeNode e = new TreeNode(\"e\", 0);\n\t\tTreeNode f = new TreeNode(\"f\", 561);\n\t\tTreeNode g = new TreeNode(\"g\", 3);\n\t\tTreeNode h = new TreeNode(\"h\", 17);\n\t\tTreeNode i = new TreeNode(\"i\", 6);\n\t\tTreeNode j = new TreeNode(\"j\", 2);\n\t\tTreeNode k = new TreeNode(\"k\", 1);\n\t\tTreeNode l = new TreeNode(\"l\", 401);\n\t\tTreeNode m = new TreeNode(\"m\", 641);\n\t\tTreeNode n = new TreeNode(\"n\", 257);\n\t\tTreeNode o = new TreeNode(\"o\", 271);\n\t\tTreeNode p = new TreeNode(\"p\", 28);\n\t\t\n\t\ta.left = b; b.parent = a;\n\t\tb.left = c; c.parent = b;\n\t\tc.left = d;\t d.parent = c;\n\t\tc.right = e; e.parent = c;\n\t\tb.right = f; f.parent = b;\n\t\tf.right = g; g.parent = f;\n\t\tg.left = h; h.parent = g;\n\t\ta.right = i; i.parent = a;\n\t\ti.left = j; j.parent = i;\n\t\ti.right = o; o.parent = i;\n\t\tj.right = k; k.parent = j;\n\t\to.right = p; p.parent = o;\n\t\tk.right = n; n.parent = k;\n\t\tk.left = l; l.parent = k;\n\t\tl.right = m; m.parent = l;\n\t\t\n\t\td.childrenCount = 0;\n\t\te.childrenCount = 0;\n\t\tc.childrenCount = 2;\n\t\tb.childrenCount = 6;\n\t\tf.childrenCount = 2;\n\t\tg.childrenCount = 1;\n\t\th.childrenCount = 0;\n\t\tl.childrenCount = 1;\n\t\tm.childrenCount = 0;\n\t\tn.childrenCount = 0;\n\t\tk.childrenCount = 3;\n\t\tj.childrenCount = 4;\n\t\to.childrenCount = 1;\n\t\tp.childrenCount = 0;\n\t\ti.childrenCount = 7;\n\t\ta.childrenCount = 15;\n\t\t\n\t\treturn a;\n\t}", "@Override\n\tpublic TreeNode buildTree(String[] exp) {\n\t\tStack<TreeNode> stk = new Stack<TreeNode>();\n\t\tTreeNode tmpL, tmpR, tmpRoot;\n\t\tint i;\n\n\t\tfor(String s: exp) {\n\t\t\tif(s.equals(EMPTY))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\ti = Integer.parseInt(s);\n\t\t\t\tstk.push(new TreeNode(EMPTY + i));\n\t\t\t}\n\t\t\tcatch (NumberFormatException n) {\n\t\t\t\ttmpR = stk.pop();\n\t\t\t\ttmpL = stk.pop();\n\t\t\t\ttmpRoot = new TreeNode(s, tmpL, tmpR);\n\t\t\t\tstk.push(tmpRoot);\n\t\t\t}\n\t\t}\n\n\t\treturn stk.pop();\n\n\t}", "public BSTTreeBlueJTest()\n {\n }", "private void createTree() {\n\n // custom brown color\n Color brown = new Color(149, 99, 57);\n\n // trunk\n NscComponent trunk = new NscRectangle(49, 164, 13, 51);\n createShape(trunk, brown, true);\n\n // branches\n drawLine(50, 125, 50, 165, 10, brown);\n drawLine(25, 125, 50, 165, 10, brown);\n drawLine(75, 125, 50, 165, 10, brown);\n\n // branch outlines\n drawLine(49, 125, 49, 150, 1, Color.black);\n drawLine(60, 125, 60, 150, 1, Color.black);\n drawLine(24, 125, 49, 165, 1, Color.black);\n drawLine(35, 125, 50, 150, 1, Color.black);\n drawLine(85, 125, 60, 165, 1, Color.black);\n drawLine(74, 125, 60, 150, 1, Color.black);\n\n // leafs\n NscEllipse leafs2 = new NscEllipse(0, 5, 60, 122);\n NscEllipse leafs3 = new NscEllipse(50, 5, 60, 122);\n NscEllipse leafs = new NscEllipse(25, 0, 60, 127);\n NscEllipse leafs4 = new NscEllipse(25, 1, 60, 124);\n createShape(leafs2, treeColor, true);\n createShape(leafs3, treeColor, true);\n createShape(leafs, treeColor, true);\n createShape(leafs4, treeColor, false);\n\n repaint();\n }", "@Test\n public void whenAddNineNodesOnDifferentLevelsThenResultNineNodesFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(new TreeNode(), \"1\");\n tree.addChild(new TreeNode(), \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 3, 3, 2, 2, 2, 1, 1, 1]\"));\n }", "@Test\n public void testExpandTree() {\n // TODO: test ExpandTree\n }", "public TreeNode() {\n }", "public Tree()\n\t{\n\t\tsuper(\"Tree\", \"tree\", 0);\n\t}", "public Tree() // constructor\n\t{ root = null; }", "protected PhraseTree() {}", "private static SVIntervalTree<String> initTree() {\n final SVIntervalTree<String> tree = new SVIntervalTree<>();\n final String[] genes = {\"A\", \"B\", \"C\", \"D\", \"E\"};\n if (transcriptionStartSites.length != genes.length) {\n throw new TestException(\"Transcription start sites list and genes array are not the same length\");\n }\n for ( int idx = 0; idx < genes.length; ++idx ) {\n tree.put(transcriptionStartSites[idx], genes[idx]);\n }\n return tree;\n }", "public static Node createLargeTree() {\n final int dcCount = 2;\n final int rackCount = 6;\n final int snCount = 6;\n final int hdCount = 12;\n\n int id = 0;\n // root\n Node root = new Node();\n root.setName(\"root\");\n root.setId(id++);\n root.setType(Types.ROOT);\n root.setSelection(Selection.STRAW);\n // DC\n List<Node> dcs = new ArrayList<Node>();\n for (int i = 1; i <= dcCount; i++) {\n Node dc = new Node();\n dcs.add(dc);\n dc.setName(\"dc\" + i);\n dc.setId(id++);\n dc.setType(Types.DATA_CENTER);\n dc.setSelection(Selection.STRAW);\n dc.setParent(root);\n // racks\n List<Node> racks = new ArrayList<Node>();\n for (int j = 1; j <= rackCount; j++) {\n Node rack = new Node();\n racks.add(rack);\n rack.setName(dc.getName() + \"rack\" + j);\n rack.setId(id++);\n rack.setType(StorageSystemTypes.RACK);\n rack.setSelection(Selection.STRAW);\n rack.setParent(dc);\n // storage nodes\n List<Node> sns = new ArrayList<Node>();\n for (int k = 1; k <= snCount; k++) {\n Node sn = new Node();\n sns.add(sn);\n sn.setName(rack.getName() + \"sn\" + k);\n sn.setId(id++);\n sn.setType(StorageSystemTypes.STORAGE_NODE);\n sn.setSelection(Selection.STRAW);\n sn.setParent(rack);\n // hds\n List<Node> hds = new ArrayList<Node>();\n for (int l = 1; l <= hdCount; l++) {\n Node hd = new Node();\n hds.add(hd);\n hd.setName(sn.getName() + \"hd\" + l);\n hd.setId(id++);\n hd.setType(StorageSystemTypes.DISK);\n hd.setWeight(100);\n hd.setParent(sn);\n }\n sn.setChildren(hds);\n }\n rack.setChildren(sns);\n }\n dc.setChildren(racks);\n }\n root.setChildren(dcs);\n return root;\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n byte[] byteArray0 = new byte[0];\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0, 1, 1);\n JavaParser javaParser0 = new JavaParser(byteArrayInputStream0);\n SimpleNode simpleNode0 = new SimpleNode(javaParser0, (-120811353));\n Node[] nodeArray0 = new Node[6];\n nodeArray0[0] = (Node) simpleNode0;\n nodeArray0[1] = (Node) simpleNode0;\n nodeArray0[2] = (Node) simpleNode0;\n nodeArray0[3] = (Node) simpleNode0;\n nodeArray0[4] = (Node) simpleNode0;\n SimpleNode simpleNode1 = new SimpleNode(javaParser0, 1);\n nodeArray0[5] = (Node) simpleNode1;\n simpleNode0.children = nodeArray0;\n int int0 = simpleNode0.jjtGetNumChildren();\n assertEquals(6, int0);\n }", "public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }", "private void buildTree() {\n\t\tfinal TreeSet<Tree> treeSet = new TreeSet<Tree>();\n\t\tfor (char i = 0; i < 256; i++) {\n\t\t\tif (characterCount[i] > 0) {\n\t\t\t\ttreeSet.add(new Tree(i, characterCount[i]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge the trees to one Tree\n\t\tTree left;\n\t\tTree right;\n\t\twhile (treeSet.size() > 1) {\n\t\t\tleft = treeSet.pollFirst();\n\t\t\tright = treeSet.pollFirst();\n\t\t\ttreeSet.add(new Tree(left, right));\n\t\t}\n\n\t\t// There is only our final tree left\n\t\thuffmanTree = treeSet.pollFirst();\n\t}", "public TreeNode() { \n this.name = \"\"; \n this.rule = new ArrayList<String>(); \n this.child = new ArrayList<TreeNode>(); \n this.datas = null; \n this.candAttr = null; \n }", "public void testSimpleManual() {\n\t\tBoard b = new Board();\n\t\tColoredAlligator a = new ColoredAlligator(true, true, new Color(0),\n\t\t\t\ttrue);\n\t\tb.addChild(a);\n\t\tEgg e1 = new Egg(true, true, new Color(0), true);\n\t\ta.addChild(e1);\n\t\tEgg e2 = new Egg(true, true, new Color(1), true);\n\t\tb.addChild(e2);\n\n\t\tString expected = \"{\\n\\t\\\"\" + \"families\\\" : [\\n\" + \"\\t\\t{\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"type\\\" : \\\"colored alligator\\\",\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"color\\\" : 0,\\n\" + \"\\t\\t\\t\\\"movable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"removable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"recolorable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"children\\\" : [\\n\" + \"\\t\\t\\t\\t{\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\t\\t\\\"type\\\" : \\\"egg\\\",\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\t\\t\\\"color\\\" : 0,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\t\\t\\\"movable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\t\\t\\\"removable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\t\\t\\\"recolorable\\\" : true\\n\" + \"\\t\\t\\t\\t}\\n\"\n\t\t\t\t+ \"\\t\\t\\t]\\n\" + \"\\t\\t},\\n\" + \"\\t\\t{\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"type\\\" : \\\"egg\\\",\\n\" + \"\\t\\t\\t\\\"color\\\" : 1,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"movable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"removable\\\" : true,\\n\"\n\t\t\t\t+ \"\\t\\t\\t\\\"recolorable\\\" : true\\n\" + \"\\t\\t}\\n\\t]\\n\" + \"}\\n\";\n\t\tSystem.out.println(expected);\n\t\tassertEquals(expected, AlligatorToJson.convert(b));\n\t}", "@Before\n public void setUp()\n { example = new BSTTreeBlueJ<Integer>();\n example2 = new BSTTreeBlueJ<Integer>();\n example3 = new BSTTreeBlueJ<Integer>();\n }", "private void buildTree(int n, double x, double y, double a, double branchLength) {\n tree = new ArrayList<>();\n populateTree(n, x, y, a, branchLength);\n }", "public static Path genSimpleTestTree(Path root, String name) throws IOException {\n Path tmp = root.resolve(name);\n\n Path t1 = tmp.resolve(\"test.txt\");\n Path t2 = tmp.resolve(Paths.get(\"dir\", \"file.txt\"));\n Path t3 = tmp.resolve(Paths.get(\"dir\", \"subDir\", \"child.txt\"));\n\n PathHelper.mkdirs(t2.getParent());\n PathHelper.mkdirs(t3.getParent());\n Files.write(t1, TEST1.getBytes(StandardCharsets.UTF_8));\n Files.write(t2, TEST2.getBytes(StandardCharsets.UTF_8));\n Files.write(t3, TEST3.getBytes(StandardCharsets.UTF_8));\n\n return tmp;\n }", "void createTree() throws IOException {\n\n // create root\n rootTreeItem = createTreeRoot();\n\n // create tree structure recursively\n createTree(rootTreeItem);\n\n // sort tree structure by name\n rootTreeItem.getChildren()\n .sort(Comparator.comparing(new Function<TreeItem<FilePath>, String>() {\n @Override\n public String apply(TreeItem<FilePath> t) {\n return t.getValue().toString().toLowerCase();\n }\n }));\n\n }", "protected void init(String tree){\n\t\tJSONObject tree_model = null;\n\t\ttry {\n\t\t\ttree_model = (JSONObject)new JSONParser().parse(tree);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t\tJSONArray phys_tree = (JSONArray)tree_model.get(\"tree_diagram\");\n\t\troot_scheme = new TreeNode();\n\t\tbuildTree(phys_tree,root_scheme);\n\t}", "private static void test4() {\n BinaryTreeNode node1 = new BinaryTreeNode(5);\n BinaryTreeNode node2 = new BinaryTreeNode(4);\n BinaryTreeNode node3 = new BinaryTreeNode(3);\n BinaryTreeNode node4 = new BinaryTreeNode(2);\n BinaryTreeNode node5 = new BinaryTreeNode(1);\n node1.left = node2;\n node2.left = node3;\n node3.left = node4;\n node4.left = node5;\n test(\"Test4\", node1, false);\n }", "public static void main (String[] args) {\n\t\t\n\t\t//Tests\n\t\tTree testTree = new Leaf(null);\n\t\ttestTree = testTree.setUpTree(1);\n\t\ttestStuff(testTree.getValue(), 1);\n\t\ttestTree = testTree.setUpTree(2);\n\t\ttestStuff(testTree.getValue(), 1);\n\t\ttestStuff(testTree.getLeft().getValue(), 1);\n\t\ttestStuff(testTree.getRight().getValue(), 1);\n\t\ttestTree = testTree.setUpTree(4);\n\t\ttestStuff(testTree.getValue(), 1);\n\t\ttestStuff(testTree.getLeft().getValue(), 1);\n\t\ttestStuff(testTree.getLeft().getRight().getValue(), 2);\n\t\ttestStuff(testTree.getLeft().getLeft().getValue(), 1);\n\t\ttestStuff(testTree.getLeft().getLeft().getRight().getValue(), 3);\n\t\ttestStuff(testTree.getLeft().getRight().getRight().getValue(), 4);\n\t\ttestStuff(testTree.getRight().getLeft().getLeft().getValue(), \n\t\t\t\ttestTree.getLeft().getRight().getRight().getValue());\n\t\t//End of tests\n\t\t\n\t\tSystem.out.println(\"There were \" + Integer.toString(errors) + \" errors from the tests.\");\n\t\tSystem.out.println(\"Hi! Welcome to the NeuroScouting Tree Creator!\");\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tint input = -1;\n\t\t\n\t\twhile (input != 0) {\n\t\t\tSystem.out.print(\"Please enter your tree's height as an integer. Enter 0 to end: \");\n\t\t\tinput = in.nextInt();\n\t\t\tif (input != 0) {\n\t\t\t\ttestTree = testTree.setUpTree(input);\n\t\t\t\ttestTree.printTree();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Thank you for using NeuroScouting Tree Generator! Have a good day!\");\n\t}", "public JdbTree() {\r\n this(new Object [] {});\r\n }", "public BinaryTree(String expression) {\n \tString[] arr = expression.split(\" \");\n \troot = parse(arr);\n }", "public KdTree() \n\t {\n\t\t \n\t }", "public KdTree() {\n }", "public FamilyTree(){\r\n super();\r\n }", "public Tree(E value) {\n this.root = new Node<E>(value);\n this.length = 0;\n }", "public void createBinaryTree()\r\n\t{\n\t\t\r\n\t\tNode node = new Node(1);\r\n\t\tnode.left = new Node(2);\r\n\t\tnode.right = new Node(3);\r\n\t\tnode.left.left = new Node(4);\r\n\t\tnode.left.right = new Node(5);\r\n\t\tnode.left.right.right = new Node(10);\r\n\t\tnode.left.left.left = new Node(8);\r\n\t\tnode.left.left.left.right = new Node(15);\r\n\t\tnode.left.left.left.right.left = new Node(17);\r\n\t\tnode.left.left.left.right.left.left = new Node(18);\r\n\t\tnode.left.left.left.right.right = new Node(16);\r\n\t\tnode.left.left.right = new Node(9);\r\n\t\tnode.right.left = new Node(6);\r\n\t\tnode.right.left.left = new Node(13);\r\n\t\tnode.right.left.left.left = new Node(14);\r\n\t\tnode.right.right = new Node(7);\r\n\t\tnode.right.right.right = new Node(11);\r\n\t\tnode.right.right.right.right = new Node(12);\r\n\t\troot = node;\r\n\t\t\r\n\t}", "public static void main(String[] args) \n\t{\n\t\ttree x = new tree(0);\n\t\t\n\t\ttreenode r = x.root;\n\t\t\n//\t\ttreenode c = r;\n//\t\tfor(int i =1;i<=4;i++)\n//\t\t{\n//\t\t\tfor(int j=0;j<=8;j=j+4)\n//\t\t\t{\n//\t\t\t\ttreenode n = new treenode(i+j);\n//\t\t\t\tif(j==0)\n//\t\t\t\t{\n//\t\t\t\t\tr.child.add(n);\n//\t\t\t\t\tc = n;\n//\t\t\t\t}\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\tc.child.add(n);\n//\t\t\t\t\tc = n;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\ttreenode c1 = r;\n\t\ttreenode c2 = r;\n\t\ttreenode c3 = r;\n\t\ttreenode c4 = r;\n\t\tfor(int i=1;i<13;i++)\n\t\t{\n\t\t\ttreenode n = new treenode(i);\n\t\t\tif(i%4==1)\n\t\t\t{\n\t\t\t\tc1.child.add(n);\n\t\t\t\tc1 = n;\n\t\t\t}\n\t\t\tif(i%4==2)\n\t\t\t{\n\t\t\t\tc2.child.add(n);\n\t\t\t\tc2 = n;\n\t\t\t}\n\t\t\tif(i%4==3)\n\t\t\t{\n\t\t\t\tc3.child.add(n);\n\t\t\t\tc3 = n;\n\t\t\t}\n\t\t\tif(i%4==0)\n\t\t\t{\n\t\t\t\tc4.child.add(n);\n\t\t\t\tc4 = n;\n\t\t\t}\n\t\t}\n\t\tx.traverse(r);\n\t}", "public static void main(String[] args) {\n\n\n\t\tArrayList<Node> N = new ArrayList<Node>();\n\t\t\n\t\t/*\n\t\t * ##### Encoding Model 2 ###### \n\t\t */\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the privilege nodes\n\t\t */\n\t\tfor(int i=1; i<7; i++)\n\t\t{\n\t\t\tN.add(new Node(\"p\"+i, 1));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the exploit nodes\t\t \n\t\t */\n\t\tfor(int i=1; i<8; i++)\n\t\t{\n\t\t\tN.add(new Node(\"e\"+i, 2));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the child nodes\n\t\t */\n\t\tfor(int i=1; i<12; i++)\n\t\t{\n\t\t\tN.add(new Node(\"c\"+i, 0));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Assigning the children and parent(s) for each node according to model 2\n\t\t */\n\t\t\n\t\tArrayList<Node> nil = new ArrayList<Node>();\n\t\t\n\t\tN.get(0).setParents(nil);\n\t\tN.get(0).addChild(N.get(6));\n\t\t\n\t\tN.get(6).addParent(N.get(0));\n\t\tN.get(6).addChild(N.get(1));\n\t\tN.get(6).addChild(N.get(13));\n\t\tN.get(6).addChild(N.get(14));\n\t\t\n\t\tN.get(1).addParent(N.get(6));\n\t\tN.get(1).addChild(N.get(7));\n\t\tN.get(1).addChild(N.get(8));\n\t\t\n\t\tN.get(7).addParent(N.get(1));\n\t\tN.get(7).addChild(N.get(15));\n\t\tN.get(7).addChild(N.get(2));\n\t\t\n\t\tN.get(2).addParent(N.get(7));\n\t\tN.get(2).addChild(N.get(10));\t\t\n\t\t\n\t\tN.get(8).addParent(N.get(1));\n\t\tN.get(8).addChild(N.get(16));\n\t\tN.get(8).addChild(N.get(3));\n\t\t\n\t\tN.get(3).addParent(N.get(8));\n\t\tN.get(3).addChild(N.get(9));\n\t\t\n\t\tN.get(10).addParent(N.get(2));\n\t\tN.get(10).addChild(N.get(5));\n\t\tN.get(10).addChild(N.get(19));\n\t\tN.get(10).addChild(N.get(20));\n\t\t\n\t\tN.get(9).addParent(N.get(3));\n\t\tN.get(9).addChild(N.get(4));\n\t\tN.get(9).addChild(N.get(17));\n\t\tN.get(9).addChild(N.get(18));\n\t\t\n\t\tN.get(4).addParent(N.get(9));\n\t\tN.get(4).addChild(N.get(12));\n\t\t\n\t\tN.get(5).addParent(N.get(10));\n\t\tN.get(5).addChild(N.get(11));\n\t\t\n\t\tN.get(12).addParent(N.get(4));\n\t\tN.get(12).addChild(N.get(22));\n\t\tN.get(12).addChild(N.get(23));\n\t\t\n\t\tN.get(11).addParent(N.get(5));\n\t\tN.get(11).addChild(N.get(21));\n\t\tN.get(11).addChild(N.get(23));\n\t\t\n\t\tN.get(13).addParent(N.get(6));\n\t\tN.get(14).addParent(N.get(6));\n\t\tN.get(15).addParent(N.get(7));\n\t\tN.get(16).addParent(N.get(8));\n\t\tN.get(17).addParent(N.get(9));\n\t\tN.get(18).addParent(N.get(9));\n\t\tN.get(19).addParent(N.get(10));\n\t\tN.get(20).addParent(N.get(10));\n\t\tN.get(21).addParent(N.get(11));\n\t\tN.get(22).addParent(N.get(12));\n\t\tN.get(23).addParent(N.get(11));\n\t\tN.get(23).addParent(N.get(12));\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the C,I,A values for each node\n\t\t */\n\t\t\n\t\tN.get(0).setImpacts(4, 4, 4);\n\t\tN.get(1).setImpacts(1, 2, 3);\n\t\tN.get(2).setImpacts(2, 2, 1);\n\t\tN.get(3).setImpacts(1, 2, 1);\n\t\tN.get(4).setImpacts(1, 1, 1);\n\t\tN.get(5).setImpacts(3, 2, 3);\n\t\tN.get(13).setImpacts(3,3,3);\n\t\tN.get(14).setImpacts(3,3,3);\n\t\tN.get(15).setImpacts(3,3,3);\n\t\tN.get(16).setImpacts(3,3,3);\n\t\tN.get(17).setImpacts(3,3,3);\n\t\tN.get(18).setImpacts(3,3,3);\n\t\tN.get(19).setImpacts(3,3,3);\n\t\tN.get(20).setImpacts(3,3,3);\n\t\tN.get(21).setImpacts(3,3,3);\n\t\tN.get(22).setImpacts(3,3,3);\n\t\tN.get(23).setImpacts(2,2,1);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * This block helps see the setup of the whole tree. \n\t\t * Comment out if not required to see the parent children relationship of each node.\n\t\t */\n\t\t\n\t\tfor(int i=0; i<24; i++)\n\t\t{\n\t\t\tSystem.out.println(\"\\n\\n\" + N.get(i).getName() + \" < C=\" + N.get(i).getImpactC() + \", I=\" + N.get(i).getImpactI() + \", A=\" + N.get(i).getImpactA() + \" >\" );\n\t\t\tSystem.out.println(\"Parents: \");\n\t\t\tfor(int j=0; j<N.get(i).getParents().size(); j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getParents().get(j).getName() + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nChildren: \");\n\t\t\tfor(int k=0; k<N.get(i).getChildren().size(); k++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getChildren().get(k).getName() + \" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * Calling the method which will perform the C,I,A impact analysis \n\t\t */\n\t\t\n\t\t//Node n = new Node(); //Commented out as extended Main to Node and declared impactAnalysis() as static \n\t\t\n\t\tImpactAnalyzer ia = new ImpactAnalyzer();\n\t\tia.analyze(2, 2, 1, N);\n\t\t\n\t\t\n\t\t\n\t}", "private void createNodes( DefaultMutableTreeNode top ) {\n DefaultMutableTreeNode leaf = null;\n \n leaf = new DefaultMutableTreeNode( new treeInfo(\"Insert Transaction\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Item\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Report\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Employee\") );\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Suplier\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Salesman\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Customer\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Commisioner\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Edit Transaction\"));\n top.add(leaf);\n leaf = new DefaultMutableTreeNode( new treeInfo(\"Producer\"));\n top.add(leaf);\n }", "public SegmentTree() {}", "public TreeImpl(T dato) {\r\n\t\traiz = new NodeImpl<T>(dato, null);// El null dice que es raiz\r\n\t}", "private void buildTree(int random_attr){\n String[] schema = new String[]{\"min, max, avg, label\"};\n CassandraDriver driver = CassandraDriver.getInstance();\n ArrayList<int[]> train = driver.queryData(\"data\", schema);\n RandomForest forest = new RandomForest();\n forest.numAttr = RandomForestTrainingMapReduce.N;\n forest.numAttrRandom = random_attr;\n RealDecisionTree tree = new RealDecisionTree(train, forest, RandomForestTrainingMapReduce.N);\n\n // serialize this tree and write to Cassandra.\n byte[] t = serialize(tree);\n try {\n driver.insertData(t, \"Forest\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void constructTree(List<String> signatures) {\r\n // If no signatures present throw exception\r\n if(signatures.size() == 0){\r\n throw new IllegalArgumentException(\"Must provide a transaction signature to construct Merkle Tree\");\r\n }\r\n\r\n // If only one transaction, return as root node\r\n if(signatures.size() == 1){\r\n root = new Node(Utility.SHA512(signatures.get(0)));\r\n }\r\n\r\n List<Node> parents = constructBase(signatures);\r\n root = constructInternal(parents);\r\n }", "public MockTopologyNode createManualTree() throws ServiceFactory.ServiceNotAvailableException {\n // get a new submitter to create a new tree\n final TopologyDataSubmissionService3.TopologySubmitter3 mysubmitter = mServiceFactory.getService\n (TopologyDataSubmissionService3.class).getTopologySubmitter();\n\n TopologyNode topnode = mysubmitter.createTopLevelNode(\"__top_of_tree__\", 0);\n MockTopologyNode node = (MockTopologyNode) topnode;\n\n MockTopologyNode node1 = createMockNode(node, \"HostDiscoveryData\", null, 0, 0, false, false);\n MockTopologyValue value1 = (MockTopologyValue) node1.createValue(\"name\");\n value1.setSampleValue(\"HostDiscoveryData\");\n value1.setIsIdentity(true);\n value1.setNodeFrequency(0);\n\n MockTopologyNode node2 = createMockNode(node1, \"host\", \"Host\", 0, 0, false, false);\n MockTopologyValue value2 = (MockTopologyValue) node2.createValue(\"name\");\n value2.setSampleValue(\"198.51.100.0\");\n value2.setIsIdentity(true);\n value2.setNodeFrequency(0);\n\n return node;\n}", "@Test\n public void test() {\n try {\n Long userId = Long.valueOf(1);\n User user = new User(userId, \"testUser\", new Date());\n // Creates tree of 6 accounts\n // AccountTreeRoot treeRoot = TestDataFactory.buildAccounts(userId);\n // Account boligAccount = new Account(Long.valueOf(1), Long.valueOf(-1), userId, \"Bolig\", \"\", 0, Type.TYPE_REGULAR, new Date());\n // Account boligAccountFinans = new Account(Long.valueOf(2), Long.valueOf(1), userId,\"Finans\", \"Bolig\", 1, Type.TYPE_REGULAR, new Date());\n // Account boligAccountFinansLaan = new Account(Long.valueOf(3), Long.valueOf(2), userId, \"Lån\", \"Bolig/Finans\", 2, Type.TYPE_REGULAR, new Date());\n //\n // Account boligAccountTag = new Account(Long.valueOf(4), Long.valueOf(1), userId, \"Tag\", \"Bolig\", 1, Type.TYPE_REGULAR, new Date());\n //\n // Account boligAccountVVS = new Account(Long.valueOf(5), Long.valueOf(1), userId, \"VVS\", \"Bolig\", 1 , Type.TYPE_NON_REGULAR, new Date());\n // Account boligAccountVVSExtra = new Account(Long.valueOf(6), Long.valueOf(5), userId, \"Extra\", \"Bolig/VVS\", 2 , Type.TYPE_EXTRAORDINAIRE, new Date());\n // Account boligAccountVVSCheck = new Account(Long.valueOf(7), Long.valueOf(5), userId, \"Check\", \"Bolig/VVS\", 2 , Type.TYPE_NON_REGULAR, new Date());\n\n // regular, Bolig/Finans/Lån\n Match match = null;\n match = new Match(null, null, userId, new Long(3), new Long(1), null, null);\n Line line1 = new Line(new Long(1), userId, \"test1\", sdFormat.parse(\"2013-09-20\"), \"Lån1\", new BigDecimal(-4000), null, match);\n match = new Match(null, null, userId, new Long(3), new Long(2), null, null);\n Line line2 = new Line(new Long(2), userId, \"test2\", sdFormat.parse(\"2013-09-21\"), \"Lån2\", new BigDecimal(-400), null, match);\n\n // regular, Bolig/tag\n match = new Match(null, null, userId, new Long(4), new Long(3), null, null);\n Line line3 = new Line(new Long(3), userId, \"test3\", sdFormat.parse(\"2013-09-23\"), \"Tag\", new BigDecimal(-3000), null, match);\n match = new Match(null, null, userId, new Long(4), new Long(4), null, null);\n Line line4 = new Line(new Long(4), userId, \"test4\", sdFormat.parse(\"2013-11-20\"), \"Tag2\", new BigDecimal(-300), null, match);\n\n // extra, Bolig/VVS/Extra\n match = new Match(null, null, userId, new Long(6), new Long(5), null, null);\n Line line5 = new Line(new Long(5), userId, \"test\", sdFormat.parse(\"2013-09-20\"), \"VVSExt1\", new BigDecimal(-2000), null, match);\n match = new Match(null, null, userId, new Long(6), new Long(6), null, null);\n Line line6 = new Line(new Long(6), userId, \"test\", sdFormat.parse(\"2013-10-20\"), \"VVSExt2\", new BigDecimal(-200), null, match);\n match = new Match(null, null, userId, new Long(6), new Long(7), null, null);\n Line line7 = new Line(new Long(7), userId, \"test\", sdFormat.parse(\"2013-11-20\"), \"VVSExt3\", new BigDecimal(-20), null, match);\n\n // regular, Bolig/Finans/Lån\n match = new Match(null, null, userId, new Long(3), new Long(8), null, null);\n Line line8 = new Line(new Long(8), userId, \"test\", sdFormat.parse(\"2013-09-22\"), \"Lån3\", new BigDecimal(-40), null, match);\n // nonregular, Bolig/VVS/Check\n match = new Match(null, null, userId, new Long(7), new Long(9), null, null);\n Line line9 = new Line(new Long(9), userId, \"test\", sdFormat.parse(\"2013-10-12\"), \"VVSBesøg\", new BigDecimal(-500), null, match);\n\n // // regular, Bolig/Finans/Lån\n // Line line1 = new Line(new Long(1), new Long(3), userId, \"test1\", sdFormat.parse(\"2013-09-20\"), \"Lån1\", new BigDecimal(-4000), null);\n // Line line2 = new Line(new Long(2), new Long(3), userId, \"test2\", sdFormat.parse(\"2013-09-21\"), \"Lån2\", new BigDecimal(-400), null);\n //\n // // regular, Bolig/tag\n // Line line3 = new Line(new Long(3), new Long(4), userId, \"test3\", sdFormat.parse(\"2013-09-23\"), \"Tag\", new BigDecimal(-3000), null);\n // Line line4 = new Line(new Long(4), new Long(4), userId, \"test4\", sdFormat.parse(\"2013-11-20\"), \"Tag2\", new BigDecimal(-300), null);\n //\n // // extra, Bolig/VVS/Extra\n // Line line5 = new Line(new Long(5), new Long(6), userId, \"test\", sdFormat.parse(\"2013-09-20\"), \"VVSExt1\", new BigDecimal(-2000), null);\n // Line line6 = new Line(new Long(6), new Long(6), userId, \"test\", sdFormat.parse(\"2013-10-20\"), \"VVSExt2\", new BigDecimal(-200), null);\n // Line line7 = new Line(new Long(7), new Long(6), userId, \"test\", sdFormat.parse(\"2013-11-20\"), \"VVSExt3\", new BigDecimal(-20), null);\n //\n // // regular, Bolig/Finans/Lån\n // Line line8 = new Line(new Long(8), new Long(3), userId, \"test\", sdFormat.parse(\"2013-09-22\"), \"Lån3\", new BigDecimal(-40), null);\n // // nonregular, Bolig/VVS/Check\n // Line line9 = new Line(new Long(9), new Long(7), userId, \"test\", sdFormat.parse(\"2013-10-12\"), \"VVSBesøg\", new BigDecimal(-500), null);\n\n // Bolig:\n // 09: total=4000+400+3000+40+2000, reg=4000+400+3000+40, nonreg=0,extra=2000\n BigDecimal per1Total = new BigDecimal(\"-9440.00\");\n BigDecimal per1Reg = new BigDecimal(\"-7440.00\");\n BigDecimal per1NonReg = new BigDecimal(\"0.00\");\n BigDecimal per1Extra = new BigDecimal(\"-2000.00\");\n // 10 total=200+500, reg=0, nonreg=500,extra=200\n BigDecimal per2Total = new BigDecimal(\"-700.00\");\n BigDecimal per2Reg = new BigDecimal(\"0.00\");\n BigDecimal per2NonReg = new BigDecimal(\"-500.00\");\n BigDecimal per2Extra = new BigDecimal(\"-200.00\");\n // 11: total=300,29 reg=300, nonreg=0,extra=20\n BigDecimal per3Total = new BigDecimal(\"-320.00\");\n BigDecimal per3Reg = new BigDecimal(\"-300.00\");\n BigDecimal per3NonReg = new BigDecimal(\"0.00\");\n BigDecimal per3Extra = new BigDecimal(\"-20.00\");\n\n // VisitorLogTree treeLogger = new VisitorLogTree(true);\n // treeRoot.accept(treeLogger);\n\n TimeLineImpl timeLine = new TimeLineImpl();\n AccountPersisterTestIFactorympl accPersister = new AccountPersisterTestIFactorympl(user);\n AccountTreeRoot buildAccountTree = accPersister.buildAccountTree(user.getId());\n VisitorLogTree visitorLogTree = new VisitorLogTree();\n buildAccountTree.accept(visitorLogTree);\n timeLine.setUser(user);\n timeLine.setAccountPersister(accPersister);\n timeLine.createTimelineForPeriod(line1.getDate(), line7.getDate());\n List<Period> periods = timeLine.getPeriods();\n assertEquals(3, periods.size());\n assertEquals(sdFormat.parse(\"2013-09-01\"), periods.get(0).getStartDate());\n assertEquals(sdFormat.parse(\"2013-10-01\"), periods.get(1).getStartDate());\n assertEquals(sdFormat.parse(\"2013-11-01\"), periods.get(2).getStartDate());\n\n // Creates 3 periods\n timeLine.addLine(line1);\n timeLine.addLine(line2);\n timeLine.addLine(line3);\n timeLine.addLine(line4);\n timeLine.addLine(line5);\n timeLine.addLine(line6);\n timeLine.addLine(line7);\n timeLine.addLine(line8);\n timeLine.addLine(line9);\n\n //*************************************************\n\n OutputChartDataBuilder dataBuilder = null;\n\n dataBuilder = new OutputChartDataBuilderBigDecimalRegular();\n dataBuilder.buildOutData(timeLine, \"/Bolig\", 1);\n\n Date[] dates = dataBuilder.getDates();\n assertEquals(3, dates.length);\n assertEquals(sdFormat.parse(\"2013-09-01\"), dates[0]);\n assertEquals(sdFormat.parse(\"2013-10-01\"), dates[1]);\n assertEquals(sdFormat.parse(\"2013-11-01\"), dates[2]);\n\n BigDecimal[][] values = (BigDecimal[][]) dataBuilder.getValues();\n assertEquals(3, values.length);\n assertEquals(1, values[0].length);\n assertEquals(1, values[1].length);\n assertEquals(1, values[2].length);\n\n assertEquals(per1Reg, values[0][0]);\n assertEquals(per2Reg, values[1][0]);\n assertEquals(per3Reg, values[2][0]);\n\n String[][] categories = dataBuilder.getCategories();\n assertEquals(categories.length, 1);\n assertEquals(categories[0].length, 1);\n assertEquals(\"/Bolig\", categories[0][0]);\n\n //***************************\n\n // Account boligAccountVVS = new Account(Long.valueOf(5), Long.valueOf(1), userId, \"VVS\", \"Bolig\", 1 , Type.TYPE_NON_REGULAR, new Date());\n // Account boligAccountVVSExtra = new Account(Long.valueOf(6), Long.valueOf(5), userId, \"Extra\", \"Bolig/VVS\", 2 , Type.TYPE_EXTRAORDINAIRE, new Date());\n // Account boligAccountVVSCheck = new Account(Long.valueOf(7), Long.valueOf(5), userId, \"Check\", \"Bolig/VVS\", 2 , Type.TYPE_NON_REGULAR, new Date());\n\n // extra, Bolig/VVS/Extra\n // Line line5 = new Line(new Long(5), new Long(6), userId, \"test\", sdFormat.parse(\"2013-09-20\"), \"VVSExt1\", new BigDecimal(-2000), null);\n // Line line6 = new Line(new Long(6), new Long(6), userId, \"test\", sdFormat.parse(\"2013-10-20\"), \"VVSExt2\", new BigDecimal(-200), null);\n // Line line7 = new Line(new Long(7), new Long(6), userId, \"test\", sdFormat.parse(\"2013-11-20\"), \"VVSExt3\", new BigDecimal(-20), null);\n\n // nonregular, Bolig/VVS/Check\n // Line line9 = new Line(new Long(9), new Long(7), userId, \"test\", sdFormat.parse(\"2013-10-12\"), \"VVSBesøg\", new BigDecimal(-500), null);\n\n BigDecimal zero = new BigDecimal(\"0.00\");\n\n dataBuilder = new OutputChartDataBuilderBigDecimalRegular();\n dataBuilder.buildOutData(timeLine, \"/Bolig/VVS\", 2);\n\n values = (BigDecimal[][]) dataBuilder.getValues();\n categories = dataBuilder.getCategories();\n dates = dataBuilder.getDates();\n\n assertEquals(0, categories.length);\n assertEquals(0, values.length);\n assertEquals(0, dates.length);\n\n // ******************************\n dataBuilder = new OutputChartDataBuilderBigDecimalNonRegular();\n dataBuilder.buildOutData(timeLine, \"/Bolig/VVS\", 2);\n\n values = (BigDecimal[][]) dataBuilder.getValues();\n categories = dataBuilder.getCategories();\n dates = dataBuilder.getDates();\n\n assertEquals(6, values.length);\n assertEquals(2, values[0].length);\n assertEquals(2, values[1].length);\n assertEquals(2, values[2].length);\n assertEquals(2, values[3].length);\n assertEquals(2, values[4].length);\n assertEquals(2, values[5].length);\n\n assertEquals(zero, values[0][0]);\n assertEquals(null, values[0][1]);\n assertEquals(null, values[1][0]);\n assertEquals(zero, values[1][1]);\n\n assertEquals(new BigDecimal(\"-500.00\"), values[2][0]);\n assertEquals(null, values[2][1]);\n assertEquals(null, values[3][0]);\n assertEquals(new BigDecimal(\"-500.00\"), values[3][1]);\n\n assertEquals(zero, values[4][0]);\n assertEquals(null, values[4][1]);\n assertEquals(null, values[5][0]);\n assertEquals(zero, values[5][1]);\n\n assertEquals(\"/Bolig/VVS\", categories[0][0]);\n assertEquals(\"/Bolig/VVS\", categories[0][1]);\n assertEquals(null, categories[1][0]);\n assertEquals(\"Check\", categories[1][1]);\n\n assertEquals(3, dates.length);\n assertEquals(sdFormat.parse(\"2013-09-01\"), dates[0]);\n assertEquals(sdFormat.parse(\"2013-10-01\"), dates[1]);\n assertEquals(sdFormat.parse(\"2013-11-01\"), dates[2]);\n\n //***************************\n\n dataBuilder = new OutputChartDataBuilderBigDecimalExtraordinaire();\n dataBuilder.buildOutData(timeLine, \"/Bolig/VVS\", 2);\n\n values = (BigDecimal[][]) dataBuilder.getValues();\n categories = dataBuilder.getCategories();\n dates = dataBuilder.getDates();\n\n assertEquals(6, values.length);\n assertEquals(2, values[0].length);\n assertEquals(2, values[1].length);\n assertEquals(2, values[2].length);\n assertEquals(2, values[3].length);\n assertEquals(2, values[4].length);\n assertEquals(2, values[5].length);\n\n // BigDecimal zero = new BigDecimal(\"0.00\");\n assertEquals(new BigDecimal(\"-2000.00\"), values[0][0]);\n assertEquals(null, values[0][1]);\n assertEquals(null, values[1][0]);\n assertEquals(new BigDecimal(\"-2000.00\"), values[1][1]);\n\n assertEquals(new BigDecimal(\"-200.00\"), values[2][0]);\n assertEquals(null, values[2][1]);\n assertEquals(null, values[3][0]);\n assertEquals(new BigDecimal(\"-200.00\"), values[3][1]);\n\n assertEquals(new BigDecimal(\"-20.00\"), values[4][0]);\n assertEquals(null, values[4][1]);\n assertEquals(null, values[5][0]);\n assertEquals(new BigDecimal(\"-20.00\"), values[5][1]);\n\n assertEquals(\"/Bolig/VVS\", categories[0][0]);\n assertEquals(\"/Bolig/VVS\", categories[0][1]);\n assertEquals(null, categories[1][0]);\n assertEquals(\"Extra\", categories[1][1]);\n\n assertEquals(3, dates.length);\n assertEquals(sdFormat.parse(\"2013-09-01\"), dates[0]);\n assertEquals(sdFormat.parse(\"2013-10-01\"), dates[1]);\n assertEquals(sdFormat.parse(\"2013-11-01\"), dates[2]);\n\n //***************************\n\n dataBuilder = new OutputChartDataBuilderBigDecimalTotal();\n dataBuilder.buildOutData(timeLine, \"/Bolig/VVS\", 2);\n\n values = (BigDecimal[][]) dataBuilder.getValues();\n categories = dataBuilder.getCategories();\n dates = dataBuilder.getDates();\n\n assertEquals(6, values.length);\n assertEquals(3, values[0].length);\n assertEquals(3, values[1].length);\n assertEquals(3, values[2].length);\n assertEquals(3, values[3].length);\n assertEquals(3, values[4].length);\n assertEquals(3, values[5].length);\n\n // BigDecimal zero = new BigDecimal(\"0.00\");\n assertEquals(new BigDecimal(\"-2000.00\"), values[0][0]);\n assertEquals(null, values[0][1]);\n assertEquals(null, values[0][2]);\n assertEquals(null, values[1][0]);\n assertEquals(new BigDecimal(\"-2000.00\"), values[1][1]);\n assertEquals(zero, values[1][2]);\n\n assertEquals(new BigDecimal(\"-700.00\"), values[2][0]);\n assertEquals(null, values[2][1]);\n assertEquals(null, values[2][2]);\n assertEquals(null, values[3][0]);\n assertEquals(new BigDecimal(\"-200.00\"), values[3][1]);\n assertEquals(new BigDecimal(\"-500.00\"), values[3][2]);\n\n assertEquals(new BigDecimal(\"-20.00\"), values[4][0]);\n assertEquals(null, values[4][1]);\n assertEquals(null, values[4][2]);\n assertEquals(null, values[5][0]);\n assertEquals(new BigDecimal(\"-20.00\"), values[5][1]);\n assertEquals(zero, values[5][2]);\n\n assertEquals(\"/Bolig/VVS\", categories[0][0]);\n assertEquals(\"/Bolig/VVS\", categories[0][1]);\n assertEquals(\"/Bolig/VVS\", categories[0][2]);\n assertEquals(null, categories[1][0]);\n assertEquals(\"Extra\", categories[1][1]);\n assertEquals(\"Check\", categories[1][2]);\n\n assertEquals(3, dates.length);\n assertEquals(sdFormat.parse(\"2013-09-01\"), dates[0]);\n assertEquals(sdFormat.parse(\"2013-10-01\"), dates[1]);\n assertEquals(sdFormat.parse(\"2013-11-01\"), dates[2]);\n //**************************************************\n dataBuilder = new OutputChartDataBuilderAccount();\n dataBuilder.buildOutData(timeLine, \"/Bolig/VVS\", 2);\n\n Account[][] accountValues = (Account[][]) dataBuilder.getValues();\n categories = dataBuilder.getCategories();\n dates = dataBuilder.getDates();\n\n assertEquals(6, accountValues.length);\n assertEquals(3, accountValues[0].length);\n assertEquals(3, accountValues[1].length);\n assertEquals(3, accountValues[2].length);\n assertEquals(3, accountValues[3].length);\n assertEquals(3, accountValues[4].length);\n assertEquals(3, accountValues[5].length);\n\n // BigDecimal zero = new BigDecimal(\"0.00\");\n assertEquals(new BigDecimal(\"-2000.00\"), accountValues[0][0].getExpensesTotal());\n assertEquals(null, accountValues[0][1]);\n assertEquals(null, accountValues[0][2]);\n assertEquals(null, accountValues[1][0]);\n assertEquals(new BigDecimal(\"-2000.00\"), accountValues[1][1].getExpensesTotal());\n assertEquals(zero, accountValues[1][2].getExpensesTotal());\n\n assertEquals(new BigDecimal(\"-700.00\"), accountValues[2][0].getExpensesTotal());\n assertEquals(null, accountValues[2][1]);\n assertEquals(null, accountValues[2][2]);\n assertEquals(null, accountValues[3][0]);\n assertEquals(new BigDecimal(\"-200.00\"), accountValues[3][1].getExpensesTotal());\n assertEquals(new BigDecimal(\"-500.00\"), accountValues[3][2].getExpensesTotal());\n\n assertEquals(new BigDecimal(\"-20.00\"), accountValues[4][0].getExpensesTotal());\n assertEquals(null, accountValues[4][1]);\n assertEquals(null, accountValues[4][2]);\n assertEquals(null, accountValues[5][0]);\n assertEquals(new BigDecimal(\"-20.00\"), accountValues[5][1].getExpensesTotal());\n assertEquals(zero, accountValues[5][2].getExpensesTotal());\n\n assertEquals(\"/Bolig/VVS\", categories[0][0]);\n assertEquals(\"/Bolig/VVS\", categories[0][1]);\n assertEquals(\"/Bolig/VVS\", categories[0][2]);\n assertEquals(null, categories[1][0]);\n assertEquals(\"Extra\", categories[1][1]);\n assertEquals(\"Check\", categories[1][2]);\n\n assertEquals(3, dates.length);\n assertEquals(sdFormat.parse(\"2013-09-01\"), dates[0]);\n assertEquals(sdFormat.parse(\"2013-10-01\"), dates[1]);\n assertEquals(sdFormat.parse(\"2013-11-01\"), dates[2]);\n\n } catch (Exception e) {\n LOG.error(e.getMessage(), e);\n fail(e.getMessage());\n }\n\n }", "@org.junit.Test\n public void constrCompelemNested2() {\n final XQuery query = new XQuery(\n \"element elem {}\",\n ctx);\n try {\n query.context(node(file(\"prod/CompAttrConstructor/DupNode.xml\")));\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertSerialization(\"<elem/>\", false)\n );\n }", "public TreeBuilder() {\n\t\troot = null;\n\t}", "@BeforeAll\n\tstatic void setNodes() {\n\t\tLCA = new LowestCommonAncestor();\n\t\tnine = new Node(9,null);\n\t\tten = new Node(10, null);\n\t\teight = new Node(8, null);\n\t\tseven = new Node(7, new Node[] {ten});\n\t\tfour = new Node(4, new Node[] {ten});\n\t\tthree = new Node(3, new Node[] {four});\n\t\tfive = new Node(5, new Node[] {nine, eight, seven});\n\t\ttwo = new Node(2, new Node[] {three, five});\n\t\tone = new Node(1, new Node[] {two});\n\t}", "public static void createTree(SuccessorGenerator generator, GameState initialState)\n {\n LinkedList<GameState> currentLevel = new LinkedList<GameState>();\n currentLevel.add(initialState);\n Player currentPlayer = Player.PLAYER_MAX;\n \n int level = 0;\n while(true)\n {\n LinkedList<GameState> nextLevel = new LinkedList<GameState>();\n \n /*Gerando todas as ações possíveis para o nível atual.*/\n for(GameState state : currentLevel)\n {\n generator.generateSuccessors(state, currentPlayer);\n \n for(int i = 0; i < state.getChildren().size(); i++)\n {\n GameState successorState = state.getChildren().get(i);\n nextLevel.add(successorState);\n }\n }\n System.out.println(\"Expandindo nível \"+(level++)+\" com \"+nextLevel.size()+\" estados.\");\n \n /*Alternando jogadores*/\n currentPlayer = (currentPlayer == Player.PLAYER_MAX)?\n Player.PLAYER_MIN:\n Player.PLAYER_MAX; \n \n /*Busca termina quando todos os estados foram explorados*/\n if(nextLevel.isEmpty()) break;\n \n currentLevel.clear();\n currentLevel.addAll(nextLevel);\n }\n \n }" ]
[ "0.71319634", "0.69619876", "0.6959782", "0.69512796", "0.67706496", "0.6709603", "0.66832757", "0.66421175", "0.6597268", "0.6556422", "0.64988804", "0.64983124", "0.649758", "0.648163", "0.6480373", "0.6469369", "0.6454014", "0.6453771", "0.64506316", "0.6432978", "0.64208704", "0.6420495", "0.6410889", "0.6392417", "0.6387165", "0.63811505", "0.63694507", "0.6358472", "0.6350044", "0.63238025", "0.6305517", "0.6285502", "0.6283186", "0.62795097", "0.62687206", "0.6244782", "0.6237615", "0.62301993", "0.62279373", "0.621174", "0.6208779", "0.62052166", "0.6201004", "0.6195067", "0.619204", "0.61879665", "0.6167953", "0.6153212", "0.61397684", "0.6137159", "0.61370087", "0.61336565", "0.61261946", "0.6125575", "0.6120782", "0.6109917", "0.6109183", "0.6105582", "0.6083577", "0.60654014", "0.6060077", "0.60423523", "0.6032321", "0.60303813", "0.60287637", "0.6021256", "0.60149384", "0.601113", "0.6005624", "0.5998083", "0.59950036", "0.59907234", "0.5988561", "0.59784985", "0.5971298", "0.59709245", "0.59703743", "0.5968642", "0.59668344", "0.5960508", "0.59577066", "0.5954703", "0.59472173", "0.59446687", "0.5939168", "0.5933212", "0.59277946", "0.59266067", "0.592445", "0.5920359", "0.59185994", "0.59178394", "0.5916572", "0.59159994", "0.59133005", "0.5911198", "0.590628", "0.59022474", "0.58994246", "0.5886763", "0.5885692" ]
0.0
-1
Testing appropriate depth and node invariants on a big tree
@Test public void testLargeTree() { BPlusTree<Integer, Integer> tree = new BPlusTree<Integer, Integer>(); ArrayList<Integer> numbers = new ArrayList<Integer>(100000); for (int i = 0; i < 100000; i++) { numbers.add(i); } Collections.shuffle(numbers); for (int i = 0; i < 100000; i++) { tree.insert(numbers.get(i), numbers.get(i)); } testTreeInvariants(tree); int depth = treeDepth(tree.root); assertTrue(depth < 11); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasDepth();", "boolean hasDepth();", "void checkTrees(Box tree);", "public void testAdvancedUsage() throws Exception {\n Map<Integer, byte[]> tree = createRandomTree(12, xorGen);\n TreeStorage storage = new TreeStorage(tree.get(1),xorGen, 12);\n \n // add 3, 5, 9, 16\n storage.add(3, tree.get(3));\n storage.add(5, tree.get(5));\n storage.add(9, tree.get(9));\n storage.add(16, tree.get(16));\n \n assertFalse(storage.getVerifiedNodes().contains(3));\n assertFalse(storage.getVerifiedNodes().contains(5));\n assertFalse(storage.getVerifiedNodes().contains(9));\n assertFalse(storage.getVerifiedNodes().contains(16));\n \n // add broken 17, nothing changes\n assertFalse(storage.add(17, tree.get(16)));\n assertFalse(storage.getVerifiedNodes().contains(3));\n assertFalse(storage.getVerifiedNodes().contains(5));\n assertFalse(storage.getVerifiedNodes().contains(9));\n assertFalse(storage.getVerifiedNodes().contains(16));\n \n // add real 17, they all become verified\n assertTrue(storage.add(17, tree.get(17)));\n// assert storage.add(17, tree.get(17));\n assertTrue(storage.getVerifiedNodes().contains(3));\n assertTrue(storage.getVerifiedNodes().contains(5));\n assertTrue(storage.getVerifiedNodes().contains(9));\n assertTrue(storage.getVerifiedNodes().contains(16));\n assertTrue(storage.getVerifiedNodes().contains(17));\n assertEquals(6, storage.getVerifiedNodes().size());\n \n // use 3, 5, 9, 16\n storage.used(3);\n storage.used(5);\n storage.used(9);\n storage.used(16);\n assertEquals(6, storage.getVerifiedNodes().size());\n \n // use 17 and only the root remains\n storage.used(17);\n assertEquals(1,storage.getVerifiedNodes().size());\n assertEquals(1,storage.getUsedNodes().size());\n assertTrue(storage.getVerifiedNodes().containsAll(storage.getUsedNodes()));\n assertTrue(storage.getVerifiedNodes().contains(1));\n }", "private boolean isTreeFull() {\n // The number of leaf nodes required to store the whole vector\n // (each leaf node stores 32 elements).\n int requiredLeafNodes = (totalSize >>> 5);\n\n // The maximum number of leaf nodes we can have in a tree of this\n // depth (each interior node stores 32 children).\n int maxLeafNodes = (1 << treeDepth);\n\n return (requiredLeafNodes > maxLeafNodes);\n }", "public void checkTree() {\r\n checkTreeFromNode(treeRoot);\r\n }", "public int numTrees () { throw new RuntimeException(); }", "private void buildTree(int nodeNum, AABB nodeBounds,\n ArrayList<AABB> allPrimBounds,\n IntArray primNums, int nPrims, int depth,\n int badRefines) {\n if (nPrims <= maxPrims || depth == 0) {\n if ((nPrims > 16) && (depth == 0)) {\n System.out.println(\"reached max. KdTree depth with \" + nPrims + \n \" primitives\");\n }\n \n nodesW.add(makeLeaf(primNums, nPrims, primitives));\n totalPrims += nPrims;\n totalDepth += (maxDepth - depth);\n totalLeafs += 1;\n return;\n }\n \n /* Split - Position bestimmen */\n \n int bestAxis = -1, bestOffset = -1;\n float bestCost = Float.POSITIVE_INFINITY;\n float oldCost = isectCost * (float)nPrims;\n Vector d = nodeBounds.max.sub(nodeBounds.min);\n float totalSA = (2.f * (d.x*d.y + d.x*d.z + d.y*d.z));\n float invTotalSA = 1.f / totalSA;\n \n /* Achse wählen */\n int axis = d.dominantAxis();\n int retries = 0;\n boolean retry = false;\n ArrayList<BoundEdge> edges = null;\n \n// final int splitCount = edges[axis].length;\n \n do {\n edges = mkEdges(allPrimBounds, primNums, axis);\n Collections.sort(edges);\n final int splitCount = edges.size();\n \n// java.util.Arrays.sort(edges[axis], 0, splitCount);\n \n /* beste Split - Position für diese Achse finden */\n int nBelow = 0, nAbove = nPrims;\n \n for (int i = 0; i < splitCount; ++i) {\n if (edges.get(i).type == EdgeType.END) --nAbove;\n float edget = edges.get(i).t;\n \n if (edget > nodeBounds.min.get(axis) &&\n edget < nodeBounds.max.get(axis)) {\n // Compute cost for split at _i_th edge\n int otherAxis[][] = { {1,2}, {0,2}, {0,1} };\n int otherAxis0 = otherAxis[axis][0];\n int otherAxis1 = otherAxis[axis][1];\n \n float belowSA = 2 * (d.get(otherAxis0) * d.get(otherAxis1) +\n (edget - nodeBounds.min.get(axis)) *\n (d.get(otherAxis0) + d.get(otherAxis1)));\n \n float aboveSA = 2 * (d.get(otherAxis0) * d.get(otherAxis1) +\n (nodeBounds.max.get(axis) - edget) *\n (d.get(otherAxis0) + d.get(otherAxis1)));\n \n float pBelow = belowSA * invTotalSA;\n float pAbove = aboveSA * invTotalSA;\n \n float eb = (nAbove == 0 || nBelow == 0) ? emptyBonus : 0.f;\n float cost = traversalCost + isectCost * (1.f - eb) *\n (pBelow * nBelow + pAbove * nAbove);\n \n if (cost < bestCost) {\n /* neuer bester gefunden */\n bestCost = cost;\n bestAxis = axis;\n bestOffset = i;\n }\n }\n \n if (edges.get(i).type == EdgeType.START) ++nBelow;\n }\n \n if (!(nBelow == nPrims && nAbove == 0))\n throw new IllegalStateException(\"hmm\");\n \n retry = ((bestAxis == -1) && (retries < 2));\n \n if (retry) {\n ++retries;\n axis = (axis+1) % 3;\n }\n \n } while (retry);\n \n if (bestCost > oldCost) ++badRefines;\n if ((bestCost > 4.f * oldCost && nPrims < 16) ||\n bestAxis == -1 || badRefines == 3) {\n nodesW.add(makeLeaf(primNums, nPrims, primitives));\n if (nPrims > 16)\n System.out.println(\"aborting KdTree build recursion (bc=\" +\n bestCost + \", oc=\" + oldCost + \", #prims=\" + \n nPrims + \", br=\" + badRefines + \")\");\n totalPrims += nPrims;\n totalDepth += (maxDepth - depth);\n totalLeafs += 1;\n return;\n }\n \n /* Primitive nach oben / unten sortieren */\n int n0 = 0, n1 = 0;\n \n final ArrayList<Integer> prims0Tmp = new ArrayList<Integer>();\n final ArrayList<Integer> prims1Tmp = new ArrayList<Integer>();\n \n for (int i = 0; i < bestOffset; ++i) {\n if (edges.get(i).type == EdgeType.START) {\n prims0Tmp.add(edges.get(n0++).primNum);\n// prims0.set(n0++, edges[bestAxis][i].primNum);\n }\n }\n \n for (int i = bestOffset + 1; i < edges.size(); ++i) {\n if (edges.get(i).type == EdgeType.END) {\n prims1Tmp.add(edges.get(n1++).primNum);\n// prims1.set(n1++, edges[bestAxis][i].primNum);\n }\n }\n \n /* rekursiver Abstieg */\n float tsplit = edges.get(bestOffset).t;\n \n nodesW.add(makeInterior(bestAxis, tsplit));\n \n AABB bounds[] = nodeBounds.split(tsplit, bestAxis);\n \n final IntArray prims0 = new IntArray(prims0Tmp.size());\n for (int i=0; i < prims0Tmp.size(); i++) {\n prims0.set(i, prims0Tmp.get(i));\n }\n \n final IntArray prims1 = new IntArray(prims1Tmp.size());\n for (int i=0; i < prims1Tmp.size(); i++) {\n prims1.set(i, prims1Tmp.get(i));\n }\n \n buildTree(nodeNum+1, bounds[0], allPrimBounds,\n prims0, n0, depth-1, badRefines);\n \n nodesW.get(nodeNum).setAboveChild(nodesW.size());\n \n buildTree(nodesW.size(), bounds[1], allPrimBounds,\n prims1, n1, depth-1, badRefines);\n }", "@Test\r\n public void testIsInTreeOf() {\r\n System.out.println(\"isInTreeOf\");\r\n ConfigNode configNode = new ConfigNode();\r\n \r\n ConfigNode childNode1 = new ConfigNode(testLine);\r\n configNode.appendChild(childNode1);\r\n assertTrue(childNode1.isInTreeOf(configNode));\r\n assertFalse(configNode.isInTreeOf(childNode1));\r\n \r\n ConfigNode childNode2 = new ConfigNode(testLine);\r\n configNode.appendChild(childNode2);\r\n assertTrue(childNode2.isInTreeOf(configNode));\r\n assertFalse(childNode2.isInTreeOf(childNode1));\r\n \r\n ConfigNode childOfChildNode2 = new ConfigNode(testLine);\r\n childNode2.appendChild(childOfChildNode2);\r\n assertTrue(childOfChildNode2.isInTreeOf(configNode));\r\n assertTrue(childOfChildNode2.isInTreeOf(childNode2));\r\n assertFalse(childOfChildNode2.isInTreeOf(childNode1));\r\n }", "@Test\r\n public void testHeightFullTree(){\r\n \t\r\n \tBinarySearchTree<Integer> treeInt = new BinarySearchTree<Integer>();\r\n \t\r\n \ttreeInt.add(31);\r\n \ttreeInt.add(5);\r\n \ttreeInt.add(44);\r\n \t\r\n \tassertEquals(treeInt.height(), 1);\r\n \t\r\n \ttree.add(\"deer\");\r\n \ttree.add(\"bar\"); //adding as child to left\r\n \ttree.add(\"jar\"); //add as child to right \r\n \tassertEquals(tree.height(), 1); //height is now 1\r\n }", "@Test\r\n public void testHeightCompleteTree(){\r\n \ttree.add(\"deer\");\r\n \ttree.add(\"bar\"); //adding as child to left\r\n \ttree.add(\"jar\"); //add as child to right \r\n \ttree.add(\"apple\"); //adding to right side of right node\r\n \tassertEquals(tree.height(), 2); \r\n }", "boolean isMaxdepthSpecified();", "public abstract boolean isBinarySearchTree();", "@Test\r\n public void testHeightOnlyRoot(){\r\n \t//check instances where height will be 0\r\n \tassertEquals(tree.height(), 0);\r\n \ttree.add(\"a\"); //adding to root (height still 0)\r\n \tassertEquals(tree.height(), 0 );\r\n \t\r\n }", "@Test\n public void levelOrder() throws Exception {\n Node node = new Node(150);\n node.setLeft(new Node(120));\n node.setRight(new Node(40));\n Node root = new Node(110);\n root.setLeft(new Node(80));\n root.setRight(node);\n\n Queue<Integer> expected = new LinkedList<Integer>();\n expected.add(110);\n expected.add(80);\n expected.add(150);\n expected.add(120);\n expected.add(40);\n BinarySearchTree.levelOrder(root);\n assertEquals(expected, BinarySearchTree.printQ);\n }", "int treeSize() {\n return\n memSize()\n + initializers.listSize()\n + updaters.listSize()\n + (optionalConditionExpression == null ? 0 : getExpression().treeSize())\n + (body == null ? 0 : getBody().treeSize()); }", "@Test\n void removeLeaves_on3HeightLeftSpindlyTree_returnsCorrectTree() {\n IntTree tree = new IntTree(6,\n 5, 2,\n 4, null, null, null,\n 1, 3);\n IntTreeProblems.removeLeaves(tree);\n IntTree expected = new IntTree(6,\n 5, null,\n 4);\n assertThat(tree).isEqualTo(expected);\n }", "@Test\n public void test(){\n BinarySearchTree tree = new BinarySearchTree(new Node(35));\n\n tree.addNode(4);\n tree.addNode(15);\n tree.addNode(3);\n tree.addNode(1);\n tree.addNode(20);\n tree.addNode(8);\n tree.addNode(50);\n tree.addNode(40);\n tree.addNode(30);\n tree.addNode(80);\n tree.addNode(70);\n\n tree.addNode(90);\n\n tree.deleteNode(50);\n System.out.println(\"=====中序遍历 递归法=====\");\n TreeUtil.traverseInOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====中序遍历 迭代法=====\");\n TreeUtil.traverseInOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====前序遍历=====\");\n TreeUtil.traversePreOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====中序遍历 迭代法=====\");\n TreeUtil.traversePreOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====后序遍历=====\");\n TreeUtil.traversePostOrder(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====后序遍历 迭代法=====\");\n TreeUtil.traversePostOrderByIteration(tree.getRoot());\n\n System.out.println(\"\");\n System.out.println(\"=====层次遍历=====\");\n TreeUtil.traverseLevelOrder(tree.getRoot());\n\n int height = TreeUtil.getChildDepth(tree.getRoot());\n System.out.println(\"\");\n System.out.println(\"树高:\"+height);\n }", "public void RecursiveExpansion() throws TreeTooBigException {\r\n int transIndex; //Index to count transitions\r\n int[] newMarkup; //markup used to create new node\r\n boolean aTransitionIsEnabled = false; //To check for deadlock\r\n //Attribute used for assessing whether a node has occured before\r\n boolean repeatedNode = false; \r\n \r\n boolean allOmegas = false;\r\n \r\n boolean[] enabledTransitions = \r\n tree.dataLayer.getTransitionEnabledStatusArray(markup);\r\n\r\n //For each transition\r\n for (int i = 0; i < enabledTransitions.length; i++) {\r\n if (enabledTransitions[i] == true) {\r\n //Set transArray of to true for this index\r\n transArray[i] = true;\r\n \r\n //System.out.println(\"\\n Transition \" + i + \" Enabled\" );\r\n aTransitionIsEnabled = true;\r\n \r\n //print (\"\\n Old Markup is :\", markup);//debug\r\n \r\n //Fire transition to produce new markup vector\r\n newMarkup = fire(i);\r\n \r\n //print (\"\\n New Markup is :\", newMarkup);//debug\r\n \r\n //Check for safeness. If any of places have > 1 token set variable.\r\n for (int j = 0; j < newMarkup.length; j++) {\r\n if (newMarkup[j] > 1 || newMarkup[j] == -1) {\r\n tree.moreThanOneToken = true;\r\n break;\r\n }\r\n } \r\n \r\n //Create a new node using the new markup vector and attach it to\r\n //the current node as a child.\r\n children[i] = \r\n new myNode(newMarkup, this, tree, depth + 1);\r\n \r\n /* Now need to (a) check if any omegas (represented by -1) need to \r\n * be inserted in the markup vector of the new node, and (b) if the \r\n * resulting markup vector has appeared anywhere else in the tree. \r\n * We must do (a) before (b) as we need to know if the new node \r\n * contains any omegas to be able to compare it with existing nodes. \r\n */ \r\n allOmegas = children[i].InsertOmegas();\r\n \r\n //check if the resulting markup vector has occured anywhere else in the tree\r\n repeatedNode = (tree.root).FindMarkup(children[i]);\r\n \r\n if (tree.nodeCount >= Pipe.MAX_NODES && !tree.tooBig) {\r\n tree.tooBig = true;\r\n throw new TreeTooBigException();\r\n }\r\n \r\n if (!repeatedNode && !allOmegas) {\r\n children[i].RecursiveExpansion();\r\n }\r\n }\r\n }\r\n \r\n if (!aTransitionIsEnabled) {\r\n System.err.println(\"No transition enabled\");\r\n if (!tree.noEnabledTransitions || tree.pathToDeadlock.length < depth-1) {\r\n RecordDeadlockPath();\r\n tree.noEnabledTransitions = true;\r\n } else {\r\n System.err.println(\"Deadlocked node found, but path is not shorter\"\r\n + \" than current path.\");\r\n }\r\n } else {\r\n //System.out.println(\"Transitions enabled.\");\r\n }\r\n }", "int getTemporaryMaxDepth();", "@Test\n void solvesTestCase() {\n TreeNode root = new TreeNode(3);\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n\n List<List<Integer>> traversal = new ZigZagLevelOrder().zigzagLevelOrder(root);\n assertThat(traversal.size()).isEqualTo(3);\n assertThat(traversal.get(0)).containsExactly(3);\n assertThat(traversal.get(1)).containsExactly(20, 9);\n assertThat(traversal.get(2)).containsExactly(15, 7);\n }", "@Test\n\tpublic void testBuildTree() {\n\t\tTree<Integer> tree = new Tree<Integer> ();\n\t\t//add first level children, 1\n\t\tNode<Integer> root = tree.getRoot();\n\t\troot.addChild(new Node<Integer>());\n\t\tNode<Integer> c1 = root.getFirstChild();\n\t\tassertTrue(c1.getData() == null);\n\t\t//add second level children, 3\n\t\tc1.addChild(new Node<Integer> ());\n\t\tc1.addChild(new Node<Integer> ());\n\t\tc1.addChild(new Node<Integer> ());\n\t\tassertTrue(c1.countChildren() == 3);\n\t\t//add third level children, 3 * 3\n\t\tint[][] leafData = {\n\t\t\t\t{8,7,2},\n\t\t\t\t{9,1,6},\n\t\t\t\t{2,4,1}\n\t\t};\n\t\tNode<Integer> c2 = c1.getFirstChild();\n\t\tint i = 0;\n\t\twhile (c2 != null) {\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][0]));\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][1]));\n\t\t\tc2.addChild(new Node<Integer> (leafData[i][2]));\n\t\t\tc2 = c2.next();\n\t\t\ti++;\n\t\t}\n\t\tassertTrue(tree.countDepth() == 3);\n\t\tNode<Integer> leaf = root;\n\t\twhile (leaf.countChildren() > 0) {\n\t\t\tleaf = leaf.getFirstChild();\n\t\t}\n\t\tassertTrue(leaf.getData() == 8);\t\t\t\n\t}", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n byte[] byteArray0 = new byte[0];\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0, 1, 1);\n JavaParser javaParser0 = new JavaParser(byteArrayInputStream0);\n SimpleNode simpleNode0 = new SimpleNode(javaParser0, (-120811353));\n Node[] nodeArray0 = new Node[6];\n nodeArray0[0] = (Node) simpleNode0;\n nodeArray0[1] = (Node) simpleNode0;\n nodeArray0[2] = (Node) simpleNode0;\n nodeArray0[3] = (Node) simpleNode0;\n nodeArray0[4] = (Node) simpleNode0;\n SimpleNode simpleNode1 = new SimpleNode(javaParser0, 1);\n nodeArray0[5] = (Node) simpleNode1;\n simpleNode0.children = nodeArray0;\n int int0 = simpleNode0.jjtGetNumChildren();\n assertEquals(6, int0);\n }", "@Test\n public void getHeight() {\n Node node = new Node(150);\n node.setLeft(new Node(120));\n node.setRight(new Node(40));\n Node root = new Node(110);\n root.setLeft(new Node(80));\n root.setRight(node);\n assertEquals(2, BinarySearchTree.getHeight(root));\n }", "public void testBuildTreeDeepStructure() {\n TreeNode root = buildRootNodeFromFile(\"testWihManyLevels.js\");\n\n // Ensure the hierarchy is correct.\n assertEquals(\"suite1\", root.getNodeValue().getTestText());\n assertEquals(4, root.getChildCount());\n }", "public static void main(String[] args) {\n BinaryTreeNode<Integer> tree = new BinaryTreeNode<>(3);\n tree.setLeft(new BinaryTreeNode<>(2));\n tree.getLeft().setLeft(new BinaryTreeNode<>(1));\n tree.getLeft().getLeft().setLeft(new BinaryTreeNode<>(10));\n tree.getLeft().getLeft().getLeft().setRight(new BinaryTreeNode<>(13));\n tree.setRight(new BinaryTreeNode<>(5));\n tree.getRight().setLeft(new BinaryTreeNode<>(4));\n tree.getRight().setRight(new BinaryTreeNode<>(6));\n List<List<Integer>> result = btDepthOrder(tree);\n List<List<Integer>> goldenRes = new ArrayList<>();\n goldenRes.add(Arrays.asList(3));\n goldenRes.add(Arrays.asList(2, 5));\n goldenRes.add(Arrays.asList(1, 4, 6));\n goldenRes.add(Arrays.asList(10));\n goldenRes.add(Arrays.asList(13));\n goldenRes.add(new ArrayList());\n System.out.println(goldenRes.equals(result));\n System.out.println(result);\n }", "public VPHashTree(int depth) {\n super(DEFAULT_BIN_SIZE);\n this.depth = depth;\n this.depthReached = false;\n }", "public int getDepth();", "public static void main(String args[]){\n SimpleBST<Integer> t = new SimpleBST<Integer>();\n\n //build the tree / set the size manually\n //only for testing purpose\n Node<Integer> node = new Node<>(112);\n Node<Integer> node2 = new Node<>(330);\n node2 = new Node<>(440,node2,null);\n node = new Node<>(310,node,node2);\n t.root = node;\n t.size = 4;\n\n // Current tree:\n //\t\t\t 310\n // / \\\n // 112 440\n // /\n // 330\n\n\n //checking basic features\n if (t.root.data == 310 && t.contains(112) && !t.contains(211) && t.height() == 2){\n System.out.println(\"Yay 1\");\n }\n\n //checking more features\n if (t.numLeaves() == 2 && SimpleBST.findMax(t.root)==440\n && SimpleBST.findPredecessor(t.root) == 112){\n System.out.println(\"Yay 2\");\n }\n\n //toString and toArray\n if (t.toString().equals(\"112 310 330 440 \") && t.toArray().length==t.size()\n && t.toArray()[0].equals(310) && t.toArray()[1].equals(112)\n && t.toArray()[2].equals(440) && t.toArray()[3].equals(330) ){\n System.out.println(\"Yay 3\");\n //System.out.println(t.toString());\n }\n\n // start w/ an empty tree and insert to build the same tree as above\n t = new SimpleBST<Integer>();\n if (t.insert(310) && !t.insert(null) && t.size()==1 && t.height()==0\n && t.insert(112) && t.insert(440) && t.insert(330) && !t.insert(330)\n ){\n System.out.println(\"Yay 4\");\n }\n\n if (t.size()==4 && t.height()==2 && t.root.data == 310 &&\n t.root.left.data == 112 && t.root.right.data==440\n && t.root.right.left.data == 330){\n System.out.println(\"Yay 5\");\n }\n\n // more insertion\n t.insert(465);\n t.insert(321);\n t.insert(211);\n\n //\t\t\t 310\n // / \\\n // 112 440\n // \\ / \\\n // 211 330 465\n // /\n // 321\n\n\n\n //remove leaf (211), after removal:\n //\t\t\t 310\n // / \\\n // 112 440\n // / \\\n // 330 465\n // /\n // 321\n\n if (t.remove(211) && !t.contains(211) && t.size()==6 && t.height() == 3\n && SimpleBST.findMax(t.root.left) == 112){\n System.out.println(\"Yay 6\");\n }\n\n //remove node w/ single child (330), after removal:\n //\t\t\t 310\n // / \\\n // 112 440\n // / \\\n // 321 465\n\n if (t.remove(330) && !t.contains(330) && t.size()==5 && t.height() == 2\n && t.root.right.left.data == 321){\n System.out.println(\"Yay 7\");\n }\n\n //remove node w/ two children (440), after removal:\n //\t\t\t 310\n // / \\\n // 112 321\n // \\\n // 465\n\n if ((t.root!=null) && SimpleBST.findPredecessor(t.root.right) == 321 && t.remove(440) && !t.contains(440)\n && t.size()==4 && t.height() == 2 && t.root.right.data == 321){\n System.out.println(\"Yay 8\");\n }\n\n }", "@Test\n public void whenTreeIsFull_isBalanced() {\n BinaryTree.Node n1 = new BinaryTree.Node(1);\n BinaryTree.Node n2 = new BinaryTree.Node(2);\n BinaryTree.Node n3 = new BinaryTree.Node(3);\n n1.setLeft(n2);\n n1.setRight(n3);\n assertTrue(BinaryTreeIsBalanced.isBalanced(new BinaryTree(n1)));\n assertTrue(BinaryTreeIsBalancedNonOO.isBalanced(n1));\n }", "@Test\n\tpublic void testInsert4() {\n\t\t\n\t\tBTree<Long,String> T = new BTree<Long, String>(3);\n\t\tT.insert(new Long(10), \"Ten\");\n\t\tT.insert(new Long(20), \"Twenty\");\n\t\tT.insert(new Long(30), \"Thirty\");\n\t\t\n\t\tT.insert(new Long(70), \"Seventy\");\n\t\tT.insert(new Long(60), \"Sixty\");\n\t\tT.insert(new Long(80), \"Eighty\");\n\t\t\n\t\tT.insert(new Long(50), \"Fifty\");\n\t\tT.insert(new Long(40), \"Fourty\");\n\t\tT.insert(new Long(55), \"Fifty-Five\");\n\t\tT.insert(new Long(65), \"Sixty-Five\");\n\t\t\n\t\tassertTrue( T.root instanceof InnerNode);\n\t\t\n\t\tInnerNode<Long,String> root = (InnerNode<Long,String>) T.root;\n\t\tassertEquals(1, root.keys.size());\n\t\tassertEquals(60, (long) root.keys.get(0));\n\t\tassertEquals(2, root.children.size());\n\t\t\n\t\tInnerNode<Long,String> left = (InnerNode<Long,String>) root.children.get(0);\n\t\tInnerNode<Long,String> right = (InnerNode<Long,String>) root.children.get(1);\n\t\t\n\t\tassertEquals(30, (long) left.keys.get(0));\n\t\tassertEquals(50, (long) left.keys.get(1));\n\t\t\n\t\tassertEquals(70, (long) right.keys.get(0));\n\t\t\n\t\tLeafNode<Long, String> child0 = (LeafNode<Long, String>) left.children.get(0);\n\t\tLeafNode<Long, String> child1 = (LeafNode<Long, String>) left.children.get(1);\n\t\t\n\t\tLeafNode<Long, String> child2 = (LeafNode<Long, String>) left.children.get(2);\n\t\t\n\t\tLeafNode<Long, String> child3 = (LeafNode<Long, String>) right.children.get(0);\n\t\tLeafNode<Long, String> child4 = (LeafNode<Long, String>) right.children.get(1);\n\t\t\n\t\tassertEquals(10, (long) child0.children.get(0).key);\n\t\tassertEquals(20, (long) child0.children.get(1).key);\n\t\t\n\t\tassertEquals(30, (long) child1.children.get(0).key);\n\t\tassertEquals(40, (long) child1.children.get(1).key);\n\t\t\n\t\tassertEquals(50, (long) child2.children.get(0).key);\n\t\tassertEquals(55, (long) child2.children.get(1).key);\n\t\t\n\t\tassertEquals(60, (long) child3.children.get(0).key);\n\t\tassertEquals(65, (long) child3.children.get(1).key);\n\t\t\n\t\tassertEquals(70, (long) child4.children.get(0).key);\n\t\tassertEquals(80, (long) child4.children.get(1).key);\n\t\t\n\t}", "private void checkValidTree(Node node) {\n node.walk(store::updateObject);\n assertTrue(service.validateTree(node));\n }", "int maxDepth();", "abstract boolean isLeaf();", "@Override\n\tpublic boolean test(Object[] args, Object res) {\n\t\treturn maxDepth((TreeNode)args[0]) == (Integer)res;\n\t}", "int getDepth();", "public VPHashTree(int depth, int nodeCapacity) {\n super(nodeCapacity);\n this.depth = depth;\n this.depthReached = false;\n }", "public static void main(String[] args) {\n TreeNode root = new TreeNode(3);\n root.left = new TreeNode(4);\n root.right = new TreeNode(5);\n root.left.left = new TreeNode(1);\n root.left.right = new TreeNode(2);\n boolean result = isSubtree(root, root.left);\n System.out.println(result);\n }", "int getMax_depth();", "public static void main(String[] args) {\n GenericTree tree = new GenericTree();\n tree.display();\n System.out.println(\"Size \" + tree.size());\n\n System.out.println(\"Calc Size \" + tree.calculateSize());\n\n System.out.println(\"Max Node Data \" + tree.getMaxNodeData());\n\n System.out.println(\"Element 120 exists ? \" + tree.isElementExists(120));\n\n System.out.println(\"Element 56 exists ? \" + tree.isElementExists(56));\n\n System.out.println(\"Height of tree \" + tree.height());\n\n tree.preOrder();\n\n tree.postOrder();\n\n tree.levelOrder();\n\n tree.levelOrderLW();\n\n tree.levelOrderLW2();\n\n tree.levelOrderZigZag();\n\n tree.levelOrderZigZagPepVersion();\n\n // tree.linearize();\n // tree.display();\n\n // tree.removeLeaves();\n\n // tree.display();\n\n // // changes original data\n // tree.printMirrorImage();\n\n // tree.linearizeEffective();\n // tree.display();\n\n\n System.out.println(tree.isSymmetric());\n\n tree.predSucc(120);\n\n tree.justLarger(83);\n\n System.out.println(tree.kthSmallest(3));\n\n }", "@Test\n\tpublic void testInsert3() {\n\t\t\n\t\tBTree<Long,String> T = new BTree<Long, String>(3);\n\t\tT.insert(new Long(10), \"Ten\");\n\t\tT.insert(new Long(20), \"Twenty\");\n\t\tT.insert(new Long(30), \"Thirty\");\n\t\t\n\t\tT.insert(new Long(70), \"Seventy\");\n\t\tT.insert(new Long(60), \"Sixty\");\n\t\tT.insert(new Long(80), \"Eighty\");\n\t\t\n\t\tT.insert(new Long(50), \"Fifty\");\n\t\tT.insert(new Long(40), \"Fourty\");\n\t\t\n\t\tassertTrue( T.root instanceof InnerNode);\n\t\t\n\t\tInnerNode<Long,String> root = (InnerNode<Long,String>) T.root;\n\t\tassertEquals(3, root.keys.size());\n\t\tassertEquals(30, (long) root.keys.get(0));\n\t\tassertEquals(50, (long) root.keys.get(1));\n\t\tassertEquals(70, (long) root.keys.get(2));\n\t\t\n\t\tassertEquals(4, root.children.size( ));\n\t\tassertTrue( root.children.get(0) instanceof LeafNode );\n\t\tassertTrue( root.children.get(1) instanceof LeafNode );\n\t\tassertTrue( root.children.get(2) instanceof LeafNode );\n\t\tassertTrue( root.children.get(3) instanceof LeafNode );\n\n\t\tLeafNode<Long, String> child0 = (LeafNode<Long, String>) root.children.get(0);\n\t\tLeafNode<Long, String> child1 = (LeafNode<Long, String>) root.children.get(1);\n\t\tLeafNode<Long, String> child2 = (LeafNode<Long, String>) root.children.get(2);\n\t\tLeafNode<Long, String> child3 = (LeafNode<Long, String>) root.children.get(3);\n\t\t\n\t\tassertEquals(2, child0.children.size());\n\t\tassertEquals(10, (long) child0.children.get(0).key);\n\t\tassertEquals(20, (long) child0.children.get(1).key);\n\n\t\tassertEquals(2, child1.children.size());\n\t\tassertEquals(30, (long) child1.children.get(0).key);\n\t\tassertEquals(40, (long) child1.children.get(1).key);\n\n\t\tassertEquals(2, child2.children.size());\n\t\tassertEquals(50, (long) child2.children.get(0).key);\n\t\tassertEquals(60, (long) child2.children.get(1).key);\n\t\t\n\t\tassertEquals(2, child3.children.size());\n\t\tassertEquals(70, (long) child3.children.get(0).key);\n\t\tassertEquals(80, (long) child3.children.get(1).key);\n\t}", "@Test\n public void testHandleIndexNodeUnderflowed(){\n LeafNode<Integer, Integer> leaf1 = new LeafNode<Integer, Integer>(2, 2);\n leaf1.insertSorted(3, 3);\n LeafNode<Integer, Integer> leaf2 = new LeafNode<Integer, Integer>(5, 5);\n leaf2.insertSorted(7, 7);\n leaf2.insertSorted(8, 8);\n LeafNode<Integer, Integer> leaf3 = new LeafNode<Integer, Integer>(14, 14);\n leaf3.insertSorted(16, 16);\n LeafNode<Integer, Integer> leaf4 = new LeafNode<Integer, Integer>(22,22);\n leaf4.insertSorted(27, 27);\n leaf4.insertSorted(29, 29);\n LeafNode<Integer, Integer> leaf5 = new LeafNode<Integer, Integer>(33, 33);\n leaf5.insertSorted(34, 34);\n leaf5.insertSorted(38, 38);\n leaf5.insertSorted(39, 39);\n leaf1.nextLeaf = leaf2; leaf2.previousLeaf = leaf1; leaf2.nextLeaf = leaf3;\n leaf3.previousLeaf = leaf2; leaf3.nextLeaf = leaf4; leaf4.previousLeaf = leaf3;\n leaf4.nextLeaf = leaf5; leaf5.previousLeaf = leaf4; \n \n ArrayList<Integer> leftkeys = new ArrayList<>();\n leftkeys.add(5); leftkeys.add(13);\n ArrayList<Node<Integer, Integer>> leftNodeChilds = new ArrayList<>();\n leftNodeChilds.add(leaf1); leftNodeChilds.add(leaf2); leftNodeChilds.add(leaf3 );\n IndexNode<Integer, Integer> left = new IndexNode<>(leftkeys, leftNodeChilds);\n \n IndexNode<Integer, Integer> right = new IndexNode<>(30, leaf4, leaf5);\n \n IndexNode<Integer, Integer> parent = new IndexNode<>(17, left, right);\n left.parent = parent;\n right.parent = parent;\n // -----end construction\n \n BPlusTree<Integer, Integer> tree = new BPlusTree<>();\n int index = tree.handleIndexNodeUnderflow(left, right, parent);\n System.out.println(index);\n \n }", "@DISPID(1611006004) //= 0x60060034. The runtime will prefer the VTID if present\n @VTID(79)\n boolean constraintsNodeInTree();", "@Test\n public void whenAddNineNodesOnDifferentLevelsThenResultNineNodesFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(new TreeNode(), \"1\");\n tree.addChild(new TreeNode(), \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 3, 3, 2, 2, 2, 1, 1, 1]\"));\n }", "int depth();", "int depth();", "@Test\n public void testExpandTree() {\n // TODO: test ExpandTree\n }", "public int depth ();", "private Node makeTree(Node currentNode, DataNode dataNode,\r\n\t\t\tint featureSubsetSize, int height) {\n\r\n\t\tif (dataNode.labels.size() < this.traineeDataSize / 25 || height > 7) {\r\n\t\t\treturn new Node(majority(dataNode));\r\n\t\t}\r\n\t\telse{\r\n\r\n\t\t\tEntropyCalculation e1 = new EntropyCalculation();\r\n\r\n\t\t\tNode n = e1.maxGainedElement(dataNode.features, dataNode.labels, featureSubsetSize); //new\r\n\r\n\r\n\t\t\tif(e1.zeroEntropy){\r\n\r\n\t\t\t\tcurrentNode = new Node(dataNode.labels.get(0));\r\n\r\n\t\t\t\t/*currentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.labels.get(0);*/\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\tcurrentNode = new Node();\r\n\r\n\t\t\t\tcurrentNode.featureIndexColumn = n.featureIndexColumn;\r\n\t\t\t\tcurrentNode.featureIndexRow = n.featureIndexRow;\r\n\r\n\t\t\t\tcurrentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.features.get(currentNode.featureIndexRow).get(currentNode.featureIndexColumn);\r\n\r\n\t\t\t\tcurrentNode.leftChild = new Node();\r\n\t\t\t\tcurrentNode.rightChild = new Node();\r\n\r\n\t\t\t\tDataNode leftNode = new DataNode();\r\n\t\t\t\tDataNode rightNode = new DataNode();\r\n\r\n\t\t\t\tfor (int i = 0; i < dataNode.features.size(); i++) {\r\n\r\n\t\t\t\t\tif(currentNode.nodeValue >= dataNode.features.get(i).get(currentNode.featureIndexColumn)) {\r\n\r\n\t\t\t\t\t\tleftNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\tleftNode.labels.add(dataNode.labels.get(i));\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\trightNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\trightNode.labels.add(dataNode.labels.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif((leftNode.labels.isEmpty() || rightNode.labels.isEmpty()) && height == 0){\r\n\t\t\t\t\tSystem.out.println(\"Ghapla\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentNode.leftChild = makeTree(currentNode.leftChild, leftNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\tcurrentNode.rightChild = makeTree(currentNode.rightChild, rightNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void whenAddTwoChildAndSecondChildHasOnlyOneSubChildThenNotBalancedTree() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(nodeTwo, \"2\");\n nodeOne.addChild(new TreeNode(), \"3\");\n nodeOne.addChild(new TreeNode(), \"4\");\n nodeTwo.addChild(new TreeNode(), \"6\");\n assertThat(tree.isBalancedTree(), is(false));\n }", "@Test\n public void getStructureTest2() {\n DummyNode root = new DummyNode();\n root.addChild(root);\n DummyNode[] nodes = new DummyNode[6];\n for (int i = 0; i < 6; i++) {\n nodes[i] = new DummyNode();\n }\n root.addChild(nodes[0]); // ___\n root.addChild(nodes[0]); // v |\n root.addChild(nodes[1]); // root-'\n nodes[0].addChild(nodes[2]); // / \\\n nodes[1].addChild(nodes[2]); // 0 1\n nodes[2].addChild(nodes[3]); // \\ /\n nodes[2].addChild(nodes[4]); // 2\n nodes[2].addChild(nodes[5]); // / | \\\n // 3 4 5\n\n // actual computation:\n GraphStructure result = getStructure(root);\n\n int nLevels = Iterators.size(result.iterator());\n assertThat(nLevels).isEqualTo(4);\n\n int[] expectedNodesPerLayer = {1, 2, 1, 3};\n Iterator<GraphLevel> actualLevels = result.iterator();\n for (int expectedNodes : expectedNodesPerLayer) {\n assertThat(actualLevels.next().getWidth()).isEqualTo(expectedNodes);\n }\n }", "public boolean validTree(int n, int[][] edges) {\n int[] parent = new int[n];\n for (int i = 0; i < n; i++)\n parent[i] = i;\n for (int[] edge : edges) {\n int p1 = findParent(edge[0], parent);\n int p2 = findParent(edge[1], parent);\n if (p1 == p2)\n return false; //circlue\n parent[p1] = p2;\n }\n int count = 0;\n for (int i = 0; i < n; i++) {\n if (i == parent[i])\n count++;\n }\n return count == 1;\n }", "@Test\n public void baseCaseTriviallyIdenticalGraphsTest() {\n Event a1 = new Event(\"label1\");\n Event a2 = new Event(\"label1\");\n\n EventNode e1 = new EventNode(a1);\n EventNode e2 = new EventNode(a2);\n // If k exceeds the depth of the graph, if they are equivalent to max\n // existing depth then they are equal. Regardless of subsumption.\n testKEqual(e1, e2, 100);\n // A node should always be k-equivalent to itself.\n testKEqual(e1, e1, 100);\n }", "int treeSize() {\r\n\t\treturn\r\n\t\t\tmemSize()\r\n\t\t\t+ (this.expression == null ? 0 : getExpression().treeSize())\r\n\t\t\t+ (this.newArguments.listSize())\r\n\t\t\t+ (this.constructorArguments.listSize())\r\n\t\t\t+ (this.baseClasses.listSize())\r\n\t\t\t+ (this.declarations.listSize())\r\n\t;\r\n\t}", "@Test\n public void whenAddTwoChildAndTwoSubChildToEachChildThenBalancedTree() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(nodeTwo, \"2\");\n nodeOne.addChild(new TreeNode(), \"3\");\n nodeOne.addChild(new TreeNode(), \"4\");\n nodeTwo.addChild(new TreeNode(), \"5\");\n nodeTwo.addChild(new TreeNode(), \"6\");\n assertThat(tree.isBalancedTree(), is(true));\n }", "@Override\n\tpublic boolean qualityExpected(Tree tree) \n\t{\n\t\treturn true;\n\t}", "public boolean isTree() {\n\t\tif (vertices.size() == 0 || vertices.size() == 1) return true;\n\t\tSet<String> visited = new HashSet<String>();\n\t\treturn !isCyclicUtil(vertices.iterator().next(), visited, null) && visited.size() == vertices.size();\n\t}", "@Test\n public void whenHeightsSame_isBalanced() {\n BinaryTree.Node n1 = new BinaryTree.Node(1);\n BinaryTree.Node n2 = new BinaryTree.Node(2);\n BinaryTree.Node n3 = new BinaryTree.Node(3);\n BinaryTree.Node n4 = new BinaryTree.Node(4);\n BinaryTree.Node n5 = new BinaryTree.Node(5);\n n1.setLeft(n2);\n n2.setLeft(n3);\n n1.setRight(n4);\n n4.setRight(n5);\n assertTrue(BinaryTreeIsBalanced.isBalanced(new BinaryTree(n1)));\n assertTrue(BinaryTreeIsBalancedNonOO.isBalanced(n1));\n }", "boolean hasRecursionDepth();", "private boolean isSpanningTree() {\n BFSZeroEdge bfsZero = new BFSZeroEdge(graph, source);\n return bfsZero.isSpanningTree();\n }", "private static int getTreeSize(int totalSize) {\n if (totalSize <= 32) {\n return 0;\n } else {\n // TODO: Clojure does ((realSize - 1) >>> 5) << 5); is that faster?\n return ((totalSize - 1) & (~0x1F));\n }\n }", "private void getTreeShape() {\n int treeSizeInBytes = (int) (Math.ceil(treeSize / (double) Byte.SIZE));\n // converting tree shape in bytes to the bitset;\n BitSet bs = BitSet.valueOf(Arrays.copyOfRange(buffer.array(), bufferPosition, bufferPosition + treeSizeInBytes));\n bufferPosition += treeSizeInBytes;\n\n int treeLeavesAmount = 0;\n for (int i = 0; i < treeSize; i++) {\n boolean bit = bs.get(i);\n if (!bit) {\n treeLeavesAmount += 1;\n }\n treeShape.add(bit);\n }\n\n // adding tree leaves to the linked list;\n for (int i = bufferPosition; i < bufferPosition + treeLeavesAmount; i++) {\n treeLeaves.add(buffer.get(i));\n }\n // increasing buffer position for the amount of leaves(unique bytes);\n bufferPosition = bufferPosition + treeLeavesAmount;\n }", "void calculating(int depth);", "public int depth() { return Math.max(left.depth(), right.depth()) + 1; }", "public static Tree solve() {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n\n int[] arrayNode = new int[n + 1];\n for (int i = 1; i <= n; i++) {\n arrayNode[i] = scan.nextInt();\n }\n\n Color[] arrayColor = new Color[n + 1];\n for (int i = 1; i <= n; i++) {\n if (scan.nextInt() == 0) {\n arrayColor[i] = Color.RED;\n } else {\n arrayColor[i] = Color.GREEN;\n }\n }\n\n List<Integer>[] adjacentsList = new List[n + 1];\n for (int i = 1; i <= n; i++) {\n adjacentsList[i] = new ArrayList<Integer>();\n }\n\n for (int i = 0; i < n - 1; i++) {\n int x = scan.nextInt();\n int y = scan.nextInt();\n\n adjacentsList[x].add(y);\n adjacentsList[y].add(x);\n }\n\n scan.close();\n\n List<Integer>[] childrenList = new List[n + 1];\n for (int i = 1; i <= n; i++) {\n childrenList[i] = new ArrayList<Integer>();\n }\n\n int[] depths = new int[n + 1];\n boolean[] visited = new boolean[n + 1];\n\n Queue<Integer> queue = new LinkedList<Integer>();\n depths[1] = 0;\n queue.offer(1);\n while (!queue.isEmpty()) {\n int head = queue.poll();\n\n if (visited[head]) {\n continue;\n }\n visited[head] = true;\n\n for (int adjacent : adjacentsList[head]) {\n if (!visited[adjacent]) {\n childrenList[head].add(adjacent);\n depths[adjacent] = depths[head] + 1;\n queue.offer(adjacent);\n }\n }\n }\n\n Tree[] nodes = new Tree[n + 1];\n for (int i = 1; i <= n; i++) {\n if (childrenList[i].isEmpty()) {\n nodes[i] = new TreeLeaf(arrayNode[i], arrayColor[i], depths[i]);\n } else {\n nodes[i] = new TreeNode(arrayNode[i], arrayColor[i], depths[i]);\n }\n }\n for (int i = 1; i <= n; i++) {\n for (int child : childrenList[i]) {\n ((TreeNode) nodes[i]).addChild(nodes[child]);\n }\n }\n return nodes[1];\n }", "public int goodNodes (TreeNode root) {\n \n return goodNodes(root, -10000);\n \n }", "public boolean validTree(int n, int[][] edges) {\n HashMap<Integer,HashSet<Integer>> graph = new HashMap<>();\n for (int i=0;i<n;i++){\n graph.put(i,new HashSet<>());\n }\n for(int []edge:edges){\n // since undirected graph\n graph.get(edge[0]).add(edge[1]);\n graph.get(edge[1]).add(edge[0]);\n }\n Queue<Integer> queue = new LinkedList<Integer>();\n\n boolean [] visited = new boolean[n];\n queue.add(0);\n while (!queue.isEmpty()){\n Integer v = queue.poll();\n if(visited[v]){ // means cycle is present\n return false;\n }\n for(Integer w:graph.get(v)){\n graph.get(w).remove(v); // whatttta clasic approach\n queue.add(w);\n visited[w] = true;\n }\n }\n // all nodes should have visited ..\n for(int i=0;i<n;i++){\n if(visited[i] == false){\n return false;\n }\n }\n return true;\n }", "public boolean isValidBSTII(TreeNode node) {\n if (node == null) {\n return true;\n }\n Stack<TreeNode> stack = new Stack<>();\n \n while(node != null) {\n stack.push(node);\n node = node.left;\n }\n TreeNode prev = null;\n while(!stack.isEmpty()) {\n TreeNode curr = stack.peek();\n if (prev != null && prev.val >= curr.val) {\n return false;\n }\n prev = curr;\n if (curr.right == null) {\n curr = stack.pop();\n while(!stack.isEmpty() && stack.peek().right == curr) {\n curr = stack.pop();\n }\n } else {\n curr = curr.right;\n while(curr != null) {\n stack.push(curr);\n curr = curr.left;\n }\n }\n }\n return true;\n }", "int RBTreeTest(RBTreeNode testRoot) {\n if (testRoot == null) {\n return 1; //Leaf nodes\n }\n\n RBTreeNode lNode = testRoot.children[0];\n RBTreeNode rNode = testRoot.children[1];\n\n\n\n //Check that Red Nodes do not have red children\n if(isRedNode(testRoot)) {\n if(isRedNode(rNode) || isRedNode(lNode)) {\n System.out.println(\"Red-Red violation- Left: \"+ isRedNode(lNode) +\" Right: \"+isRedNode(rNode));\n return 0;\n }\n\n\n\n }\n\n int lHeight = RBTreeTest(lNode);\n int rHeight = RBTreeTest(rNode);\n\n //Check for Binary Tree. Should be done after the recursive call to handle the null case.\n if(lNode.val > rNode.val) {\n System.out.println(\"Binary tree violation Left: \"+ lNode.val + \" Right: \"+ rNode.val);\n return 0;\n }\n\n if(lHeight !=0 && rHeight != 0 && lHeight != rHeight) {\n System.out.println(\"Height violation- left Height: \"+rHeight+ \" right Height: \"+lHeight);\n return 0;\n }\n\n\n //Return current height incuding the current node.\n if (lHeight != 0 && rHeight != 0)\n return isRedNode(testRoot) ? lHeight : lHeight + 1;\n else\n return 0;\n\n }", "@Test\n public void getStructureTest1() {\n // ___\n DummyNode root = new DummyNode(); // v |\n root.addChild(root); // root-'\n\n // actual computation:\n GraphStructure result = getStructure(root);\n\n int nLevels = Iterators.size(result.iterator());\n assertThat(nLevels).isEqualTo(1);\n assertThat(result.iterator().next().getWidth()).isEqualTo(1);\n }", "public boolean isTreeBinarySearchTree() {\r\n\t\treturn isTreeBinarySearchTree(rootNode, Integer.MIN_VALUE, Integer.MAX_VALUE);\r\n\t}", "@Test\n public void complex_isUnbalanced() {\n BinaryTree.Node n4 = new BinaryTree.Node(4);\n BinaryTree.Node n3 = new BinaryTree.Node(3);\n n3.setLeft(n4);\n\n BinaryTree.Node n6 = new BinaryTree.Node(6);\n BinaryTree.Node n7 = new BinaryTree.Node(7);\n BinaryTree.Node n5 = new BinaryTree.Node(5);\n n5.setLeft(n6);\n n5.setRight(n7);\n\n BinaryTree.Node n2 = new BinaryTree.Node(2);\n n2.setLeft(n3);\n n2.setRight(n5);\n\n BinaryTree.Node n8 = new BinaryTree.Node(8);\n BinaryTree.Node n1 = new BinaryTree.Node(1);\n n1.setLeft(n2);\n n1.setRight(n8);\n\n assertFalse(BinaryTreeIsBalanced.isBalanced(new BinaryTree(n1)));\n assertFalse(BinaryTreeIsBalancedNonOO.isBalanced(n1));\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\t binarytree bt = new binarytree(); bt.display();\r\n\t\t System.out.println(bt.size2()); System.out.println(bt.size());\r\n\t\t System.out.println(bt.max()); System.out.println(bt.min());\r\n\t\t \r\n\t\t System.out.println(bt.height()); System.out.println(bt.find(87));\r\n\t\t System.out.println(bt.find(5)); //bt.mirror(); bt.display();\r\n\t\t \r\n\t\t bt.preOrder(); bt.postOrder(); bt.inOrder();\r\n\t\t System.out.println(\"**************************************\");\r\n\t\t bt.levelorder(); bt.preorderI();\r\n\t\t \r\n\t\t/*\r\n\t\t * System.out.println(bt.find(87)); System.out.println(bt.find(5));\r\n\t\t * \r\n\t\t * System.out.println(bt.height());\r\n\t\t * \r\n\t\t * // bt.display();\r\n\t\t */// bt.mirror();\r\n\t\t\t// bt.display();\r\n\t\t/*\r\n\t\t * bt.preOrder(); bt.postOrder(); bt.inOrder(); bt.levelOrder();\r\n\t\t * bt.preOrderI();33\r\n\t\t * \r\n\t\t * System.out.println(bt.postOrderPred(50));\r\n\t\t * System.out.println(bt.postOrderSucc(50));\r\n\t\t * \r\n\t\t * bt.multiCalculator();\r\n\t\t */\r\n\t\tint[] pre = { 50, 25, 12, 49, 62, 87, 75 };\r\n\t\tint[] in = { 12, 25, 49, 50, 62, 75, 87 };\r\n\t\tbinarytree b2 = new binarytree(pre, in);\r\n\t\tbt.display();\r\n\t\tSystem.out.println(b2.diameter());\r\n\t\tSystem.out.println(b2.isbst());\r\n\t\tSystem.out.println(b2.isbst3());\r\n\t}", "public interface MaximumDepthOfBinaryTree {\n int maxDepth(TreeNode root);\n}", "public interface TreeNode{\r\n\t\r\n\t// enumerated node types\r\n\tpublic enum NodeType {\r\n\t\tMIN {\r\n\t\t\t@Override\r\n\t\t\tpublic NodeType opposite() {\r\n\t\t\t\treturn MAX;\r\n\t\t\t}\r\n\t\t}, MAX {\r\n\t\t\t@Override\r\n\t\t\tpublic NodeType opposite() {\r\n\t\t\t\treturn MIN;\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\tpublic abstract NodeType opposite();\r\n\t};\r\n\t\r\n\t// the type of node represented\r\n\tpublic NodeType getNodeType();\r\n\t\r\n\t// a possibly empty list of children\r\n\tpublic List<TreeNode> getChildrenNodes();\r\n\t\r\n\t// request a new child node after executing a move\r\n\tpublic TreeNode getChildNode(GameMove move) throws IllegalArgumentException;\r\n\t\r\n\t// the parent node of the current node\r\n\t// current Node == getParentNode for ROOT\r\n\tpublic TreeNode getParentNode();\r\n \r\n\t// whether the current node is the root node\r\n\tpublic Boolean isRootNode();\r\n \r\n\t// returns an object modeling some external state \r\n\tpublic GameState getGameState();\r\n \r\n\t// depth of node in tree\r\n\tpublic int getDepth();\r\n \r\n\t// evaluates/scores the leaf node\r\n\tpublic int scoreLeafNode();\r\n}", "public double getDepth();", "@Override\n public int getDepth() {\n return 680;\n }", "public boolean validTree(int n, int[][] edges) {\n if(n == 0)return false;\n if(edges.length != n - 1)return false;\n father = new int [n];\n for(int i = 0; i < n; i++){\n father[i] = i;\n }\n for(int [] pair : edges){\n int rootA = find(father, pair[0]);\n int rootB = find(father, pair[1]);\n if(rootA == rootB)return false;\n father[rootA] = rootB;\n }\n return true;\n }", "@Test\n public void complex_isBalanced() {\n BinaryTree.Node n4 = new BinaryTree.Node(4);\n BinaryTree.Node n3 = new BinaryTree.Node(3);\n n3.setLeft(n4);\n\n BinaryTree.Node n6 = new BinaryTree.Node(6);\n BinaryTree.Node n7 = new BinaryTree.Node(7);\n BinaryTree.Node n5 = new BinaryTree.Node(5);\n n5.setLeft(n6);\n n5.setRight(n7);\n\n BinaryTree.Node n2 = new BinaryTree.Node(2);\n n2.setLeft(n3);\n n2.setRight(n5);\n\n BinaryTree.Node n9 = new BinaryTree.Node(9);\n BinaryTree.Node n8 = new BinaryTree.Node(8);\n n8.setRight(n9);\n\n BinaryTree.Node n1 = new BinaryTree.Node(1);\n n1.setLeft(n2);\n n1.setRight(n8);\n\n assertTrue(BinaryTreeIsBalanced.isBalanced(new BinaryTree(n1)));\n assertTrue(BinaryTreeIsBalancedNonOO.isBalanced(n1));\n }", "public static void main(String[] args) {\n TreeNode root = new TreeNode(3);//true\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n\n // 1\n // / \\\n // 2 2\n // / \\\n // 3 3\n // / /\n // 4 4\n TreeNode root2 = new TreeNode(1);//false\n root2.left = new TreeNode(2);\n root2.right = new TreeNode(2);\n root2.left.left = new TreeNode(3);\n root2.right.right = new TreeNode(3);\n root2.left.left.left = new TreeNode(4);\n root2.right.right.left = new TreeNode(4);\n System.out.println(new Solution().isBalanced(root2));\n }", "public boolean IsTree() {\r\n\t\treturn this.IsConnected() && !this.IsCyclic();\r\n\t}", "public StaticTree (int depth) {\r\n\t\tinitializeStack(depth);\r\n\t\t//Initialize root for an empty tree\r\n\t\tthis.root=-1;\r\n\t\t//First available position when creating a new Tree\r\n\t\tthis.avail=0;\r\n\t\tcompares=0;\r\n\t\torderedArray=new int[depth];\r\n\t}", "private static int nodeDepthsIterativeQueue(Node root) {\n\t\tQueue<Level>q = new LinkedList<>();\n\t\tint result = 0;\n\t\tq.add(new Level(root, 0));\n\t\twhile(!q.isEmpty()) {\n\t\t\tLevel curr = q.poll();\n\t\t\tif(curr.root == null)\n\t\t\t\tcontinue;\n\t\t\tresult += curr.depth;\n\t\t\tSystem.out.println(curr.toString());\n\t\t\tq.add(new Level(curr.root.left, curr.depth + 1));\n\t\t\tq.add(new Level(curr.root.right, curr.depth + 1));\n\t\t}\n\t\treturn result;\n\t}", "@Override\n public boolean checkForBinarySearchTree() {\n if (this.rootNode == null)\n return true;\n \n ArrayList<K> inorderTraverse = inOrdorTraverseBST();\n for (int i=1; i<inorderTraverse.size(); i++) {\n if(inorderTraverse.get(i-1).compareTo(inorderTraverse.get(i)) == 1)\n return false;\n }\n \n return true;\n }", "@Override\n public boolean checkForBalancedTree() {\n BSTNode<K> currentNode = this.rootNode;\n boolean balancedTree = true;\n \n return checkLoop(currentNode, null, balancedTree, null);\n }", "boolean isOverflow() {\r\n\r\n if (children.size() > branchingFactor) {\r\n return true;\r\n }\r\n return false;\r\n }", "int treeSize() {\n return memSize() + (this.expression == null ? 0 : getExpression().treeSize()) + (this.typeArguments == null ? 0 : this.typeArguments.listSize()) + (this.methodName == null ? 0 : getName().treeSize());\n }", "boolean isLeaf();", "boolean isLeaf();", "boolean isLeaf();", "boolean isLeaf();", "public static void main(String[] args) {\n System.out.println(\"..............Testing Balanced Tree..............\");\n {\n BST bst = BST.createBST();\n printPreety(bst.root);\n\n System.out.println(\"Testing Balanced Tree Using Brute Force Approach: \" + isBalanced_BruteForce(bst.root) + \", number of subtrees traversed: \" + countWithBruteForce);\n System.out.println(\"Testing Balanced Tree Better way: \" + isBalanced_Better(bst.root) + \", number of subtrees traversed: \" + countWithBetterWay);\n System.out.println(\"Testing Balanced Tree Using Memoization: \" + isBalanced_Memoization(bst.root, new HashMap<>()) + \", number of subtrees traversed: \" + countWithMemoization);\n //System.out.println(\"Wrong algorithm:\" + isTreeAlmostBalanced(bst.root));\n }\n System.out.println();\n\n countWithBruteForce = 0;\n countWithBetterWay = 0;\n countWithMemoization = 0;\n\n System.out.println(\"..............Testing UnBalanced Tree..............\");\n {\n BST unBalancedBst = BST.createUnBalancedBST();\n printPreety(unBalancedBst.root);\n\n System.out.println(\"Testing UnBalanced Tree Using Brute Force Approach: \" + isBalanced_BruteForce(unBalancedBst.root) + \", number of subtrees traversed: \" + countWithBruteForce);\n System.out.println(\"Testing UnBalanced Tree Better way: \" + isBalanced_Better(unBalancedBst.root) + \", number of subtrees traversed: \" + countWithBetterWay);\n System.out.println(\"Testing UnBalanced Tree Using Memoization: \" + isBalanced_Memoization(unBalancedBst.root, new HashMap<>()) + \", number of subtrees traversed: \" + countWithMemoization);\n //System.out.println(\"Wrong algorithm:\" + isTreeAlmostBalanced(unBalancedBst.root));\n }\n System.out.println();\n\n countWithBruteForce = 0;\n countWithBetterWay = 0;\n countWithMemoization = 0;\n\n System.out.println(\"..............Testing Another UnBalanced Tree..............\");\n {\n BST anotherUnbalanced = BST.createAnotherUnBalancedBST();\n printPreety(anotherUnbalanced.root);\n\n System.out.println(\"Testing another UnBalanced Tree Using Brute Force Approach: \" + isBalanced_BruteForce(anotherUnbalanced.root) + \", number of subtrees traversed: \" + countWithBruteForce);\n System.out.println(\"Testing another UnBalanced Tree Better way: \" + isBalanced_Better(anotherUnbalanced.root) + \", number of subtrees traversed: \" + countWithBetterWay);\n System.out.println(\"Testing another UnBalanced Tree Using Memoization: \" + isBalanced_Memoization(anotherUnbalanced.root, new HashMap<>()) + \", number of subtrees traversed: \" + countWithMemoization);\n }\n\n }", "public boolean isBalancedTree(Node root){\n\t\tif(root == null)\n\t\t\treturn false;\n\t\tint countLeft = DFS(root.left);\n\t\tint countRight = DFS(root.right);\n\t\tSystem.out.println(\"left: \" + countLeft + \" right \" + countRight);\n\t\treturn (Math.abs(countRight - countLeft) <= 1);\n\t}", "@Override\n\tpublic boolean add(E e) {\n\t\tStack<Node> stack = new Stack<Node>();\n\t\tStack<Node> stackForParent = new Stack<Node>();\n\t\t\n\t\t\n\t\tNode tempRoot = root;\n\t\tif(root == null) {\n\t\t\tsize += 1;\n\t\t\troot = new Node(e);\n\t\t\troot.height = max(heightOfNode(root.left) , heightOfNode(root.right)) + 1;\n\t\t} else {\n\n\t\t\tNode newNode = new Node(e);\n\n\t\t\tNode y = null;\n\n\t\t\twhile(tempRoot != null){\n\t\t\t\ty = tempRoot;\n\t\t\t\tif(e.compareTo(tempRoot.value) < 0){\n\t\t\t\t\tstack.push(tempRoot);\n\t\t\t\t\tstackForParent.push(tempRoot);\n\t\t\t\t\ttempRoot = tempRoot.left;\n\n\t\t\t\t} else {\n\t\t\t\t\tstack.push(tempRoot);\n\t\t\t\t\tstackForParent.push(tempRoot);\n\t\t\t\t\ttempRoot = tempRoot.right;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(y == null){\n\t\t\t\ty = newNode;\n\t\t\t\tsize += 1;\n\t\t\t\ty.balanceFactor = 0;\n\t\t\t} else if(e.compareTo(y.value) < 0){\n\t\t\t\ty.left = newNode;\n\t\t\t\ty.left.balanceFactor = 0;\n\t\t\t\tsize += 1;\n\t\t\t} else if(e.compareTo(y.value) == 0) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\ty.right = newNode;\n\t\t\t\ty.right.balanceFactor = 0;\n\t\t\t\tsize += 1;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tNode parent = null;\n\t\t\tNode walkBackNode;\n\t\t\tint lHeight,rHeight;\n\t\t\tif(!stackForParent.empty()) {\n\t\t\t\tstackForParent.pop();\n\t\t\t}\n\t\t\t\n//\t\t\tSystem.out.println(stack.pop().value);\n\t\t\twhile(!stack.empty()) {\n\t\t\t\twalkBackNode = stack.pop();\n//\t\t\t\twalkBackNode.height = walkBackNode.height + 1;\n\t\t\t\tif(!stackForParent.empty()) {\n\t\t\t\t\tparent = stackForParent.pop();\n\t\t\t\t}\n\t\t\t\tif(walkBackNode.left == null) {\n\t\t\t\t\tlHeight = -1;\n\t\t\t\t} else {\n\t\t\t\t\tlHeight = walkBackNode.left.height ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(walkBackNode.right == null) {\n\t\t\t\t\trHeight = -1;\n\t\t\t\t} else {\n\t\t\t\t\trHeight = walkBackNode.right.height;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twalkBackNode.balanceFactor = lHeight - rHeight;\n\t\t\t\t\n\t\t\t\twalkBackNode.height = 1 + max(lHeight,rHeight);\n\t\t\t\t\n\t\t\t\tif((walkBackNode.balanceFactor < -1) || walkBackNode.balanceFactor > 1) {\n\t\t\t\t\t// tree is violating the rules of AVL tree\n\t\t\t\t\tif(walkBackNode.balanceFactor > 1 && e.compareTo(walkBackNode.left.value) < 0) {\n\t\t\t\t\t\tif(walkBackNode.value == this.root.value) {\n\t\t\t\t\t\t\tthis.root = rrRotation(walkBackNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparent.right = rrRotation(walkBackNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif(walkBackNode.balanceFactor < -1 && e.compareTo(walkBackNode.right.value) > 0) {\n\t\t\t\t\t\tif(walkBackNode.value == this.root.value) {\n\t\t\t\t\t\t\tthis.root = lrRotation(walkBackNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparent.left = lrRotation(walkBackNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif(walkBackNode.balanceFactor > 1 && e.compareTo(walkBackNode.left.value) > 0) {\n\t\t\t\t\t\twalkBackNode.left = lrRotation(walkBackNode.left);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(walkBackNode.value == this.root.value) {\n\t\t\t\t\t\t\tthis.root = rrRotation(walkBackNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparent.left = rrRotation(walkBackNode);\n\t\t\t\t\t\t}\n//\t\t\t\t\t\trrRotation(walkBackNode);\n//\t\t\t\t\t\tSystem.out.println(\"Root value:= \" + values.balanceFactor);\n//\t\t\t\t\t\tSystem.out.println(\"Left value:= \" + values.left.balanceFactor);\n//\t\t\t\t\t\tSystem.out.println(\"Right value:= \" + values.right.balanceFactor);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif(walkBackNode.balanceFactor< -1 && e.compareTo(walkBackNode.right.value) < 0) {\n\t\t\t\t\t\twalkBackNode.right = rrRotation(walkBackNode.right);\n\t\t\t\t\t\tif(walkBackNode.value == this.root.value) {\n\t\t\t\t\t\t\tthis.root = lrRotation(walkBackNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tparent.right = lrRotation(walkBackNode);\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tlrRotation(walkBackNode); \n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public interface TreeNode {\r\n\r\n /**\r\n * Function to return Code of this node.\r\n *\r\n * @return Character that is the code that the node represents.\r\n */\r\n Character getCode();\r\n\r\n /**\r\n * Method to add a child to a Tree node. The method returns reference to the node that was just\r\n * added or the node with the entered code if it was already present.\r\n *\r\n * @param node a treenode with the code to be added to the intermediate node\r\n * @return an already existing tree node with given code or create a new tree node and return it.\r\n */\r\n TreeNode addChild(TreeNode node);\r\n\r\n /**\r\n * Given a node with a character code, return the node in the tree with the same code.\r\n *\r\n * @param node the node with character to be checked for in the tree.\r\n * @return the node with code equal to the code of the parameter passed.\r\n */\r\n TreeNode returnNode(TreeNode node);\r\n\r\n /**\r\n * Given a size, check if all nodes in the tree have number of children equal to the size passed.\r\n *\r\n * @param size the value to be checked against.\r\n * @return true or false according to if the check passes or fails.\r\n */\r\n boolean isCodeComplete(int size);\r\n}", "@Test\r\n public void testHeightAddNodesRight(){\r\n \ttree.add(\"g\");\r\n \ttree.add(\"f\");\r\n \ttree.add(\"e\");\r\n \tassertEquals(tree.height(),2);\r\n \t\r\n \t//testing height of 3\r\n \ttree.add(\"d\"); //height now 3, d is right\r\n \tassertEquals(tree.height(), 3);\r\n \t\r\n \ttree.add(\"c\");\r\n \ttree.add(\"b\"); \r\n \ttree.add(\"a\"); \r\n \tassertEquals(tree.height(),6); //last\r\n }", "public VPHashTree(int depth, ArrayList<? extends VPPoint> points,\n int nodeCapacity) {\n super(points, nodeCapacity);\n this.depth = depth;\n this.depthReached = false;\n }", "@Test\n public void test11() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n int int0 = defaultMenuItem0.getDepth();\n assertEquals(0, int0);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }", "private static boolean isBalanced_Better(TreeNode root) {\n if (getHeight_Better(root) == -1) return false;\n\n return true;\n }", "private void verifySteadyFairShareMemory(Collection<FSLeafQueue> leafQueues,\n int nodeCapacity) {\n for (FSLeafQueue leaf : leafQueues) {\n if (leaf.getName().startsWith(\"root.parentA\")) {\n assertEquals(0.2,\n (double) leaf.getSteadyFairShare().getMemorySize() / nodeCapacity,\n 0.001);\n } else if (leaf.getName().startsWith(\"root.parentB\")) {\n assertEquals(0.05,\n (double) leaf.getSteadyFairShare().getMemorySize() / nodeCapacity,\n 0.001);\n }\n }\n }" ]
[ "0.6517315", "0.6517315", "0.63752997", "0.63316846", "0.6308122", "0.62729585", "0.6263509", "0.62500435", "0.62260526", "0.62092674", "0.61961687", "0.61835164", "0.6167953", "0.60983866", "0.60701877", "0.6055422", "0.60524184", "0.6015915", "0.6003783", "0.5996111", "0.59941643", "0.59704304", "0.5951485", "0.59347624", "0.5909894", "0.5890037", "0.58831906", "0.5873153", "0.58572876", "0.5857064", "0.58406186", "0.5839199", "0.58320886", "0.5809069", "0.5802153", "0.57987016", "0.5786158", "0.5776798", "0.57563573", "0.57483095", "0.574699", "0.5743942", "0.57427293", "0.5736755", "0.57267416", "0.57267416", "0.5695437", "0.56949025", "0.5683416", "0.5663232", "0.56392014", "0.5636793", "0.5634971", "0.56256145", "0.56252545", "0.56231165", "0.56182796", "0.5616634", "0.5616571", "0.5599605", "0.5595235", "0.55789125", "0.5576968", "0.55764496", "0.5568419", "0.5559684", "0.5557891", "0.5554017", "0.5538942", "0.5526844", "0.5526268", "0.55254745", "0.5522379", "0.5518698", "0.5492916", "0.54882", "0.54870766", "0.5485446", "0.5471494", "0.54670674", "0.54643744", "0.5459864", "0.545929", "0.5457426", "0.54505134", "0.5447645", "0.5443095", "0.5440343", "0.5440343", "0.5440343", "0.5440343", "0.5436292", "0.5431079", "0.5429833", "0.5424122", "0.5421412", "0.54205245", "0.5418804", "0.5418784", "0.54083794" ]
0.7051072
0
/2) Napisati funkciju koja vraca sumu dva niza, zatim od niza sa vecom sumom oduzme sumu drugog niza i vrati da li je veci niz i dalje veci Primer: Ako se unese prvi niz 1,2,3 (suma je 6) i drugi niz 10,20,30 (suma 60) onda 60 6 = drugi niz je i dalje veci, vraca true.
public static void main(String[] args) { int[] niz1 = {15, 20, 56, 12, 13}; int[] niz2 = {-3, -2, -1, -4}; System.out.println("Da li je suma niza i dalje veca: " ); poredjenje(niz1, niz2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }", "public static void main(String[] args) {\n\t\tint n = 4;\t// Kontejneri\n\t\tint k = 1;\t// Kapacitet\n\t\tint prvi = n / k; // Provjera da li se svi mogu sloziti jedan u drugi (djeljivost sa 2)\n\t\tint exponent; // Jedini brojevi djeljivi sa 2 do kraja (slaganja kontejnera)\n\t\tint dodatni; // Koliko treba dodatnih\n\t\tfor (int i = 1; i > 0;) { // Racunaj eksponent 2 do kraja int vrijednosti...\n\t\t\ti = i * 2;\n\t\t\texponent = i;\n\t\t\tif (prvi == exponent) {\n\t\t\t\tSystem.out.println(\"Ne treba\");\n\t\t\t\tbreak;\n\t\t\t} else if (prvi != exponent) { // Ako se ne mogu sloziti do kraja, uzmi slijedeci veci eksponent od broj kontejnera i daj ostatak djeljenja, to su dodatne kutije.\n\t\t\t\tif (2 < n && n < 4) {\n\t\t\t\t\tdodatni = 4 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 4 < n && n < 8) {\n\t\t\t\t\tdodatni = 8 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 8 < n && n < 16) {\n\t\t\t\t\tdodatni = 16 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 16 < n && n < 32) {\n\t\t\t\t\tdodatni = 32 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (prvi != exponent && 32 < n && n < 64) {\n\t\t\t\t\tdodatni = 64 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 64 < n && n < 128) {\n\t\t\t\t\tdodatni = 128 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 128 < n && n < 256) {\n\t\t\t\t\tdodatni = 256 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 256 < n && n < 512) {\n\t\t\t\t\tdodatni = 512 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else { // U suprotno, djeljenje kontejnera i kapaciteta je jednako eksponentu 2 i ne treba doadatnih.\n\t\t\t\t\tSystem.out.println(\"Ne treba dodatnih kontejnera.\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "int getSumaAdunata();", "public boolean stupneProNeoriGraf(){\n\t\tint pom = 0;\n\t\tfor(int i = 0;i<vrchP.length;i++){\n\t\t\tint pom2 = vrchP[i].stupenVstup + vrchP[i].stupenVystup;\n\t\t\tpom2 = pom2 % 2;\n\t\t\tif(pom2 != 0)\n\t\t\t\tpom++;\n\t\t}\n\t\tif(pom != 0)\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "public static int ruolette(ArrayList<Integer> fitvalores, ArrayList<int[]> poblacion, int semilla){ \n int totalfitnes = 0;\n int totalfitnesnuevo = 0;\n int indtablero = 0;\n int semi=semilla;\n int tpoblacion=poblacion.size();\n int []nuevofitness = new int [fitvalores.size()];\n double []nproporcion = new double [fitvalores.size()];\n ArrayList <Double> proporcion = new ArrayList<>();//proporcion j la ruleta\n ArrayList <Double> ruleta = new ArrayList<>();\n //obtener el max fitnes\n for(int i=0;i<fitvalores.size();i++){ //total de fitnes\n totalfitnes=totalfitnes+fitvalores.get(i);\n }\n \n for(int i=0;i<fitvalores.size();i++){ //poner datos en el nuevo fittnes inverso\n double pro=(tpoblacion*tpoblacion-tpoblacion)-fitvalores.get(i);\n nuevofitness[i]= (int) pro;\n // System.out.println(\"nuevo fitnes\"+nuevofitness[i]);\n } \n for(int i=0;i<fitvalores.size();i++){ //total de fitnes nuevo o inverso\n totalfitnesnuevo=(totalfitnesnuevo+nuevofitness[i]);//para que los mejores casos usen mas espacio\n }\n \n for(int i=0;i<fitvalores.size();i++){ //poner datos en el array proporcion\n double var1=nuevofitness[i];\n double var2=totalfitnesnuevo;\n double pro=var1/var2;\n nproporcion[i]=pro;\n //System.out.println(\"nueva proporcion \"+nproporcion[i]);\n } \n ruleta.add(nproporcion[0]);\n // System.out.println(\"primera propporniaso \"+nproporcion[0]);\n for(int i=1;i<fitvalores.size();i++){ //poner datos en la ruleta\n double var1=ruleta.get(i-1);\n double var2=nproporcion[i];\n ruleta.add(var1+var2);\n //System.out.println(\"ruleta \"+ruleta.get(i));\n }\n double num=randomadec(0,1,semi);\n // System.out.println(\"numero random dec \"+num); \n for(int i=0;i<fitvalores.size();i++){ //poner datos en el array proporcion\n // System.out.println(ruleta.get(i));\n if(num<ruleta.get(i)){\n indtablero=i;\n //System.out.println(\"se guardo el tablero \"+indtablero);\n break;\n }\n }\n return indtablero;//esto devuelve el indice del tablero ganador en la ruleta\n }", "int getSuma();", "public void ajaTesti() {\n \n long summa1 = 0;\n long summa2 = 0;\n int laskuri1=0; //test\n int laskuri2=0;\n \n Taytto tulosN = null;\n TayttoDP tulosDP = null;\n \n //rotatoidaan testien suoritusjärjestystä kerran\n int rot = 2;\n for (int i=0;i<rot;i++) {\n //random järjestys\n //Tavara[] ar = shuffleTavarat();\n\n Tavara[] ar = this.tavarat;\n Taytto tayttoN = new Taytto(ar, sakki);\n TayttoDP tayttoDP = new TayttoDP(ar, sakki);\n\n long aikaAlussa = 0;\n long aikaLopussa = 0;\n long aika = 0;\n\n int sisatoisto=this.toistokoe;\n //rotatoidaan testien ajojärjestys\n long sum1=0; \n long sum2=0; \n\n //ignoorataan 10 ensimmäistä tuloksista, lisätään siksi 10 ylimääräistä toistokierrosta\n for (int j=0;j<sisatoisto;j++) {\n\n if (i%2==0) {\n laskuri1++;\n\n // Mittaus naivi-algoritmi\n aikaAlussa = System.nanoTime();\n tayttoN.etsiMaksimiArvoJaJono(); \n aikaLopussa = System.nanoTime(); \n\n aika=aikaLopussa-aikaAlussa;\n //ignoorataan 10 ensimmäistä tuloksista\n if(j>=0) sum1+=aika;\n\n // Mittaus DP -algoritmi\n aikaAlussa = System.nanoTime();\n tayttoDP.etsiMaksimiArvoJaJono(); \n aikaLopussa = System.nanoTime(); \n\n aika=aikaLopussa-aikaAlussa;\n if(j>=0) sum2+=aika;\n }\n else {\n laskuri2++; //test\n\n // Mittaus DP -algoritmi\n aikaAlussa = System.nanoTime();\n tayttoDP.etsiMaksimiArvoJaJono(); \n aikaLopussa = System.nanoTime(); \n\n aika=aikaLopussa-aikaAlussa;\n if(j>=0) sum2+=aika;\n \n // Mittaus naivi-algoritmi\n aikaAlussa = System.nanoTime();\n tayttoN.etsiMaksimiArvoJaJono(); \n aikaLopussa = System.nanoTime(); \n\n aika=aikaLopussa-aikaAlussa;\n if (j>=0) sum1+=aika;\n }\n\n //Tarkistus, että tulos sama kummallakin algoritmilla\n if (tayttoN.annaMaxArvo()!=tayttoDP.annaMaxArvo()) {\n System.out.println(\"Taytto1: Arvo: \" + tayttoN.annaMaxArvo() + \" , jono :\" + tayttoN.annaMaxJono());\n System.out.println(\"Taytto2: Arvo: \" + tayttoDP.annaMaxArvo() + \" , jono :\" + tayttoDP.annaMaxJono()); \n break;\n }\n \n \n }\n summa1+=sum1/(sisatoisto);\n summa2+=sum2/(sisatoisto);\n \n tulosN=tayttoN;\n tulosDP=tayttoDP;\n \n }\n// System.out.println(laskuri1);\n// System.out.println(laskuri2);\n\n \n long keskiarvo1 = summa1/rot;\n long keskiarvo2 = summa2/rot;\n\n String[] kootN = tulosN.annaMaxJono().split(\" \");\n int kokoN = 0;\n for (int i = 0; i < kootN.length; i++) {\n try {\n kokoN += this.tavarat[Integer.parseInt(kootN[i])-1].annaKoko();\n } catch (NumberFormatException nfe) {};\n } \n \n String[] kootDP = tulosDP.annaMaxJono().split(\" \");\n int kokoDP = 0;\n for (int i = 0; i < kootDP.length; i++) {\n try {\n kokoDP += this.tavarat[Integer.parseInt(kootDP[i])-1].annaKoko();\n } catch (NumberFormatException nfe) {};\n } \n\n System.out.println(this.nimi);\n System.out.println(\"Tavarat: \" + annaTavaroidenKokoJaArvo());\n System.out.println(\"Sakki \" + this.sakki.annaKoko() + \", lkm \" + this.koko + \", toistot \" + toistokoe);\n System.out.println(\"Keskiarvo (ms) Naiivi: \" + keskiarvo1/1000 + \", DP: \" + keskiarvo2/1000);\n System.out.println(\"Tulos Naiivi: maksimiarvo: \" + tulosN.annaMaxArvo() + \" koko: \" + kokoN + \" maksimiarvon toteuttavien travaroiden järjestysnumerot: \"); \n System.out.println(tulosN.annaMaxJono());\n System.out.println(\"Tulos DP: maksimiarvo: \" + tulosDP.annaMaxArvo() + \" koko: \" + kokoDP + \" maksimiarvon toteuttavien travaroiden järjestysnumerot: \");\n System.out.println(tulosDP.annaMaxJono());\n \n }", "@Test\n public void testSuma() {\n assertEquals(new Fraccion(12.0, 9.0), instance.suma());\n assertEquals(12.0, instance.suma().getNumerador(), 0.001);\n assertEquals(9.0, instance.suma().getDenominador(), 1.0E-3); // 1.0 ^ -3 -> 1 / 1000\n }", "public void iniSumSubconjuntos(int[] conjunto, int sumD)\n {\n List<List<Integer>> subsets = new ArrayList<>();\n subsets.add(new ArrayList<>());\n String ns = \"\";\n int sum = 0;\n int nSum = 1;\n System.out.println(\"Subconjunto que suman \" + sumD);\n for (int x : conjunto)\n {\n int n = subsets.size();\n for (int i = 0; i < n; i++)\n {\n ArrayList<Integer> aux = new ArrayList(subsets.get(i));\n aux.add(x);\n subsets.add(aux);\n if (aux.size() >= 2)\n {\n //Ejecucion del hilo mientras hace las combinaciones\n //-->>Implementado en hilo\n int add = 0;\n String ssAux = \"\";\n ssAux += \"{ \";\n for (int j = 0; j < aux.size(); j++)\n {\n if (j == aux.size() - 1)\n {\n ssAux += aux.get(j);\n } else\n {\n ssAux += aux.get(j) + \", \";\n }\n add += aux.get(j);\n }\n ssAux += \" }\\n\";\n if (add == sumD)\n {\n //--> Aqui imprime el resultado\n //System.out.println(\"\" + ssAux);\n sum++;\n System.out.println(sum + \".-\" + ssAux + \"\\n\");\n s += ssAux;\n } else\n {\n ns += nSum + \".- \" + ssAux + \"\\n\";\n nSum++;\n }\n }\n }\n }\n //System.out.println(\"Subconjuntos que suman \" + sumD + \"\\n\" + s + \" Total de resultados: \" + sum + \"\");\n System.out.println(\"\\n----------------------------------------------------------------------------------------\");\n System.out.println(\"Subconjuntos que NO suman \" + sumD + \"\\n\" + ns + \"Total de resultados: \" + nSum);\n //System.out.println(\"PPSubconjuntos\");\n /*subsets.forEach(System.out::println);*/\n }", "public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}", "public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }", "private static int zamijeniDvijeKarte(int[] spil) {\n\t\tint prva =randomKarta (spil);\n\t\tint druga = randomKarta (spil);\n\t\tzamijeni (spil, prva, druga);\n\t\t\n\t\treturn spil, prva, druga;\n\t}", "private int syuneri_gumar(ArrayList<Integer> syun) {\n int summa = 0;\n for (int i = 0; i < syun.size(); i++)\n summa += syun.get(i);\n return summa;\n }", "public boolean calcularTotal() {\r\n double dou_debe = 0;\r\n double dou_haber = 0;\r\n for (int i = 0; i < tab_tabla2.getTotalFilas(); i++) {\r\n try {\r\n if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_debe)) {\r\n dou_debe += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n } else if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_haber)) {\r\n dou_haber += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n }\r\n } catch (Exception e) {\r\n }\r\n }\r\n eti_suma_debe.setValue(\"TOTAL DEBE : \" + utilitario.getFormatoNumero(dou_debe));\r\n eti_suma_haber.setValue(\"TOTAL HABER : \" + utilitario.getFormatoNumero(dou_haber));\r\n\r\n double dou_diferencia = Double.parseDouble(utilitario.getFormatoNumero(dou_debe)) - Double.parseDouble(utilitario.getFormatoNumero(dou_haber));\r\n eti_suma_diferencia.setValue(\"DIFERENCIA : \" + utilitario.getFormatoNumero(dou_diferencia));\r\n if (dou_diferencia != 0.0) {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold;color:red\");\r\n } else {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold\");\r\n return true;\r\n }\r\n return false;\r\n }", "public static void promedio(int [] Grado1, int NNEstudent){\nint aux=0;\nfor(int i=0;i<NNEstudent;i++){\naux=Grado1[i]+aux;}\nint promedio;\npromedio=aux/NNEstudent;\nSystem.out.println(aux);\nSystem.out.println(\"el promedio de las edades es:\");\nSystem.out.println(promedio);\n}", "static long dp(int posicion, int letra, boolean cambio)\n\t{\n\t\tif(dp[posicion][letra][cambio ? 1 : 0] != -1) return dp[posicion][letra][cambio ? 1 : 0];\n\t\tif(posicion == dp.length - 1) return dp[posicion][letra][cambio ? 1 : 0] = cambio ? 1 : 0;\n\t\tif(posicion == 6) \n\t\t{\n\t\t\tSystem.out.println();\n\t\t}\n\t\tint letraS = palabra[posicion + 1];\n\t\tint adelanteReal = letra < 25 - letraS ? letra : 25 - letraS;\n\t\tint atrasReal = 25 - letra < letraS ? 25 - letra : letraS;\n\t\tint atrasTest = testAtras(letra, letraS);\n\t\tif(atrasReal != atrasTest)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tatrasReal = atrasTest;\n\t\t}\n\t\tint adelanteTest = testAdelante(letra, letraS);\n\t\tif(adelanteReal != adelanteTest)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tadelanteReal = adelanteTest;\n\t\t\t testAdelante(letra, letraS);\n\t\t}\n\t\tlong respuesta = 0;\n\t\trespuesta += dp(posicion + 1, letraS, cambio);\n\t\tlong[] siguiente = dp2(posicion);\n\t\tif(letraS - 1 >= 0 && atrasReal != 0)\n\t\t{\n\t\t\trespuesta += siguiente[letraS - 1];\n//\t\t\tif(respuesta >= mod) respuesta -= mod;\n\t\t\tif(letraS - 1 - atrasReal >= 0)\n\t\t\t{\n\t\t\t\trespuesta -= siguiente[letraS - 1 - atrasReal];\n//\t\t\t\tif(respuesta < 0) respuesta += mod;\n\t\t\t}\n\t\t}\n\t\tif(letraS + adelanteReal <= 25 && adelanteReal != 0)\n\t\t{\n\t\t\trespuesta += siguiente[letraS + adelanteReal];\n//\t\t\tif(respuesta >= mod) respuesta -= mod;\n\t\t\trespuesta -= siguiente[letraS];\n//\t\t\tif(respuesta < 0) respuesta += mod;\n\t\t}\n\t\treturn dp[posicion][letra][cambio ? 1 : 0] = respuesta;\n\t}", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 1\r\n\t\t*/\r\n\t\t\r\n\t\tint c = 0;\r\n\t\tint s = 1;\r\n\t\tint f = 0;\r\n\t\tint b = 0;\r\n\t\t\r\n\t\twhile( c < 8 ) {\r\n\t\t\t\r\n\t\t\tb = f + s;\r\n\t\t\tf = s;\r\n\t\t\ts = b;\r\n\t\t\tc++;\r\n\t\t\tSystem.out.println(b);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 2\r\n\t\t */\r\n\t\t\r\n\t\tdouble[][] notas = new double[6][2];\r\n\t\tSystem.out.println(\"Digite a notas dos 6 alunos, em ordem (primeiro aluno: primeira nota depois segunda nota)\");\r\n\t\tfor(int i = 0; i <6; i++) {\r\n\t\t\tfor(int j = 0; i <2; i++) {\r\n\t\t\t\tnotas[i][j] = scan.nextDouble();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tdouble m = (notas[i][0] + notas[i][1]) / 2;\r\n\t\t\tnotas[i][2] = m;\r\n\t\t\tSystem.out.println(notas[i][2]);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tSystem.out.println(notas[i][2] >= 6 ? \"Aluno \"+(i)+\" Passou\" : \"Aluno \"+(i)+\" Recuperação\");\r\n\t\t}\r\n\t\t\r\n\t\tint a = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif(notas[i][2] >= 6) {\r\n\t\t\t\ta++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(a+\" Alunos passaram\");\r\n\t\t\r\n\t\tint d = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif(notas[i][2] <= 3) {\r\n\t\t\t\td++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(d+\" Alunos reprovaram\");\r\n\t\t\r\n\t\tint e = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif((notas[i][2] <= 6)||(notas[i][2] >= 3)) {\r\n\t\t\t\te++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(e+\" Alunos de recuperação\");\r\n\t\t\r\n\t\tdouble g = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tg = g + notas[i][2];\r\n\t\t}\r\n\t\tSystem.out.println(\"Media da sala: \"+g/6);\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 3\r\n\t\t */\r\n\t\t\r\n\t\tboolean prime = true;\r\n\t\tSystem.out.println(\"Insira o numero que desejas saber se é primo ou não (inteiro positivo) \");\r\n\t\tint h = scan.nextInt();\r\n\t\tfor(int i = 2; i <= h; i ++) {\r\n\t\t\tif( (h % i == 0) && (i != h) ) {\r\n\t\t\t\tprime = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(prime)\r\n\t\t\tSystem.out.print(\"O numero \"+h+\" é primo\");\r\n\t\telse\r\n\t\t\tSystem.out.print(\"O numero \"+h+\" não é primo\");\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 4\r\n\t\t */\r\n\t\t\r\n\t\tSystem.out.println(\"Insira notas dos alunos (Ordem: Primeira nota, segunda nota, presença)\");\r\n\t\tint[][] Sala = new int[5][3];\r\n\t\tfor(int i = 0; i < 5; i++) {\r\n\t\t\tfor(int j = 0; j < 3; j++) {\r\n\t\t\t\tSala[i][j] = scan.nextInt();\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < 5; i++) {\r\n\t\t\tif((Sala[i][0] + Sala[i][1] >= 6) && (Sala[i][2] / 18 >= 0.75)){\r\n\t\t\t\tSystem.out.println(\"Aluno \"+i+\" aprovado\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Aluno \"+i+\" reprovado\");\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 5\r\n\t\t */\r\n\t\t\r\n\t\tint[] first = {1,2,3,4,5,};\r\n\t\tint[] second = {10,9,8,7,6,5,4,3,2,1,};\r\n\t\tint[][] third = {{1,2,3,},\r\n\t\t\t\t\t {4,5,6},\r\n\t\t\t\t\t {7,8,9},\r\n\t\t\t\t\t {10,11,12}};\r\n\t\tint[][] fourth = new int[4][3]; \r\n\t\tint m = 0;\r\n\t\t//If they were random numbers, would i need to use the lowest integer? or just be clever\r\n\t\tint n = 1;\r\n\t\t\r\n\t\tfor(int i = 0; i < first.length; i++) {\r\n\t\t\tif(first[i] > m)\r\n\t\t\t\tm = first[i];\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < second.length; i++) {\r\n\t\t\tif(second[i] < n)\r\n\t\t\t\tn = second[i];\r\n\t\t}\r\n\t\t\r\n\t\tint x = n*m;\r\n\t\tint k = 0;\r\n\t\tint l = 0;\r\n\t\tint o = 0;\r\n\t\tint p = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i ++) {\r\n\t\t\tfor(int j = 0; j < 3; j++) {\r\n\t\t\t\tfourth[i][j] = third[i][j] + x;\r\n\t\t\t\r\n\t\t\t\tif(fourth[0][j] % 2 == 0) {\r\n\t\t\t\t\tk += fourth[0][j]; \r\n\t\t\t\t}\r\n\t\t\t\tif(fourth[1][j] % 2 == 0) {\r\n\t\t\t\t\tl += fourth[1][j];\r\n\t\t\t\t}\t\r\n\t\t\t\tif(fourth[0][j] % 2 == 0) {\r\n\t\t\t\t\to += fourth[2][j];\r\n\t\t\t\t}\r\n\t\t\t\tif(fourth[3][j] % 2 == 0) {\r\n\t\t\t\t\tp += fourth[3][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 6\r\n\t\t */\r\n\t\t\r\n\t\tboolean[][] assentos = new boolean[2][5];\r\n\t\tfor(int i = 0; i < 2; i++) {\r\n\t\t\tfor(int j = 0; j < 5; j++) {\r\n\t\t\t\tassentos[i][j] = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tscan.close();\r\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "public static void dodavanjeTeretnogVozila() {\n\t\tString vrstaVozila = \"Teretno Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 20000;\n\t\tdouble cenaServisa = 10000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedista = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tSystem.out.println(\"Unesite maximalnu masu koje vozilo moze da prenosi u KG !!\");\n\t\tint maxMasauKg = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite maximalnu visinu u m:\");\n\t\tdouble visinauM = UtillMethod.unesiteBroj();\n\t\tTeretnaVozila vozilo = new TeretnaVozila(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedista, brVrata, vozObrisano, servisiNadVozilom, maxMasauKg, visinauM);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "public int vecinos(){\n int v=0;\n if(fila<15 && columna<15 && fila>0 && columna>0){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;} \n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n }\n else{v=limitesX();}\n return v;\n }", "public void ingresarDinero() {\n\t\tString codigo=\"\";\n\t\tint din=1;\n\t\tint saldo=0;\n\t\tint cambio=0;\n\t\t\n\t\tArrayList<Integer> dinero = new ArrayList<Integer>();\n\t\t\n\t\tSystem.out.println(\"digite el codigo del producto\");\n\t\tcodigo=leer.dato();\n\t\t\n\t\tif(cU.buscarProducto(codigo)!=null){\n\t\t\tproducto=cU.buscarProducto(codigo);\n\t\t\tSystem.out.println(\"el producto encontrado fue\"+producto);\n\t\t\n\t\t\n\t\twhile(din!=0){\n\t\t\t\n\t\t\tSystem.out.println(\"digite la denominacion o 0 si ya completo el dinero\");\n\t\t\tdin=leer.datoInt();\n\t\t\t\n\t\t\tif(din!=0){\n\t\t\t\tdinero.add(din);\n\t\t\t\tsaldo=saldo+din;\n\t\t\t}\n\t\t\tSystem.out.println(\"saldo\"+saldo);\n\t\t\t\n\t\t}\n\t\t\n\t\tcambio=cU.ingresarSaldo(dinero, codigo);\n\t\tif(cambio>=0){\n\t\tSystem.out.println(\"el valor del producto es: \"+producto.getValor());\n\t\tSystem.out.println(\"su saldo era de: \"+saldo);\n\t\tSystem.out.println(\"el cambio es: \"+cambio);\n\t\t}else{\n\t\t\tSystem.out.println(\"el valor del producto es: \"+producto.getValor());\n\t\t\tSystem.out.println(\"saldo\"+saldo);\n\t\t\tSystem.out.println(\"fondos insufucientes para comprar el producto\");\n\t\t}\n\t\t}else{\n\t\t\tSystem.out.println(\"producto no encontrado\");\n\t\t}\n\t\tif(cambio==saldo){\n\t\t\tSystem.out.println(\"denominacion ingresada no valida\");\n\t\t}\n\t}", "@Override\n\tpublic double totalPresentase(UUID idPemb) {\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(\"SELECT sum(k.persentase_komponen) as res \"\n\t\t\t\t+ \"FROM komponen_nilai k WHERE id_pemb='\" + idPemb + \"'\");\n\t\tList<Object[]> results = (List<Object[]>)query.list();\n\t\tfor (Object[] result : results) {\n\t\t\tdouble res = (Double) result[0];\n\t\t\tSystem.out.println(res);\n\t\t}\n\t\treturn 0;\n\t}", "double getSum();", "double getSum();", "@Test\n\tpublic void testSum() {\n\t\tassertEquals(155, g1.sum(), .0001);\n\t\tassertEquals(226, g2.sum(), .0001);\n\t\tassertEquals(298, g3.sum(), .0001);\n\t}", "private int sumaCen(){\n int kasa = 0;\n for(Restauracja r :zamowioneDania){\n kasa+=r.getCena();\n }\n return kasa;\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint cnt = sc.nextInt();\n\t\tint sum = 0;\n\t\tint result_cnt =0;\n\t\tint[] nums = new int[cnt];\n\t\t\n\t\tfor(int i=0; i<cnt; i++) {\n\t\t\tnums[i] = sc.nextInt();\n\t\t}\n\t\tSystem.out.println(nums.length);\n\t\tfor(int z =0; z<nums.length; z++) {\n\t\t\tfor(int x = z + 1; x<nums.length; x++) {\n\t\t\t\tfor(int c = x + 1; c<nums.length; c++) {\n\t\t\t\t\tsum = nums[z]+nums[x]+nums[c];\n\t\t\t\t\tif(isPrime(sum)) {\n\t\t\t\t\t\tresult_cnt++;\n//\t\t\t\t\t\tSystem.out.println(\"소수는 : \" + sum);\n\t\t\t\t\t}\n//\t\t\t\t\tSystem.out.print(nums[z]);\n//\t\t\t\t\tSystem.out.print(nums[x]);\n//\t\t\t\t\tSystem.out.println(nums[c]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"result_cnt : \" + result_cnt);\n\t\t\n\t\t\n\t\t/*\n\t\tint aa = sc.nextInt(); //7\n\t\tint cnt = 0;\n\t\tfor(int j=1; j<=aa; j++) { //소수판별\n\t\t\tif(aa % j ==0) {\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"cnt :\" + cnt);\n\t\tif(cnt ==2) {\n\t\t\t\tSystem.out.println(aa+\"는 소수\");\n\t\t}\n\t\t*/\n\t\t\n\t\t\n\t\t\n\t}", "public double udregnSamletPris() {\n\t\tdouble result = 0;\n\t\tfor (Salgslinje s : salgslinjer) {\n\t\t\tresult += s.getPris();\n\t\t}\n\t\treturn result;\n\t}", "public static int tirarDados(){\n //elige valores aleatorios para los dados\n int dado1 = 1 + numerosAleatorios.nextInt(6);//<primer tiro del dado\n int dado2 = 1 + numerosAleatorios.nextInt(6);//< segundo tiro del dado\n \n int suma = dado1 + dado2;//< suma de los valores de los dados\n \n //muestra los resultados de este tiro\n System.out.printf(\"El jugador tiro %d + %d = %d%n\", dado1, dado2, suma);\n return suma;\n }", "private boolean spoji(int direkcija) {\r\n\t\tint pocetna;\r\n\t\tint pomak;\r\n\t\tboolean spojeno = false;\r\n\t\tboolean bilo_promjene = false;\r\n\t\t\r\n\t\t// pomjeranje desno i lijevo\r\n\t\tif(direkcija == 1 || direkcija == 2) {\r\n\t\t\tpocetna = 6 - 3*direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 2*direkcija - 3; // pomak je ili -1 ili 1\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo spajanje polja\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++)\r\n\t\t\t\tfor(int j = pocetna ; j != pocetna + 3 * pomak ; j += pomak)\r\n\t\t\t\t\tif(spojeno)\r\n\t\t\t\t\t\tspojeno = false;\r\n\t\t\t\t\telse if(tabela[i][j] != 0 && tabela[i][j] == tabela[i][j + pomak]) {\r\n\t\t\t\t\t\ttabela[i][j] = 2 * tabela[i][j];\r\n\t\t\t\t\t\tif(!igrajPoslijePobjede && tabela[i][j] == 8) // ako je igrac pobijedio (po prvi put, tj. nije bio nastavak igre)\r\n\t\t\t\t\t\t\tpobjeda = true;\r\n\t\t\t\t\t\ttabela[i][j + pomak] = 0;\r\n\t\t\t\t\t\tspojeno = true;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t\tbroj_slobodnih++;\r\n\t\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// pomjeranje gore i dole\r\n\t\telse {\r\n\t\t\tpocetna = direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 1 - (2*direkcija)/3; // pomak je ili -1 ili 1\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo spajanje polja\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tfor(int i = pocetna ; i != pocetna + 3 * pomak ; i += pomak)\r\n\t\t\t\t\tif(spojeno)\r\n\t\t\t\t\t\tspojeno = false;\r\n\t\t\t\t\telse if(tabela[i][j] != 0 && tabela[i][j] == tabela[i + pomak][j]) {\r\n\t\t\t\t\t\ttabela[i][j] = 2 * tabela[i][j];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(!igrajPoslijePobjede && tabela[i][j] == 8) // ako je igrac pobijedio (po prvi put, tj. nije bio nastavak igre)\r\n\t\t\t\t\t\t\tpobjeda = true;\r\n\t\t\t\t\t\ttabela[i + pomak][j] = 0;\r\n\t\t\t\t\t\tspojeno = true;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t\tbroj_slobodnih++;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bilo_promjene;\r\n\t}", "public static void kadanes(int[] arr){\n\t\tint csum = 0;\n\t\t\n//\t\tint osp = 0;\n//\t\tint oep = 0;\n\t\tint osum = 0;\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++){\n\t\t\tif(csum >0){\n\t\t\t\tcsum += arr[i];\n//\t\t\t\tcep = i;\n\t\t\t} else {\n\t\t\t\tcsum = arr[i];\n//\t\t\t\tcsp = cep = i;\n\t\t\t}\n\t\t\t\n\t\t\tif(csum > osum){\n\t\t\t\tosum = csum;\n//\t\t\t\tosp = csp;\n//\t\t\t\toep = cep;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(osum);\n//\t\tif(oep==osp){\n//\t\t\tSystem.out.println(\"\");\n//\t\t\treturn;\n//\t\t}\n//\t\tfor(int i = osp; i <= oep; i++){\n//\t\t\tSystem.out.print(arr[i] + \" \");\n//\t\t}\n//\t\tSystem.out.println(\".\");\n\t}", "public void prinRecaudacion()\n {\n System.out.println(\"La cantidad recaudada por la maquina1 es \" + maquina1.getTotal());\n System.out.println(\"La cantidad recaudada por la maquina2 es \" + maquina2.getTotal());\n System.out.println(\"La cantidad total es\" + ( maquina1.getTotal() + maquina2.getTotal()));\n}", "public int Suma(){\r\n for (int i = 0; i < 9; i++) {\r\n mult = convert()[i] * arregloCo[i];\r\n // Si la suma e mayor o igual a 10 se le resta 9\r\n if (mult >= 10){\r\n mult = mult - 9;\r\n }\r\n suma = suma + mult;\r\n }\r\n return suma;\r\n }", "public int ardiveis() {\n\t\tint result = 0;\n\t\tfor (EstadoAmbiente[] linha : this.quadricula) {\n\t\t\tfor (EstadoAmbiente ea : linha) {\n\t\t\t\tif(ea == EstadoAmbiente.CASA || ea == EstadoAmbiente.TERRENO){\n\t\t\t\t\tresult++;\t\t\t\t \n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn result;\n\t}", "int obliczLiczbaKont()\n\t{\n\t\tListaProsumentowWrap listaProsumentowWrap= ListaProsumentowWrap.getInstance();\n\t\tArrayList<Prosument> listaProsumentow = listaProsumentowWrap.getListaProsumentow();\n\t\t\n\t\tint sum=0;\n\t\t\n\t\tint i=0;\n\t\twhile (i<listaProsumentow.size())\n\t\t{\n\t\t\tProsument prosument = listaProsumentow.get(i);\n\t\t\t\n\t\t\tif (prosument instanceof ProsumentEV)\n\t\t\t{\n\t\t\t\tsum+=2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsum++;\n\t\t\t}\n\t\t\t\n\t\t\ti++;\n\t\t}\n\t\t\n\t\treturn sum;\n\t}", "public static int izracunajESPB(LinkedList<Predmet> predmeti){\r\n\t\tint rez =0;\r\n\t\tfor (int i = 0; i < predmeti.size(); i++) {\r\n\t\t\trez+=predmeti.get(i).getESPB();\r\n\t\t}\r\n\t\treturn rez;\r\n\t\t\r\n\t}", "public void sumar(){\n recogidaDatos();\n System.out.println(\"El resultado de la suma es: \" + (numerando1 + numerando2));\n System.out.println(\"***********************************\");\n\n }", "public static void dodavanjePutnickogVozila() {\n\t\tString vrstaVozila = \"Putnicko Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 10000;\n\t\tdouble cenaServisa = 8000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedist = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tPutnickoVozilo vozilo = new PutnickoVozilo(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno,\n\t\t\t\tpreServisa, cenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "public int fondMagasin(){\n\tint total =this.jeton;\n\tfor(Caisse c1 : this.lesCaisses){\n\ttotal = c1.getTotal()+total;\n\t}\n\treturn total;\n}", "protected int bepaalMinimaalVerschil(Groep groep, int periode, int ronde, int serie) {\r\n int aantal = groep.getSpelers().size();\r\n \tlogger.log(Level.INFO, \"Periode \" + periode + \" ronde \" + ronde + \" serie \" + serie);\r\n \tlogger.log(Level.INFO, \"groep \" + groep.getNaam() + \" met grootte \" + aantal);\r\n \tint resultaat;\r\n\r\n \tif ((IJCController.c().specialeIndelingEersteRonde) && (ronde == 1)) {\r\n resultaat = (serie == 1 ? (aantal / 2) : (serie == 2 ? 1 : 2));\r\n \t} else {\r\n resultaat = serie;\r\n \t}\r\n String log = groep.getNaam() + \" in periode \"+ periode + \", ronde \" + ronde;\r\n log += \", serie \" + serie + \"-> minimaal verschil = \" + resultaat;\r\n \tlogger.log(Level.INFO, log);\r\n return resultaat;\r\n }", "public int limitesY(){\n int v=0;\n if (columna==0 && fila>0 && fila<15){\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n }\n else if (columna==15 && fila>0 && fila<15){\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n }\n else{v=esquinas();}\n return v;\n }", "boolean ePrimo(int n) {\n \n if (n < 2) {\n return false;\n }\n \n \n // Guarda o numero de divisores de n. Inicialmente eh 1. Todos os numeros\n // sao divisiveis por 1\n \n int numeroDeDivisores = 1;\n \n // O primeiro candidato a divisor nao trivial eh 2.\n \n int candidatoADivisor = 2;\n \n // Testa a divisao por todos os numeros menores ou iguais a n/2 ou ate \n // encontrar o primeiro divisor.\n \n while((candidatoADivisor <= Math.sqrt(n)) && (numeroDeDivisores == 1)) {\n if (n % candidatoADivisor == 0) {\n // o resto da divisao eh zero. Logo, candidatoADivisor eh um divisor de n. \n // Por isso, que o numero de divisores eh incrementado em 1.\n numeroDeDivisores = numeroDeDivisores + 1;\n }\n candidatoADivisor = candidatoADivisor + 1;\n }\n \n if (numeroDeDivisores == 1) {\n return true;\n }\n else {\n return false;\n }\n }", "private void nourrireLePeuple() {\n\t\t\tint totalDepense = (int)((population * 1) + (populationColoniale * 0.8) + ((armee + armeeDeployee()) * nourritureParArmee));\r\n\t\t\tnourriture -= totalDepense;\r\n\t\t\tenFamine = (nourriture > 0) ? false : true;\r\n\t\t}", "boolean sprawdz_przegrana(){\n for(int i=0;i<figura_jakas.getWspolzedne_figorki().size();i++)\n if(sprawdz_kolizje_z_innymi_klockami(0))\n return true;\n return false;\n }", "public static Pot oceni_moder(Igra igra) {\n\t\tTocka[][] plosca = igra.getPlosca();\n\t\tint N = Igra.N;\n\n\t\t\n\t\tSet<Vrednost> modra_pot = new HashSet<Vrednost>();\n\t\tVrednost[][] tabela_dolzin_modri = new Vrednost[N][N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\ttabela_dolzin_modri[i][j] = new Vrednost(new Koordinati(j, i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 1. vrstica\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (plosca[i][0].polje == Polje.Moder) tabela_dolzin_modri[i][0].vrednost = 0;\n\t\t\tif (plosca[i][0].polje == Polje.PRAZNO) tabela_dolzin_modri[i][0].vrednost = 1;\n\t\t}\n\t\t\n\t\t// ostalo\n\t\tfor (int j = 1; j < N; j++) {\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\n\t\t\t\tint gor_gor_lev;\n\t\t\t\tint gor_lev;\n\t\t\t\tint dol_lev;\n\t\t\t\tint dol_dol_lev;\n\t\t\t\tint levo;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i][j - 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tgor_gor_lev = tabela_dolzin_modri[i - 1][j - 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse gor_gor_lev = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { gor_gor_lev = POLNO; }\n\t\t\t\t\n\t\t\t\ttry { gor_lev = tabela_dolzin_modri[i][j - 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { gor_lev = POLNO; }\n\t\t\t\ttry { dol_lev = tabela_dolzin_modri[i + 1][j - 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { dol_lev = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i + 1][j - 1].polje == Polje.PRAZNO && plosca[i + 1][j].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tdol_dol_lev = tabela_dolzin_modri[i + 2][j - 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse dol_dol_lev = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { dol_dol_lev = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i + 1][j - 1].polje == Polje.PRAZNO && plosca[i][j - 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tlevo = tabela_dolzin_modri[i + 1][j - 2].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse levo = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { levo = POLNO; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tVrednost pointer = null;\n\t\t\t\tSkok skok = null;\n\t\t\t\tint vrednost_polja;\n\t\t\t\tvrednost_polja = Math.min(gor_gor_lev, Math.min(gor_lev, Math.min(dol_lev, Math.min(dol_dol_lev, levo))));\n\t\t\t\t\n\t\t\t\tif (vrednost_polja != POLNO) {\n\t\t\t\t\tif (vrednost_polja == gor_gor_lev) {\n\t\t\t\t\t\tpointer = tabela_dolzin_modri[i - 1][j - 1];\n\t\t\t\t\t\tskok = Skok.Skok1;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == gor_lev) pointer = tabela_dolzin_modri[i][j - 1];\n\t\t\t\t\tif (vrednost_polja == dol_lev) pointer = tabela_dolzin_modri[i + 1][j - 1];\n\t\t\t\t\tif (vrednost_polja == dol_dol_lev) {\n\t\t\t\t\t\tpointer = tabela_dolzin_modri[i + 2][j - 1];\n\t\t\t\t\t\tskok = Skok.Skok3;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == levo) {\n\t\t\t\t\t\tpointer = tabela_dolzin_modri[i + 1][j - 2];\n\t\t\t\t\t\tskok = Skok.Skok2;\n\t\t\t\t\t}\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja += 1;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = POLNO;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_modri[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_modri[i][j].pointer = pointer;\n\t\t\t\ttabela_dolzin_modri[i][j].skok = skok;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Ponovni pregled\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tint gor;\n\t\t\t\tint dol;\n\t\t\t\tint vrednost_polja = tabela_dolzin_modri[i][j].vrednost;\n\t\t\t\tVrednost pointer = tabela_dolzin_modri[i][j].pointer;\n\t\t\t\tSkok skok = tabela_dolzin_modri[i][j].skok;\n\t\t\t\tVrednost nov_pointer = pointer;\n\t\t\t\t\n\t\t\t\ttry { gor = tabela_dolzin_modri[i - 1][j].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { gor = POLNO; }\n\t\t\t\ttry { dol = tabela_dolzin_modri[i + 1][j].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { dol = POLNO; }\n\t\t\t\t\n\t\t\t\tif (dol != POLNO && dol < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Moder) vrednost_polja = dol;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = dol + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_modri[i + 1][j];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\tif (gor != POLNO && gor < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Moder) vrednost_polja = gor;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = gor + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_modri[i - 1][j];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_modri[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_modri[i][j].pointer = nov_pointer;\n\t\t\t\ttabela_dolzin_modri[i][j].skok = skok;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Koncna vrednost\n\t\tint najmanjsa_modra = POLNO;\n\t\tVrednost pointer_modra = null;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint vrednost = tabela_dolzin_modri[i][N - 1].vrednost;\n\t\t\tif (najmanjsa_modra > vrednost) {\n\t\t\t\tnajmanjsa_modra = vrednost;\n\t\t\t\tpointer_modra = tabela_dolzin_modri[i][N - 1];\n\t\t\t}\t\n\t\t}\n\t\t\n\t\n\t\t// Izracun poti\n\t\tVrednost spremenljivka = pointer_modra;\n\t\twhile (spremenljivka != null) {\n\t\t\tmodra_pot.add(spremenljivka);\n\t\t\tspremenljivka = spremenljivka.pointer;\n\t\t}\n\t\t\n\t\treturn new Pot(najmanjsa_modra, modra_pot);\n\t}", "public void naplnVrcholy() {\r\n System.out.println(\"Zadajte pocet vrcholov: \");\r\n pocetVrcholov = skener.nextInt();\r\n for (int i=0; i < pocetVrcholov; i++) {\r\n nekonecno = (int)(Double.POSITIVE_INFINITY);\r\n if(i==0) { //pre prvy vrchol potrebujeme nastavit vzdialenost 0 \r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu, 0, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n } else { //ostatne budu mat nekonecno alebo v tomto pripade 9999 (lebo tuto hodnotu v mensich grafoch nepresiahnem)\r\n String menoVrcholu = Character.toString((char)(i+65)); //pretipovanie int na String, z i=0 dostanem A\r\n Vrchol vrchol = new Vrchol(menoVrcholu,nekonecno, \"\"); //vrcholu nastavim vzdialenost a vrcholPrichodu \r\n vrcholy.add(vrchol);\r\n }\r\n }\r\n }", "public static int sumaDivisores(int n){\n int suma=0;\n for (int i=1;i<=n;i++){\n if (n%i==0){suma+=i;}\n }\n return suma;\n }", "private void dodajEpsilonPrijelaz(int pocetno, int sljedece) {\n String key = pocetno + \",$$\";\n if (!prijelazi.containsKey(key)) {\n prijelazi.put(key, new Integer(sljedece).toString());\n } else {\n String value = prijelazi.get(key) + \",\" + new Integer(sljedece).toString();\n prijelazi.put(key, value);\n }\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint sum100 = 0 ;\n\t\t\n\t\tfor(int i = 1 ; i <= 100; i++) {\n\t\t\tsum100 += i ;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Tong 100 so dau la: \" + sum100);\n\t\tint sum3 =0;\n\t\tSystem.out.println(\"Nhap vao so n = \");\n\t\tint n = sc.nextInt();\n\t\t\n\t\tfor(int i = 0 ; i <= n ; i++) {\n\t\t\tif(i%3 == 0) {\n\t\t\t\tsum3 +=i;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Tong cac so chia het cho 3 nho hon n la: \" + sum3);\n\t\tlong number1 =0 ;\n\t\tlong number2 =1 ;\n\t\tSystem.out.println(\"100 so Fibonaci dau tien la:\");\n\t\tfor(int i = 1; i<=100; i++) {\n\t\t\tSystem.out.printf(\"%d\\t \",number1);\n\t\t\tlong sumNumber1Number2 = number1 + number2;\n\t\t\tnumber1 = number2;\n\t\t\tnumber2 = sumNumber1Number2;\n\t\t}\n\t\t\t\tint m,rv,temp,mod;\t\t\n\t\t\t\tScanner Scan = new Scanner(System.in);\n\t\t\t\tSystem.out.printf(\"\\nNhap vao so m = \"); m = Scan.nextInt();\t\n\t\t\t\ttemp = m; rv = 0;\t\n\t\t\t while (m > 0) {\n\t\t\t \t mod = m % 10;\n\t\t\t \t m = m / 10;\n\t\t\t \t rv= rv * 10 + mod;\n\t\t\t }\n\t\t\t if (rv==temp) {\n\t\t\t \tSystem.out.printf(\"So %d la so Polinom\",temp); \n\t\t\t } else {\n\t\t\t System.out.printf(\"So %d kp la so Polinom\",temp);\n\t\t\t }\n\t\t\t\tint tempMod = 0;\n\t\t\t\tint tempDiv = 0;\n\t\t\t\tint sum = 0;\n\t\t\t\tSystem.out.println(\"\\nCac so tu 100 - 999 co tong cac chu so chia het cho 3 la:\");\n\t\t\t\tfor(int i = 100; i < 1000 ; i++) {\n\t\t\t\t\ttempDiv = i;\n\t\t\t\t\tsum = 0;\n\t\t\t\t\t\n\t\t\t\t\twhile(tempDiv > 0 ) {\t\n\t\t\t\t\t tempMod = tempDiv%10;\n\t\t\t\t\t tempDiv = tempDiv/10;\n\t\t\t\t\t sum +=tempMod;\n\t\t\t\t\t}\n\t\t\t\t\tif(sum%3 == 0) {\n\t\t\t\t\t\tSystem.out.printf(String.format(\"%d\\t\",i));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t}", "public static void main(String[] args) {\n int[] a={11, 15, 6, 8, 9, 10,4};\n int sum =2;\n //SORTING AND FIND PAIRS\n /*Arrays.sort(a);\n \n int i=0,j=a.length-1;\n while(i<j)\n {\n\t if(a[i]+a[j]==sum)\n\t {\n\t\t System.out.println(\"pair is+\"+a[i]+\" \"+a[j]);\n\t\t i++;j++;\n\t\t }\n\t else if(a[i]+a[j]<sum)\n\t {\n\t\t i++;\n\t }\n\t else if(a[i]+a[j]>sum)\n\t {\n\t\t j--;\n\t }\n }*/\n //Arrays.sort(a);\n LinkedHashSet<Integer> m = new LinkedHashSet<Integer>();\n int temp;\n for(int i=0;i<a.length;i++)\n {\n\t temp=sum+a[i];\n\t if(m.contains(temp))\n\t {\n\t\t System.out.println(\"par is:\"+a[i]+\" \"+temp);\n\t }\n\t else\n\t\t m.add(a[i]);\n }\n\n\t}", "public static int fittnes(int [] tablero){ \n int cantidadchoques=0; // si hay dos numeros iguales,suma un choque\n for(int i=0;i<tablero.length;i++){ \n for(int j=0;j<tablero.length;j++){\n if((i-tablero[i]==j-tablero[j])||(i+tablero[i])==j+tablero[j]){\n cantidadchoques++;\n }\n }\n } \n cantidadchoques=Math.abs(cantidadchoques-tablero.length);\n return cantidadchoques;\n }", "public int gradoSalida() {\n \t//crear e inicializar el array de contadores\n \tint[] cont = new int[numV];\n \tfor(int i = 0; i<numV; i++) {\n \t\t//actualizar el contador de grados con la talla de cada elemento del array \n \t\tListaConPI<Adyacente> v = elArray[i];\n \t\tcont[i] = v.talla();\n \t}\n \treturn maximo(cont);\n }", "private void laskeMatkojenPituus() {\n matkojenpituus = 0.0;\n\n for (Matka m : matkat) {\n matkojenpituus += m.getKuljettumatka();\n }\n\n }", "public static ArrayList<Vkladi> rascetPolozBalans() {\r\n\t\tArrayList<Vkladi> foundVkladi = new ArrayList<Vkladi>();\r\n\r\n\t\tint t = 0;\r\n\t\tfor (Vkladi vkla : vklad) {\r\n\r\n\t\t\tt = t + vkla.getPribil();\r\n\t\t}\r\n\t\tSystem.out.println(\"Polozitelnii balanse Scetov= \" + t + \"$\");\r\n\t\treturn foundVkladi;\r\n\t}", "private static int lucas_cost(int n, double v) {\r\n\t\tint c, d, e, r;\r\n\r\n\t\td = n;\r\n\t\tr = (int) ((double) d / v + 0.5);\r\n\t\tif (r >= n)\r\n\t\t\treturn (ADD * n);\r\n\t\td = n - r;\r\n\t\te = 2 * r - n;\r\n\t\tc = DUP + ADD; /* initial duplicate and final addition */\r\n\t\twhile (d != e) {\r\n\t\t\tif (d < e) {\r\n\t\t\t\tr = d;\r\n\t\t\t\td = e;\r\n\t\t\t\te = r;\r\n\t\t\t}\r\n\t\t\tif (4 * d <= 5 * e && ((d + e) % 3) == 0) { /* condition 1 */\r\n\t\t\t\tr = (2 * d - e) / 3;\r\n\t\t\t\te = (2 * e - d) / 3;\r\n\t\t\t\td = r;\r\n\t\t\t\tc += 3 * ADD; /* 3 additions */\r\n\t\t\t} else if (4 * d <= 5 * e && (d - e) % 6 == 0) { /* condition 2 */\r\n\t\t\t\td = (d - e) / 2;\r\n\t\t\t\tc += ADD + DUP; /* one addition, one duplicate */\r\n\t\t\t} else if (d <= (4 * e)) { /* condition 3 */\r\n\t\t\t\td -= e;\r\n\t\t\t\tc += ADD; /* one addition */\r\n\t\t\t} else if ((d + e) % 2 == 0) { /* condition 4 */\r\n\t\t\t\td = (d - e) / 2;\r\n\t\t\t\tc += ADD + DUP; /* one addition, one duplicate */\r\n\t\t\t} else if (d % 2 == 0) { /* condition 5 */\r\n\t\t\t\td /= 2;\r\n\t\t\t\tc += ADD + DUP; /* one addition, one duplicate */\r\n\t\t\t} else if (d % 3 == 0) { /* condition 6 */\r\n\t\t\t\td = d / 3 - e;\r\n\t\t\t\tc += 3 * ADD + DUP; /* three additions, one duplicate */\r\n\t\t\t} else if ((d + e) % 3 == 0) { /* condition 7 */\r\n\t\t\t\td = (d - 2 * e) / 3;\r\n\t\t\t\tc += 3 * ADD + DUP; /* three additions, one duplicate */\r\n\t\t\t} else if ((d - e) % 3 == 0) { /* condition 8 */\r\n\t\t\t\td = (d - e) / 3;\r\n\t\t\t\tc += 3 * ADD + DUP; /* three additions, one duplicate */\r\n\t\t\t} else if (e % 2 == 0) { /* condition 9 */\r\n\t\t\t\te /= 2;\r\n\t\t\t\tc += ADD + DUP; /* one addition, one duplicate */\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (c);\r\n\t}", "public double getNajvacsie() {\n\t\tif ((cislo1 >= cislo2) && (cislo1 >= cislo3)) {\n\t\t\tprve = cislo1;\n\t\t} else if ((cislo2 >= cislo1) && (cislo2 >= cislo3)) {\n\t\t\tprve = cislo2;\n\t\t} else if ((cislo3 >= cislo1) && (cislo3 >= cislo2)) {\n\t\t\tprve = cislo3;\n\t\t}\n\t\treturn prve;\n\n\t}", "public static void sueldoTotal(int hora, int sueldo){\n int resultado = 0;\r\n if(hora<=40){\r\n resultado = hora*sueldo;\r\n }\r\n if(hora>40 || hora<48){\r\n resultado = (40*sueldo)+(hora-40)*(sueldo*2);\r\n }\r\n if (hora>=48){\r\n resultado =(40*sueldo)+8*(sueldo*2)+(hora-48)*(sueldo*3);\r\n }\r\n System.out.println(\"El sueldo es de \"+ resultado);//Se muestra el sueldo total\r\n \r\n \r\n \r\n }", "public int getTotalRecaudado()\n {\n return maquina1.getTotal() + maquina2.getTotal();\n }", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "public static Pot oceni_rdec(Igra igra) {\n\t\tTocka[][] plosca = igra.getPlosca();\n\t\tint N = Igra.N;\n\t\t\n\t\t// Najbolsa pot za rdecega.\n\t\tSet<Vrednost> rdeca_pot = new HashSet<Vrednost>();\n\t\t// Tabela za dinamicno iskanje najkrajse poti, elementi so objetki razreda Vrednosti.\n\t\tVrednost[][] tabela_dolzin_rdeci = new Vrednost[N][N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\ttabela_dolzin_rdeci[i][j] = new Vrednost(new Koordinati(j, i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 1. vrstico, napolnimo rocno.\n\t\tfor (int j = 0; j < N; j++) {\n\t\t\tif (plosca[0][j].polje == Polje.Rdec) tabela_dolzin_rdeci[0][j].vrednost = 0;\n\t\t\tif (plosca[0][j].polje == Polje.PRAZNO) tabela_dolzin_rdeci[0][j].vrednost = 1;\n\t\t}\n\t\t\n\t\t// Ostalo pa dinamicno.\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\n\t\t\t\t// definiramo polja, ki nas zanimajo\n\t\t\t\tint levo_levo_zg;\n\t\t\t\tint levo_zg;\n\t\t\t\tint desno_desno_zg;\n\t\t\t\tint desno_zg;\n\t\t\t\tint zgoraj;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Dolocimo vrednosti polj, ki nas zanimajo, tu so nekatera polja od nasega oddaljena za dve polji,\n\t\t\t\t// to je glavna skrivnost argumenta, saj ce nam nasprotnik ne more prepreciti povezave dveh polj, ki nista\n\t\t\t\t// takojsnji sosedi ju smatramo kot ze povezani (tu pridejo v igro objekti razreda Skok).\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i][j - 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tlevo_levo_zg = tabela_dolzin_rdeci[i - 1][j - 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse levo_levo_zg = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { levo_levo_zg = POLNO; }\n\t\t\t\t\n\t\t\t\ttry { levo_zg = tabela_dolzin_rdeci[i - 1][j].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { levo_zg = POLNO; }\n\t\t\t\ttry { desno_zg = tabela_dolzin_rdeci[i - 1][j + 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { desno_zg = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i][j + 1].polje == Polje.PRAZNO && plosca[i - 1][j + 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tdesno_desno_zg = tabela_dolzin_rdeci[i - 1][j + 2].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse desno_desno_zg = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { desno_desno_zg = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i - 1][j + 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tzgoraj = tabela_dolzin_rdeci[i - 2][j + 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse zgoraj = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { zgoraj = POLNO; }\n\t\t\t\t\n\t\t\t\t// Preverimo, katero polje je najboljse (cez katerega bomo najhitreje povezali obe strani).\n\t\t\t\tVrednost pointer = null;\n\t\t\t\tSkok skok = null;\n\t\t\t\tint vrednost_polja;\n\t\t\t\tvrednost_polja = Math.min(levo_levo_zg, Math.min(levo_zg, Math.min(desno_zg, Math.min(desno_desno_zg, zgoraj))));\n\t\t\t\t\n\t\t\t\t// Ce to polje ni v neposredni blizini, v tabelo shranimo ustrezen Skok, da vemo, da tu se nimamo povezave,\n\t\t\t\t// a nas nasprotnik ne more zapreti.\n\t\t\t\tif (vrednost_polja != POLNO) {\n\t\t\t\t\tif (vrednost_polja == levo_levo_zg) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 1][j - 1];\n\t\t\t\t\t\tskok = Skok.Skok1;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == levo_zg) pointer = tabela_dolzin_rdeci[i - 1][j];\n\t\t\t\t\tif (vrednost_polja == desno_desno_zg) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 1][j + 2];\n\t\t\t\t\t\tskok = Skok.Skok3;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == desno_zg) pointer = tabela_dolzin_rdeci[i - 1][j + 1];\n\t\t\t\t\tif (vrednost_polja == zgoraj) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 2][j + 1];\n\t\t\t\t\t\tskok = Skok.Skok2;\n\t\t\t\t\t}\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja += 1;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Moder) vrednost_polja = POLNO;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_rdeci[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_rdeci[i][j].pointer = pointer;\n\t\t\t\ttabela_dolzin_rdeci[i][j].skok = skok;\n\t\t\t}\n\t\t\t\n\t\t\t// Ponovni pregled. Prej smo gledali le polja nad nasim poljem, sedaj pa pogledamo se oba soseda v \n\t\t\t// smeri, ki ni neposredno smer napredovanja. Vse naredimo enako kot zgoraj, le da sedaj nimamo Skokov.\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\tint levo;\n\t\t\t\tint desno;\n\t\t\t\tint vrednost_polja = tabela_dolzin_rdeci[i][j].vrednost;\n\t\t\t\tVrednost pointer = tabela_dolzin_rdeci[i][j].pointer;\n\t\t\t\tSkok skok = tabela_dolzin_rdeci[i][j].skok;\n\t\t\t\tVrednost nov_pointer = pointer;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry { levo = tabela_dolzin_rdeci[i][j - 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { levo = POLNO; }\n\t\t\t\ttry { desno = tabela_dolzin_rdeci[i][j + 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { desno = POLNO; }\n\t\t\t\t\n\t\t\t\tif (levo != POLNO && levo < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = levo;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = levo + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_rdeci[i][j - 1];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\tif (desno != POLNO && desno < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = desno;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = desno + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_rdeci[i][j + 1];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_rdeci[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_rdeci[i][j].pointer = nov_pointer;\n\t\t\t\ttabela_dolzin_rdeci[i][j].skok = skok;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Izracunamo dolzino najkrajse poti do zmage. \n\t\t// Ta dolzina je lahko 0, pa se nismo zmagali, saj moramo povezati se tista polja,\n\t\t// kjer imamo dve moznosti za zmago, torej Skoke, a takrat nas nasprotnik ne more vec ustaviti.\n\t\tint najmanjsa_rdeca = POLNO;\n\t\tVrednost pointer_rdeca = null;\n\t\tfor (int j = 0; j < N; j++) {\n\t\t\tint vrednost = tabela_dolzin_rdeci[N - 1][j].vrednost;\n\t\t\tif (najmanjsa_rdeca > vrednost) {\n\t\t\t\tnajmanjsa_rdeca = vrednost;\n\t\t\t\tpointer_rdeca = tabela_dolzin_rdeci[N - 1][j];\n\t\t\t}\t\n\t\t}\n\t\t\n\t\n\t\t// Izracunamo najkraso pot, to potrebujemo v Izbira potez.\n\t\tVrednost spremenljivka = pointer_rdeca;\n\t\twhile (spremenljivka != null) {\n\t\t\trdeca_pot.add(spremenljivka);\n\t\t\tspremenljivka = spremenljivka.pointer;\n\t\t}\n\t\t\n\t\treturn new Pot(najmanjsa_rdeca, rdeca_pot);\n\t}", "public static void main(String[] args) {\n int numeros[] = {2, 3, 4, 2, 4, 5, 6, 2, 1, 2};\n //Creamos segundo arreglo con iguall tamaño que el arreglo nùmeros\n int cuadrados[] = new int[numeros.length];\n //Arreglo para almacenar el proceso de la operación\n String procesos[] = new String[numeros.length];\n //Creamos ciclo de repeticiòn para recorrer arreglo \n for (int indice = 0; indice < numeros.length; indice++) {\n int cuadrado = numeros[indice] * numeros[indice];\n //Almacenamos el proceso de la opreaciòn en el arreglo cuadrados\n cuadrados[indice] = cuadrado;\n \n //Almacenar resultado en el arreglo procesos\n procesos[indice] = numeros[indice] + \"x\" + numeros[indice];\n }\n //Ciclo de repetición para mostrar arreglos\n String print_numeros = \"numeros - \";\n String print_cuadrados = \"cuadrados - \";\n String print_procesos = \"procesoss - \";\n for (int indice = 0; indice < numeros.length; indice++) {\n print_numeros = print_numeros + numeros[indice] + \", \";\n print_cuadrados = print_cuadrados + cuadrados[indice] + \", \";\n print_procesos = print_procesos + procesos[indice] + \", \";\n\n }\n System.out.println(print_numeros);\n System.out.println(print_cuadrados);\n System.out.println(print_procesos);\n \n //suma solo numeros pares\n int acumulador_pares=0;\n for (int indice = 0; indice < 10; indice++) {\n boolean par= detectar_par(numeros[indice]);\n if (par == true) {\n acumulador_pares = acumulador_pares + numeros[indice];\n \n }\n }\n System.out.println(\"La suma de los nùmeros pares es: \"+acumulador_pares);\n \n }", "public static void main(String[] args) {\n\t\tint[] prime= new int[1229]; //only need primes up to 10000\n\t\tint n=1;\n\t\tint index=0;\n\t\tint test=0;\n\t\tfor (int i=2; (i-n)<=1229; i++) {\n\t\t\tfor (int j=2; j<=Math.sqrt(i); j++) {\n\t\t\t\tint k=i%j;\n\t\t\t\tif (k==0) {\n\t\t\t\t\tn++;\n\t\t\t\t\ttest++;\n\t\t\t\t\tj=(int)Math.sqrt(i);\n\t\t\t\t} \n\t\t\t}\n\t\t\tif (test==0) {\n\t\t\t\tprime[index]=i;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\ttest=0;\n\t\t}\n\t\t\n\t\t//use primes to find prime factorization and sum of divisors\n\t\tint [] divides= new int[1229]; //Number of times each prime divides a number\n\t\tint [] sumOfDivisors= new int[10000]; //Sum of divisors for i at index i\n\t\tint total=0;\n\t\tint sum=1;\n\t\tindex=1;\n\t\tfor (int i=2; i<=10000; i++) {\n\t\t\tint d=i;\n\t\t\tfor (int j=0; j<1229; j++) { //find prime factorization for i\n\t\t\t\twhile (d%prime[j]==0 && d>1) {\n\t\t\t\t\td=d/prime[j];\n\t\t\t\t\tdivides[j]++;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tfor (int j=0; j<1229; j++) { //use Number theory formula for sum of divisors\n\t\t\t\tsum*=(Math.pow(prime[j], divides[j]+1)-1)/(prime[j]-1);\n\t\t\t}\n\t\t\tif (sum-i<i) { //only check if sum of divisors of i is less than i\n\t\t\t\tif (sumOfDivisors[sum-i-1]==i) { //check if amicable pair\n\t\t\t\t\ttotal=total+i+sum-i; //add both to total (only happens once)\n\t\t\t\t}\n\t\t\t}\n\t\t\tArrays.fill(divides,0); //reset divisors array\n\t\t\tsumOfDivisors[index]=sum-i; //store number of divisors\n\t\t\tsum=1;\n\t\t\tindex++;\n\t\t}\n\t\tSystem.out.print(\"The sum of all amicable numbers less than 10000 is: \");\n\t\tSystem.out.println(total);\n long endTime = System.currentTimeMillis();\n System.out.println(\"It took \" + (endTime - startTime) + \" milliseconds.\");\n\n\t}", "private boolean pomjeri(int direkcija) {\t\r\n\t\t/**\r\n\t\t * Atribut predstavlja zadnje polje u smjeru direkcije u redu ili koloni (zavisno od toga da li je\r\n\t\t * pomjeranje horizontalno ili vertikalno).\r\n\t\t */\r\n\t\tint pocetna;\r\n\t\t/**\r\n\t\t * Atribut govori u kojem smjeru se pomjera trenutnaPozicija (smjer je suprotan direkciji poteza).\r\n\t\t */\r\n\t\tint pomak;\r\n\t\t/**\r\n\t\t * Atribut predstavlja prvo prazno polje na koje se moze pomjeriti iduce neprazno polje.\r\n\t\t */\r\n\t\tint trenutnaPozicija;\r\n\t\t/**\r\n\t\t * Atribut se postavlja na true ukoliko dodje do nekog pomjeranja (promjene u odnosu na prijasnje stanje tabele).\r\n\t\t */\r\n\t\tboolean bilo_promjene = false;\r\n\t\t\r\n\t\t// pomjeranje desno i lijevo\r\n\t\tif(direkcija == 1 || direkcija == 2) {\r\n\t\t\tpocetna = 6 - 3*direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 2*direkcija - 3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++) {\r\n\t\t\t\tfor(int j = pocetna ; j != pocetna + 4 * pomak ; j += pomak) {\r\n\t\t\t\t\tif(tabela[i][trenutnaPozicija] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[i][trenutnaPozicija] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// pomjeranje gore i dole\r\n\t\telse {\r\n\t\t\tpocetna = direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 1 - (2*direkcija)/3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tfor(int i = pocetna ; i != pocetna + 4 * pomak ; i += pomak) {\r\n\t\t\t\t\tif(tabela[trenutnaPozicija][j] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[trenutnaPozicija][j] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bilo_promjene;\r\n\t}", "public static void main(String[] args) \n\t{\n\t\t int i=20, j=40;\n\t\t int k=0;\n\t\t ArrayList<Integer> l1=new ArrayList<Integer>();\n\t\t ArrayList<Integer> l2=new ArrayList<Integer>();\n\t\t for(int a=i;a<=j;a++){\n\t\t int count=0;\n\t\t for(int b=2;b<a;b++)\n\t\t if(a%b==0)\n\t\t count++;\n\t\t if(count==0)\n\t\t l1.add(a); }\n\t\t for(int e=i;e<=j;e++)\n\t\t l2.add(e);\n\t\t l2.removeAll(l1);\n\t\t for(int d=0;d<l2.size();d++)\n\t\t k=k+l2.get(d);\n\t\t \n\t\tSystem.out.println(k);\n\t}", "public static int animals(int tavuk, int inek, int keci){\n\t \n\t int sum=inek*4+tavuk*2+keci*4;\n\t \n\t return sum;\n\n\t}", "public static Integer calcularVigencia(int edad, boolean primeraVez) {\n Integer vigencia = 0;\n \n if(edad >= 17 && edad<=21)\n {\n if(primeraVez)\n {\n vigencia = 1;\n } \n else\n {\n vigencia = 3;\n }\n }\n if(edad > 21 && edad<=46)\n {\n vigencia = 5;\n } \n if(edad > 46 && edad<=60)\n {\n vigencia = 4;\n }\n if(edad > 60 && edad<=70)\n {\n vigencia = 3;\n } \n if(edad > 70)\n {\n vigencia = 1;\n } \n return vigencia;\n }", "void rozpiszKontraktyPart2NoEV(int index,float wolumenHandlu, float sumaKupna,float sumaSprzedazy )\n\t{\n\t\tArrayList<Prosument> listaProsumentowTrue =listaProsumentowWrap.getListaProsumentow();\n\t\t\n\n\t\tint a=0;\n\t\twhile (a<listaProsumentowTrue.size())\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// ustala bianrke kupuj\n\t\t\t// ustala clakowita sprzedaz (jako consumption)\n\t\t\t//ustala calkowite kupno (jako generacje)\n\t\t\tDayData constrainMarker = new DayData();\n\t\t\t\n\t\t\tArrayList<Point> L1\t=listaFunkcjiUzytecznosci.get(a);\n\t\t\t\n\t\t\t//energia jaka zadeklarowal prosument ze sprzeda/kupi\n\t\t\tfloat energia = L1.get(index).getIloscEnergiiDoKupienia();\n\t\t\t\n\t\t\tif (energia>0)\n\t\t\t{\n\t\t\t\tfloat iloscEnergiiDoKupienia = energia/sumaKupna*wolumenHandlu;\n\t\t\t\t\n\t\t\t\tconstrainMarker.setKupuj(1);\n\t\t\t\tconstrainMarker.setGeneration(iloscEnergiiDoKupienia);\n\t\t\t\t\n\t\t\t\trynekHistory.ustawBetaDlaWynikowHandlu(iloscEnergiiDoKupienia,a);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfloat iloscEnergiiDoSprzedania = energia/sumaSprzedazy*wolumenHandlu;\n\n\t\t\t\t\n\t\t\t\tconstrainMarker.setKupuj(0);\n\t\t\t\tconstrainMarker.setConsumption(iloscEnergiiDoSprzedania);\n\t\t\t\t\n\t\t\t\trynekHistory.ustawBetaDlaWynikowHandlu(iloscEnergiiDoSprzedania,a);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<Float> priceVector = priceVectorsList.get(priceVectorsList.size()-1);\n\t\t\t\n\t\t\t//poinformuj prosumenta o wyniakch handlu i dostosuj go do wynikow\n\t\t\tlistaProsumentowTrue.get(a).getKontrakt(priceVector,constrainMarker);\n\t\t\t\n\t\t\ta++;\n\t\t}\n\t}", "public double similitudPearson(Pelicula i1, Pelicula i2, ArrayList<Long> test){\r\n // Variables auxiliares:\r\n double norma1 = 0;\r\n double norma2 = 0;\r\n int val1;\r\n int val2;\r\n Long key;\r\n double numerador = 0;\r\n double media1 = i1.getMedia();\r\n double media2 = i2.getMedia();\r\n \r\n // 1. Nos quedamos con la películas que tenga menos valoraciones.\r\n if (i1.getValoraciones().size() < i2.getValoraciones().size()){\r\n for (Map.Entry<Long,Valoracion> e : i1.getValoraciones().entrySet()) {\r\n key = e.getKey();\r\n // 2. Descartamos los usuarios de la partición test.\r\n if (!test.contains(key)){\r\n // 3. Comprobamos que la otra película haya sido valorada por el mismo usuario.\r\n if (i2.getValoraciones().containsKey(key)){\r\n // 4. Realizamos los cálculos de similitud.\r\n val1 = e.getValue().getValor();\r\n val2 = i2.getValoraciones().get(key).getValor();\r\n\r\n norma1 = norma1 + (val1 - media1)*(val1 - media1);\r\n norma2 = norma2 + (val2 - media2)*(val2 - media2);\r\n\r\n numerador = numerador + (val1 - media1)*(val2 - media2);\r\n }\r\n }\r\n }\r\n }else{\r\n for (Map.Entry<Long,Valoracion> e : i2.getValoraciones().entrySet()) {\r\n key = e.getKey();\r\n if (!test.contains(key)){\r\n if (i1.getValoraciones().containsKey(key)){\r\n val2 = e.getValue().getValor();\r\n val1 = i1.getValoraciones().get(key).getValor();\r\n\r\n norma1 = norma1 + (val1 - media1)*(val1 - media1);\r\n norma2 = norma2 + (val2 - media2)*(val2 - media2);\r\n\r\n numerador = numerador + (val1 - media1)*(val2 - media2);\r\n }\r\n }\r\n }\r\n }\r\n \r\n if (norma1 != 0 && norma2 !=0){\r\n double sim = numerador / (Math.sqrt(norma1*norma2)) ;\r\n sim = (sim + 1)/2;\r\n if (sim > 1){\r\n return 1;\r\n }\r\n return sim;\r\n }else{\r\n return 0;\r\n }\r\n \r\n }", "public int cantidadMinasAlrededor(int i, int j) {\r\n\t\tint cantidadMinasAlrededor = 0;\r\n\t\ttry {\r\n\t\t\tif(casillas[i-1][j-1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i-1][j].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i-1][j+1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i][j+1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i+1][j+1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i+1][j].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i+1][j-1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i][j-1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\treturn cantidadMinasAlrededor;\r\n\t}", "public float totalVentas() {\n float total = 0;\n for (int i = 0; i < posicionActual; i++) {\n total += getValorCompra(i); //Recorre el arreglo y suma toda la informacion el el arreglo de los valores en una variable que luego se retorna \n }\n return total;\n }", "public boolean stupneProOriGraf(){\n\t\tint pom = 0;\n\t\tfor(int i = 0; i < vrchP.length;i++){\n\t\t\tif(vrchP[i].stupenVstup != vrchP[i].stupenVystup)\n\t\t\t\tpom++;\n\t\t}\n\t\tif(pom != 0)\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "@Override\n public double calculaTributos() {\n // TODO Auto-generated method stub\n return 10;\n }", "public static int NajveciZajednickiDjelilac(int a, int b) {\n\t\tint nzd = 0;\r\n\t\t// krecemo od prvog broja 1 i ispitujemo uslove\r\n\t\tint i = 1;\r\n\t\t// dokle god je i manje od prvog i drugog broja\r\n\t\twhile (i <= a && i <= b) {\r\n\t\t\t// ispitujemo ostatk djeljenja sa i i ako je nula\r\n\t\t\tif (a % i == 0 && b % i == 0) {\r\n\t\t\t\tnzd = i;\r\n\t\t\t} // povecavamo nzd za jedan\r\n\t\t\ti++;\r\n\t\t} // metoda vraca nzd\r\n\t\treturn nzd;\r\n\t}", "public void balayer()\r\n {\r\n int tot=0;\r\n for (int i=0;i<LONGUEUR;i++ )\r\n {\r\n for (int j=0; j<LARGEUR; j++ )\r\n {\r\n tot=0;\r\n Haut = lignesHor[i][j];\r\n Droite = lignesVert[i+1][j];\r\n Bas = lignesHor[i][j+1];\r\n Gauche = lignesVert[i][j];\r\n\r\n if (Haut)\r\n {\r\n tot++;\r\n Vision[i][j][1]=1;\r\n }\r\n\r\n if (Droite)\r\n {\r\n tot++;\r\n Vision[i][j][2]=1;\r\n }\r\n\r\n if (Bas)\r\n {\r\n tot++;\r\n Vision[i][j][3]=1;\r\n }\r\n\r\n\r\n if (Gauche)\r\n {\r\n tot++;\r\n Vision[i][j][4]=1;\r\n }\r\n\r\n Vision[i][j][0]=Vision[i][j][1]+Vision[i][j][2]+Vision[i][j][3]+Vision[i][j][4];\r\n }\r\n }\r\n }", "boolean jeBalansirano(TreeNode koren, VisinaStabla visina) {\n if (koren == null) {\n visina.visina = 0;\n return true;\n }\n /* Nadji visinu levog i desnog podstabla */\n VisinaStabla visinaLevogPodstabla = new VisinaStabla();\n VisinaStabla visinaDesnogPodstabla = new VisinaStabla();\n\n boolean levo = jeBalansirano(koren.left, visinaLevogPodstabla);\n boolean desno = jeBalansirano(koren.right, visinaDesnogPodstabla);\n int lv = visinaLevogPodstabla.visina;\n int dv = visinaDesnogPodstabla.visina;\n /* Visina stabla trenutnog čvora jednaka je maksimalnog visini njegovih\npodstabala + 1*/\n visina.visina = (lv > dv ? lv : dv) + 1;\n /* Ukoliko je razlika visina levog i desnog podstabla\n* veća od 2, onda čvor nije uravnotežen - vrati false */\n if (Math.abs(lv - dv) >= 2) {\n return false;\n } /* Ukoliko je ovaj čvor uravnotežen, a i njegovo\nlevo i desno podstablo je uranvnoteženo, vrati true */ else {\n return levo && desno;\n }\n }", "public boolean verificarMinerosComodin() {\r\n int oro = 0;\r\n int plata = 0;\r\n int bronce = 0;\r\n int comodin = 0;\r\n\r\n for (int i = 0; i < listadeMineros.size(); i++) {\r\n if (\"ORO\".equals(listadeMineros.get(i).getEspecialidadDelMinero())) {\r\n oro++;\r\n }\r\n if (\"PLATA\".equals(listadeMineros.get(i).getEspecialidadDelMinero())) {\r\n plata++;\r\n }\r\n if (\"BRONCE\".equals(listadeMineros.get(i).getEspecialidadDelMinero())) {\r\n bronce++;\r\n }\r\n if (\"COMODIN\".equals(listadeMineros.get(i).getEspecialidadDelMinero())) {\r\n comodin++;\r\n }\r\n }\r\n if (!listadeMineros.isEmpty()) {\r\n if ((((comodin + 1) / (oro + plata + bronce)) * 100) <= 10) {\r\n return true;\r\n }\r\n if ((((comodin + 1) / (oro + plata + bronce)) * 100) > 10) {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n }", "public static void main(String[] args) {\n int primeiroNumero = 10; // Armazena o valor 10 para o primeiro número\n int segundoNumero = 2; // Armazena o valor 10 para o segundo número\n int resultado = 0; // Armazena do resultado da operação\n \n // Forma de adição\n resultado = primeiroNumero + segundoNumero;\n \n //Apresenta o resultado da adição\n System.out.printf(\"Resultado da adição = %d\\n\", resultado);\n \n \n // Forma de subtração\n resultado = primeiroNumero - segundoNumero;\n \n //Apresenta o resultado da subtração\n System.out.printf(\"Resultado da subtração = %d\\n\", resultado);\n \n \n // Forma de multiplicação\n resultado = primeiroNumero * segundoNumero;\n \n //Apresenta o resultado da multiplicação\n System.out.printf(\"Resultado da multiplicação = %d\\n\", resultado);\n \n \n // Forma de divisão\n resultado = primeiroNumero / segundoNumero;\n \n //Apresenta o resultado da divisão\n System.out.printf(\"Resultado da divisão = %d\\n\", resultado);\n \n \n // Forma de resto\n resultado = primeiroNumero % segundoNumero;\n \n //Apresenta o resultado do resto da divisão\n System.out.printf(\"Resultado do resto da divisão = %d\\n\", resultado);\n \n }", "boolean SubArraySum( int arr[] , int n , int sum ){\n HashSet<Integer> s = new HashSet<Integer>();\n int pre_sum = 0 ;\n for( int i = 0 ; i < n ; i++ ){\n pre_sum += arr[i];\n if( pre_sum == sum ) // Corner case if pre-sum is equal to sum.\n return true;\n if( s.contains(pre_sum - sum))\n return true;\n s.add(pre_sum);\n }\n return false;\n }", "private int generujViacZvierat(int pocet){\r\n int poc = 0;\r\n for (int i = 0; i < pocet; i++) {\r\n if (zoo.pridajZivocicha(vytvorZivocicha())) poc++;\r\n }\r\n return poc;\r\n }", "public int limitesX(){\n int v=0;\n if (fila==0 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if (fila==15 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else{v=limitesY();}\n return v;\n }", "public static void main(String[] args) \n\t\t{\n\t\t\tString \t\tutStreng\t\t= \t\"\"; \n\t\t\tString\t\tinputTall1 \t\t= \tJOptionPane.showInputDialog(\"skriv inn ett tall.\");\n\t\t\tString\t\tinputTall2\t\t= \tJOptionPane.showInputDialog(\"skriv inn ett tall.\");\n\t\t\tint\t \t\ttall1\t\t\t= \tInteger.parseInt( inputTall1 );\n\t\t\tint \t\ttall2\t\t\t= \tInteger.parseInt( inputTall2 );\t\n\t\t\tint\t\t\tinntall\t\t\t= \ttall1;\n\t\t\tint\t\t\tsumpartall\t\t= \t0;\t\t\t\t\t\n\t\t\tint\t\t\tsumoddetall\t\t=\t0;\n\t\t\tint\t\t\tstigning\t\t=\t0; \n\t\t\t\n\t\t\t//Utførelse av programmet. { \n\t\t\t\t\n\t\t\t\t//sjekker om tall1 er større enn tall2 og setter stigning sånn at inntall nærmer seg tall2. \n\t\t\t\tif (tall1>tall2) { stigning = -1; }\n\t\t\t\telse {stigning = 1; }\n\t\t\t\t\n\t\t\t\t//sjekker om det er negative tall. Hvis vi har negative tall hopper programmet over while løkken og går rett til slutten av programmet. \n\t\t\t\tif ((tall1>0)&&(tall2>0)){ \n\t\t\t\t\t//skiller partall og oddetall go summerer de forskjellige. \n\t\t\t\t\t\twhile (inntall!=tall2){\n\t\t\t\t\t\t\t//sjekke om inntall er oddtall eller partall. og oppdaterer summen av de forskjellige. \n\t\t\t\t\t\t\tif ((inntall%2)== 0){ //sjekker om det er partalle eller ikke. (partall er delelig med 2, det er ikke oddetall).\n\t\t\t\t\t\t\t\tsumpartall = sumpartall + inntall ;\t//oppdaterer summen av partall. \n\t\t\t\t\t\t\t\tSystem.out.println(\t\"Summen av partallene er så langt: \" + sumpartall + \"\\n\"); \n\t\t\t\t\t\t\t\t}//end if.\n\t\t\t\t\t\t\telse {\t\t\t\t \n\t\t\t\t\t\t\t\tsumoddetall = sumoddetall + inntall ;//oppdaterer summen av oddetall. \n\t\t\t\t\t\t\t\tSystem.out.println(\"Summen av oddetallene er så langt: \" + sumoddetall + \"\\n\"); \n\t\t\t\t\t\t\t\t}//end else. \n\t\t\t\t\t\t\t//teller opp inntall, sånn at løkken går videre. \n\t\t\t\t\t\t\tinntall = inntall + stigning; \n\t\t\t\t\t\t\tSystem.out.println(\"inntall=\" + inntall);\n\t\t\t\t\t\t}//end while.\n\t\t\t\t\t\t//Retter opp for at loopen over ikke tar med verdien for inntall==tall2. \n\t\t\t\t\t\tif ((tall2%2)==0){\n\t\t\t\t\t\t\tsumpartall = sumpartall + tall2 ; //oppdaterer summen av partall. \n\t\t\t\t\t\t\t}//end if.\n\t\t\t\t\t\telse {\t\t\t\t \n\t\t\t\t\t\t\tsumoddetall = sumoddetall + tall2 ;//oppdaterer summen av oddetall. \n\t\t\t\t\t\t\t}//end else.\n\t\t\t\t\t\t//stter det som skal skrives ut til skjermen. \t\t\t\t\t\t\n\t\t\t\t\t\tutStreng = (\"Summen av oddetallene er: \" + sumoddetall + \" og summen av partallene er \" + sumpartall);\n\t\t\t\t}//end if. \t\n\t\t\t\telse { //hvis man har negative tall hopper programmet hit. \n\t\t\t\t\tutStreng = (\"Du skrev inn et negativt tall.\")\n\t\t\t\t\t;}//end else. \n\t\t\t\t\n\t\t\t\t//Her blir teksten vis på skjermen. \n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Du skrev inn tallene: \" + tall1 + \" og \" + tall2 + \"\\n\" +\n\t\t\t\t\t\tutStreng + \"\\nProgrammet er Ferdig.\"\n\t\t\t\t\t\t);//end println.\n\t \t\t\n\t\t\t// } slutt på det programmet gjør. \n\t\t\t\n\t\t\t//Avslutter\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t}", "public static void main(String[] args) {\n\t\n\tScanner s=new Scanner (System.in);\t\n\t\t\n\tSystem.out.println(\"Uneti prvi broj\");\n\t\tint manji=s.nextInt();\n\t\tSystem.out.println(\"Uneti drugi broj\");\n\t\tint veci=s.nextInt();\n\t\t\n\t\tif(manji>veci) {\n\t\t\tint tmp=manji;\n\t\t\tmanji=veci;\n\t\t\tveci=tmp;\t\n\t\t}\n\t\t\n\t\t\n\t\tint zbirParnih=0;\n\t\tint zbirNeparnih=0;\n\t\t\n\t\twhile(manji<veci) {\n\t\t\tif(manji%2==0) \n\t\t\t\t{zbirParnih+=manji;\n\t\t\t\tSystem.out.println(\"Zbir parnih je\"+zbirParnih);\n\t\t\t\tmanji++;}\n\t\t\t\n\t\t\t\telse {zbirNeparnih+=manji; System.out.println(\"Zbir neparnih je \"+ zbirNeparnih);manji++;} \n\t\t} \n\t\t\n\t\tSystem.out.println(\"Zbir parnih \"+zbirParnih +\"Zbir neparnih\" +zbirNeparnih);\n\t}", "static boolean equalSumPartition(int[] arr){\n int sum = 0;\n for (int i = 0;i<arr.length;i++){\n sum+=arr[i];\n }\n if (sum%2==0){\n return subSetSumProblem(arr,sum/2);\n }\n return false;\n }", "public static void main(String[] args) {\n\n Scanner unos = new Scanner(System.in);\n\n int broj = -1;\n int zbir = 0;\n double prosjek = 0;\n double brojac = -1;\n\n System.out.println(\"Unesite cijele brojeve\");\n broj = unos.nextInt();\n\n while (broj != 0){\n\n broj = unos.nextInt();\n\n zbir = broj + zbir;\n\n brojac = brojac +1;\n //brojac++;\n\n\n }\n System.out.println(\"Zbir unesenih brojeva \" + zbir);\n\n prosjek = zbir / brojac;\n System.out.print(\"Prosjek je \");\n System.out.println(prosjek);\n\n }", "public static double provjera() {\r\n\t\t\t\t\r\n\t\t\t\tdouble broj = 0;\t\r\n\t\t\t\tboolean provjera = true;\t\r\n\t\t\t\tdo {\r\n\t\t\t\t\t//ucitavanje unosa i provjera da li je int\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tbroj = unos.nextDouble();\t\r\n\t\t\t\t\t\t//ako je sve ok, vrati broj\t\r\n\t\t\t\t\t\tprovjera = false;\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//hvata greska i trazi ponovni unos\r\n\t\t\t\t\tcatch (InputMismatchException ex) {\t\r\n\t\t\t\t\t\tSystem.out.println(\"Pogresan unos. Pokusajte ponovo: \");\r\n\t\t\t\t\t\tunos.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t} while (provjera);\r\n\t\t\t\t\r\n\t\t\t\treturn broj;\r\n\t\t}", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner tastatura = new Scanner(System.in);\r\n\t\tint pismo = 0;\r\n\t\tint brojBacanja = 0;\r\n\t\tint ishodBacanja = 0;\r\n\t\tint brojPisma = 0;\r\n\t\tint brojGlava = 0;\r\n//\t\tdouble kolicnkZaPismo = (double) brojPisma/brojBacanja;\r\n//\t\tdouble kolicnikZaGlavu = (double) brojGlava/brojBacanja;\r\n\t\t//ne moze ovde\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.print(\"Koliko puta zelite da bacite novcic: \");\r\n\t\t\tbrojBacanja = tastatura.nextInt();\r\n\t\t\t\r\n\t\t\tif(brojBacanja == 0) break; \r\n\t\t\t\tbrojPisma = 0;\r\n\t\t\t\tbrojGlava = 0;\r\n\t\t\r\n\t\t\tfor (int i = 0; i<brojBacanja; i++) {\r\n\t\t\t\tishodBacanja = (int) (Math.random() + 0.5);\r\n\t\t\t\tif(ishodBacanja == pismo)\r\n\t\t\t\t\tbrojPisma++; \r\n\t\t\t\t\t//++ znaci ako je u zagradi tacno izvrsava se to nesti++\r\n\t\t\t\telse \r\n\t\t\t\t\tbrojGlava++;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdouble kolicnkZaPismo = (double) brojPisma/brojBacanja; //obavezno 2x double\r\n\t\t\tdouble kolicnikZaGlavu = (double) brojGlava/brojBacanja;\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Kolicnik za pisma: \" + kolicnkZaPismo);\r\n\t\t\tSystem.out.println(\"Kolicnik za glavu: \" + kolicnikZaGlavu);\r\n\t\t\tSystem.out.println(\"Pismo je palo \" + brojPisma +\" puta\");\r\n\t\t\tSystem.out.println(\"Glava je pala \" + brojGlava + \" puta\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"***Za izlaz ukucajte 0 ***\");\r\n\t\t\t\r\n// u zadatku\t\t\t\r\n//\t\t\tSystem.out.print(\"Broj pisma Broj glava\");\r\n//\t\t\tSystem.out.print(\" Broj pisma / Broj bacanja\");\r\n//\t\t\tSystem.out.println(\" Broj glava / Broj bacanja\");\r\n//\t\t\t\r\n//\t\t\tSystem.out.printf(\"%8d %12d %17.2f %25.2f\\n \" , \r\n//\t\t\t\t\tbrojPisma, brojGlava,\r\n//\t\t\t\t\t(double) brojPisma / brojBacanja,\r\n//\t\t\t\t\t(double) brojGlava / brojBacanja);\r\n\t\t}\r\n\t}", "public float berechneSumme(Kunde k){\n if(k.isPremiumkunde()) {\n if(anzahlArtikel > 3){\n return artikelSumme * 0.88f;\n }\n return artikelSumme * 0.9f; // 10% Preisnachlass :o\n }\n //Abb 30\n if(k.hasGutschein()){\n return artikelSumme * 0.95f;\n }\n return artikelSumme;\n }", "public static int cantNodosHojas(Nodo raiz)\r\n {\r\n if(raiz == null)\r\n {\r\n return 0;\r\n }\r\n else if(raiz.ramaDerecha == null && raiz.ramaIzquierda == null)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (cantNodosHojas(raiz.subArbolIzquierdo())) + (cantNodosHojas(raiz.subArbolDerecho()));\r\n }\r\n }", "public void ispisiNapomeneZaDatiMjesecIgodinu(int godina, int mjesec) {\r\n\t\tint i = 0;// redni broj napomene\r\n\r\n\t\t// prolazimo kroc cjeli podsjetnik\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\t\t\t// ako unesena god- i mjese isti kao neki u listi, ispisujem\r\n\t\t\tif (godina == podsjetnik.getGodina()\r\n\t\t\t\t\t&& mjesec == podsjetnik.getMjesec()) {\r\n\t\t\t\ti++;\r\n\t\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// ako nema ni jedne napomene za dati mjesec i godinu\r\n\t\tif (i == 0) {\r\n\t\t\tSystem.out.println(\"Nema napomena za dati mjesec i godinu\");\r\n\t\t}\r\n\r\n\t}", "public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n \n boolean[] isNotPrime = new boolean[(N - 1 - 1) / 2 + 1];\n List<Integer> list = new ArrayList<Integer>();\n HashSet<Integer> primes = new HashSet<Integer>();\n \n list.add(2);\n primes.add(2);\n long sum = 0;\n for (int i = 1; i < isNotPrime.length; i++) {\n if (isNotPrime[i]) {\n continue;\n }\n list.add(2 * i + 1);\n primes.add(2 * i + 1);\n long nextIndex = (((long) 2 * i + 1) * (2 * i + 1) - 1) / 2;\n if (nextIndex >= isNotPrime.length) {\n continue;\n }\n for (int j = ((2 * i + 1) * (2 * i + 1) - 1) / 2; j < isNotPrime.length; j += 2 * i + 1) {\n isNotPrime[j] = true;\n }\n }\n int index = 0;\n while (index < list.size()) {\n int curPrime = list.get(index);\n index++;\n if (curPrime < 10) {\n continue;\n }\n int base = 1;\n while (curPrime / base > 9) {\n base *= 10;\n }\n int leftTruncate = curPrime;\n int rightTruncate = curPrime;\n boolean isValid = true;\n while (base != 1) {\n leftTruncate = leftTruncate - leftTruncate / base * base;\n rightTruncate = rightTruncate / 10;\n base /= 10;\n if (primes.contains(leftTruncate) == false || primes.contains(rightTruncate) == false) {\n isValid = false;\n break;\n }\n }\n if (isValid) {\n sum += curPrime;\n }\n }\n System.out.println(sum);\n scanner.close();\n }", "public boolean containsSum13(List<Integer> selectedCards) \n {\n //2 loops to check every combination of 2 in selectedCards \n for(int i = 0;i < selectedCards.size()-1;i++)\n {\n for(int n = i+1;n < selectedCards.size();n++)\n {\n \t//checks if 2 cards added together equals 13\n \tif(cardAt(selectedCards.get(i)).pointValue()+cardAt(selectedCards.get(n)).pointValue() == 13)\n \t{\n \t\treturn true;\n \t}\n }\n }\n return false;\n }", "public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }", "@Test\n\tvoid calcularSalarioSinVentasPagoPositivoTest() {\n\t\tEmpleadoPorComision empleadoPorComision = new EmpleadoPorComision(\"Hiromu Arakawa\", \"p24\", 400000, 0);\n\t\tdouble salarioEsperado = 400000;\n\t\tdouble salarioEmpleadoPorComision = empleadoPorComision.calcularSalario();\n\t\tassertEquals(salarioEsperado, salarioEmpleadoPorComision);\n\n\t}", "public float calcular(float dinero, float precio) {\n // Cálculo del cambio en céntimos de euros \n cambio = Math.round(100 * dinero) - Math.round(100 * precio);\n // Se inicializan las variables de cambio a cero\n cambio1 = 0;\n cambio50 = 0;\n cambio100 = 0;\n // Se guardan los valores iniciales para restaurarlos en caso de no \n // haber cambio suficiente\n int de1Inicial = de1;\n int de50Inicial = de50;\n int de100Inicial = de100;\n \n // Mientras quede cambio por devolver y monedas en la máquina \n // se va devolviendo cambio\n while(cambio > 0) {\n // Hay que devolver 1 euro o más y hay monedas de 1 euro\n if(cambio >= 100 && de100 > 0) {\n devolver100();\n // Hay que devolver 50 céntimos o más y hay monedas de 50 céntimos\n } else if(cambio >= 50 && de50 > 0) {\n devolver50();\n // Hay que devolver 1 céntimo o más y hay monedas de 1 céntimo\n } else if (de1 > 0){\n devolver1();\n // No hay monedas suficientes para devolver el cambio\n } else {\n cambio = -1;\n }\n }\n \n // Si no hay cambio suficiente no se devuelve nada por lo que se\n // restauran los valores iniciales\n if(cambio == -1) {\n de1 = de1Inicial;\n de50 = de50Inicial;\n de100 = de100Inicial;\n return -1;\n } else {\n return dinero - precio;\n }\n }", "private void calculoCantidadSacar(Long idGrupo) {\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t * SI este CU fue llamado desde la actividad ‘EVALUACION DOCUMENTAL’ Contar cantidad de Postulantes Aprobados:\r\n\t\t\t */\r\n\t\t\tLong cntPuesto;\r\n\t\t\tLong cntPorActividad = new Long(0);\r\n\t\t\tDatosGrupoPuesto datosGrupoPuesto = obtenerDatosGrupoPuesto();\r\n\t\t\ttry {\r\n\t\t\t\tcntPuesto =\r\n\t\t\t\t\t(Long) em.createQuery(\"Select count(det) from ConcursoPuestoDet det\"\r\n\t\t\t\t\t\t+ \" where det.concursoPuestoAgr.idConcursoPuestoAgr=:idGrupo and det.activo is true \").setParameter(\"idGrupo\", idGrupo).getSingleResult();\r\n\t\t\t} catch (NoResultException e) {\r\n\t\t\t\tcntPuesto = new Long(0);\r\n\t\t\t}\r\n\t\t\tif (codActividad.equalsIgnoreCase(\"EVALUACION_DOCUMENTAL\")) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcntPorActividad =\r\n\t\t\t\t\t\t(Long) em.createQuery(\"Select count(e) from EvalDocumentalCab e \"\r\n\t\t\t\t\t\t\t+ \" where e.postulacion.activo=true and e.activo=true and e.aprobado=true and e.tipo='EVALUACION DOCUMENTAL' \"\r\n\t\t\t\t\t\t\t+ \" and e.concursoPuestoAgr.idConcursoPuestoAgr=:idGrupo\").setParameter(\"idGrupo\", idGrupo).getSingleResult();\r\n\t\t\t\t} catch (NoResultException e) {\r\n\t\t\t\t\tcntPorActividad = new Long(0);\r\n\t\t\t\t}\r\n\r\n\t\t\t} else if (codActividad.equalsIgnoreCase(\"REALIZAR_EVALUACIONES\")) {\r\n\t\t\t\t/**\r\n\t\t\t\t * SINO SI este CU fue llamado desde la actividad ‘REALIZAR EVALUACIONES OEE POR GRUPO’ Contar cantidad de Postulantes Aprobados\r\n\t\t\t\t */\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(datosGrupoPuesto.getPorMinFinEvaluacion() != null && datosGrupoPuesto.getPorMinFinEvaluacion()){\r\n\t\t\t\t\t\tStringBuffer var1 = new StringBuffer();\r\n\t\t\t\t\t\tvar1.append(\" SELECT Count(evalrefere0_.id_eval_referencial_postulante) AS col_0_0_ FROM \");\r\n\t\t\t\t\t\tvar1.append(\" seleccion.eval_referencial_postulante evalrefere0_, seleccion.postulacion postulacio1_ \");\r\n\t\t\t\t\t\tvar1.append(\" JOIN seleccion.datos_grupo_puesto datos on datos.id_concurso_puesto_agr = postulacio1_.id_concurso_puesto_agr \");\r\n\t\t\t\t\t\tvar1.append(\" WHERE evalrefere0_.id_postulacion = postulacio1_.id_postulacion \");\r\n\t\t\t\t\t\tvar1.append(\" AND evalrefere0_.id_concurso_puesto_agr = :idGrupo AND evalrefere0_.activo = true \");\r\n\t\t\t\t\t\tvar1.append(\" AND postulacio1_.activo = true \");\r\n\t\t\t\t\t\tvar1.append(\" AND evalrefere0_.puntaje_realizado >= datos.porc_minimo \");\r\n\t\t\t\t\t\tvar1.append(\" AND postulacio1_.id_postulacion not in (select id_postulacion from seleccion.eval_referencial \");\r\n\t\t\t\t\t\tvar1.append(\" where presente is false and id_postulacion in \");\r\n\t\t\t\t\t\tvar1.append(\" (\tselect id_postulacion from seleccion.postulacion where id_concurso_puesto_agr = :idGrupo)) \");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tQuery q = em.createNativeQuery(var1.toString());\r\n\t\t\t\t\t\tq.setParameter(\"idGrupo\", grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcntPorActividad = ((java.math.BigInteger) q.getSingleResult()).longValue();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(cntPorActividad == 0){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//tambien se debe controlar que los participantes hayan estado presentes, sino, esto tambien diminuye la cantidad de postulantes.\r\n\t\t\t\t\t\t\tString sql = \" select count (distinct pos.id_postulacion) from seleccion.postulacion pos \"\r\n\t\t\t\t\t\t\t\t\t+ \" join seleccion.eval_referencial eval_referencial on eval_referencial.id_postulacion = pos.id_postulacion \"\r\n\t\t\t\t\t\t\t\t\t+ \" and eval_referencial.presente = true and eval_referencial.puntaje_realizado > 0 \"\r\n\t\t\t\t\t\t\t\t\t+ \" and id_eval_referencial_tipoeval = (select max(id_eval_referencial_tipoeval) \"\r\n\t\t\t\t\t\t\t\t\t+ \"\t\t\t\t\t\t\tfrom seleccion.eval_referencial where pos.id_postulacion in \"\r\n\t\t\t\t\t\t\t\t\t+ \"\t\t\t\t\t\t\t(select id_postulacion from seleccion.postulacion where id_concurso_puesto_agr = \"\r\n\t\t\t\t\t\t\t\t\t+\t\t\t\t\t\t\t\tgrupoPuestosController.getIdConcursoPuestoAgr()+\"))\"\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t+ \" where pos.id_postulacion in (select id_postulacion from seleccion.postulacion where id_concurso_puesto_agr = \"\r\n\t\t\t\t\t\t\t\t\t+ grupoPuestosController.getIdConcursoPuestoAgr()+\") \";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcntPorActividad = ((java.math.BigInteger) em.createNativeQuery(sql).getSingleResult()).longValue(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else if (datosGrupoPuesto.getPorMinPorEvaluacion() != null && datosGrupoPuesto.getPorMinPorEvaluacion()){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//se busca el ultimo tipo de evaluacion que se haya realizado\t\t\t\t\t\r\n\t\t\t\t\t\tString sql = \" select * from seleccion.eval_referencial_tipoeval tipoeval where tipoeval.fecha_cierre_evaluacion is not null \"\r\n\t\t\t\t\t\t\t\t+ \" and id_concurso_puesto_agr = \"+grupoPuestosController.getIdConcursoPuestoAgr() \r\n\t\t\t\t\t\t\t\t+ \" order by tipoeval.fecha_cierre_evaluacion desc \";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tList<EvalReferencialTipoeval> listTipoeval = em.createNativeQuery(sql, EvalReferencialTipoeval.class).getResultList();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(listTipoeval.size()!= 0 && listTipoeval.get(0) != null){\r\n\t\t\t\t\t\t\t//Se trabajara con el view de EvalAbiertas para verificar que se haya aprobado la ultima evaluacion\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString sql2 = \" select * from seleccion.eval_abiertas where \"\r\n\t\t\t\t\t\t\t\t\t+ \" id_concurso_puesto_agr = \"+grupoPuestosController.getIdConcursoPuestoAgr()\r\n\t\t\t\t\t\t\t\t\t+ \" and id_eval_referencial_tipoeval = \"+listTipoeval.get(0).getIdEvalReferencialTipoeval();\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tList <EvalAbiertas> evalAbiertas = em.createNativeQuery(sql2, EvalAbiertas.class).getResultList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(evalAbiertas.size() != 0 )\r\n\t\t\t\t\t\t\t\t//cuenta los postulantes que hayan pasado la ultima evaluacion\r\n\t\t\t\t\t\t\t\tcntPorActividad = new Long (this.contarAproboUltEval(evalAbiertas));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tStringBuffer var1 = new StringBuffer();\r\n\t\t\t\t\t\t\tvar1.append(\"SELECT Count(evalrefere0_.id_eval_referencial_postulante) AS col_0_0_ FROM \");\r\n\t\t\t\t\t\t\tvar1.append(\"seleccion.eval_referencial_postulante evalrefere0_, seleccion.postulacion postulacio1_ \");\r\n\t\t\t\t\t\t\tvar1.append(\" JOIN seleccion.datos_grupo_puesto datos on datos.id_concurso_puesto_agr = postulacio1_.id_concurso_puesto_agr \");\r\n\t\t\t\t\t\t\tvar1.append(\" WHERE evalrefere0_.id_postulacion = postulacio1_.id_postulacion \");\r\n\t\t\t\t\t\t\tvar1.append(\"AND evalrefere0_.id_concurso_puesto_agr = :idGrupo AND evalrefere0_.activo = true \");\r\n\t\t\t\t\t\t\tvar1.append(\"AND postulacio1_.activo = true \");\r\n\t\t\t\t\t\t\tvar1.append(\" AND evalrefere0_.puntaje_realizado >= datos.porc_minimo \");\r\n\t\t\t\t\t\t\tvar1.append(\" AND postulacio1_.id_postulacion not in (select id_postulacion from seleccion.eval_referencial \");\r\n\t\t\t\t\t\t\tvar1.append(\" where presente is false and id_postulacion in \");\r\n\t\t\t\t\t\t\tvar1.append(\" (\tselect id_postulacion from seleccion.postulacion where id_concurso_puesto_agr = :idGrupo)) \");\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tQuery q = em.createNativeQuery(var1.toString());\r\n\t\t\t\t\t\t\tq.setParameter(\"idGrupo\", grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcntPorActividad = ((java.math.BigInteger) q.getSingleResult()).longValue();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t} catch (NoResultException e) {\r\n\t\t\t\t\tcntPorActividad = new Long(0);\r\n\t\t\t\t}\r\n\t\t\t} else if (codActividad.equalsIgnoreCase(\"COMPLETAR_CARPETAS\")) {\r\n\t\t\t\t/**\r\n\t\t\t\t * SINO SI este CU fue llamado desde la actividad ‘COMPLETAR CARPETAS’ Contar cantidad de postulantes activos:\r\n\t\t\t\t */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcntPorActividad =\r\n\t\t\t\t\t\t(Long) em.createQuery(\"Select count(p) from Postulacion p \"\r\n\t\t\t\t\t\t\t+ \" p.activo=true and p.usuCancelacion is null and p.fechaCancelacion is null \"\r\n\t\t\t\t\t\t\t+ \" and p.concursoPuestoAgr.idConcursoPuestoAgr=:idGrupo\").setParameter(\"idGrupo\", idGrupo).getSingleResult();\r\n\t\t\t\t} catch (NoResultException e) {\r\n\t\t\t\t\tcntPorActividad = new Long(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcantVacancia = cntPuesto.intValue();\r\n\t\t\tcantPostulantes = cntPorActividad.intValue();\r\n\t\t\tcantSacar = (cntPuesto.intValue() - cntPorActividad.intValue()) + 1;\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\r\n\t}", "private int calculatePoints() {\n //Variable que tiene la vista\n CheckBox checkbox1 = findViewById(R.id.checkbox_1);\n CheckBox checkbox2 = findViewById(R.id.checkbox_2);\n CheckBox checkbox3 = findViewById(R.id.checkbox_3);\n\n //Variable de puntos ganados\n int questionPoints = 0;\n\n //Condicion para calcular puntaje\n if(checkbox1.isChecked() && checkbox3.isChecked() && !checkbox2.isChecked()){\n questionPoints = 2;\n }\n else{\n questionPoints = 0;\n }\n\n //Devolver puntaje obtenido\n return questionPoints;\n\n }", "public static void main(String[] args) {\n\t\tint[] arr = new int[] {1,4,20,3,10,5};\n\t\tint givenSum = 33;\n\t\tint sum = 0;\n\t\tint left = 0,right = left;\n\t\tboolean flag = false;\n\t\twhile(left<=(arr.length-1)) {\n\t\t\tsum = sum + arr[left];\n\t\t\tif(sum == givenSum) {\n\t\t\t\tSystem.out.println(left +\"\\t\"+right);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tright++;\n\t\t\twhile(right<=(arr.length-1)) {\n\t\t\t\tsum = sum + arr[right];\n\t\t\t\tif(sum == givenSum) {\n\t\t\t\t\tSystem.out.println(left +\"\\t\"+right);\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tright++;\t\n\t\t\t}\n\t\t\tif(flag)\n\t\t\t\tbreak;\n\t\t\tsum = 0;\n\t\t\tleft++;\n\t\t\tright=left;\n\t\t}\n\t\t\n\t}" ]
[ "0.7195223", "0.63398105", "0.6320479", "0.6320087", "0.6252698", "0.6241531", "0.62074476", "0.6200529", "0.6105616", "0.6089133", "0.6087798", "0.6071132", "0.60708046", "0.6046876", "0.60453326", "0.6041102", "0.6036937", "0.60326314", "0.6009297", "0.5974806", "0.597145", "0.5950238", "0.59234786", "0.59234786", "0.5911722", "0.5905535", "0.58995265", "0.5894968", "0.58735913", "0.5872442", "0.58689153", "0.58648205", "0.5862999", "0.58217794", "0.58039594", "0.5802466", "0.58023274", "0.5796554", "0.5785572", "0.5785107", "0.5762281", "0.5761475", "0.5760926", "0.57553023", "0.57348883", "0.57313865", "0.57301843", "0.5728533", "0.57263047", "0.5726005", "0.5717366", "0.57152784", "0.5705944", "0.5705757", "0.56970483", "0.5679384", "0.56758165", "0.567112", "0.56670046", "0.56592786", "0.5632034", "0.5630807", "0.56296986", "0.5627806", "0.56265324", "0.5622696", "0.56187975", "0.561688", "0.5608674", "0.5608223", "0.5605269", "0.5598607", "0.5598409", "0.55915207", "0.55854756", "0.5584787", "0.55779386", "0.55760694", "0.55634266", "0.55619663", "0.5561888", "0.555705", "0.5556864", "0.5554352", "0.5540213", "0.5538876", "0.5536482", "0.55343056", "0.5534301", "0.553342", "0.55276453", "0.55271393", "0.55260783", "0.55248916", "0.55247927", "0.5521353", "0.5518594", "0.551603", "0.5497449", "0.5497047" ]
0.6026246
18
Return the binding associated with this variable, if there is any. This method is only to be used to determine the lval of an \c Action
public DagEdge getLvalBinding(DagEdge input, Bindings bindings) { if (_varName == null) { DagEdge current = bindings.getBinding("#", Bindings.LOCAL); if (current != null) return current; return input; } DagEdge current = bindings.getBinding(_varName, getType()); if (current == null && getType() == Bindings.GLOBAL) { // create a new global variable current = new DagEdge((short)-1, new DagNode()); bindings.bind(_varName, current, getType()); } if (current == null) { logger.warn("local variable not bound and used as lval " + _varName); } return current; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int getBindingVariable();", "Binding getBinding();", "@Override\n public int getBindingVariable() {\n return BR.data;\n }", "@Override\n public int getBindingVariable() {\n return BR.data;\n }", "Expression getBindingExpression();", "public Binding getBinding() {\n\t\treturn binding;\n\t}", "public Binding getBinding() {\n return binding;\n }", "public BindingOperation getBindingOp() {\n return bindingOp;\n }", "public KeyBinding getKeyBindingForAction(Action action) {\n\t\tif (action == null) {\n\t\t\tthrow new IllegalArgumentException(\"action is null\");\n\t\t}\n\n\t\tBinding binding = controls.get(action);\n\t\tif (binding != null) {\n\t\t\treturn binding.getKeyBinding();\n\t\t} else {\n\t\t\treturn addDefaultKeyBindingForAction(action);\n\t\t}\n\t}", "@Override\n protected DagNode evaluate(DagNode parent, Bindings bindings) {\n // type acts as storage for the status\n DagEdge bound = bindings.getBinding(_varName, getType());\n if (bound == null) {\n if (getType() == Bindings.LOCAL) {\n // first occurence of this var, bind the variable name\n // to the given node. This is on the application side, where new bindings\n // are only relevant in expandVars, which is why the DagEdge is not\n // important, but the node, to establish coreferences.\n bound = new DagEdge((short) -1, parent);\n bindings.bind(_varName, bound, getType());\n } else {\n logger.warn(\"Unknown binding during application of rule: \" + this);\n return parent;\n }\n }\n // Avoid unwanted coreferences for atomic nodes\n if (bound.getValue().newEdgesAreEmpty()) {\n return bound.getValue().cloneFS();\n }\n return bound.getValue();\n }", "public Binding getBinding() { \n\t\tif (myBinding == null) {\n\t\t\tmyBinding = new Binding();\n\t\t}\n\t\treturn myBinding;\n\t}", "@NonNull\n public final AutoRef<TBinding> getBinding() throws ReferenceNullException {\n return AutoRef.of(_binding);\n }", "public interface Binding {\n\n /**\n * Get the declared type of the variable\n * @return the declared type\n */\n\n public SequenceType getRequiredType();\n\n /**\n * Evaluate the variable\n * @param context the XPath dynamic evaluation context\n * @return the result of evaluating the variable\n */\n\n public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException;\n\n /**\n * Indicate whether the binding is local or global. A global binding is one that has a fixed\n * value for the life of a query or transformation; any other binding is local.\n * @return true if the binding is global\n */\n\n public boolean isGlobal();\n\n /**\n * If this is a local variable held on the local stack frame, return the corresponding slot number.\n * In other cases, return -1.\n * @return the slot number on the local stack frame\n */\n\n public int getLocalSlotNumber();\n\n /**\n * Get the name of the variable\n * @return the name of the variable, as a structured QName\n */\n\n public StructuredQName getVariableQName();\n\n}", "public DCPList getBinding() {\n return binding;\n }", "@SuppressWarnings(\"unchecked\")\n public <T> Binding<T> getBinding(Key<T> key) {\n return (Binding<T>) bindings.get(key);\n }", "FieldBinding getBinding( Field< ? > field );", "Variable getTargetVariable();", "IViewerBinding getBinding();", "public ControllerBinding getControllerBindingForAction(Action action) {\n\t\tif (action == null) {\n\t\t\tthrow new IllegalArgumentException(\"action is null\");\n\t\t}\n\n\t\tBinding binding = controls.get(action);\n\t\tif (binding != null) {\n\t\t\treturn binding.getControllerBinding();\n\t\t} else {\n\t\t\treturn addDefaultControllerBindingForAction(action);\n\t\t}\n\t}", "@Override\n protected String getBindingKey() {return _parms.bindingKey;}", "@Override\r\n\tpublic String getBind_wlt_ind() {\n\t\treturn super.getBind_wlt_ind();\r\n\t}", "List<Exp> varBind() {\n List<Exp> lBind = new ArrayList<Exp>();\n for (int i = 0; i < size(); i++) {\n Exp f = get(i);\n if ((f.type == VALUES) || (f.isFilter() && f.size() > 0)) {\n Exp bind = f.first();\n if (bind.type() == OPT_BIND) {\n if (bind.isBindCst()) {\n // ?x = cst\n lBind.add(bind);\n } else {\n // filter has BIND\n // TODO: when there is a UNION, variables of BIND may not be all bound \n // so we cannot bind here\n //add(i, bind);\n //i++;\n }\n }\n }\n }\n return lBind;\n }", "public BindElements getBindAccess() {\n\t\treturn pBind;\n\t}", "public Binding getBinding(int anIndex) { return getBindings(true).get(anIndex); }", "public BindingElements getBindingAccess() {\n\t\treturn pBinding;\n\t}", "public synchronized KeyBinding getKeyBinding() {\r\n\t\tif (keyBinding == null){\r\n\t\t\tkeyBinding = new KeyBinding();\r\n\t\t}\r\n\t\treturn keyBinding;\r\n\t}", "public IntentBindRecord peekBinding(Intent intent) {\n synchronized (this.bindings) {\n for (IntentBindRecord intentBindRecord : this.bindings) {\n if (intentBindRecord.intent.filterEquals(intent)) {\n return intentBindRecord;\n }\n }\n return null;\n }\n }", "public RequestedVariableHandler getRequestedVariableHandler(){\n\t\treturn requestedVariableHandler;\n\t}", "public AbstractVariable getVariable () {\n try {\n RemoteStackVariable rsv = thread.getCurrentFrame ().getLocalVariable (\"this\"); // NOI18N\n return new ToolsVariable (\n (ToolsDebugger) getDebugger (),\n rsv.getName (),\n rsv.getValue (),\n rsv.getType ().toString ()\n );\n } catch (Exception e) {\n return null;\n }\n }", "public PDAction getBl() {\n/* 216 */ COSDictionary bl = (COSDictionary)this.actions.getDictionaryObject(\"Bl\");\n/* 217 */ PDAction retval = null;\n/* 218 */ if (bl != null)\n/* */ {\n/* 220 */ retval = PDActionFactory.createAction(bl);\n/* */ }\n/* 222 */ return retval;\n/* */ }", "public ITypeBinding getType() {\n\t\treturn binding;\n\t}", "@Override\n public void onAction(String binding, boolean isPressed, float tpf) {\n\n switch (binding) {\n case \"Up\":\n up = isPressed;\n break;\n case \"Down\":\n down = isPressed;\n break;\n case \"Left\":\n left = isPressed;\n break;\n case \"Right\":\n right = isPressed;\n break;\n case \"Click\":\n click = isPressed;\n break;\n default:\n break;\n }\n\n }", "public java.lang.String[] getBindingKey() {\r\n return bindingKey;\r\n }", "@Override\n public String getBinding(String name) {\n if (wrappedToStringContext != null && wrappedToStringContext.getBinding(name) != null)\n return wrappedToStringContext.getBinding(name);\n else\n return wrappedSerializationContext.getBinding(name);\n }", "public String valueInTargetSlot() {\n return this.innerProperties() == null ? null : this.innerProperties().valueInTargetSlot();\n }", "public String getCheckpointName() {\n\t\tfor(FreeVar current : specification.getBindings())\n\t\t{\n\t\t\tif(current.isBound())\n\t\t\t{\n\t\t\t\treturn getTopLevelType(current.binding());\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public ArrayList<String> getNeedBindingVars(){\n\t\tArrayList<String> vars = new ArrayList<String>();\n\t\tfor(int i=0; i<terms.size(); i++){\n\t\t\tTerm t = terms.get(i);\n\t\t\tSourceAttribute sa = source.getAttr(i);\n\t\t\tString var = t.getVar();\n\t\t\tif(t.needsBinding(sa.needsBinding())){\n\t\t\t\tif(t instanceof FunctionTerm){\n\t\t\t\t\tvars.addAll(t.getFunction().getNeedBindingVars());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tvars.add(var);\n\t\t\t}\n\t\t}\n\t\treturn vars;\n\t}", "public Name getBindingClassName()\n {\n assert bindingClassName != null;\n return bindingClassName;\n }", "public abstract int getKeybind();", "boolean hasIsBinding();", "public String getActionArg() {\n\t\treturn actionArg;\n\t}", "@Override\r\n\tpublic String getValue() {\r\n\t\tfinal StoryGroup group = ((KnowItBindingStoryGroup) this.binding)\r\n\t\t\t\t.getValue();\r\n\r\n\t\tfinal Context knowItContext;\r\n\r\n\t\tknowItContext = ContextFactory.getInstance().createContext(this, group);\r\n\r\n\t\treturn knowItContext.getName();\r\n\t}", "public final BindingResult getBindingResult() {\n return bindingResult;\n }", "public Map getActorStateVariables() {\r\n\t\treturn actorEnv.localBindings();\r\n\t}", "@Override\r\n\tpublic String getBind_yzbt_ind() {\n\t\treturn super.getBind_yzbt_ind();\r\n\t}", "@Nullable\n public SlideBound getTargetSlideBound() {\n if (mImpl.hasTargetSlideBound()) {\n return ModifiersBuilders.slideBoundFromProto(mImpl.getTargetSlideBound());\n } else {\n return null;\n }\n }", "public IExpressionValue getUserDefinedVariable(String key);", "public Object get(String name) {\n\t\tMap<?, ?> bindings = m_bindings.getBindings();\n\t\tif (bindings == null) {\n\t\t\tlog.info(\"get: no bindings!\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn bindings.get(name);\n\t}", "@Override\n\tpublic int getVarThisFlag() {\n\t\treturn heldObj.getVarThisFlag();\n\t}", "Aliasing getVariable();", "public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }", "@Override\r\n\tpublic String getBind_booklet_ind() {\n\t\treturn super.getBind_booklet_ind();\r\n\t}", "@Override\r\n\tpublic String getBind_yqb_ind() {\n\t\treturn super.getBind_yqb_ind();\r\n\t}", "@Override\r\n\tpublic String getBind_lufax_ind() {\n\t\treturn super.getBind_lufax_ind();\r\n\t}", "FunctionArgument getRef();", "public T caseBinding(Binding object)\n {\n return null;\n }", "@Override\r\n\tpublic String getBind_property_ind() {\n\t\treturn super.getBind_property_ind();\r\n\t}", "@Override\r\n\tpublic String getBind_haofang_ind() {\n\t\treturn super.getBind_haofang_ind();\r\n\t}", "public Logic getBehaviorTarget ()\n {\n return _behavior.getCurrentTarget();\n }", "public String getConstraintReference() {\n return constraintName + '.' + clause;\n }", "public String getSingleInputName()\n {\n return Iterables.getOnlyElement(analysis.getRequiredBindings());\n }", "protected Trigger getContentAssistTrigger() {\n IBindingService service = (IBindingService) PlatformUI.getWorkbench()\n .getService(IBindingService.class);\n Trigger trigger = null;\n TriggerSequence[] sequences = service\n .getActiveBindingsFor(ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND);\n if (sequences.length > 0) {\n Trigger[] triggers = sequences[0].getTriggers();\n if (triggers.length > 0) {\n trigger = triggers[0];\n }\n }\n return trigger;\n }", "public long getPropertyCurrentAction()\n {\n return iPropertyCurrentAction.getValue();\n }", "public static List<VariableDeclaration> getBindingManagementVars()\n {\n return FrameworkDefs.bindingManagementVars; \n }", "public Variable getVariable() {\r\n\t\tObject ob = elementAt(0);\r\n\t\tif (size() == 1 && ob instanceof Variable) {\r\n\t\t\treturn (Variable) ob;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public boolean needsBinding(){\n\t\tArrayList<String> bindVars = getNeedBindingVars();\n\t\tif(bindVars.isEmpty())\n\t\t\treturn false;\n\t\telse return true;\n\t}", "public String getBindingClass()\n {\n return bindingClass;\n }", "public String getVar() {\n\t\treturn state.get(PropertyKeys.var);\n\t}", "public boolean findUnifier(Term t, Term[] binding)\n {\n return ((t instanceof TermVariable) || equals(t));\n }", "public VariableBinding formVarbind(MetaData mdata) {\n VariableBinding vbind = null;\n if (mdata.m_oidValue != null) {\n vbind = new VariableBinding(new OID(mdata.m_oid), castOidType(mdata.m_oidType, mdata.m_oidValue));\n }\n return vbind;\n }", "@Override\n\tpublic boolean visit(SimpleName node) {\n\t\tIBinding b = node.resolveBinding();\n\t\tif (b != null) {\n\t\t\tif (b instanceof IVariableBinding) {\n\t\t\t\tIVariableBinding vb = (IVariableBinding) b;\n\t\t\t\tITypeBinding tb = vb.getType();\n\t\t\t\tif (tb != null) {\n\t\t\t\t\ttb = tb.getTypeDeclaration();\n\t\t\t\t\tif (tb.isLocal() || tb.getQualifiedName().isEmpty())\n\t\t\t\t\t\treturn false;\n\t\t\t\t\tthis.fullTokens.append(\" \" + getQualifiedName(tb) + \" \");\n\t\t\t\t\tthis.partialTokens.append(\" \" + getName(tb) + \" \");\n\t\t\t\t}\n\t\t\t} else if (b instanceof ITypeBinding) {\n\t\t\t\tITypeBinding tb = (ITypeBinding) b;\n\t\t\t\ttb = tb.getTypeDeclaration();\n\t\t\t\tif (tb.isLocal() || tb.getQualifiedName().isEmpty())\n\t\t\t\t\treturn false;\n\t\t\t\tthis.fullTokens.append(\" \" + getQualifiedName(tb) + \" \");\n\t\t\t\tthis.partialTokens.append(\" \" + getName(tb) + \" \");\n\t\t\t}\n\t\t} else {\n\t\t\tthis.fullTokens.append(\" \" + node.getIdentifier() + \" \");\n\t\t\tthis.partialTokens.append(\" \" + node.getIdentifier() + \" \");\n\t\t}\n\t\treturn false;\n\t}", "public long getPropertyCurrentAction();", "public IBinder asBinder() {\n return this;\n }", "public IBinder asBinder() {\n return this;\n }", "@Override\n\tpublic IBasicObject getAccessedWithinVar() {\n\t\treturn heldObj.getAccessedWithinVar();\n\t}", "@Override\r\n\tpublic String getBind_lcb_ind() {\n\t\treturn super.getBind_lcb_ind();\r\n\t}", "public Binding getBinding(String aPropertyName)\n{\n // Iterate over bindings and return the first that matches given property name\n for(int i=0, iMax=getBindingCount(); i<iMax; i++)\n if(getBinding(i).getPropertyName().equals(aPropertyName))\n return getBinding(i);\n return null; // Return null since binding not found\n}", "public Integer value(State state) {\n return state.lookup(variableName);\n }", "@Override\r\n\tpublic String getBind_orange_ind() {\n\t\treturn super.getBind_orange_ind();\r\n\t}", "Binding<T> unqualified();", "private boolean bindNewVariable(String name, Obj value) {\n if (name.equals(\"_\")) return true;\n \n // Bind the variable.\n return mScope.define(mIsMutable, name, value);\n }", "public String getAxisBinding() {\n return this.axisBinding;\n }", "@Override\n\tpublic Object get(String name, Scriptable start) {\n\t\tObject result = super.get(name, start);\n\t\tif(result == NOT_FOUND && unwrap().appliedBindings.size() > 0) {\n\t\t\tfor(XBLBinding binding : unwrap().appliedBindings) {\n\t\t\t\t// Check fields:\n\t\t\t\tXBLField field = binding.getField(name);\n\t\t\t\tif(field != null && field.getInitializer() != null) {\n\t\t\t\t\tFunction init = asFunction(field.getInitializer());\n\t\t\t\t\tfield.setInitializer(init);\n\t\t\t\t\tresult = init.call(Context.getCurrentContext(), getParentScope(), this, new Object[]{});\n\t\t\t\t\tput(name, this, result);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Check property getters:\n\t\t\t\tXBLProperty prop = binding.getProperty(name);\n\t\t\t\tif(prop != null && prop.getGetter() != null) {\n\t\t\t\t\tFunction getter = asFunction(prop.getGetter());\n\t\t\t\t\tprop.setGetter(getter);\n\t\t\t\t\tresult = getter.call(Context.getCurrentContext(), getParentScope(), this, new Object[]{});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Check methods:\n\t\t\t\tXBLMethod method = binding.getMethod(name);\n\t\t\t\tif(method != null && method.getBody() != null) {\n\t\t\t\t\tresult = asFunction(method.getBody());\n\t\t\t\t\tmethod.setBody(result);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn convertReturnValue(result);\n\t}", "public int getBinderySlotNumber() {\n return binderySlotNumber;\n }", "@Override\r\n\tpublic String getBind_pension_ind() {\n\t\treturn super.getBind_pension_ind();\r\n\t}", "@Override\r\n\tpublic String getBind_house_ind() {\n\t\treturn super.getBind_house_ind();\r\n\t}", "public abstract BindPredictor getBindPredictor();", "@Override\r\n\tpublic String getBind_life_ind() {\n\t\treturn super.getBind_life_ind();\r\n\t}", "Variable getSourceVariable();", "public String resolveVariableName(int slot, int l) {\n \t\treturn null;\n \t}", "public FreeColAction getValue() {\n return this;\n }", "@Override\r\n\tpublic String getBind_ewealth_ind() {\n\t\treturn super.getBind_ewealth_ind();\r\n\t}", "public E getSelected() {\n ButtonModel selection = selectedModelRef.get();\n //noinspection UseOfSystemOutOrSystemErr\n final String actionCommand = selection.getActionCommand();\n //noinspection HardCodedStringLiteral,UseOfSystemOutOrSystemErr\n return Objects.requireNonNull(textMap.get(actionCommand));\n }", "@Override\r\n\tpublic String getBind_trust_ind() {\n\t\treturn super.getBind_trust_ind();\r\n\t}", "public int getAction() {\n return action_;\n }", "public String getAction() {\n\t\treturn action.get();\n\t}", "protected StateVariable findRelatedStateVariable(String declaredName, String argumentName, String methodName) throws LocalServiceBindingException {\n/* 263 */ StateVariable relatedStateVariable = null;\n/* */ \n/* 265 */ if (declaredName != null && declaredName.length() > 0) {\n/* 266 */ relatedStateVariable = getStateVariable(declaredName);\n/* */ }\n/* */ \n/* 269 */ if (relatedStateVariable == null && argumentName != null && argumentName.length() > 0) {\n/* 270 */ String actualName = AnnotationLocalServiceBinder.toUpnpStateVariableName(argumentName);\n/* 271 */ log.finer(\"Finding related state variable with argument name (converted to UPnP name): \" + actualName);\n/* 272 */ relatedStateVariable = getStateVariable(argumentName);\n/* */ } \n/* */ \n/* 275 */ if (relatedStateVariable == null && argumentName != null && argumentName.length() > 0) {\n/* */ \n/* 277 */ String actualName = AnnotationLocalServiceBinder.toUpnpStateVariableName(argumentName);\n/* 278 */ actualName = \"A_ARG_TYPE_\" + actualName;\n/* 279 */ log.finer(\"Finding related state variable with prefixed argument name (converted to UPnP name): \" + actualName);\n/* 280 */ relatedStateVariable = getStateVariable(actualName);\n/* */ } \n/* */ \n/* 283 */ if (relatedStateVariable == null && methodName != null && methodName.length() > 0) {\n/* */ \n/* 285 */ String methodPropertyName = Reflections.getMethodPropertyName(methodName);\n/* 286 */ if (methodPropertyName != null) {\n/* 287 */ log.finer(\"Finding related state variable with method property name: \" + methodPropertyName);\n/* */ \n/* 289 */ relatedStateVariable = getStateVariable(\n/* 290 */ AnnotationLocalServiceBinder.toUpnpStateVariableName(methodPropertyName));\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 295 */ return relatedStateVariable;\n/* */ }", "public String getBindingSetId(){\n return bindingSetId;\n }", "protected WorkingMemoryAddress getReferredBelief(\n\t\t\tContentMatchingFunction<? super To> contentMatchingFunction)\n\t\t\tthrows InterruptedException {\n\t\tgetLogger().debug(\"trying to find referred belief\");\n\t\tEntry<WorkingMemoryAddress, To> entry = waitingBeliefReader\n\t\t\t\t.read(contentMatchingFunction);\n\t\tgetLogger().debug(\"got it: \" + entry.getKey().id);\n\t\treturn entry.getKey();\n\t}", "public String getBindingType() {\n if (m_item instanceof ReferenceItem) {\n return ((ReferenceItem)m_item).getDefinition().getGenerateClass().getBindingName();\n } else {\n if (m_item instanceof GroupItem) {\n TypeData genclass = ((GroupItem)m_item).getGenerateClass();\n if (genclass != null) {\n return genclass.getBindingName();\n }\n }\n return m_type;\n }\n }" ]
[ "0.69096345", "0.6451635", "0.61259675", "0.61259675", "0.6070864", "0.6001896", "0.5977325", "0.58142346", "0.5725101", "0.5638271", "0.56372833", "0.5611246", "0.5577817", "0.5487232", "0.5461972", "0.53659594", "0.53023213", "0.529774", "0.5243618", "0.5179094", "0.517426", "0.51668024", "0.51628226", "0.5157854", "0.51532197", "0.51485926", "0.51210594", "0.5109654", "0.50757223", "0.5062941", "0.5049457", "0.5034875", "0.49891523", "0.4988579", "0.4982248", "0.49614424", "0.49112397", "0.49035475", "0.48907474", "0.48698628", "0.48599276", "0.48304263", "0.4826007", "0.47940686", "0.47904268", "0.47888735", "0.47876558", "0.47705257", "0.47663277", "0.476395", "0.47573492", "0.47496414", "0.4748504", "0.47455573", "0.4744092", "0.4740002", "0.4712796", "0.47053277", "0.46954066", "0.46713483", "0.46653914", "0.46570674", "0.4656261", "0.46531475", "0.4652652", "0.46486652", "0.46476495", "0.4640415", "0.4637801", "0.46312436", "0.4626171", "0.4625048", "0.4612835", "0.4612835", "0.46107996", "0.46107787", "0.45975965", "0.4597427", "0.45931533", "0.45815626", "0.4578495", "0.45734742", "0.4568221", "0.45535934", "0.45520666", "0.45511106", "0.455061", "0.4548286", "0.45468208", "0.45457563", "0.45313478", "0.45264924", "0.4518755", "0.45030206", "0.4502833", "0.44998485", "0.44944727", "0.44899124", "0.4474971", "0.44736168" ]
0.5918935
7
if _varname is in the bindings, return the value of the binding, otherwise bind varname to the provided parent DagEdge
@Override protected DagNode evaluate(DagNode parent, Bindings bindings) { // type acts as storage for the status DagEdge bound = bindings.getBinding(_varName, getType()); if (bound == null) { if (getType() == Bindings.LOCAL) { // first occurence of this var, bind the variable name // to the given node. This is on the application side, where new bindings // are only relevant in expandVars, which is why the DagEdge is not // important, but the node, to establish coreferences. bound = new DagEdge((short) -1, parent); bindings.bind(_varName, bound, getType()); } else { logger.warn("Unknown binding during application of rule: " + this); return parent; } } // Avoid unwanted coreferences for atomic nodes if (bound.getValue().newEdgesAreEmpty()) { return bound.getValue().cloneFS(); } return bound.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DagEdge getLvalBinding(DagEdge input, Bindings bindings) {\n if (_varName == null) {\n DagEdge current = bindings.getBinding(\"#\", Bindings.LOCAL);\n if (current != null) return current;\n return input;\n }\n DagEdge current = bindings.getBinding(_varName, getType());\n if (current == null && getType() == Bindings.GLOBAL) {\n // create a new global variable\n current = new DagEdge((short)-1, new DagNode());\n bindings.bind(_varName, current, getType());\n }\n if (current == null) {\n logger.warn(\"local variable not bound and used as lval \" + _varName);\n }\n return current;\n }", "public void assign (String name, StatementParse node, Closure parent){\n Closure exist = find_var(name);\n Value newClosure;\n if (node.getName().equals(\"function\")){\n newClosure = new Closure(parent, node);\n } else {\n newClosure = new Environment(parent, node);\n }\n exist.getValues().put(name, newClosure);\n }", "public abstract int getBindingVariable();", "public interface Binding {\n\n /**\n * Get the declared type of the variable\n * @return the declared type\n */\n\n public SequenceType getRequiredType();\n\n /**\n * Evaluate the variable\n * @param context the XPath dynamic evaluation context\n * @return the result of evaluating the variable\n */\n\n public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException;\n\n /**\n * Indicate whether the binding is local or global. A global binding is one that has a fixed\n * value for the life of a query or transformation; any other binding is local.\n * @return true if the binding is global\n */\n\n public boolean isGlobal();\n\n /**\n * If this is a local variable held on the local stack frame, return the corresponding slot number.\n * In other cases, return -1.\n * @return the slot number on the local stack frame\n */\n\n public int getLocalSlotNumber();\n\n /**\n * Get the name of the variable\n * @return the name of the variable, as a structured QName\n */\n\n public StructuredQName getVariableQName();\n\n}", "public VariableBinding formVarbind(MetaData mdata) {\n VariableBinding vbind = null;\n if (mdata.m_oidValue != null) {\n vbind = new VariableBinding(new OID(mdata.m_oid), castOidType(mdata.m_oidType, mdata.m_oidValue));\n }\n return vbind;\n }", "public void declare (String name, StatementParse node, Closure parent){\n if (contains(name)){\n throw new VariableAlreadyDefined();\n }\n Value newClosure;\n if (node.getName().equals(\"function\")){\n newClosure = new Closure(parent, node);\n } else {\n newClosure = new Environment(parent, node);\n }\n\n this.values.put(name, newClosure);\n }", "public Closure find_var(String name){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.contains(name)){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n throw new UndefinedVariable();\n }", "@Override\n public void enterVariableAssignmentStatement(MiniJavaParser.VariableAssignmentStatementContext ctx) {\n Symbol variable = currentScope.lookup(ctx.Identifier().getText());\n if (variable.isField()) {\n mg.loadThis();\n }\n }", "@Override\n\tpublic RecVarNode leaveDisambiguation(ScribNode child,\n\t\t\tNameDisambiguator disamb, ScribNode visited) throws ScribException\n\t{\n\t\tRecVarNode rn = (RecVarNode) visited;\n\t\tRecVar rv = rn.toName();\n\t\tif (!disamb.isBoundRecVar(rv))\n\t\t{\n\t\t\tthrow new ScribException(rn.getSource(),\n\t\t\t\t\t\"Rec variable not bound: \" + rn);\n\t\t}\n\t\treturn (RecVarNode) super.leaveDisambiguation(child, disamb, rn);\n\t}", "@Override\n public int getBindingVariable() {\n return BR.data;\n }", "@Override\n public int getBindingVariable() {\n return BR.data;\n }", "Variable getTargetVariable();", "@Override\n public Object evaluate(Environment env) {\n if (env.contains(name.getValue())) return new VariableExistsError(name);\n var value = expression.evaluate(env);\n env.put(name.getValue(), value);\n env.setCurrent(value);\n return value;\n }", "public void Apply(SB_Entity p,SB_ExecutionFrame contextFrame, SB_ExecutionFrame newFrame, SB_Logger logger) \r\n\t\tthrows SB_Exception\r\n\t{\n\t\tSB_Variable classVar = contextFrame.GetVariable(_varName);\r\n\t\tSB_Variable value = evaluateExpression(p, contextFrame, classVar.getType());\r\n\t\t\r\n\t\tif(value == null)\r\n\t\treturn;\r\n\t\t\r\n\t\tif(SIM_Constants.DEBUG_INFO_ON)\r\n\t\t\tlogger.log(\"[\" + p.toString() + \",STK \" + contextFrame.GetStackDepth()\r\n\t\t\t+ \"] BINDING:\\tbinding behavior param \" + _varName + \".\" + _varMember + \" <- \" + _expressStr\r\n\t\t\t+ \" = \" + value.toString(),SB_Logger.BINDING);\r\n\t\t\r\n\t\tSetVariable(newFrame, value);\r\n\t}", "private boolean bindNewVariable(String name, Obj value) {\n if (name.equals(\"_\")) return true;\n \n // Bind the variable.\n return mScope.define(mIsMutable, name, value);\n }", "public void setParentVar(EAdVarDef<?> varDef) {\r\n\t\tthis.varDef = varDef;\r\n\t}", "Aliasing getVariable();", "Node getVariable();", "int getVar() {\n\n return super.var; //Line n3. refer to its immediate parents variable of var\n }", "public void Apply(SB_Entity p,SB_ExecutionFrame contextFrame, SB_Logger logger)\r\n\t\tthrows SB_Exception\r\n\t{\n\t\tSB_Variable classVar = contextFrame.GetVariable(_varName);\r\n\t\tSB_Variable value = evaluateExpression(p, contextFrame, classVar.getType());\r\n\t\t\r\n\t\tif( value == null )\r\n\t\t\treturn;\r\n\t\t\r\n\t\tif(SIM_Constants.DEBUG_INFO_ON)\r\n\t\t\tlogger.log(\"[\" + p.toString() + \",STK \" + contextFrame.GetStackDepth()\r\n\t\t\t+ \"] BINDING:\\t binding behavior var \" + _varName + \".\" + _varMember + \" <- \" +\r\n\t\t\t_expressStr + \" = \" + value.toString(),SB_Logger.BINDING);\r\n\t\t\r\n\t\tSetVariable(contextFrame, value);\r\n\t}", "FieldBinding getBinding( Field< ? > field );", "public void bind(String var, E value) {\n put(var, value);\n }", "@Override\n\tpublic void setValueExpression(String name, ValueExpression binding) {\n\t\tif (PropertyKeys.var.toString().equals(name)) {\n\t\t\tthrow new IllegalArgumentException(ERROR_EXPRESSION_DISALLOWED);\n\t\t}\n\n\t\tsuper.setValueExpression(name, binding);\n\t}", "IIndexFragmentBinding findBinding(IASTName astName) throws CoreException;", "boolean bind(Mapping map) {\n if (!isEdge()) {\n return false;\n }\n\n for (int i = 0; i < nbNode(); i++) {\n Node node = getNode(i);\n if (node.isVariable() && map.getNode(node) != null) {\n return true;\n }\n }\n\n return false;\n }", "@Override\n\tprotected VariableScopeImpl getParentVariableScope() {\n\t\treturn null;\n\t}", "public Exp createBind(Expression exp, Variable var){\r\n if (var.getVariableList() != null){\r\n // bind (sql() as ())\r\n return createASTBind(exp, var);\r\n }\r\n else {\r\n return Binding.create(exp, var);\r\n }\r\n }", "R visitBoundVariable(Formula f, int deBruijnIdx);", "private String indirectAssociations_findSuperClassThatDeclaresVariable(String uniqueClassName, String variableName) {\n \tString result = \"\";\n \tif (inheritanceAssociationsPerClass.containsKey(uniqueClassName)){\n \t\tHashSet<String> inheritanceAssociations = inheritanceAssociationsPerClass.get(uniqueClassName);\n \t\tfor (String superClass : inheritanceAssociations){\n \t\t\tif (superClass.equals(uniqueClassName)) {\n \t\t\t\tbreak; // Otherwise, things go wrong with derived C# classes with the same name.\n \t\t\t}\n\t \t\tString searchKey = superClass + \".\" + variableName;\n \tif (theModel.structuralEntities.containsKey(searchKey)) {\n \t\tresult = superClass;\n \t\tbreak;\n\t }\n\t else {\n\t \tif (inheritanceAssociationsPerClass.containsKey(superClass)){\n\t \t\tresult = indirectAssociations_findSuperClassThatDeclaresVariable(superClass, variableName);\n\t \t\tbreak;\n\t \t}\n\t }\n \t\t} \n \t}\n \treturn result; \n }", "VarReference createVarReference();", "public VarRelation(String parent_ppt_name, String type) {\n this(parent_ppt_name, type, null, null, null);\n }", "public Variable getVariable(String name);", "public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }", "String getTargetVariablePart();", "Variable resolve(String name) {\n Scope scope = this;\n while (scope != null) {\n if (scope.variables.containsKey(name)) {\n return scope.variables.get(name);\n }\n scope = scope.parent;\n }\n throw new IllegalArgumentException(\"Unresolved variable: \" + name);\n }", "DynamicVariable createDynamicVariable();", "final SyntaxTreeNode lookupName(QName name) {\n // Is it a local var or param ?\n final SyntaxTreeNode result = _parser.lookupVariable(name);\n\tif (result != null)\n return(result);\n else\n\t return(_symbolTable.lookupName(name));\n }", "public static void addNameBinding (String name, Object javaObject)\n\t{\n\t\tm_interpreter.set (name, javaObject);\n\t}", "public IExpressionValue getUserDefinedVariable(String key);", "@Override\n\tpublic boolean visit(SimpleName node) {\n\t\tIBinding b = node.resolveBinding();\n\t\tif (b != null) {\n\t\t\tif (b instanceof IVariableBinding) {\n\t\t\t\tIVariableBinding vb = (IVariableBinding) b;\n\t\t\t\tITypeBinding tb = vb.getType();\n\t\t\t\tif (tb != null) {\n\t\t\t\t\ttb = tb.getTypeDeclaration();\n\t\t\t\t\tif (tb.isLocal() || tb.getQualifiedName().isEmpty())\n\t\t\t\t\t\treturn false;\n\t\t\t\t\tthis.fullTokens.append(\" \" + getQualifiedName(tb) + \" \");\n\t\t\t\t\tthis.partialTokens.append(\" \" + getName(tb) + \" \");\n\t\t\t\t}\n\t\t\t} else if (b instanceof ITypeBinding) {\n\t\t\t\tITypeBinding tb = (ITypeBinding) b;\n\t\t\t\ttb = tb.getTypeDeclaration();\n\t\t\t\tif (tb.isLocal() || tb.getQualifiedName().isEmpty())\n\t\t\t\t\treturn false;\n\t\t\t\tthis.fullTokens.append(\" \" + getQualifiedName(tb) + \" \");\n\t\t\t\tthis.partialTokens.append(\" \" + getName(tb) + \" \");\n\t\t\t}\n\t\t} else {\n\t\t\tthis.fullTokens.append(\" \" + node.getIdentifier() + \" \");\n\t\t\tthis.partialTokens.append(\" \" + node.getIdentifier() + \" \");\n\t\t}\n\t\treturn false;\n\t}", "public void testBoundToVariable()\n throws Exception\n {\n String varname =\"ITEM\";\n String id = \"occ_hermes1\";\n Occurrence occ = (Occurrence) tm.getObjectByID(id);\n // resolver shall resolve by id\n tag.setOccurrence(occ);\n\n // resolved topic shall be stored in\n // the variable named TOPIC\n tag.setVar(varname);\n \n // resolve\n setScriptForTagBody(tag);\n tag.doTag(null);\n \n // the item should be stored in the variable\n assertEquals(occ, ctx.getVariable(varname));\n \n // make a new tag, bound to the same variable \n // set resolvement to non existant topic\n tag = new UseOccurrenceTag();\n tag.setContext(ctx);\n tag.setVar(varname);\n tag.setId(\"nonexistantntifd\");\n\n // resolve\n tag.doTag(null);\n\n // the variable should be resetted\n assertNull(ctx.getVariable(varname));\n \n }", "Expression getBindingExpression();", "public void assign (String name, Value value){\n Closure exist = find_var(name);\n exist.getValues().put(name, value);\n }", "Variable getSourceVariable();", "public String getVariableName() {\n return _vname;\n }", "Binding getBinding();", "protected StateVariable findRelatedStateVariable(String declaredName, String argumentName, String methodName) throws LocalServiceBindingException {\n/* 263 */ StateVariable relatedStateVariable = null;\n/* */ \n/* 265 */ if (declaredName != null && declaredName.length() > 0) {\n/* 266 */ relatedStateVariable = getStateVariable(declaredName);\n/* */ }\n/* */ \n/* 269 */ if (relatedStateVariable == null && argumentName != null && argumentName.length() > 0) {\n/* 270 */ String actualName = AnnotationLocalServiceBinder.toUpnpStateVariableName(argumentName);\n/* 271 */ log.finer(\"Finding related state variable with argument name (converted to UPnP name): \" + actualName);\n/* 272 */ relatedStateVariable = getStateVariable(argumentName);\n/* */ } \n/* */ \n/* 275 */ if (relatedStateVariable == null && argumentName != null && argumentName.length() > 0) {\n/* */ \n/* 277 */ String actualName = AnnotationLocalServiceBinder.toUpnpStateVariableName(argumentName);\n/* 278 */ actualName = \"A_ARG_TYPE_\" + actualName;\n/* 279 */ log.finer(\"Finding related state variable with prefixed argument name (converted to UPnP name): \" + actualName);\n/* 280 */ relatedStateVariable = getStateVariable(actualName);\n/* */ } \n/* */ \n/* 283 */ if (relatedStateVariable == null && methodName != null && methodName.length() > 0) {\n/* */ \n/* 285 */ String methodPropertyName = Reflections.getMethodPropertyName(methodName);\n/* 286 */ if (methodPropertyName != null) {\n/* 287 */ log.finer(\"Finding related state variable with method property name: \" + methodPropertyName);\n/* */ \n/* 289 */ relatedStateVariable = getStateVariable(\n/* 290 */ AnnotationLocalServiceBinder.toUpnpStateVariableName(methodPropertyName));\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 295 */ return relatedStateVariable;\n/* */ }", "@Override\n public String getBinding(String name) {\n if (wrappedToStringContext != null && wrappedToStringContext.getBinding(name) != null)\n return wrappedToStringContext.getBinding(name);\n else\n return wrappedSerializationContext.getBinding(name);\n }", "public IDecisionVariable getNestedVariable(String slotName) {\r\n IDecisionVariable result = null;\r\n if (parent instanceof CompoundVariable) {\r\n result = ((CompoundVariable) parent).getNestedVariable(slotName);\r\n } else {\r\n Value tmp = Configuration.dereference(conf, value);\r\n if (tmp instanceof CompoundValue) { // not available for Container\r\n CompoundValue cValue = (CompoundValue) tmp;\r\n Compound type = (Compound) cValue.getType();\r\n DecisionVariableDeclaration slotDecl = type.getElement(slotName);\r\n if (null != slotDecl) {\r\n Value slotValue = cValue.getNestedValue(slotName);\r\n if (!Reference.TYPE.isAssignableFrom(slotDecl.getType())) { // don't dereference references\r\n slotValue = Configuration.dereference(conf, slotValue);\r\n }\r\n LocalDecisionVariable var = new LocalDecisionVariable(slotDecl, conf, null);\r\n if (null != slotValue) {\r\n try {\r\n var.setValue(slotValue, AssignmentState.ASSIGNED);\r\n } catch (ConfigurationException e) {\r\n }\r\n }\r\n result = var;\r\n }\r\n } \r\n }\r\n return result;\r\n }", "@Override\n\tpublic boolean visit(VariableDeclarationStatement node) {\n\t\tString VariableClassName = node.getType().resolveBinding().getName().toString();\n\t\tif (VariableClassName.equals(\"Semaphore\")) {\n\t\t\tSystem.out.println(VariableClassName);\n\t\t}\n\t\t\n\t\treturn super.visit(node);\n\t}", "public Binding getBinding(String aPropertyName)\n{\n // Iterate over bindings and return the first that matches given property name\n for(int i=0, iMax=getBindingCount(); i<iMax; i++)\n if(getBinding(i).getPropertyName().equals(aPropertyName))\n return getBinding(i);\n return null; // Return null since binding not found\n}", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Binding p, A arg)\n {\n\n p.variableexpr_.accept(new VariableExprVisitor<R,A>(), arg);\n p.expression_.accept(new ExpressionVisitor<R,A>(), arg);\n p.program_.accept(new ProgramVisitor<R,A>(), arg);\n\n return null;\n }", "public ExprVar(FEContext context, String name)\n {\n super(context);\n this.name = name;\n }", "public BindState updateBinding(AccessPath ap, CFAEdge edge, List<AbstractState> otherStates) {\n if (ap.startFromGlobal()) {\n return addGlobalBinding(ap, edge, otherStates);\n } else {\n return addLocalBinding(ap, edge, otherStates);\n }\n }", "@Override\n public void enterVar_assigment(FSMParser.Var_assigmentContext ctx) {\n if (ctx.getParent() instanceof FSMParser.Var_assignContext) {\n //find the variable and add it to the assignments map\n FSMParser.Var_assignContext varCont = (FSMParser.Var_assignContext) ctx.getParent();\n Var var = (Var) findComp(varCont.var().NAME().getText());\n this.assignments.put(var, Integer.parseInt(ctx.integer().getText()));\n\n\n }\n }", "@Override\n public void visit(VariableEvalNode variableEvalNode) {\n }", "public Integer lookupVariable(final String variableName) {\n if (isLocalVariable(variableName)) {\n return this.variables.get(variableName);\n } else {\n if (this.parent != null) {\n return this.parent.lookupVariable(variableName);\n } else {\n throw new InterpreterException(\"Variable \" + variableName + \" is not defined.\");\n }\n }\n }", "private void declareWithReference(Variable newVar,String variableName, boolean isFinal,boolean\r\n\t\t\tisArgument, String value)throws IllegalDeclarationException,\r\n\t\t\tIncompatibleTypeException, TypeNotSupportedException{\r\n\t\tVariable reference = findVariable(value);\r\n\t\tif (reference != null) {//if it is indeed a reference to a previously declared variable:\r\n\t\t\t// we'll check if the referenced var is initialised + if it's type's compatible with newVar's\r\n\t\t\tif (newVar.compatibleWith(reference)&&reference.isInitialized()){\r\n\t\t\t\tVariable varToDeclare = vFactory.createVariable(true,isFinal,isArgument,reference.getType(),\r\n\t\t\t\t\t\tparent==null);\r\n\t\t\t\tscopeVariables.put(variableName, varToDeclare);//if it is, we'll declare a new variable\r\n\t\t\t\treturn;\r\n\t\t\t}else{\r\n\t\t\t\t//check if value's an uninitialised global var that we've already initialised in this scope\r\n\t\t\t\treference = uninitialisedGlobalVariables.get(value);\r\n\t\t\t\tif(reference!=null&&newVar.compatibleWith(reference)){\r\n\t\t\t\t\tVariable varToDeclare = vFactory.createVariable(true,isFinal,isArgument,reference.getType(),\r\n\t\t\t\t\t\t\tparent==null);\r\n\t\t\t\t\tscopeVariables.put(variableName, varToDeclare);//if it is, declare a new variable\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}//if value's type isn't compatible with type ,value isn't a reference or isn't a good one:\r\n\t\tthrow new IllegalDeclarationException();\r\n\r\n\t}", "public void bind(NameValue that) {\n for( Entry<String, Object> e: that) {\n String key=e.getKey();\n if (this.containsKey(key))\n this.getStringProperty(key).set(that.getString(key));\n else\n put(key, that.getStringProperty(key));\n }\n }", "public static boolean isVariable(Name name) {\n\t\t\n\t\tAstNode parent = name.getParent();\n\n\t\tif(parent instanceof InfixExpression) {\n\t\t\tInfixExpression ie = (InfixExpression) parent;\n\t\t\tif(ie.getOperator() == Token.GETPROP || ie.getOperator() == Token.GETPROPNOWARN) {\n /* If the parent is field access, make sure it is on the LHS. */\n\t\t\t\tif(ie.getRight() == name) return false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/* It is some other boolean operator, so it should be a variable. */\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif(parent instanceof UnaryExpression) {\n\t\t\t/* It is a variable that is being operated on by a unary expression. */\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public IdentificationVariableStateObject(StateObject parent) {\n\t\tsuper(parent);\n\t}", "@Override\n @EnsuresNonNullIf(result = true, expression = \"#1\")\n @Pure\n public boolean equals(@GuardSatisfied VarRelation this, @GuardSatisfied @Nullable Object o) {\n if (!(o instanceof VarRelation) || (o == null)) {\n return false;\n }\n VarRelation vr = (VarRelation) o;\n return (vr.parent_ppt_name.equals(parent_ppt_name)\n && (((vr.local_variable == null) && local_variable == null)\n || ((vr.local_variable != null) && vr.local_variable.equals(local_variable))));\n }", "public IdentificationVariableStateObject(StateObject parent, String variable) {\n\t\tsuper(parent, variable);\n\t}", "private VariableDeclaration getVarDeclaration(Element statement) {\n VariableDeclaration variableDeclaration = statement.nearestAncestor(VariableDeclaration.class);\n if (variableDeclaration == null) {\n return getNearestElement(statement, VariableDeclaration.class);\n } else {\n return variableDeclaration;\n }\n }", "public String bnd(String name) {\n\t\treturn bnd.get(name);\n\t}", "public AbstractVariable getVariable () {\n try {\n RemoteStackVariable rsv = thread.getCurrentFrame ().getLocalVariable (\"this\"); // NOI18N\n return new ToolsVariable (\n (ToolsDebugger) getDebugger (),\n rsv.getName (),\n rsv.getValue (),\n rsv.getType ().toString ()\n );\n } catch (Exception e) {\n return null;\n }\n }", "@Override\n\tpublic Expr visit(VarExpr e) {\n\t\treturn e;\n\t}", "public Double visitVariable(simpleCalcParser.VariableContext ctx){\n\t\tString varname = ctx.x.getText();\n\t\tDouble d = env.get(varname);\n\t\tif (d==null){\n\t\t\tSystem.err.println(\"Variable \" + varname + \" is not defined. \\n\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t \treturn d;\n \t}", "VarAssignment createVarAssignment();", "@Override\n\tpublic Code apply(Env env, ParseTree t) {\n\t\treturn new VarNameCode(env.s(t));\n\t}", "public VariableNode(String name) {\n\t\tthis.name = name;\n\t}", "public StructuredQName getVariableQName();", "DirectVariableResolver getVariableResolver();", "IGLProperty getParent();", "String getVarName(String name);", "protected VariableResolver createExpressionBuilderResolver() {\n\t\tMap map = new HashMap();\n\t\t\n\t\tIterator i = this.variableToDatabaseMapping.keySet().iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tString varName = (String) i.next();\n\t\t\tmap.put(varName, this.variableToDatabaseMapping.get(varName));\n\t\t}\n\t\treturn new VariableMapper(map);\n\t}", "public Name getVariable() {\n return variable;\n }", "AliasVariable createAliasVariable();", "public void constantPropagation(JmmNode node) {\n String kind = node.getKind();\n\n if (kind.equals(\"Var\")) {\n String varName = node.get(\"name\");\n Symbol symbol = getVariableSymbol(varName);\n Object value = getVariableValue(symbol);\n prepareForReplacement(node, value);\n return;\n }\n else {\n for (JmmNode child : node.getChildren()) {\n constantPropagation(child);\n }\n }\n }", "protected void addVarNamePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add(createItemPropertyDescriptor(\n\t\t\t\t((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(),\n\t\t\t\tgetString(\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_varName_feature\"),\n\t\t\t\tgetString(\"_UI_PropertyDescriptor_description\",\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_varName_feature\",\n\t\t\t\t\t\t\"_UI_ApplicationLoadBalancerBuilder_elasticloadbalancingv2_type\"),\n\t\t\t\tAwsworkbenchPackage.Literals.APPLICATION_LOAD_BALANCER_BUILDER_ELASTICLOADBALANCINGV2__VAR_NAME, true,\n\t\t\t\tfalse, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));\n\t}", "@Override\n\tpublic void exitReference(ReferenceContext ctx) {\n\t\tExpression exp = null;\n\t\tif (ctx.selector() != null) {\n\t\t\t//process local variables/constants or states\n\t\t\tString processName = ctx.objectDecl(0).IDENTIFIER().getText();\n\t\t\tswitch (ctx.selector().start.getType()) {\n\t\t\tcase DVEParser.VARSEL:\n\t\t\t\tProcessVariableReference pvr = dveFactory.createProcessVariableReference();\n\t\t\t\tpvr.setPrefix(builder.processReference(processName));\n\t\t\t\tString variableName = ctx.objectDecl(1).IDENTIFIER().getText();\n\t\t\t\tpvr.setRefName(variableName);\n\t\t\t\tif (ctx.objectDecl(1).arraySelector() != null) {\n\t\t\t\t\texp = builder.indexedExpression(pvr, exprStack.pop());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\texp = pvr;\n\t\t\t\tbreak;\n\t\t\tcase DVEParser.STATESEL:\n\t\t\t\tProcessStateReference psr = dveFactory.createProcessStateReference();\n\t\t\t\tpsr.setPrefix(builder.processReference(processName));\n\t\t\t\tString stateName = ctx.objectDecl(1).IDENTIFIER().getText();\n\t\t\t\tpsr.setRefName(stateName);\n\t\t\t\texp = psr;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t}\n\t\t\texprStack.push(exp);\n\t\t\treturn;\n\t\t}\n\t\t//name resolution happens in post processing\n\t\t//global variable/constant reference\n\t\tString varName = ctx.objectDecl(0).IDENTIFIER().getText();\n\t\tVariableReference vref = dveFactory.createVariableReference();\n\t\tvref.setRefName(varName);\n\t\texp = vref;\n\t\tif (ctx.objectDecl(0).arraySelector() != null) {\n\t\t\t//Indexed array\n\t\t\texp = builder.indexedExpression(vref, exprStack.pop());\n\t\t}\n\t\texprStack.push(exp);\n\t}", "public ValueDecl lookupValue(Identifier name) {\n Pair<Integer, ValueDecl> entry = valueScope.get(name);\n if (entry == null) return null;\n return entry.getRight();\n }", "String getVariable();", "private GradsVariable findVar(Variable v2) {\n List<GradsVariable> vars = gradsDDF.getVariables();\n String varName = v2.getFullName();\n for (GradsVariable var : vars) {\n if (var.getName().equals(varName)) {\n return var;\n }\n }\n\n return null; // can't happen?\n }", "private Variable getVariable(String varName){\r\n\t\tif(contains(varName)){\r\n\t\t\treturn scopeVariables.get(varName);\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void variableChanged(VariableAttribute var);", "@Override\n public void visit(VariableAssignNode variableAssignNode) {\n }", "@Override\n\tpublic void visit(AssignNode node) {\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\t/**\n\t\t * Verificam fiii si construim perechea Variabila, Valoare pentru a fi\n\t\t * inserata in HahMap-ul din Evaluator\n\t\t */\n\t\tVariable x = null;\n\t\tValue i = null;\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(1).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(1).getName());\n\t\t}\n\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\tx = new Variable(node.getChild(0).getName());\n\t\t} else {\n\t\t\ti = new Value(node.getChild(0).getName());\n\t\t}\n\t\tEvaluator.variables.put(x.getName(), i.getName());\n\t\tnode.setName(i.getName());\n\t}", "public Map<String, DynamicContext.VariableDependency> getProjection(Map<String, DynamicContext.VariableDependency> parentProjection)\n {\n Map<String, DynamicContext.VariableDependency> projection = new TreeMap<String, DynamicContext.VariableDependency>();\n projection.putAll(parentProjection);\n\n // add the variable dependencies needed by this for clause's expression.\n for(OrderByClauseSparkIteratorExpression iterator : _expressions)\n {\n Map<String, DynamicContext.VariableDependency> exprDependency = iterator.getExpression().getVariableDependencies();\n for(String variable : exprDependency.keySet())\n {\n if(projection.containsKey(variable)) {\n if(projection.get(variable) != exprDependency.get(variable))\n {\n projection.put(variable, DynamicContext.VariableDependency.FULL);\n }\n } else {\n projection.put(variable, exprDependency.get(variable));\n }\n }\n }\n return projection;\n }", "VariableRef createVariableRef();", "public void addBinding(Binding aBinding)\n{\n removeBinding(aBinding.getPropertyName()); // Remove current binding for property name (if it exists)\n List <Binding> bindings = getBindings(true); // Add binding\n bindings.add(aBinding);\n aBinding.setNode(this); // Set binding width to this shape\n}", "public ContainerElementAccessor bind(IDecisionVariable variable, int index, EvaluationContext context) {\n super.bind(variable, context);\n elementVariable = variable.getNestedElement(index);\n return this;\n }", "public String getVariable();", "public String getVariableName() {\n\t\treturn variableName;\n\t}", "public String getVariableName() {\n\t\treturn variableName;\n\t}", "@Override\n public InfGraph bind( Graph data ) throws ReasonerException {\n RETERuleInfGraph graph = new RETERuleInfGraph(this, rules, schemaGraph, data);\n return graph;\n }", "String getVarName();", "String getVarName();", "String getVarName();", "public final void setVarName(String varName){\n\t\tthis.varName = varName;\t\n\t}" ]
[ "0.6139973", "0.60274225", "0.5914666", "0.5519281", "0.5469827", "0.54167277", "0.52657735", "0.5229516", "0.5206669", "0.510831", "0.510831", "0.51069707", "0.50855076", "0.50108594", "0.49874482", "0.4940648", "0.48945096", "0.4883281", "0.48787022", "0.484609", "0.47895843", "0.4757033", "0.47533613", "0.4734309", "0.47295454", "0.47067323", "0.47047734", "0.4700086", "0.46879208", "0.46857473", "0.46763495", "0.4671998", "0.46685266", "0.4664975", "0.46564865", "0.4655913", "0.4649618", "0.46341008", "0.46273762", "0.4614988", "0.4613718", "0.4587746", "0.45724952", "0.4569758", "0.45617715", "0.4557189", "0.4523848", "0.45190826", "0.4513787", "0.4503342", "0.45006365", "0.44745263", "0.44662336", "0.44490346", "0.44433707", "0.4431153", "0.4429655", "0.4427426", "0.44213653", "0.44187686", "0.4407404", "0.44067565", "0.4397901", "0.43909928", "0.4370338", "0.43693745", "0.43636662", "0.43475422", "0.43406025", "0.43380573", "0.43368438", "0.43226847", "0.43134883", "0.4304777", "0.42981127", "0.42972675", "0.42844343", "0.42757162", "0.42691553", "0.42658666", "0.42634216", "0.42511505", "0.42473453", "0.42472625", "0.42427218", "0.42354494", "0.42338192", "0.4224071", "0.42235586", "0.42204717", "0.42166752", "0.4208504", "0.41990727", "0.41969135", "0.41969135", "0.4193539", "0.419267", "0.419267", "0.419267", "0.41922307" ]
0.72025335
0
Function: Describe: Author: reese on 2018/8/1.
public interface IAccountService { /** * 是否已经登录 * * @return */ boolean isLogin(); /** * 获取登录用户的 AccountId * * @return */ String getAccountId(); Fragment newUserFragment(Activity activity, int containerId, FragmentManager fragmentManager, Bundle bundle, String tag); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int describeContents() { return 0; }", "@Override\n public void describeTo(Description arg0) {\n \n }", "String getDescribe();", "String getDescribe();", "@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }", "@Override\n public String describe() {\n return null;\n }", "@Override\n public int describeContents()\n {\n return 0;\n }", "java.lang.String getDescribe();", "@Override public int describeContents() { return 0; }", "public abstract void description();", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@SuppressWarnings(\"unused\")\n public void describeTo(Description arg0) {\n \n }", "@SuppressWarnings(\"unused\")\n public void describeTo(Description arg0) {\n \n }", "@Override\r\n public int describeContents() {\r\n return 0;\r\n }", "public String describe() { return new String(\"No description.\"); }", "@Override\r\n\tpublic int describeContents() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int describeContents() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int describeContents() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int describeContents() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int describeContents() {\n\t\treturn 0;\r\n\t}", "@Override\n public void describeTo(Description description) {\n }", "public abstract String description();", "public abstract String description();", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int describeContents() {\n\t\treturn 0;\n\t}", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();" ]
[ "0.7011013", "0.70027333", "0.6884063", "0.6884063", "0.6862979", "0.68581575", "0.6822709", "0.68098164", "0.6782393", "0.6762979", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.6750073", "0.66720027", "0.66720027", "0.66143245", "0.6477116", "0.643723", "0.643723", "0.643723", "0.643723", "0.643723", "0.6425799", "0.63713413", "0.63713413", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63686717", "0.63520247", "0.63520247", "0.63520247", "0.63520247", "0.63520247", "0.63520247", "0.63520247", "0.63520247", "0.63520247", "0.63520247", "0.63520247" ]
0.0
-1
Calling this will calibrate the arm (theoretically, assuming we're on flat ground). Works
public void init() { // int anglesToEncTicks = (int) ((90 - currentAngle) * encoderTicksPerRev); // armMotor.setEncPosition(anglesToEncTicks); while (armMotor.isFwdLimitSwitchClosed() != true) { armMotor.set(.2); } System.out.println("Calibrated!"); armMotor.setEncPosition(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void processGroundCal()\n\t{\n\t\tif (testMotor != null) {\n\t\t\tSystem.out.println(\"Calibrating arm to floor position\");\n\t\t\ttestMotor.setPosition(SOFT_ENCODER_LIMIT_FLOOR);\n\t\t}\n\t}", "public void arm_up() {\n arm_analog(RobotMap.Arm.arm_speed);\n }", "void startCalibration();", "public void liftArm(){armLifty.set(-drivePad.getThrottle());}", "public void arm_down() {\n arm_analog(-RobotMap.Arm.arm_speed);\n }", "public void adjustInitialPosition() {\n\n //TelemetryWrapper.setLine(1,\"landFromLatch...\");\n runtime.reset();\n double maxLRMovingDist = 200.0; //millimeters\n double increamentalDist = 50.0;\n while ( runtime.milliseconds() < 5000 ) {\n int loops0 = 0;\n while ((loops0 < 10) && ( mR.getNumM() == 0 )) {\n mR.update();\n loops0 ++;\n }\n if (mR.getNumM() <= 1) {\n int loops = 0;\n while ( mR.getNumM() <= 1 )\n driveTrainEnc.moveLeftRightEnc(increamentalDist, 2000);\n continue;\n } else if ( mR.getHAlignSlope() > 2.0 ) {\n driveTrainEnc.spinEnc(AUTO_DRIVE_SPEED,Math.atan(mR.getHAlignSlope()),2000);\n continue;\n } else if (! mR.isGoldFound()) {\n\n driveTrainEnc.moveLeftRightEnc(increamentalDist,2000);\n continue;\n } else if ( mR.getFirstGoldAngle() > 1.5 ) {\n driveTrainEnc.spinEnc(AUTO_DRIVE_SPEED, mR.getFirstGoldAngle(),2000);\n continue;\n }\n }\n driveTrainEnc.stop();\n }", "public void calibrate() {\r\n\t\tbuttonListener.displayMessage(\"Calibrating\", 1);\r\n\t\ttry {\r\n\t\t\tTimeUnit.SECONDS.sleep(2);\r\n\t\t}\r\n\t\tcatch (Exception e){\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public float[] calibrate(Base mBase, Sensor mSensor) {\n final double metersPerLatitude;\n final double metersPerLongitude;\n\n\n\n //Fetching the cisco position for the robot, which returns\n float ciscoLong = (float) 8.57617285865058;\n float ciscoLat = (float) 58.33447638466072;\n\n\n metersPerLongitude = distanceCalculator.calculateDistance(ciscoLong, ciscoLat, ciscoLong + 1.0, ciscoLat);\n\n metersPerLatitude= distanceCalculator.calculateDistance(ciscoLong, ciscoLat, ciscoLong, ciscoLat + 1.0);\n\n\n float originCiscoPositionx = ciscoLong * (float) metersPerLongitude;\n float originCiscoPositiony = ciscoLat * (float) metersPerLatitude;\n\n\n //Driving 1 meter forward test\n //mBase.addCheckPoint(1, 0);\n\n\n //GetCiscoPosition()\n //These are the actual coordinates of x2 and y2 in latitude and longitude.\n\n\n\n //If Loomo was already headed east, we would expect these coordinates in meters:\n float expectedCiscoPositionx2 = (originCiscoPositionx + 1);\n\n float newCiscoPointlon = (float) 8.57617413279317;\n float newCiscoPointlat = (float) 58.334468102336245;\n\n\n float actualCiscoPositionx2 = newCiscoPointlon * (float) metersPerLongitude;\n float actualCiscoPositiony2 = newCiscoPointlat * (float) metersPerLatitude;\n\n\n\n //Defining 3 vectors that make up a triangle abc\n double[] aVector = {expectedCiscoPositionx2 - originCiscoPositionx, originCiscoPositiony - originCiscoPositiony};\n double[] bVector = {actualCiscoPositionx2 - originCiscoPositionx, actualCiscoPositiony2 - originCiscoPositiony};\n double[] cVector = {expectedCiscoPositionx2 - actualCiscoPositionx2, originCiscoPositiony - actualCiscoPositiony2};\n\n\n\n //Calculating the length of each vector / side of the triangle with the pythagorean therm.\n double aVectorLengthSquared = Math.pow(aVector[0], 2.0) + Math.pow(aVector[1], 2.0);\n double bVectorLengthSquared = Math.pow(bVector[0], 2.0) + Math.pow(bVector[1], 2.0);\n double cVectorLengthSquared = Math.pow(cVector[0], 2.0) + Math.pow(cVector[1], 2.0);\n\n System.out.println(\"Length a = \" + sqrt(aVectorLengthSquared));\n System.out.println(\"Length b = \" + sqrt(bVectorLengthSquared));\n System.out.println(\"Length c = \" + sqrt(cVectorLengthSquared));\n System.out.println(\" \");\n\n //Calculating the angle between the vector from the expected points and the vector from the\n // real points using the cosine law. This gives us an angle ∈ [0,PI].\n float angle = (float) acos((aVectorLengthSquared + bVectorLengthSquared - cVectorLengthSquared)\n / (2 * sqrt(aVectorLengthSquared) * sqrt(bVectorLengthSquared)));\n\n\n\n //If the y-element of the b-vector is negative, that means loomo has been driving\n // southwards. This means, if we are to rotate the coordinates to fit loomo,\n // they will need to be rotated in the positive direction, or against the clock. -> angle = angle\n // If the y-element is positive, then loomo has been driving north, and the coordinates will\n // need to be rotated with the clock. Then \"angle\" will be the negative value\n // found with the cosine law.\n\n if (bVector[1] < 0) {\n angle = angle;\n } else if (bVector[1] > 0) {\n angle = -angle;\n }\n\n System.out.println(\"The angle between the reference systems are: \" + angle + \", which equals \" + angle / PI + \"*PI\\n\" );\n\n mBase.cleanOriginalPoint();\n\n //Setting Fetching the original point where Loomo stands.\n mBase.cleanOriginalPoint();\n Pose2D pose2D = mBase.getOdometryPose(-1);\n mBase.setOriginalPoint(pose2D);\n\n //Driving North: \t58.334512491588754, 8.576253530218082 to 58.33452608839093, 8.576253888068521\n //Driving East: 58.33452608839093, 8.576253888068521 to 58.33452618178464, 8.576285073219395\n //Driving West: 58.33452618178464, 8.576285073219395 to 58.33452693486112, 8.576258173706947\n //Driving South: 58.33452693486112, 8.576258173706947 to 58.33451544969185, 8.576258890746544\n\n float[] calibInfo = {angle, (float) metersPerLongitude, (float) metersPerLatitude};\n return calibInfo;\n }", "public void basicMotion() {\r\n\t\tPVector v = behavior.behavior(obj.getMotion());\r\n\t\tobj.getMotion().setVelocity(v);\r\n\t\t\r\n\t\tobj.getMotion().kinematicUpdate();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfloat x = obj.getMotion().getPosition().x;\r\n\t\tfloat y = obj.getMotion().getPosition().y;\r\n\t\tif(y <= turnCornerMin ) {\r\n\t\t\tbehavior.setDest(turnCornerMax,turnCornerMin);\r\n\t\t\t\t\r\n\t\t}\r\n\t\tif(x >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMax, turnCornerMax);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(y >= turnCornerMax) {\r\n\t\t\tbehavior.setDest(turnCornerMin, turnCornerMax);\r\n\t\t}\r\n\t\t\r\n\t\tif(x < turnCornerMin) {\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tobj.updateObjKinematics(x, y, obj.getMotion().getOrientation());\r\n\t}", "protected void reInitialize() {\r\n currentPos.reInitialize();\r\n motorState.reInitialize();\r\n armState = KSGripperStates.ARM_UP;\r\n gripperState = KSGripperStates.GRIP_OPEN;\r\n objPresent = false;\r\n objHeld = false;\r\n resistivity = 0;\r\n }", "public void calibrateGyro() {\n gyro.SetYaw(0);\n }", "@Override\n public void initialize() {\n arm.setPosition(degrees);\n }", "protected void initialize() {\n initialPos = Math.abs(Robot.arm.getArmEncoderValue());\n double direction = Math.signum(setpoint - Math.abs(Robot.arm.getArmEncoderValue()));\n Robot.arm.moveArm(direction * RobotMap.ArmConstants.ARM_AUTONOMOUS_MOVEMENT_POWER, 1);\n }", "public void arcadeDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set((joystickLYAxis + joystickLXAxis/2));\n\t\t\tmotorRF.set((joystickLYAxis + joystickLXAxis/2));\n\t\t\tmotorLB.set(-(joystickLYAxis - joystickLXAxis/2));\n\t\t\tmotorLF.set(-(joystickLYAxis - joystickLXAxis/2));\n\t\t} else {\n\t\t\tmotorRB.set((joystickLYAxis + joystickLXAxis/2)/2);\n\t\t\tmotorRF.set((joystickLYAxis + joystickLXAxis/2)/2);\n\t\t\tmotorLB.set(-(joystickLYAxis - joystickLXAxis/2)/2);\n\t\t\tmotorLF.set(-(joystickLYAxis - joystickLXAxis/2)/2);\n\t\t}\n\t}", "@Override\n public void loop() {\n\n //double armRot = robot.Pivot.getPosition();\n\n double deadzone = 0.2;\n\n double trnSpdMod = 0.5;\n\n float xValueRight = gamepad1.right_stick_x;\n float yValueLeft = -gamepad1.left_stick_y;\n\n xValueRight = Range.clip(xValueRight, -1, 1);\n yValueLeft = Range.clip(yValueLeft, -1, 1);\n\n // Pressing \"A\" opens and closes the claw\n if (gamepad1.a) {\n\n if (robot.Claw.getPosition() < 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(1);}\n else if (robot.Claw.getPosition() > 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(0.4);}\n else\n while(gamepad1.a)\n robot.Claw.setPosition(1);\n }\n\n // Pressing \"B\" changes the wrist position\n if (gamepad1.b) {\n\n if (robot.Wrist.getPosition() == 1)\n while(gamepad1.b)\n robot.Wrist.setPosition(0.5);\n else if (robot.Wrist.getPosition() == 0.5)\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n else\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n }\n\n // Turn left/right, overrides forward/back\n if (Math.abs(xValueRight) > deadzone) {\n\n robot.FL.setPower(xValueRight * trnSpdMod);\n robot.FR.setPower(-xValueRight * trnSpdMod);\n robot.BL.setPower(xValueRight * trnSpdMod);\n robot.BR.setPower(-xValueRight * trnSpdMod);\n\n\n } else {//Forward/Back On Solely Left Stick\n if (Math.abs(yValueLeft) > deadzone) {\n robot.FL.setPower(yValueLeft);\n robot.FR.setPower(yValueLeft);\n robot.BL.setPower(yValueLeft);\n robot.BR.setPower(yValueLeft);\n }\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n\n telemetry.addData(\"Drive Encoder Ticks\", robot.FL.getCurrentPosition());\n telemetry.addData(\"Winch Encoder Ticks\", robot.Winch.getCurrentPosition());\n telemetry.addData(\"ColorArm Position\", robot.ColorArm.getPosition());\n telemetry.addData(\"Wrist Position\", robot.Wrist.getPosition());\n telemetry.addData(\"Claw Position\", robot.Claw.getPosition());\n telemetry.addData(\"Grip Position\", robot.Grip.getPosition());\n telemetry.addData(\"Color Sensor Data Red\", robot.Color.red());\n telemetry.addData(\"Color Sensor Data Blue\", robot.Color.blue());\n\n /*\n\n // This is used for an Omniwheel base\n\n // Group a is Front Left and Rear Right, Group b is Front Right and Rear Left\n float a;\n float b;\n float turnPower;\n if(!gamepad1.x) {\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n\n a = Range.clip(yValueLeft + xValueLeft, -1, 1);\n b = Range.clip(yValueLeft - xValueLeft, -1, 1);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n } else {\n\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n a = Range.clip(yValueLeft + xValueLeft, -0.6f, 0.6f);\n b = Range.clip(yValueLeft - xValueLeft, -0.6f, 0.6f);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n }\n\n\n if (gamepad1.dpad_up) {\n\n robot.Swing.setPower(.6);\n\n } else if (gamepad1.dpad_down) {\n\n robot.Swing.setPower(-.6);\n\n } else {\n\n robot.Swing.setPower(0);\n }\n\n if(gamepad1.a){\n\n robot.Claw.setPosition(.4);\n\n } else if(gamepad1.b){\n\n robot.Claw.setPosition(0);\n }\n\n if(gamepad1.left_bumper) {\n\n robot.Pivot.setPosition(armRot+0.0005);\n\n } else if(gamepad1.right_bumper) {\n\n robot.Pivot.setPosition(armRot-0.0005);\n\n } else{\n\n robot.Pivot.setPosition(armRot);\n }\n\n telemetry.addData(\"position\", position);\n\n */\n\n /*\n * Code to run ONCE after the driver hits STOP\n */\n }", "@OnClick(R.id.calibrate)\n public void onCalibrate() {\n popupCalibratingDialog();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n presenter.calibrate();\n }\n }, 600);\n }", "@Override\n\tpublic void teleopPeriodic() {\n\n\t\tif (!x_aligning && !y_aligning) {\n\t\t\tm_drive.arcadeDrive(Joy.getY(), Joy.getZ() * -1);\n\t\t}\n\n\t\t// Show status of align modes\n\n\t\t// read values periodically\n\t\tarea = ta.getDouble(0.0);\n\n\t\t// post to smart dashboard periodically\n\t\tSmartDashboard.putNumber(\"LimelightX\", tx.getDouble(0.0));\n\t\tSmartDashboard.putNumber(\"LimelightY\", ty.getDouble(0.0));\n\t\tSmartDashboard.putNumber(\"LimelightArea\", area);\n\n\t\tif (Joy.getRawButtonPressed(2)) {\n\t\t\tdistanceToTarget = getDistance();\n\t\t\tSmartDashboard.putNumber(\"Estimated Distance\", distanceToTarget);\n\n\t\t}\n\t\tif (Joy.getRawButtonPressed(5)) {\n\t\t\talignX();\n\t\t}\n\n\t\tif (Joy.getRawButtonPressed(6)) {\n\t\t\talignY();\n\t\t}\n\n\t\tif (Joy.getTriggerPressed()) {\n\t\t\t/*\n\t\t\t * alignDepth = 0; while ( ((Math.abs(tx.getDouble(0.0)) > 1) ||\n\t\t\t * (Math.abs(ty.getDouble(0.0)) > 1)) || (tx.getDouble(0.0) == 0 &\n\t\t\t * ty.getDouble(0.0) == 0) || (alignDepth < 3)) { alignX(); alignY(); alignDepth\n\t\t\t * ++; } System.out.println(\"FULL ALIGN\");\n\t\t\t */\n\n\t\t\tSystem.out.println(lidarTest());\n\t\t}\n\n\t}", "private static void resetVehicle() {\n Vehicle vehicle = MavDemo1.getVehicle();\n VehicleControl engineBody = vehicle.getVehicleControl();\n\n float[] angles = new float[3];\n engineBody.getPhysicsRotation().toAngles(angles);\n Vector3f location = engineBody.getPhysicsLocation();\n\n vehicle.removeFromPhysicsSpace();\n vehicle.warpAllBodies(location, angles[1]);\n if (vehicle.contactTest()) {\n Vector3f newLocation = location.add(0f, 1f, 0f);\n for (int iteration = 0; iteration < 9; ++iteration) {\n vehicle.warpAllBodies(newLocation, angles[1]);\n if (vehicle.contactTest()) {\n break;\n }\n Vector3f offset = generator.nextVector3f();\n offset.multLocal(0.1f * (iteration + 1));\n newLocation.addLocal(offset);\n }\n }\n vehicle.addToPhysicsSpace();\n }", "@Override\n\tprotected void autonomousInit()\n\t{\n\t\tarmTurnMotor.resetSpeedControl();\n\t\tclawArm.resetTargets();\n\t}", "@Override\n protected void initialize() {\n arm.getElbow().enableCoastMode();\n arm.getElbow().stop();\n arm.getWrist().enableCoastMode();\n arm.getWrist().stop();\n arm.getExtension().enableCoastMode();\n arm.getExtension().stop();\n }", "public TalonControllerGroup finishCalibration() {\n\t\tTalonSettings frontLeftSettings = TalonSettingsBuilder.copy(leftTalonSettings);\n\t\tTalonSettings frontRightSettings = TalonSettingsBuilder.copy(rightTalonSettings);\n\t\tTalonSettings rearLeftSettings = TalonSettingsBuilder.copy(leftTalonSettings);\n\t\tTalonSettings rearRightSettings = TalonSettingsBuilder.copy(rightTalonSettings);\n\n\t\tEncoderCheck checker = tester.finishTest();\n\t\tlog.log(\"Calibration Finished\", true);\n\t\tlog.log(\"LeftFrontMotorGood\",checker.isLeftFrontOk());\n\t\tlog.log(\"LeftRearMotorGood\",checker.isLeftRearOk());\n\t\tlog.log(\"RightFrontMotorGood\",checker.isRightFrontOk());\n\t\tlog.log(\"RightRearMotorGood\",checker.isRightRearOk());\n\t\t\n\t\tif ( checker.shouldDisableAll()) {\n\t\t\tfrontLeftSettings = TalonSettingsBuilder.disabledCopy(rearLeftSettings);\n\t\t\tfrontRightSettings = TalonSettingsBuilder.disabledCopy(rearLeftSettings);\n\t\t\trearLeftSettings = TalonSettingsBuilder.disabledCopy(rearLeftSettings);\n\t\t\trearRightSettings = TalonSettingsBuilder.disabledCopy(rearLeftSettings);\t\t\t\n\t\t}\n\t\telse {\n\t\t\tif ( checker.shouldLeftFrontFollowLeftRear()) {\n\t\t\t\tfrontLeftSettings = TalonSettingsBuilder.follow(rearLeftSettings,\n\t\t\t\t\t\tRobotMap.CAN.FRONT_RIGHT_MOTOR);\t\t\t\n\t\t\t}\n\t\t\tif ( checker.shouldLeftRearFollowLeftFront()) {\n\t\t\t\trearLeftSettings = TalonSettingsBuilder.follow(frontLeftSettings,\n\t\t\t\t\t\tRobotMap.CAN.FRONT_LEFT_MOTOR);\t\t\t\n\t\t\t}\n\t\t\tif ( checker.shouldRightFrontFollowRightRear()) {\n\t\t\t\tfrontRightSettings = TalonSettingsBuilder.follow(rearRightSettings,\n\t\t\t\t\t\tRobotMap.CAN.FRONT_RIGHT_MOTOR);\t\t\t\n\t\t\t}\n\t\t\tif ( checker.shouldRightRearFollowRightFront()) {\n\t\t\t\trearRightSettings = TalonSettingsBuilder.follow(frontRightSettings,\n\t\t\t\t\t\tRobotMap.CAN.FRONT_RIGHT_MOTOR);\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\tthis.calibrated = true;\n\t\treturn new TalonControllerGroup(\t\t\t\t\n\t\t\t\tnew TalonPositionController(frontLeftMotor, frontLeftSettings),\n\t\t\t\tnew TalonPositionController(frontRightMotor, rearLeftSettings),\n\t\t\t\tnew TalonPositionController(rearLeftMotor, frontRightSettings), \n\t\t\t\tnew TalonPositionController(rearRightMotor, rearRightSettings));\t\t\n\t\t\n\t}", "public void update() {\n if (!hasStarted) {\n //drive.setAutonStraightDrive();\n hasStarted = true;\n } else {\n if (Math.abs((Math.abs(rotations) - (Math.abs(drive.getRightSensorValue() / 4096)))) <= TOLERANCE) {\n drive.setBrakeMode(true);\n setFinished(true);\n }\n }\n\n }", "public void adjustShooterAngleManual() {\n\n // If the driver pushes the Square Button on the PS4 Controller,\n // set the worm drive motors to go backwards (lower it).\n if (PS4.getRawButton(PS4_X_BUTTON) == true) {\n\n wormDriveMotors.set(-0.2);\n\n // If the driver pushes the Triangle Button on the PS4 Controller,\n // set the worm drive motors to go forwards (raise it up).\n } else if (PS4.getRawButton(PS4_SQUARE_BUTTON) == true) {\n\n wormDriveMotors.set(0.4);\n }\n\n // If the driver is an idiot and is pressing BOTH the Square Button AND the\n // Triangle Button at the same time, OR (||) if the driver is pushing neither\n // button, set the motor speed to 0.\n else if (((PS4.getRawButton(PS4_X_BUTTON) == true) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == true))\n || ((PS4.getRawButton(PS4_X_BUTTON) == false) && (PS4.getRawButton(PS4_SQUARE_BUTTON) == false))) {\n\n wormDriveMotors.set(0);\n }\n\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 }", "private void handleArmInput() {\n if (armJoystick.getRawButton(1)) {\n arm.grabTube(true);\n } else {\n arm.grabTube(false);\n }\n\n\n //button 5 raises the wrist, button 4 lowers it\n if (armJoystick.getRawButton(5)) {\n arm.wristUp();\n } else if (armJoystick.getRawButton(4)) {\n arm.wristDown();\n }\n\n //attempts to correct for predictable gyro drift\n arm.gyroCorrect();\n\n //button two resets the gyro. This only works if the arm is vertical\n if (liftJoystick.getRawButton(2)) {\n ;\n arm.resetArmAngle();\n }\n\n// if (liftJoystick.getRawButton(6)) {\n//\n// armTask = arm.new GoToHeight(2);\n// armTask.begin();\n// armState = AUTO;\n// }\n\n //checks if the wrist should auto flip- it flips if it passes through the \"critical\" zone\n arm.wristFlipCheck();\n\n\n\n /* if(armJoystick.getRawButton(8))\n {\n arm.forkliftControl(-armJoystick.getAxis(Joystick.AxisType.kZ));\n }\n else if (armJoystick.getRawButton(9))\n {\n *\n */\n\n\n arm.forkliftControl(liftJoystick.getAxis(Joystick.AxisType.kY));\n\n\n\n //START GILS CHANGES TO IMPLEMENT OSCILLATION\n double armSpeed = -armJoystick.getAxis(Joystick.AxisType.kY);\n\n //controls manually if its reading a non-negligible joystick input\n if (Math.abs(armSpeed) > .03) {\n arm.armControl(armSpeed);\n } //oscillates otherwise. This causes it to maintain its angle as long as no significant\n //driver commands are given (since the joystick at rest is probably not exactly 0 we must account\n //for a range of some size being \"insignificant.\" .03 was chosen arbitrarily\n else {\n arm.armOscillate();\n }\n //END GILS CHANGES TO IMPLEMENT OSCILLATION\n\n\n\n// if (liftJoystick.getRawButton(3)) {\n// arm.heightenArm();\n// } else if (liftJoystick.getRawButton(2)) {\n// arm.lowerArm(); //0.4 seemed like a good number\n// } else {\n// arm.oscillate(); //set somethign to avoid gravy\n// //arm.armJag.set(0);\n// }\n }", "public void applyStrategy(){\n\t\tfloat dx, dy;\n\t\t\n\t\tdx = targetCar.getX() - myCar.getX();\n\t\tdy = targetCar.getY() - myCar.getY();\n\t\t\n\t\t// awesome, atan2 handles all the hard parts of arctan calculations\n\t\tint angle = (int)Math.toDegrees( Math.atan2(dx, dy) );\n\t\tmyCar.setHeading( angle );\n\t}", "public void localize() {\n //Turn robot to 45 degrees\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n initialRedValue = leftRedVal;\n Navigation.turnTo(45);\n \n //Proceed forward until the color sensors detect lines\n while(Math.abs(leftRedVal - initialRedValue) < rgbThres || Math.abs(rightRedVal - initialRedValue) < rgbThres) {\n leftMotor.forward();\n rightMotor.forward();\n }\n leftMotor.stop(true);\n rightMotor.stop(false);\n \n //Make the robot turn left until the left sensor finds it\n \n //make the robot turn right until the right sensor finds it\n \n //do calculations\n \n //turn robot back to facing north\n }", "public void calibrate(int num) {\n\t\tupdateGyro();\n\t\t\n\t\tsumX = 0;\t//Sum of avgX\n\t\tsumY = 0;\t//Sum of avgY\n\t\tsumZ = 0;\t//Sum of avgZ\n\t\t\n\t\tavgX.clear();\n\t\tavgY.clear();\n\t\tavgZ.clear();\n\t\t\n\t\tfor (int i=0; i < num; i++) {\n\t\t\tavgX.add(xl.getX());\n\t\t\tavgY.add(xl.getY());\n\t\t\tavgZ.add(xl.getZ());\n\t\t}\n\t\t\n\t\tfor (int i=0; i < avgX.size(); i++) {\n\t\t\tsumX += (double)avgX.get(i);\n\t\t\tsumY += (double)avgY.get(i);\n\t\t\tsumZ += (double)avgZ.get(i);\n\t\t}\n\t\t\n\t\texX = sumX / avgX.size();\n\t\texY = sumY / avgY.size();\n\t\texZ = sumZ / avgZ.size();\n\t\t\n\t\t//Data from calibrate()\n\t\tSmartDashboard.putNumber(\"test x\", exX * 9.8);\n\t\tSmartDashboard.putNumber(\"test y\", exY * 9.8);\n\t\tSmartDashboard.putNumber(\"test z\", exZ * 9.8);\n\n\t}", "@Override\n public void init_loop() {\n hookPosDeg = HOOK_UP;\n clawPosDeg = CLAW_OPEN;\n hookPos = map(hookPosDeg, HOOK_MIN_POS_DEG, HOOK_MAX_POS_DEG, HOOK_MIN_POS, HOOK_MAX_POS);\n clawPos = map(clawPosDeg, CLAW_MIN_POS_DEG, CLAW_MAX_POS_DEG, CLAW_MIN_POS, CLAW_MAX_POS);\n hook.setPosition(hookPos);\n claw.setPosition(clawPos);\n\n// armTarget = ARM_CENTER;\n// arm.setTargetPosition(armTarget);\n// arm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n// arm.setPower(.3);\n }", "public void calibrated() {\n weaponDamage = weaponDamage + 10;\r\n }", "static void resetMiniCalib() {\n\n maxX--;\n minX++;\n\n //maxY = 0;\n //minY = SCREEN_HEIGHT;\n maxY--;\n minY++;\n\n if (minY > maxY) {\n maxY += 1;\n minY -= 1;\n }\n\n if (minX > maxX) {\n maxX += 1;\n minX -= 1;\n }\n\n cX = (minX + maxX) / 2;\n cY = (minY + maxY) / 2;\n\n runMiniCalib();\n\n }", "protected void initialize() {\n Timer.delay(7);\n ballIntake.turnOnHorizontalConveyor();\n ballIntake.verticalConveyor.set(-.3);\n }", "@Override\n public void loop() {\n double left;\n double right;\n\n // // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it)\n left = -gamepad1.left_stick_y;\n right = -gamepad1.right_stick_y;\n \n // double Target = 0;\n // robot.rightBack.setTargetPosition((int)Target);\n // robot.rightBack.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n rightFront.setPower(left);\n rightBack.setPower(right);\n // robot.rightDrive.setPower(right);\n\n // // Use gamepad left & right Bumpers to open and close the claw\n // if (gamepad1.right_bumper)\n // clawOffset += CLAW_SPEED;\n // else if (gamepad1.left_bumper)\n // clawOffset -= CLAW_SPEED;\n\n // // Move both servos to new position. Assume servos are mirror image of each other.\n // clawOffset = Range.clip(clawOffset, -0.5, 0.5);\n // robot.leftClaw.setPosition(robot.MID_SERVO + clawOffset);\n // robot.rightClaw.setPosition(robot.MID_SERVO - clawOffset);\n\n // Use gamepad buttons to move the arm up (Y) and down (A)\n // if (gamepad1.y)\n // armPosition += ARM_SPEED;\n \n // if (gamepad1.a)\n // armPosition -= ARM_SPEED;\n \n // armPosition = Range.clip(armPosition, robot.ARM_MIN_RANGE, robot.ARM_MAX_RANGE); \n \n\n // // Send telemetry message to signify robot running;\n // telemetry.addData(\"arm\", \"%.2f\", armPosition);\n // telemetry.addData(\"left\", \"%.2f\", left);\n // telemetry.addData(\"right\", \"%.2f\", right);\n }", "@Override\n\tprotected void execute() {\n\t\tmyLowerArm.set(-0.25);\n\t}", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }", "@Override \n public void init() {\n intakeLeft = hardwareMap.crservo.get(\"intakeLeft\");\n intakeRight = hardwareMap.crservo.get(\"intakeRight\");\n topLeft = hardwareMap.servo.get(\"topLeft\");\n bottomLeft = hardwareMap.servo.get(\"bottomRight\");\n topRight = hardwareMap.servo.get(\"topRight\");\n bottomRight = hardwareMap.servo.get(\"bottomRight\");\n lift = hardwareMap.dcMotor.get(\"lift\");\n }", "@Override\n\tprotected void end() {\n\t\tmyLowerArm.set(0.0);\n\t}", "@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\t//if (Settings.motorAAngle == -90) Settings.motorAAngle = -95;\n\n\t\tMotor.A.rotateTo(Settings.motorAAngle, true);\n\n\t\twhile (Motor.A.isMoving() && !Motor.A.isStalled() && !suppressed);\t\t\t\n\t\t\n\t\tMotor.A.stop();\n\t}", "public void update() {\n // call the method from the super class, this will do all ordinary things first\n super.update();\n\n if (!getCart().worldObj.isRemote) {\n setFarming(farming - 1);\n } else {\n float up = -(float) Math.PI * 5 / 4;\n float down = -(float) Math.PI;\n boolean flag = isFarming();\n if (flag) {\n if (rigAngle < down) {\n rigAngle += 0.1F;\n if (rigAngle > down) {\n rigAngle = down;\n }\n } else {\n farmAngle = (float) ((farmAngle + 0.15F) % (Math.PI * 2));\n }\n } else {\n if (rigAngle > up) {\n rigAngle -= 0.075F;\n if (rigAngle < up) {\n rigAngle = up;\n }\n }\n }\n }\n }", "@Override\n\t\t\t\tpublic void ecCalibrationStatus(LinphoneCore lc, EcCalibratorStatus status,\n\t\t\t\t\t\tint delay_ms, Object data) {\n\t\t\t\t\t\n\t\t\t\t}", "public void changeAngle (int horizontalSpeed)\n\t{\n\t\t//The following makes the PaperAirplane face as far right as it can\n\t\t//(but it still faces downward slightly).\n\t\tif (horizontalSpeed >= 5)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 23;\n\t\t\txDimension2 = getX_Pos () - 18;\n\t\t\txDimension3 = getX_Pos () + 22;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 2;\n\t\t\tyDimension2 = getY_Pos () - 17;\n\t\t\tyDimension3 = getY_Pos () + 5;\n\t\t}\n\t\t//When the horizontal speed progresses from 5 to 0, the plane faces\n\t\t//further downward, which is shown by the if statements below. Likewise,\n\t\t//as the horizontal speed progresses from 0 to 5, the plane faces\n\t\t//further right.\n\t\telse if (horizontalSpeed == 4)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 20;\n\t\t\txDimension2 = getX_Pos () - 12;\n\t\t\txDimension3 = getX_Pos () + 20;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 7;\n\t\t\tyDimension2 = getY_Pos () - 19;\n\t\t\tyDimension3 = getY_Pos () + 11;\n\t\t}\n\t\telse if (horizontalSpeed == 3)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 15;\n\t\t\txDimension2 = getX_Pos () - 5;\n\t\t\txDimension3 = getX_Pos () + 14;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 12;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 13;\n\t\t}\n\t\telse if (horizontalSpeed == 2)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 10;\n\t\t\txDimension2 = getX_Pos () + 2;\n\t\t\txDimension3 = getX_Pos () + 12;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 17;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 18;\n\t\t}\n\t\telse if (horizontalSpeed == 1)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 10;\n\t\t\txDimension2 = getX_Pos () + 4;\n\t\t\txDimension3 = getX_Pos () + 6;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 18;\n\t\t\tyDimension2 = getY_Pos () - 20;\n\t\t\tyDimension3 = getY_Pos () + 20;\n\t\t}\n\t\t//The following makes the plane face straight down.\n\t\telse if (horizontalSpeed == 0)\n\t\t{\n\t\t\txDimension1 = getX_Pos () - 7;\n\t\t\txDimension2 = getX_Pos ();\n\t\t\txDimension3 = getX_Pos () + 7;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 20;\n\t\t\tyDimension2 = getY_Pos () + 24;\n\t\t\tyDimension3 = getY_Pos () - 20;\n\t\t}\n\t\t//When the horizontal speed progresses from -5 to 0, the plane faces\n\t\t//further downward, which is shown by the if statements below. Likewise,\n\t\t//as the horizontal speed progresses from 0 to -5, the plane faces\n\t\t//further left.\n\t\telse if (horizontalSpeed == -1)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 10;\n\t\t\txDimension2 = getX_Pos () - 4;\n\t\t\txDimension3 = getX_Pos () - 6;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 18;\n\t\t\tyDimension2 = getY_Pos () - 20;\n\t\t\tyDimension3 = getY_Pos () + 20;\n\t\t}\n\t\telse if (horizontalSpeed == -2)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 10;\n\t\t\txDimension2 = getX_Pos () - 2;\n\t\t\txDimension3 = getX_Pos () - 12;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 17;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 18;\n\t\t}\n\t\telse if (horizontalSpeed == -3)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 15;\n\t\t\txDimension2 = getX_Pos () + 5;\n\t\t\txDimension3 = getX_Pos () - 14;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 12;\n\t\t\tyDimension2 = getY_Pos () - 22;\n\t\t\tyDimension3 = getY_Pos () + 13;\n\t\t}\n\t\telse if (horizontalSpeed == -4)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 20;\n\t\t\txDimension2 = getX_Pos () + 12;\n\t\t\txDimension3 = getX_Pos () - 20;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 7;\n\t\t\tyDimension2 = getY_Pos () - 19;\n\t\t\tyDimension3 = getY_Pos () + 11;\n\t\t}\n\t\t//The following makes the PaperAirplane face as far left as it can\n\t\t//(but it still faces downward slightly).\n\t\telse if (horizontalSpeed <= -5)\n\t\t{\n\t\t\txDimension1 = getX_Pos () + 23;\n\t\t\txDimension2 = getX_Pos () + 18;\n\t\t\txDimension3 = getX_Pos () - 22;\n\t\t\t\n\t\t\tyDimension1 = getY_Pos () - 2;\n\t\t\tyDimension2 = getY_Pos () - 17;\n\t\t\tyDimension3 = getY_Pos () + 5;\n\t\t}\n\t}", "protected void initialize() {\n \tRobot.gyroSubsystem.reset();\n \tstartAngle = Robot.gyroSubsystem.gyroPosition();\n \ttargetAngle = startAngle + goal;\n }", "@Override\n public void testPeriodic()\n {\n // test is currently built to debug cargo arm placements\n // press 'A' on the second controller to output the encoder's position\n // and whatever angle it thinks we're at\n // press 'Select' on p2 to re-zero the cargo arm\n \n // cargoArm.armUp();\n \n if(driver2.pressed(driver2.A))\n {\n System.out.println(\"Cargo arm is at encoder value: \" + cargoArm.encCargoArm.position());\n System.out.println(\"Which is \" + (cargoArm.encCargoArm.angle() + cargoArm.ZERO_ANGLE) + \" degrees.\");\n \n System.out.println(\"Hatch finger is at encoder value: \" + hatchArm.fingerEncValue());\n }\n if(driver2.pressed(driver2.Select))\n {\n cargoArm.zeroEncoder();\n System.out.println(\"Cargo arm zeroed.\");\n\n hatchArm.zero();\n System.out.println(\"Hatch finger zeroed.\");\n\n hatchArm.finger_target = 0;\n hatchArm.finger_moving = false;\n hatchArm.dirMoving = 0;\n }\n \n // if(driver2.pressed(driver2.B))\n // {\n // cargoArm.armPositionTarget = testGoalAngle * 56.9;\n // //double forceToApply = cargoArm.getArmCalculation();\n // System.out.println(\"To reach the goal of \" + testGoalAngle + \", the following force would be applied: \" + forceToApply);\n // }\n \n // adjust test goal angle to combine with the above to see, without moving, a cargo arm motor speed to apply\n if(driver2.dpad(driver2.Up))\n {\n testGoalAngle += 5;\n cargoArm.armPositionTarget = testGoalAngle * 56.9;\n System.out.println(\"Test goal angle incremented to \" + testGoalAngle);\n }\n if(driver2.dpad(driver2.Down))\n {\n testGoalAngle -= 5;\n \n cargoArm.armPositionTarget = testGoalAngle * 56.9;\n System.out.println(\"Test goal angle decremented to \" + testGoalAngle);\n }\n \n // // adjust gravitational constant for on-the-go tweak testing\n // // if you don't know what you're doing, do not try to do this!\n // if(driver2.pressed(driver2.R1))\n // {\n // cargoArm.GRAV_CONSTANT += 0.02;\n // System.out.println(\"Gravitational constant incremented to \" + cargoArm.GRAV_CONSTANT);\n // }\n // if(driver2.pressed(driver2.L1))\n // {\n // cargoArm.GRAV_CONSTANT -= 0.02;\n // System.out.println(\"Gravitational constant decremented to \" + cargoArm.GRAV_CONSTANT);\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 hatchArm.periodic();\n\n if(driver2.pressed(driver2.B))\n {\n hatchArm.toggleFinger();\n }\n\n // test brake power\n if(driver2.pressed(driver2.Start))\n {\n cargoArm.toggleBrake();\n System.out.println(\"Bike brake toggled to: \" + cargoArm.solArmBrake.get());\n }\n\n // press 'x' to toggle whether or not arm should attempt to ONLY counterract the force of gravity\n // use this to check if the grav constant is correct. if it is, the arm should not fall\n if(driver2.pressed(driver2.X))\n {\n cargoArm.toggleArmLock();\n System.out.println(\"Arm lock toggled.\");\n if(cargoArm.armLockEnabled)\n {\n System.out.println(\"Arm should stay constant at given location.\");\n }\n }\n\n // if(driver2.down(driver2.L2) && driver2.pressed(driver2.R2))\n // {\n // movementInTest = !movementInTest;\n // if(movementInTest)\n // {\n // System.out.println(\"Movement in test has been enabled!\");\n // }\n // else\n // {\n // System.out.println(\"Movement in test has been disabled.\");\n // }\n // }\n if(driver2.pressed(driver2.R1))\n {\n System.out.println(\"Moving hatch finger to UP\");\n hatchArm.fingerUp();\n }\n if(driver2.pressed(driver2.R2))\n {\n System.out.println(\"Moving hatch finger to GRAB\");\n hatchArm.fingerGrab();\n }\n\n // if(movementInTest)\n // {\n // cargoArm.rotateArm(cargoArm.getArmCalculation());\n // }\n \n // // this is an attempt to read values from the DriverStation so we can edit constants without redeploying\n // // this may need tweaking b/c the resource that said this was possible was from 2013\n // if(driver2.pressed(driver2.Start))\n // {\n // System.out.println(\"Grabbing constants from Smart Dashboard...\");\n // cargoArm.GRAV_CONSTANT = prefs.getDouble(\"Grav_Constant\", 0.5);\n // // cargoArm.ENCODER_RATIO = prefs.getDouble(\"Cargo_Gear_Ratio\", 1);\n // cargoArm.armPositions[1] = prefs.getDouble(\"Cargo_Full_Down_Pos\", -6000);\n // }\n\n }", "@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 void ApplyMovement() {\n long currTime = SystemClock.uptimeMillis();\n if(currTime - lastUpdateTime < 16){\n return;\n }\n lastUpdateTime = currTime;\n\n\n double tl_power_raw = movement_y-movement_turn+movement_x*1.5;\n double bl_power_raw = movement_y-movement_turn- movement_x*1.5;\n double br_power_raw = -movement_y-movement_turn-movement_x*1.5;\n double tr_power_raw = -movement_y-movement_turn+movement_x*1.5;\n\n\n\n\n //find the maximum of the powers\n double maxRawPower = Math.abs(tl_power_raw);\n if(Math.abs(bl_power_raw) > maxRawPower){ maxRawPower = Math.abs(bl_power_raw);}\n if(Math.abs(br_power_raw) > maxRawPower){ maxRawPower = Math.abs(br_power_raw);}\n if(Math.abs(tr_power_raw) > maxRawPower){ maxRawPower = Math.abs(tr_power_raw);}\n\n //if the maximum is greater than 1, scale all the powers down to preserve the shape\n double scaleDownAmount = 1.0;\n if(maxRawPower > 1.0){\n //when max power is multiplied by this ratio, it will be 1.0, and others less\n scaleDownAmount = 1.0/maxRawPower;\n }\n tl_power_raw *= scaleDownAmount;\n bl_power_raw *= scaleDownAmount;\n br_power_raw *= scaleDownAmount;\n tr_power_raw *= scaleDownAmount;\n\n\n //now we can set the powers ONLY IF THEY HAVE CHANGED TO AVOID SPAMMING USB COMMUNICATIONS\n topLeft.setPower(tl_power_raw);\n bottomLeft.setPower(bl_power_raw);\n bottomRight.setPower(br_power_raw);\n topRight.setPower(tr_power_raw);\n }", "private void MotorInit()\n {\n intake_up.configFactoryDefault();\n intake_down.configFactoryDefault();\n intake_up.configOpenloopRamp(Constants.kMotorRampRate);\n intake_down.configOpenloopRamp(Constants.kMotorRampRate);\n intake_up.setInverted(PortReversed.intake_up_reversed.value);\n intake_down.setInverted(PortReversed.intake_down_reversed.value);\n intake_up.setNeutralMode(NeutralMode.Brake);\n intake_down.setNeutralMode(NeutralMode.Brake);\n }", "@Override\n public void initialize() {\n setPoint = (((targetAngle + driveSubsystem.getHeading() + 180) % 360) - 180);\n }", "@Override\n\tpublic void ecCalibrationStatus(LinphoneCore lc, EcCalibratorStatus status,\n\t\t\tint delay_ms, Object data) {\n\t\t\n\t}", "public void updateDrive () {\n leftCurrSpeed = scale (leftCurrSpeed, leftTargetSpeed, Constants.Drivetrain.ACCELERATION_SCALING, Constants.Drivetrain.ACCELERATION_THRESHOLD);\n rightCurrSpeed = scale (rightCurrSpeed, rightTargetSpeed, Constants.Drivetrain.ACCELERATION_SCALING, Constants.Drivetrain.ACCELERATION_THRESHOLD);\n driveRaw (leftCurrSpeed, rightCurrSpeed);\n }", "@Override\n public void start() {\n\n\n // IF YOU ARE NOT USING THE AUTO MODE\n\n /*\n\n runtime.reset();\n\n ElapsedTime time = new ElapsedTime();\n\n time.reset();\n\n while (time.time() < 1) {\n\n armMotor.setPower(0.5);\n\n }\n\n armMotor.setPower(0);\n\n // get the grabbers ready to grip the blocks\n leftGrab.setPosition(0.9);\n rightGrab.setPosition(0.1);\n\n /*\n time.reset();\n\n while(time.time() < 0.6) {\n\n armMotor.setPower(-0.5);\n\n }\n\n */\n\n\n }", "public void teleopPeriodic() {\n\n \t//NetworkCommAssembly.updateValues();\n \t\n\t\t// both buttons pressed simultaneously, time to cal to ground\n\t\tif (gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON1) && gamepad.getRawButton(FRONT_ARM_GROUND_CAL_BUTTON2)) {\n\t\t\tprocessGroundCal();\n\t\t}\n\n\t\t// PID CONTROL ONLY\n\t\tdouble armDeltaPos = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armDeltaPos) < ARM_DEADZONE) {\n\t\t\tarmDeltaPos = 0.0f;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tarmDeltaPos *= ARM_POS_MULTIPLIER;\n\t\t\tdouble currPos = testMotor.getPosition();\n\t\t\t\n\t\t\tif (((currPos > SOFT_ENCODER_LIMIT_MAX) && armDeltaPos > 0.0) || ((currPos < SOFT_ENCODER_LIMIT_FLOOR) && armDeltaPos < 0.0)) {\n\t\t\t\tSystem.out.println(\"SOFT ARM LIMIT HIT! Setting armDeltaPos to zero\");\n\t\t\t\tarmDeltaPos = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdouble newPos = currPos + armDeltaPos;\n\t\t\ttestMotor.set(newPos);\n\t\t\tSystem.out.println(\"Setting new front arm pos = \" + newPos);\t\n\t\t}\t\t\n\n \t/*\n\t\tdouble newArmPos = gamepad.getRawAxis(1);\n\t\tif(Math.abs(newArmPos) <= ARM_DEADZONE) {\n\t\t\tnewArmPos = 0.0;\n\t\t}\n\t\tdouble newMotorPos = (newArmPos * ARM_SPEED_MULTIPLIER) + testMotor.getPosition();\n\t\tpositionMoveByCount(newMotorPos);\n\t\tSystem.out.println(\"input = \" + newArmPos + \" target pos = \" + newMotorPos + \" enc pos = \" + testMotor.getPosition());\n \t*/\n \t\n\t\t// PercentVbus test ONLY!!\n \t/*\n\t\tdouble armSpeed = gamepad.getRawAxis(1);\n\t\tif (Math.abs(armSpeed) < ARM_DEADZONE) {\n\t\t\tarmSpeed = 0.0f;\n\t\t}\t\n\t\tarmSpeed *= ARM_MULTIPLIER;\n\t\t\n\t\tdouble pos= testMotor.getPosition();\n\t\tif (((pos > SOFT_ENCODER_LIMIT_1) && armSpeed < 0.0) || ((pos < SOFT_ENCODER_LIMIT_2) && armSpeed > 0.0))\n\t\t\tarmSpeed = 0.0;\n\t\ttestMotor.set(armSpeed);\n\t\t\n\t\tSystem.out.println(\"armSpeed = \" + armSpeed + \" enc pos = \" + testMotor.getPosition());\n\t\t */ \n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\t\n\t\t\n\t\tif (stick.getRawButtonPressed(2)) {\n\t\t\tstickReversed = !stickReversed;\n\t\t}\n\t\t\n\t\t// double means a floating point (decimal) number with a precision of \"hella\"\n\t\tdouble power = -stick.getY(Hand.kLeft); // negated, because microsoft is weird and up is negative\n\t\tdouble steering = stick.getX(Hand.kRight); \n\t\tif (stickReversed) {\n\t\t\tpower = -power;\n\t\t}\n\t\tdrive(power, steering);\n\t\t\n//\t\tif (xbox.getBumper(Hand.kRight)) {\n//\t\t\tleftIntake.set(xbox.getTriggerAxis(Hand.kLeft));\t\n//\t\t\trightIntake.set(-0.9);\n//\t\t} else if (xbox.getBumper(Hand.kLeft)) {\n//\t\t\tleftIntake.set(-1.0);\n//\t\t\trightIntake.set(1.0);\n//\t\t} else {\n//\t\t\tleftIntake.set(0.0);\n//\t\t\trightIntake.set(0.0);\n//\t\t}\n\t\t\n\t\tif (xbox.getBumper(Hand.kLeft)) { // shoot out\n\t\t\tleftIntake.set(-1.0);\n\t\t} else { // intake\n\t\t\tleftIntake.set(xbox.getTriggerAxis(Hand.kLeft));\n\t\t}\n\t\t\n\t\tif(xbox.getBumper(Hand.kRight)) { //shooty i think\n\t\t\trightIntake.set(1.0);\n\t\t} else { //intake\n\t\t\trightIntake.set(-xbox.getTriggerAxis(Hand.kRight));\n\t\t}\n//\t\tarmSetpoint += xbox.getY(Hand.kLeft) * 60;\n//\t\tSystem.out.println(armSetpoint);\n\t\t\n\t\tarmMotor.set(ControlMode.PercentOutput, xbox.getY(Hand.kLeft) * 0.8);\n\t\tSystem.out.println(xbox.getY(Hand.kLeft));\n\t}", "public void raiseRamp() {\n if (currentSpeed == 0) {\n storage.raiseRamp();\n }\n }", "public void initialize() {\n\t\tdrivetrain.resetGyro();\n\t\tdrivetrain.setAngleTarget(getTargetAngle());\n\t\tLog.debug(this.getClass().toString()+ \".initialize called drivetrain.setAngleTarget(\" + getTargetAngle() + \")\");\n\t\t\n\n\t}", "void updateMotion(boolean altitudeLock)\n {\n \n ascendDescendLift:\n {\n // as pitch and roll increases, lift decreases by fall-off function.\n\t // thrust.y ranges from 0 to 1. at 1, almost perfectly balances gravity\n\t \n //thrust.y = MathHelper.cos(pitchRad) * MathHelper.cos(rollRad);\n thrust.y = MathHelper.cos(pitchRad) * MathHelper.cos(rollRad) * MathHelper.cos(rollRad);\n }\n\n forwardBack:\n {\n // as pitch increases, forward-back motion increases\n // but sin function was too touchy so using 1-cos\n float accel = 1f - MathHelper.cos(pitchRad);\n if (pitchRad > 0f) accel *= -1f;\n \n thrust.x = -fwd.x * accel;\n thrust.z = -fwd.z * accel;\n \n // also adjust y in addition to ascend/descend to simulate diving\n thrust.y += -fwd.y * accel * .3f;\n }\n\n strafeLeftRight:\n {\n // float strafe = -MathHelper.sin(roll);\n float strafe = 1f - MathHelper.cos(rollRad);\n if (rollRad > 0f) strafe *= -1f;\n\n // use perp of yaw and scale by roll\n thrust.x -= fwd.z * strafe;\n thrust.z += fwd.x * strafe;\n }\n\n // start with current velocity\n velocity.set((float)motionX, (float)motionY, (float)motionZ);\n\n // friction, very little!\n velocity.scale(FRICTION);\n\n // scale thrust by current throttle and delta time\n //thrust.normalize().scale(MAX_ACCEL * (1f + throttle) * deltaTime / .05f);\n thrust.normalize().scale(MAX_ACCEL * (1f + throttle) * deltaTime / .05f);\n\n // apply the thrust\n Vector3.add(velocity, thrust, velocity);\n\n // gravity is always straight down\n //if (!inWater && !onGround) velocity.y -= GRAVITY * deltaTime / .05f;\n velocity.y -= GRAVITY * deltaTime / .05f;\n\n // limit max velocity\n if (velocity.lengthSquared() > MAX_VELOCITY * MAX_VELOCITY)\n {\n velocity.scale(MAX_VELOCITY / velocity.length());\n }\n\n // apply velocity changes\n motionX = (double) velocity.x;\n motionY = (double) velocity.y;\n motionZ = (double) velocity.z;\n \n if (altitudeLock && riddenByEntity != null)\n {\n motionY *= .9;\n if (motionY < .00001) motionY = .0;\n }\n \n moveEntity(motionX, motionY, motionZ);\n }", "private void updateArmSwing(ModelRenderer arm) {\n \tfloat var8 = 1.0F - swingProgress;\n var8 = 1 - (var8 * var8 * var8);\n float var9 = MathHelper.sin(var8 * (float)Math.PI);\n float var10 = MathHelper.sin(swingProgress * (float)Math.PI) * -(head.rotateAngleX - 0.7F) * 0.75F;\n float swing = MathHelper.sin(MathHelper.sqrt_float(swingProgress) * (float)Math.PI * 2.0F) * 0.2F;\n arm.rotateAngleX -= (float)(var9 * 1.2 + var10);\n arm.rotateAngleY += swing * 2.0F;\n arm.rotateAngleZ += MathHelper.sin(swingProgress * (float)Math.PI) * -0.4F;\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 runOpMode() {\n try {\n leftfrontDrive = hardwareMap.get(DcMotor.class, \"frontLeft\");\n leftfrontDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n rightfrontDrive = hardwareMap.get(DcMotor.class, \"frontRight\");\n rightfrontDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n leftbackDrive = hardwareMap.get(DcMotor.class, \"backLeft\");\n leftbackDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftbackDrive.setDirection(DcMotor.Direction.REVERSE);\n\n rightbackDrive = hardwareMap.get(DcMotor.class, \"backRight\");\n rightbackDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n lift = hardwareMap.get(DcMotor.class, \"Lift\");\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setDirection(DcMotor.Direction.REVERSE);\n\n markerArm = hardwareMap.get(Servo.class, \"markerArm\");\n\n armActivator = hardwareMap.get(DcMotor.class, \"armActivator\");\n armActivator.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n } catch (IllegalArgumentException iax) {\n bDebug = true;\n }\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;\n parameters.calibrationDataFile = \"BNO055IMUCalibration.json\";\n parameters.loggingEnabled = true;\n parameters.loggingTag = \"IMU\";\n parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();\n\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n waitForStart(); //the rest of the code begins after the play button is pressed\n\n sleep(3000);\n\n drive(0.35, 0.5);\n\n turn(90.0f);\n\n drive(1.8, 0.5);\n\n turn(45.0f);\n\n drive(2.5, -0.5);\n\n sleep(1000);\n\n markerArm.setPosition(1);\n\n sleep(1000);\n\n markerArm.setPosition(0);\n\n sleep(1000);\n\n drive(2.5,.75);\n\n turn(179.0f);\n\n drive(1.5, 1.0);\n\n requestOpModeStop(); //end of autonomous\n }", "private void initializeElevatorMotor()\n {\n Rectangle base = new Rectangle(shaftWidth*.3, location, shaftWidth*.4, floorHeight*.8);\n Rectangle latch = new Rectangle(shaftWidth*.45, location-5, shaftWidth*.1, floorHeight*.2);\n\n elevator = Shape.union(base, latch);\n elevator.setFill(Color.valueOf(\"#C0C0C0\"));\n\n elevatorTranslate = 0;\n elevatorOffset = 0;\n elevatorSpeed = 20;\n\n motorTimeline = new Timeline(new KeyFrame(Duration.millis(elevatorSpeed), e -> {\n if(location+elevatorOffset <= shaftHeight-60 && location+elevatorOffset >= 10) {\n if(location <= destination && location >= destination-10)\n {\n// System.out.println(location + \" OF \" + (destination) + \" / \" + (destination-10) + \" \" + (10 - destination/floorHeight));\n// System.out.println(\"EARLY STOP\");\n motorTimeline.pause();\n }\n\n elevatorTranslate += elevatorOffset;\n location += elevatorOffset;\n\n elevator.setTranslateY(elevatorTranslate);\n frame.setTranslateY(elevatorTranslate);\n leftDoor.setTranslateY(elevatorTranslate);\n rightDoor.setTranslateY(elevatorTranslate);\n }\n else motorTimeline.pause();\n }));\n motorTimeline.setCycleCount(Animation.INDEFINITE);\n }", "public static void moveArm(double speed) {\n\t\tSmartDashboard.putNumber(\"Arm Max value\",maxPos);\n\t\tSmartDashboard.putNumber(\"Arm Min value\",minPos);\n\t\tActuators.getArmAngleMotor().changeControlMode(TalonControlMode.PercentVbus);\t//CHECK THIS SCOTT\n\t\tSmartDashboard.putNumber(\"Percent of Arm Angle\", unMapPosition(Actuators.getArmAngleMotor().getPosition()));\t//CHECK THIS SCOTT\n\t\tSmartDashboard.putNumber(\"Arm Position\", Actuators.getArmAngleMotor().getPosition());\n\t\tSmartDashboard.putNumber(\"THeoreticalPID position\", mapPosition(unMapPosition(Actuators.getArmAngleMotor().getPosition())));\n\t\tif (Gamepad.secondary.getBack()) {\n\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t} else {\n\t\t\tif ((Actuators.getArmAngleMotor().getPosition() < MAX_ARM_POSITION && Sensors.getArmMinLimitSwitch().get())\n\t\t\t\t\t&& speed > 0) {\n\t\t\t\tActuators.getArmAngleMotor().set(speed / 2);\n\t\t\t} else if ((Actuators.getArmAngleMotor().getPosition() > MIN_ARM_POSITION\n\t\t\t\t\t&& Sensors.getArmMaxLimitSwitch().get()) && speed < 0) {\n\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t} else if (!Sensors.getArmMaxLimitSwitch().get()){\n\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\tmaxPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t} else if (!Sensors.getArmMinLimitSwitch().get()){\t\t\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\tminPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t}\n\t\t\telse {\n\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\n\t\t\t}\n\n\t\t\t// speed = -speed;\n\t\t\tSmartDashboard.putNumber(\"Arm Position\", Actuators.getArmAngleMotor().getPosition());\n\t\t\tif (Gamepad.secondary.getBack()) {\n\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t} else {\n\t\t\t\tif ((Sensors.getArmMaxLimitSwitch().get()) && speed < 0) {\n\t\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t\t} else if ((Sensors.getArmMinLimitSwitch().get()) && speed > 0) {\n\t\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t\t} else if (!Sensors.getArmMaxLimitSwitch().get()){\n\t\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\t\tmaxPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t\t} else if (!Sensors.getArmMinLimitSwitch().get()){\t\t\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\t\tminPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t\t} else {\n\t\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t// if (!(/*\n\t\t\t\t// * Actuators.getArmAngleMotor().getPosition() >\n\t\t\t\t// * MAX_ARM_POSITION &&\n\t\t\t\t// */\n\t\t\t\t// Sensors.getArmMaxLimitSwitch().get()) && speed > 0) {\n\t\t\t\t// Actuators.getArmAngleMotor().set(speed);\n\t\t\t\t// } else if (!(/*\n\t\t\t\t// * Actuators.getArmAngleMotor().getPosition() <\n\t\t\t\t// * MIN_ARM_POSITION &&\n\t\t\t\t// */\n\t\t\t\t// Sensors.getArmMinLimitSwitch().get()) && speed < 0) {\n\t\t\t\t// Actuators.getArmAngleMotor().set(speed);\n\t\t\t\t// } else {\n\t\t\t\t// Actuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\n\t\t\t\t//\n\t\t\t\t// }\n\t\t\t}\n\t\t}\n\t}", "public Arm() {\n initializeLogger();\n initializeCurrentLimiting();\n setBrakeMode();\n encoder.setDistancePerPulse(1.0/256.0);\n lastTimeStep = Timer.getFPGATimestamp();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\t//For some reason, right is inverted in auto instead of left\n\t\tString start = autonomousCommand; //from smartDashboard\n\t\t//String start = \"R\";//R for right, FR for far right, L for far left\n\t\t//Starting Far Right\n\t\tif (start == \"FR\") {\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t//Go forward for 5 seconds\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t//stop going\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (start == \"R\") {\n\t\t\t//Starting on the right, aligned with the switch\n\t\t\tif(autoStep==0) {\n\t\t\t\tif (timer.get() < 2) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'R') {\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 15 && timer.get() > 7) {\n\t\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t}\n\t\t}\n\t\telse if (start == \"L\") {\n\t\t//This is for starting on the far left\n\t\t\tif(autoStep == 0) {\n\t\t\t\tif (timer.get() < 2.5) {\n\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t}\n\t\t\t\tif(gameData.charAt(0) == 'L') {/**Change this to R if we start on the right side, comment out if we're on the far right or left side**/\n\t\t\t\t\trotateTo(270);\n\t\t\t\t\tif (timer.get()>3 && timer.get()<4) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif(timer.get()< 4) {\n\t\t\t\t\t\tmotorLift.set(.25);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorLift.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (timer.get() < 7 && timer.get() > 4) {\n\t\t\t\t\t\tmotorGL.set(1);\n\t\t\t\t\t\tmotorGR.set(-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorGL.set(0);\n\t\t\t\t\t\tmotorGR.set(0);\n\t\t\t\t\t}\n\t\t\t\t\tautoStep++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Default Code\n\t\t\tif (true) {\n\t\t\t\tif(autoStep==0) {\n\t\t\t\t\tif (timer.get() < 3) {\n\t\t\t\t\t\tmotorRB.set(-0.5);\n\t\t\t\t\t\tmotorRF.set(-0.5);\n\t\t\t\t\t\tmotorLB.set(0.5);\n\t\t\t\t\t\tmotorLF.set(0.5);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmotorRB.set(0);\n\t\t\t\t\t\tmotorRF.set(0);\n\t\t\t\t\t\tmotorLB.set(0);\n\t\t\t\t\t\tmotorLF.set(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void correctParameter(){\n \tint ifObtuse;\r\n \tif(initialState.v0_direction>90)ifObtuse=1;\r\n \telse ifObtuse=0;\r\n \tdouble v0=initialState.v0_val;\r\n \tdouble r0=initialState.r0_val;\r\n \tdouble sintheta2=Math.sin(Math.toRadians(initialState.v0_direction))*Math.sin(Math.toRadians(initialState.v0_direction));\r\n \tdouble eccentricityMG=Math.sqrt(center.massG*center.massG-2*center.massG*v0*v0*r0*sintheta2+v0*v0*v0*v0*r0*r0*sintheta2);\r\n \tdouble cosmiu0=-(v0*v0*r0*sintheta2-center.massG)/eccentricityMG;\r\n \tpe=(v0*v0*r0*r0*sintheta2)/(center.massG+eccentricityMG);\r\n \tap=(v0*v0*r0*r0*sintheta2)/(center.massG-eccentricityMG);\r\n \tsemimajorAxis=(ap+pe)/2;\r\n \tsemiminorAxis=Math.sqrt(ap*pe);\r\n \tsemifocallength=(ap-pe)/2;\r\n \tSystem.out.println(semimajorAxis+\",\"+semiminorAxis+\",\"+semifocallength);\r\n \teccentricity=eccentricityMG/center.massG;\r\n \tperiod=2*Math.PI*Math.sqrt(semimajorAxis*semimajorAxis*semimajorAxis/(center.massG));\r\n \trotate=(360-Math.toDegrees(Math.acos(cosmiu0)));\r\n \torbitCalculator.angleDelta=(Math.toDegrees(Math.acos(cosmiu0))+360);\r\n \trotate=rotate+initialState.r0_direction;\r\n \t\r\n \tif(ifObtuse==1) {\r\n \t\tdouble rbuf=rotate;\r\n \t\trotate=initialState.r0_direction-rotate;\r\n \t\torbitCalculator.angleDelta+=(2*rbuf-initialState.r0_direction);\r\n \t}\r\n \tfor(;;) {\r\n \t\tif(rotate>360)rotate=rotate-360;\r\n \t\telse break;\r\n \t}\r\n \tfor(;;) {\r\n \t\tif(rotate<0)rotate=rotate+360;\r\n \t\telse break;\r\n \t}\r\n \t/*\r\n \tpe=initialState.r0_val;\r\n rotate=initialState.r0_direction;\r\n ap=(initialState.v0_val*initialState.v0_val*pe*pe)/(2*center.massG-initialState.v0_val*initialState.v0_val*pe);\r\n peSpeed=initialState.v0_val;\r\n apSpeed=(2*center.massG-initialState.v0_val*initialState.v0_val*pe)/(initialState.v0_val*pe);\r\n if(ap<pe){\r\n double lf=ap;ap=pe;pe=lf;\r\n lf=apSpeed;apSpeed=peSpeed;peSpeed=lf;\r\n }\r\n semimajorAxis=(ap+pe)/2;\r\n semifocallength=(ap-pe)/2;\r\n semiminorAxis=Math.sqrt(ap*pe);\r\n eccentricity=semifocallength/semimajorAxis;\r\n period=2*Math.PI*Math.sqrt(semimajorAxis*semimajorAxis*semimajorAxis/(center.massG));*/\r\n }", "@Override\n public void loop() {\n rightArm.setTargetPosition((int)(.125* TICKS_PER_WHEEL_ROTATION*8));\n leftArm.setTargetPosition((int)(.125* TICKS_PER_WHEEL_ROTATION*8));\nrightArm.setPower(.6);\nleftArm.setPower(.6);\nif(runtime.seconds()>4&& stage==-1){\n stage++;\n}\n// telemetry.addData(\"IsAligned\" , detector.getAligned()); // Is the bot aligned with the gold mineral?\n// telemetry.addData(\"X Pos\" , detector.getXPosition()); // Gold X position.\n\n //Point screenpos = detector.getScreenPosition();\n if(stage==0) {\n Rect bestRect = detector.getFoundRect();\n\n double xPos = bestRect.x + (bestRect.width / 2);\n\n if (xPos < alignXMax && xPos > alignXMin) {\n aligned = true;\n } else {\n aligned = false;\n }\n telemetry.addData(\"aligned \", aligned);\n\n telemetry.addData(\"xpos \", xPos);\n telemetry.addData(\"amax \", alignXMax);\n telemetry.addData(\"amin \", alignXMin);\n if(!(xPos>0)){\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n telemetry.addLine(\"not detected\");\n }\n else if (xPos > alignXMax) {\n double power = ((xPos - alignXMax) / scale) * .3 + .4;\n rightWheel.setPower(power);\n leftWheel.setPower(-power);\n telemetry.addData(\"powL: \", power);\n telemetry.addLine(\"turning left\");\n runtime.reset();\n } else if (xPos < alignXMin) {\n double power = ((alignXMin - xPos) / scale) * .3 + .4;\n rightWheel.setPower(-power);\n leftWheel.setPower(power);\n telemetry.addData(\"powR: \", power);\n telemetry.addLine(\"turning right\");\n runtime.reset();\n } else {\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n telemetry.addLine(\"found\");\n telemetry.addData(\"secks: \", runtime.seconds());\n if(runtime.seconds()>.1){\n runtime.reset();\n stage++;\n resetDriveEncoders();\n }\n }\n\n\n }\n else if (stage==1){\n rightWheel.setTargetPosition(-3*TICKS_PER_WHEEL_ROTATION);\n leftWheel.setTargetPosition(-3*TICKS_PER_WHEEL_ROTATION);\n leftWheel.setPower(.5);\n rightWheel.setPower(.5);\n if(runtime.seconds()>5){\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n }\n\n }\n\n\n telemetry.addData(\"stage: \", stage);\n telemetry.update();\n }", "public void openArms() {\n\t\tleftArmMotor.setSpeed(100);\n\t\trightArmMotor.setSpeed(100);\n\t\t\n\t\trightArmMotor.rotate(-80, true);\n\t\tleftArmMotor.rotate(-80, false);\n\t}", "public void calibrateTime(TimeCalibrator calibrator) {\n\t\ttimestamp = calibrator.getCalibratedTime(timestamp);\n\t}", "@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 void init(HardwareMap hwMap) {\r\n\r\n //DRIVE//\r\n front_left = hwMap.dcMotor.get(\"front_left\");\r\n front_right = hwMap.dcMotor.get(\"front_right\");\r\n back_left = hwMap.dcMotor.get(\"back_left\");\r\n back_right = hwMap.dcMotor.get(\"back_right\");\r\n\r\n hook = hwMap.dcMotor.get(\"hook\");\r\n\r\n //intake1 = hwMap.servo.get(\"intake1\");\r\n //intake2 = hwMap.servo.get(\"intake2\");\r\n //intake3 = hwMap.servo.get(\"intake3\");\r\n //intake4 = hwMap.servo.get(\"intake4\");\r\n\r\n phone = hwMap.servo.get(\"phone\");\r\n marker = hwMap.servo.get(\"marker\");\r\n\r\n //linSlide1 = hwMap.dcMotor.get(\"lin_slide1\");\r\n //linSlide2 = hwMap.dcMotor.get(\"lin_slide2\");\r\n\r\n //arm_motor_1 = hwMap.dcMotor.get(\"arm1\");\r\n //arm_motor_2 = hwMap.dcMotor.get(\"arm2\");\r\n\r\n\r\n front_left.setDirection(DcMotor.Direction.FORWARD);\r\n front_right.setDirection(DcMotor.Direction.FORWARD);\r\n back_left.setDirection(DcMotor.Direction.REVERSE);\r\n back_right.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n /* front_left.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n front_right.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n back_left.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n back_right.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n */\r\n hook.setDirection(DcMotor.Direction.FORWARD);\r\n\r\n //linSlide1.setDirection(DcMotor.Direction.FORWARD);\r\n //linSlide1.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n //arm_motor_1.setDirection(DcMotor.Direction.FORWARD);\r\n //arm_motor_2.setDirection(DcMotor.Direction.REVERSE);\r\n\r\n front_left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n front_right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n back_left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n back_right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\r\n\r\n //encoder1 = hwMap.analogInput.get(\"encoder1\");\r\n //encoder2 = hwMap.analogInput.get(\"encoder2\");\r\n\r\n imu = hwMap.get(BNO055IMU.class, \"imu\");\r\n }", "protected void initialize() {\n\t\tRobot._driveTrain.setAuton(true);\n\t\tRobot._driveTrain.clearEncoder();\n\t\tRobot._driveTrain.clearGyro();\n\t\tdistanceToCenter = SmartDashboard.getNumber(\"toteOffset\", 0);\n\t\tif (Robot._pneumatics.getArms() != DoubleSolenoid.Value.kReverse) {\n\t\t\tRobot._pneumatics.setArms(DoubleSolenoid.Value.kReverse);\n\t\t}\n\t}", "private void resetAngles() {\n \ttorso_front.rotateAngleX = 0;\n \tleg_front_left.rotateAngleX = leg_front_right.rotateAngleX = 0;\n \tleg_front_left.rotateAngleY = leg_front_right.rotateAngleY = 0;\n \tleg_front_left.rotateAngleZ = leg_front_right.rotateAngleZ = 0;\n \tleg_back_left.rotateAngleX = leg_front_left.rotateAngleX;\n \tleg_back_right.rotateAngleX = leg_front_right.rotateAngleX;\n \tleg_back_right.rotateAngleY = leg_back_left.rotateAngleY = 0;\n \tleg_back_right.rotateAngleZ = leg_back_left.rotateAngleZ = 0;\n\t\tknee_front_left.rotateAngleX = knee_front_right.rotateAngleX = 0;\n\t\tknee_back_left.rotateAngleX = knee_back_right.rotateAngleX = 0;\n\t\ttail_stub.rotateAngleX = -1.05f;\n\t\ttail_segment_1.rotateAngleX = 1.1f;\n\t\ttail_segment_2.rotateAngleX = tail_segment_3.rotateAngleX = 0;\n\t\tneck.rotateAngleX = 0.17453292519943295f;\n }", "@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 }", "public static void runArm() {\r\n\t\t\tsynchronized(ArmClawInfo.clawLock) {\r\n\t\t\t\tsynchronized(armStage1.motorLock) {\r\n//\t\t\t\t\tsynchronized(armStage2.motorLock) {\r\n\t\t\t\t\t\tPrtYn flag = PrtYn.N;\r\n\t\t\t\t\t\tif(Tm744Opts.isInSimulationMode()) { flag = PrtYn.Y; }\r\n\t\t\t\t\t\tString stg1StatusStr;\r\n//\t\t\t\t\t\tString stg2StatusStr;\r\n\t\t\t\t\t\tDsNamedControlsEntry ent = armStage1.jsNamedControl.getEnt();\r\n\t\t\t\t\t\tdouble jsRdg = ent.getAnalog();\r\n\t\t\t\t\t\tif(Math.abs(jsRdg)>0.1) {\r\n\t\t\t\t\t\t\tint junk = 5; //good breakpoint\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tstg1StatusStr = stageStatusStr(armStage1);\r\n//\t\t\t\t\t\tstg2StatusStr = stageStatusStr(armStage2);\r\n\t\t\t\t\t\tif( ! (stg1StatusStr.equals(prevStg1StatusStr) )) { //&& stg2StatusStr.equals(prevStg2StatusStr))) {\r\n\t\t\t\t\t\t\tP.println(flag, \"(A)stg1: \" + stg1StatusStr);\r\n//\t\t\t\t\t\t\tP.println(flag, \"(A)stg2: \" + stg2StatusStr);\r\n\t\t\t\t\t\t\tprevStg1StatusStr = stg1StatusStr;\r\n//\t\t\t\t\t\t\tprevStg2StatusStr = stg2StatusStr;\r\n\t\t\t\t\t\t}\r\n//\t\t\t\t\t\tTmSdMgr.putString(SdKeysE.KEY_ARM_STAGE1_OPERATING_MODE, armStage1.operatingMode.name());\r\n\t\t\t\t\t\tswitch(armStage1.operatingMode) {\r\n\t\t\t\t\t\tcase JOYSTICK:\r\n\t\t\t\t\t\t\trunLiftStageFromJoystick(armStage1);\r\n\t\t\t\t\t\t\tif(true) {\r\n\t\t\t\t\t\t\t\t//nearTop and nearBottom methods check useEncoder flag\r\n\t\t\t\t\t\t\t\tif(armStage1.isMotorPercentOutMovingUpRapidly() && armStage1.isEncoderNearTop()) {\r\n\t\t\t\t\t\t\t\t\tArmServices.idleAllLiftMotors();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(armStage1.isMotorPercentOutMovingDownRapidly() && armStage1.isEncoderNearBottom()) {\r\n\t\t\t\t\t\t\t\t\tArmServices.idleAllLiftMotors();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase SERVO:\r\n\t\t\t\t\t\t\tif(armStage1.useEncoder || m_tds.isEnabledAutonomous()) {\r\n\t\t\t\t\t\t\t\trunStageInServoMode(armStage1, Cnst.ARM_STAGE1_ENCODER_ADJUSTMENT_COUNT);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tarmStage1.operatingMode = ArmOperate.OperatingModesE.JOYSTICK;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase IDLE:\r\n\t\t\t\t\t\tcase STOPPED:\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t//assume 'request' methods set the motors to the appropriate values\r\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\r\n\t\t\t\t\t\t}\t\r\n\r\n\t\t\t\t\t\tstg1StatusStr = stageStatusStr(armStage1);\r\n\t\t\t\t\t\t//\t\t\t\t\t\tstg2StatusStr = stageStatusStr(armStage2);\r\n\t\t\t\t\t\tif( ! (stg1StatusStr.equals(prevStg1StatusStr) )) { //&& stg2StatusStr.equals(prevStg2StatusStr))) {\r\n\t\t\t\t\t\t\tP.println(flag, \"(B)stg1: \" + stg1StatusStr);\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tP.println(flag, \"(B)stg2: \" + stg2StatusStr);\r\n\t\t\t\t\t\t\tprevStg1StatusStr = stg1StatusStr;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tprevStg2StatusStr = stg2StatusStr;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(m_tds.isEnabledAutonomous()) {\r\n\t\t\t\t\t\t\tswitch(ArmClawInfo.clawCurrentState) {\r\n\t\t\t\t\t\t\tcase BY_JOYSTICK:\r\n\t\t\t\t\t\t\t\tif(m_tds.isEnabledAutonomous()) {\r\n\t\t\t\t\t\t\t\t\tdouble percOut = 0.0;\r\n\t\t\t\t\t\t\t\t\tArmClawInfo.clawMtrLeft.set(ControlMode.PercentOutput, percOut);\r\n\t\t\t\t\t\t\t\t\tArmClawInfo.clawMtrRight.set(ControlMode.PercentOutput, -percOut);\r\n\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\telse if(m_tds.isEnabledTeleop()) {\r\n\t\t\t\t\t\t\t\t\tdouble joystickRdg = DsNamedControlsE.ARM_CLAW_RUN_WITH_JOYSTICK_INPUT.getEnt().getAnalog();\r\n\t\t\t\t\t\t\t\t\tif(joystickRdg == 0.0) {} //just a good debug breakpoint\r\n\r\n\t\t\t\t\t\t\t\t\t//squaring makes joysticks easier to use\r\n\t\t\t\t\t\t\t\t\tdouble percOut = - Math.copySign(joystickRdg*joystickRdg, joystickRdg);\r\n\t\t\t\t\t\t\t\t\tArmClawInfo.clawMtrLeft.set(ControlMode.PercentOutput, percOut);\r\n\t\t\t\t\t\t\t\t\tArmClawInfo.clawMtrRight.set(ControlMode.PercentOutput, -percOut);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase GRABBING:\r\n\t\t\t\t\t\t\tcase RELEASING:\r\n\t\t\t\t\t\t\tcase OFF:\r\n\t\t\t\t\t\t\t\t//assume 'request' methods set the motors to the appropriate values\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\trunArmClawLiftWheelsTeleop();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tpostLimitSwitchRdgsToSd();\r\n\t\t\t\t\t\t//\t\t\t\t\t} //sync for stg2\r\n\t\t\t\t} //sync for stg1\r\n\t\t\t} // sync claw\r\n\t\t}", "public void go_to_base_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_base, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n // Extend the arm after getting to the base position\n Dispatcher.get_instance().add_job(new JRunnable(() -> Pneumatics.get_instance().set_solenoids(true), this));\n hold_arm();\n }", "private static void turnAwayFromWall() {\n while (true) {\n if (readUsDistance() > OPEN_SPACE) {\n leftMotor.stop();\n rightMotor.stop();\n // re-calibrate theta, offset will be added to this angle\n odometer.setTheta(0);\n System.out.println(\"starting localization...\");\n prevDist = 255;\n dist = prevDist;\n break;\n }\n }\n }", "protected void ratCrewInit() {\n\n // Init motor state machine.\n motorTurnType = \"none\";\n motorTurnDestination = 0.0f;\n motorTurnAngleToGo = 0.0f;\n motorTurnAngleAdjustedToGo = 0.0f;\n isDriving = false;\n driveLeftStart = 0;\n driveRightStart = 0;\n driveLeftTarget = 0;\n driveRightTarget = 0;\n driveRightSpeed = 0.0f;\n driveLeftSpeed = 0.0f;\n driveAngleOffset = 0.0f;\n driveAngleCorrection = 0.0f;\n\n // TODO: push into initMotor function\n if (doMotors) {\n // Initialize Motors, finding them through the hardware map.\n leftDrive = hardwareMap.get(DcMotor.class, \"motorLeft\");\n rightDrive = hardwareMap.get(DcMotor.class, \"motorRight\");\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n // initialize the encoder\n leftDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightDrive.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n leftDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n // Set all motors to zero power.\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n\n gate = hardwareMap.get(Servo.class, \"Gate\");\n gate.setPosition(1.0);\n }\n initGyroscope();\n\n if (doVuforia){\n initVuforia();\n initTfod();\n\n if (tfod != null) {\n tfod.activate();\n\n // The TensorFlow software will scale the input images from the camera to a lower resolution.\n // This can result in lower detection accuracy at longer distances (> 55cm or 22\").\n // If your target is at distance greater than 50 cm (20\") you can adjust the magnification value\n // to artificially zoom in to the center of image. For best results, the \"aspectRatio\" argument\n // should be set to the value of the images used to create the TensorFlow Object Detection model\n // (typically 1.78 or 16/9).\n\n // Uncomment the following line if you want to adjust the magnification and/or the aspect ratio of the input images.\n tfod.setZoom(2.5, 1.78);\n }\n }\n\n // Init run state.\n madeTheRun = false;\n startTime = 0;\n telemetry.addData(\"Init\", \"motors=%b, gyro=%b, vuforia=%b\", doMotors, doGyro, doVuforia);\n telemetry.update();\n }", "public void reviseMotorSpeed() {\n\t\tmHandler.removeMessages(EVAL_MOTOR_SPEED);\n\t\tlong starttime = System.currentTimeMillis();\n\n\t\t//Retrieve current orientation.\t\t\n\t\t\n\t\tmAzimuth = mStatus.getReadingField(AZIMUTH);\t\t\n\t\tmPitchDeg = mStatus.getReadingField(PITCH);\n\t\tmRollDeg = -mStatus.getReadingField(ROLL);\n\t\t\n\t\tdouble[] errors = new double[4];\n\t\tsynchronized (mAngleTarget) {\n\t\t\t//logArray(\"mAngleTarget\", mAngleTarget);\n\t\t\terrors[0] = mAngleTarget[0] - mRollDeg;\n\t\t\terrors[1] = mAngleTarget[1] - mPitchDeg;\n\t\t\terrors[2] = mAngleTarget[2] - mStatus.getGpsField(dALT);\n\t\t\terrors[3] = mAngleTarget[3] - mAzimuth;\n\t\t\t//logArray(\"errors\", errors);\n\t\t}\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tString errs = \"errors: \";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\terrs += errors[i] + \": \";\n\t\t}\n\t\t//Log.v(TAG, errs);\n\t\t//For azimuth, multiple possibilities exist for error, each equally valid; but only the error nearest zero makes practical sense.\n\t\tif (errors[3] > 180.0)\n\t\t\terrors[3] -= 360.0;\n\t\tif (errors[3] < -180.0)\n\t\t\terrors[3] += 360.0;\n\t\t\n\t\t\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t//Calculate proportional errors\n\t\t\tdouble err = errors[i];//mTarget[i] - mCurrent[i];\n\t\t\t\n\n\t\t\t//Calculate derivative errors.\n\t\t\tlong timeInterval = starttime - mLastUpdate;\n\t\t\tif (timeInterval != 0) {\n\t\t\t\tmErrors[i][2] = (err - mErrors[i][0]) * 1000.0 / timeInterval;\n\t\t\t} else {\n\t\t\t\tmErrors[i][2] = 0.0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Mark proportional error\n\t\t\tmErrors[i][0] = err;\n\t\t\t/*if (i == 2)\n\t\t\t\tLog.v(TAG, \"guid, dalt err is \" + err);*/\n\t\t\t//Update integral errors\n\t\t\tmErrors[i][1] -= mIntegralErrors[i][mIntegralIndex];\n\t\t\tmIntegralErrors[i][mIntegralIndex] = err;\n\t\t\tmErrors[i][1] += err;\n\t\t\tmIntegralIndex = ++mIntegralIndex % PIDREPS;\n\t\t\t\n\t\t\t//Calculate changes in output\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tmControlVars[i] += mErrors[i][j] * mGain[i][j];\n\t\t\t}\n\t\t}\n\t\tif (mGuidanceMode.get() == MANUAL) {\n\t\t\tsynchronized (mAngleTarget) {\n\t\t\t\tmControlVars[2] = mAngleTarget[2];\n\t\t\t}\n\t\t}\n\t\tmLastUpdate = starttime;\n\t\t\n\t\t// Constrain control vars:\n\t\tmControlVars[0] = constrainValue(mControlVars[0], -1, 1);\n\t\tmControlVars[1] = constrainValue(mControlVars[1], -1, 1);\n\t\tmControlVars[2] = constrainValue(mControlVars[2], 0, 1);\n\t\tmControlVars[3] = constrainValue(mControlVars[3], -2, 2);\n\t\t\n\t\t/*String vars = \"Control vars: \";\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tvars += mControlVars[i] + \": \";\n\t\t}\n\t\tLog.v(TAG, vars);*/\n\t\t\n\t\tcontrolVarsToMotorSpeeds();\n\t\t\n\t\t//Send motor values to motors here:\n\t\tupdateMotors();\n\t\tupdateAngleTarget();\n\t\t//Log.v(TAG, \"motors: \" + mMotorSpeed[0] + \", \" + mMotorSpeed[1] + \", \" + mMotorSpeed[2] + \", \" + mMotorSpeed[3]);\n\t\t//Sleep a while\n\t\tlong timetonext = (1000 / PIDREPS) - (System.currentTimeMillis() - starttime);\n\t\t//Log.v(TAG, \"time to next: \" + timetonext);\n\t\tint currentMode = mGuidanceMode.get();\n\t\tif ((currentMode == MANUAL) || (currentMode == AUTOPILOT)) {\n\t\t\tif (timetonext > 0)\n\t\t\t\tmHandler.sendEmptyMessageDelayed(EVAL_MOTOR_SPEED, timetonext);\n\t\t\telse {\n\t\t\t\tLog.e(TAG, \"Guidance too slow\");\n\t\t\t\tmHandler.sendEmptyMessage(EVAL_MOTOR_SPEED);\n\t\t\t}\n\t\t}\n\t}", "void atras(){\n\t\tMotorA.stop();\n\t\tMotorB.setSpeed(700);\n\t\tMotorC.setSpeed(700);\n\t\t\n\t\tMotorB.backward();\n\t\tMotorC.backward();\n\t}", "void finishCalibration();", "@Override\n public void start() {\n\n runtime.reset();\n currentSpeedRight = 0.0;\n currentSpeedLeft = 0.0;\n // currentSpeedArm = 0.0;\n currentLiftSpeed = 0.0;\n robot.rearTouch.setMode(DigitalChannel.Mode.INPUT);\n }", "@Override\r\n\tpublic void acelerar() {\n\t\tSystem.out.println(\"Acelerar motor electrico adaptador\");\r\n\t\tthis.motorElectrico.moverMasRapido();\r\n\t}", "protected void initialize() {\n\t\t// startAngle = drive.getAngle();\n\t\tdrive.resetBothEncoders();\n\t\tpLeft = speed;\n\t\tpRight = speed;\n\t}", "@Override\n public void init() {\n // Get references to dc motors and set initial mode and direction\n // It appears all encoders are reset upon robot startup, but just in case, set all motor\n // modes to Stop-And-Reset-Encoders during initialization.\n motorLeftA = hardwareMap.dcMotor.get(MOTOR_DRIVE_LEFT_A);\n motorLeftA.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorLeftA.setDirection(DcMotor.Direction.FORWARD);\n\n motorLeftB = hardwareMap.dcMotor.get(MOTOR_DRIVE_LEFT_B);\n motorLeftB.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorLeftB.setDirection(DcMotor.Direction.FORWARD);\n\n motorRightA = hardwareMap.dcMotor.get(MOTOR_DRIVE_RIGHT_A);\n motorRightA.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRightA.setDirection(DcMotor.Direction.REVERSE);\n\n motorRightB = hardwareMap.dcMotor.get(MOTOR_DRIVE_RIGHT_B);\n motorRightB.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRightB.setDirection(DcMotor.Direction.REVERSE);\n\n //motorGlyphLift = hardwareMap.dcMotor.get(GLYPH_LIFT);\n //motorGlyphLift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n //motorGlyphLift.setDirection(DcMotor.Direction.FORWARD);\n\n sGlyphL = hardwareMap.servo.get(GLYPH_LEFT);\n //sGlyphL.scaleRange(0,180);\n\n sGlyphR = hardwareMap.servo.get(GLYPH_RIGHT);\n sGem = hardwareMap.servo.get(Gem);\n\n //Initialize vex motor\n sGLift = hardwareMap.crservo.get(Servo_GlyphLift);\n\n //sGLift.setPower(0);\n\n //sGLift2 = hardwareMap.servo.get(Servo_GlyphLift);\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n imu = hardwareMap.get(BNO055IMU.class,\"imu\");\n imu.initialize(parameters);\n\n //servoGlyph1.setPosition(180);\n //servoGlyph2.setPosition(180);\n\n bDirection = true;\n }", "public void update()\n {\n // always roatating time by 7 for fixed point calculation\n x = (velocity*cos(theta) *time) >> 21;\n int yFirstPart = (int)(velocity*sin(theta)*time) >> 21;\n int ySecondPart = (int)((g*time*time) >> 15);\n y = yFirstPart - ySecondPart;\n y =initialY - y;\n x= x + initialX;\n time+= updateSpeed;\n if(lastY == -1)\n {\n lastY = y;\n }else{\n int direction = lastY - y;\n if(lastDirection == -1)\n {\n lastDirection = direction;\n }else{\n if(lastDirection != 0 && direction != 0)\n {\n \n int signOfDirection = lastDirection / Math.abs(lastDirection);\n int signOfLastDirection = direction / Math.abs(direction);\n if(signOfDirection != signOfLastDirection)\n {\n if(!reachedTop)\n {\n onTop();\n reachedTop = true;\n }\n \n setIsOnHalf(true);\n }\n }\n lastY = y;\n }\n \n }\n }", "public interface ArmController {\n\n /**\n * Applies a rotational force to the arm base.\n *\n * @param force The rotational force to apply at the arm base. This is not currently supported.\n * @see ArmBase#setRotationalForce(double)\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.8883&rep=rep1&type=pdf>Learning to control an octopus arm with gaussian process temporal difference methods</a>\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.137.7975&rep=rep1&type=pdf>Dynamic model of the octopus arm: Biomechanics of the octopus reaching movement.</a>\n */\n public void applyRotationForce(double force);\n\n /**\n * Applies a contraction force to the dorsal muscle of segment(i).\n *\n * @param i The index of the segment being activated\n * @param force The contraction force to be applied\n * @see ArmSegment#setDorsalContraction(double)\n * @see Muscle#setContraction(double)\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.8883&rep=rep1&type=pdf>Learning to control an octopus arm with gaussian process temporal difference methods</a>\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.137.7975&rep=rep1&type=pdf>Dynamic model of the octopus arm: Biomechanics of the octopus reaching movement.</a>\n */\n public void contractDorsalMuscle(int i, double force);\n\n /**\n * Applies a contraction force to the transverse muscle of segment(i).\n *\n * @param i The index of the segment being activated.\n * @param force The contraction force to be applied.\n * @see ArmSegment#setTransverseContraction(double)\n * @see Muscle#setContraction(double)\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.8883&rep=rep1&type=pdf>Learning to control an octopus arm with gaussian process temporal difference methods</a>\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.137.7975&rep=rep1&type=pdf>Dynamic model of the octopus arm: Biomechanics of the octopus reaching movement.</a>\n */\n public void contractTransverseMuscle(int i, double force);\n\n /**\n * Applies a contraction force to the ventral muscle of segment(i).\n *\n * @param i The index of the segment being activated.\n * @param force The contraction force to be applied.\n * @see ArmSegment#setVentralContraction(double)\n * @see hyper.experiments.octopusArm.model.Muscle#setContraction(double)\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.8883&rep=rep1&type=pdf>Learning to control an octopus arm with gaussian process temporal difference methods</a>\n * @see <a href=http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.137.7975&rep=rep1&type=pdf>Dynamic model of the octopus arm: Biomechanics of the octopus reaching movement.</a>\n */\n public void contractVentralMuscle(int i, double force);\n\n}", "public void steady(){\n if(steady){\n if(!bellySwitch.get()) {\n leftMotor.set(-.3);\n rightMotor.set(-.3);\n }else {\n leftMotor.set(0);\n rightMotor.set(0);\n } \n }\n }", "public void initialize() {\n leftfrontmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n leftrearmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n rightfrontmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n rightrearmotor.setIdleMode(CANSparkMax.IdleMode.kBrake);\n\n leftfrontmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n leftrearmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n rightfrontmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n rightrearmotor.setOpenLoopRampRate(Constants.DriveBase.MotorControllers.openramprate);\n \n\n // More Motor Tunes (to occur during each initialization period):\n leftfrontmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n leftrearmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n rightfrontmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n rightrearmotor.getEncoder().setPositionConversionFactor(Constants.DriveBase.Encoders.encoderconversion);\n\n turnController.setSetpoint(Constants.DriveBase.Controllers.zero);\n turnController.setTolerance(Constants.DriveBase.Controllers.turntollerance);\n\n driveController.setSetpoint(Constants.DriveBase.Controllers.zero);\n driveController.setTolerance(Constants.DriveBase.Controllers.drivetollerance);\n\n ballTurnController.setSetpoint(Constants.DriveBase.Controllers.zero);\n ballTurnController.setTolerance(Constants.DriveBase.Controllers.balltollerance);\n\n ballDriveController.setSetpoint(Constants.DriveBase.Controllers.balldrive);\n ballDriveController.setTolerance(Constants.DriveBase.Controllers.balldrivetollerance);\n \n reset();\n }", "public void driveCorrection(double presetAngle, double throttle){\n\t\tif (RobotMap.ahrs.getAngle()-presetAngle > 1){\n\t\t\tRobotMap.talonLeft.set(throttle*.60);\n\t\t\tRobotMap.talonRight.set(throttle);\n\t\t}else if(RobotMap.ahrs.getAngle()-presetAngle<-1){\n\t\t\tRobotMap.talonLeft.set(throttle);\n\t\t\tRobotMap.talonRight.set(throttle*.60);\n\t\t}else{\n\t\t\tRobotMap.talonLeft.set(throttle);\n\t\t\tRobotMap.talonRight.set(throttle);\n\t\t}\n\t}", "private void setArmorPoint (int arm)\r\n {\r\n if (arm < 1 || arm >25)\r\n {\r\n armorPoint = 1;\r\n }\r\n else\r\n {\r\n armorPoint = arm;\r\n }\r\n }", "void base_case() {\n down_angle=Math.abs(down_angle);\n up_angle=Math.abs(up_angle);\n distance_from_object = human_length / Math.tan(Math.toRadians(down_angle));\n length_of_object = human_length + Math.tan(Math.toRadians(up_angle)) * distance_from_object;\n if(length_of_object/100>0) {\n ORI.setText(\"length_of_object :\\n\" + String.valueOf(String.format(\"%.2f\", (length_of_object / 100)) + \" M\" +\n \"\\n\" + \"distance_from_object :\\n\" + String.valueOf(String.format(\"%.2f\", (distance_from_object / 100))) + \" M\"));\n ORI.setVisibility(View.VISIBLE);\n }\n else {\n Toast.makeText(Online.this, \"Move Forward\", Toast.LENGTH_LONG).show();\n down_angle = 0;\n up_angle = 0;\n touch_ground_switch.setVisibility(View.VISIBLE);\n }\n\n\n }", "@Override\n public void autonomousInit()\n {\n System.out.println(\"Initializing autonomous mode...\");\n\n // zero arm encoder only in autonomous\n //cargoArm.zeroEncoder();\n\n commonInit();\n\n // move hatch finger down\n \n hatchArm.fingerSentDown = false;\n hatchArm.toggleFinger();\n\n System.out.println(\"Autonomous initialization complete.\");\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 }", "@Override\n public final void onSensorChanged(SensorEvent event) {\n linearAccelerations = event.values;\n linearAccelerations[0] = linearAccelerations[0]-xOff;\n linearAccelerations[1] = linearAccelerations[1]-yOff;\n linearAccelerations[2] = linearAccelerations[2]-zOff;\n xAccel = (float) round(linearAccelerations[0]/9.8, 3);\n yAccel = (float) round(linearAccelerations[1]/9.8, 3);\n zAccel = (float) round(linearAccelerations[2]/9.8, 3);\n// Log.i(appLabel, \"Acceleration: (\"+xAccel+\", \"+yAccel+\", \"+zAccel+\")\");\n xAccelSquared = (float) round(xAccel*xAccel, 3);\n yAccelSquared = (float) round(yAccel*yAccel, 3);\n zAccelSquared = (float) round(zAccel*zAccel, 3);\n //If they are negative accelerations, squaring them will have made them positive\n if (xAccel < 0) {\n xAccelSquared = xAccelSquared*-1;\n }\n if (yAccel < 0) {\n yAccelSquared = yAccelSquared*-1;\n }\n if (zAccel < 0) {\n zAccelSquared = zAccelSquared*-1;\n }\n xAccelOutput.setText(String.valueOf(xAccel));\n yAccelOutput.setText(String.valueOf(yAccel));\n zAccelOutput.setText(String.valueOf(zAccel));\n// Log.i(appLabel, \"Acceleration squares: \"+xAccelSquared+\", \"+yAccelSquared+\", \"+zAccelSquared);\n float accelsSum = xAccelSquared+yAccelSquared+zAccelSquared;\n double accelsRoot;\n if (accelsSum < 0) {\n accelsSum = accelsSum * -1;\n accelsRoot = Math.sqrt(accelsSum) * -1;\n } else {\n accelsRoot = Math.sqrt(accelsSum);\n }\n// Log.i(appLabel, \"Acceleration squares sum: \"+accelsSum);\n// Log.i(appLabel, \"Acceleration sqrt:\"+accelsRoot);\n cAccel = (float) round(accelsRoot, 3);\n// Log.i(appLabel, \"Net Acceleration: \"+cAccel);\n //Store the maximum acceleration\n if (cAccel > maxAccel) {\n maxAccel = cAccel;\n }\n accelOutput.setText(String.valueOf(cAccel));\n if (isRunning) {\n setSpeed();\n }\n if (speed >= 60) {\n timeToSixty = seconds;\n timeToSixtyOutput.setText(String.valueOf(timeToSixty));\n stopTimer();\n }\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 }", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "protected void initialize() {\n \t//Robot.getFlywheel().setRunning(!Robot.getFlywheel().running());\n \t//Robot.getElevator().setRunning(!Robot.getElevator().running());\n \tif (run == false)\n \t{\n \t\tRobot.getFlywheel().setRunning(false);\n \t\t//Robot.getIndexer().setRunning(false);\n \t\tRobot.getFlywheel().setSetpoint(0.0);\n \t\tRobot.getFlywheel().disable();\n \t\t//Robot.getIndexer().disable();\n \t\tSystem.out.println(\"not running\");\n \t}\n \telse\n \t{\n \t\tRobot.getFlywheel().initialize();\n \t\tRobot.getFlywheel().enable();\n \t\tRobot.getFlywheel().setRunning(true);\n \t\tdouble m_motorLevel;\n \t\t//m_rpms = SmartDashboard.getNumber(\"FlywheelVelocity\", 1850);\n \t//m_motorLevel = m_rpms / 6750 * 1.35;//6750 = max rpms\n \tm_motorLevel =( m_rpms + 1000) / 6750 *1.1;//6750 = max rpms\n \tRobot.getFlywheel().setSetpoint(m_rpms);\n \tRobot.getFlywheel().setExpectedMotorLevel(m_motorLevel);\n \tSmartDashboard.putNumber(\"FlywheelVelocity\", m_rpms);\n \tSystem.out.println(m_rpms + \" \" + m_motorLevel + \" setpoint: \" + Robot.getFlywheel().getSetpoint());\n \t}\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 \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n \t//stop extraneous moving parts\n }", "protected void initialize() {\n ////TEST CODE\n \tRobotMap.frontLeftTurn.set(0);\n \tRobotMap.frontRightTurn.set(0);\n \tRobotMap.backLeftTurn.set(0);\n \tRobotMap.backRightTurn.set(0);\n \t\n \t//Spin motors\n \tRobotMap.frontLeftTurn.set(85);\n \tRobotMap.frontRightTurn.set(85);\n \tRobotMap.backLeftTurn.set(85);\n \tRobotMap.backRightTurn.set(85);\n \tTimer.delay(2.75);\n \t\n \t//Stop Spin\n \tRobotMap.frontLeftTurn.set(0);\n \tRobotMap.frontRightTurn.set(0);\n \tRobotMap.backLeftTurn.set(0);\n \tRobotMap.backRightTurn.set(0);\n \tTimer.delay(2.75);\n \t\n \t//Move Back\n \tRobotMap.frontLeftDrive.set(0.2);\n \tRobotMap.frontRightDrive.set(0.2);\n \tRobotMap.backLeftDrive.set(0.2);\n \tRobotMap.backRightDrive.set(0.2); \t\n \tTimer.delay(2.75); \n \t\n \t//Stop\n \t\n \tRobotMap.frontLeftDrive.set(0);\n \tRobotMap.frontRightDrive.set(0);\n \tRobotMap.backLeftDrive.set(0);\n \tRobotMap.backRightDrive.set(0);\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 }", "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}" ]
[ "0.6952052", "0.63965183", "0.627305", "0.6260949", "0.61711174", "0.61026525", "0.6067046", "0.6044607", "0.60406965", "0.6015225", "0.5999768", "0.5942893", "0.59342426", "0.59240806", "0.59116477", "0.59068584", "0.58707136", "0.5795313", "0.5754386", "0.5753138", "0.57374334", "0.5727748", "0.5713559", "0.56993324", "0.5694836", "0.5685028", "0.5677943", "0.567752", "0.56418914", "0.5637898", "0.56218594", "0.5617438", "0.56010747", "0.5579029", "0.5569718", "0.5560879", "0.5559073", "0.55549854", "0.5554515", "0.5549252", "0.5540118", "0.5530278", "0.55274856", "0.55182034", "0.55173093", "0.55111057", "0.5500476", "0.5478056", "0.5474563", "0.5473544", "0.54732335", "0.54722434", "0.5458138", "0.54483014", "0.54462034", "0.5445283", "0.5436927", "0.5425073", "0.5423042", "0.54136133", "0.54132545", "0.5403393", "0.54015404", "0.5394635", "0.5388085", "0.5387662", "0.5385708", "0.5379367", "0.5374237", "0.5362572", "0.53529495", "0.53476703", "0.5345425", "0.53357214", "0.53351146", "0.533129", "0.5327813", "0.53265536", "0.5325806", "0.5310808", "0.53020555", "0.52974147", "0.5295935", "0.5289322", "0.528582", "0.5282809", "0.5276944", "0.52754843", "0.52718484", "0.5270782", "0.52655536", "0.5265209", "0.5263224", "0.526067", "0.52532905", "0.52510506", "0.5247933", "0.52422214", "0.52377814", "0.5221847" ]
0.72186106
0
Used to get the angle that the manipulator arm is currently in
public double getAngle() { return armMotor.getEncPosition(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double getAngle(){\n //Get a new angle measurement\n angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n //Get the difference between current angle measurement and last angle measurement\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n //Process the angle to keep it within (-180,180)\n //(Once angle passes +180, it will rollback to -179, and vice versa)\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n //Add the change in angle since last measurement (deltaAngle)\n //to the change in angle since last reset (globalAngle)\n globalAngle += deltaAngle;\n //Set last angle measurement to current angle measurement\n lastAngles = angles;\n\n return globalAngle;\n }", "private double getAngle() {\n double normal= Math.sqrt(((getgAxis(ADXL345_I2C.Axes.kX))*(getgAxis(ADXL345_I2C.Axes.kX)))+((getgAxis(ADXL345_I2C.Axes.kY))*(getgAxis(ADXL345_I2C.Axes.kY))));\n\n return MathUtils.atan(normal / getgAxis(ADXL345_I2C.Axes.kZ));\n }", "double getAngle();", "double getAngle();", "private double getAngle()\n {\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n return angles.firstAngle;\n }", "public double getAngle() {\n synchronized (this.angleLock) {\n return this.movementComposer.getOrientationAngle();\n }\n }", "private double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public double getAngle();", "public int getAngle(){\n\t\tif(!resetCoordinates()&&robot.imu1.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu1.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(!resetCoordinates()&&robot.imu.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.YZX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(resetCoordinates()){\n\t\t\tdouble oldAngle = robot.rotation.thirdAngle;\n\t\t\tdouble posAngle = oldAngle;\n\t\t\tint finalAngle;\n\t\t\tif (oldAngle < 0) posAngle = 360 - Math.abs(oldAngle);\n\t\t\tif((int) (Math.round(posAngle)) - 45 < 0){\n\t\t\t\tfinalAngle = 360-(int)Math.round(posAngle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinalAngle = (int) (Math.round(posAngle)) - 45;\n\t\t\t}\n\t\t\treturn finalAngle;\n\t\t}\n\t\telse{\n\t\t\treturn 10000;\n\t\t}\n\t}", "public double getAngle()\n {\n return (AngleAverage);\n }", "public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}", "public double getAngle() {\n if (r == 0) {\n if (i == 0)\n return 0;// error?\n if (i > 0)\n return p2;\n else\n return -p2;\n }\n double d = Math.atan(i / r);\n if (r >= 0) {\n return d;\n }\n if (i >= 0)\n return Math.PI + d;\n return d + Math.PI;\n }", "private double getAngle() {\n // We experimentally determined the Z axis is the axis we want to use for\n // heading angle. We have to process the angle because the imu works in\n // euler angles so the Z axis is returned as 0 to +180 or 0 to -180\n // rolling back to -179 or +179 when rotation passes 180 degrees. We\n // detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC,\n AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}", "public double getMyAngle() {\n return myAngle- STARTING_ANGLE;\n }", "public double getAngle ()\n {\n return angle_;\n }", "public int getCurrentAngle(){\n return flatbed.currentAngle;\n }", "public double getAngle()\n {\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return globalAngle;\n }", "public double getAngle() {\n\t\treturn this.position[2];\n\t}", "public double getAngle() { return angle; }", "public static double getAngle() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ts\").getDouble(0);\n }", "public double getAngle() {\n\t\treturn navx.getAngle();\n\t}", "public double getAngle() {\n return Math.atan2(sinTheta, cosTheta);\n }", "public int getAngle() {\r\n return angle;\r\n }", "public double currentAngle() {\n return imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES).firstAngle;\r\n }", "public double getAngle() {\n return angle;\n }", "public double getAngle() {\n return angle;\n }", "public double getAngle(){\n\t\treturn this.angle;\n\t}", "public double getAngle() {\n\t\treturn angle;\n\t}", "public double getAngle() {\n\t\treturn angle;\n\t}", "public double angle()\n {\n return Math.atan2(this.y, this.x);\n }", "public double getAngle () {\n return super.getAngle() % 360D;\n }", "public double getTargetAngle(){\n return lastKnownAngle;\n }", "public int getAngle() {\r\n\t\treturn angle;\r\n\t}", "public double getAngle() {\n try {\n switch(Coordinates.angleUnit()) {\n case Coordinates.RADIAN:\n\treturn Double.parseDouble(deg.getText().trim());\n case Coordinates.DEGRE:\n\treturn Math.PI * Double.parseDouble(deg.getText().trim()) / 180.0;\n case Coordinates.DEGMN:\n\tString d = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tString m = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\");\n case Coordinates.DEGMNSEC:\n\td = deg.getText().trim();\n\tif(d.length() == 0)\n\t d = \"0\";\n\tm = mn.getText().trim();\n\tif(m.length() == 0)\n\t m = \"0\";\n\tString s = sec.getText().trim();\n\tif(s.length() == 0)\n\t s = \"0\";\n\treturn Coordinates.parseAngle(d + \"11\" + m + \"'\" + s + \"\\\"\");\n }\n }\n catch(NumberFormatException e) {\n }\n return 0.0;\n }", "public double getAngle2() {\n\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return (globalAngle);\n\n }", "private double getRawAngle() {\n return (m_pot.getVoltage() / Constants.AIO_MAX_VOLTAGE) * Constants.Hood.POT_SCALE;\n }", "public double findAngle() {\n return 0d;\n }", "public int getAngle(){\n\t\treturn (int)angle;\n\t}", "public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}", "public double angle() {\n return Math.atan2(_y,_x);\n }", "private float calculateAngles(){\n\t\t// First we will move the current angle heading into the previous angle heading slot.\n\t\tdata.PID.headings[0] = data.PID.headings[1];\n\t\t// Then, we assign the new angle heading.\n\t\tdata.PID.headings[1] = data.imu.getAngularOrientation().firstAngle;\n\n\t\t// Finally we calculate a computedTarget from the current angle heading.\n\t\tdata.PID.computedTarget = data.PID.headings[1] + (data.PID.IMURotations * 360);\n\n\t\t// Now we determine if we need to re-calculate the angles.\n\t\tif(data.PID.headings[0] > 300 && data.PID.headings[1] < 60) {\n\t\t\tdata.PID.IMURotations++; //rotations of 360 degrees\n\t\t\tcalculateAngles();\n\t\t} else if(data.PID.headings[0] < 60 && data.PID.headings[1] > 300) {\n\t\t\tdata.PID.IMURotations--;\n\t\t\tcalculateAngles();\n\t\t}\n\t\treturn data.PID.headings[1];\n\t}", "public float getAngle() {\n return angle;\n }", "public Rotation2d getAngle() {\n // Note: This assumes the CANCoders are setup with the default feedback coefficient\n // and the sesnor value reports degrees.\n return Rotation2d.fromDegrees(canCoder.getAbsolutePosition());\n }", "public double nextAngle()\n {\n return nextAngle();\n }", "public float getAngle() {\n return angle;\n }", "public double getAngle() {\n\t\treturn Math.atan2(imaginary, real);\n\t}", "public double angle() {\n double angle = Math.toDegrees(Utilities.calculateAngle(this.dx, -this.dy));\n return angle;\n }", "public float getXAngle(){\n Point project=new Point(0,accel.y,accel.z);\n\n float angl=(float)Math.asin(project.y / project.module())* PreferenceHelper.sensetivity;\n //float angl=(float)Math.acos(accel.z/accel.module())*100f;\n if(Float.isNaN(angl)) angl=0.5f;\n return (float)(Math.rint( toFlowX(angl)/1.0) * 1.0);\n }", "public double getAngle() {\n\treturn CVector.heading(v1, v2);\n }", "public float getAngle() {\n return mAngle;\n }", "public double getStartAngle();", "public float getAzimuthAngle()\n {\n return azimuth_slider.getValue() / ANGLE_SCALE_FACTOR;\n }", "public double getAngle() {\n\t\tdouble angle = Math.atan2(imaginary, real);\n\t\tangle = fixNegativeAngle(angle);\n\n\t\treturn angle;\n\t}", "public double getAngleInDegrees() {\n return intakeAngle;\n }", "double getCalibratedLevelAngle();", "public float getAngle() {\n if(vectorAngle < 0 )\n return (float) Math.toDegrees(Math.atan(longComponent / latComponent));\n else\n return vectorAngle;\n\n }", "public double toAngle()\n\t{\n\t\treturn Math.toDegrees(Math.atan2(y, x));\n\t}", "public double getAngleToTarget(){\n return 0d;\n }", "public double ang()\n {\n \treturn Math.atan(y/x);\n }", "public float getAngle () {\n\t\treturn body.getAngle();\n\t}", "public double getGyroAngle() {\n double[] ypr = new double[3];\n gyro.GetYawPitchRoll(ypr);\n return ypr[0];\n }", "public double getYawAngle () {\n return gyro.getAngle() * Math.PI / 180; //Convert the angle to radians.\n }", "public double getPerihelionAngle() {\n return perihelionAngle;\n }", "public double findAngleOfAttack() {\n\t\tdouble dy = this.trailingPt.y - this.leadingPt.y; // trailingPt goes first since positive numbers are down\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// y-axis in Canvas\n\t\tdouble dx = this.leadingPt.x - this.trailingPt.x;\n\t\treturn Math.atan2(dy, dx);\n\t}", "public double getGryoAngle() {\n\n\t\t// Normalize the angle\n\t\tdouble angle = gyro.getAngle() % 360;\n\n\t\tif (angle < 0) {\n\t\t\tangle = angle + 360;\n\t\t}\n\n\t\treturn angle;\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 }", "public double getRotation() {\n return Degrees.atan2(y, x);\n }", "public double PlaneAngle() {\n return OCCwrapJavaJNI.Units_Dimensions_PlaneAngle(swigCPtr, this);\n }", "public double getUpperArm() {\n return upperArm;\n }", "public double passAlign() {\n \tdouble angle;\n \tif (MasterController.ourSide == TeamSide.LEFT) {\n \t\tangle = angleToX();\n \t} else {\n \t\tangle = angleToNegX();\n \t}\n \tdouble amount = -0.7 * angle;\n\t\tDebug.log(\"Angle: %f, Rotating: %f\", angle, amount);\n\t\trotate(amount); // TODO: Test if works as expected\n\t\treturn amount;\n\t}", "double getAngle(int id);", "public double getRawAngle()\n {\n double Angle = 0.0;\n\n switch (MajorAxis)\n {\n case X:\n Angle = getAngleX();\n break;\n case Y:\n Angle = getAngleY();\n break;\n case Z:\n Angle = getAngleZ();\n break;\n }\n\n return(Angle);\n }", "@Override\n\tpublic int getSteeringAngle() {\n\t\tupdateIR();\n\t\tint temp = steeringAngle;\n\t\tsteeringAngle = 0;\n\t\treturn temp;\n\t}", "public void calculateAngleAndRotate(){\n\t\tdouble cumarea = 0;\n\t\tdouble sina = 0;\n\t\tdouble cosa = 0;\n\t\tdouble area, angle;\n\t\tfor (int n = 0; n < rt.size();n++) {\n\t\t\tarea = rt.getValueAsDouble(rt.getColumnIndex(\"Area\"),n);\n\t\t\tangle = 2*rt.getValueAsDouble(rt.getColumnIndex(\"Angle\"),n);\n\t\t\tsina = sina + area*Math.sin(angle*Math.PI/180);\n\t\t\tcosa = cosa + area*Math.cos(angle*Math.PI/180);\n\t\t\tcumarea = cumarea+area;\n\t\t}\n\t\taverageangle = Math.abs(0.5*(180/Math.PI)*Math.atan2(sina/cumarea,cosa/cumarea)); // this is the area weighted average angle\n\t\t// rotate the data \n\t\tIJ.run(ActiveImage,\"Select All\",\"\");\n\t\tActiveImageConverter.convertToGray32();\n\t\tIJ.run(ActiveImage,\"Macro...\", \"code=[v= x*sin(PI/180*\"+averageangle+\")+y*cos(PI/180*\"+averageangle+\")]\");\n\t\treturn;\n\t}", "public AccOrientation calculateAngle(SensorEvent event) {\t\t\n\t final int _DATA_X = 0;\n\t final int _DATA_Y = 1;\n\t final int _DATA_Z = 2;\n\t // Angle around x-axis thats considered almost perfect vertical to hold\n\t // the device\n\t final int PIVOT = 20;\n\t // Angle around x-asis that's considered almost too vertical. Beyond\n\t // this angle will not result in any orientation changes. f phone faces uses,\n\t // the device is leaning backward.\n\t final int PIVOT_UPPER = 65;\n\t // Angle about x-axis that's considered negative vertical. Beyond this\n\t // angle will not result in any orientation changes. If phone faces uses,\n\t // the device is leaning forward.\n\t final int PIVOT_LOWER = -10;\n\t // Upper threshold limit for switching from portrait to landscape\n\t final int PL_UPPER = 295;\n\t // Lower threshold limit for switching from landscape to portrait\n\t final int LP_LOWER = 320;\n\t // Lower threshold limt for switching from portrait to landscape\n\t final int PL_LOWER = 270;\n\t // Upper threshold limit for switching from landscape to portrait\n\t final int LP_UPPER = 359;\n\t // Minimum angle which is considered landscape\n\t final int LANDSCAPE_LOWER = 235;\n\t // Minimum angle which is considered portrait\n\t final int PORTRAIT_LOWER = 60;\n\t \n\t // Internal value used for calculating linear variant\n\t final float PL_LF_UPPER =\n\t ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT_UPPER-PIVOT));\n\t final float PL_LF_LOWER =\n\t ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT-PIVOT_LOWER));\n\t // Internal value used for calculating linear variant\n\t final float LP_LF_UPPER =\n\t ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT_UPPER-PIVOT));\n\t final float LP_LF_LOWER =\n\t ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT-PIVOT_LOWER));\n\t \n\t int mSensorRotation = -1; \n\t \n\t\t\tfinal boolean VERBOSE = true;\n float[] values = event.values;\n float X = values[_DATA_X];\n float Y = values[_DATA_Y];\n float Z = values[_DATA_Z];\n float OneEightyOverPi = 57.29577957855f;\n float gravity = (float) Math.sqrt(X*X+Y*Y+Z*Z);\n float zyangle = (float)Math.asin(Z/gravity)*OneEightyOverPi;\n int rotation = -1;\n float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;\n int orientation = 90 - (int)Math.round(angle);\n AccOrientation result = new AccOrientation();\n \n while (orientation >= 360) {\n orientation -= 360;\n } \n while (orientation < 0) {\n orientation += 360;\n }\n result.orientation = orientation;\n result.angle = zyangle; \n result.threshold = 0;\n if ((zyangle <= PIVOT_UPPER) && (zyangle >= PIVOT_LOWER)) {\n // Check orientation only if the phone is flat enough\n // Don't trust the angle if the magnitude is small compared to the y value\n \t/*\n float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;\n int orientation = 90 - (int)Math.round(angle);\n normalize to 0 - 359 range\n while (orientation >= 360) {\n orientation -= 360;\n } \n while (orientation < 0) {\n orientation += 360;\n }\n mOrientation.setText(String.format(\"Orientation: %d\", orientation));\n */ \n // Orientation values between LANDSCAPE_LOWER and PL_LOWER\n // are considered landscape.\n // Ignore orientation values between 0 and LANDSCAPE_LOWER\n // For orientation values between LP_UPPER and PL_LOWER,\n // the threshold gets set linearly around PIVOT.\n if ((orientation >= PL_LOWER) && (orientation <= LP_UPPER)) {\n float threshold;\n float delta = zyangle - PIVOT;\n if (mSensorRotation == ROTATION_090) {\n if (delta < 0) {\n // Delta is negative\n threshold = LP_LOWER - (LP_LF_LOWER * delta);\n } else {\n threshold = LP_LOWER + (LP_LF_UPPER * delta);\n }\n rotation = (orientation >= threshold) ? ROTATION_000 : ROTATION_090;\n if (mShowLog) \n \tLog.v(TAG, String.format(\"CASE1. %2.4f %d %2.4f %d\", delta, orientation, threshold, rotation));\n } else {\n if (delta < 0) {\n // Delta is negative\n threshold = PL_UPPER+(PL_LF_LOWER * delta);\n } else {\n threshold = PL_UPPER-(PL_LF_UPPER * delta);\n }\n rotation = (orientation <= threshold) ? ROTATION_090: ROTATION_000;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE2. %2.4f %d %2.4f %d\", delta, orientation, threshold, rotation));\n }\n result.threshold = threshold;\n } else if ((orientation >= LANDSCAPE_LOWER) && (orientation < LP_LOWER)) {\n rotation = ROTATION_090;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE3. 90 (%d)\", orientation));\n } else if ((orientation >= PL_UPPER) || (orientation <= PORTRAIT_LOWER)) {\n rotation = ROTATION_000;\n if (mShowLog)\n \tLog.v(TAG, String.format(\"CASE4. 00 (%d)\", orientation)); \n } else {\n \tif (mShowLog)\n \t\tLog.v(TAG, \"CASE5. \"+orientation);\n }\n if ((rotation != -1) && (rotation != mSensorRotation)) {\n mSensorRotation = rotation;\n if (mSensorRotation == ROTATION_000) {\n \t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n \tif (mShowLog)\n \t\tLog.w(TAG, \"Rotation: 00\");\n }\n else if (mSensorRotation == ROTATION_090) \n {\n \t\t//setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n \tif (mShowLog)\n \t\tLog.w(TAG, \"Rotation: 90\");\n } \n }\n result.rotation = rotation;\n } else {\n \t//Log.v(TAG, String.format(\"Invalid Z-Angle: %2.4f (%d %d)\", zyangle, PIVOT_LOWER, PIVOT_UPPER));\n }\t\n return result;\n\t\t}", "float getDir() {\n return degrees(_rotVector.heading());\n }", "@Override\n\t\t\tpublic double pidGet() {\n\t\t\t\tSmartDashboard.putNumber(\"value\", Robot.driveTrain.getRobotAngle());\n\t\t\t\treturn Robot.driveTrain.getRobotAngle();\n\t\t\t}", "public double getRotation()\n\t{\n\t\tdouble determinant = this.basisDeterminant();\n\t\tTransform2D m = orthonormalized();\n\t\tif (determinant < 0) \n\t\t{\n\t\t\tm.scaleBasis(new Vector2(1, -1)); // convention to separate rotation and reflection for 2D is to absorb a flip along y into scaling.\n\t\t}\n\t\treturn Math.atan2(m.matrix[0].y, m.matrix[0].x);\n\t}", "public double getRotationAngleInRadians() {\n return Math.toRadians(rotationAngle);\n }", "public double getRotationAngle() {\n\t\treturn _rotationAngle;\n\t}", "public double getOrientation()\r\n\t{\r\n\t\treturn Math.atan2(-end.getY()+start.getY(), end.getX()-start.getX());\r\n\t}", "public void updateAngle() {\n\t\tfloat ak = 0;\n\t\tfloat gk = 0;\n\t\tak = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterX() - x);\n\t\tgk = (float) (pathBoardRectangles.get(curTargetPathCellIndex).getCenterY() - y);\n\t\tangleDesired = (float) Math.toDegrees(Math.atan2(ak*-1, gk));\n\t\t// if the angle and the angleDesired are opposites the Vector point into the opposite direction\n\t\t// this means the angle will be the angle of the longer vector which is always angle\n\t\t// so if that happens the angleDesired is offset so this won't happen\n\t\tangle = Commons.calculateAngleAfterRotation(angle, angleDesired, rotationDelay);\n\t}", "double adjust_angle_rotation(double angle) {\n double temp;\n temp=angle;\n if(temp>90) {\n temp=180-temp;\n }\n return temp;\n }", "public double getAngleXY() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.z/l);\r\n\t}", "AngleResource inclination();", "public double getTurnAngle() {\n return getTurnAngle(turnEncoder.getCount());\n }", "public double getRotation();", "public float getRotationAngle() {\n return this.mRotationAngle;\n }", "public int getGyroAngle() {\r\n \treturn (int)Math.round(gyro.getAngle());\r\n }", "public double getStartAngle() {\n return startAngle;\n }", "public static final float getAR() {\r\n\t\treturn A_R;\r\n\t}", "public Rotation2d getHeading() {\n return Rotation2d.fromDegrees(Math.IEEEremainder(gyro.getAngle(), 360) * (Const.kGyroReversed ? -1.0 : 1.0));\n }", "public double radians() {\n return Math.toRadians(this.degrees);\n }", "public String getUnitOfViewAngle() {\n \treturn \"degrees\";\n }", "EDataType getAngleDegrees();", "public float getVelAngle() {\n\t\tif (velocity.y == 0f && velocity.x == 0f)\n\t\t\treturn restrictAngle((float) Math.random() * float2pi);\n\t\tfloat result = (float) Math.atan2(velocity.y, velocity.x);\n\t\treturn restrictAngle(result);\n\t}", "public double curSwing(){\r\n return swingGyro.getAngle();\r\n }", "@Override\n public void reAngle() {\n }", "public void setAngle( double a ) { angle = a; }" ]
[ "0.7880769", "0.7811736", "0.763475", "0.763475", "0.7633363", "0.757304", "0.75458324", "0.753864", "0.7536861", "0.75295675", "0.74545", "0.7451674", "0.74511874", "0.7448276", "0.7429317", "0.7410534", "0.7397951", "0.73887736", "0.73641634", "0.7345391", "0.73337454", "0.7333015", "0.72914636", "0.7287789", "0.72718424", "0.72707134", "0.72707134", "0.7262318", "0.7220797", "0.7220797", "0.7216874", "0.7215809", "0.71887976", "0.7183014", "0.71790314", "0.71767694", "0.71604353", "0.7156505", "0.7153588", "0.715274", "0.7148247", "0.7139387", "0.7132486", "0.7112379", "0.7078693", "0.7077793", "0.7064283", "0.7039263", "0.70269275", "0.70017755", "0.6989055", "0.69685024", "0.69575924", "0.69565743", "0.69449466", "0.692974", "0.69201505", "0.68966764", "0.6887319", "0.6868352", "0.68346924", "0.6804883", "0.67922467", "0.6740863", "0.6734881", "0.6733639", "0.671808", "0.6707551", "0.670326", "0.66728944", "0.6668378", "0.6653688", "0.6647121", "0.6636188", "0.6631938", "0.6625192", "0.65990317", "0.65929615", "0.6585668", "0.6576288", "0.65756", "0.65647906", "0.65247476", "0.6524157", "0.6521182", "0.6519905", "0.6505573", "0.6495261", "0.64949673", "0.6489269", "0.6477733", "0.64638436", "0.6460014", "0.6449028", "0.6431224", "0.6426044", "0.6422432", "0.6414545", "0.6408358", "0.63883567" ]
0.8221933
0
Used to get the distance from the ultrasonic sensor
public double getUltrasonicDistance() { return currentDist; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }", "public float getDistanceData() {\n\t\tultrasonicSample.fetchSample(distanceData, 0);\n\t\tfloat distance = distanceData[0]*100; //change the unit from m to cm\n\t\tfloat distanceToReturn;\n\t\tif (distance >= WALL_DIS + WIDTH && filterControl < FILTER_OUT) {\n\t\t\t// bad value, do not set the distance var, however do increment the\n\t\t\t// filter value\n\t\t\tfilterControl++;\n\t\t\tdistanceToReturn = lastDistance;\n\t\t} else if (distance >= WALL_DIS + WIDTH) {\n\t\t\t// We have repeated large values, so there must actually be nothing\n\t\t\t// there: leave the distance alone\n\t\t\tdistanceToReturn = distance;\n\t\t\tlastDistance = distance;\n\t\t}else {\n\t\t\t// distance too low: reset filter and leave\n\t\t\t// distance alone.\n\t\t\tfilterControl = 0;\n\t\t\tdistanceToReturn = distance;\n\t\t\tlastDistance = distance;\n\t\t}\n\t LCD.drawString(\"D: \" +distanceToReturn, 0, 3);\n\t\treturn distanceToReturn;\n\t}", "public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}", "public void calculateDistance() {\n SensorEventListener mSensorEventListener = new SensorEventListener() {\n @Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n mAngle = (Math.acos(sensorEvent.values[2] / 9.8)) * (180/Math.PI) - 5;\n mAngle = Math.toRadians(mAngle);\n mDistance = mHeight * Math.tan(mAngle);\n }\n\n @Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n\n }\n };\n mSensorManager.registerListener(mSensorEventListener, mAccelerometer,\n SensorManager.SENSOR_DELAY_UI);\n\n // Calculating the distance.\n mDistance = mHeight * Math.tan(mAngle);\n // Rounding it up to 2 decimal places\n DecimalFormat df = new DecimalFormat(\"#.##\");\n mDistance = Double.valueOf(df.format(mDistance));\n String distanceString = Double.toString(mDistance);\n\n // Update the distance TextView\n TextView distanceView = (TextView) findViewById(R.id.distanceText);\n String text = distanceString + \" cm\";\n distanceView.setText(text);\n distanceView.setTextSize(36);\n }", "double getDistance();", "private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}", "public int rawDistance() {\r\n\t\tus.fetchSample(usData, 0); // acquire data\r\n\t\tdistance=(int) (usData[0] * 100.0);// extract from buffer, cast to int and add to total\r\n\t\t\t\r\n\t\treturn distance; \r\n\t}", "public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }", "public float getDistance();", "public static int readUsDistance() {\n usSensor.fetchSample(usData, 0);\n // extract from buffer, cast to int, and filter\n return filter((int) (usData[0] * 100.0));\n }", "public double getDistance () {\n return distance;\n }", "public double getDistance() {\n\t\t// miles = miles/hr * s / (s/hr)\n\t\treturn (double)speed/10.0 * duration / 3600.0;\n\t}", "public int readDistance() {\r\n\t\tint newDistance=0;\r\n\t\tint filterCount = 0;\r\n\t\twhile(filterCount<US_FILTER) {\r\n\t\t\tus.fetchSample(usData, 0); // acquire data\r\n\t\t\tnewDistance=(int) (usData[0] * 100.0);// extract from buffer, cast to int and add to total\r\n\t\t\t\r\n\t\t\tif(newDistance<=distance+US_ERROR && newDistance>=distance-US_ERROR) {\r\n\t\t\t\tfilterCount++;\r\n\t\t\t}else {\r\n\t\t\t\tfilterCount=0;\r\n\t\t\t}\r\n\t\t\tdistance=newDistance;\r\n\t\t}\r\n\t\treturn distance; \r\n\t}", "public double getDistance(){\n\t\treturn this.distance;\n\t}", "public double getDistance() { \n\t\treturn Math.pow(input.getAverageVoltage(), exp) * mul; \n\t}", "public float getDistance()\n {\n return distance_slider.getValue() / DISTANCE_SCALE_FACTOR;\n }", "public float getDistance() {\r\n return distance;\r\n }", "public float getDistance() {\n return distance;\n }", "public final float getDistance() {\n return distance;\n }", "public double getDistanceToTarget() {\n if (!Config.isVisionInstalled) {\n return 0;\n }\n double distanceToVisionTarget =\n Config.visionDistanceConstant * (Config.fieldVisionTargetHeight-Config.limelightMountingHeight) /\n Math.tan(Math.toRadians(limelight.getTy() + Config.limelightMountingAngle));\n\n //now we can convert the new values into a new distance\n return distanceToVisionTarget;\n }", "public double getDistance() {\n return distance;\n }", "private void getDistance() {\n\n float dist = 0;\n Location location = \n locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n while (location==null) { //If we don't know where we are right now\n Toast.makeText(this, \"No last known location. Aborting...\", \n Toast.LENGTH_LONG).show();\n location = \n locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n }\n\n createPositions();\n\n dist = location.distanceTo(mPositions.get(0).toLocation());\n distanceList.add(dist);\n\n dist = mPositions.get(0).toLocation().distanceTo(mPositions.get(1).toLocation());\n distanceList.add(dist);\n dist = mPositions.get(1).toLocation().distanceTo(mPositions.get(2).toLocation());\n distanceList.add(dist);\n dist = mPositions.get(2).toLocation().distanceTo(mPositions.get(3).toLocation());\n distanceList.add(dist);\n dist = mPositions.get(3).toLocation().distanceTo(mPositions.get(4).toLocation());\n distanceList.add(dist);\n \n }", "public float getDistance() {\n return distance;\n }", "public double getDistance() {\r\n return this.distance;\r\n }", "public float GetDistance(String sensor_name)\n {\n double distance = 0;\n // TODO List: read the value of the sonor sensor, and convert it to centimeter.\n if (sensor_name == str_sensor_door)\n {\n distance = sensor_door.getDistance(DistanceUnit.CM);\n RobotLog.vv(\"DoorDistanceToGlyph\", \"%4.1f\", distance);\n }\n else if (sensor_name == str_sensor_tray)\n {\n\n distance = sensor_tray.getDistance(DistanceUnit.CM);\n RobotLog.vv(\"TrayDistanceToGlyph\", \"%5.2f\", distance);\n }\n else\n {\n\n distance = sensor_sonar_front.getDistance();\n RobotLog.vv(\"SonarDistanceToGlyph\", \"%5.1f\", distance);\n }\n\n return (float) distance;\n }", "public double getDistance() {\n\t\treturn distance;\n\t}", "public double getDistance() {\n\t\treturn distance;\n\t}", "public int getDistance() {\n return distance;\n }", "public int getDistance() {\n return distance;\n }", "public double getDistance() {\n return this.distance;\n }", "public Distance getDistance() {\n return distance;\n }", "public int getDistance() {\r\n\t\treturn distance;\r\n\t}", "public int getDistance() {\r\n\t\treturn distance;\r\n\t}", "public double getDist() {\n return distance;\n }", "public double distance(){\n return DistanceTraveled;\n }", "public int getDistance() {\n\t\treturn distance;\n\t}", "public int distance() {\n return distance;\n }", "public double getDist(){\n double dist=0;\n double DA = 0;\n double minDist = this.getMotors()[0].getTargetPosition();\n for(int i =0;i<this.getMotors().length;i++) {\n double current = this.getMotors()[i].getCurrentPosition();\n double target = this.getMotors()[i].getTargetPosition();\n DA = Math.abs(target) - Math.abs(current);\n dist = target - current;\n if(Math.abs(DA)<Math.abs(minDist)){\n minDist = dist;\n }\n }\n return (minDist);\n }", "public double getDistanceFromSource()\n {\n return distanceFromSource;\n }", "public float getDistance() {\n shouldUpdateDistance = true;\n if (shouldUpdateDistance) {\n distance = getDistance(createSuggestedWindowFilter());\n shouldUpdateDistance = false;\n }\n return distance;\n }", "public int drivenDistance() {\n return (int) Math.round(rightMotor.getTachoCount() / DISTANCE_RATIO);\n }", "public double getDistance()\n {\n return Math.abs(getDifference());\n }", "public double distance() {\n return distance;\n }", "public double distance() {\n return distance;\n }", "public float getDistance(){\n\t\t\treturn s1.start.supportFinal.dot(normal);\n\t\t}", "public abstract double GetDistance();", "public int getTotalDistance() {\n return totalDistance;\n }", "public double getDistanceTotale() {\n\t\treturn distanceTotale;\n\t}", "public org.djbikeshop.www.repairtransportationservice.GetTransportationDistanceResponse getTransportationDistance\n (\n org.djbikeshop.www.repairtransportationservice.GetTransportationDistance getTransportationDistance\n )\n ;", "public static double Calculate(double distance) {\n double speed = 0.0; //Rad/s\n double speedRPM = 0.0; //RPM\n //Angle in Degrees for the Outer Port\n\n double numerator = -(9.81/2) * Math.pow(distance, 2);\n double denominator = ((2.49 - shooterHeight) - (distance * Math.tan(shooterAngleRads))) * Math.pow(Math.cos(shooterAngleRads), 2);\n\n speed = ((1/shooterWheelRadius) * Math.sqrt(numerator / denominator)); // Rads/Sec for the wheel\n speedRPM = speed * (30/(Math.PI)); //RPM Conversion\n //System.out.printf(\"Wheel Speed: %s RPM\\nWheel Tangential Velocity is: %s m/s\\nMotor Speed: %s RPM\\nMotor Tangential Velocity: %s m/s\\n\", speedRPM, speed*shooterWheelRadius, speedRPM * 3, speed * 3 * shooterWheelRadius);\n return (speedRPM*3)/6000;\n }", "public Vector3D getDistance()\n\t{\n\t\treturn distance;\n\t}", "public int getAdditionalDistance() {\n return additionalDistance;\n }", "public int getTotDistance(){\r\n\t \treturn this.totDistance;\r\n\t }", "public double calcDistBetweenStops(){\n List<Location> locs = destinations.getLocationList();\r\n double totalDist = 0;\r\n for (int i = 0; i < (locs.size() - 1); i++){\r\n double distance = locs.get(i).DistanceTo(locs.get(i+1));\r\n totalDist += distance;\r\n }\r\n return totalDist;\r\n }", "private double measureTemp() {\n try {\n analog0 = blueTooth.sensor(0);\n analog1 = blueTooth.sensor(1);\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n } catch (TimeoutException ex) {\n Logger.getLogger(TempMeasure.class.getName()).log(Level.SEVERE, null, ex);\n }\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n }", "public double darDistancia( )\n {\n return distanciaMediaSol;\n }", "public int getDistance(){\n if (distance == 0) {\n int tourDistance = 0;\n // Loop through our tour's cities\n for (int cityIndex=0; cityIndex < tourSize(); cityIndex++) {\n // Get city we're travelling from\n City fromCity = getCity(cityIndex);\n // City we're travelling to\n City destinationCity;\n // Check we're not on our tour's last city, if we are set our \n // tour's final destination city to our starting city\n if(cityIndex+1 < tourSize()){\n destinationCity = getCity(cityIndex+1);\n }\n else{\n destinationCity = getCity(0);\n }\n // Get the distance between the two cities\n tourDistance += fromCity.distanceTo(destinationCity);\n }\n distance = tourDistance;\n }\n return distance;\n }", "public double ComputeDistance(){ \n\t\tdouble lat1 = this.depAirportCity.getLatDegs() + (double)(this.depAirportCity.getLatMins())/60; \n\t\tdouble lon1 = this.depAirportCity.getLongDegs() + (double)(this.depAirportCity.getLongMins())/60;\n\t\tdouble lat2 = this.arrAirportCity.getLatDegs() + (double)(this.arrAirportCity.getLatMins())/60; \n\t\tdouble lon2 = this.arrAirportCity.getLongDegs() + (double)(this.arrAirportCity.getLongMins())/60;\n\t\t\n\t\tdouble distance = Haversine.getMiles(lat1, lon1, lat2, lon2);\n\t\treturn distance;\n\t}", "private double distance() {\n\t\tdouble dist = 0;\n\t\tdist = Math.sqrt(Math.abs((xOrigin - x) * (xOrigin - x) + (yOrigin - y) * (yOrigin - y)));\n\t\treturn dist;\n\t}", "public double getDistance() {\n\n final int R = 6371; // Radius of the earth\n double lat1 = latitude;\n double lon1 = longitude;\n double lat2 = 41.917715; //lat2, lon2 is location of St.Charles, IL\n double lon2 = -88.266027;\n double el1=0,el2 = 0;\n double latDistance = Math.toRadians(lat2 - lat1);\n double lonDistance = Math.toRadians(lon2 - lon1);\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2))\n * Math.sin(lonDistance / 2) * Math.sin(lonDistance / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance = R * c * 1000; // convert to meters\n\n double height = el1 - el2;\n\n distance = Math.pow(distance, 2) + Math.pow(height, 2);\n\n return Math.sqrt(distance);\n }", "private Integer getDistance(double lat1, double lon1, double lat2, double lon2) {\n Location locationA = new Location(\"Source\");\n locationA.setLatitude(lat1);\n locationA.setLongitude(lon1);\n Location locationB = new Location(\"Destination\");\n locationB.setLatitude(lat2);\n locationB.setLongitude(lon2);\n distance = Math.round(locationA.distanceTo(locationB));\n return distance;\n }", "private double distantziaKalkulatu() {\r\n\t\tdouble lurrarenRadioa = 6371;// kilometrotan Lurraren radioa\r\n\t\tdouble dLat = Math.toRadians(terLat - latitudea); //\r\n\t\tdouble dLng = Math.toRadians(termLong - longitudea);\r\n\t\tdouble sindLat = Math.sin(dLat / 2);\r\n\t\tdouble sindLng = Math.sin(dLng / 2);\r\n\t\tdouble va1 = Math.pow(sindLat, 2)\r\n\t\t\t\t+ Math.pow(sindLng, 2) * Math.cos(Math.toRadians(terLat)) * Math.cos(Math.toRadians(latitudea));\r\n\t\tdouble va2 = 2 * Math.atan2(Math.sqrt(va1), Math.sqrt(1 - va1));\r\n\t\tdouble distancia = lurrarenRadioa * va2;\r\n\r\n\t\treturn distancia;\r\n\t}", "private double totalDriveDistance()\n\t{\n\t\tdouble totalDistance = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//grab the total distance\n\t\t\ttotalDistance += saveData.get(i).get(\"distance\"); //.get(\"distance\") to be replaced by whatever method we use to grab a variable from an jsonObject\n\t\t}\n\t\treturn totalDistance;\n\t}", "@JsonIgnore public Distance getFlightDistanceDistance() {\n return (Distance) getValue(\"flightDistance\");\n }", "public double getAltitude();", "public void getDistance() {\n if (curLocation == null) {\n Toast.makeText(getApplicationContext(), \"Retrieving location - Try Again\", Toast.LENGTH_LONG).show();\n return;\n }\n String url = \"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial\" +\n \"&origins=\" + curLocation.latitude + \",\" + curLocation.longitude +\n \"&destinations=\" + dest.latitude + \",\" + dest.longitude +\n \"&mode=walking\" +\n \"&key=\" + getString(R.string.google_maps_key);\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n\n //callback for when get distance returns data\n @Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n distance = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"distance\").getString(\"text\");\n duration = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"duration\").getString(\"text\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(), \"Error retrieving directions\", Toast.LENGTH_LONG).show();\n }\n });\n requestQueue.add(request);\n }", "double getDistanceInMiles();", "int getAltitude();", "private void setDistanceValues(){\n float [] sumDistances = new float[1];\n\n distanceValue =0.0;\n\n for(int i= 0; i < trackingList.size()-1;i++){\n double startLong = trackingList.get(i).getLongtitude();\n double startLat = trackingList.get(i).getLatitude();\n double endLong = trackingList.get(i+1).getLongtitude();\n double endLat = trackingList.get(i+1).getLatitude();\n\n Location.distanceBetween(startLat,startLong,endLat,endLong,sumDistances);\n \n distanceValue += sumDistances[0];\n }\n\n }", "protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }", "long getAltitude();", "public double getSpeed(){\r\n double Speed;\r\n Speed = (double)(Distance * TimeConversion)/(getMinutes() * SecondsConversion + getSeconds()); \r\n if ((getMinutes()==0) || (getSeconds() == 0)) {\r\n Speed =0;\r\n } //Closing bracket if statement\r\n return Speed;\r\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n float distance = event.values[0];\n Log.e(\"xuawang\", \"d: \"+distance);\n if(distance > 5) {\n //far\n if(mIsDarkMode){\n darkScreen(false, getWindow());\n am.setMode(AudioManager.MODE_NORMAL);\n am.setSpeakerphoneOn(true);\n am.setBluetoothScoOn(false);\n }\n mIsDarkMode = false;\n } else {\n //close enough\n if(!mIsDarkMode){\n darkScreen(true, getWindow());\n am.setMode(AudioManager.MODE_IN_CALL);\n am.setSpeakerphoneOn(false);\n am.setBluetoothScoOn(true);\n }\n mIsDarkMode = true;\n }\n }", "public double calculateDistance(double lat1, double lng1, double lat2, double lng2) {\n final String method = \"GET\";\n\n final String path = \"/calculateDistance\";\n\n final String body = \"\";\n final byte[] content = body.getBytes(StringUtils.UTF8);\n\n final Map parameters = new HashMap<>();\n parameters.put(\"lang\", \"en_US\");\n parameters.put(\"lat1\", Double.toString(lat1));\n parameters.put(\"lng1\", Double.toString(lng1));\n parameters.put(\"lat2\", Double.toString(lat2));\n parameters.put(\"lng2\", Double.toString(lng2));\n\n final Map headers = new HashMap<>();\n\n // Use components to create the api request\n ApiRequest localRequest =\n new ApiRequest(apiClient.getClass().getSimpleName())\n .withPath(path)\n .withHttpMethod(HttpMethodName.valueOf(method))\n .withHeaders(headers)\n .addHeader(\"Content-Type\", \"application/json\")\n .withParameters(parameters);\n\n // Only set body if it has content.\n if (body.length() > 0) {\n localRequest = localRequest\n .addHeader(\"Content-Length\", String.valueOf(content.length))\n .withBody(content);\n }\n\n final ApiRequest request = localRequest;\n\n // Make network call on background thread\n Thread getData = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Log.d(LOG_TAG,\n \"Invoking API w/ Request : \" +\n request.getHttpMethod() + \":\" +\n request.getPath());\n\n final ApiResponse response = apiClient.execute(request);\n\n final InputStream responseContentStream = response.getContent();\n final String responseData = IOUtils.toString(responseContentStream);\n Log.d(LOG_TAG, \"Response : \" + responseData);\n\n Log.d(LOG_TAG, response.getStatusCode() + \" \" + response.getStatusText());\n\n JSONObject responseJSONObject = new JSONObject(responseData);\n distance = Double.valueOf(responseJSONObject.get(\"distance\").toString());\n Log.d(LOG_TAG, \"Distance: \" + distance);\n } catch (final Exception exception) {\n Log.e(LOG_TAG, exception.getMessage(), exception);\n exception.printStackTrace();\n }\n }\n });\n\n getData.start();\n try {\n getData.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return distance;\n }", "private static double get_distance ( String one, String two){\n String temp[] = one.split(\" \");\n double lat1 = Double.parseDouble(temp[0]);\n double long1 = Double.parseDouble(temp[1]);\n\n String temp2[] = two.split(\" \");\n double lat2 = Double.parseDouble(temp2[0]);\n double long2 = Double.parseDouble(temp2[1]);\n\n// Get distance between two lats and two lans\n double latDistance = Math.toRadians(lat1 - lat2);\n double lngDistance = Math.toRadians(long1 - long2);\n\n// Step 1\n double a = (Math.sin ( latDistance / 2 ) * Math.sin (latDistance / 2)) +\n (Math.cos ( Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) )\n * ( Math.sin (lngDistance /2 ) * Math.sin(lngDistance / 2) );\n// Step 2\n double c = ( 2 * (Math.atan2( Math.sqrt(a), Math.sqrt(1-a))));\n// Step 3\n double d = ( EARTH_RADIUS * c );\n return d;\n }", "public double getAltitudeRadians() {\n return altitude * Math.PI / 180d;\n }", "public String getLogisticsDistance() {\n return logisticsDistance;\n }", "public double getStartingDistance() {\n return myStartDistance;\n }", "public double\ntValue(double distance)\n{\n\treturn (distance/this.length());\n}", "public EV3UltrasonicSensor getSensor() {\r\n\t\treturn sensor;\r\n\t}", "public float altitude_monotonic_GET()\n { return (float)(Float.intBitsToFloat((int) get_bytes(data, 8, 4))); }", "public double getDistanceMoyenne() {\n\t\treturn getDistanceTotale () / 12;\n\t}", "public interface MAV_DISTANCE_SENSOR {\n /**\n * Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units\n */\n public final static int MAV_DISTANCE_SENSOR_LASER = 0;\n /**\n * Ultrasound rangefinder, e.g. MaxBotix units\n */\n public final static int MAV_DISTANCE_SENSOR_ULTRASOUND = 1;\n /**\n * Infrared rangefinder, e.g. Sharp units\n */\n public final static int MAV_DISTANCE_SENSOR_INFRARED = 2;\n /**\n * Radar type, e.g. uLanding units\n */\n public final static int MAV_DISTANCE_SENSOR_RADAR = 3;\n /**\n * Broken or unknown type, e.g. analog units\n */\n public final static int MAV_DISTANCE_SENSOR_UNKNOWN = 4;\n}", "private String calculateDistancePerAmount() {\n double distance = parser(getTextFromEditText(R.id.distanceEdit));\n double fuel = parser(getTextFromEditText(R.id.fuelEdit));\n double value = distance / fuel;\n return rounder(value);\n }", "private float distanceTo(BasicEvent event) {\n final float dx = event.x - location.x;\n final float dy = event.y - location.y;\n// return Math.abs(dx)+Math.abs(dy);\n return distanceMetric(dx, dy);\n// dx*=dx;\n// dy*=dy;\n// float distance=(float)Math.sqrt(dx+dy);\n// return distance;\n }", "public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t\t\t\t+ (\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t\t, 2 )\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}", "public void readSensor() {\n try {\n Log.i(TAG, \"trying to read from sensors\");\n distance = this.bufferedReader.readLine();\n // if (distance != null && distance != \"0\") {\n Log.i(TAG, distance);\n\n // MainActivity.distance.setText(distance);\n Log.i(TAG, \"done with sensors\");\n //setBackgroundColor(Integer.parseInt(distance));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Dimension2D getDistance() {\n\t\treturn distance;\n\t}", "public static double GetDistance(double lat1, double lon1, double lat2, double lon2) {\n double radLat1 = rad(lat1);\n double radLat2 = rad(lat2);\n double a = radLat1 - radLat2;\n double b = rad(lon1) - rad(lon2);\n double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +\n Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n s = s * EARTH_RADIUS;//km\n// Log.e(\"s\", \"s=\" + s);\n return s;\n }", "public double getPredictedDistance() {\r\n return predictedDistance;\r\n }", "@Override\n\tpublic double getDistance(ArrayList<Point> r, ArrayList<Point> s) {\n\t\tArrayList<Point> r_clone = DistanceService.clonePointsList(r);\n\t\tArrayList<Point> s_clone = DistanceService.clonePointsList(s);\n\t\t\n\t\t// Time range (parameters - given)\n\t\tlong t1 = getTimeIni(r_clone, s_clone);\n\t\tlong tn = getTimeEnd(r_clone, s_clone);\n\n\t\treturn getDISSIM(r_clone, s_clone, t1, tn);\n\t}", "public double calDistance()\n {\n double closest = poly[0].getD();\n\n for(int i = 1; i < sides; i++)\n {\n if(closest > poly[i].getD())\n {\n closest = poly[i].getD();\n }\n }\n this.distance = closest;\n\n return closest;\n }", "long calcDist(int x, int y) {\n\tWeatherDisplay wd = main.getDisplay();\n\tx = wd.getWeatherX(x);\n\ty = wd.getWeatherY(y);\n\tint w = wd.getWeatherWidth();\n\tint h = wd.getWeatherHeight();\n\n\tlong ret = -1;\n\t// Point must be in bounds\n\tif (x >= 0 && y >= 0 && x <= w && y <= h) {\n\t int dy = (front + back) * y / h - back;\n\t int dx = (int)(x - w * (getDate() % main.DAY) / main.DAY);\n\n\t // This may return negative\n\t ret = (long)(dy * main.DAY + dx * main.DAY / w);\n\t}\n\n\t// Show distance\n\tif (ret > 0)\n\t main.bDist.setText(\"Distance: \" + Data.stringTime(ret));\n\telse\n\t main.bDist.setText(\"Distance: --:--\");\n\n\treturn ret;\n }", "public double getNoteDistance() {\n\t\treturn noteDistance;\n\t}", "private double getDistance(double initX, double initY, double targetX, double targetY) {\n\t\treturn Math.sqrt(Math.pow((initX - targetX), 2) + Math.pow((initY - targetY), 2));\n\t}", "public int[] getDistances(){\n\t\treturn distances;\n\t}", "private static long getShortestDistance(String origin, String destination) \n\t\tthrows IOException, ParserConfigurationException, SAXException{\n\t\t\t\t\n\t\tURL googleReq = new URL(\"http://maps.google.com/maps/api/directions/xml?origin=\"+origin.replace(\" \", \"+\").replace(\",\", \"\")+\n\t\t\t\t\"&destination=\"+destination.replace(\" \", \"+\").replace(\",\", \"\")+\"&sensor=false\");\n\t\t\n\t\tURLConnection urlConnection = googleReq.openConnection();\n\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\n\t\tDocument doc = db.parse(urlConnection.getInputStream());\n\t\ttry{\n\t\t\t/*\n\t\t\t * we write the response to an xml file\n\t\t\t * just for supervision\n\t\t\t */\n\t\t\tSource source = new DOMSource(doc);\n\t\t\tFile file = new File(\"response.xml\");\n\t\t\tResult result = new StreamResult(file);\n\n\t\t\t// Write the DOM document to the file\n\t\t\tTransformer xformer = TransformerFactory.newInstance().newTransformer();\n\t\t\txformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t} catch (TransformerException e) {\n\t\t}\n\n\t\tNode stNode = doc.getElementsByTagName(\"status\").item(0);\n\t\tlong dst = -1;\n\t\tif(stNode.getTextContent().equals(\"OK\")){\n\t\t\t//extract the distance from the response\n\t\t\tNodeList routeLst = doc.getElementsByTagName(\"route\");\n\t\t\t\n\t\t\tfor(int rCtr=0;rCtr<routeLst.getLength();rCtr++){\n\t\t\t\tlong routeDist = 0;\n\t\t\t\tNode route = routeLst.item(rCtr);\n\t\t\t\t\n\t\t\t\tNodeList distLst = ((Element)route).getElementsByTagName(\"distance\");\n\n\t\t\t\tfor(int dCtr=0;dCtr<distLst.getLength();dCtr++){\n\t\t\t\t\tNode distanceNode = distLst.item(dCtr);\n\t\t\t\t\tif(distanceNode.getParentNode().getNodeName().equals(\"leg\")){\n\t\t\t\t\t\tNodeList distChild = ((Element)distanceNode).getElementsByTagName(\"value\");\n\t\t\t\t\t\tfor(int ch=0;ch<distChild.getLength();ch++){\n\t\t\t\t\t\t\tNode tmpChild = distChild.item(ch);\n\t\t\t\t\t\t\t\trouteDist += Long.parseLong(tmpChild.getTextContent());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(routeDist<dst || dst==-1)\n\t\t\t\t\tdst=routeDist;\n\t\t\t} //end route\n\t\t\tSystem.out.println(\"Shortest distance: \"+dst+\" meters\");\n\t\t}\n\t\telse{\n\t\t\tSystem.err.println(\"RESPONSE STATUS NOT OK!\");\t//probably over_query_limit status\n\t\t}\n\t\t\n\t\treturn dst;\n\t}", "public static String getDistanceString(Wifi w) {\n double distance = w.getDistance();\n\n // Return invalid distance\n if(distance < 0) return \"No distance available.\";\n else if(distance < 500){\n // Return distance in meters\n return String.format(\"Distance: %3.0f m\", distance);\n } else { // distance >= 500\n // return distance in kms\n return String.format(\"Distance: %.1f km\", distance/1000);\n }\n }", "public int getMinDistance(){\n return totalDistance;\n }", "@Override\n public double getAltitude()\n {\n return myPosition.getLocation().subtract(getClosestModelPosition()).getLength();\n }" ]
[ "0.7719136", "0.73357785", "0.7119396", "0.70944256", "0.7050727", "0.7047439", "0.7039765", "0.69599724", "0.6937443", "0.6798204", "0.67750275", "0.675994", "0.67567885", "0.67546827", "0.6742618", "0.67095387", "0.6689813", "0.667565", "0.6675648", "0.6664028", "0.66570336", "0.6655321", "0.66550183", "0.6627609", "0.6595573", "0.6580475", "0.6580475", "0.65703773", "0.65703773", "0.65692216", "0.6553413", "0.64702624", "0.64702624", "0.64515203", "0.6443755", "0.6397723", "0.63857746", "0.6377873", "0.63694274", "0.6325324", "0.62907654", "0.6282025", "0.62750936", "0.62750936", "0.6232447", "0.6179125", "0.61515516", "0.6091234", "0.6087586", "0.60827273", "0.60681623", "0.6043117", "0.60355914", "0.6028657", "0.60261524", "0.5977418", "0.5945234", "0.5945153", "0.59395677", "0.5936939", "0.5929727", "0.5923668", "0.589182", "0.5887326", "0.5862456", "0.5858318", "0.58561975", "0.58421016", "0.5838482", "0.58381957", "0.583059", "0.581892", "0.58185846", "0.58033997", "0.5792139", "0.5788987", "0.57808095", "0.57786924", "0.5778505", "0.57621694", "0.57200956", "0.57173055", "0.57023966", "0.5691422", "0.5688343", "0.5685412", "0.5667927", "0.56581223", "0.565054", "0.56321037", "0.56298447", "0.5629712", "0.5628422", "0.562143", "0.5618705", "0.56065804", "0.5595684", "0.5581359", "0.5580508", "0.55780405" ]
0.7729869
0
Used to set the speed of the arm talon
public void setArmTalon(double outputval) { armMotor.set(outputval); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setSpeed(RobotSpeedValue newSpeed);", "public void setSpeed() {\n //assigns the speed based on the shuffleboard with a default value of zero\n double tempSpeed = setpoint.getDouble(0.0);\n\n //runs the proportional control system based on the aquired speed\n controlRotator.proportionalSpeedSetter(tempSpeed);\n }", "public void setArmSpeed(double speed) {\n if (frontSwitch.get()) {\n encoder.reset();\n }\n if (armIsOnLimitSwitchOrHardstop(speed)) {\n OI.secondaryController.setRumble(GenericHID.RumbleType.kLeftRumble, 0.2);\n speed = 0;\n } else {\n OI.secondaryController.setRumble(GenericHID.RumbleType.kLeftRumble, 0);\n }\n double feedforward = 0.06 * Math.cos(getArmRadians());\n speed = speed + feedforward;\n //speed = predictiveCurrentLimiting.getVoltage(speed * 12, getRPM()) / 12;\n armMotorOne.set(speed);\n\n armSpeed.setDouble(speed);\n }", "public abstract void setSpeed(int sp);", "public static void setMotorSpeed(double speed){\n setLeftMotorSpeed(speed);\n setRightMotorSpeed(speed);\n }", "public void setCurrentSpeed (double speed);", "public void setSpeed(float val) {speed = val;}", "private void setSpeed() {\n double cVel = cAccel*0.1;\n speed += round(mpsToMph(cVel), 2);\n speedOutput.setText(String.valueOf(speed));\n }", "public void setSpeed(int s){\r\n\t\tspeed = s;\r\n\t}", "public void setSpeed(int wpm);", "public void SetSpeedRaw(double speed)\n {\n Motors.Set(speed);\n }", "public void setSpeed(double speed) {\n \tthis.speed = speed;\n }", "public static void setSpeed(int speed) {\n leftMotor.setSpeed(speed);\n rightMotor.setSpeed(speed);\n }", "public void setSpeed( Vector2 sp ) { speed = sp; }", "public void setSpeed(double speed)\r\n {\r\n this.speed = speed;\r\n }", "public void setSpeed(int value) {\n this.speed = value;\n }", "public void setSpeed(int newSpeed)\n {\n speed = newSpeed;\n }", "public void setSpeed(double multiplier);", "public void changeSpeed(int speed);", "public synchronized void set (double speed){\n m_liftSpeed = speed;\n if (m_liftSpeed < 0 && isLowerLimit() == false) {\n m_liftMotor.set(m_liftSpeed);\n } else if (m_liftSpeed > 0 && isUpperLimit() == false){\n m_liftMotor.set(m_liftSpeed);\n } else {\n m_liftSpeed = 0;\n m_liftMotor.set(0); \n }\n }", "public void setSpeed() {\n\t\tthis.ySpd = this.MINSPEED + randGen.nextFloat() * (this.MAXSPEED - this.MINSPEED);\n\t\tthis.xSpd = this.MINSPEED + randGen.nextFloat() * (this.MAXSPEED - this.MINSPEED);\n\t}", "@Override\n\tpublic void setSpeed(double speed) {\n\n\t}", "public void setSpeed(double speed) {\n this.speed = speed;\n }", "public void setSpeed(double speed) {\n this.speed = speed;\n }", "public void setSpeed(int speed) {\n this.speed = speed;\n }", "private void changeSpeed() {\n\t\tint t = ((JSlider)components.get(\"speedSlider\")).getValue();\n\t\tsim.setRunSpeed(t);\n\t}", "public void setSpeed() {\r\n\t\tint delay = 0;\r\n\t\tint value = h.getS(\"speed\").getValue();\r\n\t\t\r\n\t\tif(value == 0) {\r\n\t\t\ttimer.stop();\r\n\t\t} else if(value >= 1 && value < 50) {\r\n\t\t\tif(!timer.isRunning()) {\r\n\t\t\t\ttimer.start();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//exponential function. value (1) == delay (5000). value (50) == delay (25)\r\n\t\t\tdelay = (int)(a1 * (Math.pow(25/5000.0000, value / 49.0000)));\r\n\t\t} else if(value >= 50 && value <= 100) {\r\n\t\t\tif(!timer.isRunning()) {\r\n\t\t\t\ttimer.start();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//exponential function. value (50) == delay(25). value (100) == delay (1)\r\n\t\t\tdelay = (int)(a2 * (Math.pow(1/25.0000, value/50.0000)));\r\n\t\t}\r\n\t\ttimer.setDelay(delay);\r\n\t}", "public void set(double speed, CANTalon talon) {\n\t\ttalon.set(speed);\n\t}", "void changeSpeed(int speed) {\n\n this.speed = speed;\n }", "public void setSpeed(int value) {\n speed = value;\n if (speed < 40) {\n speedIter = speed == 0 ? 0 : speed / 4 + 1;\n speedWait = (44 - speed) * 3;\n fieldDispRate = 20;\n listDispRate = 20;\n } else if (speed < 100) {\n speedIter = speed * 2 - 70;\n fieldDispRate = (speed - 40) * speed / 50;\n speedWait = 1;\n listDispRate = 1000;\n } else {\n speedIter = 10000;\n fieldDispRate = 2000;\n speedWait = 1;\n listDispRate = 4000;\n }\n }", "public void setSpeed() {\r\n\t\tthis.currSpeed = this.maxSpeed * this.myStrategy.setEffort(this.distRun);\r\n\t}", "public void setSpeed(float speed) {\n this.speed = (int) speed * 13;\n }", "public void setSpeed(int speed) {\n thread.setSpeed(speed);\n }", "public SetTiltSpeed(double speed) {\n requires(Robot.tilt);\n this.speed = speed;\n }", "@Override\n\tpublic void setSpeed(float speed) {\n\t\t\n\t}", "protected void setMotorSpeeds(int lSpeed, int rSpeed) {\n setLeftMotorSpeed(lSpeed);\n setRightMotorSpeed(rSpeed);\n }", "@Override\n\tpublic void set(double speed) {\n\t\tsuper.changeControlMode(TalonControlMode.PercentVbus);\n\t\tsuper.set(speed);\n\t\tsuper.enableControl();\n\t}", "public void set(double speed) {\n\t\tfor (Motor motor : this) {\n\t\t\t((TalonSRX) motor).set(speed);\n\t\t}\n\t}", "void changeUpdateSpeed();", "public void set(double speed) {\n if ((getRawAngle() < Constants.Hood.MIN_RAW_ANGLE && speed > 0)\n || (getRawAngle() > Constants.Hood.MAX_RAW_ANGLE && speed < 0)) {\n stop();\n } else {\n m_servo.setSpeed(speed);\n }\n }", "public void setSpeed(final int speed) {\n mSpeed = speed;\n }", "public Builder setSpeed(int value) {\n bitField0_ |= 0x00000800;\n speed_ = value;\n onChanged();\n return this;\n }", "public void set(double speed) {\n\t\tcurrentSpeed = speed;\n\t\tmotor.set(speed);\n\t}", "public Builder setSpeed(int value) {\n bitField0_ |= 0x00000080;\n speed_ = value;\n onChanged();\n return this;\n }", "public Builder setSpeed(int value) {\n bitField0_ |= 0x00001000;\n speed_ = value;\n onChanged();\n return this;\n }", "public Builder setSpeed(int value) {\n bitField0_ |= 0x00001000;\n speed_ = value;\n onChanged();\n return this;\n }", "public Builder setSpeed(int value) {\n bitField0_ |= 0x00001000;\n speed_ = value;\n onChanged();\n return this;\n }", "public void setSpeed(float speed) {\n this.speed = speed;\n }", "public void setSpeed(float speed) {\n this.speed = speed;\n }", "public void setSpeed(int newSpeed){\n\t\tmyVaisseau=Isep.getListeVaisseau();\n\t\tspeed=newSpeed;\t\t\n\t}", "public Builder setSpeed(int value) {\n \n speed_ = value;\n onChanged();\n return this;\n }", "public void PIDSpeed(double rpm) {\n\t\tsuper.enableControl();\n\t\tPIDTargetSpeed = rpm;\n\t\t// double speed = rpm * (4096.0 / 6000.0);\n\n\t\t// SmartDashboard.sendData(this.getChannel() + \"RPM\", rpm);\n\t\t// SmartDashboard.sendData(this.getChannel() + \"Speed\", speed);\n\t\tsuper.changeControlMode(TalonControlMode.Speed);\n\t\tsuper.set(rpm);\n\t\t// SmartDashboard.sendData(\"Talon \" + this.getChannel() + \" Speed\",\n\t\t// getSpeed());\n\t}", "public void setElevatorSpeed(double spd)\n {\n mSpeed = spd;\n }", "public void setSpeed(int newSpeed)\n\t{\n\t\tspeed = newSpeed;\n\t}", "public void setSpeed(int speed) {\n this.movementSpeed = speed;\n }", "public void setSpeed(int speed) {\n\t\tthis.speed = speed;\n\t}", "public void setSpeed(int speed) {\n\t\tthis.speed = speed;\n\t}", "public void setSpeed(int speed) {\n\t\tthis.speed = speed;\n\t}", "@Override\n @Deprecated // Deprecated so developer does not accidentally use\n public void setSpeed(int speed) {\n }", "public void setWalkSpeed(int n)\n{\n walkSpeed = n;\n}", "public void setSpeed(long speed) {\n\t\tmSpeed = speed;\n\t}", "public static void moveArm(double speed) {\n\t\tSmartDashboard.putNumber(\"Arm Max value\",maxPos);\n\t\tSmartDashboard.putNumber(\"Arm Min value\",minPos);\n\t\tActuators.getArmAngleMotor().changeControlMode(TalonControlMode.PercentVbus);\t//CHECK THIS SCOTT\n\t\tSmartDashboard.putNumber(\"Percent of Arm Angle\", unMapPosition(Actuators.getArmAngleMotor().getPosition()));\t//CHECK THIS SCOTT\n\t\tSmartDashboard.putNumber(\"Arm Position\", Actuators.getArmAngleMotor().getPosition());\n\t\tSmartDashboard.putNumber(\"THeoreticalPID position\", mapPosition(unMapPosition(Actuators.getArmAngleMotor().getPosition())));\n\t\tif (Gamepad.secondary.getBack()) {\n\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t} else {\n\t\t\tif ((Actuators.getArmAngleMotor().getPosition() < MAX_ARM_POSITION && Sensors.getArmMinLimitSwitch().get())\n\t\t\t\t\t&& speed > 0) {\n\t\t\t\tActuators.getArmAngleMotor().set(speed / 2);\n\t\t\t} else if ((Actuators.getArmAngleMotor().getPosition() > MIN_ARM_POSITION\n\t\t\t\t\t&& Sensors.getArmMaxLimitSwitch().get()) && speed < 0) {\n\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t} else if (!Sensors.getArmMaxLimitSwitch().get()){\n\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\tmaxPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t} else if (!Sensors.getArmMinLimitSwitch().get()){\t\t\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\tminPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t}\n\t\t\telse {\n\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\n\t\t\t}\n\n\t\t\t// speed = -speed;\n\t\t\tSmartDashboard.putNumber(\"Arm Position\", Actuators.getArmAngleMotor().getPosition());\n\t\t\tif (Gamepad.secondary.getBack()) {\n\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t} else {\n\t\t\t\tif ((Sensors.getArmMaxLimitSwitch().get()) && speed < 0) {\n\t\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t\t} else if ((Sensors.getArmMinLimitSwitch().get()) && speed > 0) {\n\t\t\t\t\tActuators.getArmAngleMotor().set(speed);\n\t\t\t\t} else if (!Sensors.getArmMaxLimitSwitch().get()){\n\t\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\t\tmaxPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t\t} else if (!Sensors.getArmMinLimitSwitch().get()){\t\t\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\t\t\t\t//CHECK THIS SCOTT\n\t\t\t\t\tminPos = Actuators.getArmAngleMotor().getPosition();\t\t//CHECK THIS SCOTT\n\t\t\t\t} else {\n\t\t\t\t\tActuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t// if (!(/*\n\t\t\t\t// * Actuators.getArmAngleMotor().getPosition() >\n\t\t\t\t// * MAX_ARM_POSITION &&\n\t\t\t\t// */\n\t\t\t\t// Sensors.getArmMaxLimitSwitch().get()) && speed > 0) {\n\t\t\t\t// Actuators.getArmAngleMotor().set(speed);\n\t\t\t\t// } else if (!(/*\n\t\t\t\t// * Actuators.getArmAngleMotor().getPosition() <\n\t\t\t\t// * MIN_ARM_POSITION &&\n\t\t\t\t// */\n\t\t\t\t// Sensors.getArmMinLimitSwitch().get()) && speed < 0) {\n\t\t\t\t// Actuators.getArmAngleMotor().set(speed);\n\t\t\t\t// } else {\n\t\t\t\t// Actuators.getArmAngleMotor().set(Actuators.STOP_MOTOR);\n\t\t\t\t//\n\t\t\t\t// }\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void initialize() {\n Robot.tilt.setSpeed(speed);\n }", "@Override\n public void setSpeed(double speed, int rpm, int measurementsType) {\n speedText.setText(String.format(\"%.1f\", speed));\n if (measurementsType == ThunderBoardPreferences.UNIT_METRIC) {\n speedUnitsText.setText(getString(R.string.motion_meters_per_second));\n } else {\n speedUnitsText.setText(getString(R.string.motion_feet_per_second));\n }\n rpmText.setText(String.valueOf(rpm));\n }", "public void setRotationSpeed(int speed) {\r\n\t\tsendCommand(9, 5, 3, speed);\r\n\t}", "public void setSpeed(double rpm) {\n\n if (rpm > MAX_SPEED_RPM) {\n rpm = MAX_SPEED_RPM;\n }\n\n m_targetSpeedRPM = rpm;\n double ticks = convertRpmToTicksPer100ms(rpm);\n shooterWheelLeft.set(ControlMode.Velocity, ticks);\n shooterWheelRight.set(ControlMode.Velocity, ticks);\n }", "public void setSpeed() {\n if (this.equals(null)) {\n this.speedValue=-5;\n }\n }", "public void setSpeed(float speed_)\n\t{\n\t\tthis.speed=speed_;\n\t}", "public void setSpeed(double left, double right){\n leftMasterVictor.setSpeed(left);\n rightMasterVictor.setSpeed(-right);\n }", "public void drive(double speed){\n \t\tsetRight(speed);\n \t\tsetLeft(speed);\n \t}", "public void setSpeed(double speed) {\r\n this.speed = Math.min(1.0, Math.max(speed, 0));\r\n }", "public void setSpeeds(int speed) {\n\t\tleftMotor.setSpeed(speed);\n\t\trightMotor.setSpeed(speed);\n\t}", "public void setYSpeed(int speed){\n ySpeed = speed;\n }", "public void changeSpeed() {\n Random gen = new Random();\n speedX += gen.nextInt(3);\n speedY += gen.nextInt(3);\n }", "public static void setSpeed(double lSpeed, double rSpeed)\n\t{\n\t\tdouble targetVelocityRight = rSpeed * Constants.velocityConstant;\n\t\tdouble targetVelocityLeft = lSpeed * Constants.velocityConstant;\n\t\trightSRX.set(ControlMode.Velocity, targetVelocityRight);\n\t\tleftSRX.set(ControlMode.Velocity, targetVelocityLeft);\n\t}", "public void set(double speed) {\n climb_spark_max.set(speed);\n }", "public void setFrontSpeed(double speed) { \r\n fmMotor.set(speed);\r\n }", "public void arm_analog(double speed) {\n if (!get_enabled()) {\n return;\n }\n spark_left_arm.set(RobotMap.Arm.arm_speed_multiplier*speed);\n spark_right_arm.set(RobotMap.Arm.arm_speed_multiplier*speed);\n }", "public void setSpeed(final double speed) {\n m_X.set(ControlMode.PercentOutput, speed); \n }", "public Builder setSimspeed(int value) {\n bitField0_ |= 0x00000004;\n simspeed_ = value;\n onChanged();\n return this;\n }", "public void setSpeed(double speed) {\r\n\t\tthis.speed = speed;\r\n\t\tthis.period = (int) (1000 / speed);\r\n\t}", "protected void execute() {\n \t// Scales the speed based on a proportion of ideal voltage over actual voltage\n \tRobot.shooter.talon.set(0.59 * (12.5 / Robot.pdp.getVoltage()));\n// \tRobot.shooter.talon.enable();\n// \tRobot.shooter.talon.set(Shooter.IDEAL_SPEED * (12.5 / Robot.pdp.getVoltage()));\n }", "public int setSpeed(int i) {\n\t\tspeed = i;\n\t\t//Returning the speed\n\t\treturn speed;\t\t\n\t}", "public void setSpeedStrumMotor(int speed) {\r\n\t\tif (speed == 0)\r\n\t\t\tstrumMotor.stop();\r\n\t\telse\r\n\t\t\tstrumMotor.rotate(speed);\r\n\t}", "public Modem setmodem(int speed, int timeout){ \r\n\t Modem modem;\r\n\t modem=new Modem();\r\n\t modem.setSpeed(speed); // set new speed at 8000 (old speed was at 1000)\r\n\t modem.setTimeout(timeout);\r\n\t return modem;\r\n }", "public void spinTurret(double _speed) {\n turretMotor.set(_speed);\n }", "public void driveRaw (double speed) {\n leftBackMotor.set(speed);\n leftMiddleMotor.set(speed);\n leftFrontMotor.set(speed);\n rightBackMotor.set(speed);\n rightMiddleMotor.set(speed);\n rightFrontMotor.set(speed);\n }", "public void rdrive(double speed){\n right1.set(ControlMode.PercentOutput, -speedRamp(speed));\n right2.set(ControlMode.PercentOutput, -speedRamp(speed));\n }", "public void accelerationSet(double speed){\n\t\tdouble currentDelta = Math.abs(currentSpeed - speed);\r\n\t\tif(currentDelta > maxDelta){\r\n\t\t\tif(speed > currentSpeed){\r\n\t\t\t\tspeed = currentSpeed + maxDelta;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tspeed = currentSpeed - maxDelta;\r\n\t\t\t}\r\n\t\t}\r\n\t//\tSystem.out.println(\"Speed:\" + speed);\r\n\t\tcurrentSpeed = speed;\r\n\t\tsuper.set(speed * motorDirection);\r\n\t}", "protected void setRightMotorSpeed(int speed) {\n if (speed < 10 && speed > -10) {\n rightSpeed = speed;\n }\n }", "public void setDriveSpeed(double speed) {\n\t\tdriveMotor.set(speed);\n\t}", "public void setEditSpeedPressed() {\n String value = JOptionPane.showInputDialog(this, this.applicationDelayText, this.setApplicationDelayText, 3);\n if (value != null) {\n int newSpeed = Integer.parseInt(value.toString());\n this.setSpeed(newSpeed);\n }\n }", "void setNormalSpeed () {\n if (stepDelay == normalSpeed)\n return;\n stepDelay = normalSpeed;\n resetLoop();\n }", "public void liftArm(){armLifty.set(-drivePad.getThrottle());}", "public <T extends Number> void setSpeedPerFrame(T speed){\r\n\t\tif(speed.doubleValue() <= 0){\r\n\t\t\tthis.speed = 1;\r\n\t\t\tSystem.err.println(\"Negative Speed, resulting to a speed of 1!\");\r\n\t\t}else{\r\n\t\t\tthis.speed = speed.doubleValue();\r\n\t\t}\r\n\t}", "private void driveRight() {\n setSpeed(MAX_SPEED, MIN_SPEED);\n }", "public void setSpeed(float n)\n\t{\n\t\tthis.speed = n;\n\t}", "public void setSpeed(int speed) {\n if (speed < 0) {\n this.speed = 0;\n lblVelocidade.setText(this.applicationDelayText + \": 0\");\n return;\n }\n this.speed = speed;\n sliderSpeed.setValue(speed / 10);\n lblVelocidade.setText(this.applicationDelayText + \": \" + speed);\n }", "public void ldrive(double speed){\n left1.set(ControlMode.PercentOutput, speedRamp(speed));\n left2.set(ControlMode.PercentOutput, speedRamp(speed));\n }", "void setPWMRate(double rate);" ]
[ "0.78918344", "0.7790259", "0.7728917", "0.76631874", "0.7630691", "0.7619743", "0.75880677", "0.75462776", "0.75352603", "0.7475318", "0.7427361", "0.7421088", "0.7413698", "0.7404834", "0.7403828", "0.73786443", "0.7325688", "0.7319963", "0.73109496", "0.7295698", "0.72953826", "0.7294727", "0.72669137", "0.72669137", "0.72548014", "0.7242736", "0.7241356", "0.7235904", "0.72303873", "0.72142375", "0.72133297", "0.72084695", "0.71684664", "0.7166105", "0.7138763", "0.71268195", "0.712556", "0.7122886", "0.71224254", "0.7100433", "0.7090557", "0.70868117", "0.7078866", "0.70732147", "0.70614094", "0.70614094", "0.70611465", "0.7059203", "0.7059203", "0.70377666", "0.7036508", "0.7032405", "0.7015597", "0.70150745", "0.69954556", "0.6963501", "0.6963501", "0.6963501", "0.69632536", "0.6950359", "0.694353", "0.69374514", "0.69302386", "0.6926011", "0.6925242", "0.692306", "0.6903713", "0.68875813", "0.6863897", "0.6855341", "0.6844851", "0.683896", "0.68376046", "0.68365204", "0.68324065", "0.68298763", "0.6824094", "0.68138325", "0.68079287", "0.6804038", "0.68016356", "0.67894083", "0.6781121", "0.67800516", "0.6764068", "0.67505", "0.6743064", "0.6727142", "0.6712096", "0.67105484", "0.6698605", "0.6693392", "0.66914475", "0.6690154", "0.6686468", "0.66825205", "0.6682202", "0.6672076", "0.66699564", "0.66651547" ]
0.6806094
79
Used to get the value of the right Joystick Y Axis
public double getRightJoystick() { return HumanInput.getXboxAxis(HumanInput.xboxController, XboxButtons.XBOX_RIGHT_Y_AXIS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getRightJoystickVertical() {\n\t\treturn getRawAxis(RIGHT_STICK_VERTICAL) * -1;\n\t}", "public JoystickButton getButtonY() {\n\t\treturn button[3];\n\t}", "public double getRightYAxis() {\n\t\treturn getRawAxis(Axis_RightY);\n\t}", "public int getY()\n {\n return yaxis;\n }", "public double getRightY() {\r\n\t\treturn adjustInput(driverRight.getY());\r\n\t}", "public double getLeftJoystickVertical() {\n\t\treturn getRawAxis(LEFT_STICK_VERTICAL) * -1;\n\t}", "public int getY() {\n\t\t\tint lastRobot = (state[2 * k] + k - 1) % k;\n\t\t\treturn state[lastRobot + k];\n\t\t}", "public int getY(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(1)/ AvesAblazeHardware.mmPerInch);\n\t}", "public double getRightJoystickHorizontal() {\n\t\treturn getRawAxis(RIGHT_STICK_HORIZONTAL);\n\t}", "@Override\n\tpublic int getY() {\n\t\treturn logicY;\n\t}", "public double GetY(){\n return this._Y;\n }", "public float getUpperRightY()\n {\n return ((COSNumber)rectArray.get(3)).floatValue();\n }", "public double getY() {\n\t\treturn bassY;\n\t}", "public double getYRotate() {\n\t\tif (Math.abs(getRawAxis(Axis_YRotate)) > stickDeadband) {\n\t\t\treturn getRawAxis(Axis_YRotate);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public int getY() {\n return (int) yPos;\n }", "public double getAccelY() {\n return m_accelerometer.getY();\n }", "public double Y_r() {\r\n \t\treturn getY();\r\n \t}", "public int getCurrentY() {\n return currentY;\n }", "public double getY() {\n return GdkEventButton.getY(this);\n }", "public double getYValue(){\n return(yValue);\n }", "public static int getEndYCoordinate(){\n\tint y = getThymioEndField_Y(); \n\t\t\n\t\tif(y == 0){\n\t\t\n \t}else{\n \t y *= FIELD_HEIGHT;\n \t}\n\t\treturn y;\n\t}", "public int getPosicaoY() {\r\n\t\treturn posicaoY;\r\n\t}", "public double getEndY() {\n\treturn v2.getY();\n }", "double getEndY();", "abstract double getDirY();", "public int getY(){\n return this.position[1];\n }", "public int yPos() {\n\t\treturn Engine.scaleY(y);\n\t}", "public double curSwing(){\r\n return swingGyro.getAngle();\r\n }", "public double getLeftYAxis() {\n\t\treturn getRawAxis(Axis_LeftY);\n\t}", "public int getYTachometer() {\n\t\treturn rightMotor.getTachoCount();\n\t}", "public double getYPos() {\n\t\treturn this.position[1];\n\t}", "public double getYValue(){\r\n\t\treturn ((Double)(super.yValue) ).doubleValue(); \r\n\t}", "public double Y()\r\n {\r\n return curY;\r\n }", "public int get_Y_Coordinate()\n {\n return currentBallY;\n }", "public float getTiltY() {\n return pm.pen.getLevelValue(PLevel.Type.TILT_Y);\n }", "public int getYTopRight() {\n return yTopRight;\n }", "public double getAxis(Axis axis) {\n return joystick.getRawAxis(axis.getId());\n }", "public int getPos_y(){\n\t\treturn pos_y;\n\t}", "double getPositionY();", "double getPositionY();", "double getPositionY();", "public String getYKey(){\n return getAxisKey(Axis.Y);\n }", "@Override\r\n\tpublic int getY() {\n\t\treturn (int)y;\r\n\t}", "public double getUserFriendlyYPos(){\n return myGrid.getHeight()/ HALF-yPos;\n }", "public Vector2 handleJoystickInput() {\n if(joystick.getKnobPercentX() == 0 && joystick.getKnobPercentY() == 0) {\n return Vector2.Zero;\n } else {\n return new Vector2(joystick.getKnobPercentX(), joystick.getKnobPercentY());\n }\n }", "double getY() { return pos[1]; }", "public double getY() {\r\n return this.dy;\r\n }", "public int getY() {\n return (int) Math.round(y);\n }", "public double getY2()\n\t{\n\t\treturn this.y[2];\n\t}", "public int getY()\r\n\t{\r\n\t\treturn (int)y;\r\n\t}", "public float getYComponent() {\n return this.vy;\n }", "public double getY_vel() {\n return this.y_vel;\n }", "float getAccY();", "public int getY() {\n\t\treturn this.y_indice * DIM_CASE;\n\t}", "public int getUserPlaneY() {\r\n\t\treturn levelManager.getUserPlaneY();\r\n\t}", "public ChartYAxis getYAxis() { return _yaxis; }", "public double getYDirection() {\r\n return Math.sin(Math.toRadians(angle));\r\n }", "double motor_y () { return strut.span + DRIVING_FORCE_HEIGHT; }", "public int getY() { return (int)y; }", "public static double getY() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ty\").getDouble(0);\n }", "public double getRightJoyY() {\n return rightJoyY;\n }", "public final int getY()\n\t{\n\t\treturn pos.y;\n\t}", "public int y() {\n\t\treturn this.y;\n\t}", "public double getYVel() {\n return this.yVel;\n }", "public int getY()\r\n\t{\r\n\t\treturn this.Y;\r\n\t}", "public int getYPos() {\r\n\t\treturn this.cameraY;\r\n\t}", "public double getYOffset() {\n if (isReal) {\n return get(\"ty\");\n } else {\n return simTy.getDouble(0.0);\n }\n }", "public int getRight(){\n\t\treturn platformHitbox.x+width;\n\t}", "public int getY() {\n return y;\r\n }", "public int getY()\n {\n return rettangoloY; \n }", "public int getY(){\r\n\t\treturn y;\r\n\t}", "public int getY() {\n return pos_y;\n }", "int getY() {\n return yPos;\n }", "public int getY() {return y;}", "public int getY() {\n\t\treturn Y;\n\t}", "public double getY(){\n return this.y;\n }", "private int getY() {\n\t\treturn 0;\r\n\t}", "public int getY()\n\t{\n\t\treturn mY;\n\t}", "public int getY() {\r\n return this.y;\r\n }", "public int getY() {\n return (int) this.ty;\n }", "public int getMovementY() {\r\n return movementY;\r\n }", "public int getY() {\n synchronized (this.yLock) {\n return (int) this.movementComposer.getYPosition();\n }\n }", "public double getY() {\r\n return this.y;\r\n }", "public int getWinY() {\r\n return winY;\r\n }", "public int gety() {\n return y;\n }", "public double getY() { return y; }", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "double getY();", "public float getAccelY() {\n return mAccelY;\n }", "public double getY() {\n return mY;\n }", "double getBallY();", "public int getY(){\n\t\treturn y;\n\t}", "public int getY(){\n\t\treturn y;\n\t}" ]
[ "0.7953686", "0.74482447", "0.7276554", "0.7125315", "0.7117478", "0.7097447", "0.6925891", "0.69181585", "0.6851315", "0.6826518", "0.6780662", "0.66850394", "0.66796935", "0.6677036", "0.6622238", "0.66183895", "0.6601791", "0.65915346", "0.6587539", "0.6559826", "0.65585923", "0.65571964", "0.65364504", "0.65362597", "0.65326154", "0.6525459", "0.6522772", "0.6507897", "0.64906746", "0.6481255", "0.64806247", "0.64788026", "0.6459976", "0.6459931", "0.64518243", "0.64456785", "0.64338547", "0.6432776", "0.64325726", "0.64325726", "0.64325726", "0.6426787", "0.64213824", "0.64160174", "0.64125353", "0.6412261", "0.6407418", "0.64033854", "0.639954", "0.6397517", "0.6397227", "0.63916117", "0.63912445", "0.6385074", "0.63843614", "0.6380932", "0.6380708", "0.6380095", "0.6375596", "0.6366499", "0.63626426", "0.6361953", "0.6356977", "0.6352395", "0.6342405", "0.63402736", "0.6335359", "0.6328111", "0.6319703", "0.6319537", "0.6317019", "0.6311769", "0.63082826", "0.6301841", "0.6297556", "0.6293704", "0.6293315", "0.6292248", "0.6288274", "0.62876505", "0.6285209", "0.62847805", "0.6284308", "0.6283828", "0.6283774", "0.6283244", "0.6282829", "0.6282829", "0.6282829", "0.6282829", "0.6282829", "0.6282829", "0.6282829", "0.6282829", "0.6282829", "0.62825817", "0.6278791", "0.62759", "0.6275771", "0.6275771" ]
0.78458977
1
An implemented method for SensorListener interface
public void receivedValue(HashMap<Sensor, Double> e) { try { armIMUAngle = e.get(Sensor.ARM_ANGLE); } catch (NullPointerException error) { if (debug) System.out.println("Bad Angle Sensor"); } try { currentDist = e.get(Sensor.ULTRASONIC_DISTANCE); } catch (NullPointerException error) { if (debug) System.out.println("Bad Ultrasonic Sensor"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\n\t}", "public void handleSensorEvents(){\n\t}", "public void onSensorChanged() {\n\t\tsensorChanged();\n\t}", "@Override\n public void OnAccuracyChanged(Ssensor arg0, int arg1) {\n }", "public interface OnSensorValueChangeListener {\n public void onSensorValueChanged(int newVal);\n}", "public interface AccelerometerListener extends SensorEventListener {\n\n void onSensorChanged(SensorEvent var1);\n\n void onAccuracyChanged(Sensor var1, int var2);\n\n void start(Context context, int samplingRate, String queryNumber,String ioPair);\n\n void stop();\n\n}", "RegisterSensor() {\n }", "Sensor getSensor();", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_m[0] = event.values[0];\r\n\t\t\t\ttemp_m[1] = event.values[1];\r\n\t\t\t\ttemp_m[2] = event.values[2];\r\n\t\t\t}", "private void initSensor(){\n sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n\n registerListeners();\n }", "public interface LightSensorListener {\r\n\t/**\r\n\t * \r\n\t * When this class is being implemented, this class will be called upon when\r\n\t * one of the light sensors' state changes.\r\n\t * \r\n\t * @param position\r\n\t * the position of the sensor used\r\n\t * @param updatingsensor\r\n\t * the sensor that is been updated\r\n\t * @param oldValue\r\n\t * the value before the change\r\n\t * @param newValue\r\n\t * the value after the change\r\n\t */\r\n\tpublic void lightSensorChanged(Position position,\r\n\t\t\tUpdatingSensor updatingsensor, float oldValue, float newValue);\r\n}", "@Override\n public void onAccuracyChanged(Sensor arg0, int arg1) {\n // Not used within this listener\n }", "@Override\n public void OnSensorChanged(SsensorEvent event) {\n Ssensor sIr = event.sensor;\n StringBuffer sb = new StringBuffer();\n sb.append(\"==== Sensor Information ====\\n\")\n .append(\"Name : \" + sIr.getName() + \"\\n\")\n .append(\"Vendor : \" + sIr.getVendor() + \"\\n\")\n .append(\"Type : \" + sIr.getType() + \"\\n\")\n .append(\"SDK Version : \"\n + mSsensorExtension.getVersionName() + \"\\n\")\n .append(\"MaxRange : \" + sIr.getMaxRange() + \"\\n\")\n .append(\"Resolution : \" + sIr.getResolution() + \"\\n\")\n .append(\"FifoMaxEventCount : \" + sIr.getFifoMaxEventCount()\n + \"\\n\")\n .append(\"Power : \" + sIr.getPower() + \"\\n\")\n .append(\"----------------------------\\n\")\n .append(\"RED LED RAW DATA(HRM) : \" + event.values[0] + \"\\n\");\n tRED.setText(sb.toString());\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n long now = SystemClock.elapsedRealtime();\n\n long deltaMs = 0;\n if (mLastUpdateTS != 0) {\n deltaMs = now - mLastUpdateTS;\n if (mUpdateTargetMs > 0 && deltaMs < mUpdateTargetMs) {\n // New sample is arriving too fast. Discard it.\n return;\n }\n }\n\n // Format and post message for the emulator.\n float[] values = event.values;\n final int len = values.length;\n\n mChangeMsg.order(getEndian());\n mChangeMsg.position(0);\n mChangeMsg.putInt(getType());\n mChangeMsg.putFloat(values[0]);\n if (len > 1) {\n mChangeMsg.putFloat(values[1]);\n if (len > 2) {\n mChangeMsg.putFloat(values[2]);\n }\n }\n postMessage(ProtocolConstants.SENSORS_SENSOR_EVENT, mChangeMsg);\n\n // Computes average update time for this sensor and average globally.\n if (mLastUpdateTS != 0) {\n if (mGlobalAvgUpdateMs != 0) {\n mGlobalAvgUpdateMs = (mGlobalAvgUpdateMs + deltaMs) / 2;\n } else {\n mGlobalAvgUpdateMs = deltaMs;\n }\n }\n mLastUpdateTS = now;\n\n // Update the UI for the sensor, with a static throttling of 10 fps max.\n if (hasUiHandler()) {\n if (mLastDisplayTS != 0) {\n long uiDeltaMs = now - mLastDisplayTS;\n if (uiDeltaMs < 1000 / 4 /* 4fps in ms */) {\n // Skip this UI update\n return;\n }\n }\n mLastDisplayTS = now;\n\n mValues[0] = values[0];\n if (len > 1) {\n mValues[1] = values[1];\n if (len > 2) {\n mValues[2] = values[2];\n }\n }\n mValue = null;\n\n Message msg = Message.obtain();\n msg.what = SENSOR_DISPLAY_MODIFIED;\n msg.obj = MonitoredSensor.this;\n notifyUiHandlers(msg);\n }\n\n if (DEBUG) {\n long now2 = SystemClock.elapsedRealtime();\n long processingTimeMs = now2 - now;\n Log.d(TAG, String.format(\"glob %d - local %d > target %d - processing %d -- %s\",\n mGlobalAvgUpdateMs, deltaMs, mUpdateTargetMs, processingTimeMs,\n mSensor.getName()));\n }\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n }", "public void sensorSystem() {\n\t}", "@Override\n public void onAccuracyChanged(Sensor arg0, int arg1 )\n {\n\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_r[0] = event.values[0];\r\n\t\t\t\ttemp_r[1] = event.values[1];\r\n\t\t\t\ttemp_r[2] = event.values[2];\r\n\t\t\t\t// TipsTextView.setText(String.valueOf(temp_r[0]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[1]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[2]));\r\n\t\t\t}", "@Override\n public void onAccuracyChanged(Sensor arg0, int arg1) {\n\n }", "public void setSensorOn() {\n\n }", "@Override\r\n\t\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) \r\n\t{\n\t}", "public void onAccuracyChanged(int sensor, int accuracy) {\n }", "public void logSensorData () {\n\t}", "@Override\n\t\t\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\n\t\t\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n // Send data to phone\n if (count == 5) {\n count = 0;\n// Log.d(\"hudwear\", \"send accel data to mobile...\"\n// + \"\\nx-axis: \" + event.values[0]\n// + \"\\ny-axis: \" + event.values[1]\n// + \"\\nz-axis: \" + event.values[2]\n// );\n// Log.d(\"hudwear\", \"starting new task.\");\n\n if (connected)\n Log.d(\"atest\", \"values: \" + event.values[0] + \", \" + event.values[1] + \", \" + event.values[2]);\n// new DataTask().execute(new Float[]{event.values[0], event.values[1], event.values[2]});\n }\n else count++;\n }\n }", "@Override\n public void OnSensorChanged(SsensorEvent event) {\n Ssensor sIr = event.sensor;\n StringBuffer sb = new StringBuffer();\n sb.append(\"==== Sensor Information ====\\n\")\n .append(\"Name : \" + sIr.getName() + \"\\n\")\n .append(\"Vendor : \" + sIr.getVendor() + \"\\n\")\n .append(\"Type : \" + sIr.getType() + \"\\n\")\n .append(\"SDK Version : \"\n + mSsensorExtension.getVersionName() + \"\\n\")\n .append(\"MaxRange : \" + sIr.getMaxRange() + \"\\n\")\n .append(\"Resolution : \" + sIr.getResolution() + \"\\n\")\n .append(\"FifoMaxEventCount : \" + sIr.getFifoMaxEventCount()\n + \"\\n\").append(\"Power : \" + sIr.getPower() + \"\\n\")\n .append(\"----------------------------\\n\")\n .append(\"IR RAW DATA(HRM) : \" + event.values[0] + \"\\n\");\n tIR.setText(sb.toString());\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n if( event.values[0] < sensor.getMaximumRange() )\n {\n //// SI LA PANTALLA NO FUE TAPADA ANTERIORMENTE -> GUARDO EL MOMENTO DE INICIO DEL JUEGO\n if( !pantallaEstabaTapada )\n {\n tiempoDeInicio= SystemClock.uptimeMillis();\n pantallaEstabaTapada=true;\n getWindow().getDecorView().setBackgroundColor(Color.RED);\n }\n }\n else\n {\n //// SI LA PANTALLA ESTABA TAPADA Y AHORA NO LO ESTA --> CALCULO LOS SEGUNDOS TRANSCURRIDOS Y DESTRUYO EL LISTENER DEL SENSOR\n if( pantallaEstabaTapada )\n {\n segundosTranscurridos= pasarMilisegundoASegundo(SystemClock.uptimeMillis() - tiempoDeInicio);\n pantallaEstabaTapada=false;\n getWindow().getDecorView().setBackgroundColor(Color.WHITE);\n\n ServicePOST comunicacionApiRest = new ServicePOST(getApplicationContext());\n comunicacionApiRest.registrarEvento(String.valueOf(event.values[0]), \"SENSOR DE PROXIMIDAD\");\n\n sensorManag.unregisterListener(sensorListener);\n\n }\n }\n guardarInfoEnSharedPreference(event.values[0]);\n }", "@Override\n public void onSensorChanged(SensorEvent event)\n {\n // Get the sensor which has triggered the event\n\n Sensor sensor = event.sensor;\n\n // Perform differing functionality depending upon\n // the sensor type (caller)\n\n switch (event.sensor.getType())\n {\n case Sensor.TYPE_STEP_COUNTER:\n\n if (reportedSteps < 1){\n\n // Log the initial value\n\n reportedSteps = (int)event.values [0];\n }\n\n // Calculate steps taken based on\n // first value received.\n\n stepsTaken = (int)event.values [0] - reportedSteps;\n\n // Output the value to the simple GUI\n\n countText.setText(\"Cnt: \" + stepsTaken);\n\n break;\n\n case Sensor.TYPE_STEP_DETECTOR:\n\n // Increment the step detector count\n\n stepDetector++;\n\n // Output the value to the simple GUI\n\n detectText.setText(\"Det: \" + stepDetector);\n\n break;\n\n case Sensor.TYPE_ACCELEROMETER:\n\n // Get the accelerometer values and set them to a string with 2dp\n\n String x = String.format(\"%.02f\", event.values[0]);\n String y = String.format(\"%.02f\", event.values[1]);\n String z = String.format(\"%.02f\", event.values[2]);\n\n // Output the string to the GUI\n\n accelText.setText(\"Acc:\" + x + \",\" + y + \",\" + z);\n\n break;\n }\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public interface SensorUpdateCallback {\n void onBearingValue(float f);\n}", "@Override\r\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\r\n\t\tax = - event.values[0] / 7;\r\n\t\tay = event.values[1] / 7;\r\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n float[] valuesCopy = event.values.clone();\n\n if (uptime == 0) {\n uptime = event.timestamp;\n }\n\n double x = (double) ((event.timestamp - uptime))/1000000000.0;\n this.addValues(x, valuesCopy);\n\n TextView xAxisValue = (TextView) findViewById(R.id.xAxisValue);\n xAxisValue.setText(Float.toString(valuesCopy[0]) + \" \" + STI.getUnitString(sensorType));\n\n if (STI.getNumberValues(sensorType) > 1) {\n //set y value to textfield\n TextView yAxisValue = (TextView) findViewById(R.id.yAxisValue);\n yAxisValue.setText(Float.toString(valuesCopy[1]) + \" \" + STI.getUnitString(sensorType));\n\n //set z value to textfield\n TextView zAxisValue = (TextView) findViewById(R.id.zAxisValue);\n zAxisValue.setText(Float.toString(valuesCopy[2]) + \" \" + STI.getUnitString(sensorType));\n }\n }", "@Override\n \tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n \t\t\n \t}", "@Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n }", "public int Register(){\n\t\tnumSensors = 0;\n\t\tm_azimuth_degrees = Integer.MIN_VALUE;\n\t\tm_sun_azimuth_degrees = 0;\n\t\trawSensorValue = 0;\n\t\tif(mSensorManager.registerListener(this, mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_GAME)) numSensors++; \n\t\treturn numSensors;\t\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\r\n\t}", "@Override\n \tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n \t}", "@Override\n\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) \n\t\t{\n\t\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t}", "@Override\r\n public final void onSensorChanged(SensorEvent event) {\n double a0 = (double) event.values[0];\r\n double a1 = (double) event.values[1];\r\n double a2 = (double) event.values[2];\r\n\r\n double a = sqrt(a0*a0+a1*a1+a2*a2);\r\n\r\n // Do something with this sensor value.\r\n\r\n TextView textView = (TextView) findViewById(R.id.text_box2);\r\n textView.setText(Double.toString(a));\r\n\r\n if(count<size_accels) {\r\n accelerations[count] = a;\r\n times[count] = event.timestamp;\r\n }\r\n count = count + 1;\r\n }", "@Override\n public final void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n accx = event.values[0];\n accy = event.values[1];\n accz = event.values[2];\n }else if (event.sensor.getType() == Sensor.TYPE_GYROSCOPE) {\n gyx = event.values[0];\n gyy = event.values[1];\n gyz = event.values[2];\n } else if (event.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {\n magx = event.values[0];\n magy = event.values[1];\n magz = event.values[2];\n }\n }", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\r\n\t}", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\tMessage msg = null;\n\t\tfloat values[] = event.values;\n\t\tsynchronized (this) { \n\t\t\tswitch(event.sensor.getType()) {\n\t\t\t/** 4.LIGHT:SensorEvent type is TYPE_LIGHT */\n\t\t\tcase Sensor.TYPE_LIGHT:\n\t\t\t\tsendLSensorChangedMSG(values, msg);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t} // end of switch(event.sensor.getType())\n\t\t} // end of synchronized (this)\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t}", "public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER && event.sensor.getType() != Sensor.TYPE_GYROSCOPE)\n return;\n\n if(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n sensorCount++;\n\n if (sensorFirstRead) {\n nanotime = System.nanoTime();\n sensorFirstRead = false;\n } else {\n\n if (sensorCount > 0 && sensorCount % 10 == 0) {\n differenceNanoTime = System.nanoTime() - nanotime;\n if (differenceNanoTime > sensorCounterIntervalDelay) {\n differenceSeconds = (double) differenceNanoTime / 1000000000f;\n\n sensorAverageCount = sensorCount / differenceSeconds;\n sensorAverageCountTextView.setText(String.format(\"Read/s: %.2f\", sensorAverageCount));\n\n if (sensorFirstAverageCycle || Math.abs(sensorAverageCount - accValuesLimit * 2) > accValuesLimit * 0.2) {\n if (sensorFirstAverageCycle)\n sensorFirstAverageCycle = false;\n\n accValuesLimit = (int) sensorAverageCount / 2;\n gyroValuesLimit = accValuesLimit / 2;\n sensorCountLimitTextView.setText(String.format(\"Sensor count limit: %d\", accValuesLimit));\n\n stats.get(\"accX\").setLimit(accValuesLimit);\n stats.get(\"accY\").setLimit(accValuesLimit);\n stats.get(\"accZ\").setLimit(accValuesLimit);\n stats.get(\"accDegreeZ\").setLimit(accValuesLimit);\n stats.get(\"accDegreeX\").setLimit(accValuesLimit);\n stats.get(\"accDegreeY\").setLimit(accValuesLimit);\n stats.get(\"accTotalAcceleration\").setLimit(accValuesLimit);\n stats.put(\"gyroX\", new StatisticList(gyroValuesLimit));\n stats.put(\"gyroY\", new StatisticList(gyroValuesLimit));\n stats.put(\"gyroZ\", new StatisticList(gyroValuesLimit));\n }\n\n sensorCount = 0;\n nanotime = System.nanoTime();\n }\n }\n }\n }\n\n if(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n\n mAccelerometerSensorX = event.values[0];\n mAccelerometerSensorY = event.values[1];\n mAccelerometerSensorZ = event.values[2];\n\n mAccelerometerTotalAcceleration = Math.sqrt(Math.pow(mAccelerometerSensorX, 2) + Math.pow(mAccelerometerSensorY, 2) + Math.pow(mAccelerometerSensorZ, 2));\n\n stats.get(\"accX\").addValue(mAccelerometerSensorX);\n stats.get(\"accY\").addValue(mAccelerometerSensorY);\n stats.get(\"accZ\").addValue(mAccelerometerSensorZ);\n stats.get(\"accTotalAcceleration\").addValue(mAccelerometerTotalAcceleration);\n\n tmp_y = stats.get(\"accY\").getAverage() / stats.get(\"accTotalAcceleration\").getAverage(); // g\n tmp_x = stats.get(\"accX\").getAverage() / stats.get(\"accTotalAcceleration\").getAverage();\n tmp_z = stats.get(\"accZ\").getAverage() / stats.get(\"accTotalAcceleration\").getAverage();\n\n mRotationDegreeZ = Math.asin(tmp_x) * 180 / Math.PI;\n if (Double.isNaN(mRotationDegreeZ))\n mRotationDegreeZ = stats.get(\"accDegreeZ\").getAverage() > 0 ? 90 : -90;\n\n mRotationDegreeX = Math.asin(tmp_z) * 180 / Math.PI;\n if (Double.isNaN(mRotationDegreeX))\n mRotationDegreeX = stats.get(\"accDegreeX\").getAverage() > 0 ? 90 : -90;\n\n mRotationDegreeY = Math.asin(tmp_y) * 180 / Math.PI;\n if (Double.isNaN(mRotationDegreeY))\n mRotationDegreeY = stats.get(\"accDegreeY\").getAverage() > 0 ? 90 : -90;\n\n stats.get(\"accDegreeZ\").addValue(mRotationDegreeZ);\n stats.get(\"accDegreeX\").addValue(mRotationDegreeX);\n stats.get(\"accDegreeY\").addValue(mRotationDegreeY);\n\n updateLog(Sensor.TYPE_ACCELEROMETER);\n }\n else\n if(event.sensor.getType()==Sensor.TYPE_GYROSCOPE)\n {\n mGyroX = event.values[0];\n mGyroY = event.values[1];\n mGyroZ = event.values[2];\n\n stats.get(\"gyroX\").addValue(mGyroX);\n stats.get(\"gyroY\").addValue(mGyroY);\n stats.get(\"gyroZ\").addValue(mGyroZ);\n\n updateLog(Sensor.TYPE_GYROSCOPE);\n }\n }", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n \n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n\n // This code is directly taken from the Android website.\n // I used it since the linear accelerometer doesn't seem to work correctly.\n // Without borrowing this code, I would have had no idea how to do this.\n // https://developer.android.com/guide/topics/sensors/sensors_motion.html\n\n final float alpha = 0.8F;\n\n // Isolate the force of gravity with the low-pass filter.\n gravity[0] = alpha * gravity[0] + (1 - alpha) * event.values[0];\n gravity[1] = alpha * gravity[1] + (1 - alpha) * event.values[1];\n gravity[2] = alpha * gravity[2] + (1 - alpha) * event.values[2];\n\n // don't include first 10 pieces of data to make sure sensor is properly adjusted\n if(accuracyCounter>=0) {\n accuracyCounter--;\n } else {\n // Add the information to the dataset.\n dataSet.establishNextDataPoint(\n event.values[0] - gravity[0],\n event.values[1] - gravity[1],\n event.values[2] - gravity[2]);\n }\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "public void onAccuracyChanged(Sensor arg0, int arg1) {\n }", "@Override\n\t\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\n\t\t}", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\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 }", "public void onAccuracyChanged(int sensor, int accuracy) {\n\n }", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n storage.writePhoneAccelerometer(new double[]{sensorEvent.values[0], sensorEvent.values[1], sensorEvent.values[2]});\n //System.out.println(\"x: \" + sensorEvent.values[0] + \", y: \" + sensorEvent.values[1] + \", z: \" + sensorEvent.values[2]);\n }", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n if (sensorEvent.sensor.getType() == Sensor.TYPE_ACCELEROMETER && s.equals(\"Accelerometre\")) {\n float Ax = sensorEvent.values[0];\n float Ay = sensorEvent.values[1];\n float Az = sensorEvent.values[2];\n\n acce = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Ax = \" + Ax + \" \" + \"\\n Ay = \" + Ay + \" \" + \"\\n Az = \" + Az + \"\\n\";\n\n // Do something with this sensor value .\n sensorTxt.setText(acce);\n Log.d(TAG, \" TimeAcc = \" + sensorEvent.timestamp + \" Ax = \" + Ax + \" \" + \" Ay = \" + Ay + \" \" + \" Az = \" + Az);\n }\n\n //LUMIERE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_LIGHT && s.equals(\"Lumiere\")) {\n // La valeur de la lumière\n float lv = sensorEvent.values[0];\n\n light = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Light value = \" + lv + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(light);\n }\n\n //PROXIMITE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_PROXIMITY && s.equals(\"Proximite\")) {\n // La valeur de proximité\n float p = sensorEvent.values[0];\n\n proxi = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Proximite value = \" + p + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(proxi);\n }\n\n //GYROSCOPE\n if (sensorEvent.sensor.getType() == Sensor.TYPE_GYROSCOPE && s.equals(\"Gyroscope\")) {\n // Les valeurs du gyroscope\n float xGyroscope = sensorEvent.values[0];\n float yGyroscope = sensorEvent.values[1];\n float zGyroscope = sensorEvent.values[2];\n\n gyro = \" TimeAcc = \" + sensorEvent.timestamp + \"\\n Valeur du gyroscope \\n Valeur en x = \" + xGyroscope + \" \" + \"\\n Valeur en y = \" + yGyroscope + \" \" + \"\\n Valeur en z = \" + zGyroscope + \"\\n\";\n //On affiche la valeur\n sensorTxt.setText(gyro);\n }\n\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\t\n\t\t}", "protected void onResume(){\n super.onResume();\n //sensorManager.registerListener(this, barometro, SensorManager.SENSOR_DELAY_FASTEST);\n }", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\n\t}", "protected Sensor[] getSensorValues() { return sensors; }", "@Override\n\tpublic void setupSensors() {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t\n\t}", "public void onSensorChanged(SensorEvent event) {\n\t\t\tint type = event.sensor.getType();\n\t\t\tif (type == Sensor.TYPE_ACCELEROMETER) {\n\t\t\t\tlong curTime = System.currentTimeMillis();\n\t\t\t\t// only allow one update every 100ms, otherwise updates\n\t\t\t\t// come way too fast and the phone gets bogged down\n\t\t\t\t// with garbage collection\n\t\t\t\t//Log.d(TAG, \"onSensorChanged(\"+type+\")\");\t\t\t\t\n\t\t\t\tif (lastUpdate == -1 || (curTime - lastUpdate) > 40) {\n\t\t\t\t\tlastUpdate = curTime;\t\t\t\t\n\t\t\t\t\tsynchronized (LOCK){\n\t\t\t\t\t\tmLastAccOrientation = calculateAngle(event);\n\t\t\t\t\t\tmLastSample.x = event.values[0];\n\t\t\t\t\t\tmLastSample.y = event.values[1];\n\t\t\t\t\t\tmLastSample.z = event.values[2];\n\t\t\t\t\t\tmLastSample.angle = mLastAccOrientation.angle;\t\t\n\t\t\t\t\t\t//mLastSample.orientation = mLastAccOrientation.orientation;\n\t\t\t\t\t\tmLastSample.orientation = mLastAccOrientation.rotation*90;\n\t\t\t\t\t\tmLastSample.threshold = mLastAccOrientation.threshold;\n\t\t\t\t\t\tmBuffer = mLastSample.x+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.y+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.z+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.angle+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.orientation+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.threshold;\n\t\t\t\t\t\tif (mShowLog)\n\t\t\t\t\t\t\tLog.d(TAG, mBuffer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "DeviceSensor createDeviceSensor();", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n public void onAccuracyChanged(Sensor sensor, int accuracy) {\n }", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor arg0, int arg1) {\n\t\t// TODO Auto-generated method stub\n\t}", "private void registerListener() {\n mSensorManager.registerListener(this,\n mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),\n SensorManager.SENSOR_DELAY_NORMAL);\n\n stepManager.DisplayStepCountInfo();\n }", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\trawSensorValue = Math.round(event.values[0]); \n\t\twhile (rawSensorValue < 0) rawSensorValue += 360;\n\t\tm_azimuth_degrees = rawSensorValue - m_sun_azimuth_degrees;\n\t\twhile (m_azimuth_degrees < 0) m_azimuth_degrees += 360;\n\t\t\n\t\t// get pitch value\n\t\tint rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n\t\tif ((rotation == 0) || (rotation == 2)) m_pitch_degrees = Math.abs((int)event.values[1]); \n\t\telse m_pitch_degrees = Math.abs((int)event.values[2]);\n\t\t\n\t\t// Update event\n\t\tif (m_parent != null) m_parent.onSensorChanged(event);\n\t}", "@Override\r\n\t\t\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\r\n\t\t\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n deltaX = Math.abs(lastX - event.values[0]);\n deltaY = Math.abs(lastY - event.values[1]);\n deltaZ = Math.abs(lastZ - event.values[2]);\n\n // if the change is below 5, it is just plain noise\n if (deltaX < 5)\n deltaX = 0;\n if (deltaY < 5)\n deltaY = 0;\n if (deltaZ < 5)\n deltaZ = 0;\n\n // set the last know values of x,y,z\n lastX = event.values[0];\n lastY = event.values[1];\n lastZ = event.values[2];\n\n vibrate();\n\n }", "public interface Sensor {\n\n\n\n\n /**\n * Each sensor simulator must collect and\n * report on the temperature of the oven simulator every 100 milliseconds.\n *\n * Each report must include a time stamp and a sensor identifier.\n */\n public abstract void temperatureReport();\n\n public abstract void timer(long milliseconds);\n\n public abstract void updateTemperature(int ovenTemperature);\n\n public abstract void updateTimestamp();\n\n /**\n * To set sensor on or off.\n * @param state set sensor on or off based on oven.\n */\n public abstract void setSensorState(boolean state);\n\n\n\n}", "@Override\n\tpublic void onSensorChanged(SensorEvent se) {\n\t\teventIesim++;\n\t\tif(eventIesim == THRESHOLD_EVENTS)\n\t\t{\n\n\t\t\tswitch (se.sensor.getType())\n\t\t\t{\n\t\t\t\tcase Sensor.TYPE_ACCELEROMETER:\n\t\t\t\t{\n\t\t\t\t\taccelerometerValues = se.values.clone();\n\t\t\t\t\tnew ListenerThread(accelerometerValues,delta_orientation,context,gps).start(); // use the last orientation set\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Sensor.TYPE_MAGNETIC_FIELD:\n\t\t\t\t{\n\t\t\t\t\tgeomagneticMatrix = se.values.clone();\n\t\t\t\t\tsensorReady = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t} \n\n\t\t\tif (geomagneticMatrix != null && accelerometerValues != null && sensorReady) \n\t\t\t{\n\t\t\t\tsensorReady = false;\n\n\t\t\t\tfloat[] R = new float[16];\n\t\t\t\tfloat[] I = new float[16];\n\n\t\t\t\tSensorManager.getRotationMatrix(R, I, accelerometerValues, geomagneticMatrix);\n\n\t\t\t\tfloat[] actual_orientation = new float[3];\n\t\t\t\tSensorManager.getOrientation(R, actual_orientation); // lastorientation filled with orientation in radiant\n\t\t\t\t\n\t\t\t\tdelta_orientation[0]= (delta_orientation[0] > actual_orientation[0]) ? (delta_orientation[0] - actual_orientation[0]) : (actual_orientation[0] - delta_orientation[0]);\n\t\t\t\tdelta_orientation[1]= (delta_orientation[1] > actual_orientation[1]) ? (delta_orientation[1] - actual_orientation[1]) : (actual_orientation[1] - delta_orientation[1]);\n\t\t\t\tdelta_orientation[2]= (delta_orientation[2] > actual_orientation[2]) ? (delta_orientation[2] - actual_orientation[2]) : (actual_orientation[2] - delta_orientation[2]);\n\n\t\t\t\tLog.i(TAG, \"acceleration with gravity x:\"+accelerometerValues[0]+\" y:\"+accelerometerValues[1]+\" z:\"+accelerometerValues[2]);\n\n\t\t\t\tnew ListenerThread(accelerometerValues,delta_orientation,context,gps).start();\n\n\t\t\t\tLog.i(TAG, \"orientation x:\"+delta_orientation[0]+\" y:\"+delta_orientation[1]+\" z:\"+delta_orientation[2]);\n\t\t\t\t//Toast.makeText(context, \"orientation x:\"+delta_orientation[0]+\" y:\"+delta_orientation[1]+\" z:\"+delta_orientation[2], Toast.LENGTH_SHORT).show();\n\t\t\t\t\n\t\t\t\tdelta_orientation = actual_orientation;\n\t\t\t}\n\t\t\teventIesim = 0;\n\t\t}\n\t\t\n\n\n\t}", "@Override\n\tprotected int getSensorData() {\n\t\treturn sensor.getLightValue();\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n textView.setText(event.values[0]+\"\\n\"+event.values[1]+\"\\n\"+event.values[2]);\n\n }", "private void registerSensors()\n {\n // Double check that the device has the required sensor capabilities\n\n if(!HasGotSensorCaps()){\n showToast(\"Required sensors not supported on this device!\");\n return;\n }\n\n // Provide a little feedback via a toast\n\n showToast(\"Registering sensors!\");\n\n // Register the listeners. Used for receiving notifications from\n // the SensorManager when sensor values have changed.\n\n sensorManager.registerListener(this, senStepCounter, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(this, senStepDetector, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(this, senAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);\n }", "@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\r\n\t}", "@Override\r\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\r\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}", "@Override\n\tpublic void onAccuracyChanged(Sensor sensor, int accuracy) {\n\t\t\n\t}" ]
[ "0.79884076", "0.79884076", "0.7766017", "0.77634513", "0.7722349", "0.7544246", "0.73463416", "0.72956544", "0.72741115", "0.7216471", "0.72013956", "0.7120534", "0.7068367", "0.70447737", "0.7001158", "0.69931245", "0.69690484", "0.69690484", "0.69621813", "0.69522864", "0.6920795", "0.69120115", "0.69045454", "0.6898673", "0.6887093", "0.68864506", "0.6885124", "0.687582", "0.6874886", "0.6863515", "0.6851261", "0.6849352", "0.68423045", "0.68423045", "0.68423045", "0.6836217", "0.6833993", "0.6829084", "0.68280554", "0.6817814", "0.6817734", "0.6816049", "0.68112683", "0.68056935", "0.6802622", "0.6799552", "0.67955995", "0.67943436", "0.6787971", "0.6782104", "0.6781162", "0.6777019", "0.6774518", "0.6770041", "0.6759926", "0.6758154", "0.6755924", "0.674749", "0.6745827", "0.6744139", "0.6740316", "0.67334366", "0.67332417", "0.67332417", "0.6726173", "0.67211777", "0.6714218", "0.67105496", "0.67068523", "0.6705421", "0.6705421", "0.67047656", "0.66999465", "0.6691489", "0.6691489", "0.6691489", "0.6691489", "0.6691489", "0.6691489", "0.6691489", "0.6691489", "0.66914", "0.66914", "0.66914", "0.6686233", "0.6685754", "0.6682809", "0.666156", "0.66574347", "0.664619", "0.6645512", "0.6638625", "0.6636924", "0.6636924", "0.66358197", "0.6627657", "0.66258407", "0.66258407", "0.6624226", "0.6624226", "0.6624226" ]
0.0
-1
MrrckApplication.getInstance().laitude = 0; MrrckApplication.getInstance().longitude = 0;
@Override public void doCancel() { commonDialog.dismiss(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setMyLatLong() {\n }", "private void m6903a() {\n SharedPreferences sharedPreferences = getSharedPreferences(C1848b.a().getClass().getName(), 0);\n this.f5647p = (double) Float.parseFloat(sharedPreferences.getString(\"beast.location.manager.lat\", \"0\"));\n this.f5648q = (double) Float.parseFloat(sharedPreferences.getString(\"beast.location.manager.lon\", \"0\"));\n if (this.f5647p == 0.0d && this.f5648q == 0.0d) {\n this.f5645n.a(getResources().getString(C1373R.string.str_locating_failed));\n return;\n }\n this.f5646o = new C2219a(this);\n this.f5640i.clear();\n m6904a(this.f5648q, this.f5647p, 300.0f, this.f5650s, this.f5651t, this.f5652u, this.f5653v, \"\");\n }", "public void setLocation(){\n //Check if user come from notification\n if (getIntent().hasExtra(EXTRA_PARAM_LAT) && getIntent().hasExtra(EXTRA_PARAM_LON)){\n Log.d(TAG, \"Proviene del servicio, lat: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LAT) + \" - lon: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LON));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(getIntent().getExtras().getDouble(EXTRA_PARAM_LAT), getIntent().getExtras().getDouble(EXTRA_PARAM_LON)), 18));\n NotificationManager mNM = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n mNM.cancel(1);\n } else{\n if (bestLocation!=null){\n Log.d(TAG, \"Posicion actual -> LAT: \"+ bestLocation.getLatitude() + \" LON: \" + bestLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(bestLocation.getLatitude(), bestLocation.getLongitude()), 16));\n } else{\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(41.651981, -4.728561), 16));\n }\n }\n }", "public void handleGPS()\n {\n\t\t\n\t\tRunnable r2 = new Runnable() {\n\n public void run() {\n \ttry {\n BlackBerryCriteria criteria = new BlackBerryCriteria(GPSInfo.GPS_MODE_AUTONOMOUS);\n\n try\n {\n BlackBerryLocationProvider myProvider =\n (BlackBerryLocationProvider)\n LocationProvider.getInstance(criteria);\n\n try\n {\n BlackBerryLocation myLocation = (BlackBerryLocation)myProvider.getLocation(300);\n\n int satCount = myLocation.getSatelliteCount();\n \n setLat(myLocation.getQualifiedCoordinates().getLatitude());\n setLongt(myLocation.getQualifiedCoordinates().getLongitude());\n \n //data.setVisibleNone();\n \t\tMapLocation test = new MapLocation(myLocation.getQualifiedCoordinates().getLatitude(), myLocation.getQualifiedCoordinates().getLongitude(), \"test\", null);\n \t\tint testId = data.add((Mappable) test, \"test\");\n \t\tdata.tag(testId, \"test\");\n \t\tdata.setVisibleNone();\n \t\tdata.setVisible( \"test\");\n// \t\tMapAction action = map.getAction();\n// \t\taction.setCentreAndZoom(new MapPoint(43.47462, -80.53820), 2);\n \t\tmap.getMapField().update(true);\n \n \n \n \n int signalQuality = myLocation.getAverageSatelliteSignalQuality();\n int dataSource = myLocation.getDataSource();\n int gpsMode = myLocation.getGPSMode();\n\n SatelliteInfo si;\n StringBuffer sb = new StringBuffer(\"[Id:SQ:E:A]\\n\");\n String separator = \":\";\n\n for (Enumeration e = myLocation.getSatelliteInfo();\n e!=null && e.hasMoreElements(); )\n {\n si = (SatelliteInfo)e.nextElement();\n sb.append(si.getId() + separator);\n sb.append(si.getSignalQuality() + separator);\n sb.append(si.getElevation() + separator);\n sb.append(si.getAzimuth());\n sb.append('\\n');\n System.out.println(sb);\n }\n }\n catch ( InterruptedException iex )\n {\n Logger.log(iex.toString());\n }\n catch ( LocationException lex )\n {\n \tLogger.log(lex.toString());\n }\n }\n catch ( LocationException lex )\n {\n \tLogger.log(lex.toString());\n }\n }\n catch ( UnsupportedOperationException uoex )\n {\n \tLogger.log(uoex.toString());\n }\n\n// return;\n }\n\t\t};\n\t\tcontroller.invokeLater(r2);\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_map);\n\n\t\tdb = new DBManager(MapActivity.this);\n\n\t\tCalendar cal = Calendar.getInstance();\n\t\tmarker.add(new MarkerOptions());\n\n\t\tmGoogleMap = ((SupportMapFragment) getSupportFragmentManager()\n\t\t\t\t.findFragmentById(R.id.map)).getMap(); // 화면에 구글맵 표시\n\n\t\tmGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cp)); // 지정위치로\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 이동\n\t\tops.clear(); // 기존에 쌓여있을지 모르는 Polyline clear\n\n\t\tBundle bundle = getIntent().getExtras();\n\n\t\t// 집주소 읽기\n\t\tHomeLocation homeLoc = readSettingOptionFile(getApplicationContext());\n\t\tmyHomeX = homeLoc.x;\n\t\tmyHomeY = homeLoc.y;\n\t\tLog.v(TAG, \"myHomeX= \" + myHomeX + \"myHomeY= \" + myHomeY);\n\n\t\t// Main\n// cal.get(Calendar.YEAR)\n\t\tif (bundle == null) {\n\t\t\tresult = db\n\t\t\t\t\t.read(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1,\n\t\t\t\t\t\t\tcal.get(Calendar.DAY_OF_MONTH));\n\t\t} else {\n\t\t\tresult = db.read(bundle.getInt(\"curyear\"),\n\t\t\t\t\tbundle.getInt(\"curmonth\"), bundle.getInt(\"curday\"));\n\t\t}\n\n\t\t// 처음 화면과 Zoom-level을 설정.\n\t\tif (result.size() < 10) {\n\t\t\tCameraPosition cp = new CameraPosition.Builder()\n\t\t\t\t\t.target((new LatLng(result.get(0).getLatitude(), result\n\t\t\t\t\t\t\t.get(0).getLongitude()))).zoom(17).build();\n\t\t\tmGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cp));\n\t\t} else {\n\t\t\tCameraPosition cp = new CameraPosition.Builder()\n\t\t\t\t\t.target((new LatLng(result.get(result.size() - 1)\n\t\t\t\t\t\t\t.getLatitude(), result.get(result.size() - 1)\n\t\t\t\t\t\t\t.getLongitude()))).zoom(15).build();\n\t\t\tmGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cp));\n\t\t}\n\t\tLog.v(TAG, \"result.size() = \" + result.size());\n\n\t\t// 선택한 Day의 데이터를 바탕으로 행동별로 선을 그려주는 부분\n\t\tops.add(new PolylineOptions());\n\t\tfor (int i = 0; i < result.size(); i++) {\n\t\t\tif (i == 0) {\n\t\t\t\tswitch (result.get(i).getMotionType()) {\n\t\t\t\tcase act_walk:\n\t\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t\t.add(new LatLng(result.get(i).getLatitude(), result\n\t\t\t\t\t\t\t\t\t.get(i).getLongitude())).color(0x99FF5A5A));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_run:\n\t\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t\t.add(new LatLng(result.get(i).getLatitude(), result\n\t\t\t\t\t\t\t\t\t.get(i).getLongitude())).color(0x9900C6ED));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_stop:\n\t\t\t\t\tmGoogleMap.addPolyline(ops.get(index).add(\n\t\t\t\t\t\t\tnew LatLng(result.get(i).getLatitude(), result.get(\n\t\t\t\t\t\t\t\t\ti).getLongitude())));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tops.add(new PolylineOptions());\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch (result.get(i).getMotionType()) {\n\t\t\tcase act_walk:\n\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t.add(new LatLng(result.get(i - 1).getLatitude(), result\n\t\t\t\t\t\t\t\t.get(i - 1).getLongitude())).color(0x99FF5A5A));\n\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t.add(new LatLng(result.get(i).getLatitude(), result\n\t\t\t\t\t\t\t\t.get(i).getLongitude())).color(0x99FF5A5A));\n\t\t\t\tbreak;\n\t\t\tcase act_run:\n\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t.add(new LatLng(result.get(i - 1).getLatitude(), result\n\t\t\t\t\t\t\t\t.get(i - 1).getLongitude())).color(0x9900C6ED));\n\t\t\t\tmGoogleMap.addPolyline(ops\n\t\t\t\t\t\t.get(index)\n\t\t\t\t\t\t.add(new LatLng(result.get(i).getLatitude(), result\n\t\t\t\t\t\t\t\t.get(i).getLongitude())).color(0x9900C6ED));\n\t\t\t\tbreak;\n\t\t\tcase act_stop:\n\t\t\t\tmGoogleMap.addPolyline(ops.get(index).add(\n\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(), result.get(\n\t\t\t\t\t\t\t\ti - 1).getLongitude())));\n\t\t\t\tmGoogleMap.addPolyline(ops.get(index).add(\n\t\t\t\t\t\tnew LatLng(result.get(i).getLatitude(), result.get(i)\n\t\t\t\t\t\t\t\t.getLongitude())));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tops.add(new PolylineOptions());\n\t\t\tindex++;\n\t\t}\n\n\t\t// 선택한 Day의 데이터를 바탕으로 행동별로 마커와 이동 시간을 그려주는 부분\n\t\tfor (int i = 0; i < result.size(); i++) {\n\t\t\tif(result.get(i).getIsSleep() == 1)\n\t\t\t\tcontinue;\n\t\t\tif (i == 0) {\n\t\t\t\tstartIndex = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (i == result.size() - 1) {\n\t\t\t\tendIndex = i;\n\t\t\t\tswitch (result.get(i - 1).getMotionType()) {\n\t\t\t\tcase act_walk:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"걷기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 걸으셨습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.walking)));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_run:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"뛰기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 뛰셨습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.running)));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_stop:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"서기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 서있었습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.stop)));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstartIndex = 0;\n\t\t\t\tendIndex = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (result.get(i).getMotionType() == result.get(i - 1)\n\t\t\t\t\t.getMotionType())\n\t\t\t\tcontinue;\n\t\t\telse {\n\t\t\t\tendIndex = i;\n\t\t\t\tswitch (result.get(i - 1).getMotionType()) {\n\t\t\t\tcase act_walk:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"걷기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 걸으셨습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.walking)));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_run:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"뛰기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 뛰셨습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.running)));\n\t\t\t\t\tbreak;\n\t\t\t\tcase act_stop:\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"서기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 서있었습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.stop)));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstartIndex = i;\n\t\t\t}\n\t\t}\n\n\t\t// 마지막 행동에 대한 아이콘\n\t\tswitch (result.get(result.size() - 1).getMotionType()) {\n\t\tcase act_walk:\n\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t.title(\"걷기\")\n\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 걸으셨습니다.\")\n\t\t\t\t\t.position(\n\t\t\t\t\t\t\tnew LatLng(result.get(result.size() - 1)\n\t\t\t\t\t\t\t\t\t.getLatitude(), result.get(\n\t\t\t\t\t\t\t\t\tresult.size() - 1).getLongitude()))\n\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t.fromResource(R.drawable.walking)));\n\t\t\tbreak;\n\t\tcase act_run:\n\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t.title(\"뛰기\")\n\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 뛰셨습니다.\")\n\t\t\t\t\t.position(\n\t\t\t\t\t\t\tnew LatLng(result.get(result.size() - 1)\n\t\t\t\t\t\t\t\t\t.getLatitude(), result.get(\n\t\t\t\t\t\t\t\t\tresult.size() - 1).getLongitude()))\n\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t.fromResource(R.drawable.running)));\n\t\t\tbreak;\n\t\tcase act_stop:\n\t\t\tmGoogleMap\n\t\t\t\t\t.addMarker(new MarkerOptions()\n\t\t\t\t\t\t\t.title(\"서기\")\n\t\t\t\t\t\t\t.snippet((endIndex - startIndex)*10 + \"초 간 서있었습니다.\")\n\t\t\t\t\t\t\t.position(\n\t\t\t\t\t\t\t\t\tnew LatLng(result.get(result.size() - 1)\n\t\t\t\t\t\t\t\t\t\t\t.getLatitude(), result.get(\n\t\t\t\t\t\t\t\t\t\t\tresult.size() - 1).getLongitude()))\n\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t\t\t.fromResource(R.drawable.stop)));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\t// 수면여부 판단을 통해 화면에 그림을 그려주는 부분\n\t\tfor (int i = 0; i < result.size(); i++) {\n\t\t\tdistanceToHome = distance(myHomeX, myHomeY, result.get(i)\n\t\t\t\t\t.getLatitude(), result.get(i).getLongitude(), 'k');\n\t\t\tLog.v(TAG, \"distanceToHome : \" + distanceToHome + \".........\");\n\t\t\tif (distanceToHome < 0.4)\n\t\t\t\thomeFlag = true;\n\t\t\telse\n\t\t\t\thomeFlag = false;\n\n//\t\t\tLog.v(TAG, \"homeFlag =\" + homeFlag);\n\n\t\t\tif (result.get(i).getIsSleep() == 1 && homeFlag) {\n\t\t\t\tif (sleepCount == 0)\n\t\t\t\t\tsleepCount++;\n\t\t\t\telse {\n\t\t\t\t\tif (result.get(i - 1).getIsSleep() == 1)\n\t\t\t\t\t\tsleepCount++;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tLog.e(TAG, \"sleepCount = \" + sleepCount + \".....\");\n\t\t\tif (sleepCount > 10) {\n\t\t\t\tif (result.get(i-1).getIsSleep() == 1) {\n\t\t\t\t\tmGoogleMap.addCircle(new CircleOptions()\n\t\t\t\t\t\t\t.center(new LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t\t\t.radius(300).fillColor(0x9900C6ED)\n\t\t\t\t\t\t\t.strokeColor(0x5580F5FF));\n\t\t\t\t\tmGoogleMap.addMarker(new MarkerOptions()\n\t\t\t\t\t.title(\"수면\")\n\t\t\t\t\t.position(\n\t\t\t\t\t\t\tnew LatLng(result.get(i - 1).getLatitude(),\n\t\t\t\t\t\t\t\t\tresult.get(i - 1).getLongitude()))\n\t\t\t\t\t.icon(BitmapDescriptorFactory\n\t\t\t\t\t\t\t.fromResource(R.drawable.sleep)));\n//\t\t\t\t\tLog.e(TAG, \"수면시 반경표시 .....\");\n\t\t\t\t\tsleepCount=0;\n\t\t\t\t}\n\t\t\t}\n//\t\t\tLog.e(TAG, \"sleepCount = \" + sleepCount + \".....\");\n\t\t}\n\t}", "@SuppressLint(\"MissingPermission\")\r\n public void initLocation(){\r\n //LocationManager.NETWORK_PROVIDER Otra opcion\r\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 2, new LocationListener() {\r\n @Override\r\n public void onLocationChanged(@NonNull Location location) {\r\n LatLng pos = new LatLng(location.getLatitude(), location.getLongitude());\r\n myMarker.setPosition(pos);\r\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(pos, 16));\r\n }\r\n\r\n @Override\r\n public void onStatusChanged(String provider, int status, Bundle extras) {\r\n\r\n }\r\n\r\n @Override\r\n public void onProviderDisabled(@NonNull String provider) {\r\n\r\n }\r\n\r\n @Override\r\n public void onProviderEnabled(@NonNull String provider) {\r\n\r\n }\r\n });\r\n }", "public void onStop(){mainActivity.locationManager.removeUpdates(mainActivity.locationListener);}", "public static void setCurrentLocation(Double lat, Double lng ){\n //SharedPreferences sharedPreferences1=appCompatActivity. getSharedPreferences(\"longitude\", MODE_PRIVATE) ;\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putString(USER_LTD, String.valueOf(lat));\n editor.putString(USER_LNG, String.valueOf(lng));\n editor.apply();\n }", "private void updateUI() {\n// if (mCurrentLocation != null) {\n// mLatitudeTextView.setText(String.valueOf(mCurrentLocation.getLatitude()));\n// mLongitudeTextView.setText(String.valueOf(mCurrentLocation.getLongitude()));\n// mLastUpdateTimeTextView.setText(mLastUpdateTime);\n// }\n }", "@Override\n public void onConnected(Bundle arg0) {\n mLastLocation=locationHelper.getLocation();\n }", "private void assumeValues() {\n\n if (isDisposed.get()) return;\n\n {// set map values\n MapPosition currentMapPosition = this.map.getMapPosition();\n if (this.mapCenter != null && getCenterGps())\n currentMapPosition.setPosition(this.mapCenter.latitude, this.mapCenter.longitude);\n\n // heading for map must between -180 and 180\n if (mapBearing < -180) mapBearing += 360;\n currentMapPosition.setBearing(mapBearing);\n currentMapPosition.setTilt(this.tilt);\n this.map.setMapPosition(currentMapPosition);\n }\n\n if (this.myPosition != null) {\n if (!ThreadUtils.isMainThread())\n this.map.post(new Runnable() {\n @Override\n public void run() {\n myLocationModel.setPosition(myPosition.latitude, myPosition.longitude, arrowHeading);\n myLocationAccuracy.setPosition(myPosition.latitude, myPosition.longitude, accuracy);\n map.updateMap(true);\n }\n });\n else {\n myLocationModel.setPosition(myPosition.latitude, myPosition.longitude, arrowHeading);\n myLocationAccuracy.setPosition(myPosition.latitude, myPosition.longitude, accuracy);\n map.updateMap(true);\n }\n }\n\n {// set yOffset at dependency of tilt\n if (this.tilt > 0) {\n float offset = MathUtils.linearInterpolation\n (Viewport.MIN_TILT, Viewport.MAX_TILT, 0, 0.8f, this.tilt);\n this.map.viewport().setMapScreenCenter(offset);\n } else {\n this.map.viewport().setMapScreenCenter(0);\n }\n }\n\n {// set mapOrientationButton tilt\n if (this.tilt > 0) {\n float buttonTilt = MathUtils.linearInterpolation\n (Viewport.MIN_TILT, Viewport.MAX_TILT, 0, -60f, this.tilt);\n this.mapOrientationButton.setTilt(buttonTilt);\n } else {\n this.mapOrientationButton.setTilt(0);\n }\n }\n }", "private void initLocation() {\n BaiduLocationHolder.OPTION.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);\n //可选,默认高精度,设置定位模式,高精度,低功耗,仅设备\n\n BaiduLocationHolder.OPTION.setCoorType(\"bd09ll\");\n //可选,默认gcj02,设置返回的定位结果坐标系\n\n int span = 1000;\n BaiduLocationHolder.OPTION.setScanSpan(span);\n //可选,默认0,即仅定位一次,设置发起定位请求的间隔需要大于等于1000ms才是有效的\n\n BaiduLocationHolder.OPTION.setIsNeedAddress(true);\n //可选,设置是否需要地址信息,默认不需要\n\n BaiduLocationHolder.OPTION.setOpenGps(true);\n //可选,默认false,设置是否使用gps\n\n BaiduLocationHolder.OPTION.setLocationNotify(true);\n //可选,默认false,设置是否当GPS有效时按照1S/1次频率输出GPS结果\n\n BaiduLocationHolder.OPTION.setIsNeedLocationDescribe(true);\n //可选,默认false,设置是否需要位置语义化结果,可以在BDLocation.getLocationDescribe里得到,结果类似于“在北京天安门附近”\n\n BaiduLocationHolder.OPTION.setIsNeedLocationPoiList(true);\n //可选,默认false,设置是否需要POI结果,可以在BDLocation.getPoiList里得到\n\n BaiduLocationHolder.OPTION.setIgnoreKillProcess(false);\n //可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死\n\n BaiduLocationHolder.OPTION.SetIgnoreCacheException(false);\n //可选,默认false,设置是否收集CRASH信息,默认收集\n\n BaiduLocationHolder.OPTION.setEnableSimulateGps(false);\n //可选,默认false,设置是否需要过滤GPS仿真结果,默认需要\n\n// BaiduLocationHolder.OPTION.setWifiValidTime(5*60*1000);\n //可选,7.2版本新增能力,如果您设置了这个接口,首次启动定位时,会先判断当前WiFi是否超出有效期,超出有效期的话,会先重新扫描WiFi,然后再定位\n\n BaiduLocationHolder.CLIENT.setLocOption(BaiduLocationHolder.OPTION);\n }", "private void reset() {\n //todo test it !\n longitude = 0.0;\n latitude = 0.0;\n IDToday = 0L;\n venVolToday = 0L;\n PM25Today = 0;\n PM25Source = 0;\n DBCanRun = true;\n DBRunTime = 0;\n isPMSearchRunning = false;\n isLocationChanged = false;\n isUploadRunning = false;\n refreshAll();\n locationInitial();\n DBInitial();\n sensorInitial();\n }", "@Override\n public void onLocationChanged(Location location) {\n Toast.makeText(MapsActivity.this, \"\" + location, Toast.LENGTH_SHORT).show();\n //mMap.clear();\n// longi = location.getLongitude();\n// lat = location.getLatitude();\n//\n// mLastLocation.set(location);\n\n\n mLastLocation = location;\n longi = mLastLocation.getLongitude();\n lat = mLastLocation.getLatitude();\n LatLng lt = new LatLng(lat,longi);\n Log.d(\"cxcxcx\",longi+\"\");\n mMap.addMarker(new MarkerOptions().position(lt).title(longi + \"\" + lat));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(lt, 8));\n\n\n }", "@SuppressLint(\"MissingPermission\")\n private void startup() {\n Log.i(TAG, \"startup: \");\n Log.i(TAG, \"startup: \" + currentLocation.latitude);\n\n }", "public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(C0194R.layout.activity_main);\n initializeGUI();\n this.user = new UserData();\n this.spin = (Spinner) findViewById(C0194R.C0196id.spinLocale);\n setupUI((ScrollView) findViewById(C0194R.C0196id.parent));\n addKeyListener();\n addItemsToSpinner();\n this.spin.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n Locale loct = (Locale) adapterView.getItemAtPosition(i);\n if (loct.getKey()) {\n View promptsView = LayoutInflater.from(main.this.getApplicationContext()).inflate(C0194R.layout.alert_map, (ViewGroup) null);\n AlertDialog.Builder alertDia = new AlertDialog.Builder(main.this);\n alertDia.setTitle(main.this.getResources().getString(C0194R.string.title_map));\n alertDia.setIcon(C0194R.C0195drawable.chimp_stare_48);\n alertDia.setView(promptsView);\n alertDia.setCancelable(false);\n final EditText inLat = (EditText) promptsView.findViewById(C0194R.C0196id.txtLat);\n final EditText inLong = (EditText) promptsView.findViewById(C0194R.C0196id.txtLong);\n ImageView img = (ImageView) promptsView.findViewById(C0194R.C0196id.imgMap);\n img.setFocusable(true);\n img.setFocusableInTouchMode(true);\n img.requestFocus();\n img.setOnTouchListener(new View.OnTouchListener() {\n public boolean onTouch(View view, MotionEvent motionEvent) {\n int x = (int) motionEvent.getX();\n LLfromXY util = new LLfromXY();\n util.setMapValues(420.0d, 760.0d, 50.0d, 24.0d, -126.0d, -66.0d);\n double userLat = util.getLatitude((int) motionEvent.getY());\n double userLon = util.getLongitude(x);\n inLat.setText(Double.toString(userLat));\n inLong.setText(Double.toString(userLon));\n return false;\n }\n });\n alertDia.setNegativeButton(\"Close\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n main.this.setLoc(new Locale(main.HSV_NAME, 34.73d, -86.58d, false));\n main.this.spin.setSelection(0);\n }\n });\n alertDia.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n Locale dummy = new Locale();\n if (main.this.isEmpty(inLat)) {\n dummy.setLatit(34.73d);\n } else {\n dummy.setLatit(Double.parseDouble(inLat.getText().toString()));\n }\n if (main.this.isEmpty(inLong)) {\n dummy.setLongit(-86.58d);\n } else {\n dummy.setLongit(Double.parseDouble(inLong.getText().toString()));\n }\n main.this.setLoc(dummy);\n }\n });\n alertDia.create().show();\n return;\n }\n main.this.setLoc(loct);\n }\n\n public void onNothingSelected(AdapterView<?> adapterView) {\n }\n });\n }", "@Override\n\t public void error()\n\t {\n\t Log.e(\"MAIN\",\"Error finding best guess location\");\n dS.lat=0;\n dS.lon=0;\n if(once)\n {\n\t //promptSetLocationService(MainActivity.this);\n }\n once=false;\n\t }", "@Override\n public void onLocationChanged(Location location) {\n if (location.getProvider().equals(\"gps\")){\n\n locationManager.removeUpdates(this);\n }\n LatLng user_location = new LatLng(location.getLatitude(), location.getLongitude());\n m1.setPosition(user_location);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(user_location, 16));\n\n }", "@Override\n public void onLocationChanged(Location location) {\n if(location!=null)\n {\n lat.setText(location.getLatitude() + \"\");\n lon.setText(location.getLongitude() + \"\");\n }\n else {\n showAlertDialog(\"GPS Connectivity Problem, Try Again!\");\n }\n //pb.setVisibility(View.GONE);\n if ( d1!=null && d1.isShowing() ){\n d1.dismiss();\n d1=null;\n }\n // fetchadd();\n }", "public void onPositionChanged() {\n\n latPeriodic = location.getLatitude();\n lonperiodic = location.getLongitude();\n\n }", "@Override\n public void onLocationChanged(Location location) {\n mLastLocation = location;\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n myMap = googleMap;\n setMap();\n try{\n myMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lastKnown.getLatitude(), lastKnown.getLongitude()), 18.0f));\n }catch (NullPointerException e){\n\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n lat=location.getLatitude();\n Log.e(\"MyLat\",Double.toString(lat));\n lng=location.getLongitude();\n Log.e(\"Mylongitude\",Double.toString(lng));\n /* houni c'est bon khdhina el lat w longitude\n donc just taamel el requete li bch tarmiha fel base\n */\n Toast.makeText(this,Double.toString(lng),Toast.LENGTH_LONG).show();\n\n }", "@Override\r\n\tprotected void onResume() {\r\n\t\tsuper.onResume();\r\n\t\tlm.requestLocationUpdates(lm.GPS_PROVIDER, 500, 1, this);\r\n\t}", "@Override\npublic void onLocationChanged(Location location) {\nString lat = String.valueOf(location.getLatitude());\nString lon = String.valueOf(location.getLongitude());\nLog.e(\"GPS\", \"location changed: lat=\"+lat+\", lon=\"+lon);\n//tv.setText(\"lat=\"+lat+\", lon=\"+lon);\nLatLng coordinates = new LatLng(location.getLatitude(), location.getLongitude()); \nmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(coordinates, 12));\n\n\n//Update Value of Lat Long\n}", "private void m10989Qx() {\n LbsManagerProxy.init(VivaBaseApplication.m8749FZ().getApplicationContext(), AppStateModel.getInstance().isInChina());\n LbsManagerProxy.setAutoStop(true);\n LbsManagerProxy.recordLocation(false, false);\n LbsManagerProxy.resetLocation();\n LbsManagerProxy.recordLocation(true, false);\n }", "@Override\n\t public void onLocationChanged(Location location) \n\t {\n\t dialog.show();\n\t latitudeValue = location.getLatitude();\n\t longitudeValue =location.getLongitude();\n\t if (latitudeValue != 0 && longitudeValue != 0){\n\t \n\t latitude.setText(\"Latitude is :\" + latitudeValue);\n\t longitude.setText(\"Longitude is :\" +longitudeValue);\n\t dialog.dismiss();\n\t }\n\t }", "private void getDeviceLocation(){\n Log.d(TAG, \"getDeviceLocation: getting the device location\");\n\n mFusedLocationProviderClient= LocationServices.getFusedLocationProviderClient(this);\n\n try {\n if(mLocationPermissionsGranted){\nfinal Task location=mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n@Override\npublic void onComplete(@NonNull Task task) {\n if(task.isSuccessful()){\n Log.d(TAG, \"onComplete: found location\");\n Location currentLocation=(Location)task.getResult();\n moveCamera(new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude()),\n /*this is wew i stopped*/ Deafult_ZOOM);\n\n\n\n /* LatLng latLng = new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());\n MarkerOptions options=new MarkerOptions().position(latLng).title(\"test\");\n mMap.addMarker(options);*/\n\n }else {\n Log.d(TAG, \"onComplete: current location is null\");\n Toast.makeText(selectLocation.this,\"unable to get current location \",Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n\n }catch (SecurityException e){\n Log.e(TAG, \"getDeviceLocation:SecurityException \"+e.getMessage() );\n }\n\n }", "protected void initialize() {\n \tsetSetpoint(0.0);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n if (displayGpsStatus()) {\n\n Log.v(TAG, \"onClick\");\n\n\n locationListener = new MyLocationListener();\n\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ) {\n locationMangaer.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n\n }\n else{\n Toast.makeText(this,\"Kindly Provide Location Acces\",Toast.LENGTH_SHORT).show();\n }\n\n Log.v(TAG,latitudeUsers +\" , \"+longitudeUsers);\n\n } else {\n Toast.makeText(this,\"GPS not available!!\",Toast.LENGTH_SHORT).show();\n }\n\n }", "private void UpdateMap(){\n Log.d(\"data\", lati + \" \" + longi );\n// sydney = new LatLng(lati, longi);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }", "@Override\n \t\t\t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t \tTextView latitudine = (TextView) findViewById(R.id.latitude_txt);\n \t\t\t \tTextView longitudine = (TextView) findViewById(R.id.longitude_txt);\n\n \t\t\t \tlatitudine.setText(\"La latitudine è: \"+String.valueOf(location.getLatitude()));\n \t\t\t \tlongitudine.setText(\"La longitudine è: \"+String.valueOf(location.getLongitude()));\n \t\t\t\t\t\n \t\t\t\t\t}", "private void getCurrentLocation() {\n progressBar.setVisibility(View.VISIBLE);\n LocationRequest locationRequest = new LocationRequest();\n locationRequest.setInterval(10000);\n locationRequest.setFastestInterval(3000);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\n LocationServices.getFusedLocationProviderClient(IntroActivity.this).requestLocationUpdates(locationRequest, new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n LocationServices.getFusedLocationProviderClient(IntroActivity.this).removeLocationUpdates(this);\n if (locationResult != null && locationResult.getLocations().size() > 0) {\n int latestLocationIndex = locationResult.getLocations().size() - 1;\n double LatOrg = locationResult.getLocations().get(latestLocationIndex).getLatitude();\n double LonOrg = locationResult.getLocations().get(latestLocationIndex).getLongitude();\n\n LatitudeTruePref = Double.toString(LatOrg);\n LongitudeTruePref = Double.toString(LonOrg);\n\n LocationReal = new LatLng(LatOrg, LonOrg);\n tvSkip.setText(String.format(\"Lat: %s\\nLon: %s\", LatitudeTruePref, LongitudeTruePref));\n //tvSkip.setText(String.format(\"Lat: %s\\nLon: %s\", LatOrg, LonOrg));\n }\n FalseLocationSignal = false;//*Desactivar FalseLocation para SharedPreferens*//\n TrueLocationSignal = true;\n progressBar.setVisibility(View.GONE);\n btnNext.setEnabled(true);\n }\n }, Looper.getMainLooper());\n\n }", "@Override\n public void onCameraChange(CameraPosition arg0) {\n center = map.getCameraPosition().target;\n Log.v(\"Center\", \"lattitude=\" + center.latitude + \" &longitude=\" + center.longitude);\n map.clear();\n }", "public static Double getlng(){\n Log.e(\"LONG\",sharedPreferences.getString(USER_LNG, String.valueOf(0.0)));\n return Double.parseDouble(sharedPreferences.getString(USER_LNG, String.valueOf(0.0)));\n\n\n }", "public Location myLocation() {\n\n // Acquire a reference to the system Location Manager\n LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n criteria.setHorizontalAccuracy(Criteria.ACCURACY_FINE);\n String provider = locationManager.getBestProvider(criteria, true);\n // Define a listener that responds to location updates\n LocationListener locationListener = new LocationListener() {\n\n //When the location of the device changes\n public void onLocationChanged(Location location) {\n\n //Display the current location\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n MapProjection mapProjection = MapProjection.getDefault();\n GridPoint gp = mapProjection.toGridPoint(latitude,longitude);\n mGPSon.setText(\"Latitude: \"+Math.round(gp.x)+\"\\nLongitude: \"+Math.round(gp.y));\n\n }\n\n //When the status of the GNSS receiver changes\n public void onStatusChanged(String provider, int status, Bundle extras) {\n\n\n\n }\n\n //When the location provider is enabled\n public void onProviderEnabled(String provider) {\n\n\n\n }\n\n //When the location provider is disabled\n public void onProviderDisabled(String provider) {\n\n\n\n }\n\n };\n // Register the listener with the Location Manager to receive location updates\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,locationListener);\n // Obtain the current location\n Location myLocation = locationManager.getLastKnownLocation(provider);\n\n //Only if the current location is passed\n if (myLocation != null) {\n\n //Project the Location object to a GridPoint object\n double latitude = myLocation.getLatitude();\n double longitude = myLocation.getLongitude();\n MapProjection mapProjection = MapProjection.getDefault();\n GridPoint gp = mapProjection.toGridPoint(latitude, longitude);\n //Update the real-time latitude and longitude\n mGPSon.setText(\"Latitude: \" + Math.round(gp.x) + \"\\nLongitude: \" + Math.round(gp.y));\n return myLocation;\n\n } else {\n\n //If GPS is off, notify the user to turn it on\n Toast.makeText(MainActivity.this,\"Turn on GPS.\",Toast.LENGTH_SHORT).show();\n return null;\n\n }\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.map);\n \n // TTS init follows\n Intent checkIntent = new Intent();\n checkIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);\n startActivityForResult(checkIntent, MY_DATA_CHECK_CODE);\n \n // Mapview init follows \n mapView = (MapView) findViewById(R.id.mapview);\n mapView.setBuiltInZoomControls(true);\n \n LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n MyLocationListener locationListener = new MyLocationListener();\n Criteria criteria = new Criteria();\n criteria.setAccuracy(Criteria.ACCURACY_FINE);\n String provider = lm.getBestProvider(criteria, true);\n //Log.d(\"MainWindow\",\"provider = \"+provider); TODO find out what's that\n Location mostRecentLocation = lm.getLastKnownLocation(provider);\n if(mostRecentLocation!=null){\n \tlatid=mostRecentLocation.getLatitude();\n \tlongid=mostRecentLocation.getLongitude();\n \taccuracyd = mostRecentLocation.getAccuracy();\n \tprovidershow = mostRecentLocation.getProvider();\n }\n //lm.requestLocationUpdates(provider, 1, 0, locationListener);\n lm.requestLocationUpdates(lm.GPS_PROVIDER, 0, 0, locationListener);\n lm.requestLocationUpdates(lm.NETWORK_PROVIDER, 0, 0, locationListener);\n \n \n //set Kazan Kremlin location\n // Location location1 = new Location(\"Kazan Kremlin\");\n //location1.setLatitude(55.796879);\n //location1.setLongitude(49.108436);\n \n Location location1 = new Location(\"Berkeley\");\n location1.setLatitude(37.866011);\n location1.setLongitude(-122.265601);\n \n Location location3 = new Location(\"Berkeley\");\n location1.setLatitude(37.866011);\n location1.setLongitude(-122.265601);\n //double lat1=location1.getLatitude();\n //double lon1=location1.getLongitude();\n \n Location location2 = new Location(\"0\");\n location2.setLatitude(0);\n location2.setLongitude(0);\n \n // the pop-up dialogue part\n double dist = GPSdist.distance(location1.getLatitude(), location1.getLongitude(), latid, longid);\n double dist3 = GPSdist.distance(location3.getLatitude(), location3.getLongitude(), latid, longid);\n ttsstring = this.getString(R.string.Berkeley_descr);\n AlertHandler.ShowAlert(this, dist, ttsstring, this); \n \n // controls enabling + Overlay part \n GeoPoint point = new GeoPoint((int)(latid*1e6),(int)(longid*1e6));\n String Popupstring = \"Lat: \"+Double.toString(latid)+\" Long: \" + Double.toString(longid)+ \" w/ Acc: \" + Double.toString(accuracyd) + \" Provider: \" + providershow + \" \" + Double.toString(dist);\n OverlayItem overlayitem = new OverlayItem(point, \"Mobsy\", \"My Location is: \\n\" + Popupstring);\n \n mapControl = mapView.getController();\n mapControl.animateTo(point);\n mapControl.setZoom(13);\n \n compass = new MyLocationOverlay(this, mapView);\n \n mapOverlays = mapView.getOverlays();\n drawable = this.getResources().getDrawable(R.drawable.droid_overlay);\n pointsOverlay = new CostumMapOverlay(drawable,this);\n \n pointsOverlay.addOverlay(overlayitem);\n mapOverlays.add(pointsOverlay);\n mapOverlays.add(compass);\n\n \n }", "private void initilizeMap() \n {\n \tmContext = getApplicationContext();\n \ttry \n \t{\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n \n // Getting GPS status\n isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\n // Getting network status\n isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n\n if (!isGPSEnabled && !isNetworkEnabled) \n {\n // No network provider is enabled\n } \n else \n {\n this.canGetLocation = true;\n if (isNetworkEnabled) \n {\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this);\n Log.d(\"Network\", \"Network\");\n if (locationManager != null)\n {\n// Criteria criteria = new Criteria();\n// provider = locationManager.getBestProvider(criteria, false);\n location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n if (location != null) \n {\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n// initialLocation = new LatLng(latitude, longitude);\n initialLocation = new Location(\"inicial\");\n initialLocation.setLatitude(latitude);\n initialLocation.setLongitude(longitude);\n }\n }\n }\n // If GPS enabled, get latitude/longitude using GPS Services\n if (isGPSEnabled) \n {\n if (location == null) \n {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);\n Log.d(\"GPS Enabled\", \"GPS Enabled\");\n if (locationManager != null) \n {\n location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location != null)\n {\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n// initialLocation = new LatLng(latitude, longitude);\n initialLocation = new Location(\"inicial\");\n initialLocation.setLatitude(latitude);\n initialLocation.setLongitude(longitude);\n }\n }\n }\n }\n }\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n\n gMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\n myLocation = new LatLng(latitude,longitude);\n gMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n// \n// // check if map is created successfully or not\n// if (gMap == null) \n// {\n// Toast.makeText(getApplicationContext(),\n// \"Sorry! unable to create maps\", Toast.LENGTH_SHORT)\n// .show();\n// }\n gMap.setMyLocationEnabled(true);\n// Marker TP = gMap.addMarker(new MarkerOptions().position(myLocation).title(\"Estoy aca\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_VIOLET)));\n\n// lstLatLngs = new ArrayList<LatLng>();\n gMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() \n {\n \t@Override\n \tpublic void onMapClick(final LatLng point) \n \t{\n \t\t// TODO Auto-generated method stub\n \t\t\n \t\t AlertDialog.Builder builder = new AlertDialog.Builder(CrearIncidenteGPS.this);\n \t\t builder.setMessage(\"Desea agregar un incidente en este lugar?\")\n \t\t .setCancelable(false)\n \t\t .setPositiveButton(\"Si\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t \t//Agregar el incidente\n// \t\t \tlstLatLngs.add(point);\n \t\t \tinsertarIncidente(point);\n// \t\t \tgMap.addMarker(new MarkerOptions().position(point));\n \t\t }\n \t\t })\n \t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() \n \t\t {\n \t\t public void onClick(DialogInterface dialog, int id) \n \t\t {\n \t\t dialog.cancel();\n \t\t }\n \t\t });\n \t\t AlertDialog alert = builder.create();\n \t\t alert.show();\n \t\t\n \t}\n });\n \n// HttpRequestFactory httpRequestFactory = createRequestFactory(transport);\n// HttpRequest request = httpRequestFactory.buildGetRequest(new GenericUrl(PLACES_SEARCH_URL));\n// request.url.put(\"key\", \"\");\n// request.url.put(\"location\", latitude + \",\" + longitude);\n// request.url.put(\"radius\", 500);\n// request.url.put(\"sensor\", \"false\");\n// infowindow = new google.maps.InfoWindow();\n \n// var service = new google.maps.places.PlacesService(gMap);\n// service.nearbySearch(request, callback);\n }", "@Override\n \t\t\t\t\tpublic void onLocationChanged(Location location) {\n \t\t\t \tTextView latitudine = (TextView) findViewById(R.id.latitude_txt);\n \t\t\t \tTextView longitudine = (TextView) findViewById(R.id.longitude_txt);\n\n \t\t\t \tlatitudine.setText(\"La latitudine è: \"+String.valueOf(location.getLatitude()));\n \t\t\t \tlongitudine.setText(\"La longitudine è: \"+String.valueOf(location.getLongitude()));\n \t\t\t\t\t}", "public void getCurrentLoaction() {\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n locationListener = new LocationListener() {\n @Override\n public void onLocationChanged(Location location) {\n latitude = \"\" + location.getLatitude();\n TextView txtLatitude = (TextView) findViewById(R.id.txtLatitude);\n txtLatitude.setText(\"Latitud: \" + latitude);\n longitude = \"\" + location.getLongitude();\n TextView txtLongitude = (TextView) findViewById(R.id.txtLongitude);\n txtLongitude.setText(\"Longitud: \" + longitude);\n\n Geocoder gcd = new Geocoder(getBaseContext(), Locale.getDefault());\n List<Address> addresses;\n try {\n addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n if (addresses.size() > 0) {\n cityName = addresses.get(0).getLocality();\n }\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onStatusChanged(String s, int i, Bundle bundle) {\n\n }\n\n @Override\n public void onProviderEnabled(String s) {\n\n }\n\n @Override\n public void onProviderDisabled(String s) {\n Toast.makeText(pantallaIdentificacion.this, \"Por favor, habilite el GPS para continuar\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(intent);\n }\n };\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n locationManager.requestLocationUpdates(\"network\", 1000, 0, locationListener);\n }", "public void gotLocation(Location location){\r\n \tif(location!=null){\r\n\t \tConstants.gpslat = location.getLatitude()+\"\";\r\n\t Constants.gpslng = location.getLongitude()+\"\";\r\n\t Log.d(\"location changed: lattitue & longitude\",Constants.gpslat+\" & \"+Constants.gpslng);\r\n \t}\r\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setOnCameraIdleListener(this);\n mMap.setOnCameraMoveListener(this);\n mMap.setOnMarkerClickListener(this);\n\n SharedPreferences sharedPref = this.getSharedPreferences(this.getString(R.string.app_name), (Context.MODE_PRIVATE));\n Double latitude = Double.valueOf(sharedPref.getString(this.getString(R.string.latitude), \"0\"));\n Double longitude = Double.valueOf(sharedPref.getString(this.getString(R.string.longitude), \"0\"));\n\n if(latitude != 0 && longitude != 0){\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longitude), 12.0f));\n }\n odradiDohvatSadrzaja();\n\n itemView.setVisibility(View.GONE);\n mRefreshMarkers.setVisibility(View.GONE);\n }", "void setLongitude(Double longitude);", "public double getLongitude_() { \n return longitude_; \n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.baidumap_activity03);\n mapView = (MapView) findViewById(R.id.baidumapactivity03_mapview);\n baiduMap = mapView.getMap();\n baiduMap.setMyLocationEnabled(true); //开始定位模式\n\n //设置定位标记图标\n //BitmapDescriptor currrentPic = BitmapDescriptorFactory.fromResource(R.drawable.ic_launcher);\n //第二个参数:是否显示方向信息\n baiduMap.setMyLocationConfigeration(new MyLocationConfiguration(LocationMode.NORMAL, true, null));\n\n\n locationClient = new LocationClient(this);\n LocationClientOption locationClientOption = new LocationClientOption();\n locationClientOption.setOpenGps(true);\n locationClientOption.setCoorType(\"bd09ll\"); //经纬度坐标系\n locationClientOption.setScanSpan(1000); //设置扫描间隔 默认是一次,既只定位一次\n locationClientOption.setIsNeedAddress(true); //需要地址信息\n // locationClientOption.setIsNeedLocationDiscrpt(true); 设置是否需要位置语义化结果\n // locationClientOption.setIsNeedLocationPoiList(true); 设置是否需要POI\n\n locationClientOption.setLocationNotify(true);//设置是否当gps有效的时候按照1秒1次频率输出\n locationClient.setLocOption(locationClientOption);\n\n locationClient.registerLocationListener(myLocationListener); //注册定位监听\n locationClient.start();\n\n }", "private void updateGeo(Double latitude, Double longitude) {\n latitudeValue = latitude;\n longitudeValue = longitude;\n }", "@Override\n public void onSuccess(Location location) {\n process_dialog.dismiss();\n if (location != null) {\n\n // save the location inlocal and move to main activity\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putString(Variables.current_Lat,\"\"+location.getLatitude());\n editor.putString(Variables.current_Lon,\"\"+location.getLongitude());\n editor.commit();\n\n }else {\n\n if(sharedPreferences.getString(Variables.current_Lat,\"\").equals(\"\") || sharedPreferences.getString(Variables.current_Lon,\"\").equals(\"\") ){\n SharedPreferences.Editor editor=sharedPreferences.edit();\n editor.putString(Variables.current_Lat,\"33.738045\");\n editor.putString(Variables.current_Lon,\"73.084488\");\n editor.commit();\n }\n\n }\n Intent intent = new Intent(getApplicationContext(), IntroActivity.class);\n startActivity(intent);\n\n }", "private void loadData() {\n gps = new GPSTracker(LocationActivity.this);\n if (from.equals(\"home\")) {\n if (lat == 0 && lon == 0) {\n if (gps.canGetLocation()) {\n if (TextbookTakeoverApplication.isNetworkAvailable(LocationActivity.this)) {\n lat = gps.getLatitude();\n lon = gps.getLongitude();\n Log.v(\"lati\", \"lat\" + lat);\n Log.v(\"longi\", \"longi\" + lon);\n } else {\n // TextbookTakeoverApplication.dialog(LocationActivity.this, \"Error!\", \"Please check your connection and try again\");\n }\n } else {\n if (!alertDialog.isShowing()) {\n alertDialog.show();\n }\n got = true;\n }\n }\n } else if (from.equals(\"add\")) {\n if (AddProductDetail.lat == 0 && AddProductDetail.lon == 0) {\n if (gps.canGetLocation()) {\n if (TextbookTakeoverApplication.isNetworkAvailable(LocationActivity.this)) {\n Log.v(\"lati\", \"lat\" + AddProductDetail.lat);\n Log.v(\"longi\", \"longi\" + AddProductDetail.lat);\n } else {\n // TextbookTakeoverApplication.dialog(LocationActivity.this, \"Error!\", \"Please check your connection and try again\");\n }\n } else {\n if (!alertDialog.isShowing()) {\n alertDialog.show();\n }\n got = true;\n }\n }\n }\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n if (checkPermissions()) {\r\n mMap.setMyLocationEnabled(true);\r\n }\r\n mMap.addMarker(new MarkerOptions().position(currLocation).title(\"Current Location\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currLocation));\r\n getLastLocation();\r\n }", "@Override\n public void onLocationUpdated(Location location) {\n fromPosition = new LatLng(location.getLatitude(), location.getLongitude());\n btn1.setVisibility(View.VISIBLE);\n moveCamera(new LatLng(location.getLatitude(), location.getLongitude()),\n DEFAULT_ZOOM, \"My Location\");\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n /*GPSTracker gps = new GPSTracker(this);\n if(gps.canGetLocation()) {\n //lat=gps.getLatitude();\n //lon=gps.getLongitude();\n }*/\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n //mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n //mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setMapToolbarEnabled(true);\n // Add a marker in Sydney and move the camera\n /*LatLng current = new LatLng(lat, lon);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLng(current));\n LatLng new1 = new LatLng(lat+0.0008, lon+0.00004);\n mMap.addMarker(new MarkerOptions().position(new1).title(\"New Location\" +\n \"\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new1));\n LatLng new2 = new LatLng(lat+0.0005, lon+0.0004);\n mMap.addMarker(new MarkerOptions().position(new2).title(\"New Location\" +\n \"\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new2));\n mMap.addMarker(new MarkerOptions().position(current).title(lat+\" \"+lon+\n \"\"));\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(new LatLng(lat, lon)) // Sets the center of the map to location user\n .zoom(18) // Sets the zoom\n .bearing(90) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));*/\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n coordList = getIntent().getParcelableArrayListExtra(\"coordlist\");\n Menit = getIntent().getIntExtra(\"minute\",0);\n Detik = getIntent().getIntExtra(\"second\",0);\n totalDistance = getIntent().getDoubleExtra(\"jarak\",0);\n kecepatan = getIntent().getDoubleExtra(\"speed\",0);\n kalori = getIntent().getDoubleExtra(\"kalori\",0);\n //strLat = getIntent().getStringExtra(\"strLat\");\n //strLong = getIntent().getStringExtra(\"strLong\");\n\n\n\n\n\n txtSpeed.setText(String.valueOf(Math.round(kecepatan))+\"Km/h\");\n\n txtJarak.setText(String.valueOf(numberFormat.format(totalDistance/1000)));\n\n txtJumlahCalorie.setText(String.valueOf(numberFormat.format(kalori)));\n\n //txtMenit = (TextView)findViewById(R.id.menit);\n //txtDetik = (TextView)findViewById(R.id.detik);\n\n txtTime.setText(String.format(\"%02d\", Menit)+\":\"\n + String.format(\"%02d\", Detik)+\"hr\");\n //txtDetik.setText(String.valueOf(Detik));\n\n if(coordList.size() <= 1){\n //Toast.makeText(MyRouteMaps.this, \"ANDA BELUM BERAKTIFITAS\", Toast.LENGTH_SHORT).show();\n drawMap();\n }else{\n drawMap();\n }\n\n Log.d(\"ISI DALAM COORDLIST MAP : \",String.valueOf(coordList.size()));\n\n\n if(totalDistance < 500) {\n mMap.animateCamera(CameraUpdateFactory.zoomTo(17.0f));\n }else{\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15.5f));\n }\n\n // Add a marker in Sydney and move the camera\n //LatLng sydney = new LatLng(-34, 151);\n\n }", "@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)!= PackageManager.PERMISSION_GRANTED){\r\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},101);\r\n }\r\n loc = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n populateMap(loc);\r\n try {\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude(), lm.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude()), 15.0f));\r\n }catch(Exception blyat){\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(\"No hemos podido acceder a tu localización, revisa el estado de GPS y reinicia la app\");\r\n builder.show();\r\n }\r\n }", "private void comenzarLocalizacionPorGPS() {\n\t\tmLocManagerGPS = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n//\t\tLog.i(LOGTAG, \"mLocManagerGPS: \" + mLocManagerGPS);\n\t\t\n\t\t//Nos registramos para recibir actualizaciones de la posicion\n\t\tmLocListenerGPS = new LocationListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {\n//\t\t\t\tLog.i(LOGTAG, \"Cambio en estatus GPS: \" + provider + \" status: \" + status);\n//\t\t\t\tToast.makeText(getApplicationContext(), \"Cambio en estatus GPS: \" + provider + \" status: \" + status, Toast.LENGTH_SHORT).show();\n//\t\t\t\tif (status != 1) {\n//\t\t\t\t\tToast.makeText(getApplicationContext(), \"GPS NA, Iniciar geo por datos\", Toast.LENGTH_SHORT).show();\n//\t\t\t\t} else {\n//\t\t\t\t\tToast.makeText(getApplicationContext(), \"Se geolocalizo por GPS, no lanzar geo por datos\", Toast.LENGTH_SHORT).show();\n//\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onProviderEnabled(String provider) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"GPS Encendido\", Toast.LENGTH_SHORT).show();\n\t\t\t\ttimeStamp = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.US).format(new Date());\n//\t\t\t\tString numeroTelefonico = obtenerLineaTelefonica();\n\t\t\t\tString imeiTelefono = obtenerIMEI();\n\t\t\t\tString icono = \"icons/gpsEncendido.png\";\n\t\t\t\tdatasource.guardoGeolocalizacionInvisible(imeiTelefono, icono, timeStamp);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onProviderDisabled(String provider) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"GPS Apagado por favor revise\", Toast.LENGTH_SHORT).show();\n\t\t\t\ttimeStamp = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.US).format(new Date());\n//\t\t\t\tString numeroTelefonico = obtenerLineaTelefonica();\n\t\t\t\tString imeiTelefono = obtenerIMEI();\n\t\t\t\tString icono = \"icons/gpsApagado.png\";\n\t\t\t\tdatasource.guardoGeolocalizacionInvisible(imeiTelefono, icono, timeStamp);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\tguardarPosicion(location);\n\t\t\t}\n\t\t};\n//\t\tLog.i(LOGTAG, \"mLocListenerGPS: \" + mLocListenerGPS);\n\t\tmLocManagerGPS.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES, mLocListenerGPS);\n\t}", "public void setLongitude(float longitude) { this.longitude = longitude; }", "@Override\n public void onLocationChanged(Location location) {\n Log.d(\"GeoPost Location\", \"Location update received: \" + location.toString());\n\n mMap.clear();\n\n latitudine = location.getLatitude();\n longitudine = location.getLongitude();\n myPosition = new LatLng(latitudine, longitudine);\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"Marker in myPosition\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myPosition, 15));\n Log.d(\"GeoPost Location\", \"lat: \"+latitudine+\" longi: \"+longitudine);\n\n }", "private void comenzarLocalizacion()\n {\n \tlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);\n \t\n \t//Obtiene Ultima Ubicacion\n \t//Location loc = locManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n \t \t\n \t//Nos registramos para recibir actualizaciones de la posici�n\n \tlocListener = new LocationListener() {\n\t \tpublic void onLocationChanged(Location location) {\n\t \t\t\n\t \t}\n\t \tpublic void onProviderDisabled(String provider){\n\t \t\t\n\t \t}\n\t \tpublic void onProviderEnabled(String provider){\n\t \t\n\t \t}\n\t \tpublic void onStatusChanged(String provider, int status, Bundle extras){\n\t \t\n\t \t\t\n\t \t}\n \t};\n \t\n \tlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 30000, 0, locListener);\n }", "@Override\n public void onLocationChanged(Location location) {\n currentLatitude = location.getLatitude();\n currentLongitude = location.getLongitude();\n\n }", "void setLatitude(Double latitude);", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n // Add a marker in Sydney and move the camera\n /*LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n\n LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n\n // Recherche de la derniere localisation\n Criteria criteria = new Criteria();\n String provider = locationManager.getBestProvider(criteria, false);\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = locationManager.getLastKnownLocation(provider);\n\n // Initialize the location fields\n if (location != null) {\n float lat = (float) (location.getLatitude());\n float lng = (float) (location.getLongitude());\n\n currentPosition = new Point(location.getLongitude(), location.getLatitude());\n\n // Add a marker at our position and move the camera\n LatLng lastCoord = new LatLng(lat, lng);\n mMap.addMarker(new MarkerOptions().position(lastCoord).title(\"Last time we were here\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(lastCoord));\n\n lblPosition.setText(\"Last Position: \"+location.getLatitude()+\", \"+location.getLongitude());\n\n Log.i(this.getClass().getName(), String.valueOf(lat));\n Log.i(this.getClass().getName(), String.valueOf(lng));\n } else {\n Log.w(this.getClass().getName(), \"Provider not available\");\n }\n\n // dessine points intérets et sector de la database\n loadPOI();\n loadSector();\n\n // attache le callback\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 10, 1, this);\n }", "public void onLocationChanged(Location location) {\n\n if (net_connection_check()) {\n\n String message = String.format(\n\n \"New Location \\n Longitude: %1$s \\n Latitude: %2$s\",\n\n location.getLongitude(), location.getLatitude());\n\n // *************************** GPS LOCATION ***************************\n\n\n driveruserid = User_id;\n driverlat = location.getLatitude();\n driverlong = location.getLongitude();\n\n\n Location driverLocation = new Location(\"user location\");\n driverLocation.setLatitude(driverlat);\n driverLocation.setLongitude(driverlong);\n\n aController.setDriverLocation(driverLocation);\n\n String drivercurrentaddress = lattoaddress(driverlat, driverlong);\n\n\n if (!checktripend && mGoogleMap != null) {\n // mGoogleMap.clear();\n\n\n }\n LatLng mark1 = new LatLng(driverlat, driverlong);\n\n if (logoutcheck) {\n//\t\t\tDriverdetails();\n }\n\n LatLng target = new LatLng(driverlat, driverlong);\n\n String check = fullbutton.getText().toString();\n if (acc.equals(\"yes\") || check.equals(\"End Trip\")) {\n if (check.equals(\"End Trip\")) {\n // mGoogleMap.clear();\n // mGoogleMap.setTrafficEnabled(true);\n }\n origin = new LatLng(driverlat, driverlong);\n /* try{\n String url = getDirectionsUrl(origin, dest);\n drawMarker(dest);\n DownloadTask downloadTask = new DownloadTask();\n //Start downloading json data from Google Directions API\n downloadTask.execute(url);\n }catch (Exception e){\n\n }*/\n\n// checkOffRouteAndRedrwaRoute(location);\n\n }\n\n checkOffRouteAndRedrwaRoute(location);\n if (location.hasBearing() && mGoogleMap != null) {\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(target) // Sets the center of the map to current location\n .zoom(16)\n .bearing(location.getBearing()) // Sets the orientation of the camera to east\n .tilt(0) // Sets the tilt of the camera to 0 degrees\n .build(); // Creates a CameraPosition from the builder\n mGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }\n }\n }", "@Override\n public void onRefresh() {\n if(mLatitude == null || mLongitude == null){\n mLatitude = DEFAULT_LAT;\n mLongitude = DEFAULT_LON;\n loadZomatoData(mLatitude, mLongitude);\n } else {\n loadZomatoData(mLatitude,mLongitude);\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n FirebaseApp.initializeApp(this);\n setContentView(R.layout.activity_main);\n\n locationValueString = findViewById(R.id.location_value);\n tempValueString = findViewById(R.id.temp_value);\n humidityValueString = findViewById(R.id.humidity_value);\n conditionValueString = findViewById(R.id.condition_value);\n\n //mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n initSetup();\n\n syncWithRTInfo();\n\n //onCreateNotificationSetup();\n }", "private void updateLocationUI() {\n if (mCurrentLocation != null) {\n Log.e(\"UPDATE GEO\", \"LAT \" + mCurrentLocation.getLatitude() + \" LON \" +\n mCurrentLocation.getLongitude() + \" LAST UPDATE \" + mLastUpdateTime);\n }\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n wayLatitude = location.getLatitude();\n wayLongitude = location.getLongitude();\n SharedStore.getInstance().save(Double.toString(wayLatitude),\"CurrentLat\");\n SharedStore.getInstance().save(Double.toString(wayLongitude),\"CurrentLong\");\n Log.e(\"getLocation\", String.valueOf(wayLatitude));\n }\n }", "@Override\n protected void onPause(){\n super.onPause();\n if(map != null){\n map.setMyLocationEnabled(false);\n }\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.main);\n\n\t\tmButtonGetLocation = (Button) findViewById(R.id.btn_get_location);\n\t\tmTextViewResult = (TextView) findViewById(R.id.tv_result_value);\n\t\tmTextViewGPSStatus = (TextView) findViewById(R.id.tv_gps_status);\n\t\tmMapView = (MapView) findViewById(R.id.map_view);\n\t\tmMapController = mMapView.getController();\n\t\tmMapController.setZoom(11);\n\t\tsetMapCenter(18.04, 59.35);\n\n\t\tmDialog = new ProgressDialog(this);\n\t\tmDialog.setOnCancelListener(new OnCancelListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\tmButtonGetLocation.setEnabled(true);\n\t\t\t\tmLocationManager.removeUpdates(mLocationListener);\n\t\t\t}\n\t\t});\n\t\tmLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n\t\tmLocationListener = new LocationListener() {\n\t\t\t@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\t// Called when a new location is found.\n\t\t\t\tnew PostDogShitTask().execute(location);\n\t\t\t\tmLocationManager.removeUpdates(mLocationListener);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase LocationProvider.AVAILABLE:\n\t\t\t\t\tmTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()\n\t\t\t\t\t + \"GPS available again\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase LocationProvider.OUT_OF_SERVICE:\n\t\t\t\t\tmTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()\n\t\t\t\t\t + \"GPS out of service\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase LocationProvider.TEMPORARILY_UNAVAILABLE:\n\t\t\t\t\tmTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()\n\t\t\t\t\t + \"GPS temporarily unavailable\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onProviderEnabled(String provider) {\n\t\t\t\tLog.i(TAG, \"Provider enabled\");\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onProviderDisabled(String provider) {\n\t\t\t\tLog.i(TAG, \"Provider disabled\");\n\t\t\t}\n\t\t};\n\n\t\tmapOverlays = mMapView.getOverlays();\n\t\tDrawable drawable = this.getResources().getDrawable(R.drawable.poop);\n\t\titemizedoverlay = new HelloItemizedOverlay(drawable);\n\t}", "public void onPositionChanged() {\n\n currentLat = location.getLatitude();\n currentLng = location.getLongitude();\n\n }", "public void onPositionChanged() {\n\n currentLat = location.getLatitude();\n currentLng = location.getLongitude();\n\n }", "@Override\n public void onLocationChanged(Location location) {\n\n }", "@Override\n public void onLocationChanged(Location location) {\n\n }", "@Override\n public void onLocationChanged(Location location) {\n Location location1 = location;\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.maps);\n \n //Activate the GPS\n locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); \n locationListener = new GPSListener(this); \n \n //Requests updates each 200 meters\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 200,locationListener);\n \n mlv = (MapViewer) findViewById(R.id.map_view);\n \n \t// Register for events\n addEvents(); \n }", "private void locationManager()\n\t{\n mMap.setMyLocationEnabled(true);\n\n // Getting LocationManager object from System Service LOCATION_SERVICE\n LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n // Creating a criteria object to retrieve provider\n Criteria criteria = new Criteria();\n\n // Getting the name of the best provider\n String provider = locationManager.getBestProvider(criteria, true);\n\n // Getting Current Location\n Location location = locationManager.getLastKnownLocation(provider);\n\n if(location!=null){\n onLocationChanged(location);\n }\n locationManager.requestLocationUpdates(provider, 20000, 0, this);\n\t\t\n\t}", "public void onCreate(Bundle bundle) {\n int i2;\n int i3 = 0;\n super.onCreate(bundle);\n setContentView(R.layout.map_marker_click_dialog);\n a(this.c);\n this.d = (CirclrImageView) findViewById(R.id.friend_icon);\n this.e = (TextView) findViewById(R.id.friend_device_name);\n this.f = (TextView) findViewById(R.id.friend_update_time);\n this.j = (TextView) findViewById(R.id.friend_update_location);\n this.i = (TextView) findViewById(R.id.friend_location);\n this.g = (TextView) findViewById(R.id.friend_freq);\n this.h = (TextView) findViewById(R.id.friend_altitude);\n this.i.setTypeface(l.c);\n this.g.setTypeface(l.c);\n this.h.setTypeface(l.c);\n this.e.setText(this.b.getName());\n String g2 = ac.g(((long) this.b.getTime()) * 1000);\n this.f.setText(ad.a((int) R.string.update_location_time, g2));\n double longitudeDouble = this.b.getLongitudeDouble();\n double latitudeDouble = this.b.getLatitudeDouble();\n StringBuffer stringBuffer = new StringBuffer();\n stringBuffer.append(this.c.getString(R.string.location_is));\n if (longitudeDouble >= 0.0d) {\n stringBuffer.append(longitudeDouble + TraceFormat.STR_ERROR);\n } else {\n stringBuffer.append(Math.abs(longitudeDouble) + TraceFormat.STR_WARN);\n }\n stringBuffer.append(\" , \");\n if (latitudeDouble >= 0.0d) {\n stringBuffer.append(latitudeDouble + \"N\");\n } else {\n stringBuffer.append(Math.abs(latitudeDouble) + \"S\");\n }\n this.j.setText(stringBuffer.toString());\n float[] fArr = new float[1];\n double[] Y = w.Y();\n Location.distanceBetween(Y[0], Y[1], this.b.getLatitudeDouble(), this.b.getLongitudeDouble(), fArr);\n float f2 = fArr[0];\n final SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();\n final AbsoluteSizeSpan absoluteSizeSpan = new AbsoluteSizeSpan(v.c(10.0f));\n DecimalFormat decimalFormat = new DecimalFormat(\"#.#\");\n if (f2 < 0.0f) {\n i2 = 0;\n } else if (f2 < 1000.0f) {\n spannableStringBuilder.append(String.valueOf(Math.round(f2)));\n spannableStringBuilder.append(\" m\");\n i3 = spannableStringBuilder.length() - 1;\n i2 = spannableStringBuilder.length();\n } else {\n spannableStringBuilder.append(String.valueOf(decimalFormat.format((double) (f2 / 1000.0f))));\n spannableStringBuilder.append(\" km\");\n i3 = spannableStringBuilder.length() - 2;\n i2 = spannableStringBuilder.length();\n }\n spannableStringBuilder.setSpan(absoluteSizeSpan, i3, i2, 33);\n this.i.setText(spannableStringBuilder);\n spannableStringBuilder.clear();\n spannableStringBuilder.append(v.c(this.b.getFreq()));\n spannableStringBuilder.append(\" MHz\");\n spannableStringBuilder.setSpan(absoluteSizeSpan, spannableStringBuilder.length() - 3, spannableStringBuilder.length(), 33);\n this.g.setText(spannableStringBuilder);\n spannableStringBuilder.clear();\n spannableStringBuilder.append(String.valueOf(this.b.getAltitude()));\n spannableStringBuilder.append(\" m\");\n spannableStringBuilder.setSpan(absoluteSizeSpan, spannableStringBuilder.length() - 1, spannableStringBuilder.length(), 33);\n this.h.setText(spannableStringBuilder);\n if (this.b.getAltitude() == 0) {\n a.a(this.b.getLatitudeDouble(), this.b.getLongitudeDouble(), (b) new com.ifengyu.intercom.a.b.a() {\n public void a(Call call, Exception exc, int i) {\n s.b(t.a, \"onError:\" + exc.getMessage());\n }\n\n public void a(Double d2, int i) {\n if (d2 != null) {\n s.b(t.a, d2.toString());\n spannableStringBuilder.clear();\n spannableStringBuilder.append(String.valueOf(d2.intValue()));\n spannableStringBuilder.append(\" m\");\n spannableStringBuilder.setSpan(absoluteSizeSpan, spannableStringBuilder.length() - 1, spannableStringBuilder.length(), 33);\n t.this.h.setText(spannableStringBuilder);\n }\n }\n });\n }\n if (this.b.getImgUrl() == null || this.b.getImgUrl().length() <= 0 || this.b.getImgUrl().equals(\"null\")) {\n this.d.setImageDrawable(ContextCompat.getDrawable(this.c, R.drawable.my_head_default));\n } else {\n ImageLoader.getInstance().displayImage(this.b.getImgUrl(), (ImageView) this.d);\n }\n }", "public void startLocationUpdate() {\n if (locationCallback != null) {\n try {\n locationCallback = new LocationCallback() {//khoi tao dinh nghia (extent)\n\n @Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }\n };\n fusedLocationProviderClient.requestLocationUpdates(locationRequest, locationCallback, null);//dang ky voi he thong app lang nghe su thay doi cua location\n\n } catch (SecurityException e) {\n e.getMessage();\n\n }\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n// MapContainer = (LinearLayout) findViewById(R.id.testampmap);\n\n// if (USE_XML_LAYOUT) {\n// setContentView(R.layout.activity_map);\n//\n//// mMapView = (NMapView) findViewById(R.id.mapView);\n// }\n\n\n //네이버 지도 MapView를 생성해준다.\n mMapView = new NMapView(this);\n //지도에서 ZoomControll을 보여준다\n mMapView.setBuiltInZoomControls(true, null);\n //네이버 OPEN API 사이트에서 할당받은 KEY를 입력하여 준다.\n mMapView.setApiKey(API_KEY);\n //이 페이지의 레이아웃을 네이버 MapView로 설정해준다.\n// setContentView(mMapView);\n setContentView(R.layout.activity_map);\n mLinearLayout = (LinearLayout)findViewById(R.id.mapmap);\n mLinearLayout.addView(mMapView);\n //네이버 지도의 클릭이벤트를 처리 하도록한다.\n mMapView.setClickable(true);\n //맵의 상태가 변할때 이메소드를 탄다.\n mMapView.setOnMapStateChangeListener(new NMapView.OnMapStateChangeListener() {\n public void onZoomLevelChange(NMapView arg0, int arg1) {\n\n }\n\n public void onMapInitHandler(NMapView arg0, NMapError arg1) {\n\n if (arg1 == null) {\n // 표시해줄 위치\n mMapController.setMapCenter(new NGeoPoint(126.978371, 37.5666091), 11);\n } else {\n Toast.makeText(getApplicationContext(), arg1.toString(), Toast.LENGTH_SHORT).show();\n }\n }\n\n public void onMapCenterChangeFine(NMapView arg0) {\n\n }\n\n public void onMapCenterChange(NMapView arg0, NGeoPoint arg1) {\n\n }\n\n public void onAnimationStateChange(NMapView arg0, int arg1, int arg2) {\n\n }\n });\n //맵뷰의 이벤트리스너의 정의.\n mMapView.setOnMapViewTouchEventListener(new NMapView.OnMapViewTouchEventListener() {\n\n public void onTouchDown(NMapView arg0, MotionEvent arg1) {\n\n }\n\n @Override\n public void onTouchUp(NMapView nMapView, MotionEvent motionEvent) {\n\n }\n\n public void onSingleTapUp(NMapView arg0, MotionEvent arg1) {\n\n }\n\n public void onScroll(NMapView arg0, MotionEvent arg1, MotionEvent arg2) {\n\n }\n\n public void onLongPressCanceled(NMapView arg0) {\n\n }\n\n public void onLongPress(NMapView arg0, MotionEvent arg1) {\n\n }\n });\n mMapController = mMapView.getMapController();\n super.setMapDataProviderListener(new OnDataProviderListener() {\n\n public void onReverseGeocoderResponse(NMapPlacemark arg0, NMapError arg1) {\n\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mGeocoder = new Geocoder(this, Locale.getDefault());\n\n updateScreenLoc(movement[0]);\n\n loadCrimes(movement[0]);\n //Start MockLocationManager and inject first point\n turnOnLocationManager();\n updateLocation(movement[0]);\n updateRadiusCircle();\n\n\n }", "private void initLocation() {\n\t\tlocationManager = (LocationManager) this\n\t\t\t\t.getSystemService(Context.LOCATION_SERVICE);\n\t\t// Define a listener that responds to location updates\n\t\tnetworkLocListener = new MyLocationListener();\n\t\tgpsLocListener = new MyLocationListener();\n\n\t\tlocationProvider2 = LocationManager.NETWORK_PROVIDER;\n\t\tlocationProvider1 = LocationManager.GPS_PROVIDER;\n\n\t\tgps_enabled = false;\n\t\tnetwork_enabled = false;\n\t\t// exceptions will be thrown if provider is not permitted.\n\n\t\t// try{gps_enabled=mlocManager.isProviderEnabled(LocationManager.GPS_PROVIDER);}catch(Exception\n\t\t// ex){}\n\t\tgps_enabled = locationManager\n\t\t\t\t.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\t\t// try{network_enabled=mlocManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);}catch(Exception\n\t\t// ex){}\n\t\tnetwork_enabled = locationManager\n\t\t\t\t.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n\n\t\t// don't start listeners if no provider is enabled\n\t\tif (!gps_enabled && !network_enabled) {\n\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\"Either network or GPS not enabled, please check\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t/*\n\t\t\t * Intent gpsOptionsIntent = new\n\t\t\t * Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS\n\t\t\t * ); startActivity(gpsOptionsIntent);\n\t\t\t */\n\t\t}\n\n\t\t// Define a listener that responds to location updates\n\t\t// LocationListener locationListener = new LocationListener() {\n\t\t// @Override\n\t\t// public void onLocationChanged(Location location) {\n\t\t// // Called when a new location is found by the network location\n\t\t// // provider.\n\t\t// if (D)\n\t\t// Log.i(TAG, \"Updating current location\");\n\t\t// Toast.makeText(getApplicationContext(),\n\t\t// \"Updating current location\", Toast.LENGTH_LONG).show();\n\t\t// }\n\t\t//\n\t\t// public void onStatusChanged(String provider, int status,\n\t\t// Bundle extras) {\n\t\t// if (D)\n\t\t// Log.i(TAG, \"status changed\");\n\t\t// }\n\t\t//\n\t\t// public void onProviderEnabled(String provider) {\n\t\t// if (D)\n\t\t// Log.i(TAG, \"location enabled\");\n\t\t// }\n\t\t//\n\t\t// public void onProviderDisabled(String provider) {\n\t\t// if (D)\n\t\t// Log.i(TAG, \"Location disabled\");\n\t\t// }\n\t\t// };\n\n\t\tif (network_enabled) {\n\t\t\tlocationManager.requestLocationUpdates(\n\t\t\t\t\tLocationManager.NETWORK_PROVIDER, 1, 1, networkLocListener);\n\t\t}\n\t\tif (gps_enabled) {\n\t\t\tlocationManager.requestLocationUpdates(\n\t\t\t\t\tLocationManager.GPS_PROVIDER, 1, 1, gpsLocListener);\n\t\t}\n\t}", "void getMyCurrentLocation() { \r\n\t\t \r\n\t\t \r\n\t \t // map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat, lon), 16));\r\n\t\t \r\n\t LocationManager locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\r\n\t try{\r\n\t \t\tgps_enabled=locManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\r\n\t }catch(Exception ex){\r\n\t \t\r\n\t }\r\n\t try{\r\n\t \tnetwork_enabled=locManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\r\n\t }catch(Exception ex){\r\n\t \t\r\n\t }\r\n\r\n\t if(gps_enabled){\r\n\t location=locManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n\r\n\t } \r\n\r\n\t \r\n\t if(network_enabled && location==null) {\r\n\t location=locManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\r\n\r\n\t }\r\n\r\n\t\t if (location != null) { \r\n\t\t \t//accLoc=location.getAccuracy();\r\n\t\t lat = location.getLatitude();\r\n\t\t\t lon= location.getLongitude();\r\n\t\t } \r\n\t \r\n\t try\r\n\t {\r\n\t \t //Getting address based on coordinates.\r\n\t Geocoder geocoder; \r\n\t List<Address> addresses;\r\n\t geocoder = new Geocoder(this, Locale.getDefault());\r\n\t addresses = geocoder.getFromLocation(lat, lon, 1);\r\n\t \r\n\t Address = addresses.get(0).getAddressLine(0);\r\n\t City = addresses.get(0).getAddressLine(1);\r\n\t }\r\n\t catch (Exception e)\r\n\t {\r\n\t e.printStackTrace();\r\n\t }\r\n\r\n\t if (Address != null && !Address.isEmpty()) {\r\n\t\t \t try\r\n\t\t \t {\r\n\t\t \t \t //Getting address based on coordinates.\r\n\t\t \t Geocoder geocoder; \r\n\t\t \t List<Address> addresses;\r\n\t\t \t geocoder = new Geocoder(this, Locale.getDefault());\r\n\t\t \t addresses = geocoder.getFromLocation(lat, lon, 1);\r\n\t\t \t\r\n\t\t \t Address = addresses.get(0).getAddressLine(0);\r\n\t\t \t City = addresses.get(0).getAddressLine(1);\r\n\t\t \t }\r\n\t\t \t catch (Exception e)\r\n\t\t \t {\r\n\t\t \t e.printStackTrace();\r\n\t\t \t }\r\n\t\t \t //mp.position(new LatLng(location.getLatitude(), location.getLongitude()));\r\n\t\t \t //mp.title(\"You are here\");\t\t \t \r\n\t\t \t //map.addMarker(mp).showInfoWindow();\t\r\n\t\t \t //map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(1.3667, 103.8), 10));\r\n\t }\r\n\t else{ \r\n\t /* AlertDialog.Builder builder1 = new AlertDialog.Builder(ArticleLatestMoreDetailActivity.this);\r\n\t builder1.setTitle(\"Service Unavailable\");\r\n\t \t\t builder1.setMessage(\"Unable to get your location, check if your GPS and Network are turned on.\");\r\n\t \t\t builder1.setCancelable(true);\r\n\t builder1.setNegativeButton(\"OK\",new DialogInterface.OnClickListener() {\r\n\t public void onClick(DialogInterface dialog, int id) {\r\n\t \t dialog.cancel();\r\n\t }\r\n\t });\r\n\t AlertDialog alert11 = builder1.create();\r\n\t alert11.show();\r\n\t \r\n\t lat=1.3667;\r\n\t lon=103.8; */ \r\n\t // mp.position(new LatLng(1.3667, 103.8));\r\n\t\t // mp.draggable(true);\r\n\t\t \t // map.addMarker(mp).showInfoWindow();\r\n\t\t \t \r\n\t\t \t //map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(1.3667, 103.8), 10));\r\n\t }\r\n\t \r\n\t \r\n\t \r\n\t Bundle extras = this.getIntent().getExtras();\r\n\t\t double dbLat = extras.getDouble(\"dbLat\");\r\n\t\t double dbLon = extras.getDouble(\"dbLon\");\r\n\t\t artLoc.position(new LatLng(dbLat, dbLon));\r\n\t\t artLoc.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n\t\t artLoc.title(\"Place of occurrence\");\r\n\t\t map.addMarker(artLoc).showInfoWindow();\r\n\t\t map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(dbLat, dbLon), 18));\r\n\t \r\n\t \r\n\t \r\n\t }", "@Override\n public void onLocationChange(@NonNull Location location) {\n longitude = location.getLongitude();\n latitude = location.getLatitude();\n }", "private void initialize() {\n\t\tcoords = (TextView) findViewById(R.id.tvcoords);\n\t\tstartgps = (Button) findViewById(R.id.bstartgps);\n\t\tstartgps.setOnClickListener(this);\n\t\tstopgps = (Button) findViewById(R.id.bstopgps);\n\t\tstopgps.setOnClickListener(this);\n\n\t}", "private void setUpMap() {\n\t\t \n\t\tmMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\t\t//mMap.setMyLocationEnabled(true);\n\t\t\t \n\t\tmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(\n\t\t\t\tlatitude, longitude), 12.0f));\n\n\t}", "@Override\n \t\t\tpublic void onLocationChanged(Location loc) {\n \t \n \t\t\t}", "protected void updateLocationUI() {\n if (mCurrentLocation != null) {\n //TrackDataCSVHelper myCSV2 = new TrackDataCSVHelper();\n //mDistanceFromWaypointText.setText(String.valueOf(myCSV2.getLon(track, this))); //<-- used this to test getting proper lat/lon\n //mDistanceFromWaypointText.setText(String.format(\"%s: %f\", \"Dist from WP\", mDistanceFromWaypoint));\n //mZoneStatusText.setText(\"IN THE ZONE? \" + mIsInZone);\n //mNumberUpdates.setText(String.valueOf(mNum));\n }\n }", "private void startCurrentLocationUpdates() {\n LocationRequest locationRequest = LocationRequest.create();\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n locationRequest.setInterval(3000);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n return;\n }\n }\n //Untuk data internet\n String status = null;\n ConnectivityManager cm = (ConnectivityManager) MapsActivity.this.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n\n if (activeNetwork == null) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Kamu Tidak Memiliki Koneksi Internet, Harap Nyalakan Data Seluler atau Wi-Fi\")\n .setTitle(\"Tidak Ada Koneksi\")\n .setCancelable(false)\n .setPositiveButton(\"Settings\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS), 0);\n }\n }\n )\n .setNegativeButton(\"Cancel\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n startCurrentLocationUpdates();\n }\n }\n );\n AlertDialog alert = builder.create();\n alert.show();\n }\n\n //untuk cek apakah gps on/off\n final LocationManager locationM = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n if (!locationM.isProviderEnabled(LocationManager.GPS_PROVIDER)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Harap Nyalakan GPS Terlebih Dahulu\")\n .setTitle(\"Tidak Dapat Menemukan Lokasi\")\n .setCancelable(false)\n .setPositiveButton(\"Settings\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent openLocationSettings = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n MapsActivity.this.startActivity(openLocationSettings);\n }\n }\n )\n .setNegativeButton(\"Cancel\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n startCurrentLocationUpdates();\n }\n }\n );\n AlertDialog alert = builder.create();\n alert.show();\n }\n fusedLocationProviderClient.requestLocationUpdates(locationRequest, mLocationCallback, Looper.myLooper());\n }", "public void stopUsingGPS() {\r\n if (locationManager != null) {\r\n // locationManager.removeUpdates(GPSTracker.this);\r\n }\r\n }", "@Override\n public void onWindowFocusChanged(boolean hasFocus) {\n p = new Point();\n p.x = 200;\n p.y = 500;\n Log.d(\"Location ag\",String.valueOf(p.x));\n Log.d(\"Location ag\",String.valueOf(p.y));\n }", "public void add_location() {\n if (currentLocationCheckbox.isChecked()) {\n try {\n CurrentLocation locationListener = new CurrentLocation();\n LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);\n Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location != null) {\n int latitude = (int) (location.getLatitude() * 1E6);\n int longitude = (int) (location.getLongitude() * 1E6);\n currentLocation = new GeoPoint(latitude, longitude);\n }\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n } else {\n currentLocation = null;\n }\n\n }", "@Override\n public void onLocationChanged(Location location) {\n LatLng posicio = new LatLng(location.getLatitude(),location.getLongitude());\n //Afegir la camera amb el punt generat abans i un nivell de zoom\n CameraUpdate camera = CameraUpdateFactory.newLatLngZoom(posicio,13);\n //Desplacem la camera al nou punt\n mMap.moveCamera(camera);\n posicioActual = posicio;\n\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tmSensors.resume();\n\t\tLLACoordinate lla = mSensors.getLocation();\n\t\tif(lla!=null){\n\t\t\t_myselfLLA = new LLACoordinate(lla);\n\t\t}\n\t}", "@Override\n public void onMapReady(final GoogleMap map) {\n map.moveCamera(CameraUpdateFactory.zoomTo(14));\n //map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n map.setMyLocationEnabled(true);\n map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\n @Override\n public boolean onMyLocationButtonClick() {\n\n return true;\n }\n });\n map.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location location) {\n Log.d(\"map\", \"onMyLocationChange\");\n if (!isinit) {\n isinit = true;\n if (now_Location == null ||\n now_Location.getLatitude() != location.getLatitude() ||\n now_Location.getLongitude() != location.getLongitude()) {\n now_Location = location;\n initStreetView();\n }\n }\n LatLng sydney = new LatLng(location.getLatitude(), location.getLongitude());\n map.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }\n });\n }", "@SuppressLint(\"MissingPermission\")\r\n @Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n Toast.makeText(MapsActivity.this, \"onMapReady call\", Toast.LENGTH_SHORT).show();\r\n mMap = googleMap;\r\n\r\n LatLng mySweetHome = new LatLng(25.3535828,68.36197439);\r\n\r\n CameraPosition cameraPosition = new CameraPosition.Builder()\r\n .target(mySweetHome)\r\n .zoom(16)\r\n .build();\r\n\r\n\r\n googleMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\r\n\r\n// if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\r\n// return;\r\n// }\r\n\r\n// mMap.setMyLocationEnabled(true);\r\n// mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\r\n// @Override\r\n// public void onMyLocationChange(Location location) {\r\n// Toast.makeText(MapsActivity.this,\"onLocationChanged is called\",Toast.LENGTH_SHORT).show();\r\n//\r\n// CameraUpdate center = CameraUpdateFactory.newLatLng(new LatLng(location.getLatitude(), location.getLongitude()));\r\n// CameraUpdate zoom = CameraUpdateFactory.zoomTo(11);\r\n// mMap.clear();\r\n//\r\n// MarkerOptions mp = new MarkerOptions();\r\n//\r\n// mp.position(new LatLng(location.getLatitude(), location.getLongitude()));\r\n// mp.icon(BitmapDescriptorFactory.fromResource(R.drawable.home));\r\n// mp.title(\"my position\");\r\n//\r\n// mMap.addMarker(mp);\r\n// mMap.moveCamera(center);\r\n// mMap.animateCamera(zoom);\r\n//\r\n// }\r\n// });\r\n\r\n\r\n// LatLng latifabad = new LatLng(25.354514, 68.358056);\r\n// MarkerOptions markerOptions = new MarkerOptions().position(latifabad).title(\"My sweet home\");\r\n// markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.home));\r\n// mMap.addMarker(markerOptions);\r\n\r\n\r\n// mMap.addMarker(new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_home_black_24dp)).position(latifabad).title(\"My Home\"));\r\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(latifabad));\r\n\r\n\r\n// CameraPosition cameraPosition = new CameraPosition.Builder()\r\n// .target(latifabad)\r\n// .zoom(15)\r\n// .build();\r\n// //move the map to selected marker\r\n// googleMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\r\n\r\n // Add a marker in Sydney and move the camera\r\n// LatLng sydney = new LatLng(-34, 151);\r\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\r\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\r\n\r\n\r\n// if (mMap == null) {\r\n// // Try to obtain the map from the SupportMapFragment.\r\n// if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\r\n// // TODO: Consider calling\r\n// // ActivityCompat#requestPermissions\r\n// // here to request the missing permissions, and then overriding\r\n// // public void onRequestPermissionsResult(int requestCode, String[] permissions,\r\n// // int[] grantResults)\r\n// // to handle the case where the user grants the permission. See the documentation\r\n// // for ActivityCompat#requestPermissions for more details.\r\n// return;\r\n// }\r\n// mMap.setMyLocationEnabled(true);\r\n// // Check if we were successful in obtaining the map.\r\n// if (mMap != null) {\r\n//\r\n//\r\n// mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\r\n//\r\n// @Override\r\n// public void onMyLocationChange(Location arg0) {\r\n// // TODO Auto-generated method stub\r\n//\r\n// mMap.addMarker(new MarkerOptions().position(new LatLng(arg0.getLatitude(), arg0.getLongitude())).title(\"It's Me!\"));\r\n// }\r\n// });\r\n//\r\n// }\r\n\r\n locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\r\n\r\n locationListener = new LocationListener() {\r\n @Override\r\n public void onLocationChanged(Location location) {\r\n\r\n\r\n Toast.makeText(MapsActivity.this,\"onLocationChanged\",Toast.LENGTH_SHORT).show();\r\n mMap.clear();\r\n\r\n LatLng userLocation = new LatLng(location.getLatitude(), location.getLongitude());\r\n\r\n mMap.addMarker(new MarkerOptions().position(userLocation).icon(BitmapDescriptorFactory.fromResource(R.drawable.homelocationmarker)).title(\"My Sweet Home\"));\r\n\r\n\r\n //move the map to selected marker\r\n // mMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\r\n\r\n\r\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(userLocation));\r\n\r\n Toast.makeText(MapsActivity.this, userLocation.toString(), Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n @Override\r\n public void onStatusChanged(String provider, int status, Bundle extras) {\r\n\r\n\r\n }\r\n\r\n @Override\r\n public void onProviderEnabled(String provider) {\r\n\r\n }\r\n\r\n @Override\r\n public void onProviderDisabled(String provider) {\r\n\r\n }\r\n\r\n\r\n };\r\n\r\n if (Build.VERSION.SDK_INT < 23) {\r\n\r\n\r\n locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\r\n\r\n }\r\n\r\n// else if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\r\n// Toast.makeText(MapsActivity.this,\"else if \",Toast.LENGTH_SHORT).show();\r\n//\r\n//\r\n// locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\r\n//\r\n// Location lastKnownLocation = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\r\n//\r\n// LatLng userLocation = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());\r\n//\r\n// mMap.clear();\r\n//\r\n// mMap.addMarker(new MarkerOptions().position(userLocation).title(\"Marker\"));\r\n//\r\n//\r\n//\r\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(userLocation));\r\n//\r\n// Toast.makeText(MapsActivity.this, userLocation.toString(), Toast.LENGTH_SHORT).show();\r\n//\r\n//\r\n// }\r\n\r\n else {\r\n\r\n Toast.makeText(MapsActivity.this,\"else\",Toast.LENGTH_SHORT).show();\r\n\r\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\r\n\r\n }\r\n\r\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void initLocationData() {\n\n // init google client and request for fused location provider\n fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(context);\n\n locationRequest = new LocationRequest()\n //.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) // GPS quality location points\n .setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY) // optimized for battery\n .setInterval(20000) // at least once every 20 seconds\n .setFastestInterval(10000); // at most once every 10 seconds\n\n locationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n\n Point userPoint;\n if (locationResult != null) {\n // update user location\n Location lastLocation = locationResult.getLastLocation();\n userPoint = new Point(lastLocation.getLatitude(), lastLocation.getLongitude());\n // cache location\n PreferencesCache.setLastLatitude(lastLocation.getLatitude());\n PreferencesCache.setLastLongitude(lastLocation.getLongitude());\n } else {\n // get cached data\n userPoint = new Point(PreferencesCache.getLastLatitude(), PreferencesCache.getLastLongitude());\n }\n\n navigator.updateUserLocation(userPoint);\n }\n };\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng israelLatLng = new LatLng(31.2175427,34.6095679);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(israelLatLng));\n init();\n }", "private void registerForGPS() {\n Log.d(NAMAZ_LOG_TAG, \"registerForGPS:\");\n Criteria criteria = new Criteria();\n criteria.setAccuracy(Criteria.ACCURACY_COARSE);\n criteria.setPowerRequirement(Criteria.POWER_LOW);\n criteria.setAltitudeRequired(false);\n criteria.setBearingRequired(false);\n criteria.setSpeedRequired(false);\n criteria.setCostAllowed(true);\n LocationManager locationManager = ((LocationManager) getSystemService(Context.LOCATION_SERVICE));\n String provider = locationManager.getBestProvider(criteria, true);\n\n if(!isLocationEnabled()) {\n showDialog(\"Location Access\", getResources().getString(R.string.location_enable), \"Enable Location\", \"Cancel\", 1);\n } else {\n ActivityCompat.requestPermissions(QiblaDirectionActivity.this,\n new String[]{Manifest.permission. ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }\n\n /* if (provider != null) {\n locationManager.requestLocationUpdates(provider, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);\n }\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n MIN_LOCATION_TIME, MIN_LOCATION_DISTANCE, qiblaManager);\n locationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);*/\n /*Location location = locationManager\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location == null) {\n location = ((LocationManager) getSystemService(Context.LOCATION_SERVICE))\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n }*/\n\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 100) {\n if (resultCode != RESULT_OK)\n Toast.makeText(getContext(), \"GPS est déactivé\", Toast.LENGTH_LONG).show();\n else {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n setupmap();\n MapForm.setMyLocationEnabled(true);\n }\n }\n }\n }", "@Override\n public void onCameraIdle() {\n Location centerLocation = new Location(\"\");\n LatLng midLatLng = this.map.getCameraPosition().target;\n centerLocation.setLatitude(midLatLng.latitude);\n centerLocation.setLongitude(midLatLng.longitude);\n hitNeighboursApi(centerLocation);\n HomeActivity activity = (HomeActivity) getActivity();\n activity.setmRequestLocation(midLatLng);\n requestedLocation.setText(\"\"+centerLocation.getLatitude()+\",\"+centerLocation.getLongitude());\n\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "private void updateLocationUI() {\n if (mMap == null) {\n return;\n }\n try {\n if (mLocationPermissionGranted) {\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n } else {\n mMap.setMyLocationEnabled(false);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mLastKnownLocation = null;\n getLocationPermission();\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }" ]
[ "0.6676493", "0.65596694", "0.6464735", "0.64278495", "0.6268458", "0.6264027", "0.62620395", "0.6261461", "0.6153833", "0.6146574", "0.61443305", "0.6126692", "0.61245847", "0.6119704", "0.6116397", "0.6106464", "0.6105377", "0.6094916", "0.6091193", "0.607697", "0.6074085", "0.6066837", "0.60593206", "0.6051577", "0.60504377", "0.6041901", "0.60305476", "0.6025349", "0.60248846", "0.60102016", "0.60025084", "0.59991384", "0.59946364", "0.59889776", "0.59827423", "0.598219", "0.5971155", "0.5966216", "0.59531647", "0.5944388", "0.59273744", "0.5923612", "0.59205335", "0.59199226", "0.59179187", "0.5917891", "0.5914204", "0.5908746", "0.59037626", "0.59007734", "0.58923286", "0.5889103", "0.58822984", "0.5881645", "0.5881015", "0.5879113", "0.5864837", "0.5864518", "0.5861586", "0.5858393", "0.5855999", "0.5847888", "0.5843785", "0.5834006", "0.5833637", "0.58326626", "0.5823604", "0.5822783", "0.5822783", "0.5820609", "0.5820609", "0.58204967", "0.5811245", "0.5799682", "0.5795798", "0.579002", "0.5772698", "0.5772033", "0.57710147", "0.5764042", "0.57591337", "0.5756833", "0.5753659", "0.5751583", "0.57507694", "0.5748746", "0.5748486", "0.5745257", "0.5743529", "0.5741498", "0.5739763", "0.5734169", "0.5730801", "0.57257545", "0.5724681", "0.57238615", "0.5721504", "0.5717619", "0.57157415", "0.57151896", "0.57151896" ]
0.0
-1
TODO Autogenerated method stub
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<crime_criminalBean> crime_criminalBeanlist=new crime_criminalDao().select(); request.setAttribute("crime_criminalBeanlist", crime_criminalBeanlist); request.getRequestDispatcher("crime_criminal_list.jsp").forward(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_zestmoney, container, false); setUpUI(view); mPaymentParams = getArguments().getParcelable(PayuConstants.KEY); payuConfig = getArguments().getParcelable(PayuConstants.PAYU_CONFIG); salt = getArguments().getString(PayuConstants.SALT); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6740675", "0.6725193", "0.67224836", "0.6699259", "0.6691596", "0.668896", "0.6687658", "0.66861755", "0.667755", "0.66756433", "0.6667425", "0.66667783", "0.6665166", "0.66614723", "0.66549766", "0.665031", "0.6643759", "0.6639389", "0.66378653", "0.66345453", "0.6626348", "0.66202056", "0.66176945", "0.66094035", "0.65976113", "0.65937936", "0.6585841", "0.6585124", "0.65741223", "0.65721804", "0.65698904", "0.65695107", "0.6569451", "0.6568099", "0.6565633", "0.6554688", "0.65533894", "0.65447044", "0.65432465", "0.6542017", "0.65385425", "0.6537571", "0.65369105", "0.6535379", "0.6533447", "0.6533258", "0.65316767", "0.6529574", "0.6528449", "0.65262675", "0.6525467", "0.6525181", "0.6524235", "0.6523963", "0.65187466", "0.65138274", "0.65137535", "0.6513218", "0.6513202", "0.65115535", "0.651113", "0.6510943", "0.6510124", "0.65094703", "0.65082514", "0.65038425", "0.65023196", "0.6501983", "0.65014684", "0.64982104", "0.64945936", "0.6492533", "0.6491023", "0.6488248", "0.64879525", "0.6487852", "0.6487744", "0.64873713", "0.6487171", "0.64851", "0.6485003", "0.6483167", "0.6482433", "0.64824027", "0.6481711", "0.6480902", "0.64779234", "0.64767206", "0.6476515", "0.6475657", "0.64747864", "0.64715266", "0.64714354", "0.64711314", "0.6470619", "0.6468112", "0.6466466", "0.64631015", "0.646268", "0.6462456", "0.64620507" ]
0.0
-1
Initialize UI Component of fragment
private void setUpUI(View view) { etMobileNumberZestmoney = view.findViewById(R.id.etZestmoneyMobileNumber); Button mBtnCheckEligibility = view.findViewById(R.id.btnCheckElibility); mTvEligibilityMessage = view.findViewById(R.id.tvEligibilityMessage); mBtnCheckEligibility.setOnClickListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract FragmentComponent setupComponent();", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\t if (arg0 != null) {\n\t\t\t arg0.putParcelable(\"android:support:fragments\",null);\n\t }\n\t\t super.onCreate(arg0);\n\t\t requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\t setLayout();\n\t\t // 注入控件\n\t ViewUtils.inject(this);\n\t\t init(arg0);\n\t}", "private View initUiComponents(LayoutInflater inflater, ViewGroup container){\n //Inflate a new view hierarchy from the specified XML node.\n View result = inflater.inflate(R.layout.test_fragment, container, false);\n btnFragment = (Button)result.findViewById(R.id.buttonFragment);\n txtFragment = (TextView)result.findViewById(R.id.txtFragment);\n btnFragment.setOnClickListener(this);\n return (result);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main, container, false);\n initUI(view);\n initData();\n setEventBus(this, true);\n return view;\n }", "private void init() {\n MyDashboard fragment = new MyDashboard();\n doFragmentTransaction(fragment, getString(R.string.dashboard), false);\n toolbar.setTitle(getString(R.string.dashboard));\n }", "private void initFragments() {\n\t\tZhiBoFragment zhiBoFragment = ZhiBoFragment.newInstance(null);\n\t\tzhiBoFragment.setSquareFragmentListener(this);\n\t\tLiaotianFragment liaotianFragment = LiaotianFragment.newInstance(null);\n\t\tliaotianFragment.setSquareFragmentListener(this);\n\t\tfragments.add(zhiBoFragment);\n\t\tfragments.add(liaotianFragment);\n\t\t\n\t\t\n\t}", "public void initView(){}", "private void initUI() {\n mLocalContainer = findViewById(R.id.local_video_view_container);\n mRemoteContainer = findViewById(R.id.remote_video_view_container);\n\n mCallBtn = findViewById(R.id.btn_call);\n mMuteBtn = findViewById(R.id.btn_mute);\n mSwitchCameraBtn = findViewById(R.id.btn_switch_camera);\n }", "@Override\r\n\tpublic void initUI(Bundle savedInstanceState) {\n\r\n\t}", "@Override\n\tprotected void initView() {\n\t\tsetShuohuaTouchListener();\n\t\tiv_shuohua.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tiv_operate.setSelected(!iv_operate.isSelected());\n\t\t\t\tiv_shuohua.setSelected(!iv_shuohua.isSelected());\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tmViewPager.setOnPageChangeListener(new OnPageChangeListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onPageSelected(int position)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcurrentPosition = position;\n\t\t\t\tif (position == 0) {// 直播\n\t\t\t\t\tZhiBoFragment fragment = ((ZhiBoFragment) fragments\n\t\t\t\t\t\t\t.get(position));\n\t\t\t\t\tif (liveModels == null || liveModels.size() == 0) {\n\t\t\t\t\t\t//暂停计时器查询\n\t\t\t\t\t\tstopTimeTask();\n\t\t\t\t\t\t\n\t\t\t\t\t\tsquareLiveDetailLiveRequest(fragment, false,0);\n\t\t\t\t\t}\n\t\t\t\t} else if (position == 1) {// 聊天\n\t\t\t\t\tLiaotianFragment fragment = ((LiaotianFragment) fragments\n\t\t\t\t\t\t\t.get(position));\n\t\t\t\t\tif (chatModels == null || chatModels.size()==0) {\n\t\t\t\t\t\t//暂停计时器查询\n\t\t\t\t\t\tstopTimeTask();\n\t\t\t\t\t\t\n\t\t\t\t\t\tsquareLiveDetailChatRequest(fragment, false,0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onPageScrolled(int position, float positionOffset,\n\t\t\t\t\tint positionOffsetPixels)\n\t\t\t{\n\t\t\t\tmIndicator.scroll(position, positionOffset);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onPageScrollStateChanged(int state)\n\t\t\t{\n\n\t\t\t}\n\t\t});\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return initUiComponents(inflater, container);\n }", "private void initView() {\n\n }", "private void init() {\n initView();\n setListener();\n }", "private void initFragment(Fragment fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.add(R.id.contentFrame, fragment);\n transaction.commit();\n }", "private void initView() {\n List<Fragment> fragmentList = new ArrayList<>();\n fragmentList.add(new FourthFragment());\n fragmentList.add(new FifthFragment(imagePath));\n// set titles\n List<String> title = new ArrayList<>();\n title.add(\"第一页\");\n title.add(\"第二页\");\n// set the adapter\n viewPager.setAdapter(new FragmentPagerAdapter(getChildFragmentManager()) {\n @NonNull\n @NotNull\n @Override\n public Fragment getItem(int position) {\n return fragmentList.get(position);\n }\n\n @Override\n public int getCount() {\n return fragmentList.size();\n }\n\n @Nullable\n @org.jetbrains.annotations.Nullable\n @Override\n public CharSequence getPageTitle(int position) {\n return title.get(position);\n }\n });\n tabLayout.setupWithViewPager(viewPager);\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n public MainPages_MyProfile_Fragment() {\n Log.i(\"Init\", \"Initialize profile fragment...\");\n this.selected = R.id.profile_info_item;\n this.infoFragment = Info_Profile_Fragment.getInstance();\n this.imageFragment = Image_Profile_Fragment.getInstance();\n }", "private void initUi() {\n mToolbsr = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(mToolbsr);\n\n fab = (FloatingActionButton) findViewById(R.id.fab);\n mDrawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);\n mNavigationView = (NavigationView) findViewById(R.id.nav_view);\n\n tabLayout = (TabLayout) findViewById(R.id.tabs);\n viewPager = (ViewPager) findViewById(R.id.viewpager);\n }", "@Override\n public void initView() {\n }", "@Override protected void initViews() {\n\t\tsetFragments(F_PopularFragment.newInstance(T_HomeActivity.this), F_TimelineFragment.newInstance(T_HomeActivity.this));\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_mainfragment, container, false);\n init(view);\n return view;\n }", "void initView();", "void initializeUIComponents(View v);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n myFragment = inflater.inflate(R.layout.fragment_favourite, container, false);\n\n initComponent();\n\n return myFragment;\n\n }", "protected abstract void initializeComponent(View view);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_main, container, false);\n setGuiComponents(rootView);\n\n return rootView;\n }", "@Override\n public void initView() {\n\n }", "protected abstract void initView();", "private void init() {\n refreshLayout = new TurbolinksSwipeRefreshLayout(getContext(), null);\n addView(refreshLayout, 0);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "@Override\n\tprotected void setupFragmentComponent(AppComponent appComponent) {\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n LayoutInflater inflater = getActivity().getLayoutInflater();\n if (mainView == null) {\n mainView = inflater.inflate(R.layout.fragment_mywarrelease, null);\n mContext = inflater.getContext();\n initView();\n }\n }", "public abstract void initView();", "public SistudiaMainFragment() {\r\n // Required empty public constructor\r\n }", "@Override\n public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n initView();\n }", "public DisplayFragment() {\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n FacebookSdk.sdkInitialize(getActivity());\n callbackManager = CallbackManager.Factory.create();\n rootView = inflater.inflate(dk.eatmore.demo.R.layout.fragment_login_main, parent, false);\n setupUI(rootView);\n// setupUI(rootView.findViewById(R.id.signupcoordinatorLayout));\n initView();//initialization\n initObjects();\n initGesture();\n onClickListener();\n // iitDialog();\n initShimmerEffect();\n getRestroInfo();\n\n return rootView;\n }", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_home, container, false);\n\n globalContext = this.getContext();\n globalFragmentActivity = this.getActivity();\n\n setUI(view);\n SharedPreferencesService.initialize(globalContext);\n setListeners();\n initializeFragment();\n initializeAdBanner();\n showWelcomeDialogIfFirstTime();\n return view;\n }", "private void initUI() {\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_mainpage_, container, false);\n initUI(v);\n clickEvents();\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_complete, container, false);\n x.view().inject(this, root);\n initUserNameEditText();\n initSexLayout();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_edit_course, container, false);\n initUI(view);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my_shop_product, container, false);\n initializeProductFragment(view);\n initializeButton(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_locallife, null);\n Myinitview();\n MyinitData();\n //mGridView.setAdapter(new LocalAdapter());\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_profile, container, false);\n initializedView(view);\n initializedListners();\n return view;\n }", "public WelcomeFragment() {}", "@Override\r\n protected void onFinishInflate() {\r\n initComponents();\r\n }", "private void viewInit() {\n }", "public CuartoFragment() {\n }", "public MainView() {\n initComponents();\n \n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.main_layout_holder);\r\n\t\tinitFragments();\r\n\t}", "@Override\r\n\tprotected void initViews(Bundle savedInstanceState) {\n\t\t\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_fragment3, container, false);\n setupUI(view);\n return view;\n }", "private void initFragmentAutoInjection() {\n BucketApplication app;\n app = (BucketApplication) getApplication();\n\n getSupportFragmentManager().registerFragmentLifecycleCallbacks(new FragmentLifecycleCallbacks() {\n @Override\n public void onFragmentAttached(FragmentManager fm, Fragment f, Context context) {\n super.onFragmentAttached(fm, f, context);\n if(f instanceof ListingFragment) {\n app.getAppComponentInjector().inject((ListingFragment) f);\n } else if (f instanceof ListingPreferencesFragment) {\n app.getAppComponentInjector().inject((ListingPreferencesFragment) f);\n }\n }\n }, false);\n }", "protected abstract void initializeView();", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.fragment_slider, null);\n\t\tinitUi(view);\n\t\tsetListener();\n\t\treturn view;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n View view = inflater.inflate(R.layout.fragment_guan_lxswei_shen, container, false);\n ButterKnife.bind(this, view);\n init();\n return view;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.fragment_profile_setup);\n\n findUIElements();\n }", "private void setupFragments() {\n FragmentManager fm = getSupportFragmentManager();\n sb_frag = (StatusBar)fm.findFragmentById(R.id.statusmarket);\n\n if(sb_frag == null)\n {\n sb_frag = new StatusBar();\n fm.beginTransaction().add(R.id.statusmarket, sb_frag).commit();\n }\n sb_frag.setupInitial(currentPlayer);\n\n ai_frag = (AreaInfo) fm.findFragmentById(R.id.overviewlayout);\n\n //try find the fragment, if it doesnt exist then create it\n if (ai_frag == null) {\n //create the fragment if not exist\n ai_frag = new AreaInfo();\n fm.beginTransaction().add(R.id.overviewlayout, ai_frag).commit();\n }\n\n ai_frag.setCurrentArea(null);\n\n\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_category, container, false);\n initializeUI(view);\n loadData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_create_course_ui, container, false);\n ButterKnife.bind(this, view);\n\n //add list to spinner\n spinnerFieldList();\n return view;\n }", "void init() {\n tabHost = findViewById(android.R.id.tabhost);\n tabHost.setup(this, getSupportFragmentManager(), android.R.id.tabcontent);\n tabHost.addTab(tabHost.newTabSpec(\"Login\").setIndicator(\"Login\", null), LoginFragment.class, null);\n tabHost.addTab(tabHost.newTabSpec(\"Register\").setIndicator(\"Register\", null), RegisterFragment.class, null);\n }", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "private void initializeUI() {\n emailTV = findViewById(R.id.email);\n passwordTV = findViewById(R.id.password);\n regBtn = findViewById(R.id.register);\n progressBar = findViewById(R.id.progressBar);\n nameTV = findViewById(R.id.displayName);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initView();\n }", "public abstract void initUiAndListener();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n view = inflater.inflate(R.layout.fragment_about_us, container, false);\n initialise(view);\n //setListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "public HomeSectionFragment() {\n\t}", "private void init() {\n\t\tpager = (MainViewPager) findViewById(R.id.main_pager);\n\t\tfrageManager = getSupportFragmentManager();\n\t\tfoot_group = (RadioGroup) findViewById(R.id.foot_group);\n\t\tadapter = new MyFragmentAdapter(frageManager, list);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tower_parameter, container, false);\n bind = ButterKnife.bind(this,view);\n EventBus.getDefault().register(this);\n initRecycleView();\n initView();\n initRotationAngle();\n initHookup();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_profil, container, false);\n findView();\n initView();\n initListener();\n\n AndroidNetworking.initialize(getContext());\n\n return view;\n }", "private void instanciateFragments() {\r\n connectionFragment = new ConnectionFragment();\r\n mNetworkConnectionFragment = new NetworkConnectionFragment();\r\n mMotorFragment = new MotorFragment();\r\n mProcessorFragment = new ProcessorFragment();\r\n mPWMFragment = new PWMFragment();\r\n mOrderTestFragment = new OrderTestFragment();\r\n mTestsFragment = new TestsFragment();\r\n mPositionTestFragment = new PositionTestFragment();\r\n mOrderPilotFragment = new OrderPilotFragment();\r\n mCommandPilotFragment = new CommandPilotFragment();\r\n mPositionPilotFragment = new PositionPilotFragment();\r\n mCartographerFragment = new CartographerFragment();\r\n mHistoryFragment = new HistoryFragment();\r\n }", "private void initView() {\n frag4 = new Fragment4();\n //Fragment2 frag2 = new Fragment2();\n Fragment3 frag3 = new Fragment3();\n\n fragments = new Fragment[]{frag4, frag3}; // 要把Fragment*.java中import android.support.v4.app.Fragment;才行。否则不能添加进来。\n\n\n imageViews = new ImageView[2];\n imageViews[0] = (ImageView) findViewById(R.id.iv_zhuye);\n imageViews[1] = (ImageView) findViewById(R.id.iv_wode);\n imageViews[0].setSelected(true);\n\n textViews = new TextView[2];\n textViews[0] = (TextView) findViewById(R.id.tv_zhuye);\n textViews[1] = (TextView) findViewById(R.id.tv_wode);\n textViews[0].setTextColor(ContextCompat.getColor(getApplicationContext(),R.color.selected));\n\n getSupportFragmentManager().beginTransaction()\n .add(R.id.LL_content_main, frag4)\n .add(R.id.LL_content_main, frag3)\n .hide(frag3)\n .show(frag4)\n .commit();\n\n LinearLayout ll_zhuye = (LinearLayout) findViewById(R.id.LL_zhuye);\n LinearLayout ll_wode = (LinearLayout) findViewById(R.id.LL_wode);\n\n ll_zhuye.setOnClickListener(this);\n ll_wode.setOnClickListener(this);\n\n }", "public FragmentMy() {\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_elearning, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_site_progress_add, container, false);\n setHasOptionsMenu(true);\n ButterKnife.bind(this, view);\n\n initializeUI();\n bindData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_today, container, false);\n initComponent(view);\n return view;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_cases, container, false);\n Init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_student_profile, container, false);\n\n findView(view);\n init();\n\n return view;\n }", "public HomeFragment() {}", "public RecipeVideoFragment() {\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_web, container, false);\n initialize(view);\n return view;\n }", "public MainActivityFragment(){\n\n }", "private void initView() {\n mBinding.swipeRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n\n mBinding.swipeRefresh.setRefreshing(false);\n }\n });\n\n\n setUpBookingRecycler();\n bindStaticData();\n setUpBookingAdapter();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View itemView= inflater.inflate(R.layout.fragment_home, container, false);\n initTab(itemView);\n return itemView;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my, container, false);\n initView(view);\n return view;\n }", "public UpdaterFragment() {\n // Required empty public constructor\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_viewer, container, false);\n initComponents(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "public progFragment() {\n }", "public void init()\n {\n buildUI(getContentPane());\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_menu_06, container, false);\n init(view);\n return view;\n }", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}" ]
[ "0.7395164", "0.7112732", "0.7000872", "0.69729584", "0.6935601", "0.6865008", "0.68502754", "0.6844855", "0.6838507", "0.68091255", "0.6809073", "0.6801469", "0.67875", "0.67773026", "0.6774248", "0.67617697", "0.67485523", "0.6740962", "0.67033076", "0.6699806", "0.6688917", "0.66744626", "0.66631794", "0.6658623", "0.6658493", "0.66533893", "0.6649341", "0.66473544", "0.66460305", "0.66441727", "0.66441727", "0.6636763", "0.6620282", "0.6620182", "0.6620062", "0.66187763", "0.66159886", "0.66060346", "0.6605128", "0.6605128", "0.66027546", "0.66024554", "0.65995", "0.65960395", "0.6595757", "0.6583635", "0.6583211", "0.6577833", "0.6564478", "0.65594196", "0.65583926", "0.6557984", "0.65575373", "0.65550846", "0.6555047", "0.6549791", "0.6549629", "0.6541974", "0.6532998", "0.653129", "0.65309286", "0.6526199", "0.6526176", "0.65230614", "0.65194803", "0.65134776", "0.6513211", "0.65079635", "0.6507671", "0.64986414", "0.64948416", "0.6492684", "0.6490318", "0.64896387", "0.6486703", "0.6481192", "0.6478444", "0.64765954", "0.6474433", "0.6472097", "0.64682555", "0.64665574", "0.6466459", "0.6466219", "0.64633393", "0.6457363", "0.6452918", "0.6452085", "0.6447045", "0.6444239", "0.6441639", "0.6439388", "0.64377266", "0.6435774", "0.64338243", "0.64337766", "0.6420404", "0.64196205", "0.641947", "0.6418497", "0.6418497" ]
0.0
-1
Called when activity staretd for result is finished
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == PayuConstants.PAYU_REQUEST_CODE) { getActivity().setResult(resultCode, data); getActivity().finish(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onFinish() {\n }", "@Override\n public void onFinish() {\n }", "public void onFinish() {\n\n }", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "public abstract void finished(Object result);", "@Override\r\n public void onFinish() {\n }", "@Override\n public void onFinish() {\n\t\t\t\n }", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\n\t\t\t\t\t}", "@Override\n\t\tpublic void onFinish() {\n\t\t}", "public void onFinish() {\n }", "@Override\n public void onFinished() {\n\n }", "@Override\n public void onFinish() {\n }", "@Override\n public void onFinish() {\n }", "public void end(){\r\n\t\tsetResult( true ); \r\n\t}", "@Override\n public void onFinished() {\n\n }", "public void onFinish() {\n\n\t}", "@Override\n public void onFinished() {\n }", "@Override\n public void onFinished() {\n }", "public void onFinished();", "@Override\n\t\tpublic void onFinish() {\n\t\t\tfinalizar();\n\t\t}", "void onComplete(ResultModel result);", "void onFinish();", "@Override\r\n\tpublic void onFinish(ITestContext Result) {\n\t\tSystem.out.println(\"onFinish :\"+ Result.getName());\r\n\t}", "@Override\n protected void onPostExecute(String result){\n finish();\n }", "@Override\n\tpublic void onFinish(ITestContext result) {\n\t\t\n\t}", "public abstract void onFinish();", "@Override\n\tpublic void visitEnd() {\n\t\tresultReady = true;\n\t}", "protected abstract void onFinishObject(T result);", "private void finish() {\n }", "@Override\r\n\t\t\tpublic void onFinish() {\n\t\t\t\tsuper.onFinish();\r\n\t\t\t\tLog.i(\"finish\", \"finish\");\r\n\t\t\t\tdismissProgress();\r\n\t\t\t}", "protected void finishExecution() {\r\n\r\n\t}", "@Override\n\tpublic void finish() {\n\t\tIntent data = new Intent();\n\t\t// Activity finished ok, return the data\n\t\t\n\t\t// TODO 2 put the data with the id returnValue\n\t\tdata.putExtra(RATING_OPTION, \"\"+rating.getProgress());\n\t\t\n\t\t// TODO 3 use setResult(RESULT_OK, intent);\n\t\t// to return the Intent to the application\n\t\tsetResult(RESULT_OK, data);\n\n\t\tsuper.finish();\n\t}", "@Override\n public void onSuccess(Void unused) {\n finish();\n }", "@Override\n public void onSuccess(Void unused) {\n finish();\n }", "protected void finish() {\n }", "@Override\n public void completed(Integer result, String attachment)\n {\n }", "void finish(String result, int resultCode);", "@Override\n public void onTaskComplete(String result) {\n\n //TODO\n\n }", "@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}", "public void finish(ServiceResult result);", "public void finish() {}", "public void handleFinish()\n {\n }", "@Override\n\t\t\t\t\tpublic void onComplete() {\n\t\t\t\t\t}", "@Override\n public void afterFinish() {\n \n }", "public void onComplete() {\r\n\r\n }", "@Override\n protected void onPostExecute(Void result) {\n // This is where we would process the results if needed.\n this.progressDialog.dismiss();\n }", "public void finished();", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n\t\t\tpublic void onComplete(Bundle values) {\n\n\t\t\t\tfinish();\n\t\t\t}", "@Override\n\tpublic void onTaskDone(String result) {\n\t\t\n\t}", "public void finish() {\n if (!isFinishing) {\n performFnishWithRequest(true);\n }\n }", "protected void done() {\n\t\ttry {\n\t\t\t// get the result of doInBackground and display it\n\t\t\tresultJLabel.setText(get().toString());\n\t\t} // end try\n\t\tcatch (InterruptedException ex) {\n\t\t\tresultJLabel.setText(\"Interrupted while waiting for results.\");\n\t\t} // end catch\n\t\tcatch (ExecutionException ex) {\n\t\t\tresultJLabel.setText(\"Error encountered while performing calculation.\");\n\t\t} // end catch\n\t}", "@Override\r\n\t\t\tpublic void onCompleted() {\n\r\n\t\t\t}", "@Override\n public void onCompleted() {\n }", "@Override\n public void onCompleted() {\n }", "@Override\n \tpublic void finished()\n \t{\n \t}", "@Override\n protected void onPostExecute(final Void unused) {\n super.onPostExecute(unused);\n Log.i(\"Dict\", \"Done processing\");\n delegate.processFinish(result);\n }", "@Override\n\tpublic void finish() {\n\n\t}", "@Override\n\tpublic void finish() {\n\n\t}", "@Override\n\tpublic void finish() {\n\n\t}", "public void processFinish(int result) {\n MyApp myApp = (MyApp) getApplication();\n\n if (myApp.match[myApp.division()].size() > 0) {\n inflateMe();\n }\n\n }", "@Override\n\tpublic void finish() {\n\t\t\n\t}", "public void onResultConsumed() {\n }", "@Override\n public void onSuccess(Void aVoid) {\n finish();\n }", "public void onComplete(String result) {\n\t\tfileIO.stringToReward(result);\n\t\tfileIO.exportRewards();\n\t\tgetData();\n\t\tinitiateUI();\n\t}", "protected void onEnd() {}", "@Override\n\t\tpublic void onCompleted() {\n\t\t}", "@Override\n public void finish() {\n // Send the result or an error and clear out the response\n if (this.mAccountAuthenticatorResponse != null) {\n if (this.mResultBundle != null) {\n this.mAccountAuthenticatorResponse.onResult(this.mResultBundle);\n } else {\n this.mAccountAuthenticatorResponse.onError(AccountManager.ERROR_CODE_CANCELED, \"canceled\");\n }\n // Clear out the response\n this.mAccountAuthenticatorResponse = null;\n }\n super.finish();\n }", "@Override\r\n\tpublic void onFinish(ITestContext arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onFinish(ITestContext arg0) {\n\t\t\r\n\t}", "@Override\n public void run() {\n thisActivity.setResult(FROM_LOADINGSCREEN_NO_ADS_FOUND);\n thisActivity.finish();\n }", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tmResult = result;\n\t\t\tmIsFinish = true;\n\t\t\tif (mFinishListener != null) {\n\t\t\t\tmFinishListener.OnFinish(result);\n\t\t\t}\n\t\t\tGlobalConstants.PrintLog_D(\"[GetSource->onPostExecute]\" + result);\n\t\t}", "public abstract void finished();", "public void onFinish() {\r\n Intent endGame = new Intent(getApplicationContext(),Results.class);\r\n endGame.putExtra(\"finalScore\", textViewCurrent.getText().toString());\r\n endGame.putExtra(\"mistakes\",wrongScans);\r\n endGame.putExtra(\"totalScans\",totalScans);\r\n startActivity(endGame);\r\n }", "@Override\n\t\t\t\tpublic void onFinished(JavaScriptObject result) {\n\t\t\t\t\tcontinueWithForm(events);\n\t\t\t\t}", "public void processFinish(GroceryList result) {\n\n currentGroc = result.getGroceryList();\n adapter = new GroceryRowAdapter(mContext, currentGroc);\n lv.setAdapter(adapter);\n setListener(lv);\n }", "interface OnResultListener {\n void onFinished();\n }", "protected void execute() {\n finished = true;\n }", "@Override\n protected void onPostExecute(RoadInfo input) {\n delegate.processFinish(input);\n activity = null;\n }", "public void finish() { \n\t\t\n\t}", "void onTaskComplete(T result);", "@Override\n protected void onPostExecute(Boolean success) {\n super.onPostExecute(success);\n resultListener.onTaskFinished(this, success);\n }", "public void onCompleted() {\n\t\t\n\t\t }", "protected abstract void finish();", "public void finish() {\n\n\t}", "public void finished(final boolean result) {\r\n\t\t\thandler.post(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\tif (result) {\r\n\t\t\t\t\tif (controller == MultiController.BLUETOOTH) {\r\n\t\t\t\t\t\tfinishActivity(BluetoothHandler.REQUEST_ADDRESS);\r\n\t\t\t\t\t\tfinReq = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstartMultiPlayer();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfailedMultiPlayer();\r\n\t\t\t\t\tfinReq = false;\r\n\t\t\t\t}\t\t\r\n\t\t\t}});\r\n\t\t}", "@Override\r\n\t\tprotected void onPostExecute(IDCardItem result) {\n\t\t\tsuper.onPostExecute(result);\r\n\t\t\treadResult(result);\r\n\t\t}", "@Override\r\n\t\tprotected void onPostExecute(Void result)\r\n\t\t{\n\t\t}" ]
[ "0.7593092", "0.7571035", "0.7555998", "0.74541056", "0.74541056", "0.7446394", "0.7441331", "0.7424131", "0.74137235", "0.7403963", "0.7389781", "0.73860526", "0.7386021", "0.73603725", "0.7359203", "0.735339", "0.733958", "0.7275007", "0.7275007", "0.72580117", "0.7197338", "0.7184191", "0.71705323", "0.7154409", "0.715209", "0.7147863", "0.711221", "0.71053064", "0.7044842", "0.7042791", "0.7033439", "0.6988072", "0.69660175", "0.6907734", "0.6907734", "0.69037664", "0.68811506", "0.68662846", "0.6854759", "0.6852085", "0.6852085", "0.6836463", "0.6835193", "0.6830618", "0.68262523", "0.6813361", "0.6791502", "0.67725074", "0.67670465", "0.67512184", "0.67512184", "0.67512184", "0.67512184", "0.67512184", "0.67512184", "0.67512184", "0.67512184", "0.67512184", "0.67512184", "0.67512184", "0.67512184", "0.67401105", "0.6717518", "0.67138976", "0.67082083", "0.67046475", "0.6702219", "0.6702219", "0.6701303", "0.6701263", "0.66963947", "0.66963947", "0.66963947", "0.66952115", "0.6691989", "0.6669112", "0.6666882", "0.66542697", "0.6651738", "0.6650858", "0.6641389", "0.66403484", "0.66403484", "0.663409", "0.66215247", "0.6616229", "0.6613793", "0.6604296", "0.6603428", "0.6589531", "0.6586932", "0.65809005", "0.6580513", "0.65767056", "0.65589345", "0.6537401", "0.65366554", "0.6535116", "0.6526866", "0.65063673", "0.6489073" ]
0.0
-1
TODO Autogenerated method stub
@Override public void setRequest(Map<String, Object> arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { begindialog.cancel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1