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
/ Gets all the service requests for the Admin page
@SuppressWarnings("unchecked") public List<ServiceBean> getService_Requests() { logger.info("========================== Getting ALL service requests for the admin home page... ================================="); List<ServiceBean> beanList = null; Session session = sessionFactory.getCurrentSession(); Query query = null; List<String> scalarPropsList = null; scalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_SERVICE_REQUESTS_ADMIN_SQL_SCALAR); if (scalarPropsList != null) { query = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_SERVICE_REQUESTS_ADMIN_SQL); query.setResultTransformer(Transformers.aliasToBean(ServiceBean.class)); beanList = (List<ServiceBean>) query.list(); } return beanList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/all\")\n public List<Admin> getAll(){\n return adminService.getAll();\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ServiceBean> getServiceRequestsByStatus(List<String> statusList)\r\n\t{\r\n\t\tlogger.debug(\"Getting service requests for the admin home page...\");\r\n\t\tSystem.out.println(\"Getting service requests for the admin home page...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\t\r\n\t\tString statuses = StringUtil.getStatusList(statusList);\r\n\t String sql = SQLUtil.getServiceRequestsByStatus(statuses);\r\n\t \r\n\t Query query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_SERVICE_REQUESTS_ADMIN_SQL_SCALAR);\r\n\t\t\t\r\n\t\t\tif (scalarPropsList != null)\r\n\t\t\t{\r\n\t\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, sql);\r\n\t\t\t\tquery.setResultTransformer(Transformers.aliasToBean(ServiceBean.class));\r\n\t\t\t}\r\n\t\r\n\t\treturn query.list();\r\n\t }", "@RequestMapping(path = \"medservices\", method = RequestMethod.GET)\n public List<MedicalService> getAllMedServices(){\n return medicalServiceService.getAllMedServices();\n }", "void doGetAdminInfo() {\n\t\tlog.config(\"doGetAdminInfo()...\");\n\t\tthis.rpcService.getAdminInfo(new AsyncCallback<DtoAdminInfo>() {\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tString errorMessage = \"Error when getting admin info! : \" + caught.getMessage();\n\t\t\t\tlog.severe(errorMessage);\n\t\t\t\tgetAdminPanel().setActionResult(errorMessage, ResultType.error);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(DtoAdminInfo adminInfo) {\n\t\t\t\tlog.config(\"getAdminInfo() on success - \" + adminInfo.getListLogFilenames().size() + \" logs filenames.\");\n\t\t\t\tgetAdminPanel().setAdminInfo(adminInfo);\n\t\t\t}\n\t\t});\n\t}", "@GetMapping(\"/administrators\")\n\tpublic ResponseEntity<Object> getAllAdministrators(HttpServletRequest request){\n\t\tString email = SessionManager.getInstance().getSessionEmail(request.getSession());\n\t\tif(service.findByEmail(email) == null) {\n\t\t\tSessionManager.getInstance().delete(request.getSession());\n\t\t\treturn new ResponseEntity<>(HttpStatus.UNAUTHORIZED); \n\t\t}else {\n\t\t\tList<Administrator> a = service.findAll();\n\t\t\tIterator<Administrator> i = a.iterator();\n\t\t\twhile (i.hasNext()) {\n\t\t\t Administrator adm = i.next();\n\t\t\t if(adm.getEmail().equals(email)) i.remove();\n\t\t\t}\n\t\t\tMappingJacksonValue mappedAdmin = new MappingJacksonValue(a);\n\t\t\tmappedAdmin.setFilters(new SimpleFilterProvider().addFilter(Administrator.FILTER, SimpleBeanPropertyFilter.filterOutAllExcept(\"id\", \"email\", \"name\")));\n\t\t\treturn new ResponseEntity<>(mappedAdmin, HttpStatus.OK);\n\t\t}\n\t}", "@GetMapping(\"/service_requests\")\n public String getAllServiceRequests(Model model){\n String role = userService.getRole(userService.getCurrentUserName());\n model.addAttribute(\"role\", role);\n\n model.addAttribute(\"serviceRequests\", serviceRequestService.getAllServiceRequests());\n\n return \"service_requests.html\";\n }", "void getRequests();", "public Map listServices() throws IOException\n\t{\n\t\treturn request(GET, address(null, null));\n\t}", "@GetMapping(path=\"/getall\")\r\n\tpublic @ResponseBody Iterable<MyClass> getAllAdmins() {\n\t\treturn classRepository.findAll();\r\n\t}", "@RolesAllowed(\"admin\")\n\t@GetMapping(\"/all\")\n\tpublic List<IncidentModel> getAll(HttpServletRequest request){\n\t\tAuthUtil.getInfo();\n\t\tList<IncidentModel> incidentList = service.getAll();\n\t\t\n\t\tgcMqttClient.publish(1, false, \"incident\", incidentList.toString());\n\n\t\treturn incidentList;\n\t}", "@Test\n public void getAdminsTest() throws ApiException {\n String scope = null;\n AdminResponse response = api.getAdmins(scope);\n\n // TODO: test validations\n }", "public List<ServerServices> listServerServices();", "@RequestMapping(value = \"/endpoint_manager\", method = RequestMethod.GET, produces = \"application/json; charset=utf-8\")\r\n public String endpointManager(HttpServletRequest request, ModelMap model) throws ServletException, IOException {\r\n UserAuthorities ua = userAuthoritiesProvider.getInstance();\r\n if (ua.userIsAdmin() || ua.userIsSuperUser()) {\r\n return(renderPage(request, model, \"endpoint_manager\", null, null, null, false));\r\n } else {\r\n throw new SuperUserOnlyException(\"You are not authorised to manage WMS endpoints for this server\");\r\n }\r\n }", "@GetMapping(\"/managers\")\n @Timed\n public List<Manager> getAllManagers() {\n log.debug(\"REST request to get all Managers\");\n return managerService.findAll();\n }", "@GetMapping(\"/route/list\")\n public String allRoutesPage() {\n return \"admin/route_list\";\n }", "@Override\r\n\tpublic List<Admins> getQueryAdminAll() {\n\t\treturn adi.queryAdminAll();\r\n\t}", "@RequestMapping(value = \"/endpoint_managerd\", method = RequestMethod.GET, produces = \"application/json; charset=utf-8\")\r\n public String endpointManagerDebug(HttpServletRequest request, ModelMap model) throws ServletException, IOException {\r\n UserAuthorities ua = userAuthoritiesProvider.getInstance();\r\n if (ua.userIsAdmin() || ua.userIsSuperUser()) {\r\n return(renderPage(request, model, \"endpoint_manager\", null, null, null, true));\r\n } else {\r\n throw new SuperUserOnlyException(\"You are not authorised to manage WMS endpoints for this server\");\r\n }\r\n }", "@RequestMapping(value = \"/admin\", method = RequestMethod.GET)\n\tpublic ModelAndView adminPage() {\n\t\tModelAndView model = new ModelAndView();\n\t\tmodel.addObject(\"categories\", myService.listGroups());\n\t\tmodel.addObject(\"products\", myService.displayProducts());\n\t\tmodel.setViewName(\"adminmy\");\n\t\treturn model;\n\t}", "@Override\n\tpublic List<Admin> getAdmins() {\n\t\treturn ar.findAll();\n\t}", "List<SdkHttpRequest> getRequests();", "List<Service> services();", "@Override\n public List<ServiceEndpoint> listServiceEndpoints() {\n return new ArrayList<>(serviceEndpoints.values());\n }", "@RequestMapping(\"/listeService\")\n\t\tpublic String listeService() {\n\t\t\t\n\t\t\treturn \"listeService\";\n\t\t}", "@Override\r\n\tpublic List<sn.ucad.master.assurance.bo.Service> findAllService() {\n\t\treturn serviceRepository.findAll();\r\n\t}", "@RequestMapping(value = \"/admin\", method = RequestMethod.GET)\n public ModelAndView adminPage() {\n logger.info(\"Admin GET request\");\n\n String login = authorizationUtils.getCurrentUserLogin();\n String message = MessageFormat.format(\"User login: {0}\", login);\n logger.info(message);\n\n ModelAndView model = new ModelAndView();\n model.addObject(\"search\", new SearchDto());\n model.setViewName(\"admin\");\n return model;\n }", "@RestAPI\n \t@PreAuthorize(\"hasAnyRole('A')\")\n \t@RequestMapping(value = {\"/api/\", \"/api\"}, method = RequestMethod.GET)\n \tpublic HttpEntity<String> getAll() {\n \t\treturn toJsonHttpEntity(agentManagerService.getAllVisibleAgentInfoFromDB());\n \t}", "public List<AdminOrderDto> getAllAdminOrderDto() throws ServiceException {\n\t\tList<AdminOrderDto> orderList = new ArrayList<>();\n\t\ttry (DaoCreator daoCreator = new DaoCreator()) {\n\t\t\tOrderDao orderDao = daoCreator.getOrderDao();\n\t\t\torderList = orderDao.getAllOrdersForAdmin();\n\t\t\tCollections.reverse(orderList);\n\t\t\tLOGGER.info(\"Find and return all orders!\");\n\t\t} catch(DaoException|ConnectionException|SQLException e) {\n\t\t throw new ServiceException(\"Can't return all client orders from DB\", e);\n\t\t}\n\t\treturn orderList;\n\t}", "TrackerAdminRequests getTrackerAdminRequests(final Integer id);", "@RequestMapping(value = \"/rest/accesss\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Access> getAll() {\n log.debug(\"REST request to get all Accesss\");\n return accessRepository.findAll();\n }", "public List<String> getServices() throws IOException;", "@External(readonly = true)\n\tpublic List<Address> get_admin(){\n\t\t\n\t\tif (DEBUG) {\n\t\t\tContext.println( Context.getOrigin().toString() + \" is getting admin addresses.\" + TAG);\n\t\t}\n\t\tAddress[] admin_list = new Address[this.admin_list.size()];\n\t\tfor(int i= 0; i< this.admin_list.size(); i++) {\n\t\t\tadmin_list[i] = this.admin_list.get(i);\n\t\t}\n\t\treturn List.of(admin_list);\n\t}", "public Map<String, List<String>> getServices();", "@RequestMapping(value = \"/\")\n public Map<String, Object> showAll() {\n// Get all invoices\n List<Invoice> invoices = invoiceService.findAll();\n// Build response\n Map<String, Object> response = new LinkedHashMap<String, Object>();\n response.put(\"totalInvoices\", invoices.size());\n response.put(\"invoices\", invoices);\n// Send to client\n return response;\n }", "@Override\r\n\tpublic List<Admin> getAdminDetails() {\n\t\tList<Admin> admin =dao.getAdminDetails();\r\n return admin;\r\n\t}", "public List<Service> getService() {\n\t\treturn ServiceInfo.listService;\n\t}", "public Object getAllCustomers(HttpServletRequest req);", "public static ArrayList<Admin> getLockedAdmin() {\n\t\tRequestContent rp = new RequestContent();\n\t\trp.type = RequestType.GET_LOCKED_ADMINS;\n\t\tReceiveContent rpp = sendReceive(rp);\n\t\tArrayList<Admin> adminBloccati = (ArrayList<Admin>) rpp.parameters[0];\n\t\treturn adminBloccati;\n\t}", "@GetMapping(value = {\"/getAllOfferedServices\", \"/getAllOfferedServices/\"})\n\tpublic List<OfferedServiceDto> getAllOfferedServices() {\n\t\tList<OfferedServiceDto> offeredServiceDtos = new ArrayList<>();\n\t\tfor (OfferedService offeredService: offeredServiceService.getAllOfferedServices()) {\n\t\t\tofferedServiceDtos.add(convertToDto(offeredService));\n\t\t}\n\t\treturn offeredServiceDtos;\n\t}", "public List<String> getServices() {\n return runtimeClient.getServices();\n }", "@Override\n public List<ProducerMember> listCentralServices() {\n return this.soapClient.listCentralServices(this.getTargetUrl());\n }", "List<ManagedEndpoint> all();", "public Map getWebServiceModules() {\n Map map = new HashMap();\n\n // admin config context\n ConfigContext configCtx = AdminService.getAdminService().\n getAdminContext().getAdminConfigContext();\n\n CacheMgr mgr = CacheMgr.getInstance();\n\n // j2ee application\n Map apps = mgr.getJ2eeApplications();\n Collection aValues = apps.values();\n for (Iterator iter=aValues.iterator(); iter.hasNext();) {\n J2eeApplication app = (J2eeApplication) iter.next();\n\n // ejb bundles\n List ejbBundles = app.getEjbBundles();\n if (ejbBundles != null) {\n for (Iterator itr=ejbBundles.iterator(); itr.hasNext();) {\n String ejb = (String) itr.next();\n try {\n Map m = getEjbBundleInfo(configCtx, app.getName(), ejb);\n map.put(m.get(WebServiceInfoProvider.\n SUN_EJB_JAR_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n }\n\n // web bundles \n List webBundles = app.getWebBundles();\n if (webBundles != null) {\n for (Iterator itr=webBundles.iterator(); itr.hasNext();) {\n String web = (String) itr.next();\n try {\n Map m = getWebBundleInfo(configCtx, app.getName(), web);\n map.put(m.get(WebServiceInfoProvider.\n SUN_WEB_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n }\n }\n\n // stand alone ejb module\n Map ejbs = mgr.getEjbModules();\n Collection eValues = ejbs.values();\n for (Iterator iter=eValues.iterator(); iter.hasNext();) {\n String ejbMod = (String) iter.next();\n try {\n Map m = getEjbModuleInfo(configCtx, ejbMod);\n map.put(m.get(WebServiceInfoProvider.\n SUN_EJB_JAR_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n\n // stand alone web module\n Map webs = mgr.getWebModules();\n Collection wValues = webs.values();\n for (Iterator iter=wValues.iterator(); iter.hasNext();) {\n String webMod = (String) iter.next();\n\n try {\n Map m = getWebModuleInfo(configCtx, webMod);\n map.put(m.get(WebServiceInfoProvider.\n SUN_WEB_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n\n return map;\n }", "private void getEcoleList(){\r\n\t\tEcoleRequestFactory rf = GWT.create(EcoleRequestFactory.class);\r\n\t\trf.initialize(this.getEventBus(), new EventSourceRequestTransport(this.getEventBus()));\r\n\t\tEcoleRequestContext rc = rf.ecoleRequest();\r\n\t\trc.listAllActive().fire(new Receiver<List<EcoleProxy>>(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess(List<EcoleProxy> response){\r\n\t\t\t\tgetView().setEcoleAddList(response);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(ServerFailure error){\r\n\t\t\t\tWindow.alert(error.getMessage());\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@GetMapping(\"/dashboard\")\n\tpublic String adminDashboard(Model model) {\t\n\t\t\n\t\tmodel.addAttribute(\"services\", transportService.listServices());\n\t\treturn \"dashboard\";\n\t}", "@GET\n @Path(\"/\")\n @Produces(\"application/json\")\n public Response all() {\n // Return some cliched textual content\n return Response.ok(\"clients list goes here\", MediaType.APPLICATION_JSON).build();\n }", "@GetMapping(\"/costo-servicios\")\n @Timed\n public List<CostoServicioDTO> getAllCostoServicios() {\n log.debug(\"REST request to get all CostoServicios\");\n return costoServicioService.findAll();\n }", "private void getloggersStatus() { \n\t\tAppClientFactory.getInjector().getSearchService().isClientSideLoggersEnabled(new SimpleAsyncCallback<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String result) {\n\t\t\t\tAppClientFactory.setClientLoggersEnabled(result);\n\t\t\t}\n\t\t\t\n\t\t});\n\t}", "public List/*WsCompileEditorSupport.ServiceSettings*/ getServices();", "protected abstract SessionManagementAdminServiceOperations getSessionManagementAdminService() throws SessionQueryException;", "@PreAuthorize(\"hasAuthority('ROLE_USER')\")\n @RequestMapping(value=\"/distances\",method=GET,produces=\"application/json\")\n public ResponseEntity<List<Distance>> getAllDistances() {\n log.info(\"getAllDistances\");\n // String uName = principal.getName();\n List<Distance> list = distanceService.getAllDistance();\n return new ResponseEntity<List<Distance>>(list, HttpStatus.OK);\n }", "public List<String> getAllServices() {\n List<String> allServices = new ArrayList<>();\n for (ServiceDescription service : serviceList.values()) {\n allServices.add(service.getServiceName());\n }\n return allServices;\n }", "@RequestMapping(\"/getAllOrders\")\n public List<Order> getAllOrders(){\n System.out.println(\"getAllOrders\");\n System.out.println(SessionUtil.getAuth());\n return orderService.getAllOrders();\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(\"/GetAllEmployees\")\r\n public List<Employee> viewAllEmployees() {\r\n return admin.viewAllEmployees();\r\n }", "Collection<Service> getAllSubscribeService();", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList getServiceConfigurationList();", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\t@JsonView(Views.Admin.class)\n\t@Secured(\"ROLE_ADMIN\")\n\tpublic ResponseEntity<?> getAll() throws Exception {\n\t\ttry {\n\t\t\tlogger.info(\"Parent List -- FETCHED by: \" + authenticationFacade.getAuthentication().getName());\n\t\t\treturn new ResponseEntity<Iterable<?>>(parentRepository.findAll(), HttpStatus.OK);\n\t\t} catch (Exception e) {\n\t\t\treturn new ResponseEntity<RESTError>(new RESTError(2, \"Exception: \" + e.getMessage()),\n\t\t\t\t\tHttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}", "@GET\n @Path(\"/admin/list\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getUserAdminProjects() {\n HttpSession session = request.getSession();\n\n if (session.getAttribute(\"projectAdmin\") == null) {\n throw new ForbiddenRequestException(\"You must be the project's admin.\");\n }\n String username = session.getAttribute(\"user\").toString();\n\n projectMinter project= new projectMinter();\n String response = project.listUserAdminProjects(username);\n project.close();\n\n return Response.ok(response).build();\n }", "public IWsrdAdminService getWsrdAdminService() {\r\n\t\treturn wsrdAdminService;\r\n\t}", "protected ServiceBundler getServices() {\n return services;\n }", "private void getSettingsList(HttpServletRequest request) throws Exception {\n WebTable.setOrder(sessionContext,\"managerSettings.ord\",request.getParameter(\"ord\"),1);\n\n\t\t// Create web table instance \n WebTable webTable = new WebTable( 2,\n\t\t\t \"Manager Settings\", \"managerSettings.do?ord=%%\",\n\t\t\t new String[] {\"Setting\", \"Value\"},\n\t\t\t new String[] {\"left\", \"left\"},\n\t\t\t null );\n \n for (Settings s: SettingsDAO.getInstance().findAll(Order.asc(\"key\"))) {\n \tString onClick = \"onClick=\\\"document.location='managerSettings.do?op=Edit&id=\" + s.getUniqueId() + \"';\\\"\";\n \tString value = sessionContext.getUser().getProperty(s.getKey(), s.getDefaultValue());\n \twebTable.addLine(onClick, new String[] {s.getDescription(), value}, new String[] {s.getDescription(), value});\n }\n\n\t request.setAttribute(\"table\", webTable.printTable(WebTable.getOrder(sessionContext,\"managerSettings.ord\")));\n }", "public ArrayList<Consulta> recuperaAllServicios() {\r\n\t\treturn servicioConsulta.recuperaAllServicios();\r\n\t}", "private Future<List<Record>> getAllEndpoints() {\n Future<List<Record>> future = Future.future();\n discovery.getRecords(record -> record.getType().equals(HttpEndpoint.TYPE),\n future.completer());\n return future;\n }", "@GetMapping(\"/administrator/replies\")\n\tpublic List<ReactReply> getAllRepliesa() {\n\t\tSystem.out.println(\"get all replies (employee) request received\");\n\t\t\treturn replyService.getAllReplies(); //no logic here, just a call to service when the request is received.\n\n\t}", "@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(method=RequestMethod.GET) \n\tpublic ResponseEntity<List<ClienteDTO>> findAll() {\n\t\t\n\t\tList<Cliente> list = service.findAll();\n\t\t\n\t\t//veja que o stream eh para percorrer a lista, o map eh para dizer uma funcao q vai manipular cada elemento da lista\n\t\t//nesse caso, para elemento na lista ele sera passado para a categoriadto \n\t\t//e no fim eh convertida novamente para uma lista\n\t\tList<ClienteDTO> listDTO = list.stream().map(obj->new ClienteDTO(obj)).collect(Collectors.toList());\n\t\t\n\t\t//o ok eh p/ operacao feita com sucesso e o corpo vai ser o obj\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}", "@RequestMapping(path = \"medservices\", method = RequestMethod.GET, params = \"page\")\n public List<MedicalService> getAllMedServicesByPage(@RequestParam int page){\n return medicalServiceService.getAllMedServicesByPage(page);\n }", "public interface AdminService {\n\n /**\n * 用户列表查询\n * @param admin\n * @return\n */\n public List<Admin> queryadmin(Admin admin);\n\n int deladmin(Admin admin);\n}", "@GetMapping(\"/\")\n\tpublic ResponseEntity<Object> getAdministrator(HttpServletRequest request){\n\t\tAdministrator admin = service.findByEmail(SessionManager.getInstance().getSessionEmail(request.getSession()));\n\t\tif(admin == null) return new ResponseEntity<>(HttpStatus.UNAUTHORIZED); \n\t\tMappingJacksonValue mappedAdmin = new MappingJacksonValue(admin);\n\t\tmappedAdmin.setFilters(new SimpleFilterProvider().addFilter(Administrator.FILTER, SimpleBeanPropertyFilter.filterOutAllExcept(\"email\", \"name\")));\n\t\treturn new ResponseEntity<>(mappedAdmin, HttpStatus.OK);\n\t}", "public GetAdminClassServlet() {\n\t\tsuper();\n\t}", "@Override\r\n\tpublic Map<String, Action> getAdminActons() {\n\t\treturn null;\r\n\t}", "private Iterable<Service> loadServiceData() {\n return services;\n }", "@Override\r\n\tpublic List prodAllseach() {\n\t\treturn adminDAO.seachProdAll();\r\n\t}", "@GET\n\t@RequestMapping(value = \"/admin\")\n\t@Secured(value = { \"ROLE_ADMIN\" })\n\tpublic String openAdminMainPage() {\n\t\t\n\t\treturn \"admin/admin\";\n\t}", "Map<String, Object> getServiceSpecificObjects();", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "Collection<Service> getAllPublishedService();", "@GetMapping(\"/sys-appointments\")\n @Timed\n public List<SysAppointment> getAllSysAppointments() {\n log.debug(\"REST request to get all SysAppointments\");\n return sysAppointmentService.findAll();\n }", "PagedIterable<ServiceEndpointPolicy> list(Context context);", "public List<Service> list(){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \treturn criteria.list();\r\n }", "public List<ServiceNode> getRelevantServices() {\n\t\treturn relevantServices;\n\t}", "@RequestMapping(value = \"/staff/\", method = RequestMethod.GET) //Mapping url localhost:8080/api/staff/ dengan method GET\n public ResponseEntity<List<Staff>> listAllStaffs() {\n List<Staff> staffs = staffService.findAllStaffs(); //Invoke method findAllStaffs\n if (staffs.isEmpty()) { //Check kondisi\n return new ResponseEntity<>(staffs, HttpStatus.NOT_FOUND);\n }\n return new ResponseEntity<>(staffs, HttpStatus.OK);\n }", "public static ParamObject getParamsForGetServices() {\n\t\tParamObject obj = new ParamObject();\n\t\ttry {\n\t\t\tTimeUnit.MILLISECONDS.sleep(100);\n\t\t} catch (InterruptedException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString url = URL + \"/services/\";\n\t\tobj.setUrl(url);\n\t\t// obj.addHeader(\"Authorization\", authorization);\n\t\tobj.setMethodType(\"GET\");\n\t\treturn obj;\n\t}", "@GetMapping(\"/methods\")\n @Timed\n public List<MethodsDTO> getAllMethods() {\n log.debug(\"REST request to get all Methods\");\n return methodsService.findAll();\n }", "private void servicesManager(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\t// Extract service and command\r\n\t\tif ( req.getPathInfo().length() > 0 ) {\r\n\t\t\tString path = req.getPathInfo().substring(1);\r\n\t\t\tif ( path.indexOf(\"/\") > 0 ) {\r\n\t\t\t\tString service = path.substring(0, path.indexOf(\"/\"));\r\n\t\t\t\tString cmd = path.substring(path.indexOf(\"/\")+1);\r\n\t\t\t\t// Search service manager and execute it \r\n\t\t\t\tServiceJSManager serv = this.services.get(service);\r\n\t\t\t\tif ( serv != null ) {\r\n\t\t\t\t\tServiceJSResponse r;\r\n\t\t\t\t\tthis.dsp.startProcessing(req);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tr = serv.execute(this.dsp,cmd,req.getParameterMap());\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: manage exception\r\n\t\t\t\t\t\tthrow new ServletException(e);\r\n\t\t\t\t\t} finally {\r\n\t\t\t\t\t\tthis.dsp.endProcessing();\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (LOG != null && LOG.isDebugEnabled() ) LOG.debug(\"packaging response: %s\",req.getRequestURI());\r\n\t\t\t\t\t\tthis.serviceResponser(r, resp);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// TODO: service unknown\r\n\t\t\r\n\t\t\r\n\t\tString out = \"DONE\\n\\r\"\r\n\t\t\t\t+\"XXX\";\r\n\t\tresp.setContentLength(out.length());\r\n\t\tresp.setContentType(\"text/plain\");\r\n\t\tresp.getWriter().println(out);\r\n\t\tresp.getWriter().close();\r\n\t}", "@GetMapping(value = \"/getInfo\")\n @ResponseBody\n public String getInfo() {\n System.out.println(\"discoveryClient.getServices().size() = \" + discoveryClient.getServices().size());\n\n StringBuffer stringBuffer = new StringBuffer();\n for( String s : discoveryClient.getServices()){\n System.out.println(\"services \" + s);\n List<ServiceInstance> serviceInstances = discoveryClient.getInstances(s);\n for(ServiceInstance si : serviceInstances){\n stringBuffer.append(\" services:\" + s + \":getHost()=\" + si.getHost());\n stringBuffer.append(\"\\n\");\n stringBuffer.append(\" services:\" + s + \":getPort()=\" + si.getPort());\n stringBuffer.append(\"\\n\");\n stringBuffer.append(\" services:\" + s + \":getServiceId()=\" + si.getServiceId());\n stringBuffer.append(\"\\n\");\n stringBuffer.append(\" services:\" + s + \":getUri()=\" + si.getUri());\n stringBuffer.append(\"\\n\");\n stringBuffer.append(\" services:\" + s + \":getMetadata()=\" + si.getMetadata());\n stringBuffer.append(\"\\n\");\n stringBuffer.append(\" services:\" + s + \":getScheme()=\" + si.getScheme());\n stringBuffer.append(\"\\n\");\n\n System.out.println(\" services:\" + s + \":getHost()=\" + si.getHost());\n System.out.println(\" services:\" + s + \":getPort()=\" + si.getPort());\n System.out.println(\" services:\" + s + \":getServiceId()=\" + si.getServiceId());\n System.out.println(\" services:\" + s + \":getUri()=\" + si.getUri());\n System.out.println(\" services:\" + s + \":getMetadata()=\" + si.getMetadata());\n System.out.println(\" services:\" + s + \":getScheme()=\" + si.getScheme());\n System.out.println();\n }\n }\n return \"ok\";\n }", "private void getUnresolvedServiceRequests(CTTS.Shared bean) throws ServletException, IOException\r\n {\n\t\tString [][] UnresolvedServiceRequests; \r\n\t\t\r\n\t\t\r\n CTTS.DBI dbi = null;\r\n try\r\n {\r\n dbi = new CTTS.DBI();\r\n if(dbi.connect()) // get a connection from tomcat\r\n {\r\n UnresolvedServiceRequests = dbi.getUnresolvedServiceRequests(); \r\n bean.setUnresolvedServiceRequests(UnresolvedServiceRequests); \r\n\t \r\n }\r\n }\r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n bean.setMessage(\"Exception caught : \" + e);\r\n bean.setError(\"The database could not be connected\");\r\n } \r\n finally\r\n {\r\n dbi.close(); //return connection to Tomcat\r\n } \r\n }", "@GetMapping(\"/admin\")\n public String adminindex(){\n\n return \"adminindex\";\n }", "@Override\n @HystrixCommand\n @GetMapping(\"/listAll\")\n @PreAuthorize(\"isAuthenticated()\")\n @ApiOperation(value = \"Gets a list with all the webforms\", hidden = true)\n public List<WebformMetabaseVO> getListWebforms() {\n return webformService.getListWebforms();\n }", "private void getMall(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "public Administrator[] getAllAdmin()\n {\n return admin;\n }", "@Override\n public String getServletInfo() {\n return \"Manages searches\";\n }", "@CrossOrigin(origins = \"http://localhost:8081\")\n @GetMapping(path=\"/all\") // path name after '/option'\n public @ResponseBody ResponseEntity<Iterable<MenuOp>> getOptions() {\n // This returns a JSON with the menu options\n return ResponseEntity.ok(menuOpRepository.findAll());\n }", "private Map<String, Object> getSubServiceMap() {\n\t\tlog.info(\"*****Inside getSubservice method **\");\n\t\tMap<String, Object> serviceMap = null;\n\n\t\ttry {\n\n\t\t\tserviceMap = new HashMap<String, Object>();\n\t\t\tserviceMap.put(ResourceResolverFactory.SUBSERVICE, \"sam\");\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tStringWriter errors = new StringWriter();\n\t\t\te.printStackTrace(new PrintWriter(errors));\n\t\t\tlog.info(\"errors ***\" + errors.toString());\n\t\t}\n\t\tlog.info(\"*****getSubservice Method End**\");\n\t\t\n\t\treturn serviceMap;\n\n\t}", "@GetMapping(\"/statuts\")\n public List<Status> selectAllStatuts(){\n \treturn serviceStatut.selectAllStatuts();\n }", "@RequestMapping(value = \"/estados\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Estado> getAll() {\n log.debug(\"REST request to get all Estados\");\n return estadoRepository.findAll();\n }", "@GetMapping(\"/view-all-order\")\n\tpublic List<OrderDTO> viewAllOrders() {\n\t\tLOGGER.info(\"view-all-Order URL is opened\");\n\t\tLOGGER.info(\"view-all-Order() is initiated\");\n\t\tLOGGER.info(\"view-all-Order() has executed\");\n\t\treturn orderService.getAllOrders();\n\t}", "protected abstract String getAllowedRequests();", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);", "go.micro.runtime.RuntimeOuterClass.Service getServices(int index);" ]
[ "0.67716855", "0.62736773", "0.6166079", "0.61436486", "0.60966945", "0.60410494", "0.5960456", "0.59455734", "0.5897194", "0.58925736", "0.5849451", "0.58475345", "0.5845137", "0.5833296", "0.5809005", "0.5777962", "0.57596153", "0.57520515", "0.5731106", "0.5729531", "0.571721", "0.5689831", "0.56865674", "0.568215", "0.5680003", "0.5673375", "0.5671854", "0.566508", "0.5639344", "0.5604572", "0.5596642", "0.5586956", "0.5583483", "0.557867", "0.55601144", "0.5557657", "0.55477995", "0.55429864", "0.55403084", "0.55257016", "0.55140835", "0.55064225", "0.548299", "0.5478739", "0.5472654", "0.54697216", "0.5462767", "0.5455702", "0.54530126", "0.5452679", "0.544619", "0.54342854", "0.5432302", "0.5427041", "0.54095215", "0.54069686", "0.540408", "0.5401089", "0.5383555", "0.538028", "0.53769046", "0.5374599", "0.53742886", "0.5372345", "0.5368806", "0.5366536", "0.53657544", "0.53576446", "0.5348928", "0.5348091", "0.53429395", "0.5340031", "0.5335336", "0.53327787", "0.5314336", "0.5314336", "0.5313669", "0.53121835", "0.5311623", "0.53054273", "0.5303298", "0.5302873", "0.53009886", "0.52990043", "0.529126", "0.5290828", "0.5290783", "0.52892864", "0.5286087", "0.5285091", "0.52834374", "0.52733874", "0.5268244", "0.5267933", "0.52676165", "0.5267165", "0.52650845", "0.5262992", "0.5262149", "0.5262149" ]
0.76659346
0
Checks duplicate entry (same user requesting same request)
public boolean checkIfExisting(ServiceRequest sr) throws SQLException { System.out.println("Entered checkIfExisting service request..."); Session session = sessionFactory.getCurrentSession(); ServiceRequest existingSR = null; boolean existing = false; int serviceId = 0; String preferredDate = null; Query query = null; if (sr != null) { serviceId = sr.getServiceId(); preferredDate = sr.getPreferredDate(); System.out.println("===================== serviceId: " + serviceId); System.out.println("===================== preferredDate: " + preferredDate); try { query = session.createQuery(GET_DUPLICATE_SERVICE_REQUEST_HQL); query.setParameter("serviceId", serviceId); query.setParameter("preferredDate", preferredDate); if (query.list() != null && query.list().size() > 0) { existingSR = (ServiceRequest) query.list().get(0); if (existingSR != null) { System.out.println("=========== existingSR ID: " + existingSR.getId()); existing = true; } } else { System.out.println("=========== NO DUPLICATE! "); } } catch (Exception ex) { throw new SQLException("Error in validating the request " + ex.getMessage(), ex); } } return existing; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDuplicate(IDecodedDeviceRequest<?> request) throws SiteWhereException;", "boolean duplicatedUsername(String username);", "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}", "public boolean userDuplicateCheck(String username){\n ArrayList<User> users = new ArrayList<>(db.getAllUsers());\n\n for(User user : users){\n if(user.getUsername().equals(username)){\n return false;\n }\n }\n return true;\n }", "private void checkDuplicateEntry(Long userId, String email, Boolean isBeneficiary, Boolean isFiduciary) {\n\t\tList<Contact> contactOpt = contactRepository.findByUserIdAndEmailAndIsFiduciaryAndIsBeneficiaryAndDeletedFalse(\n\t\t\t\tuserId, email, isBeneficiary, isFiduciary);\n\t\tif (!contactOpt.isEmpty()) {\n\t\t\tthrow DataAlreadyExistException.of(MessageConstant.EMAIL_ALREADY_EXISTED);\n\t\t}\n\t}", "protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\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 }", "@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}", "@objid (\"ef9777b4-ed2a-4341-bb22-67675cddb70a\")\n boolean isIsUnique();", "private boolean personAlreadyExists(AddPeopleRequest addPeopleRequest) {\n // query db for this user\n AddPeopleRequest matchingEntry =\n this.addPersonRequestMongoRepository\n .findPersonByFirstAndLastName(\n addPeopleRequest.getFirstName(),\n addPeopleRequest.getLastName());\n // if the value returned is null.. the value did not exist..\n if (matchingEntry == null) {\n return false;\n } else {\n return true;\n }\n }", "public boolean isUnique();", "@DefaultMessage(\"Since this user has no permissions, duplication is invalid\")\n @Key(\"systemUser.userDuplicateInvalid\")\n String systemUser_userDuplicateInvalid();", "boolean isIsUnique();", "private boolean isRequestAlreadySent(String friendName)\r\n\t{\r\n\t\tlogger.debug(\"->->->->-> Inside isUserExist method ->->->->->\");\r\n\t\tString loggedInUserName = (String) httpSession.getAttribute(\"loggedInUserName\");\r\n\t\tlogger.debug(\"UserName in isRequestAlreadySent :\"+loggedInUserName);\r\n\t\tif(friendDAO.getFriendWithUserNameAndFriendName(loggedInUserName,friendName)==null){\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "boolean hasReplicateRequest();", "boolean isUnique();", "public static boolean isDuplicate(Entry entry, List<Entry> batchEntries)\r\n\t{\n\t\tboolean isDuplicate = false;\r\n\t\t\r\n\t\tfor (int i = 0; i < batchEntries.size(); i++)\r\n\t\t{\r\n\t\t\tif (entry.getRank().equals(batchEntries.get(i).getRank()) && \r\n\t\t\t\t\tentry.getSuit().equals(batchEntries.get(i).getSuit()))\r\n\t\t\t{\r\n\t\t\t\tisDuplicate = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn isDuplicate;\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 }", "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 }", "@Test\n public void testGetDuplicateUsers() {\n UserMapping userMapping = new UserMapping();\n userMapping.setTenancy(tenancy);\n userMapping.setNhsno(\"nhsno1\");\n userMapping.setUnitcode(\"unitcodeA\");\n userMapping.setUsername(\"usernameDuplicate1-GP\");\n\n userMappingDao.save(userMapping);\n\n // this one will show\n userMapping = new UserMapping();\n userMapping.setTenancy(tenancy);\n userMapping.setNhsno(\"nhsno1\");\n userMapping.setUnitcode(\"unitcodeA\");\n userMapping.setUsername(\"usernameDuplicate1\");\n\n userMappingDao.save(userMapping);\n\n List<UserMapping> userMappings = userMappingDao.getDuplicateUsers(\"nhsno1\", \"username1\", tenancy);\n\n // should get back 1 result\n assertEquals(\"incorrect number of duplicates found for nhsno1\", 1, userMappings.size());\n\n assertEquals(\"incorrect duplicate found for nhsno1\", \"usernameDuplicate1\", userMappings.get(0).getUsername());\n }", "private boolean isUniqueEntity(Entity newEnt, int layerId) {\n for (Entity ent: getList(layerId)){\n if (ent.get_uid().equals(newEnt.get_uid())){\n return false;\n }\n }\n return true;\n }", "@Override\r\n\tpublic int checkIdDup(String id) {\n\t\treturn mDAO.checkIdDup(sqlSession, id);\r\n\t}", "@Test\n public void addExactDupItemTest() {\n List<Item> items = itemSrv.getAllItems();\n Assert.assertNotNull(\"List of items is null\", items);\n\n Assert.assertEquals(\"Wrong initial size of the list, should be 0\", 0, items.size());\n\n final Item item = new Item(\"item1\", \"item1 description\");\n Assert.assertEquals(\"Item adding failure\", ErrCode.ADD_SUCCESS, itemSrv.addItem(item));\n\n items = itemSrv.getAllItems();\n Assert.assertEquals(\"Total item count should be 1\", 1, items.size());\n\n // Add same exact/original/duplicate item\n Assert.assertEquals(\"Duplicate item protection fails\", ErrCode.ADD_DUPLICATE_ITEM, itemSrv.addItem(item));\n Assert.assertEquals(\"Total item count should still be 1 after adding duplicate item\", 1, itemSrv.getAllItems().size());\n Assert.assertEquals(\"Retrieved item is not the same as original\", item, items.get(0));\n }", "@Test\n public void createDuplicateAccount() {\n final String username1 = \"[email protected]\";\n final String username2 = \"[email protected]\";\n final String username3 = \"[email protected]\";\n final String firstname = \"william\";\n final String lastname = \"shakespeare\";\n final String address = \"@iaeste.org\";\n\n final CreateUserRequest request1 = new CreateUserRequest(username1, firstname, lastname);\n final CreateUserResponse response1 = administration.createUser(token, request1);\n assertThat(response1, is(not(nullValue())));\n assertThat(response1.isOk(), is(true));\n assertThat(response1.getUser(), is(not(nullValue())));\n assertThat(response1.getUser().getAlias(), is(firstname + '.' + lastname + address));\n\n final CreateUserRequest request2 = new CreateUserRequest(username2, firstname, lastname);\n final CreateUserResponse response2 = administration.createUser(token, request2);\n assertThat(response2, is(not(nullValue())));\n assertThat(response2.isOk(), is(true));\n assertThat(response2.getUser(), is(not(nullValue())));\n assertThat(response2.getUser().getAlias(), is(firstname + '.' + lastname + 2 + address));\n\n final CreateUserRequest request3 = new CreateUserRequest(username3, firstname, lastname);\n final CreateUserResponse response3 = administration.createUser(token, request3);\n assertThat(response3, is(not(nullValue())));\n assertThat(response3.isOk(), is(true));\n assertThat(response3.getUser(), is(not(nullValue())));\n assertThat(response3.getUser().getAlias(), is(firstname + '.' + lastname + 3 + address));\n }", "@Override\r\n\tpublic int checkEmailDup(String email) {\n\t\treturn mDAO.checkEmailDup(sqlSession, email);\r\n\t}", "@Test\n public void testDuplicate() throws Exception {\n\n UploadRequest uploadRequest = createRequest();\n\n // create upload - We still care about study ID and requestedOn for reporting, as well as dupe attributes.\n DynamoUpload2 upload = (DynamoUpload2) dao.createUpload(uploadRequest, TEST_STUDY, TEST_HEALTH_CODE,\n ORIGINAL_UPLOAD_ID);\n uploadIds.add(upload.getUploadId());\n assertEquals(ORIGINAL_UPLOAD_ID, upload.getDuplicateUploadId());\n assertEquals(UploadStatus.DUPLICATE, upload.getStatus());\n assertEquals(TEST_STUDY_IDENTIFIER, upload.getStudyId());\n assertEquals(MOCK_NOW.getMillis(), upload.getRequestedOn());\n\n // We don't call Upload Complete in this scenario.\n }", "private static boolean checkDuplicateDocName(User user, String name) {\n\n\t\t// Check if document name is already in user's documents\n\t\tboolean isInvalid = false;\n\n\t\tfor(@SuppressWarnings(\"unchecked\")\n\t\tIterator<Document> iter = user.getDocumentList().iterator(); iter.hasNext(); ) {\n\t\t\tDocument doc = iter.next();\n\t\t\tif(doc.getDocName().equals(name)) {\n\t\t\t\tisInvalid = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isInvalid;\n\t}", "private static boolean checkDupplicate(UUID sessionId) throws DuplicateUsernameException {\n return ioListeners.containsKey(sessionId);\n }", "@Override\n\tpublic void checkDuplicateEmail(String email){\n\t\tif(userRepository.getUserByEmail(email) != null)\n\t\t\tthrow new BookException(HttpStatus.NOT_ACCEPTABLE,\"Email already exist\");\n\t}", "static boolean isDuplicated(String mac) {\n for (DeviceDetail detail : deviceDetails) {\n if (detail.macAddress.equals(mac)) {\n return true;\n }\n }\n return false;\n }", "private void checkIfDuplicateKey(String recordKey) {\n if (this.records.containsKey(recordKey)) {\n System.out.println(duplicateKey);\n throw new IllegalArgumentException();\n }\n }", "boolean hasReplicateResponse();", "private void checkIDPUniqueness(UserMultiID eppnKey, String otherIDP) throws Exception {\n User eppnUser = newUser();\n eppnUser.setUserMultiKey(eppnKey);\n getUserStore().save(eppnUser);\n eppnUser.setIdP(otherIDP);\n getUserStore().save(eppnUser);\n try {\n getDBSClient().getUser(eppnKey, otherIDP);\n assert true;\n } catch (Throwable t) {\n assert false : \"Error: multiple IDP values are supported.\";\n }\n }", "public boolean checkForDuplicates(StockId stock_key) {\n\t\treturn stockRepo.findById(stock_key).isPresent();\n\t}", "public boolean isExplicitUniqueCheckRequired();", "public boolean checkDuplicates(String value) {\n for (Entry i : listentries) {\n if (i.getName().equals(value))\n return true;\n }\n return false;\n }", "int upsert(UserShare5Min record);", "private void validateDuplicateMember(Member member) {\n memberRepository.findByName(member.getName())\n .ifPresent(m -> {\n throw new IllegalStateException(\"이미 존재하는 회원입니다.\");\n });\n }", "public boolean isDuplicateName(String name) {\n return presenter.isDuplicateName(name);\n }", "@Test\n public void testCheckExternalIdUniquenessForUpdate2() {\n\n try {\n user.setUserId(\"456456\");\n user.getExternalIds().get(0).put(JsonKey.OPERATION, JsonKey.UPDATE);\n Util.checkExternalIdUniqueness(user, JsonKey.UPDATE);\n } catch (Exception ex) {\n System.out.println(\"3\" + ex.getMessage());\n assertTrue(\n ex.getMessage()\n .equalsIgnoreCase(\n \"External ID (id: 123209-453445934-23128u3423-dsafsa32c43-few43-wesc49cjkf, idType: AAADHAR, provider: AP) not found for given user.\"));\n }\n }", "private boolean checkProfileNameUniqueness(boolean userDialog) {\r\n\t\tboolean duplicateNameOccours = false;\r\n\t\t/**\r\n\t\t * Over the new imported profiles\r\n\t\t */\r\n\t\tfor (int i = 0; i < parsedProfiles.size(); i++) {\r\n\t\t\tCurve p = parsedProfiles.get(i);\r\n\t\t\t/**\r\n\t\t\t * Handle the case that the profile name is not unique\r\n\t\t\t */\r\n\t\t\tif (!controller.isProfileNameGlobalUnique(p.getName())\r\n\t\t\t\t\t&& selectedProfiles.get(i)) {\r\n\t\t\t\t/**\r\n\t\t\t\t * Indicate duplicate profile names\r\n\t\t\t\t */\r\n\t\t\t\tduplicateNameOccours = true;\r\n\t\t\t\t/**\r\n\t\t\t\t * Provide a user interface to change the profile name\r\n\t\t\t\t */\r\n\t\t\t\tif (userDialog) {\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * In the other case ask the user for a different name\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString dialogTitle = \"Duplicate profile name\";\r\n\t\t\t\t\tString dialogMsg = \"The profile name \\\"\" + p.getName()\r\n\t\t\t\t\t\t\t+ \"\\\" already exists globally.\\n\"\r\n\t\t\t\t\t\t\t+ \"Please enter a globally unique\"\r\n\t\t\t\t\t\t\t+ \" profile name.\";\r\n\t\t\t\t\tString dialogRet = JOptionPane.showInputDialog(null,\r\n\t\t\t\t\t\t\tdialogMsg, dialogTitle, JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * Only store the new name if not empty\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (dialogRet != null) {\r\n\t\t\t\t\t\tif (!dialogRet.isEmpty()) {\r\n\t\t\t\t\t\t\tp.setName(dialogRet);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Check also if there exists local uniqueness if the comparison against\r\n\t\t * the global names found no error.\r\n\t\t */\r\n\t\tif (duplicateNameOccours == false) {\r\n\t\t\tduplicateNameOccours = checkProfileNameUniquessLocal();\r\n\t\t}\r\n\r\n\t\treturn duplicateNameOccours;\r\n\t}", "@Test\n public void testValidateDuplicateAccountsDifferentAccount() {\n // Same account\n Long accountId = 123l;\n BankAccount bankAccountRequest = new BankAccountImpl();\n bankAccountRequest.setAccountId(accountId);\n Locale locale = Locale.getDefault();\n ErrorMessageResponse errorMessageResponse = new ErrorMessageResponse();\n List<BankAccount> bankAccountList = new ArrayList<>();\n\n // ACCOUNT HELD BY DIFFERENT CUSTOMER\n BankAccount bankAccount = new BankAccountImpl();\n bankAccount.setAccountId(accountId);\n bankAccount.setActivatedDate(new Date());\n bankAccountList.add(bankAccount);\n\n // Older activation means it will not be first in the list\n bankAccount = new BankAccountImpl();\n bankAccount.setAccountId(12345l);\n bankAccount.setActivatedDate(new Date(new Date().getTime() - 1000));\n bankAccountList.add(bankAccount);\n\n BankHelper\n .validateDuplicateAccounts(bankAccountRequest, locale, errorMessageResponse, bankAccountList, account);\n assertTrue(errorMessageResponse.hasErrors());\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 void checkIfUserExists(){\n refIdsOnly = database.getReference(\"ids\");\n String idText1 = idEdit.getText().toString();\n\n idListener = new ValueEventListener() {\n boolean userDoesntExist = true;\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // removing the event listener to make sure it only happens once\n // otherwise it has time to check again for the user just created\n refIdsOnly.removeEventListener(idListener);\n if (dataSnapshot.exists()){\n for (DataSnapshot data:dataSnapshot.getChildren()){\n String id = data.getValue(String.class);\n if (idText1.equals(id)){\n userDoesntExist = false;\n }\n }\n }\n if (userDoesntExist){\n register(idText1);\n }\n else\n Toast.makeText(RegistrationActivity.this, \"duplicate id number\", Toast.LENGTH_LONG).show();\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(RegistrationActivity.this, \"failed\", Toast.LENGTH_LONG).show();\n }\n };\n refIdsOnly.addValueEventListener(idListener);\n }", "@Test\n public void testValidateDuplicateAccounts() {\n // Same account\n Long accountId = 123l;\n BankAccount bankAccountRequest = new BankAccountImpl();\n bankAccountRequest.setAccountId(accountId);\n Locale locale = Locale.getDefault();\n ErrorMessageResponse errorMessageResponse = new ErrorMessageResponse();\n List<BankAccount> bankAccountList = new ArrayList<>();\n // EMPTY LIST no duplicate accounts held\n BankHelper\n .validateDuplicateAccounts(bankAccountRequest, locale, errorMessageResponse, bankAccountList, account);\n assertFalse(errorMessageResponse.hasErrors());\n\n // ACCOUNT ONLY HELD BY CUSTOMER\n BankAccount bankAccount = new BankAccountImpl();\n bankAccount.setAccountId(accountId);\n bankAccount.setActivatedDate(new Date(new Date().getTime() - 1000));\n bankAccountList.add(bankAccount);\n\n bankAccount = new BankAccountImpl();\n bankAccount.setAccountId(accountId);\n bankAccount.setActivatedDate(new Date());\n bankAccountList.add(bankAccount);\n\n BankHelper\n .validateDuplicateAccounts(bankAccountRequest, locale, errorMessageResponse, bankAccountList, account);\n assertFalse(errorMessageResponse.hasErrors());\n\n }", "private boolean validateForDuplicateItemField(OleDiscoveryExportProfile oleDiscoveryExportProfile) {\n List<String> MARCItemlist = new ArrayList<String>();\n for (int i = 0; i < oleDiscoveryExportProfile.getOleDiscoveryExportMappingFields().size(); i++) {\n MARCItemlist.add(oleDiscoveryExportProfile.getOleDiscoveryExportMappingFields().get(i).getItemField());\n }\n for (int j = 0; j < oleDiscoveryExportProfile.getOleDiscoveryExportMappingFields().size(); j++) {\n int count = 0;\n for (int k = 0; k < MARCItemlist.size(); k++) {\n if (oleDiscoveryExportProfile.getOleDiscoveryExportMappingFields().get(j).getItemField().equalsIgnoreCase(MARCItemlist.get(k))) {\n count++;\n }\n }\n if (count > 1) {\n this.putFieldError(OLEConstants.OleDiscoveryExportProfile.OLE_EXP_ITEM_FIELD, OLEConstants.OleDiscoveryExportProfile.OLE_EXP_ITEM_DUPLICATE_ERROR);\n return false;\n }\n }\n return true;\n }", "private int userAlreadyPresent() {\n System.out.printf(\"%s%n%s%n%s%n%s%n\", Notifications.getMessage(\"ERR_USER_ALREADY_PRESENT\"), Notifications.getMessage(\"SEPARATOR\"), Notifications.getMessage(\"PROMPT_PRESENT_USER_MULTIPLE_CHOICE\"), Notifications.getMessage(\"SEPARATOR\"));\n\n switch(insertInteger(1, 3)) {\n case 1:\n System.out.printf(\"%s %s%n\", Notifications.getMessage(\"MSG_EXIT_WITHOUT_SAVING\"), Notifications.getMessage(\"MSG_MOVE_TO_LOGIN\"));\n return -1;\n case 2:\n System.out.println(Notifications.getMessage(\"PROMPT_MODIFY_FIELDS\"));\n return 1;\n default:\n return 0;\n }\n }", "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 boolean isExisting() throws Exception\r\n\t\t{\r\n\t\tRouteGroup myR = (RouteGroup) myRouteGroup.get();\r\n\t\tthis.UUID = myR.getUUID();\r\n\t\t\r\n\t\tVariables.getLogger().debug(\"Item \"+this.name+\" already exist in the CUCM\");\r\n\t\treturn true;\r\n\t\t}", "private boolean isNameUnique(String name) {\n boolean isUnique = true;\n for (User user : this.users) {\n if (user.getName().equals(name)) {\n isUnique = false;\n break;\n }\n }\n return isUnique;\n }", "@Test\n public void testCheckExternalIdUniquenessForUpdate() {\n\n try {\n user.setUserId(\"456456\");\n user.getExternalIds().get(0).put(JsonKey.OPERATION, JsonKey.DELETE);\n Util.checkExternalIdUniqueness(user, JsonKey.UPDATE);\n } catch (Exception ex) {\n System.out.println(\"2\" + ex.getMessage());\n assertTrue(\n ex.getMessage()\n .equalsIgnoreCase(\n \"External ID (id: 123209-453445934-23128u3423-dsafsa32c43-few43-wesc49cjkf, idType: AAADHAR, provider: AP) not found for given user.\"));\n }\n }", "protected int seen ( Date now, String opUrl, String nonce )\n\t\t{\n\t\t\tcleanupAged ( ) ;\n\t\t\tJdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ;\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tjdbcTemplate.update ( _insertSQL, new Object[]\n\t\t\t\t\t{ opUrl, nonce, now } ) ;\n\t\t\t\treturn OK ;\n\t\t\t}\n\t\t\tcatch ( DataIntegrityViolationException e )\n\t\t\t{\n\t\t\t\t_log.warn ( \"Nonce already seen. Possible replay attack!\" ) ;\n\t\t\t}\n\t\t\tcatch ( Exception e )\n\t\t\t{\n\t\t\t\t_log.error ( \"Problem executing database method\", e ) ;\n\t\t\t}\n\n\t\t\treturn SEEN ;\n\t\t}", "public void checkIfUserIsSame(){\n if(!FirebaseAuth.getInstance().getCurrentUser().getUid().equals(getIntent().getStringExtra(\"uID\"))) {\n Log.i(\"XXX\", \"passed NOT SAME USER\");\n checkIfUserIsFriend();\n }else{\n userStatus = \"same user\";\n ((RelativeLayout) findViewById(R.id.loadingPanel)).setVisibility(View.GONE);\n }\n }", "@Override\n\tpublic List<PrpUser> duplcExist(PrpUser user) {\n\t\treturn null;\n\t}", "public static boolean userNameDuplicate(String arg_username) {\n\n\t\tboolean userNameFound = false;\n\n\t\tfor (User u0 : userInfoArray) {\n\t\t\tString currentUserName = ((User) u0).getUserName();\n\t\t\tif (arg_username.toUpperCase().equals(currentUserName.toUpperCase())) {\n\t\t\t\tuserNameFound = true;\n\t\t\t\tbreak;\n\n\t\t\t} else {\n\t\t\t\tuserNameFound = false;\n\t\t\t}\n\n\t\t}\n\t\treturn userNameFound;\n\t}", "public boolean alreadyOwnsIdenticalRoute(){\n City city1 = mSelectedRoute.getCity1();\n City city2 = mSelectedRoute.getCity2();\n for(int i=0; i<mUser.getClaimedRoutes().size(); i++){\n City ownedCity1 = mUser.getClaimedRoutes().get(i).getCity1();\n City ownedCity2 = mUser.getClaimedRoutes().get(i).getCity2();\n if(city1.equals(ownedCity1) && city2.equals(ownedCity2))\n return true;\n }\n return false;\n }", "public void checkDuplicate (ArrayList studentAnswer, int answer) {\r\n if (!studentAnswer.contains(answer)){\r\n studentAnswer.add(answer);\r\n }\r\n }", "@Override\n public void checkActivityUnique(ActivityWrapper newActivity) throws RecordAlreadyExistsException {\n Activity[] filtered = filterList(a -> {\n Activity activity = (Activity) a;\n return activity.getEndTime().equals(newActivity.getEndTime())\n && activity.getStartTime().equals(newActivity.getStartTime())\n && activity.getTitle().equalsIgnoreCase(newActivity.getTitle());\n });\n\n if (filtered.length > 0) {\n throw new RecordAlreadyExistsException(\"activities\",\n \"title '\" + filtered[0].getTitle() + \"' and times '\" + filtered[0].getStartTime() + \" - \" + filtered[0].getEndTime() +\n \"'\");\n }\n }", "private void againstDuplicateApartment(String numberOfApartment, String uid){\n refApartmentNumbersOnly = database.getReference(\"apartmentNumbersOnly\");\n apartmentListener =new ValueEventListener() {\n boolean apartmentDoesntExist = true;\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // removing the event listener to make sure it only happens once\n // otherwise it has time to check again for the user just created\n refApartmentNumbersOnly.removeEventListener(apartmentListener);\n if (dataSnapshot.exists()){\n for (DataSnapshot data:dataSnapshot.getChildren()){\n String number = data.getValue(String.class);\n if (numberOfApartment.equals(number)){\n apartmentDoesntExist = false;\n }\n }\n }\n if (apartmentDoesntExist){\n\n DatabaseReference myRef2 = database.getReference(\"apartmentNumbersOnly\").child(uid);\n myRef2.setValue(numberOfApartment);\n Tenant t = new Tenant(firstNameText, lastNameText, idText, Integer.parseInt(numberOfApartment));\n DatabaseReference myRef = database.getReference(\"Tenants\").child(uid);\n myRef.setValue(t);\n actualUserType = t.getClass().getName();\n // create a path for the type of user and save in {uid <-> type}\n DatabaseReference myRef3 = database.getReference(\"typeDefined\").child(uid);\n myRef3.setValue(actualUserType);\n sendMetoMain();\n }\n else{\n deleteLeftOversFromDB(uid, \"duplicate apartment number\");\n }\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(RegistrationActivity.this, \"failed\", Toast.LENGTH_LONG).show();\n }\n };\n refApartmentNumbersOnly.addValueEventListener(apartmentListener);\n }", "private boolean friendAlreadyAdded(User user, Object requestedUser) {\n List<UserContact> friendList = null;\n User friendToBe = null;\n try {\n DAO dao = new Query();\n friendList = user.getFriends(dao);\n dao.open();\n if (requestedUser instanceof String) {\n friendToBe = (User) dao.get(User.class, (String) requestedUser);\n } else if (requestedUser instanceof Request) {\n Request request = (Request) requestedUser;\n friendToBe = (User) dao.get(User.class, request.getFromId());\n }\n dao.close();\n } catch (Exception e) {\n //e.printStackTrace();\n }\n if (friendList != null && friendToBe != null) {\n if (friendList.contains(friendToBe.asContact())) {\n return true;\n }\n }\n return false;\n }", "public boolean supportsUnique() {\n \t\treturn true;\n \t}", "void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;", "public boolean checkDuplicates(String tempName)\n\t{\n\t\tif (!hasPermission(\"staff\")\n\t\t\t&& !Moban.hasMatch(\"multok\", tempName, connSocket.getInetAddress().getHostName()))\n\t\t\tfor (UserCon cs : conns)\n\t\t\t{\n\t\t\t\tif (cs.hasPermission(\"staff\"))\n\t\t\t\t\tcontinue;\n\t\t\t\tif (cs.host1.equals(connSocket.getInetAddress().getHostName())\n\t\t\t\t\t&& !cs.ch.name.equalsIgnoreCase(tempName)\n\t\t\t\t\t&& !Moban.hasMatch(\"multok\", cs.ch.name, cs.host1)\n\t\t\t\t\t&& !cs.hasPermission(\"staff\"))\n\t\t\t\t{\n\t\t\t\t\tsendln(\"Another character is already logged in from the same connection you're using.\");\n\t\t\t\t\tsendln(\"If you were playing on a character but were disconnected or did not quit using\");\n\t\t\t\t\tsendln(\"the 'quit' command, please log back on to that character and 'quit' before\");\n\t\t\t\t\tsendln(\"logging on with a different character.\");\n\t\t\t\t\tsendln(\"\");\n\t\t\t\t\tsendln(\"Note that multiplaying (using multiple characters at the same time) is not\");\n\t\t\t\t\tsendln(\"permitted on Agape. If there is more than one person at your connection who\");\n\t\t\t\t\tsendln(\"would like the play the game, please speak with a staff member.\");\n\t\t\t\t\tcloseSocket();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\tfor (UserCon cs : conns)\n\t\t\tif (cs.ch.name.equalsIgnoreCase(tempName) && cs != this)\n\t\t\t{\n\t\t\t\tconns.remove(cs);\n\t\t\t\twriting = cs.writing;\n\t\t\t\tch = cs.ch;\n\t\t\t\tch.conn = this;\n\t\t\t\tcs.sendln(\"This character has been logged on from a different connection.\");\n\t\t\t\tcs.sendln(\"If this message appears after no action on your part, you may\");\n\t\t\t\tcs.sendln(\"wish to change your password to prevent hacking attempts.\");\n\t\t\t\tsysLog(\"connections\", \"New connection for \"+tempName+\": Booting old connection.\");\n\t\t\t\tcs.closeSocket();\n\t\t\t\tbreak;\n\t\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean checkDuplicate(String course_name) {\n\t\tboolean isDuplicate = false;\n\t\tconn = DBUtils.connectToDb();\n\t\tString query = \"select course_name from course where course_name= ?;\";\n\t\tpst = DBUtils.getPreparedStatement(conn, query);\n\t\ttry {\n\t\t\tpst.setString(1, course_name);\n\t\t\trs = pst.executeQuery();\n\t\t\tif (rs.next())\n\t\t\t\tisDuplicate = true;\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\tDBUtils.closeConnections();\n\t\treturn isDuplicate;\n\t}", "public int duplicateId(String id) {\n\t\treturn sqlSessionTemplate.selectOne(\"memberInfo.checkId\", id);\r\n\t}", "public int duplicateEmail(String email) {\n\t\treturn sqlSessionTemplate.selectOne(\"memberInfo.checkEmail\", email);\r\n\t}", "boolean isUserExists(RegisterData data) throws DuplicateUserException;", "@Override\n\tpublic void test00400Add_DuplicateRecord() throws Exception\n\t{\n\t\t// This method will not fail with Generate card numbers set to Y\n\t}", "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}", "private void insertEntry() {\n String desiredId = idField.getText();\n String desiredName = nameField.getText();\n String desiredMajor = majorField.getText();\n\n if (studentHashMap.containsKey(desiredId)) {\n this.displayStatusPanel(\n \"Error: A student with this information already exists.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } else {\n studentHashMap.put(desiredId, new Student(desiredName, desiredMajor));\n\n this.displayStatusPanel(\n \"Success: \" + desiredName + \" has been added.\",\n \"Success\",\n JOptionPane.INFORMATION_MESSAGE\n );\n }\n }", "@Test\n public void addDiffItemDupNameTest() {\n final String itemName = \"item1\";\n List<Item> items = itemSrv.getAllItems();\n Assert.assertNotNull(\"List of items is null\", items);\n\n Assert.assertEquals(\"Wrong initial size of the list, should be 0\", 0, items.size());\n\n final Item item = new Item(itemName, \"item1 description\");\n Assert.assertEquals(\"Item adding failure\", ErrCode.ADD_SUCCESS, itemSrv.addItem(item));\n\n items = itemSrv.getAllItems();\n Assert.assertEquals(\"Total item count should be 1\", 1, items.size());\n\n // Add different item, but with duplicate Name\n final Item diffItemSameName = new Item(itemName, \"different description\");\n itemSrv.addItem(diffItemSameName);\n\n items = itemSrv.getAllItems();\n Assert.assertEquals(\"Total item count should be 1 after addition of different item which has duplicate Name\", 1, items.size());\n\n final Item retrievedItem = items.get(0);\n\n Assert.assertEquals(\"Retrieved item is not the same as original\", item, retrievedItem);\n Assert.assertNotEquals(\"Retrieved item should NOT be the same as duplicate item that was attempted to be inserted\",\n diffItemSameName, retrievedItem);\n }", "protected void repeatedFoundWhenInsert(CntAVLTreeNode node) {\n System.out.println(\"添加失败:不允许添加相同的节点!\");\n }", "private boolean checkNameExistModify(String userName, Integer id) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user && id != user.getUserId()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "@ResponseStatus(value = HttpStatus.CONFLICT, reason = \"Another entity with the same identity exists\")\n @ExceptionHandler({DataIntegrityViolationException.class})\n public void handleAlreadyExists() {\n // just return empty 409\n logger.info(\"-----> Entity save operation failure\");\n }", "@Test(groups = \"Transactions Tests\", description = \"Duplicate transaction\")\n\tpublic void duplicateTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDuplicateTransactionOption();\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(2));\n\t\ttest.log(Status.PASS, \"Transaction successfully duplicated\");\n\n\t\t//Testing if there is two identical transactions in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(2));\n\t\ttest.log(Status.PASS, \"Transaction successfully duplicated in the 'Double Entry' account\");\n\n\t}", "private boolean checkDuplicate(String macAddress) {\n\t\tfor (int i=0; i<bluetoothDevices.size(); i++) {\n\t\t\tif (macAddress.equals(bluetoothDevices.get(i).macAddress)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isDupe(T element);", "private boolean isTransactionAlreadySeen(Transaction tx){\n return allTransactions.contains(tx);\n }", "private List<CustStmtRecord> validateDuplicate (final List<CustStmtRecord> custStmtRecords) {\n\t\tlog.info(\"Entering {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\tfinal List<CustStmtRecord> duplicateReference = custStmtRecords\n\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(e -> Collections.frequency(custStmtRecords, e) > 1)\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\t\t;\n\t\t\t\n\t\tlog.info(\"duplicateReference {}\", duplicateReference);\n\t\t\t\n\t\tlog.info(\"Exiting {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\treturn duplicateReference;\n\t}", "private boolean isOneUserName(String username){\r\n\t\tfor(int i = 0; i < users.size(); i++){\r\n\t\t\tif(users.get(i).username.equalsIgnoreCase(username)){\r\n\t\t\t\tSystem.out.println(\"Sorry the Username is already taken\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean isDuplicated(TreeNode selTreeNode) {\r\n TreePath duplicatedPath = findByName(sponsorHierarchyTree, selTreeNode.toString());\r\n int level = selectedNode.getLevel();\r\n if(duplicatedPath != null && selectedNode.getLevel()==((DefaultMutableTreeNode)duplicatedPath.getLastPathComponent()).getLevel() && \r\n selTreeNode.toString().equals(duplicatedPath.getLastPathComponent().toString()) && sponsorHierarchyTree.getRowForPath(duplicatedPath) != sponsorHierarchyTree.getRowForPath(selTreePath) ) {\r\n CoeusOptionPane.showInfoDialog(\"A group with name '\"+selTreeNode.toString()+\"' already exists for level \"+(level+1));\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean isFlightDataUnique(Flight flight) throws SQLException {\n\n\t\t// return flight database content through given list\n\t\tArrayList<Flight> listOfFlights = flightdb.fetchDatabaseContent();\n\n\t\tif (!listOfFlights.isEmpty() && listOfFlights.contains(flight)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean isLoginAlreadyUsed(final String login) {\n\t\treturn null != this.getUserId(login);\n\t}", "private boolean checkNameExistAdd(String userName) {\n\n\t\tUser user = this.userDAO.getUserByName(userName);\n\t\tif (null != user) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "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 }", "public String addEntry(Entry e)\r\n\t{\r\n\t\tfor (Entry ent : tr)\r\n\t\t{\r\n\t\t\tif (e.getEntry().equals(ent.getEntry()))\r\n\t\t\t{\r\n\t\t\t\treturn \"Entry not unique. Try again.\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttr.add(e);\r\n\t\treturn \"Record added\\n\";\r\n\t}", "public DuplicatedUserException() {\n super();\n }", "boolean userExists(HttpServletRequest request, String userId);", "public void saveEditedUserHistoryEntry() {\n if (selectedUserHistoryEntry.getOvertime() == null || selectedUserHistoryEntry.getVacation() == null) {\n FacesContext.getCurrentInstance().validationFailed();\n } else {\n\n if (isEditing()) {\n UserHistoryService.updateUserHistoryEntry(selectedUserHistoryEntry);\n this.userHistoryEntrys.remove(selectedUserHistoryEntry);\n this.userHistoryEntrys.add(selectedUserHistoryEntry);\n } else {\n\n selectedUserHistoryEntry.setTimestamp(LocalDateTime.of(selectedYear, selectedMonth.plus(1), 1, 0, 0).minusMinutes(10));\n //System.out.println(selectedUserHistoryEntry);\n\n if (this.userHistoryEntrys.contains(this.selectedUserHistoryEntry)) {\n FacesContext.getCurrentInstance().validationFailed();\n FacesContext.getCurrentInstance().addMessage(\"uhEntryDialogForm\", new FacesMessage(FacesMessage.SEVERITY_WARN, \"Speichern fehlgeschlagen!\", \"Es ist bereits ein Eintrag für diesen Benutzer in diesem Monat verfügbar!\"));\n } else {\n //selectedUserHistoryEntry.setTimestamp(LocalDateTime.of(selectedYear, selectedMonth.plus(1), 1, 0, 0).minusMinutes(10));\n UserHistoryService.insertUserHistoryEntry(selectedUserHistoryEntry);\n this.userHistoryEntrys.add(selectedUserHistoryEntry);\n }\n }\n }\n }", "private boolean checkDuplicate(int[] array, int index, int value) {\n\t\tfor (int i = 0; i < index; i++) {\n\t\t\tif (array[i] == value) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\r\n public void testAddDuplicateRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertFalse(coffeeMaker.addRecipe(recipe1));\r\n }", "private void checkAndUpdate() {\n if (csProposeEnter.get()) {\n if (numRepliesReceived.get() == (config.getNumNodes() - 1)\n && requestQueue.peek().getFromID().equals(nodeID)) {\n csProposeEnter.set(false);\n csAllowEnter.set(true);\n }\n }\n }", "public void validateAdd(Stock s){\n Set<String> stock_symbols_set = new HashSet<>();\n for(Stock stock: stockList){\n stock_symbols_set.add(stock.getStockSymbol());\n }\n if(stock_symbols_set.contains(s.getStockSymbol())){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setIcon(R.drawable.baseline_warning_black_36);\n builder.setMessage(\"Stock Symbol \" + s.getStockSymbol() + \" is already displayed. \");\n builder.setTitle(\"Duplicate Stock\");\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n else{\n stockList.add(s);\n //keep the list in alphabetical order\n Collections.sort(stockList, new Comparator<Stock>() {\n @Override\n public int compare(Stock t1, Stock t2) {\n return t1.getStockSymbol().compareTo(t2.getStockSymbol());\n }\n });\n\n writeJSONData();\n myAdapter.notifyDataSetChanged();\n }\n }", "@Override\r\n\tpublic int checkDuplicate(String checkProductionOrderNo) {\n\t\tint list1 = 0;\r\n\t\ttry {\r\n\t\t\tlist1 = productionOrderProcessDao.checkDuplicate(checkProductionOrderNo);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t}\r\n\t\treturn list1;\r\n\t}", "private boolean isLoginUnique(int currentUserId){\n\t\tUser user = Main.getMMUser().getUserForLogin(userLoginField.getText());\n\t\tif (user == null) return true;\n\t\telse {\n\t\t\tif (user.getId() == currentUserId) return true;\n\t\t}\t\n\t\tlackUserLoginLabel.setText(\"taki login istnieje w bazie\");\n\t\tlackUserLoginLabel.setVisible(true);\n\t\treturn false;\n\t}", "@Test\n public void testRegisterDuplicateUsername() {\n SignUpRequest request = new SignUpRequest(DUPLICATE, \"Secret\");\n\n dao.register(request);\n\n verify(controller).duplicateUsername();\n\n try {\n verify(connection, never()).register(request);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\r\n\tpublic int checkEditDuplicate(String checkProductionOrderNo, String id) {\n\t\tint list1 = 0;\r\n\t\ttry {\r\n\t\t\tlist1 = productionOrderProcessDao.checkEditDuplicate(checkProductionOrderNo, id);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t}\r\n\t\treturn list1;\r\n\t}", "public boolean add(AdressEntry e) {\r\n if (addressEntryList.contains(e)) {\r\n System.out.println(\"Record already exists!!\");\r\n System.out.println(addressEntryList.get((addressEntryList.indexOf(e))));\r\n System.out.println();\r\n return false;\r\n } else {\r\n addressEntryList.add(e);\r\n addressEntryList.sort(Comparator.comparing(AdressEntry::getLastName));\r\n System.out.print(\"Thank you the following contact has been added to your address book:\\n \");\r\n System.out.println(e);\r\n }\r\n System.out.println();\r\n return true;\r\n }", "private boolean checkValidateToAdd() {\n\n Long count;\n HttpServletRequest req = getRequest();\n\n String name = this.saleChannelTypeForm.getName().trim();\n\n Long status = this.saleChannelTypeForm.getStatus();\n\n\n if ((name == null) || name.equals(\"\")) {\n req.setAttribute(\"returnMsg\", \"channelType.error.invalidName\");\n return false;\n }\n if (status == null) {\n req.setAttribute(\"returnMsg\", \"channelType.error.invalidStatus\");\n return false;\n }\n\n String strQuery = \"select count(*) from ChannelType as model where model.name=?\";\n Query q = getSession().createQuery(strQuery);\n q.setParameter(0, name);\n count = (Long) q.list().get(0);\n\n if ((count != null) && (count.compareTo(0L) > 0)) {\n req.setAttribute(\"returnMsg\", \"channelType.add.duplicateName\");\n return false;\n }\n return true;\n\n }", "boolean isFieldUnique(String fieldName, Object value, Serializable objectId);" ]
[ "0.66294664", "0.6429993", "0.63465047", "0.6326285", "0.6280496", "0.6243911", "0.6203443", "0.61297476", "0.6117567", "0.60834503", "0.60729235", "0.6047162", "0.59850574", "0.5978292", "0.5931477", "0.5920787", "0.5915222", "0.5881743", "0.5862254", "0.5849957", "0.5815259", "0.5796544", "0.5794884", "0.5784101", "0.57818854", "0.57795674", "0.57678074", "0.5766354", "0.5718751", "0.5684215", "0.5679958", "0.56760246", "0.5675634", "0.567262", "0.56532526", "0.56527317", "0.56297785", "0.5621937", "0.56014746", "0.5601394", "0.5593687", "0.5575903", "0.55721146", "0.5559733", "0.5556546", "0.55542207", "0.55316705", "0.5529353", "0.55287284", "0.5521975", "0.55218464", "0.55207056", "0.5520425", "0.550126", "0.5471213", "0.54691213", "0.5459878", "0.5450574", "0.54474205", "0.54397374", "0.54310894", "0.54308975", "0.5419389", "0.53697217", "0.53687227", "0.53681827", "0.5365746", "0.53597474", "0.5357238", "0.53560215", "0.53509384", "0.53502977", "0.53469574", "0.53462344", "0.5342319", "0.53312814", "0.5325937", "0.5324992", "0.5323136", "0.5314311", "0.5313551", "0.5310303", "0.5307341", "0.5305122", "0.53050977", "0.53044766", "0.529081", "0.5287903", "0.5286854", "0.52733815", "0.52701515", "0.5262733", "0.5249078", "0.52466166", "0.5246431", "0.524642", "0.52394086", "0.523142", "0.5229808", "0.52291626" ]
0.559625
40
Get an amenity request by its ID
@Override public ServiceRequest getServiceRequestById(int id) throws SQLException { logger.info("DAO getting a service request with ID: " + id); System.out.println("DAO getting a service request with ID: " + id); ServiceRequest sr = null; Session session = sessionFactory.getCurrentSession(); Query query = session.createQuery(GET_SERVICE_REQUEST_BY_ID_HQL); query.setParameter("id", id); if (query.list() != null && query.list().size() > 0) { sr = (ServiceRequest) query.list().get(0); } return sr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Acquest getAcquest(int Acquest_id);", "RequesterVO get(int id);", "public Optional<IncomingRequests> findSingleRequest(int id){\n\t\tOptional<IncomingRequests> requestList = incomingRequests.findById(id);\n//\t\trequestList.forEach(singleRequest::add);\n\t\treturn requestList;\n\t}", "@Override\n\tpublic AchievementRequirement aReq(Integer id) {\n\t\treturn em.find(AchievementRequirement.class, id);\n\t}", "@Override\n\tpublic ModificationRequest findById(UUID id) {\n\t\ttry {\n\t\t\treturn this.entityManager.createQuery(\"SELECT request from ModificationRequest request where request.modificationRequestId = :id AND request.active = TRUE\", ModificationRequest.class)\n\t\t\t\t\t.setParameter(\"id\", id)\n\t\t\t\t\t.getSingleResult();\n\t\t}\n\t\tcatch(NoResultException e) {\n\t\t\t// returns null if no user if found\n\t\t\treturn null;\n\t\t}\n\t}", "public PendingRequest getPendingRequest(final String id);", "java.lang.String getRequestID();", "public Request loadRequestDetail(long _requestId) throws RequestManagerException, PersistenceResourceAccessException;", "public Object getById(Request request) {\n\t\tDbHandler db = Config.getConfig().getHandler();\n\t\ttry {\n\t\t\treturn db.clinics.queryForId((int) request.getParam(\"cid\"));\n\t\t} catch (SQLException e) {\n\t\t\tConfig.getConfig().getLogger().exception(e);\n\t\t\treturn null;\n\t\t}\n\t}", "@GetMapping(\"/attractions/{id}\")\n @Timed\n public ResponseEntity<Attraction> getAttraction(@PathVariable Long id) {\n log.debug(\"REST request to get Attraction : {}\", id);\n Optional<Attraction> attraction = attractionRepository.findById(id);\n return ResponseUtil.wrapOrNotFound(attraction);\n }", "List<ActivityRequest> getByUserId(Integer id);", "@GET(\"/attractions/{attractionId}\")\n Call<Attraction> getAttraction(\n @Path(\"attractionId\") int attractionId\n );", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.amenity.v1.Amenity getAmenityReq(Amenity amenity){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.amenity.v1.Amenity amenityReq =\n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.amenity.v1.Amenity();\n\t\t\n\t\tamenityReq.setHotelId( new Integer( amenity.getHotelId() ) );\n\t\tamenityReq.setRoomCategoryId( new Integer( amenity.getRoomCategoryId() ) );\n\t\tamenityReq.setAmenityCode( amenity.getAmenityCode() );\n\t\tamenityReq.setAmenityName( amenity.getAmenityName() );\n\t\tamenityReq.setAmenityValue( amenity.getAmenityValue() );\n\t\tif( amenity.getAmenityDate() != null ){\n\t\t\tamenityReq.setAmenityDate( this.getDate( amenity.getAmenityDate() ) );\n\t\t}\n\t\t\n\t\treturn amenityReq;\n\t}", "public int getIdRequest(int id_user, int id_equipment, String state) {\n RequestDao objDao = new RequestDao();\n return objDao.getIdRequest(id_user, id_equipment, state);\n }", "TrackerAdminRequests getTrackerAdminRequests(final Integer id);", "private Request findRecord(String mDeviceId) {\n return ofy().load().type(Request.class).id(mDeviceId).now();\n//or return ofy().load().type(Request.class).filter(\"id\",id).first.now();\n }", "@RestAPI\n \t@PreAuthorize(\"hasAnyRole('A')\")\n \t@RequestMapping(value = \"/api/{id}\", method = RequestMethod.GET)\n \tpublic HttpEntity<String> getOne(@PathVariable(\"id\") Long id) {\n \t\treturn toJsonHttpEntity(agentManagerService.getOne(id));\n \t}", "public int getR_Request_ID();", "HrDocumentRequest get(long id);", "@Override\n\tpublic ReimbursementRequest findById(Integer i) {\n\t\treturn null;\n\t}", "public Candidat getUserByid(int id) {\n Candidat candidat = StaticVars.currentCandidat;\n String url = StaticVars.baseURL + \"/userbyid\";\n ConnectionRequest req = new ConnectionRequest();\n req.setUrl(url);\n req.setPost(false);\n\n req.addResponseListener(new ActionListener<NetworkEvent>() {\n @Override\n public void actionPerformed(NetworkEvent evt) {\n result = req.getResponseCode();\n }\n\n });\n NetworkManager.getInstance().addToQueueAndWait(req);\n\n return candidat;\n\n }", "@Override\n\tpublic RespJson get(HttpServletRequest request, String id) throws APIException {\n\t\treturn null;\n\t}", "Request<UserInfoDetailsProxy> findDetailsFromUser(Long id);", "@RequestMapping(value = \"/presencerequests/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Presencerequest> getPresencerequest(@PathVariable Long id, HttpServletResponse response) {\n log.debug(\"REST request to get Presencerequest : {}\", id);\n Presencerequest presencerequest = presencerequestRepository.findOne(id);\n if (presencerequest == null) {\n return new ResponseEntity<>(HttpStatus.NOT_FOUND);\n }\n return new ResponseEntity<>(presencerequest, HttpStatus.OK);\n }", "Agent findById(String id);", "CraftAdvReq selectByPrimaryKey(Integer id);", "@RequestMapping(value = \"/patients\", method = RequestMethod.GET, headers = {\"patient_id\"})\n public Patient getAPatient(@RequestHeader(\"patient_id\") Long id) {\n return patientRepository.findById(id).orElseThrow(() -> new ResourceNotFoundException(\"Patient\", \"id\" , id));\n }", "TrackerAdminRequests loadTrackerAdminRequests(final Integer id);", "public MyMaid requestMaid(String maidName){\n //check if registry has maid\n if(mMaidRegistry.containsKey(maidName)){\n return mMaidRegistry.get(maidName);\n }\n\n //invalid name\n return null;\n }", "@GetMapping(\"/abilities/{id}\")\n @Timed\n public ResponseEntity<Ability> getAbility(@PathVariable String id) {\n log.debug(\"REST request to get Ability : {}\", id);\n Ability ability = null;\n try {\n ability = api.getAbility(id);\n } catch (Throwable e) {\n if (e instanceof ErrorResponse && ((ErrorResponse) e).getCode() == 404) {\n log.debug(\"Ability : {} not found\", id);\n } else {\n throw e;\n }\n }\n\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(ability));\n }", "@GetMapping(\"/affinites/{id}\")\n @Timed\n public ResponseEntity<Affinite> getAffinite(@PathVariable Long id) {\n log.debug(\"REST request to get Affinite : {}\", id);\n Affinite affinite = affiniteRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(affinite));\n }", "String get(String id);", "public Rule idExprReq()\n \t{\n \t\treturn firstOf(field(), call());\n \t}", "RequestDetail getRequestDetail(String requestId) throws SAXException, IOException;", "Request<UserInfoDetailsProxy> findUserInfoDetails(Long id);", "@CustomAnnotation(value = \"FIND_ONE_ACTIVITY\")\n\t@RequestMapping(\n\t\t\tvalue=\"/activity/{id}\",\n\t\t\tmethod=RequestMethod.GET,\n\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE\n\t\t\t)\n\tpublic ResponseEntity<Activity> findActivity(@PathVariable(\"id\") Long id, @Context HttpServletRequest request){\n\t\treturn new ResponseEntity<Activity>(activityService.findActivity(id), HttpStatus.OK);\n\t}", "protected Long getIdRendicion(HttpServletRequest request){\n\t\tLong idRendicion = null;\n\t\t\n\t\tif (validateParameter(request,\"id\")){\n\t\t\tidRendicion = new Long(request.getParameter(\"id\"));\n\t\t}\n\t\treturn idRendicion;\n\t}", "public Object getEmployeebyRequestID(Integer requestID) {\n\t\treturn null;\n\t}", "@GET(\"/attractions/{attractionId}\")\n Call<Attraction> getAttractionWithAuth(\n @Path(\"attractionId\") int attractionId,\n @Header(\"Authorization\") String bearer\n );", "public TransmissionProtocol.Request getRequest(int index) {\n return request_.get(index);\n }", "private String doQueryById(HttpServletRequest request,\n HttpServletResponse response) {\n return null;\n }", "public Requisition getRequisitionByID(int requisitionID);", "public Reimbursements viewMyEmployeeReqs(int id) {\r\n\t\tEmployee e = getEmployeebyId(id);\r\n\t\tReimbursements r = rs.getReimByEID(e.getId());\r\n\t\treturn r;\r\n\t}", "public Order findOne(Integer id) {\r\n\t\tlog.info(\"Request to finde Order : \" + id);\r\n\t\treturn orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();\r\n\t}", "public List<Request> viewResolved(int id) {\n\t\tList<Request> list = null;\n\t\tRequest request = null;\n\t\t\t\t\n\t\ttry {\n\t\t\tlist = new ArrayList<Request>();\n\n\t\t\tString sql = \"select * from requests \"+\n\t\t\t\t \"where employee_id = \"+id+\" and status = 'resolved'\";\n\t\t\t\t\t\n\n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(sql);\n\n\t\t\twhile(resultSet.next()) {\n\t\t\t\trequest = new Request();\n\t\t\t\trequest.setId(resultSet.getInt(\"request_id\"));\t\t\t\t\t\t\n\t\t\t\trequest.setEmpId(resultSet.getInt(\"employee_id\"));\n\t\t\t\trequest.setMgrId(resultSet.getInt(\"manager_id\"));\n\t\t\t\trequest.setRequestAmount(resultSet.getInt(\"request_amount\"));\n\t\t\t\trequest.setExpenseDate(resultSet.getString(\"expense_date\"));\n\t\t\t\trequest.setStatus(resultSet.getString(\"status\"));\n\t\t\t\trequest.setDecision(resultSet.getString(\"decision\"));\n\t\t\t\tlist.add(request);\n\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\treturn null;\n\t}", "public String getIdrequest() {\r\n\t\treturn idrequest;\r\n\t}", "@GetMapping(\"/asignacion/{id}\")\n public ResponseEntity<Asignacion> getAsignacion(@PathVariable Long id) {\n log.debug(\"REST request to get Asignacion : {}\", id);\n Optional<Asignacion> asignacion = asignacionService.findOne(id);\n return ResponseUtil.wrapOrNotFound(asignacion);\n }", "public IPermissionActivity getPermissionActivity(long id);", "public Activity getById(int id){ \n\t\tActivity e=(Activity)template.get(Activity.class,id); \n\t return e; \n\t}", "ProviderCommandRequest findOne(Long id);", "@Override\r\n\tpublic Permission queryById(Integer id) {\n\t\treturn permissionDao.queryById(id);\r\n\t}", "@Transactional(readOnly = true)\n public Optional<Exam> findOne(Long id) {\n log.debug(\"Request to get Exam : {}\", id);\n return examRepository.findById(id);\n }", "public ApplyInvite findById(Object id);", "public List<Request> viewPending(int id) {\n\t\tList<Request> list = null;\n\t\tRequest request = null;\n\t\t\t\t\n\t\ttry {\n\t\t\tlist = new ArrayList<Request>();\n\t\t\tString sql = \"select * from requests \"+\n\t\t\t\t \"where employee_id = \"+id+\" and status = 'pending'\";\n\n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tResultSet resultSet = statement.executeQuery(sql);\n\t\t\t\n\t\t\twhile(resultSet.next()) {\n\t\t\t\trequest = new Request();\n\t\t\t\trequest.setId(resultSet.getInt(\"request_id\"));\t\t\t\t\t\t\n\t\t\t\trequest.setEmpId(resultSet.getInt(\"employee_id\"));\n\t\t\t\trequest.setMgrId(resultSet.getInt(\"manager_id\"));\n\t\t\t\trequest.setRequestAmount(resultSet.getInt(\"request_amount\"));\n\t\t\t\trequest.setExpenseDate(resultSet.getString(\"expense_date\"));\n\t\t\t\trequest.setStatus(resultSet.getString(\"status\"));\n\t\t\t\trequest.setDecision(resultSet.getString(\"decision\"));\n\t\t\t\tlist.add(request);\n\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\treturn null;\n\t}", "Optional<RequestOtherNiazsanjiDTO> findOne(Long id);", "public HashMap<String, Object> getPatientLabRequestById(HashMap<String, Object> patientLabRequestId);", "public abstract Optional<Object> getByID(@PathVariable(\"id\") int id);", "public Ticket getTicket(String id);", "Permission selectByPrimaryKey(String id);", "public MyMaid hireMaid(Integer id){\n //return requested Maid\n return mMaidStaff.getMaid(id);\n }", "RiceCooker getById(long id);", "public static Model tryGet(int id) {\n\t\tif (headers == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tHeader header = headers[id];\n\n\t\tif (header != null) {\n\t\t\treturn new Model(id);\n\t\t} else {\n\t\t\tondemand.requestModel(id);\n\t\t\treturn null;\n\t\t}\n\t}", "public Amendment getAmendment(int amendmentId);", "public TransmissionProtocol.Request getRequest(int index) {\n if (requestBuilder_ == null) {\n return request_.get(index);\n } else {\n return requestBuilder_.getMessage(index);\n }\n }", "AppStandard selectById(String id);", "Invitation getInvitationById(int invitationId);", "@GET(\"aktivitas/{id}\")\n Call<List<AktifitasModel>>\n getById(@Path(\"id\") String id);", "@Override\r\n\tpublic Amigo getById(int id) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic FornameRequirements getObjectById(Long id) {\n\t\treturn fornameRequirementsMapper.selectByPrimaryKey(id);\n\t}", "OpeningRequirement selectByPrimaryKey(Integer id);", "@Transactional(readOnly = true)\n public Optional<Invitation> findOne(Long id) {\n log.debug(\"Request to get Invitation : {}\", id);\n return invitationRepository.findById(id);\n }", "@GetMapping (\"/getOneAnswer\")\n @ResponseBody\n public Answer getOneAnswer(long id){\n Optional<Answer> oanswer = this.answerRepository.findById(id);\n if(oanswer.isPresent()){\n return oanswer.get();\n }\n return null;\n }", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public void get(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }", "public RequestResponse getByUserIDAndRequestId(int userPk, int requestPk) {\n try {\n PreparedStatement pstmt = ds.getConnection().prepareStatement(queryByUserAndRequest);\n pstmt.setInt(1, requestPk);\n pstmt.setInt(2, userPk);\n ResultSet results = pstmt.executeQuery();\n if (results.next()) {\n return new RequestResponse(results);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }", "public Reimbursement searchReimburseById(Integer id){\n Reimbursement re = reimbursementRepo.getById(id);\n\n // check to make sure User object is not null\n if (re != null) {\n // check something like approve or pass\n\n return re;\n }\n return null;\n }", "EpermissionDO selectByPrimaryKey(Long id);", "public Client find(int id) throws DataAccessLayerException {\n try {\n Subject.doAs(LoginController.getLoginContext().getSubject(), new MyPrivilegedAction(\"CLIENT\", Permission.READ));\n return (Client) super.find(Client.class, id);\n } catch (AccessControlException e) {\n e.printStackTrace();\n }\n return null;\n }", "ChallengeTo findChallengeById(int id);", "public Request getRequest() throws IOException {\n\t\tString message = underlying.readStringLine();\n\t\tif(message != null && message.startsWith(\"!compute \"))\t\t\n\t\t\treturn new NodeRequest(message.substring(9).split(\"\\\\s\"));\t\t\n\t\tif(message != null && message.equals(\"!getLogs\"))\t\t\n\t\t\treturn new LogRequest();\n\t\tif(message != null && message.startsWith(\"!share \"))\t\t\n\t\t\treturn new ShareRequest(message.substring(7).trim());\n\t\tif(message != null && (message.startsWith(\"!commit \") || message.equals(\"!rollback\")))\t\t\n\t\t\treturn new CommitRequest(message);\n\t\treturn null;\n\t}", "@java.lang.Override\n public long getRequesterId() {\n return requesterId_;\n }", "public SfEntrustor selectByPrimaryKey(BigDecimal id, RequestMeta requestMeta) {\n return entrustorService.selectByPrimaryKey(id, requestMeta);\r\n }", "private SiteReservation findById(Integer id){\n SiteReservation reservation;\n try {\n reservation = repo.findById(id).get();\n } catch (NoSuchElementException e){\n throw new ReservationNotFoundException(id);\n }\n return reservation;\n }", "@RequestMapping(value =\"get{id}\", method = RequestMethod.GET)\n private UserMessage get(@PathVariable long id ){\n log.debug(\"getthing message by id# \" + id);\n UserMessage found = messageRepository.findOne(id);\n log.debug(\"got id#\" + id);\n return found;\n }", "Permission selectByPrimaryKey(Integer id);", "Object get(ID id) throws Exception;", "public ServiceClient2 readRequest(String api, int id) {\n\t\treadRequest = ReadRequest.newBuilder().setApi(api).setId(id).build();\n\t\treturn this;\n\t}", "Order getByID(String id);", "public ProtocolResult getRequest() {\n\t\t\n\t\tif( hasReachedTimeout() ){\n\t\t\taddError(Locale.getString(\"FipaRequestProtocol.2\")); //$NON-NLS-1$\n\t\t}\n\t\telse{\n\t\t\tif (isParticipant() && (getState() == RequestProtocolState.NOT_STARTED)) {\n\t\t\t\t\n\t\t\t\tACLMessage message = getRefAclAgent().getACLMessage(EnumFipaProtocol.FIPA_REQUEST, Performative.REQUEST);\n\t\t\t\t\n\t\t\t\tif (message != null) {\n\t\t\t\t\tinitiate(message.getSender(), getRefAclAgent().getAddress());\n\t\t\t\t\t\n\t\t\t\t\tsetConversationId(message.getConversationId());\n\t\t\t\t\tsetState(RequestProtocolState.WAITING_REQUEST);\n\t\t\t\t\t\n\t\t\t\t\tresetStartedTime();\n\t\t\t\t\t\n\t\t\t\t\treturn new ProtocolResult(message.getSender(), Performative.REQUEST, message.getContent().getContent().toString());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (isInitiator()) {\n\t\t\t\taddError(Locale.getString(\"FipaRequestProtocol.3\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\telse {\n\t\t\t\taddError(Locale.getString(\"FipaRequestProtocol.4\")); //$NON-NLS-1$\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public void findById() {\n String answer = view.input(message_get_id);\n if (answer != null){\n try{\n long id = Long.parseLong(answer);\n Customer c = model.findById(id);\n if(c!=null)\n view.showCustomerForm(c);\n else\n view.showMessage(not_found_error);\n }catch(NumberFormatException nfe){\n view.showMessage(\"ID must be number\");\n }\n }\n }", "@Override\r\n public Assunto buscarId(int id) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"SELECT a FROM Assunto a WHERE a.id =:id\");\r\n query.setParameter(\"id\", id);\r\n \r\n List<Assunto> assunto = query.getResultList();\r\n if(assunto != null && assunto.size() > 0)\r\n return assunto.get(0);\r\n return null;\r\n }", "TransmissionProtocol.Request getRequest(int index);", "public void setIdrequest(String idrequest) {\r\n\t\tthis.idrequest = idrequest;\r\n\t}", "Session get(int id);", "T get(ID id);", "@RequestMapping(\"/{id}\")\n \tpublic String getOne(@PathVariable Long id, ModelMap model) {\n \t\tmodel.addAttribute(\"agent\", agentManagerService.getOne(id));\n \t\treturn \"agent/detail\";\n \t}", "@Override\n\tpublic Appointment getAppointmentById(Integer id) {\n\t\t\t\tAppointment foundAppointment = ar.getOne(id);\n\t\t\t\tif(foundAppointment != null) {\n\t\t\t\t\tSystem.out.println(\"Appointment with id: \" + id + \" found\");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"Appointment with id: \" + id + \" not found\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn foundAppointment;\n\t}", "@SneakyThrows\n @Override\n public DeveloperSkill findByID(Long id) {\n return null; //parse.get(Math.toIntExact(id));\n }", "public Mission getMissionById(Long id) throws IllegalArgumentException;", "public Airplane find(int id);", "T getbyId(I id);" ]
[ "0.6941131", "0.68028396", "0.6498025", "0.63360643", "0.6260235", "0.62268436", "0.6214546", "0.61188066", "0.5974253", "0.5941498", "0.5906661", "0.57342446", "0.5681409", "0.56383294", "0.5629676", "0.56286925", "0.5618141", "0.56151646", "0.5565901", "0.54997444", "0.54968697", "0.5467577", "0.5462506", "0.5454993", "0.5450173", "0.5429245", "0.5420459", "0.5415932", "0.537761", "0.5358716", "0.53541684", "0.53409785", "0.53391796", "0.5334557", "0.5329969", "0.532549", "0.53057414", "0.5280643", "0.5272472", "0.52552724", "0.52536434", "0.52333003", "0.52329457", "0.5226177", "0.5213477", "0.5189992", "0.5188542", "0.5186748", "0.51690006", "0.516735", "0.51619834", "0.5157979", "0.51505727", "0.5142198", "0.5127821", "0.51275074", "0.51227236", "0.5119511", "0.5116763", "0.51125777", "0.5110525", "0.5108675", "0.5102365", "0.5089786", "0.5086646", "0.5083613", "0.5072313", "0.50605184", "0.50515103", "0.50499755", "0.5044374", "0.50329846", "0.5029541", "0.50265163", "0.5008464", "0.49985543", "0.49968466", "0.49871325", "0.4985818", "0.49836856", "0.4981964", "0.4981135", "0.49769557", "0.49743316", "0.49736884", "0.49724373", "0.49638328", "0.49575683", "0.49537852", "0.49440023", "0.49417105", "0.49354205", "0.4935318", "0.4934251", "0.492438", "0.49239382", "0.49181405", "0.4911626", "0.4906168", "0.49041504" ]
0.5326685
35
Updates an Service request
public ServiceRequest updateServiceRequest(ServiceRequest sr) { Session session = sessionFactory.getCurrentSession(); session.update(sr); return sr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UpdateRequest() {\n super(ServiceType.UPDATE);\n }", "public abstract Response update(Request request, Response response);", "@ApiMethod(name = \"updateRequest\")\n public Request updateRequest(Request request)throws NotFoundException {\n if (findRecord(request.getDeviceId()) == null) {\n throw new NotFoundException(\"Request Record does not exist\");\n }\n ofy().save().entity(request).now();\n return request;\n }", "@Override\n\tpublic void updateRequest(TestExec testExec, Request request) {\n\t\tthis.updateRequest(request);\n\t}", "@GetMapping(\"/service_requests/update/{requestId}\")\n public String updateServiceRequest(@PathVariable String requestId, Model model){\n String role = userService.getRole(userService.getCurrentUserName());\n model.addAttribute(\"role\", role);\n\n ServiceRequest serviceRequest = serviceRequestService.findById(Long.valueOf(requestId));\n if (serviceRequest.getStatus().toString().equals(\"SOLVED\")){\n throw new BadRequestException(\"Tickets in status Solved cannot be updated\");\n }\n\n // Check to make sure End Users can only update their own Tickets\n if (role.equals(\"END_USER\") && !serviceRequest.getCreator().equals(userService.getCurrentUserName())){\n throw new BadRequestException(\"You cannot update another users ticket!\");\n }\n\n model.addAttribute(\"serviceRequest\", serviceRequest);\n\n return \"/forms/new_servicerequest.html\";\n }", "public void updateRequestTrail(String request) throws RemoteException;", "void requestUpdate(UUIDBase uuid, OpResult opResult) {\n if (opResult.isComplete()) {\n requestComplete(uuid, opResult);\n } else {\n _requestInProgress(uuid);\n }\n }", "public UpdateRequest(String key, String value, String objectClass) {\n super(ServiceType.UPDATE);\n this.key = key;\n this.value = value;\n this.objectClass = objectClass;\n }", "public void putRequest(Request request, Response response) {\n\t\tupdateObject(request, response);\n\t}", "@Override\n\tpublic void updateRequest(Request request) {\n\n\t\tString requestBody = request.getBodyAsString();\n\t\tif ( (requestBody == null)\n\t\t || (requestBody.trim().isEmpty()) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tboolean toArguments = true;\n\t\tXMLRequestParser parser = new XMLwithAttributesParser(request,toArguments);\n\n\t\ttry {\n\t\t\tparser.parseXml().saveResultsToRequest();\n\t\t} catch (IOException ex) {\n\t\t\tLOGGER.error(ex.getMessage(), ex);\n\t\t\tthrow new RuntimeException(ex.getMessage(), ex);\n\t\t} catch (SAXException ex) {\n\t\t\tLOGGER.error(ex.getMessage(), ex);\n\t\t\tthrow new RuntimeException(ex.getMessage(), ex);\n\t\t}\n\t}", "public int updateRequestData(Request input) throws SQLException{\n String sqlquery = \"UPDATE Request SET Requester=?, ModelName=?, Worker=?,Ps=?, Status=?, ExecutionTime=?,Accuracy=?, DownloadUrl=? WHERE id=?\";\n PreparedStatement statement = this.connection.prepareStatement(sqlquery);\n this.setCreateAndUpdateStatement(statement,input);\n statement.setInt(9,input.getId());\n return statement.executeUpdate();\n }", "public void updateService(String serviceName, String newServiceName, CheckBox dateOfBirth, CheckBox address,\n CheckBox typeOfLicense, CheckBox proofOfResidence, CheckBox proofOfStatus, CheckBox proofOfPhoto, double servicePrice) {\n DatabaseReference dR;\n\n dR = FirebaseDatabase.getInstance().getReference(\"ServiceRequests\").child(serviceName);\n Service serviceRequest = new ServiceCategories(newServiceName, dateOfBirth.isChecked(), address.isChecked(),\n typeOfLicense.isChecked(), proofOfResidence.isChecked(), proofOfStatus.isChecked(),\n proofOfPhoto.isChecked(), servicePrice);\n dR.removeValue();\n dR.getParent().child(newServiceName).setValue(serviceRequest);\n }", "public DCAEServiceObject(String serviceId, DCAEServiceRequest request) {\n DateTime now = DateTime.now(DateTimeZone.UTC);\n this.setServiceId(serviceId);\n this.setTypeId(request.getTypeId());\n this.setVnfId(request.getVnfId());\n this.setVnfType(request.getVnfType());\n this.setVnfLocation(request.getVnfLocation());\n this.setDeploymentRef(request.getDeploymentRef());\n this.setCreated(now);\n this.setModified(now);\n // Assumption here is that you are here from the PUT which means that the service is RUNNING.\n this.setStatus(DCAEServiceStatus.RUNNING);\n }", "private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "void setRequest(Request req);", "public int updateOrderRequest(OrderEntity orderEntity);", "public abstract void update(@Nonnull Response response);", "public void updateEditService(){\r\n \tMap<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();\r\n\t\tint serviceId = Integer.parseInt(params.get(\"serviceId\"));\r\n\t\tthis.getLog().info(\"serviceId:\" + serviceId);\r\n\t\t\r\n\t\tif(serviceId == 0){\r\n\t\t\teditService = new ServiceDTO();\r\n\t\t}else{\r\n\t\t\tfor (ServiceDTO s : this.getServiceList().getAvailableServiceList()) {\r\n\t\t\t\tif(s.getId() == serviceId){\r\n\t\t\t\t\teditService = s;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}\r\n\t}", "private void update(RequestInfo requestInfo) throws DefectException {\r\n\t\tlog.info(\"Start - update\");\r\n\t\tcreateInstance();\r\n\t\tif(CommonUtil.isNull(requestInfo)){\r\n\t\t\tlog.error(\"Request Info is null - \"+ requestInfo);\t\t\t\r\n\t\t\tthrow new DefectException(\"failed to update, request information is missing\");\r\n\t\t}\r\n try{\r\n\r\n \tString ref = requestInfo.getRefField();\r\n\r\n \t//Update\r\n \tJsonObject updateEntry = convertMapToJson(requestInfo.getEntry().get(RallyConstants.UPDATE));\t \r\n \tUpdateRequest updateRequest = new UpdateRequest(ref, updateEntry);\r\n \tUpdateResponse updateResponse = null;\r\n\r\n \ttry {\r\n \t \t\t\tupdateResponse = restApi.update(updateRequest);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlog.error(\"failed to update, message : \" + e.toString() + \"RequestInfo -\" + requestInfo);\r\n\t \tthrow new DefectException(\"failed to update, message : \" + e.toString());\r\n\t\t\t}\r\n\r\n if (updateResponse.wasSuccessful()) {\r\n \tlog.info(String.format(\"Updated %s\", updateResponse.getObject().get(RallyConstants._REF).getAsString())); \r\n } else {\r\n List<String> lstResult = new ArrayList<String>();\r\n for (String err : updateResponse.getErrors()) {\r\n System.err.println(\"\\t\" + err);\r\n lstResult.add(err);\r\n }\r\n log.error(\"Error in updating : \" + lstResult);\r\n throw new DefectException(\"Error in updating : \" + lstResult);\r\n }\r\n } finally {\r\n \tcloseDefect();\r\n \tlog.info(\"End - update\");\r\n }\r\n \t}", "JobResponse.Update update();", "public DCAEServiceObject(DCAEServiceObject source, DCAEServiceRequest updateRequest) {\n // Immutable fields\n this.setServiceId(source.getServiceId());\n this.setCreated(source.getCreated());\n\n // Mutable fields\n this.setTypeId(updateRequest.getTypeId());\n this.setVnfId(updateRequest.getVnfId());\n this.setVnfType(updateRequest.getVnfType());\n this.setVnfLocation(updateRequest.getVnfLocation());\n this.setDeploymentRef(updateRequest.getDeploymentRef());\n this.setModified(DateTime.now(DateTimeZone.UTC));\n // Assumption here is that you are here from the PUT which means that the service is RUNNING.\n this.setStatus(DCAEServiceStatus.RUNNING);\n }", "public String update(String id, String datetime, String description, String request, String status);", "public MRequestUpdate( MRequest parent ) {\n super( parent.getCtx(),0,parent.get_TrxName());\n setClientOrg( parent );\n setR_Request_ID( parent.getR_Request_ID());\n set_ValueNoCheck( \"Created\",parent.getUpdated());\n set_ValueNoCheck( \"CreatedBy\",new Integer( parent.getUpdatedBy()));\n set_ValueNoCheck( \"Updated\",parent.getUpdated());\n set_ValueNoCheck( \"UpdatedBy\",new Integer( parent.getUpdatedBy()));\n\n //\n\n setStartTime( parent.getStartTime());\n setEndTime( parent.getEndTime());\n setResult( parent.getResult());\n setQtySpent( parent.getQtySpent());\n setQtyInvoiced( parent.getQtyInvoiced());\n setM_ProductSpent_ID( parent.getM_ProductSpent_ID());\n setConfidentialTypeEntry( parent.getConfidentialTypeEntry());\n }", "HttpPatch patchRequest(HttpServletRequest request, String address) throws IOException;", "@Override\n public MockResponse handleUpdate(RecordedRequest request) {\n return process(request, putHandler);\n }", "public MRequestUpdate( Properties ctx,int R_RequestUpdate_ID,String trxName ) {\n super( ctx,R_RequestUpdate_ID,trxName );\n }", "HttpPut putRequest(HttpServletRequest request, String address) throws IOException;", "public Request updateRequestStatus(long _requestId, Trail _trail) throws RequestManagerException, PersistenceResourceAccessException;", "public ServiceRequest() {\n super();\n this.addNamespaceToRequest = true;\n }", "public void addRequest(Request req) {\n\n }", "private void updateForecastRequest() {\n\t\tMyApplication.instance.getServiceManager().getForecastServiceUpdater()\n\t\t\t\t.updateForecastFromServer(new ForecastCallBack() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void forecastLoaded(List<YahooForcast> forecasts) {\n\t\t\t\t\t\tforecastUpdatedFromServiceUpdater(forecasts);\n\t\t\t\t\t}\n\t\t\t\t}, woeid);\n\t}", "public void setStatus(CMnServicePatch.RequestStatus st) {\n status = st;\n }", "private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "public ResponseTranslator put() {\n setMethod(\"PUT\");\n return doRequest();\n }", "@RequestMapping(path = \"/update\", method = RequestMethod.POST)\n\tpublic ResponseEntity<RestResponse<CompanyDTO>> update(@RequestBody CompanyDTO request) {\n\n\t\tCompanyDTO result = companyService.update(request);\n\t\t\n\t\tRestResponse<CompanyDTO> restResponse = \n\t\t\t\tnew RestResponse<CompanyDTO>(RestResponseCodes.OK.getCode(), RestResponseCodes.OK.getDescription(), result);\n\t\t\n\t\treturn new ResponseEntity<RestResponse<CompanyDTO>>(restResponse, HttpStatus.OK);\n\t\t\t\n\t}", "@RequestMapping(value = \"/presencerequests\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Presencerequest> updatePresencerequest(@RequestBody Presencerequest presencerequest) throws URISyntaxException {\n log.debug(\"REST request to update Presencerequest : {}\", presencerequest);\n if (presencerequest.getId() == null) {\n return createPresencerequest(presencerequest);\n }\n Presencerequest result = presencerequestRepository.save(presencerequest);\n return ResponseEntity.ok()\n .headers(HeaderUtil.createEntityUpdateAlert(\"presencerequest\", presencerequest.getId().toString()))\n .body(result);\n }", "public static void updateAddressRequest(final Context context, final String businessId, final String address) {\n final RequestQueue httpRequestQueue = Volley.newRequestQueue(context);\n final StringRequest httpRequest = new StringRequest(Request.Method.POST, (MainActivity.serverURL + \"update/update_address.php\"),\n //success, the request responded successfully!\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n httpRequestQueue.stop();\n }\n },\n //error, the request responded with a failure...\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(context, \"An error occurred with your internet...\", Toast.LENGTH_LONG).show();\n error.printStackTrace();\n httpRequestQueue.stop();\n }\n }\n ) {\n //POST variables to send to the request\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"businessId\", businessId);\n params.put(\"address\", address);\n return params;\n }\n //header values to send to the request\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }\n };\n httpRequestQueue.add(httpRequest);\n }", "void addRequest(@NonNull OverrideRequest request) {\n OverrideRequest previousRequest = mRequest;\n mRequest = request;\n mListener.onStatusChanged(request, STATUS_ACTIVE);\n\n if (previousRequest != null) {\n cancelRequestLocked(previousRequest);\n }\n }", "public int updateUser(Candidat c) {\n String url = StaticVars.baseURL + \"/updateuser\";\n System.out.println(url);\n ConnectionRequest req = new ConnectionRequest();\n\n req.setUrl(url);\n req.setPost(true);\n\nreq.setHttpMethod(\"PUT\"); \n\n\n String can = String.valueOf(currentCandidat.getId());\n req.addArgument(\"id\", can);\n String login =String .valueOf(currentCandidat.getLogin());\n req.addArgument(\"login\",login);\n req.addArgument(\"email\", String .valueOf(currentCandidat.getEmail()));\n req.addArgument(\"pays\", String .valueOf(currentCandidat.getPays()));\n req.addArgument(\"ville\", String .valueOf(currentCandidat.getVille()));\n req.addArgument(\"tel\", Integer.toString(currentCandidat.getTel()));\n req.addArgument(\"domaine\", String .valueOf(currentCandidat.getDomaine()));\n\n req.addResponseListener(new ActionListener<NetworkEvent>() {\n @Override\n public void actionPerformed(NetworkEvent evt) {\n result = req.getResponseCode();\n \n System.out.println(result);\n }\n });\n NetworkManager.getInstance().addToQueueAndWait(req);\n\n return result;\n }", "public void setRequest(REQ request) {\n this.request = request;\n }", "@Override\n\tprotected void updateTargetRequest() {\n\t}", "@Override\n public SetupIntent update(Map<String, Object> params) throws StripeException {\n return update(params, (RequestOptions) null);\n }", "private ReservationUpdateRequest createReservationUpdateRequest(\n ReservationUpdateRequestInfo resContext) throws IOException {\n if (resContext == null) {\n throw new BadRequestException(\n \"Input ReservationSubmissionContext should not be null\");\n }\n ReservationDefinitionInfo resInfo = resContext.getReservationDefinition();\n if (resInfo == null) {\n throw new BadRequestException(\n \"Input ReservationDefinition should not be null\");\n }\n ReservationRequestsInfo resReqsInfo = resInfo.getReservationRequests();\n if (resReqsInfo == null || resReqsInfo.getReservationRequest() == null\n || resReqsInfo.getReservationRequest().size() == 0) {\n throw new BadRequestException(\"The ReservationDefinition should\"\n + \" contain at least one ReservationRequest\");\n }\n if (resContext.getReservationId() == null) {\n throw new BadRequestException(\n \"Update operations must specify an existing ReservationId\");\n }\n\n ReservationRequestInterpreter[] values =\n ReservationRequestInterpreter.values();\n ReservationRequestInterpreter resInt =\n values[resReqsInfo.getReservationRequestsInterpreter()];\n List<ReservationRequest> list = new ArrayList<ReservationRequest>();\n\n for (ReservationRequestInfo resReqInfo : resReqsInfo\n .getReservationRequest()) {\n ResourceInfo rInfo = resReqInfo.getCapability();\n Resource capability =\n Resource.newInstance(rInfo.getMemorySize(), rInfo.getvCores());\n int numContainers = resReqInfo.getNumContainers();\n int minConcurrency = resReqInfo.getMinConcurrency();\n long duration = resReqInfo.getDuration();\n ReservationRequest rr = ReservationRequest.newInstance(capability,\n numContainers, minConcurrency, duration);\n list.add(rr);\n }\n ReservationRequests reqs = ReservationRequests.newInstance(list, resInt);\n ReservationDefinition rDef = ReservationDefinition.newInstance(\n resInfo.getArrival(), resInfo.getDeadline(), reqs,\n resInfo.getReservationName(), resInfo.getRecurrenceExpression(),\n Priority.newInstance(resInfo.getPriority()));\n ReservationUpdateRequest request = ReservationUpdateRequest.newInstance(\n rDef, ReservationId.parseReservationId(resContext.getReservationId()));\n\n return request;\n }", "@Override\r\n\tpublic void doUpdate(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "public yandex.cloud.api.operation.OperationOuterClass.Operation update(yandex.cloud.api.logging.v1.SinkServiceOuterClass.UpdateSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getUpdateMethod(), getCallOptions(), request);\n }", "VendorNotificationResponseDTO update(String id, VendorNotificationRequestDTO VendorDataNotificationRequestDTO)throws Exception;", "public void updateProductByRest(long id, HttpServletRequest request) {\n // set URL\n String url = String.format(\"%s://%s:%d/products/\" + id, request.getScheme(), request.getServerName(), request.getServerPort());\n // execute rest api update product request using RestTemplate.put method\n HttpEntity<Product> entity = getHttpEntity(request);\n RestTemplate restTemplate = new RestTemplate();\n restTemplate.put(url, entity, id);\n }", "public void edit(RequestBean request) {\n\t\t\r\n\t}", "public void replyRequest(ServiceRequest request, boolean confirm, String message) {\n int status = confirm? RequestType.REQUEST_SERVICED : RequestType.REQUEST_DENIED;\n request.setStatus(status);\n request.setRepliedBy(getCurrentUser());\n request.setReplyTime(new Date());\n serviceRequestRepo.save(request);\n }", "protected void update(HttpServletRequest request) throws Exception {\n\t\t\r\n\r\n\r\n\t\tPedido p = new Pedido();\r\n\t\tCancion c = new Cancion();\r\n\t\tCliente cl = new Cliente();\r\n\t\t\r\n\t\tString cod = (request.getParameter(\"codigo\"));\r\n\t\tString cod_cancion = (request.getParameter(\"cod_cancion\"));\r\n\t\tString cod_cliente = (request.getParameter(\"cod_cliente\"));\r\n\t\tp.setCod_pedido(cod);\r\n\t\tc.setCod_cancion(cod_cancion);\r\n\t\tcl.setCod_cliente(cod_cliente);\r\n\t\tp.setCan(c);\r\n\t\tp.setCl(cl);\r\n\t\t\r\n\t\t\r\n\t\tpdmodel.ActualizarPedido(p);\r\n\t}", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> update(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.UpdateSinkRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getUpdateMethod(), getCallOptions()), request);\n }", "private void setRequest(net.iGap.proto.ProtoRequest.Request value) {\n if (value == null) {\n throw new NullPointerException();\n }\n request_ = value;\n \n }", "@VisibleForTesting\n public UpdateStatusRequest(final AppointmentStatus status) {\n this.status = status;\n }", "public Request updateRequestStatus(long _requestId, Trail _trail, OutputFile[] _generatedFile) throws RequestManagerException, PersistenceResourceAccessException;", "public void savePendingRequest(PendingRequest pendingRequest);", "public static void editSanitationRequest(SanitationRequest request) {\n\n // Get updated data from request\n int requestID = request.getRequestID();\n String status = request.getStatus().name();\n User servicer = request.getServicer();\n Timestamp claimedTime = request.getClaimedTime();\n Timestamp completedTime = request.getCompletedTime();\n\n try {\n\n // Attempt to remove request from database\n PreparedStatement statement = Database.getDatabase().getConnection().prepareStatement(\n \"UPDATE \" + Constants.SANITATION_TABLE +\n \" SET status=?, servicerID=?, claimedTime=?, completedTime=? WHERE requestID=?\"\n );\n statement.setString(1, status);\n if (servicer == null) statement.setNull(2, Types.INTEGER);\n else statement.setInt(2, servicer.getUserID());\n statement.setTimestamp(3, claimedTime);\n statement.setTimestamp(4, completedTime);\n statement.setInt(5, requestID);\n statement.execute();\n\n } catch (SQLException exception) {\n\n // Print an exception message\n System.out.println(\"Sanitation Request Removal Exception:\");\n exception.printStackTrace();\n System.out.println();\n\n }\n }", "@PUT\n @Path(\"/{requirementId}\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n @ApiOperation(value = \"This method updates a specific requirement.\")\n @ApiResponses(value = {\n @ApiResponse(code = HttpURLConnection.HTTP_OK, message = \"Returns the updated requirement\", response = RequirementEx.class),\n @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = \"Unauthorized\"),\n @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = \"Not found\"),\n @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = \"Internal server problems\")\n })\n public Response updateRequirement(@PathParam(\"requirementId\") int requirementId,\n @ApiParam(value = \"Requirement entity\", required = true) Requirement requirementToUpdate) {\n DALFacade dalFacade = null;\n try {\n String registratorErrors = service.bazaarService.notifyRegistrators(EnumSet.of(BazaarFunction.VALIDATION, BazaarFunction.USER_FIRST_LOGIN_HANDLING));\n if (registratorErrors != null) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, registratorErrors);\n }\n UserAgent agent = (UserAgent) Context.getCurrent().getMainAgent();\n long userId = agent.getId();\n Gson gson = new Gson();\n Vtor vtor = service.bazaarService.getValidators();\n vtor.validate(requirementToUpdate);\n if (vtor.hasViolations()) {\n ExceptionHandler.getInstance().handleViolations(vtor.getViolations());\n }\n dalFacade = service.bazaarService.getDBConnection();\n Integer internalUserId = dalFacade.getUserIdByLAS2PeerId(userId);\n boolean authorized = new AuthorizationManager().isAuthorized(internalUserId, PrivilegeEnum.Modify_REQUIREMENT, dalFacade);\n if (!authorized) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.AUTHORIZATION, Localization.getInstance().getResourceBundle().getString(\"error.authorization.requirement.modify\"));\n }\n if (requirementToUpdate.getId() != 0 && requirementId != requirementToUpdate.getId()) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, \"Id does not match\");\n }\n dalFacade.followRequirement(internalUserId, requirementToUpdate.getId());\n RequirementEx updatedRequirement = dalFacade.modifyRequirement(requirementToUpdate, internalUserId);\n service.bazaarService.getNotificationDispatcher().dispatchNotification(service, updatedRequirement.getLastupdated_time(), Activity.ActivityAction.UPDATE, updatedRequirement.getId(),\n Activity.DataType.REQUIREMENT, updatedRequirement.getComponents().get(0).getId(), Activity.DataType.COMPONENT, internalUserId);\n return Response.ok(gson.toJson(updatedRequirement)).build();\n } catch (BazaarException bex) {\n if (bex.getErrorCode() == ErrorCode.AUTHORIZATION) {\n return Response.status(Response.Status.UNAUTHORIZED).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else if (bex.getErrorCode() == ErrorCode.NOT_FOUND) {\n return Response.status(Response.Status.NOT_FOUND).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else {\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n }\n } catch (Exception ex) {\n BazaarException bex = ExceptionHandler.getInstance().convert(ex, ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, \"\");\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } finally {\n service.bazaarService.closeDBConnection(dalFacade);\n }\n }", "com.exacttarget.wsdl.partnerapi.QueryRequest addNewQueryRequest();", "interface EntityUpdateRequest {\n /**\n * Returns the handle of the PI entity subject of this update.\n *\n * @return handle\n */\n PiHandle handle();\n\n /**\n * Returns the PI entity subject of this update. Returns {@code null} if\n * the update type is {@link UpdateType#DELETE}, in which case only the\n * handle is used in the request.\n *\n * @return PI entity or null\n */\n PiEntity entity();\n\n /**\n * Returns the type of update requested for this entity.\n *\n * @return update type\n */\n UpdateType updateType();\n\n /**\n * Returns the type of entity subject of this update.\n *\n * @return PI entity type\n */\n PiEntityType entityType();\n }", "void addRequest(DymonPatchRequest pr)\n{\n if (pr == null) return;\n\n System.err.println(\"ADD PATCH REQUEST \" + pr.getModelName());\n\n synchronized (this) {\n if (active_requests.contains(pr)) return;\n if (request_queue.contains(pr)) return;\n\n if (!is_enabled) {\n\t request_queue.offer(pr);\n\t return;\n }\n if (checkConflicts(pr,active_requests)) {\n\t request_queue.offer(pr);\n\t for (DymonPatchRequest ar : active_requests) {\n\t if (pr.getPriority() < ar.getPriority()) removeActive(ar);\n\t }\n\t return;\n }\n\n active_requests.add(pr);\n }\n\n if (instrument(pr,true)) {\n long ivl = pr.getDuration();\n if (ivl != 0) {\n\t RemoveRequest rr = new RemoveRequest(pr);\n\t remove_handlers.put(pr,rr);\n\t synchronized (this) {\n\t if (request_timer == null) request_timer = new Timer(\"DymonPatchTrackTimer\");\n\t request_timer.schedule(rr,ivl);\n\t }\n }\n }\n else {\n removeRequest(pr,false);\n }\n}", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service getServiceReq(Service service){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service serviceReq =\n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.service.v1.Service();\n\t\t\n\t\tserviceReq.setServiceCode( service.getServiceCode() );\n\t\tserviceReq.setServiceName( service.getServiceName() );\n\t\tserviceReq.setGateway( service.getGateway() );\n\t\tserviceReq.setDestination( service.getDestination() );\n\t\tserviceReq.setAdultPrice( new Double( service.getAdultPrice() ) );\n\t\tserviceReq.setChild1Price( new Double( service.getChild1Price() ) );\n\t\tserviceReq.setChild2Price( new Double( service.getChild2Price() ) );\n\t\tserviceReq.setChild3Price( new Double( service.getChild3Price() ) );\n\t\tserviceReq.setChild1MinAge( new Byte( service.getChild1MinAge() ) );\n\t\tserviceReq.setChild2MinAge( new Byte( service.getChild2MinAge() ) );\n\t\tserviceReq.setChild3MinAge( new Byte( service.getChild3MinAge() ) );\n\t\tserviceReq.setChild1MaxAge( new Byte( service.getChild1MaxAge() ) );\n\t\tserviceReq.setChild2MaxAge( new Byte( service.getChild2MaxAge() ) );\n\t\tserviceReq.setChild3MaxAge( new Byte( service.getChild3MaxAge() ) );\n\t\tserviceReq.setCurrency( service.getCurrency() );\n\t\tserviceReq.setMaxQuantity( new Double( service.getMaxQuantity() ) );\n\t\tserviceReq.setUnitOfMeasure( service.getUnitOfMeasure() );\n\t\tserviceReq.setMandatory( new Boolean( service.isMandatory() ) );\n\t\tserviceReq.setFree( new Boolean( service.isFree() ) );\n\t\tserviceReq.setOccupancyBased( new Boolean( service.isOccupancyBased() ) );\n\t\tserviceReq.setDateSpecific( new Boolean( service.isDateSpecific() ) );\n\t\tserviceReq.setAllOrNothing( new Boolean( service.isAllOrNothing() ) );\n\t\tserviceReq.setWeightBased( new Boolean( service.isWeightBased() ) );\n\t\tserviceReq.setTierBased( new Boolean( service.isTierBased() ) );\n\t\tserviceReq.setGroupCode( service.getGroupCode() );\n\t\tserviceReq.setGroupDescription( service.getGroupDescription() );\n\t\tserviceReq.setMonday( new Boolean( service.isMonday() ) );\n\t\tserviceReq.setTuesday( new Boolean( service.isTuesday() ) );\n\t\tserviceReq.setWednesday( new Boolean( service.isWednesday() ) );\n\t\tserviceReq.setThursday( new Boolean( service.isThursday() ) );\n\t\tserviceReq.setFriday( new Boolean( service.isFriday() ) );\n\t\tserviceReq.setSaturday( new Boolean( service.isSaturday() ) );\n\t\tserviceReq.setSunday( new Boolean( service.isSunday() ) );\n\t\tserviceReq.setAdultQty( new Byte( service.getAdultQty() ) );\n\t\tserviceReq.setChild1Qty( new Byte( service.getChild1Qty() ) );\n\t\tserviceReq.setChild2Qty( new Byte( service.getChild2Qty() ) );\n\t\tserviceReq.setChild3Qty( new Byte( service.getChild3Qty() ) );\n\t\tserviceReq.setTravelAgentFee( new Double( service.getTravelAgentFee() ) );\n\t\tserviceReq.setFlightMaterialCode( service.getFlightMaterialCode() );\n\t\tserviceReq.setHotelMaterialCode( service.getHotelMaterialCode() );\n\t\tserviceReq.setParentItemRph(service.getParentItemRph() );\n\t\tserviceReq.setGuestAllocation( service.getGuestAllocation() );\n\t\tserviceReq.setTotalPrice( new Double( service.getTotalPrice() ) );\n\t\tserviceReq.setPosnr( service.getPosnr() );\n\t\tserviceReq.setOldPosnr( service.getOldPosnr() );\n\t\tif( service.getSelectedDate() != null ){\n\t\t\tserviceReq.setSelectedDate( this.getDate( service.getSelectedDate() ) );\n\t\t}\n\t\tif( service.getDepatureDate() != null ){\n\t\t\tserviceReq.setDepatureDate( this.getDate( service.getDepatureDate() ) );\n\t\t}\n\t\tif( service.getReturnDate() != null ){\n\t\t\tserviceReq.setReturnDate( this.getDate( service.getReturnDate() ));\n\t\t}\n\t\tif( (service.getAvailableDates() != null) && (service.getAvailableDates().size() > 0) ){\n\t\t\tfor(int i=0; i < service.getAvailableDates().size();i++){\n\t\t\t\tserviceReq.getAvailableDates().add( this.getDate( service.getAvailableDates().get(i) ) );\n\t\t\t}\n\t\t}\n\t\tif( (service.getServiceDescription() != null) && (service.getServiceDescription().size() > 0) ){\n\t\t\tfor(int i=0; i < service.getServiceDescription().size();i++){\n\t\t\t\tserviceReq.getServiceDescription().add( service.getServiceDescription().get(i) );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn serviceReq;\n\t}", "private UpdateMonitoringScheduleResponse updateResource(\n final UpdateMonitoringScheduleRequest awsRequest,\n final ProxyClient<SageMakerClient> proxyClient) {\n try {\n return proxyClient.injectCredentialsAndInvokeV2(awsRequest, proxyClient.client()::updateMonitoringSchedule);\n } catch (final ResourceNotFoundException e) {\n throw new CfnNotFoundException(ResourceModel.TYPE_NAME, awsRequest.monitoringScheduleName(), e);\n } catch (final AwsServiceException e) {\n throw new CfnGeneralServiceException(OPERATION, e);\n }\n }", "public void executeUpdate(String request) {\n try {\r\n st.executeUpdate(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void requestUpdate(){\n shouldUpdate = true;\n }", "private void mergeRequest(net.iGap.proto.ProtoRequest.Request value) {\n if (request_ != null &&\n request_ != net.iGap.proto.ProtoRequest.Request.getDefaultInstance()) {\n request_ =\n net.iGap.proto.ProtoRequest.Request.newBuilder(request_).mergeFrom(value).buildPartial();\n } else {\n request_ = value;\n }\n \n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> update(\n yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.UpdateClusterRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getUpdateMethod(), getCallOptions()), request);\n }", "default void updateContext(\n com.google.cloud.aiplatform.v1.UpdateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateContextMethod(), responseObserver);\n }", "void filterUpdate(ServerContext context, UpdateRequest request,\n ResultHandler<Resource> handler, RequestHandler next);", "public yandex.cloud.api.operation.OperationOuterClass.Operation update(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.UpdateClusterRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getUpdateMethod(), getCallOptions(), request);\n }", "WebClientServiceRequest serviceRequest();", "@PUT\n @Path(\"/update\")\n public void put() {\n System.out.println(\"PUT invoked\");\n }", "public RequestDataBuilder put() {\n\t\tRequest request = new Request(urlPattern, RequestMethod.PUT);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}", "private void updateFromProvider() {\n if(isUpdating.get()){\n isHaveUpdateRequest.set(true);\n return;\n }\n mUpdateExecutorService.execute(new UpdateThread());\n }", "@RequestMapping(method=RequestMethod.PUT,\n\t\t\t\t\tconsumes=MediaType.APPLICATION_JSON_VALUE,\n\t\t\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<PetSrvReq> updatePetSrvReq(@Valid @RequestBody PetSrvReq p) {\n\t\t\n\t\tpsService.update(p);\n\t\t\n//\t\tif (p == null) {\n\t\t\t\n//\t\t\tSystem.out.println(\"In PetSrvReqController:updatePetSrvReq() -> conflict updating => .NOT_MODIFIED\");\n//\t\t\treturn new ResponseEntity<PetSrvReq>(p, HttpStatus.NOT_MODIFIED);\n\t\t\t\n//\t\t} else {\n\t\t\t\n\t\t\tSystem.out.println(\"In PetSrvReqController:updatePetSrvReq() -> data was updated\");\n\t\t\tSystem.out.println(p.toString());\n\t\t\treturn new ResponseEntity<PetSrvReq>(p, HttpStatus.OK);\n\t\t\t\n//\t\t}\n\t\t\n\t}", "@Deprecated\n public void processRequest(Request request) throws OperationException;", "public void addRequest(CustomerRequest request) {\n\n\t}", "public MRequestUpdate( Properties ctx,ResultSet rs,String trxName ) {\n super( ctx,rs,trxName );\n }", "public int updatePayment2(int requestId, int amount);", "interface Update\n extends UpdateStages.WithTags,\n UpdateStages.WithCancelRequested,\n UpdateStages.WithState,\n UpdateStages.WithReturnAddress,\n UpdateStages.WithReturnShipping,\n UpdateStages.WithDeliveryPackage,\n UpdateStages.WithLogLevel,\n UpdateStages.WithBackupDriveManifest,\n UpdateStages.WithDriveList {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n JobResponse apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n JobResponse apply(Context context);\n }", "@Override\n public final void doPut() {\n try {\n checkPermissions(getRequest());\n if (id == null) {\n throw new APIMissingIdException(getRequestURL());\n }\n\n final String inputStream = getInputStream();\n if (inputStream.length() == 0) {\n api.runUpdate(id, new HashMap<String, String>());\n return;\n }\n\n Item.setApplyValidatorMandatoryByDefault(false);\n final IItem item = getJSonStreamAsItem();\n api.runUpdate(id, getAttributesWithDeploysAsJsonString(item));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "public interface IMailboxUsageMailboxCountsRequest extends IHttpRequest {\n\n /**\n * Gets the MailboxUsageMailboxCounts from the service\n *\n * @param callback the callback to be called after success or failure\n */\n void get(final ICallback<? super MailboxUsageMailboxCounts> callback);\n\n /**\n * Gets the MailboxUsageMailboxCounts from the service\n *\n * @return the MailboxUsageMailboxCounts from the request\n * @throws ClientException this exception occurs if the request was unable to complete for any reason\n */\n MailboxUsageMailboxCounts get() throws ClientException;\n\n /**\n * Delete this item from the service\n *\n * @param callback the callback when the deletion action has completed\n */\n void delete(final ICallback<? super MailboxUsageMailboxCounts> callback);\n\n /**\n * Delete this item from the service\n *\n * @throws ClientException if there was an exception during the delete operation\n */\n void delete() throws ClientException;\n\n /**\n * Patches this MailboxUsageMailboxCounts with a source\n *\n * @param sourceMailboxUsageMailboxCounts the source object with updates\n * @param callback the callback to be called after success or failure\n */\n void patch(final MailboxUsageMailboxCounts sourceMailboxUsageMailboxCounts, final ICallback<? super MailboxUsageMailboxCounts> callback);\n\n /**\n * Patches this MailboxUsageMailboxCounts with a source\n *\n * @param sourceMailboxUsageMailboxCounts the source object with updates\n * @return the updated MailboxUsageMailboxCounts\n * @throws ClientException this exception occurs if the request was unable to complete for any reason\n */\n MailboxUsageMailboxCounts patch(final MailboxUsageMailboxCounts sourceMailboxUsageMailboxCounts) throws ClientException;\n\n /**\n * Posts a MailboxUsageMailboxCounts with a new object\n *\n * @param newMailboxUsageMailboxCounts the new object to create\n * @param callback the callback to be called after success or failure\n */\n void post(final MailboxUsageMailboxCounts newMailboxUsageMailboxCounts, final ICallback<? super MailboxUsageMailboxCounts> callback);\n\n /**\n * Posts a MailboxUsageMailboxCounts with a new object\n *\n * @param newMailboxUsageMailboxCounts the new object to create\n * @return the created MailboxUsageMailboxCounts\n * @throws ClientException this exception occurs if the request was unable to complete for any reason\n */\n MailboxUsageMailboxCounts post(final MailboxUsageMailboxCounts newMailboxUsageMailboxCounts) throws ClientException;\n\n /**\n * Posts a MailboxUsageMailboxCounts with a new object\n *\n * @param newMailboxUsageMailboxCounts the object to create/update\n * @param callback the callback to be called after success or failure\n */\n void put(final MailboxUsageMailboxCounts newMailboxUsageMailboxCounts, final ICallback<? super MailboxUsageMailboxCounts> callback);\n\n /**\n * Posts a MailboxUsageMailboxCounts with a new object\n *\n * @param newMailboxUsageMailboxCounts the object to create/update\n * @return the created MailboxUsageMailboxCounts\n * @throws ClientException this exception occurs if the request was unable to complete for any reason\n */\n MailboxUsageMailboxCounts put(final MailboxUsageMailboxCounts newMailboxUsageMailboxCounts) throws ClientException;\n\n /**\n * Sets the select clause for the request\n *\n * @param value the select clause\n * @return the updated request\n */\n IMailboxUsageMailboxCountsRequest select(final String value);\n\n /**\n * Sets the expand clause for the request\n *\n * @param value the expand clause\n * @return the updated request\n */\n IMailboxUsageMailboxCountsRequest expand(final String value);\n\n}", "@RequestMapping(value = \"/v1/updateRequestedItemState\", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<?> updateRequestedItemState(\n\t\t\t@RequestBody List<Request> requests,\n\t\t\t@RequestHeader(\"x-location-name\") String locationName)\n\t\t\tthrows SystemException {\n\n\t\tErrorMessage errMsg = new ErrorMessage();\n\t\tLOGGER.info(\"Entered the RequestController - updateApproveRequest()\");\n\t\ttry {\n\t\t\t// validate Location\n\t\t\tif (!validationUtils.isValidateLocation(locationName, errMsg)) {\n\t\t\t\tthrow new SystemException(errMsg.getErrCode(),\n\t\t\t\t\t\terrMsg.getErrMsg(), HttpStatus.BAD_REQUEST);\n\t\t\t}\n\n\t\t\t// validate update item request\n\t\t\t/*\n\t\t\t * if (!validationUtils.validateRequestDeliveredState(requests,\n\t\t\t * locationName, errMsg)) { throw new\n\t\t\t * SystemException(errMsg.getErrCode(), errMsg.getErrMsg(),\n\t\t\t * HttpStatus.BAD_REQUEST); }\n\t\t\t */\n\n\t\t\trequestService.updateRequestedItemState(requests, locationName);\n\n\t\t} catch (SystemException e) {\n\t\t\tLOGGER.error(\"Error occured while updating request state: \", e);\n\t\t\treturn new ResponseEntity<ErrorMessage>(new ErrorMessage(\n\t\t\t\t\te.getErrorCode(), e.getErrorMessage()), e.getHttpStatus());\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"Error occured while updating request state: \", e);\n\t\t\treturn new ResponseEntity<ErrorMessage>(new ErrorMessage(\n\t\t\t\t\tConstants.FIVE_THOUSAND_SEVEN,\n\t\t\t\t\tConstants.INTERNAL_SERVER_ERROR),\n\t\t\t\t\tHttpStatus.INTERNAL_SERVER_ERROR);\n\n\t\t}\n\t\treturn new ResponseEntity<>(HttpStatus.ACCEPTED);\n\t}", "public void update(yandex.cloud.api.logging.v1.SinkServiceOuterClass.UpdateSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getUpdateMethod(), getCallOptions()), request, responseObserver);\n }", "public void createServiceRequest() {\n getMainActivity().startService(new Intent(getMainActivity(), RequestService.class));\n }", "public void update()\n {\n this.controller.updateAll();\n theLogger.info(\"Update request recieved from UI\");\n }", "public void callUpdateLocation( AppCompatActivity activity, final Context context, String collName, int recordId, LatLng newLocation ){\r\n\r\n ServiceRequest serviceRequest = new ServiceRequest( ServiceRequest.CORE_SEVICE_NAME, \"updateLocation\", context );\r\n serviceRequest.putParameterValue( \"database_name\", \"update_location\" );\r\n serviceRequest.putParameterValue( \"dataset_name\", \"gis\" );\r\n serviceRequest.putParameterValue( \"collection_name\", collName );\r\n serviceRequest.putParameterValue( \"record_id\", String.valueOf( recordId ) );\r\n serviceRequest.putParameterValue( \"location_x\", String.valueOf( newLocation.longitude ) );\r\n serviceRequest.putParameterValue( \"location_y\", String.valueOf( newLocation.latitude ) );\r\n serviceRequest.putParameterValue( \"username\", LoginAuthentificationHandlerContext.getInstance().getUsername( ) );\r\n serviceRequest.putParameterValue( \"password\", LoginAuthentificationHandlerContext.getInstance( ).getPassword( ) );\r\n L.m( serviceRequest.getServiceRequest( ) );\r\n\r\n SmallWorldServiceTask task = new SmallWorldServiceTask(\r\n serviceRequest.getServiceRequest( ),\r\n activity,\r\n \"Updating new location...\",\r\n new SetOnTaskCompleteListener< List< HashMap< String, String > > >( ){\r\n @Override\r\n public void onTaskComplete( List< HashMap< String, String > > result ) {\r\n HashMap< String, String > response = result.get( 0 );\r\n if( response.containsKey( \"login_response\" )){\r\n L.t( context, response.get( \"login_response\" ) );\r\n }else if( response.containsKey( \"result_update\" ) ){\r\n String updated = response.get( \"result_update\" );\r\n if( updated != null ){\r\n if( updated.equals( \"true\" )){\r\n MapEngine.refreshMap( MobileGatewayMapActivity.masterActivity.getMap( ), MobileGatewayMapActivity.masterActivity.getMap( ).getCameraPosition( ), context );\r\n L.t( context, \"Updated location complete\" );\r\n }else{\r\n L.t( context, \"Updated location failed!!!! \" + updated );\r\n }\r\n }\r\n }\r\n\r\n }\r\n } );\r\n task.execute( );\r\n }", "ResponseEntity<Price> updatePrice(String cartId);", "public void setRequest(final String request) {\n this.request = request;\n }", "public Ordercl askUpdate (Ordercl toUpdate){\n Double value = askDouble(\"Set a new order value: \");\n System.out.println(\"Set a new order status: \");\n String status = in.nextLine();\n Integer client_id = askInt(\"Set a new order receiver (client_id) \");\n \n toUpdate.setOrd_value(value);\n toUpdate.setStatus(status);\n toUpdate.setClient(client_id);\n \n return toUpdate;\n }", "public nl.tudelft.ewi.st.atlantis.tudelft.v1.services.SetServiceLocationResponse setServiceLocation\n (\n nl.tudelft.ewi.st.atlantis.tudelft.v1.services.SetServiceLocationRequest setServiceLocationRequest\n )\n ;", "public synchronized boolean add (PdvApiRequestParams requestParams){\n boolean addRequest = false;\n String instId = null;\n if (requestParams.updateParams!=null) {\n List<String> instIds = requestParams.updateParams.instIds;\n if (instIds!= null) {\n instId = instIds.get(0);\n PdvApiRequestParams p = getPendingRequestForInstitution(instId);\n if (p==null) {\n synchronized (this) {\n requestParams.pdvApiStatus = PdvApiStatus.PDV_API_STATUS_NOTSTARTED;\n queue.add(requestParams);\n addRequest=true;\n }\n }\n }\n }\n if (addRequest){\n //clear old requests that are completed\n removeCompletedRequestForInstitution(instId);\n }\n\n return addRequest;\n }", "@Override\n protected void executeUpdate(final String requestId, DSRequest request, final DSResponse response)\n {\n JavaScriptObject data = request.getData();\n final ListGridRecord rec = new ListGridRecord(data);\n ContactDTO testRec = new ContactDTO();\n copyValues(rec, testRec);\n service.update(testRec, new AsyncCallback<Void>()\n {\n @Override\n public void onFailure(Throwable caught)\n {\n response.setStatus(RPCResponse.STATUS_FAILURE);\n processResponse(requestId, response);\n SC.say(\"Contact Edit Save\", \"Contact edits have NOT been saved!\");\n }\n\n @Override\n public void onSuccess(Void result)\n {\n ListGridRecord[] list = new ListGridRecord[1];\n // We do not receive removed record from server.\n // Return record from request.\n list[0] = rec;\n response.setData(list);\n processResponse(requestId, response);\n SC.say(\"Contact Edit Save\", \"Contact edits have been saved!\");\n }\n });\n }", "protected void editField(HttpServletRequest request, HttpServletResponse response, CleanerServiceItem _CleanerServiceItem) throws Exception{\n\r\n if (!isMissing(request.getParameter(\"serviceId\"))) {\r\n m_logger.debug(\"updating param serviceId from \" +_CleanerServiceItem.getServiceId() + \"->\" + request.getParameter(\"serviceId\"));\r\n _CleanerServiceItem.setServiceId(WebParamUtil.getLongValue(request.getParameter(\"serviceId\")));\r\n\r\n }\r\n if (!isMissing(request.getParameter(\"serviceItemId\"))) {\r\n m_logger.debug(\"updating param serviceItemId from \" +_CleanerServiceItem.getServiceItemId() + \"->\" + request.getParameter(\"serviceItemId\"));\r\n _CleanerServiceItem.setServiceItemId(WebParamUtil.getLongValue(request.getParameter(\"serviceItemId\")));\r\n\r\n }\r\n if (!isMissing(request.getParameter(\"itemType\"))) {\r\n m_logger.debug(\"updating param itemType from \" +_CleanerServiceItem.getItemType() + \"->\" + request.getParameter(\"itemType\"));\r\n _CleanerServiceItem.setItemType(WebParamUtil.getIntegerValue(request.getParameter(\"itemType\")));\r\n\r\n }\r\n if (!isMissing(request.getParameter(\"title\"))) {\r\n m_logger.debug(\"updating param title from \" +_CleanerServiceItem.getTitle() + \"->\" + request.getParameter(\"title\"));\r\n _CleanerServiceItem.setTitle(WebParamUtil.getStringValue(request.getParameter(\"title\")));\r\n\r\n }\r\n if (!isMissing(request.getParameter(\"imagePath\"))) {\r\n m_logger.debug(\"updating param imagePath from \" +_CleanerServiceItem.getImagePath() + \"->\" + request.getParameter(\"imagePath\"));\r\n _CleanerServiceItem.setImagePath(WebParamUtil.getStringValue(request.getParameter(\"imagePath\")));\r\n\r\n }\r\n if (!isMissing(request.getParameter(\"imagePathLocal\"))) {\r\n m_logger.debug(\"updating param imagePathLocal from \" +_CleanerServiceItem.getImagePathLocal() + \"->\" + request.getParameter(\"imagePathLocal\"));\r\n _CleanerServiceItem.setImagePathLocal(WebParamUtil.getStringValue(request.getParameter(\"imagePathLocal\")));\r\n\r\n }\r\n if (!isMissing(request.getParameter(\"basePrice\"))) {\r\n m_logger.debug(\"updating param basePrice from \" +_CleanerServiceItem.getBasePrice() + \"->\" + request.getParameter(\"basePrice\"));\r\n _CleanerServiceItem.setBasePrice(WebParamUtil.getDoubleValue(request.getParameter(\"basePrice\")));\r\n\r\n }\r\n if (!isMissing(request.getParameter(\"note\"))) {\r\n m_logger.debug(\"updating param note from \" +_CleanerServiceItem.getNote() + \"->\" + request.getParameter(\"note\"));\r\n _CleanerServiceItem.setNote(WebParamUtil.getStringValue(request.getParameter(\"note\")));\r\n\r\n }\r\n\r\n m_actionExtent.beforeUpdate(request, response, _CleanerServiceItem);\r\n m_ds.update(_CleanerServiceItem);\r\n m_actionExtent.afterUpdate(request, response, _CleanerServiceItem);\r\n }", "private static Person updatePerson(Request req) {\n int id = Integer.parseInt(req.params(\"id\"));\n Person personRequested = gson.fromJson(req.body(), Person.class);\n \n // get the data from personRequested keeping the id\n Person personFound = findPersonById(id);\n int index = persons.lastIndexOf(personFound);\n\n personFound = personRequested;\n personFound.setId(id);\n\n persons.set(index, personRequested);\n\n System.out.println(personRequested);\n return personRequested;\n }", "Request(Request otherRequest) {\n this.reqNum = otherRequest.reqNum;\n this.reqText = otherRequest.reqText;\n this.reqExampleDocs = new ArrayList<ExampleDocument>(otherRequest.reqExampleDocs);\n }", "@Override\n\tpublic void service(ServletRequest arg0, ServletResponse arg1)\n\t\t\tthrows ServletException, IOException\n\t{\n\t\tsuper.service(arg0, arg1);\n\t\trenewObject(arg0, arg1);\n\t\tout.print(\"do my service\");\n\t}", "public Client update(Client updated) throws EntityNotFoundException;", "private Response updateServiceInstances(Modify3gppService request, Action action, String version, String requestId,\n HashMap<String, String> instanceIdMap, String requestUri) throws ApiException {\n String defaultServiceModelName = \"COMMON_SS_DEFAULT\";\n String requestScope = ModelType.service.name();\n String apiVersion = version.substring(1);\n String serviceRequestJson = toString.apply(request);\n if (serviceRequestJson != null) {\n InfraActiveRequests currentActiveReq = createRequestObject(request, action, requestId, Status.IN_PROGRESS,\n requestScope, serviceRequestJson);\n String instanceName = request.getName();\n requestHandlerUtils.checkForDuplicateRequests(action, instanceIdMap, requestScope, currentActiveReq,\n instanceName);\n try {\n requestsDbClient.save(currentActiveReq);\n } catch (Exception e) {\n logger.error(\"Exception occurred\", e);\n ErrorLoggerInfo errorLoggerInfo =\n new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.DataError)\n .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();\n throw new RequestDbFailureException.Builder(SAVE_TO_DB, e.toString(),\n HttpStatus.SC_INTERNAL_SERVER_ERROR, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).cause(e)\n .errorInfo(errorLoggerInfo).build();\n }\n\n RecipeLookupResult recipeLookupResult;\n try {\n recipeLookupResult = getServiceInstanceOrchestrationURI(null, action, defaultServiceModelName);\n } catch (Exception e) {\n logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_DB_ACCESS_EXC.toString(), MSO_PROP_APIHANDLER_INFRA,\n ErrorCode.AvailabilityError.getValue(), \"Exception while communciate with Catalog DB\", e);\n Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,\n MsoException.ServiceException, \"No communication to catalog DB \" + e.getMessage(),\n ErrorNumbers.SVC_NO_SERVER_RESOURCES, null, version);\n logger.debug(END_OF_THE_TRANSACTION + response.getEntity());\n return response;\n }\n\n if (recipeLookupResult == null) {\n logger.error(LoggingAnchor.FOUR, MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND.toString(),\n MSO_PROP_APIHANDLER_INFRA, ErrorCode.DataError.getValue(), \"No recipe found in DB\");\n Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,\n MsoException.ServiceException, \"Recipe does not exist in catalog DB\",\n ErrorNumbers.SVC_GENERAL_SERVICE_ERROR, null, version);\n logger.debug(END_OF_THE_TRANSACTION + response.getEntity());\n return response;\n }\n\n String serviceInstanceType = request.getSubscriptionServiceType();\n String serviceInstanceId = request.getServiceInstanceID();\n RequestClientParameter parameter;\n try {\n parameter = new RequestClientParameter.Builder().setRequestId(requestId).setBaseVfModule(false)\n .setRecipeTimeout(recipeLookupResult.getRecipeTimeout()).setRequestAction(action.name())\n .setServiceInstanceId(serviceInstanceId).setServiceType(serviceInstanceType)\n .setRequestDetails(serviceRequestJson).setApiVersion(version).setALaCarte(false)\n .setRecipeParamXsd(recipeLookupResult.getRecipeParamXsd()).setApiVersion(apiVersion).build();\n } catch (Exception e) {\n logger.error(\"Exception occurred\", e);\n ErrorLoggerInfo errorLoggerInfo =\n new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_RESPONSE_ERROR, ErrorCode.SchemaError)\n .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();\n throw new ValidateException.Builder(\"Unable to generate RequestClientParamter object\" + e.getMessage(),\n HttpStatus.SC_INTERNAL_SERVER_ERROR, ErrorNumbers.SVC_BAD_PARAMETER).errorInfo(errorLoggerInfo)\n .build();\n }\n return postBPELRequest(currentActiveReq, parameter, recipeLookupResult.getOrchestrationURI(), requestScope);\n\n } else {\n Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_INTERNAL_SERVER_ERROR,\n MsoException.ServiceException, \"JsonProcessingException occurred - serviceRequestJson is null\",\n ErrorNumbers.SVC_BAD_PARAMETER, null, version);\n return response;\n }\n }", "TaskResponse updateTask(TaskRequest taskRequest, Long taskId);", "public static void updatePhoneRequest(final Context context, final String businessId, final String phone) {\n final RequestQueue httpRequestQueue = Volley.newRequestQueue(context);\n final StringRequest httpRequest = new StringRequest(Request.Method.POST, (MainActivity.serverURL + \"update/update_phone.php\"),\n //success, the request responded successfully!\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n httpRequestQueue.stop();\n }\n },\n //error, the request responded with a failure...\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(context, \"An error occurred with your internet...\", Toast.LENGTH_LONG).show();\n error.printStackTrace();\n httpRequestQueue.stop();\n }\n }\n ) {\n //POST variables to send to the request\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"businessId\", businessId);\n params.put(\"phone\", phone);\n return params;\n }\n //header values to send to the request\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }\n };\n httpRequestQueue.add(httpRequest);\n }" ]
[ "0.7125704", "0.70330167", "0.6793514", "0.66708994", "0.651022", "0.64355516", "0.64192265", "0.62919605", "0.62701213", "0.62290084", "0.61881757", "0.6184", "0.61735606", "0.61629903", "0.6162341", "0.6159509", "0.61266273", "0.6084661", "0.6040485", "0.6013757", "0.5973223", "0.5961526", "0.59510475", "0.59188366", "0.5868191", "0.58436614", "0.58259994", "0.58090824", "0.5803591", "0.5771316", "0.5717689", "0.5714203", "0.5701434", "0.56949025", "0.5673002", "0.5659155", "0.565109", "0.56446415", "0.56212497", "0.56145614", "0.56000966", "0.55826235", "0.5577752", "0.55612266", "0.55583715", "0.55540186", "0.555303", "0.5521587", "0.55140245", "0.54874384", "0.5482903", "0.54757375", "0.54685175", "0.54556865", "0.5453062", "0.5450682", "0.54475284", "0.5447266", "0.544153", "0.543815", "0.54248595", "0.54236704", "0.5420435", "0.5403176", "0.53894144", "0.5383047", "0.5368033", "0.5358122", "0.534939", "0.53453034", "0.5338507", "0.53378356", "0.533699", "0.53353745", "0.53346443", "0.53274864", "0.53270996", "0.5299965", "0.5297971", "0.52852637", "0.5278083", "0.5274764", "0.52611625", "0.5259611", "0.5255199", "0.52537477", "0.5243399", "0.5234755", "0.52327645", "0.52308923", "0.52265376", "0.5223237", "0.52165776", "0.52160126", "0.52149665", "0.52105045", "0.520336", "0.5201527", "0.5195497", "0.51924455" ]
0.7260207
0
/ == teste ==
@Override public String toString() { return String.format("Company [code=%s, name=%s]", code, name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testEqualityCheck() {\n\t\tadd(\"f(x)=x^3\");\n\t\tadd(\"g(x)=-x^3\");\n\t\tt(\"f==g\", \"false\");\n\t\tt(\"f!=g\", \"true\");\n\t\tt(\"f==-g\", \"true\");\n\t\tt(\"f!=-g\", \"false\");\n\t}", "private static boolean equalityTest1(String a, String b)\n {\n return a == b;\n }", "public static void main(String[] args) {\n\t\tString test=\"hello\";\r\n\t\tString test1=new String(\"hello\");\r\n\t\t\r\n\t\tboolean t=test==test1;\r\n\t\tSystem.out.println(t);\r\n\t\t\r\n\t\tboolean t1 =test.equals(test1);\r\n\t\t\r\n\t\tSystem.out.println(t1);\r\n\t}", "@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\n }", "private static boolean equalityTest2(String a, String b)\n {\n return a.equals(b);\n }", "@Test\n public void equalsTest() {\n boolean expected = false;\n\n assertEquals(\"The equals test for comparing e1 and e2 is expected to be false\",\n expected, e1.equals(e2));\n\n }", "private void assertEquals(String t, String string) {\n\t\t\n\t}", "private void assertEquals(String string) {\n\t\t\n\t}", "@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "@Test\n \tpublic void testEqual() {\n \t\tAssert.assertTrue(f1.equals(f1));\n \t}", "String getEqual();", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n public void testEquals_1() {\n LOGGER.info(\"testEquals_1\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hello\");\n final boolean actual = atomString.equals(atom);\n assertTrue(actual);\n }", "@Test\n public void testEquals() {\n }", "@Override\r\n\t\t\tpublic boolean test(String t, String u) {\n\t\t\t\t return t.equalsIgnoreCase(u);\r\n\t\t\t}", "public void testEquals()\r\n throws Exception\r\n {\r\n setUp();\r\n Student colleen = new Student(\"12345678\", \"collEEN\", \"SCHMIDt\");\r\n assertTrue(colleen.equals(s1));\r\n\r\n assertTrue(s1.equals(s4));\r\n assertFalse(s1.equals(s2));\r\n assertFalse(s1.equals(s3));\r\n assertTrue(s1.equals(s1));\r\n\r\n String allison = \"\";\r\n assertFalse(allison.equals(colleen));\r\n\r\n assertFalse(colleen.equals(num));\r\n }", "@Override\n\tpublic void visit(EqualityNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam fiul stang si fiul drept\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tString s2 = null;\n\t\tString s1 = null;\n\t\t/**\n\t\t * preluam rezultatele evaluarii celor doi fii\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Evaluator.variables.get(node.getChild(0).getName());\n\t\t} else {\n\t\t\ts1 = node.getChild(0).getName();\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Evaluator.variables.get(node.getChild(1).getName());\n\t\t} else {\n\t\t\ts2 = node.getChild(1).getName();\n\t\t}\n\n\t\t/**\n\t\t * verificam daca cei doi fii s- au evaluat la aceeasi expresie\n\t\t */\n\t\tif (s1.contentEquals(s2)) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\n\t}", "private boolean equals() {\r\n return MARK(EQUALS) && CHAR('=') && gap();\r\n }", "@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}", "public boolean test(String a, String b)\n\t{\n\t\treturn false;\n\t}", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "@Test\r\n public void testEqualChars(){\r\n boolean res1=offByOne.equalChars('c','b');\r\n assertTrue(\"should be true\",res1);\r\n boolean res2=offByOne.equalChars('a','c');\r\n assertFalse(\"should be false\",res2);\r\n }", "@Test\n\tpublic void test_equals1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.equals(t2));\n }", "@Test\n\tpublic void ifYouEncounterEqualsThenThatsNotAPattern() {\n\t\tfinal Tokenizable line = line(\"=\");\n\t\tcontext.checking(new Expectations() {{\n\t\t}});\n\t\tTDAPatternParser parser = new TDAPatternParser(errors, vnamer, builder, topLevel);\n\t\tTDAParsing nested = parser.tryParsing(line);\n\t\tassertNull(nested);\n\t\tassertEquals(0, line.at());\n\t}", "@Test\n public void test1() {\n String one = \"giao\";\n String two = \"giao\";\n assertEquals(one, two);\n }", "@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}", "private void asserEquals(int esperado, int resultado) {\n\t\t\r\n\t}", "@Test\r\n public void testEqualscoupon() {\r\n log.info(\"starting testEqualscoupon()\");\r\n\tassertFalse (\"coupon1 NOT equal coupon2\", coupon1.equals(coupon2));\r\n\tlog.info (\"testNOTEqualscoupon PASSED\");\t\t\r\n }", "private void assertTrue(boolean equals) {\n\t\t\r\n\t}", "public static void equalsDemo() {\n\n//\t\tSystem.out.printf(\"demo1 == demo2 = %s%n\", demo1 == demo2);\n//\t\tSystem.out.printf(\"demo2 == demo3 = %s%n\", demo2 == demo3);\n//\t\tSystem.out.printf(\"demo2.equals(demo3) = %s%n\", demo2.equals(demo3));\n//\t\tSystem.out.printf(\"%n\");\n\t}", "@Test\n\tvoid testeEquals() \n\t{\n\t\tContato outro = new Contato(\"Matheus\", \"Gaudencio\", \"1234\");\n\t\tassertTrue(outro.equals(contatoBasico));\n\t}", "@Test\n\tpublic void test_equals1() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(11,\"Joe Tsonga\");\n\tassertTrue(c1.equals(c2));\n }", "@Test\n\tpublic void method_4() \n\t{\n\t\tString place = \"Banga\";\n\t\tAssert.assertEquals(\"Bangalore\", place);\n\t}", "@Test\n\tpublic void test_equals2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertFalse(t1.equals(t2));\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void cmainTest() {\n\t\t\n\t\tSystem.out.println(\"This is main Test 1\");\n\t\t\t//most of the time we compare string value\n\t\tAssert.assertEquals(\"Test\", \"Test\");\n\t\t\n\t}", "private void assertEquals(String string, String title) {\n\t\r\n}", "public static void main(String[] args) {\n\t\tString s2 = \"Gowda\";\n\t\tString s3 = \"Gowda\";\n//\t\t\n//\t\tSystem.out.println(s.equals(s2));\n\t\t\n\t\tSystem.out.println(s2.equals(s3));\n\t\t\n\t\tSystem.out.println(s2 == s3); //\n\t\t\n\t}", "public static void main(String[] args) {\nString s1= \"adya\";\nString s2= \"adyass\"+\"a\";\nString s3= \"adyassa\";\nSystem.out.println(s3==s2);\n\t}", "public static void main(String[] args) \n\t{\n\t\tExample e1 = Example.getExample();\n\t\tExample e2 = Example.getExample();\n\n\t\t//System.out.println(e1 = e2); // o/p:--- Example@15db9742\n\t//\tSystem.out.println(e1 = = e2);\t// CE: illegal start of expression\n\n\t\tSystem.out.println(e1 == e2);\t//o/p :--- true\n\n\t\n\t}", "public static void testComparing() {\n System.out.println(\"\\nTEST ASSIGNING\");\n System.out.println(\"==============\");\n int i = 20;\n int j = 20;\n\n if(i == j) {\n System.out.println(\"i and j are equal\");\n }\n\n String JPY = new String(\"JPY\");\n String YEN = new String(\"JPY\");\n\n if(JPY == YEN) {\n System.out.println(\"JPY and YEN are same\"); //This line is not printed\n }\n\n if(JPY.equals(YEN)) {\n //you should always use equals() method to compare reference types.\n System.out.println(\"JPY and YEN are equal by equals()\");\n }\n }", "@TestProperties(name=\"test equal sign parameters for test\")\n\tpublic void testParametersWithEquals() throws Exception {\n\t\tjsystem.launch();\n//\t\tScenarioUtils.createAndCleanScenario(jsystem, ScenariosManager.getInstance().getCurrentScenario().getScenarioName());\n\t\tScenarioUtils.createAndCleanScenario(jsystem, jsystem.getCurrentScenario());\n\t\tjsystem.addTest(\"testWithInclueParametersNewLine\", \"ParamaetersHandlingSection\", true);\n\t\tjsystem.setTestParameter(1, \"General\", \"Str8\", \"x=2=3=4, v b n eee=,\", false);\n\t\tjsystem.play();\n\t\tjsystem.waitForRunEnd();\n\t\tjsystem.checkNumberOfTestsPass(1);\n\t\tString propValue = \n\t\t\tgetRunProperties().getProperty(\"testWithInclueParametersNewLine_str8\");\n\t\tassertEquals(\"x=2=3=4, v b n eee=,\", propValue);\n\t}", "@Test\r\n\tpublic void testEquality(){\n\t\t assertEquals(object1, object2);\r\n\t}", "@Test\n public void testEquals_3() {\n LOGGER.info(\"testEquals_3\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = null;\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void test() {\n\tassertTrue(true);\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint a=100;\n\t\tint b=200;\n\t\t// a==b ==> checking if a is equal to b\n\t\t// (a==b) ==> is called a relational expression\n\t\tboolean result = (a==b); // false\n\n\t\tSystem.out.println(result); //false\n\t\t\n\t\tSystem.out.println(\"is a and b equal? :\" + (a==b)); //false\n\t\t\n\t\t// not equal to ==> !=\n\t\t\n\t\tboolean result2= (a!=b);\n\t\t\nSystem.out.println(result2);\n\t\t\n\t\tSystem.out.println(\"is a and b equal? :\" + (a!=b));\n\t\t\n\t\t\n\t\t\n\t\t// >=\n\t\t\n\t\t\n\t\t\n\t\t\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}", "private void testEquals() {\n init();\n assertTrue(\"l0.equals(l0)\", l0.equals(l0));\n assertTrue(\"l3.equals(l5)\", l3.equals(l5));\n }", "@Test\n public void test2() {\n String apple = \"didididididi\";\n String corriander = \"didididididi\";\n assertEquals(apple, corriander);\n }", "private static boolean equalityTest5(String a, String b)\n {\n return a.hashCode() == b.hashCode();\n }", "@Override\n\tpublic boolean test() {\n\t\treturn false;\n\t}", "@Test\r\n\tpublic void test2(){\n\t \tE1.setFirstName(\"FN1\");\r\n\t\tE2.setFirstName(\"FN2\");\r\n\t String actual = E1.getFirstName();\r\n String expected = \"FN1\";\r\n assertEquals(actual,expected);\r\n }", "private static boolean equalityTest4(String a, String b)\n {\n if(a.length() == 0 && b.length() == 0)\n {\n return true;\n }\n else\n {\n if(a.length() == 0 || b.length() == 0)\n {\n return false;\n }\n if(a.charAt(0) == b.charAt(0))\n {\n return equalityTest4(a.substring(1), b.substring(1));\n }\n else\n {\n return false;\n }\n }\n }", "boolean test();", "boolean test();", "boolean test();", "@Test //TEST TWO\n void testNetherlandDwarfTrueDwarfGene()\n {\n Rabbit_RegEx rabbit_gene = new Rabbit_RegEx();\n rabbit_gene.setTrueDwarfGene(true);\n rabbit_gene.setBreedName(\"Netherland Dwarf\");\n boolean expected = true;\n assertEquals(expected, rabbit_gene.getTrueDwarfGene());\n }", "@Test\n public void matchCorrect() {\n }", "private static boolean checkEqualsToOperations(String expression, Lexemes lexemes, SymbolTable table) {\n\t\tif (expression.contains(\"==\")) {\n\n\t\t\tString[] arr = expression.split(\"==\");\n\t\t\tint finalIndex = arr.length - 1;\n\n\t\t\tfor (int i = 0; i <= finalIndex; i++) {\n\t\t\t\tString s = arr[i];\n\n\t\t\t\t// check if the current word is a variable\n\t\t\t\tif (table.contains(s)) {\n\t\t\t\t\tint id = table.getIdOfVariable(s);\n\t\t\t\t\tlexemes.insertLexeme(\"ID\", ((Integer) id).toString());\n\t\t\t\t} else {\n\n\t\t\t\t\tif (s.equals(\"true\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"true\");\n\t\t\t\t\t} else if (s.equals(\"false\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"false\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!checkRelationalOperations(s.trim(), lexemes, table)) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < finalIndex) {\n\t\t\t\t\tlexemes.insertLexeme(\"RELOP\", \"==\");\n\t\t\t\t} else if (expression.endsWith(\"==\")) {\n\t\t\t\t\tlexemes.insertLexeme(\"RELOP\", \"==\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (!checkRelationalOperations(expression.trim(), lexemes, table)) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\n public void testEquality(){\n int ans = testing1.LessThanTen(testing1.getValue1(), testing1.getValue2());\n assertEquals(10, ans);\n }", "public static void main(String[] args) {\nint a=10;\nint b=55;\nif(b==a) {\n\tSystem.out.println(\"equal\");\n}\nelse {\n\tSystem.out.println(\"not equal\");\n}\nSystem.out.println(1);\nSystem.out.println(2);\nSystem.out.println(3);\n\t}", "public static void main(String[] args) \r\n\t{\n\t\tSystem.out.println('A'==65); //true, char is checked with ASCII value.\r\n\t\tSystem.out.println(5==6); //false\r\n\t\tSystem.out.println(5!=6);\t\t //true\r\n\t\tSystem.out.println(5.0==5); //true\r\n\t\tSystem.out.println(5.0f==5L); //true\r\n\t\t\r\n\t\t//\"==\" check the reference in following case.\r\n\t\tJButton b1 = new JButton();\r\n\t\tJButton b2 = new JButton();\r\n\t\tJButton b3 = b1;\r\n\t\tSystem.out.println(b1==b2); //false\r\n\t\tSystem.out.println(b1==b3); //true\r\n\t\t\r\n\t\t//\"==\" check the reference in following case.\r\n\t\tString s1 = \"hello\";\r\n\t\tString s2 = \"hello\";\r\n\t\tSystem.out.println(s1==s2); //true\r\n\t\t\r\n\t\tString s3 = new String(\"java\");\r\n\t\tString s4 = new String(\"java\");\r\n\t\tSystem.out.println(s3==s4); //false\r\n\t\t\r\n\t\tSystem.out.println(s3.equals(s4)); //equals() checks the values, for same values it gives true.\r\n\t\t\r\n\t\t\r\n\t\t}", "@Test\n public void equalsOtherTest3() {\n assertFalse(device.equals(null));\n }", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "@Test\n public void testEqualChar3() {\n char a = '%';\n char b = '!';\n char c = '\\t';\n char d = '\\n';\n\n boolean result1 = offByOne.equalChars(a, b);\n boolean result2 = offByOne.equalChars(c, d);\n\n assertFalse(result1);\n assertTrue(result2);\n }", "@Test\n \tpublic void testNotEqual() {\n \t\tAssert.assertFalse(f1.equals(f2));\n \t}", "@Test\n public void equal() {\n assertTrue(commandItem.equals(commandItemCopy));\n assertTrue(commandItem.isSameCommand(commandItemCopy));\n //not commanditem return false\n assertFalse(commandItem.equals(commandWord));\n }", "@Test\r\n\tpublic void test3(){\n\t \tE1.setLastName(\"LN1\");\r\n\t\tE2.setLastName(\"LN2\");\r\n\t String actual = E1.getLastName();\r\n String expected = \"LN1\";\r\n assertEquals(actual,expected);\r\n }", "private static boolean equalityTest3(String a, String b)\n {\n return System.identityHashCode(a) == System.identityHashCode(b);\n }", "@Test\n public void test1(){\n assertEquals(true, Program.and(true, true));\n }", "public static void main(String[] args) {\n\t\tString s1=\"abc\";\r\n\t\tString s2=\"edf\";\r\n\t\tboolean b1=true;\r\n\t\tboolean b2=false;\r\n\t\tint t1=10;\r\n\t\tint t2=20;\r\n\t\t//System.out.println(s1>s2);\r\n\t\tSystem.out.println(s1==s2);\r\n\t\t//System.out.println(b1>b2);\r\n\t\tSystem.out.println(b1==b2);\r\n\t\t//System.out.println(t1>b2);\r\n\t\tSystem.out.println(t1==t2);\r\n\t\t\r\n\t}", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public Boolean test(String input);", "@Test\n public void equals_DifferentObjects_Test() {\n Assert.assertFalse(bq1.equals(ONE));\n }", "@Test\n public void testIsRut() {\n System.out.println(\"isRut\");\n String rut = \"19.208.616-7\";\n boolean expResult = false;\n boolean result = Entradas.isRut(rut);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void testGetSessieDuur(){\n\t\tdouble expResult = 1;\n\t\tassertTrue(expResult == instance.getSessieDuur());\n\t}", "private void test() {\n\n\t}", "@Test\n\tpublic void vero_se_e_solo_se_un_prestito_uguale_a_se_stesso() {\n\t\tassertTrue(prestito.equals(prestito),\"Prestito uguale sse uguale a se stesso\");\n\t}", "public static void main (String[] args) {\n\t\tString s = \"Hello\";\r\n\t\tString t = new String(s);\r\n\t\tif(\"Hello\".equals(s)) System.out.println(\"one\");\r\n\t\tif(t== s) System.out.println(\"two\");\r\n\t\tif (t.equals(s))System.out.println(\"three\");\r\n\t\tif(\"Hello\" == s) System.out.println(\"four\");\r\n\t\tif(\"Hello\" == t) System.out.println(\"five\");\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(\"aaa\").insert(1,\"bb\").insert(4, \"ccc\");\r\n\t\tSystem.out.println(sb);\r\n\t\tString s1 =\"java\";\r\n\t\tStringBuilder s2 = new StringBuilder(\"java\");\r\n\t\tif (s1 == s2)\r\n\t\t\tSystem.out.print(\"1\");\r\n\t\tif (s1.contentEquals(s2))\r\n\t\t\tSystem.out.print(\"2\");\r\n\t\t\r\n\t}", "@Test\n public void basicConditionTest() throws Exception {\n\n assertThat(getNode(\"1 == 2\", \"expr\").render(null), is((Object)false));\n assertThat(getNode(\"1 == 1\", \"expr\").render(null), is((Object)true));\n }", "@Override\n protected boolean runInEQ() {\n return true;\n }", "public static void main( String[] args )\n {\n String a = new String(\"as\");\n String b = \"as\";\n System.out.println(a == \"as\");\n System.out.println(b == \"as\");\n\n }", "@Test public void equalTest() {\n Dog d = new Dog(\"Owner 1\", \"Rex\", \"Boxer\", 90.0, 7);\n Dog d2 = new Dog(\"Owner 2\", \"Spot\", \"Pit Bull\", 90.0, 7);\n Assert.assertEquals(0, test.compare(d, d2));\n }", "static boolean test(Type t0)\r\n {\r\n String s0 = Types.stringFor(t0);\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addTypeVariableName(\"E\");\r\n Type t1 = null;\r\n try\r\n {\r\n t1 = typeParser.parse(s0);\r\n } \r\n catch (ClassNotFoundException e)\r\n {\r\n fail(e.getMessage());\r\n }\r\n \r\n String message = \"\";\r\n message += \"Input \" + s0 + \"\\n\";\r\n message += \"should be \" + t0 + \"\\n\";\r\n message += \"was parsed to \" + t1 + \"\\n\";\r\n \r\n boolean passed = TypesEquivalent.areEquivalent(t0, t1);\r\n if (!passed || DEBUG)\r\n {\r\n PrintStream ps = System.out;\r\n if (!passed)\r\n {\r\n ps = System.err;\r\n }\r\n String detailedMessage = \"\";\r\n detailedMessage += \"Input \" + s0 + \"\\n\";\r\n detailedMessage += \"should be \" + t0 + \" \" \r\n + \"(Detailed: \" + Types.debugStringFor(t0) + \")\" + \"\\n\";\r\n detailedMessage += \"was parsed to \" + t1 + \" \" \r\n + \"(Detailed: \" + Types.debugStringFor(t1) + \")\" + \"\\n\";\r\n ps.print(detailedMessage);\r\n }\r\n assertTrue(message, passed);\r\n return passed;\r\n }", "private boolean isTest() {\n \t\treturn false;\n\t\t// return !index.isLeft();\n\t}", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "@Test\n public void test_Contains() {\n System.out.println(\"Testing TracerIsotopes's contains(String checkString)\");\n String checkString = \"\";\n boolean expResult = false;\n boolean result = TracerIsotopes.contains(checkString);\n assertEquals(expResult, result);\n\n checkString=\"fractionMass\";\n result = TracerIsotopes.contains(checkString);\n assertEquals(expResult, result);\n \n checkString=\"concPb205t\";\n expResult=true;\n result = TracerIsotopes.contains(checkString);\n assertEquals(expResult, result); \n }", "public void test5() {\n\t\t\n\t}", "@Test\n void testEqualsFalse() {\n assertFalse(loginRequest1.equals(loginRequest2));\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "@Test\n\tpublic void testGetBehandelingNaam(){\n\t\tString expResult = \"Hamstring\";\n\t\tassertTrue(expResult == Behandelcode.getBehandelingNaam());\n\t}", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Setting s = Setting.factory();\n Setting s1 = Setting.factory();\n Setting s2 = Setting.factory();\n Setting s3 = Setting.getSetting(\"test1\");\n Setting s4 = Setting.getSetting(\"test1\");\n\n Object o = null;\n Setting instance = s;\n assertFalse(s.equals(o));\n o = new Object();\n assertFalse(s.equals(o));\n assertFalse(s.equals(s1));\n assertEquals(s3, s4);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype. need more tests\");\n }", "private static final PyObject testEqual(PyString string, PyObject other) {\n\t\tif (other instanceof PyShadowString) {\n\t\t\treturn ((PyShadowString) other).shadowstr___eq__(string);\n\t\t} else {\n\t\t\treturn string.__eq__(other);\n\t\t}\n\t}", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testVerifyNome() {\n System.out.println(\"verifyNome\");\n boolean expResult = true;\n boolean result = uv.verifyNome(u);\n assertEquals(expResult, result);\n }", "public static BinaryExpression equal(Expression expression0, Expression expression1) { throw Extensions.todo(); }", "private static void test1(Integer i, Integer j) {\n\t\tif (i == j) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"TRUE\");\n\t\t\t} \n\t\t\telse \n\t\t\t\t{\n\t\t\t\tSystem.out.println(\"FALSE\");\n\t\t\t\t}\n\t}", "@Test\n public void shouldReturnTrue() {\n\t\tString test1=\"abcdefghi\";\n assertEquals(true,\n sut.binarySearch(test1,'d',0,test1.length()-1));\n }", "@Test\n\tpublic void method_2() \n\t{\n\t\tString place = \"Bangalore\";\n\t\tAssert.assertEquals(\"Bangalore\", place);\n\t}" ]
[ "0.6995958", "0.69873565", "0.68754447", "0.6665366", "0.6588887", "0.65503883", "0.65318704", "0.65261006", "0.6419526", "0.63774717", "0.6364703", "0.63548976", "0.6321407", "0.62916905", "0.6279174", "0.62633055", "0.62109476", "0.6188728", "0.6178783", "0.6157297", "0.61468744", "0.6138704", "0.6128811", "0.61284065", "0.61109763", "0.6085485", "0.6079942", "0.60744715", "0.60715646", "0.60324734", "0.603008", "0.6029102", "0.6023557", "0.6018412", "0.5994576", "0.59932244", "0.59850997", "0.59698695", "0.5963877", "0.5963442", "0.59447527", "0.59285736", "0.58967656", "0.5895567", "0.5892582", "0.5890693", "0.5887956", "0.5866839", "0.5865155", "0.5861094", "0.5860741", "0.58594584", "0.58568734", "0.5844608", "0.58367735", "0.58367735", "0.58367735", "0.58147275", "0.580898", "0.5808232", "0.58060926", "0.58043766", "0.57983285", "0.579587", "0.57911414", "0.5785061", "0.57818806", "0.57770526", "0.57764834", "0.5763388", "0.57492757", "0.57437485", "0.5734725", "0.5730054", "0.5727373", "0.5717111", "0.5713363", "0.57094264", "0.5701687", "0.56940854", "0.56876475", "0.5675452", "0.56715107", "0.5670132", "0.5664241", "0.5662783", "0.5660043", "0.56556535", "0.56525373", "0.56522286", "0.5651142", "0.56510156", "0.56490195", "0.56472003", "0.5643397", "0.56401116", "0.56370276", "0.56369287", "0.5634858", "0.56336576", "0.5633303" ]
0.0
-1
populates UI of Detail Activity except Videos and Reviews
private void populateUI() { Picasso.get() .load(Codes.BACKDROP_URL + movie.backdropPath) .error(R.drawable.error) .into(mBinding.backdrop); Picasso.get() .load(Codes.POSTER_URL + movie.posterPath) .error(R.drawable.error) .into(mBinding.movieDetails.poster); diskIO.execute(new Runnable() { @Override public void run() { MiniMovie miniMovie = mDatabase.movieDao().getMovieById(movie.movieId); if (miniMovie != null) { isFavorite = true; mBinding.favoriteButton.setImageResource(R.drawable.ic_star_white_24px); } else { isFavorite = false; mBinding.favoriteButton.setImageResource(R.drawable.ic_star_border_white_24px); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showMovieDetails() {\n\n if (movie != null) {\n\n // Display movie title, year, and overview into corresponding labels\n if (movie.getReleaseDate().equals(\"\")) {\n\n lblTitle.setText(movie.getMovieTitle());\n lblOverview.setText(movie.getMovieOverview());\n } else {\n\n lblTitle.setText(String.format(\"%s (%s)\", movie.getMovieTitle(), movie.getReleaseDate()));\n lblOverview.setText(movie.getMovieOverview());\n }\n\n // Display movie media into an image view\n downloadPoster();\n }\n }", "private void dg_ui_detail_video_type_banner(RecyclerView.ViewHolder viewHolder, ArticleBean bean) {\n DG_DetailVideoViewHolder db_video_banner_holder = (DG_DetailVideoViewHolder) viewHolder;\n boolean isAppExclusive = bean.getSid() != null && bean.getSid().equals(\"\" + THPConstants.APP_EXCLUSIVE_SECTION_ID);\n if (isAppExclusive) {\n db_video_banner_holder.mTitleTextView.setText(Html.fromHtml(\"<i>\" + \"\\\"\" + bean.getTi() + \"\\\"\" + \"</i>\"));\n db_video_banner_holder.mTitleTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 25);\n db_video_banner_holder.mAuthorTextView.setVisibility(View.GONE);\n db_video_banner_holder.mUpdatedTextView.setVisibility(View.GONE);\n db_video_banner_holder.mCreatedDateTextView.setVisibility(View.GONE);\n db_video_banner_holder.mHeaderImageView.setVisibility(View.GONE);\n db_video_banner_holder.mMultiMediaButton.setVisibility(View.GONE);\n db_video_banner_holder.mCaptionTextView.setVisibility(View.GONE);\n db_video_banner_holder.mCaptionDevider.setVisibility(View.GONE);\n } else {\n db_video_banner_holder.mTitleTextView.setText(bean.getTi());\n db_video_banner_holder.mArticleLocationView.setText(bean.getLocation());\n String author = bean.getAu();\n if (author != null && !TextUtils.isEmpty(author)) {\n db_video_banner_holder.mAuthorTextView.setVisibility(View.VISIBLE);\n db_video_banner_holder.mAuthorTextView.setText(author.replace(\",\\n\", \" | \").replace(\",\", \" | \"));\n } else {\n db_video_banner_holder.mAuthorTextView.setVisibility(View.GONE);\n }\n\n db_video_banner_holder.mUpdatedTextView.setText(AppDateUtil.getTopNewsFormattedDate(AppDateUtil.changeStringToMillisGMT(bean.getPd())));\n db_video_banner_holder.mCreatedDateTextView.setText(AppDateUtil.getPlaneTopNewsFormattedDate(AppDateUtil.changeStringToMillis(bean.getOd())));\n\n final ArrayList<MeBean> mImageList = bean.getMe();\n if (mImageList != null && mImageList.size() > 0) {\n String imageUrl = mImageList.get(0).getIm_v2();\n if (!ResUtil.isEmpty(imageUrl)) {\n PicassoUtil.loadImageWithFilePH(db_video_banner_holder.itemView.getContext(), db_video_banner_holder.mHeaderImageView, imageUrl);\n }\n String caption = mImageList.get(0).getCa();\n if (caption != null && !TextUtils.isEmpty(caption)) {\n db_video_banner_holder.mCaptionTextView.setText(Html.fromHtml(caption));\n } else {\n db_video_banner_holder.mCaptionTextView.setVisibility(View.GONE);\n }\n }\n db_video_banner_holder.mHeaderImageView.setOnClickListener(v -> {\n if (bean.getVid() != null && !TextUtils.isEmpty(bean.getVid())) {\n IntentUtil.openJWVideoPayerActivity(v.getContext(), bean.getVid());\n } else {\n IntentUtil.openYoutubeActivity(v.getContext(), bean.getYoutube_video_id());\n }\n });\n // To shows Article Type Image\n articleTypeImage(bean.getArticleType(), bean, db_video_banner_holder.mMultiMediaButton);\n db_video_banner_holder.mMultiMediaButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (bean.getVid() != null && !TextUtils.isEmpty(bean.getVid())) {\n IntentUtil.openJWVideoPayerActivity(v.getContext(), bean.getVid());\n } else {\n IntentUtil.openYoutubeActivity(v.getContext(), bean.getYoutube_video_id());\n }\n }\n });\n }\n }", "public interface DetailView {\n void initTabHost(JSONObject mJsonObject);\n\n void ExecutionUnitReuilt(String ExecutionUnit);\n\n void setAdapterListFileAttach(FileAttachAdapter attachAdapter, ArrayList<AttachFile> arrAttach, String TabName);\n\n void setVisibilitiesButtonForward(String Resuilt, String TabName);\n\n void setAdapterListDetais(List<DetailsRows> arrDetails, String TabName);\n\n void setAdapterMsgGroupTask(List<GroupMsgTasksRow> arrDocConnect,String TabName);\n\n void setAdapterContentTask(List<ContentTasksRow> arrDocConnect, String TabName, ModuleRow moduleRow);\n\n void setAdapterReportTask(List<ReportTasksRow> arrDocConnect,String TabName, ModuleRow moduleRow);\n\n void SetViewList(AndroidTreeView treeView,String TabName);\n\n void setAdapterFeedBack(List<FeedBackRow> arrFeedBack,String TabName, ModuleRow moduleRow);\n\n void deleteNotify();\n\n void CheckShowMenuOther(JSONObject mOther, String other);\n\n void closeProgress();\n\n void ToastError(String s);\n\n boolean isDestroy();\n\n void getContextMenu(ArrayList<ContextMenuForwardRow> arrContextMenu);\n\n void startIntent();\n\n void showError();\n\n void inseartInputPersonDatabase(String s);\n\n void DetleteRow(boolean mResuilt);\n\n void setVisible(int i);\n\n void getArrMenuDialog(List<DialogMenuDetailAdapter.ItemMenu> arrMenu);\n\n void startAddTransfer(int tapType);\n}", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View detailsView = inflater.inflate(R.layout.movie_details, container, false);\n\n ActionBar actionBar = getActivity().getActionBar();\n if (actionBar!=null)\n actionBar.setDisplayHomeAsUpEnabled(true);\n //Start associating variables with views\n bindViews(detailsView);\n movieColumnHolder = null;\n //Intent intent = getActivity().getIntent();\n // Get the extras (if there are any)\n Bundle extras = getArguments();\n if (extras != null) {\n if (extras.containsKey(getString(R.string.movie_list))) {\n movieColumnHolder = extras.getParcelable(getString(R.string.movie_list));\n }\n }\n //If chosen movie content exits\n if (movieColumnHolder != null) {\n Picasso.with(getActivity().getApplicationContext())\n .load(Constants.IMAGE_URL + movieColumnHolder.getPoster_path())\n .error(R.mipmap.error_background)\n .placeholder(R.mipmap.placeholder_background)\n .into(posterImage);\n movieName.setText(movieColumnHolder.getOriginal_title());\n movieDate.setText(movieColumnHolder.getRelease_date());\n movieRate.setText(getString(R.string.vote,Float.toString(movieColumnHolder.getVote_average())));\n movieOverview.setText(movieColumnHolder.getOverview());\n detail_id = movieColumnHolder.getId();\n detail_scroll.smoothScrollTo(0,0);\n\n }\n return detailsView;\n }", "private void getActivityDetails(View v) {\n editId = (TextView) v.findViewById(R.id.id_activity);\n editTime = (TextView) v.findViewById(R.id.activityTimeDayLog);\n editTotalTime = (TextView) v.findViewById(R.id.activityTotalTimeDayLog);\n editDistance = (TextView) v.findViewById(R.id.DistanceDayLog);\n editInfo = (TextView) v.findViewById(R.id.activityDetailsDayLog);\n editSport = (TextView) v.findViewById(R.id.sportTypeDayLog);\n editAltitude = (TextView) v.findViewById(R.id.altitudeDayLog);\n editAvgHR = (TextView) v.findViewById(R.id.avgHRDayLog);\n editMaxHR = (TextView) v.findViewById(R.id.maxHRDayLog);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n activity.getCastDetailsFragment().showInstantToolbar();\n activity.setCastDetailsFragment(null);\n activity.setRestoreMovieDetailsAdapterState(true);\n activity.setRestoreMovieDetailsState(false);\n\n if (moviesList.get(position).getMediaType().equals(\"movie\")) {\n if (activity.getMovieDetailsFragment() != null && activity.getLastVisitedMovieInCredits() == moviesList.get(position).getId() && activity.getMovieDetailsFragment().getTimeOut() == 0) {\n // Old movie details retrieve info and re-init component else crash\n activity.getMovieDetailsFragment().onSaveInstanceState(new Bundle());\n Bundle bundle = new Bundle();\n bundle.putInt(\"id\", moviesList.get(position).getId());\n Bundle save = activity.getMovieDetailsFragment().getSave();\n // Re-init movie details and set save information\n movieDetails = new MovieDetails();\n movieDetails.setTimeOut(0);\n movieDetails.setSave(save);\n movieDetails.setArguments(bundle);\n } else movieDetails = new MovieDetails();\n }\n\n if (moviesList.get(position).getMediaType().equals(\"tv\")) {\n if (activity.getTvDetailsFragment() != null && activity.getLastVisitedMovieInCredits() == moviesList.get(position).getId() && activity.getTvDetailsFragment().getTimeOut() == 0) {\n // Old movie details retrieve info and re-init component else crash\n activity.getTvDetailsFragment().onSaveInstanceState(new Bundle());\n Bundle bundle = new Bundle();\n bundle.putInt(\"id\", moviesList.get(position).getId());\n Bundle save = activity.getTvDetailsFragment().getSave();\n // Re-init movie details and set save information\n tvDetails = new TVDetails();\n tvDetails.setTimeOut(0);\n tvDetails.setSave(save);\n tvDetails.setArguments(bundle);\n } else tvDetails = new TVDetails();\n }\n\n\n activity.setLastVisitedMovieInCredits(moviesList.get(position).getId());\n ((CastDetails) getParentFragment()).setAddToBackStack(true);\n getParentFragment().onSaveInstanceState(new Bundle());\n if (activity.getSearchViewCount())\n activity.incSearchCastDetails();\n\n\n FragmentManager manager = getActivity().getFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n Bundle bundle = new Bundle();\n bundle.putInt(\"id\", moviesList.get(position).getId());\n\n if (moviesList.get(position).getMediaType().equals(\"movie\")) {\n movieDetails.setTitle(moviesList.get(position).getTitle());\n movieDetails.setArguments(bundle);\n transaction.replace(R.id.frame_container, movieDetails);\n }\n if (moviesList.get(position).getMediaType().equals(\"tv\")) {\n tvDetails.setTitle(moviesList.get(position).getTitle());\n tvDetails.setArguments(bundle);\n transaction.replace(R.id.frame_container, tvDetails);\n }\n // add the current transaction to the back stack:\n transaction.addToBackStack(\"castDetails\");\n transaction.commit();\n\n }", "@Subscribe\n\tpublic void onShowActivityDetails(Events.LXShowDetails event) {\n\t\tOmnitureTracking.trackAppLXProductInformation(event.activityDetails, lxState.searchParams);\n\t\tactivityDetails = event.activityDetails;\n\n\t\tbuildGallery(activityDetails);\n\t\tbuildSections(activityDetails);\n\t\tbuildOfferDatesSelector(activityDetails.offersDetail, lxState.searchParams.startDate);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n final String MOVIE_ORIGINAL_TITLE = \"original_title\";\n final String MOVIE_POSTER_PATH = \"poster_path\";\n final String MOVIE_OVERVIEW = \"overview\";\n final String MOVIE_VOTE_AVERAGE = \"vote_average\";\n final String MOVIE_RELEASE_DATE = \"release_date\";\n\n View rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n\n // The detail Activity called via intent. Inspect the intent for forecast data.\n Intent intent = getActivity().getIntent();\n if (intent != null && intent.hasExtra(\"movieDetailMap\")) {\n HashMap<String, String> movieDetail = (HashMap<String, String>) intent.getSerializableExtra(\"movieDetailMap\");\n\n ((TextView) rootView.findViewById(R.id.detail_title_textView))\n .setText(movieDetail.get(MOVIE_ORIGINAL_TITLE));\n\n ((TextView) rootView.findViewById(R.id.detail_releaseDate_textView))\n .setText(movieDetail.get(MOVIE_RELEASE_DATE));\n\n ((TextView) rootView.findViewById(R.id.detail_voteAverage_textView))\n .setText(movieDetail.get(MOVIE_VOTE_AVERAGE));\n\n ((TextView) rootView.findViewById(R.id.detail_overview_textView))\n .setText(movieDetail.get(MOVIE_OVERVIEW));\n\n ImageView imageView = (ImageView) rootView.findViewById(R.id.detail_poster_imageView);\n Picasso.with(getActivity()).load(\"http://image.tmdb.org/t/p/w500\" + movieDetail.get(MOVIE_POSTER_PATH)).into(imageView);\n }\n return rootView;\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), DetailActivity.class)\n .putExtra(\"title\", model.getMovieName())\n .putExtra(\"vote_average\", model.getVotes() + \"\")\n .putExtra(\"overview\", model.getMovieOverview())\n .putExtra(\"popularity\", model.getMoviePopularity() + \"\")\n .putExtra(\"release_date\", model.getMovieReleaseDate())\n .putExtra(\"vote_count\", model.getMovieVoteCount())\n .putExtra(\"Picture\", model.getMoviePoster());\n\n startActivity(intent);\n\n }", "public interface MainView extends BaseView{\n\n void addMoreMoviesToTheList(List<MovieInfoModel> movieInfoModelList);\n void showMovieList(List<MovieInfoModel> movieInfoModelList);\n void resetPageNumberToDefault();\n void showNoMovieInfo();\n\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_detail_vid, container, false);\n pb = view.findViewById(R.id.vid_pb);\n pbText = view.findViewById(R.id.vid_pb_text);\n rv = view.findViewById(R.id.vid_item_list);\n rv.setLayoutManager(new GridLayoutManager(getContext(), 1));\n if (item != null)\n setVideo(item);\n else {\n if (DetailActivity.url.contains(\"amcet\")) {\n ParserAmcet parserAmcet = new ParserAmcet(DetailActivity.url, null, new ItemHtml(),\n new OnTaskCallback() {\n @Override\n public void OnCompleted(ArrayList<ItemHtml> items, ItemHtml itempath) {\n setVideo(itempath);\n }\n });\n parserAmcet.execute();\n } else if (DetailActivity.url.contains(\"kino-fs\")) {\n ParserKinoFS parserKinoFS = new ParserKinoFS(DetailActivity.url, null, new ItemHtml(),\n new OnTaskCallback() {\n @Override\n public void OnCompleted(ArrayList<ItemHtml> items, ItemHtml itempath) {\n setVideo(itempath);\n }\n });\n parserKinoFS.execute();\n } else if (DetailActivity.url.contains(\"animevost\")) {\n ParserAnimevost parserAnimevost = new ParserAnimevost(DetailActivity.url, null, new ItemHtml(),\n new OnTaskCallback() {\n @Override\n public void OnCompleted(ArrayList<ItemHtml> items, ItemHtml itempath) {\n setVideo(itempath);\n }\n });\n parserAnimevost.execute();\n } else {\n ParserHtml parserHtml = new ParserHtml(DetailActivity.url, null, new ItemHtml(),\n new OnTaskCallback() {\n @Override\n public void OnCompleted(ArrayList<ItemHtml> items, ItemHtml itempath) {\n setVideo(itempath);\n }\n });\n parserHtml.execute();\n }\n }\n return view;\n }", "public static void openVideoDetail(Activity activity, View sharedView, VideoModel videoModel) {\n sharedView = sharedView.findViewById(R.id.itemThumbnailView);\n Intent intent = new Intent(activity, DetailActivity.class);\n intent.putExtra(DetailActivity.ARG_DATA, videoModel);\n View navigationBar = activity.findViewById(android.R.id.navigationBarBackground);\n View statusBar = activity.findViewById(android.R.id.statusBarBackground);\n List<Pair<View, String>> pairs = new ArrayList<>();\n if (statusBar != null) {\n pairs.add(Pair.create(statusBar, Window.STATUS_BAR_BACKGROUND_TRANSITION_NAME));\n }\n if (navigationBar != null) {\n pairs.add(Pair.create(navigationBar, Window.NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME));\n }\n pairs.add(Pair.create(sharedView, DetailFragment.SHARED_IMAGE_KEY));\n\n Bundle bundle = ActivityOptions.makeSceneTransitionAnimation(activity, pairs.toArray(new Pair[pairs.size()])).toBundle();\n activity.startActivity(intent, bundle);\n }", "Object getViewDetails();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_movie_details, container, false);\n //Get the Extra Data from the intent\n final Bundle dataBundle = this.getArguments();\n movieObject = dataBundle.getParcelable(Constants.INTENT_MOVIE_OBJECT);\n\n //Load the poster image and display in ImageView\n ImageView backdropImageView = (ImageView) view.findViewById(R.id.poster_image_view);\n Uri posterUri = Uri.parse(Constants.URI_BASE_IMAGE_URI).buildUpon()\n .appendPath(Constants.URI_IMAGE_SIZE)\n .appendEncodedPath(movieObject.getPosterPath())\n .build();\n Picasso.with(getContext()).load(posterUri)\n .into(backdropImageView);\n\n //Set the Title in the Title TextView\n TextView movieTitle = (TextView) view.findViewById(R.id.movie_title_text_view);\n movieTitle.setText(movieObject.getTitle());\n\n //Set the Release Date in the ReleaseDate TextView\n TextView releaseDate = (TextView) view.findViewById(R.id.release_date_text_view);\n releaseDate.setText(movieObject.getReleaseDate());\n\n //Set the Rating in the Rating TextView\n TextView rating = (TextView) view.findViewById(R.id.rating_text_view);\n rating.setText(Double.toString(movieObject.getAvgVote()) + \"/10\");\n\n //Set the Overview in the Overview TextView\n TextView movieOverview = (TextView) view.findViewById(R.id.movie_overview_text_view);\n movieOverview.setText(movieObject.getOverview());\n\n //get the movie trailer button and set the sction to be performed when it is clicked\n Button trailerButton = (Button) view.findViewById(R.id.view_trailers_button);\n trailerButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Create fragment and give it an argument specifying the trailers it should show\n MovieTrailersFragment movieTrailersFragment = new MovieTrailersFragment();\n Bundle args = new Bundle();\n args.putInt(MovieTrailersFragment.BUNDLE_ARGUMENT_KEY, movieObject.getId());\n args.putString(Constants.INTENT_FAVOURITE_MOVIE, dataBundle.getString(Constants.INTENT_FAVOURITE_MOVIE));\n movieTrailersFragment.setArguments(args);\n\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack so the user can navigate back\n transaction.replace(R.id.movie_details_fragment_container, movieTrailersFragment, MOVIE_TRAILER_FRAGMENT_TAG);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }\n });\n\n //get the movie trailer button and set the sction to be performed when it is clicked\n Button reviewButton = (Button) view.findViewById(R.id.view_review_button);\n reviewButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Create fragment and give it an argument specifying the trailers it should show\n MovieReviewsFragment movieReviewsFragment = new MovieReviewsFragment();\n Bundle args = new Bundle();\n args.putInt(MovieReviewsFragment.BUNDLE_ARGUMENT_KEY, movieObject.getId());\n args.putString(Constants.INTENT_FAVOURITE_MOVIE, dataBundle.getString(Constants.INTENT_FAVOURITE_MOVIE));\n movieReviewsFragment.setArguments(args);\n\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack so the user can navigate back\n transaction.replace(R.id.movie_details_fragment_container, movieReviewsFragment, MOVIE_REVIEW_FRAGMENT_TAG);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }\n });\n\n final ImageButton addToFavouritesButton = (ImageButton) view.findViewById(R.id.mark_favourite_button);\n if (isFavouriteMovie()) {\n addToFavouritesButton.setImageResource(R.drawable.ic_favorite_black_24dp);\n } else {\n addToFavouritesButton.setImageResource(R.drawable.ic_favorite_border_black_24dp);\n }\n addToFavouritesButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (isFavouriteMovie()) {\n addToFavouritesButton.setImageResource(R.drawable.ic_favorite_border_black_24dp);\n String[] selectionArgs = new String[]{Integer.toString(movieObject.getId())};\n Uri movieUri = MovieContract.MovieEntry.CONTENT_URI.buildUpon().appendPath(Integer.toString(movieObject.getId())).build();\n getContext().getContentResolver().delete(\n movieUri,\n MovieProvider.sMovieDetailsSelection,\n selectionArgs\n );\n Uri reviewsUri = MovieContract.ReviewEntry.CONTENT_URI.buildUpon().appendPath(Integer.toString(movieObject.getId())).build();\n getContext().getContentResolver().delete(\n reviewsUri,\n MovieProvider.sMovieReviewsSelection,\n selectionArgs\n );\n Uri trailerUri = MovieContract.TrailerEntry.CONTENT_URI.buildUpon().appendPath(Integer.toString(movieObject.getId())).build();\n getContext().getContentResolver().delete(\n trailerUri,\n MovieProvider.sMovieTrailersSelection,\n selectionArgs\n );\n } else {\n addToFavouritesButton.setImageResource(R.drawable.ic_favorite_black_24dp);\n getContext().getContentResolver().insert(MovieContract.MovieEntry.CONTENT_URI, createMovieRecord());\n GetReviewsFromApi getReviewsFromApi = new GetReviewsFromApi(getContext(), MovieDetailsFragment.this, movieObject.getId());\n getReviewsFromApi.execute();\n GetTrailersFromApi getTrailersFromApi = new GetTrailersFromApi(getContext(), MovieDetailsFragment.this, movieObject.getId());\n getTrailersFromApi.execute();\n }\n }\n });\n return view;\n }", "@Override\n public void onMovieClicked(Movie movie, MovieHolder holder) {\n if (!mIsOpeningDetails) {\n mIsOpeningDetails = true;\n MovieDetailActivity.start(getActivity(), movie, holder.getPosterView());\n }\n }", "public void showDetails(boolean animated) {\n\n flushAnimations();\n\n detailsUp = true;\n\n if (detailsBar == null) {\n detailsBar = actionBar.createContextMode(detailsListener);\n detailsBar.setDoneResource(R.drawable.ic_action_done_dark);\n detailsBar.setSeparatorVisible(false);\n detailsBar.setTextColor(getResources().getColor(R.color.DashboardText));\n\n if (phoneUI) {\n detailsBar.setBackgroundColor(getResources().getColor(R.color.GradientStart));\n }\n else {\n detailsBar.setBackgroundResource(R.drawable.actionbar_background_round);\n }\n\n detailsBar.start();\n\n detailsBar.setTitleAnimated(getString(R.string.Details), 1);\n }\n\n final ScrollView DetailScroller = new ScrollView(getActivity());\n DetailScroller.setClipChildren(false);\n\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);\n params.addRule(RelativeLayout.BELOW, R.id.ScrapWindowActionBar);\n params.addRule(RelativeLayout.ABOVE, R.id.ScrapTotal);\n\n PanelBuilder builder = new PanelBuilder(activity)\n .setTitleSetting(DetailLabels[0], DetailLabelTypes[0], DetailIDs[0]);\n\n if (!phoneUI) {\n builder.setTitleWidth((int) (144 * metrics.density + 0.5f));\n }\n\n for (int i = 1; i < DetailCount; i++) {\n builder.addSetting(DetailLabels[i], DetailLabelTypes[i], DetailIDs[i]);\n }\n\n FrameLayout panel = builder.build();\n panel.setClipChildren(false);\n\n SpannableStringBuilder date = new SpannableStringBuilder();\n date.append(Integer.toString(dataSet.date.get(Calendar.DATE))).append(\" \").append(dataSet.date.getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.getDefault()));\n Utils.appendWithSpan(date, \" \" + dataSet.date.get(Calendar.YEAR), Receipt.textLightSpan());\n ((TextView) panel.findViewById(DetailIDs[0])).setText(date);\n $(panel, \"#\" + DetailIDs[0]).click(DatePickerClickListener);\n\n date = new SpannableStringBuilder();\n date.append(Integer.toString(dataSet.date.get(Calendar.HOUR_OF_DAY))).append(\":\").append(Integer.toString(dataSet.date.get(Calendar.MINUTE)));\n Utils.appendWithSpan(date, \":\" + dataSet.date.get(Calendar.SECOND), Receipt.titleLightSpan());\n ((TextView) panel.findViewById(R.id.CheckoutTime)).setText(date);\n\n ((TextView) panel.findViewById(R.id.ItemCount)).setText(Long.toString(dataSet.details[DetailItemCount]));\n if (dataSet.details[DetailBudget] < Long.MAX_VALUE) {\n ((TextView) panel.findViewById(R.id.BudgetAssigned)).setText(ReceiptActivity.longToFormattedString(dataSet.details[DetailBudget], Receipt.textLightSpan()));\n ((TextView) panel.findViewById(R.id.BudgetRemaining)).setText(ReceiptActivity.longToFormattedString(dataSet.details[DetailRemainingBudget], Receipt.textLightSpan()));\n }\n else {\n ((TextView) panel.findViewById(R.id.BudgetAssigned)).setText(Utils.appendWithSpan(new SpannableStringBuilder(), getString(R.string.BudgetUnlimited), Receipt.textLightSpan()));\n ((TextView) panel.findViewById(R.id.BudgetRemaining)).setText(Utils.appendWithSpan(new SpannableStringBuilder(), getString(R.string.BudgetUnlimited), Receipt.textLightSpan()));\n }\n ((TextView) panel.findViewById(R.id.Tax)).setText(ReceiptActivity.longToFormattedString(dataSet.details[DetailTax], Receipt.textLightSpan()));\n ((TextView) panel.findViewById(R.id.Subtotal)).setText(ReceiptActivity.longToFormattedString(dataSet.details[DetailSubtotal], Receipt.textLightSpan()));\n\n panelLayout = new LinearLayout(activity);\n panelLayout.setGravity(Gravity.CENTER);\n\n panelLayout.addView(DetailScroller, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));\n panelLayout.setClipChildren(false);\n\n final View TotalSeparator = viewer.findViewById(R.id.TotalSeparator);\n final View ActionBarSeparator = viewer.findViewById(R.id.ActionBarSeparator);\n\n DetailScroller.addView(panel);\n DetailScroller.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {\n @Override\n public void onLayoutChange(View view, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {\n if (DetailScroller.getHeight() >= ((View) DetailScroller.getParent()).getHeight()) {\n TotalSeparator.setVisibility(View.VISIBLE);\n ActionBarSeparator.setVisibility(View.VISIBLE);\n } else {\n TotalSeparator.setVisibility(View.INVISIBLE);\n ActionBarSeparator.setVisibility(View.INVISIBLE);\n }\n }\n });\n\n container.addView(panelLayout, params);\n\n if (animated && !USE_VIEWPROXY_ANIMATIONS) {\n collection.freeze();\n collection.setLayerType(View.LAYER_TYPE_HARDWARE, null);\n collection.buildLayer();\n\n ((View) headerTitle.getParent()).setLayerType(View.LAYER_TYPE_HARDWARE, null);\n ((View) headerTitle.getParent()).buildLayer();\n\n DetailScroller.setTranslationY(-96 * metrics.density);\n DetailScroller.setAlpha(0f);\n DetailScroller.setLayerType(View.LAYER_TYPE_HARDWARE, null);\n DetailScroller.setVerticalScrollBarEnabled(false);\n DetailScroller.setOverScrollMode(View.OVER_SCROLL_NEVER);\n DetailScroller.setWillNotDraw(true);\n\n final ValueAnimator animator = ValueAnimator.ofFloat(0f, 1f);\n animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n @Override\n public void onAnimationUpdate(ValueAnimator valueAnimator) {\n float fraction = valueAnimator.getAnimatedFraction();\n\n collection.setTranslationY(Utils.interpolateValues(fraction, 0f, 128 * metrics.density));\n collection.setAlpha(1 - fraction);\n\n ((View) headerTitle.getParent()).setTranslationY(Utils.interpolateValues(fraction, 0f, 128 * metrics.density));\n ((View) headerTitle.getParent()).setAlpha(1 - fraction);\n\n DetailScroller.setAlpha(fraction);\n DetailScroller.setTranslationY(Utils.interpolateValues(fraction, -96 * metrics.density, 0f));\n }\n });\n animator.addListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n animations.remove(animation);\n ((View) headerTitle.getParent()).setVisibility(View.INVISIBLE);\n ((View) headerTitle.getParent()).setLayerType(View.LAYER_TYPE_NONE, null);\n collection.setVisibility(View.INVISIBLE);\n collection.thaw();\n collection.setLayerType(View.LAYER_TYPE_NONE, null);\n\n DetailScroller.setLayerType(View.LAYER_TYPE_NONE, null);\n DetailScroller.setVerticalScrollBarEnabled(true);\n DetailScroller.setOverScrollMode(View.OVER_SCROLL_IF_CONTENT_SCROLLS);\n DetailScroller.setWillNotDraw(false);\n\n if (currentExpander != null) {\n currentExpander.destroy();\n }\n }\n });\n animator.setDuration(300);\n animator.setInterpolator(new Utils.FrictionInterpolator(1.5f));\n pendingAnimations.add(new Runnable() {\n @Override\n public void run() {\n pendingAnimations.remove(this);\n\n animator.start();\n animations.add(animator);\n }\n });\n handler.post(pendingAnimations.get(pendingAnimations.size() - 1));\n }\n else if (animated && USE_VIEWPROXY_ANIMATIONS) {\n\n $.bind(activity);\n\n $.finishQueue(\"detailsQueue\", true);\n\n ((ViewGroup) collection.getChildAt(0)).setClipChildren(false);\n $ outgoing = $(R.id.ScrapHeader).add(collection.visibleViews()).reverse();\n\n outgoing.animate()\n .property($.TranslateY, $.dp(DetailDisplacementDistanceDP), $.Op.Add)\n .property($.Opacity, 0)\n .layer(true)\n .duration(DetailAnimationDuration)\n .interpolator(new Utils.FrictionInterpolator(1.5f))\n .stride(DetailSpread / outgoing.length())\n .complete(new $.AnimationCallback() {\n @Override\n public void run($ collection) {\n HistoryViewerFragment.this.collection.setVisibility(View.INVISIBLE);\n $(R.id.ScrapHeader).visibility($.Invisible);\n collection.property($.Opacity, 1).property($.TranslateY, 0);\n }\n })\n .start(\"detailsQueue\");\n\n final $ Incoming = $(DetailScroller.getChildAt(0)).children();\n Incoming.each(new $.Each() {\n int i = 0;\n int row = Incoming.length();\n int stride = DetailSpread / Incoming.length();\n\n @Override\n public void run(View view, int index) {\n $ wrapper = $(view);\n\n wrapper.property($.Opacity, 0)\n .property($.TranslateY, $.dp(-DetailDisplacementDistanceDP), $.Op.Add)\n .animate()\n .property($.Opacity, 1)\n .property($.TranslateY, $.dp(DetailDisplacementDistanceDP), $.Op.Add)\n .layer(true)\n .duration(DetailAnimationDuration)\n .delay(stride * row)\n .interpolator(new Utils.FrictionInterpolator(1.5f))\n .start(\"detailsQueue\");\n\n i++;\n if (i == 2) {\n i = 0;\n row --;\n }\n }\n });\n\n $.unbind();\n\n }\n else {\n collection.setVisibility(View.INVISIBLE);\n ((View) headerTitle.getParent()).setVisibility(View.INVISIBLE);\n }\n\n }", "public void setDetails(){\n\n TextView moviename = (TextView) findViewById(R.id.moviename);\n TextView moviedate = (TextView) findViewById(R.id.moviedate);\n TextView theatre = (TextView) findViewById(R.id.theatre);\n\n TextView seats = (TextView) findViewById(R.id.seats);\n\n moviename.setText(ticket.movieName);\n moviedate.setText(ticket.getMovieDate());\n theatre.setText(ticket.theatreDetails);\n\n seats.setText(ticket.seats);\n }", "@Override\n public void onClick(View v){\n Log.d(\"Hit\", \"Clicked\" + mCurrentMovie.getTitle());\n Context mContext = v.getContext();\n navigateToDetailActivity(mContext);\n\n }", "private void fetchMovieDetails() {\n Stream.of(movieListings).forEach(movieListing -> {\n Picasso.with(MoviesApplication.getApp()).load(movieListing.getPosterUrl()).fetch();\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieDetails(movieListing.getId()).enqueue(movieDetailCallback);\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieVideos(movieListing.getId()).enqueue(movieVideoCallback);\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieReviews(movieListing.getId()).enqueue(movieReviewCallback);\n });\n }", "interface HistoryDetailsView {\n\n\n /**\n * <h>hideProgress</h>\n * <p>hide progress bar</p>\n */\n void hideProgress();\n\n /**\n * <h>showProgress</h>\n * <p>show progress bar</p>\n */\n void showProgress();\n void showError(String message, int code);\n void setViews(OrderDetailsModel orderedItemDetails, boolean isCityLogin);\n\n\n }", "public interface DetailView {\n\n void setStartDate(String dateString, String yearString);\n\n void setEndDate(String dateString, String yearString);\n\n void setDescription(String description);\n\n void setProjectStatus(String status, int color);\n\n void setDetailViewTitle(String title);\n}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(details_video_introduce.getVisibility()==View.VISIBLE){\n\t\t\t\t\tdetails_video_introduce.setVisibility(View.GONE);\n\t\t\t\t\tdetails_recommend.setVisibility(View.VISIBLE);\n\t\t\t\t\tdetails_key_arts.setVisibility(View.GONE);\n\t\t\t\t}else{\n\t\t\t\t\tdetails_key_arts.setVisibility(View.GONE);\n\t\t\t\t\tdetails_video_introduce.setVisibility(View.VISIBLE);\n\t\t\t\t\tdetails_recommend.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t}", "private void displayData() {\n ChildStatement childStmt = app.getChildStatement();\n\n //---Child\n childModelViewSynchronizer = new ModelViewSynchronizer<Child>(CHILD_CLASS,\n getChildMetadata(), rootView, AppConstants.EMPTY_STRING);\n childModelViewSynchronizer.setLabels();\n childModelViewSynchronizer.setHeaderTitle(R.id.section_child_particulars,\n R.string.label_child);\n childModelViewSynchronizer.displayDataObject(childStmt.getChildItem().getChild());\n\n //---CDA Trustee\n cdaTrusteeModelViewSynchronizer = new ModelViewSynchronizer<Adult>(ADULT_CLASS,\n getCdaTrusteeMetaData(), rootView, AppConstants.EMPTY_STRING);\n cdaTrusteeModelViewSynchronizer.setLabels();\n cdaTrusteeModelViewSynchronizer.setHeaderTitle(R.id.section_cdat_particulars,\n R.string.label_adult_type_cdat);\n cdaTrusteeModelViewSynchronizer.displayDataObject(childStmt.getChildDevAccountTrustee());\n\n //---Child Development Bank Account\n cdaBankModelViewSynchronizer = new ModelViewSynchronizer<CdaBankAccount>(CDA_BANK_ACCOUNT_CLASS,\n getChildDevAccountMetaData(), rootView, AppConstants.EMPTY_STRING);\n cdaBankModelViewSynchronizer.setLabels();\n cdaBankModelViewSynchronizer.setHeaderTitle(R.id.section_cda_details,\n R.string.label_child_dev_acc_detail);\n cdaBankModelViewSynchronizer.displayDataObject(childStmt.getCdaBankAccount());\n\n //--- To From Date\n displayFromToDates();\n\n //Screen - Title and Instructions\n fragmentContainer.setFragmentTitle(rootView,\n R.string.title_activity_family_view_cda_details);\n fragmentContainer.setInstructions(rootView.findViewById(R.id.screen_instructions),\n CURRENT_POSITION, 0, false);\n }", "public void setUpViews(){\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n // ListView Clicked item index\n Intent i = new Intent(getActivity(), MediaDetailActivity.class);\n Media media = lectures.get(position);\n i.putExtra(\"url\", media.getUrl());\n i.putExtra(\"type\", media.type);\n i.putExtra(\"author\", media.author);\n i.putExtra(\"author_image_url\", media.getImageUrl());\n i.putExtra(\"name\", media.getName());\n startActivity(i);\n }\n });\n }", "private void premium_ui_detail_banner(RecyclerView.ViewHolder viewHolder, ArticleBean bean) {\n PREMIUM_DetailBannerViewHolder holder = (PREMIUM_DetailBannerViewHolder) viewHolder;\n final String articleType = bean.getArticletype();\n // To shows Article Type Image\n articleTypeImage(articleType, bean, holder.articleTypeimageView);\n\n String sectionName = bean.getArticleSection();\n if (sectionName == null || TextUtils.isEmpty(sectionName)) {\n sectionName = bean.getSectionName();\n }\n\n sectionName = ResUtil.capitalizeFirstLetter(sectionName);\n\n holder.tv_section.setText(sectionName);\n\n String authors = CommonUtil.getAutors(bean.getAuthor());\n if (authors == null) {\n holder.tv_author_name.setVisibility(View.GONE);\n } else {\n holder.tv_author_name.setText(authors);\n holder.tv_author_name.setVisibility(View.VISIBLE);\n }\n\n String location = bean.getLocation();\n if (location == null || TextUtils.isEmpty(location)) {\n holder.tv_city_name.setVisibility(View.GONE);\n } else {\n holder.tv_city_name.setVisibility(View.VISIBLE);\n holder.tv_city_name.setText(location);\n\n }\n\n String timeToRead = bean.getTimeToRead();\n if (timeToRead == null || timeToRead.equalsIgnoreCase(\"0\") || TextUtils.isEmpty(timeToRead)) {\n holder.tv_time.setVisibility(View.GONE);\n } else {\n holder.tv_time.setText(timeToRead);\n holder.tv_time.setVisibility(View.VISIBLE);\n }\n\n // Publish Date\n String formatedPubDt = CommonUtil.fomatedDate(bean.getPubDateTime(), mFrom);\n if (formatedPubDt == null || TextUtils.isEmpty(formatedPubDt)) {\n holder.tv_updated_time.setVisibility(View.GONE);\n } else {\n holder.tv_updated_time.setText(formatedPubDt);\n holder.tv_updated_time.setVisibility(View.VISIBLE);\n }\n\n holder.tv_title.setText(bean.getArticletitle());\n\n if (ContentUtil.getBannerUrl(bean.getThumbnailUrl()).equalsIgnoreCase(\"\")) {\n holder.imageView.setVisibility(View.GONE);\n holder.tv_caption.setVisibility(View.GONE);\n holder.shadowOverlay.setVisibility(View.GONE);\n } else {\n holder.imageView.setVisibility(View.VISIBLE);\n PicassoUtil.loadImageWithFilePH(holder.itemView.getContext(), holder.imageView, ContentUtil.getBannerUrl(bean.getThumbnailUrl()));\n String caption = null;\n if (bean.getIMAGES() != null && bean.getIMAGES().size() > 0) {\n caption = bean.getIMAGES().get(0).getCa();\n }\n\n if (caption != null && !TextUtils.isEmpty(caption.trim())) {\n holder.shadowOverlay.setVisibility(View.VISIBLE);\n holder.tv_caption.setVisibility(View.VISIBLE);\n holder.tv_caption.setText(ResUtil.htmlText(caption));\n } else {\n holder.shadowOverlay.setVisibility(View.GONE);\n holder.tv_caption.setVisibility(View.GONE);\n }\n\n\n }\n\n // Banner Image Click Listener\n holder.imageView.setOnClickListener(v -> {\n if (isVideo(articleType, bean)) {\n if (isYoutubeVideo(articleType)) {\n if (bean.getYoutubeVideoId() == null || ResUtil.isEmpty(bean.getYoutubeVideoId())) {\n Alerts.showSnackbar((Activity) holder.imageView.getContext(), \"Video link not found.\");\n return;\n }\n IntentUtil.openYoutubeActivity(holder.itemView.getContext(), bean.getYoutubeVideoId());\n return;\n }\n }\n\n // Opens Gallery\n //IntentUtils.openVerticleGalleryActivity(holder.itemView.getContext(), articleBean.getIMAGES(), articleBean.getTITLE());\n if (bean.getIMAGES() != null && bean.getIMAGES().size() > 0) {\n IntentUtil.openHorizontalGalleryActivity(holder.itemView.getContext(), null, bean.getIMAGES(), 0);\n } else {\n IntentUtil.openHorizontalGalleryActivity(holder.itemView.getContext(), null, bean.getMedia(), 0);\n }\n });\n\n long animDuration = 500;\n\n holder.tv_title.animate()\n .alpha(1.0f)\n .setDuration(animDuration);\n holder.imageView.animate()\n .alpha(1.0f)\n .setDuration(animDuration);\n holder.tv_author_name.animate()\n .alpha(0.6f)\n .setDuration(animDuration);\n holder.tv_caption.animate()\n .alpha(1.0f)\n .setDuration(animDuration);\n holder.tv_updated_time.animate()\n .alpha(1.0f)\n .setDuration(animDuration);\n holder.tv_city_name.animate()\n .alpha(1.0f)\n .setDuration(animDuration);\n holder.tv_time.animate()\n .alpha(1.0f)\n .setDuration(animDuration);\n\n }", "@Override\r\n public void showMovieDetails(MovieEntry movie) {\n Fragment fragment = new DetailsFragment();\r\n Bundle args = new Bundle();\r\n args.putParcelable(DetailsFragment.MOVIE_ARG_POSITION, movie);\r\n fragment.setArguments(args);\r\n\r\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\r\n if(!twoPane) {\r\n transaction.replace(R.id.master_fragment, fragment, DetailsFragment.FRAGMENT_TAG);\r\n if(screenSize == Configuration.SCREENLAYOUT_SIZE_NORMAL) {\r\n transaction.addToBackStack(null);\r\n }\r\n } else {\r\n transaction.replace(R.id.details_fragment, fragment, DetailsFragment.FRAGMENT_TAG);\r\n }\r\n\r\n transaction.commit();\r\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_detail, container, false);\n //Loading IT list item\n mDetails = getArguments().getParcelableArrayList(ARG_DETAIL_LIST);\n mTableListLab = TableListLab.getInstance();\n //Display items in expandable recyclerview\n mExpandableView = view.findViewById(R.id.detail_expandable_view);\n for (Detail detail : mDetails) {\n switch (detail.getType()) {\n case Detail.ONLY_TEXT_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new InfoView(getActivity(), detail));\n break;\n case Detail.IMAGE_TEXT_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageTextInfoView(getActivity(), detail));\n break;\n case Detail.ONLY_IMAGE_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageOnlyInfoView(getActivity(), detail));\n break;\n case Detail.TWO_IMAGES_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageTableInfoView(getActivity(), detail));\n break;\n case Detail.DIRECT_TEXT_TYPE:\n mExpandableView.addView(new DirectTextView(getActivity(), detail));\n break;\n case Detail.FACULTY_INFO_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new FacultyInfoView(getActivity(), detail));\n break;\n case Detail.MAP_ADDRESS_TYPE:\n mExpandableView.addView(new MapAddressView(getActivity(), detail));\n break;\n case Detail.ONLY_TABLE_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new TableInfoView(getActivity(), detail));\n break;\n case Detail.IMAGE_TABLE_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageTableInfoView(getActivity(), detail));\n break;\n case Detail.BODY_CHAPTERS_INFO_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new BodyChaptersInfoView(getActivity(), detail));\n break;\n case Detail.ABOUT_DEVELOPERS_TYPE:\n mExpandableView.addView(new DevelopersInfoView());\n break;\n case Detail.TOP_RECRUITERS_TYPE:\n mExpandableView.addView(new RecruitersInfoView(getActivity(), RecruiterListLab.getInstance()));\n break;\n }\n }\n\n return view;\n }", "public interface PopularMovieView {\n\n void displayMovieList(List<PopularMovieVO> movieVOList);\n\n void navigateToMovieDetail(PopularMovieVO movie);\n\n void showLoading();\n\n Context getContext();\n}", "private void setMovie() {\n Movie movie = getIntent().getExtras().getParcelable(MOVIE);\n Glide.with(mMoviePoster).setDefaultRequestOptions(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.ALL)).load(BuildConfig.IMG_DIR + movie.getPosterPath())\n .into(mMoviePoster);\n setTitle(movie.getTitle());\n mMovieTitle.setText(movie.getTitle());\n mMovieRating.setText(String.valueOf(movie.getVoteAverage()));\n mMovieDate.setText(movie.getReleaseDate());\n mMovieGenre.setText(movie.isAdult() ? getString(R.string.genre_type_adults) : getString(R.string.genre_type_all));\n mMovieDesc.setText(movie.getOverview());\n }", "public void buildSections(ActivityDetailsResponse activityDetailsResponse) {\n\t\tint maxLines = getResources().getInteger(R.integer.lx_detail_content_description_max_lines);\n\n\t\tresetSections();\n\t\tif (Strings.isNotEmpty(activityDetailsResponse.description)) {\n\t\t\tString descriptionContent = StrUtils.stripHTMLTags(activityDetailsResponse.description);\n\t\t\tdescription.bindData(getResources().getString(R.string.description_activity_details), descriptionContent,\n\t\t\t\tmaxLines);\n\t\t\tdescription.setVisibility(View.VISIBLE);\n\t\t}\n\t\tif (Strings.isNotEmpty(activityDetailsResponse.location)) {\n\t\t\tString locationContent = StrUtils.stripHTMLTags(activityDetailsResponse.location);\n\t\t\tlocation.bindData(getResources().getString(R.string.location_activity_details), locationContent, 0);\n\t\t\tlocation.setVisibility(View.VISIBLE);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(activityDetailsResponse.highlights)) {\n\t\t\tCharSequence highlightsContent = StrUtils.generateBulletedList(activityDetailsResponse.highlights);\n\t\t\thighlights\n\t\t\t\t.bindData(getResources().getString(R.string.highlights_activity_details), highlightsContent, maxLines);\n\t\t\thighlights.setVisibility(View.VISIBLE);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(activityDetailsResponse.inclusions)) {\n\t\t\tCharSequence inclusionsContent = StrUtils.generateBulletedList(activityDetailsResponse.inclusions);\n\t\t\tinclusions.bindData(getResources().getString(R.string.inclusions_activity_details), inclusionsContent, 0);\n\t\t\tinclusions.setVisibility(View.VISIBLE);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(activityDetailsResponse.exclusions)) {\n\t\t\tCharSequence exclusionsContent = StrUtils.generateBulletedList(activityDetailsResponse.exclusions);\n\t\t\texclusions.bindData(getResources().getString(R.string.exclusions_activity_details), exclusionsContent, 0);\n\t\t\texclusions.setVisibility(View.VISIBLE);\n\t\t}\n\t\tif (CollectionUtils.isNotEmpty(activityDetailsResponse.knowBeforeYouBook)) {\n\t\t\tCharSequence knowBeforeYouBookContent = StrUtils.generateBulletedList(\n\t\t\t\tactivityDetailsResponse.knowBeforeYouBook);\n\t\t\tknowBeforeYouBook.bindData(getResources().getString(R.string.know_before_you_book_activity_details),\n\t\t\t\tknowBeforeYouBookContent, 0);\n\t\t\tknowBeforeYouBook.setVisibility(View.VISIBLE);\n\t\t}\n\t\tString cancellationPolicyText = LXDataUtils\n\t\t\t.getCancelationPolicyDisplayText(getContext(), activityDetailsResponse.freeCancellationMinHours);\n\t\tcancellation.bindData(getResources().getString(R.string.cancellation_policy),\n\t\t\tcancellationPolicyText, 0);\n\t\tcancellation.setVisibility(View.VISIBLE);\n\n\t\tint datesScrollerDrawable =\n\t\t\tCollectionUtils.isNotEmpty(activityDetailsResponse.highlights) ? R.drawable.lx_dates_container_background\n\t\t\t\t: R.drawable.lx_dates_container_background_no_top_border;\n\t\tofferDatesScrollView.setBackground(getResources().getDrawable(datesScrollerDrawable));\n\t}", "private void loadData() {\n if (mItem != null) {\n Picasso.with(getActivity()).load(mItem.getPictureFile()).\n placeholder(R.drawable.loading)\n .error(R.drawable.error)\n .fit() //\n .into(((ImageView) getView().findViewById(R.id.detailImageView)));\n ((EditText) getView().findViewById(R.id.visitstextView))\n .setText(\"\" + mItem.getVisits());\n\n ((TextView) getView().findViewById(R.id.detailTextView))\n .setText(\"\" + mItem.getTitle());\n ((RatingBar) getView().findViewById(R.id.detailsratingBar)).setRating((float) mItem.getRating());\n\n ReviewModelAdapter mReviewAdapter = new ReviewModelAdapter(getActivity(), R.id.txt_line1);\n try {\n mReviewAdapter.addAll(mItem.getReviews(getActivity()).all().toList());\n } catch (Exception e) {\n\n }\n ((ListView) getView().findViewById(R.id.detailsreviewlistview)).setAdapter(mReviewAdapter);\n\n\n }\n }", "private void prepareLayoutForNoVideoAndNoThumbnail() {\n mBinding.tvDesc.setText(vm.getStep().getDescription());\n mBinding.exoplayer.setVisibility(View.GONE);\n mBinding.ivRecipeImage.setVisibility(View.GONE);\n /*If it came here then we cannot display a video */\n }", "@OnClick(R.id.ivPosterPortrait)\n public void onClick(View v) {\n if (mMainActivity.ismTwoPane()) {\n Bundle arguments = new Bundle();\n arguments.putParcelable(MovieDetailFragment.ARG_MOVIE, mItem);\n Fragment fragment = new MovieDetailFragment();\n fragment.setArguments(arguments);\n mMainActivity.getSupportFragmentManager().beginTransaction()\n .replace(R.id.movie_detail_container, fragment)\n .commit();\n lastClicked = position;\n } else {\n //Starting Details Activity\n Context context = v.getContext();\n Intent intent = new Intent(context, MovieDetailActivity.class);\n intent.putExtra(MovieDetailFragment.ARG_MOVIE, mItem);\n context.startActivity(intent);\n }\n }", "private void setupAdapter() {\n FullWidthDetailsOverviewRowPresenter detailsPresenter;\n if (isIncomingRequest || isOutgoingRequest) {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactRequestDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n } else {\n detailsPresenter = new FullWidthDetailsOverviewRowPresenter(\n new TVContactDetailPresenter(),\n new DetailsOverviewLogoPresenter());\n }\n\n detailsPresenter.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.grey_900));\n detailsPresenter.setInitialState(FullWidthDetailsOverviewRowPresenter.STATE_HALF);\n\n // Hook up transition element.\n Activity activity = getActivity();\n if (activity != null) {\n FullWidthDetailsOverviewSharedElementHelper mHelper = new FullWidthDetailsOverviewSharedElementHelper();\n mHelper.setSharedElementEnterTransition(activity, TVContactActivity.SHARED_ELEMENT_NAME);\n detailsPresenter.setListener(mHelper);\n detailsPresenter.setParticipatingEntranceTransition(false);\n prepareEntranceTransition();\n }\n\n detailsPresenter.setOnActionClickedListener(action -> {\n if (action.getId() == ACTION_CALL) {\n presenter.contactClicked();\n } else if (action.getId() == ACTION_DELETE) {\n presenter.removeContact();\n } else if (action.getId() == ACTION_CLEAR_HISTORY) {\n presenter.clearHistory();\n } else if (action.getId() == ACTION_ADD_CONTACT) {\n presenter.onAddContact();\n } else if (action.getId() == ACTION_ACCEPT) {\n presenter.acceptTrustRequest();\n } else if (action.getId() == ACTION_REFUSE) {\n presenter.refuseTrustRequest();\n } else if (action.getId() == ACTION_BLOCK) {\n presenter.blockTrustRequest();\n }\n });\n\n ClassPresenterSelector mPresenterSelector = new ClassPresenterSelector();\n mPresenterSelector.addClassPresenter(DetailsOverviewRow.class, detailsPresenter);\n mPresenterSelector.addClassPresenter(ListRow.class, new ListRowPresenter());\n mAdapter = new ArrayObjectAdapter(mPresenterSelector);\n setAdapter(mAdapter);\n }", "private void initLayoutData() {\n\t\tImageLoader.getInstance().displayImage(squareLiveModel.getVideoIco(), iv_user_logo, BaseApp.circleOptions);\n\t\tif (squareLiveModel!=null && squareLiveModel.getTitle().split(\" \").length>1) {\n\t\t\ttv_main_title.setText(squareLiveModel.getTitle().split(\" \")[1]);\n\t\t} else {\n\t\t\ttv_main_title.setText(squareLiveModel.getTitle());\n\t\t}\n\t\t\n\t\ttv_subtitle.setText(squareLiveModel.getSubTitle());\n\t\ttv_look_num.setText(squareLiveModel.getChatPeopleCount()+\"\");\n\t\t\n\t\t\n\t\t//0:未开始,1:进行中 2:已结束\n\t\tif (squareLiveModel.getEventsProgress() == 0) {//未开始\n\t\t\ttv_status.setText(\"距离开始\"+ DateHelper.getIntervalDays(squareLiveModel.getEventsStart()));\n\t\t} else if (squareLiveModel.getEventsProgress() == 1) {//进行中\n\t\t\ttv_status.setText(\"进行中\");\n\t\t} else if (squareLiveModel.getEventsProgress() == 2) {//已结束\n\t\t\ttv_status.setText(\"已经结束\");\n\t\t}\n\t}", "private void dg_ui_detail_banner(RecyclerView.ViewHolder viewHolder, ArticleBean bean) {\n DG_DetailBannerViewHolder dg_banner_vh = (DG_DetailBannerViewHolder) viewHolder;\n dg_banner_vh.mMultiMediaButton.setVisibility(View.GONE);\n boolean isAppExclusive = bean.getSid() != null && bean.getSid().equals(\"\" + THPConstants.APP_EXCLUSIVE_SECTION_ID);\n if (isAppExclusive) {\n dg_banner_vh.mTitleTextView.setText(ResUtil.htmlText(\"<i>\" + \"\\\"\" + bean.getTi() + \"\\\"\" + \"</i>\"));\n dg_banner_vh.mTitleTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 25);\n dg_banner_vh.mAuthorTextView.setVisibility(View.GONE);\n dg_banner_vh.mUpdatedTextView.setVisibility(View.GONE);\n dg_banner_vh.mCreatedDateTextView.setVisibility(View.GONE);\n dg_banner_vh.mHeaderImageView.setVisibility(View.GONE);\n dg_banner_vh.mCaptionTextView.setVisibility(View.GONE);\n dg_banner_vh.mCaptionDevider.setVisibility(View.GONE);\n } else {\n dg_banner_vh.mTitleTextView.setText(bean.getTi());\n dg_banner_vh.mArticleLocationView.setText(bean.getLocation());\n String author = bean.getAu();\n if (author != null && !TextUtils.isEmpty(author)) {\n dg_banner_vh.mAuthorTextView.setVisibility(View.VISIBLE);\n dg_banner_vh.mAuthorTextView.setText(author.replace(\",\\n\", \" | \").replace(\",\", \" | \"));\n } else {\n dg_banner_vh.mAuthorTextView.setVisibility(View.GONE);\n }\n\n dg_banner_vh.mUpdatedTextView.setText(AppDateUtil.getTopNewsFormattedDate(AppDateUtil.changeStringToMillisGMT(bean.getPd())));\n dg_banner_vh.mCreatedDateTextView.setText(AppDateUtil.getPlaneTopNewsFormattedDate(AppDateUtil.changeStringToMillis(bean.getOd())));\n\n final ArrayList<MeBean> mImageList = bean.getMe();\n\n\n if (mImageList != null && mImageList.size() > 0) {\n String imageUrl = mImageList.get(0).getIm_v2();\n if (!ResUtil.isEmpty(imageUrl)) {\n PicassoUtil.loadImageWithFilePH(dg_banner_vh.itemView.getContext(), dg_banner_vh.mHeaderImageView, imageUrl);\n } else {\n dg_banner_vh.mHeaderImageView.setVisibility(View.GONE);\n }\n\n String caption = mImageList.get(0).getCa();\n if (caption != null && !TextUtils.isEmpty(caption)) {\n dg_banner_vh.mCaptionTextView.setText(Html.fromHtml(caption));\n } else {\n dg_banner_vh.mCaptionTextView.setVisibility(View.GONE);\n }\n }\n dg_banner_vh.mHeaderImageView.setOnClickListener(v -> IntentUtil.openVerticleGalleryActivity(v.getContext(), mImageList, mFrom));\n }\n }", "public interface MovieDetailView extends MvpView {\n void bindCastMembers(CreditsResponse movieResponse);\n\n void bindMovieDetails(MovieDetails movieResponse);\n\n void bindRecommendations(MovieResponse movieResponse);\n}", "@Override\n public void onClick(View v) {\n MainActivity.getMainActivity().loadDetailScreen(station);\n\n }", "@Override\n\tpublic void initView() {\n\t\tIntent intent=getIntent();\n\t\tString title=intent.getStringExtra(\"title\");\n\t\tcontext=intent.getStringExtra(\"context\");\n\t\tsetTitle(title);\n\t\tsetGone();\n\t\tsetBack();\n\t\tlist=new ArrayList<GameFighterBean>();\n\t\ttopNewsMoreLV = (LoadListViewnews) findViewById(R.id.lv_more_topnew);\n\t\txuanshou_quanbu_wu = (Button) findViewById(R.id.xuanshou_quanbu_wu);\n\t\txuanshou_quanbu_wu.setVisibility(View.VISIBLE);\n\t\tinitNetwork(context);\n\n\t}", "private void updateDetails(Intent intent) {\n title = intent.getStringExtra(\"title\");\n overView = intent.getStringExtra(\"overview\");\n date = intent.getStringExtra(\"date\");\n rating = intent.getStringExtra(\"rating\");\n String image = intent.getStringExtra(\"image\");\n String id = intent.getStringExtra(\"id\");\n mid = id;\n\n Log.i(\"MovieDetailActivity-output\", title);\n Log.i(\"MovieDetailActivity-output\", overView);\n Log.i(\"MovieDetailActivity-output\", date);\n Log.i(\"MovieDetailActivity-output\", rating);\n Log.i(\"MovieDetailActivity-output\", image);\n Log.i(\"MovieDetailActivity-output\", id);\n\n TextView titleTextView = findViewById(R.id.title);\n TextView dateTextView = findViewById(R.id.date);\n TextView ratingTextView = findViewById(R.id.rating);\n TextView overViewTextView = findViewById(R.id.overView);\n ImageView imageView = findViewById(R.id.image);\n titleTextView.setText(title);\n dateTextView.setText(\"Release Date:\" + date);\n ratingTextView.setText(\"Rating: \" + rating);\n overViewTextView.setText(overView);\n\n Picasso.get().load(image).placeholder(R.drawable.load5).into(imageView);\n\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\tView rootView = inflater.inflate(R.layout.fragment_exploredetails,\n\t\t\t\tcontainer, false);\n\n\t\tWindowManager wm = (WindowManager) getActivity().getSystemService(\n\t\t\t\tContext.WINDOW_SERVICE);\n\t\tDisplay display = wm.getDefaultDisplay();\n\t\tPoint size = new Point();\n\t\tdisplay.getSize(size);\n\t\tscreenWidth = size.x;\n\t\tscreenHeight = size.y / 2;\n\n\t\tplace_title = (TextView) rootView.findViewById(R.id.place_title);\n\t\ttext_walk = (TextView) rootView.findViewById(R.id.text_walk);\n\t\ttext_duration = (TextView) rootView.findViewById(R.id.text_duration);\n\t\ttext_accessible = (TextView) rootView.findViewById(R.id.text_);\n\t\ttxt_eventdetails = (TextView) rootView\n\t\t\t\t.findViewById(R.id.txt_eventdetails);\n\t\timg_imagedetls = (ImageView) rootView.findViewById(R.id.img_imagedetls);\n\t\ttext_time = (TextView) rootView.findViewById(R.id.text_time);\n\t\tdynamic_innerlayout = (RelativeLayout) rootView\n\t\t\t\t.findViewById(R.id.dynamic_innerlayout);\n\t\ttvStartTheTrail = (TextView) rootView\n\t\t\t\t.findViewById(R.id.tvStartTheTrail);\n\t\trlBannerImage = (RelativeLayout) rootView\n\t\t\t\t.findViewById(R.id.rlBannerImage);\n\t\tpageTitle = (String) getActivity().getIntent().getExtras()\n\t\t\t\t.get(\"PAGETITLE\");\n\n\t\tif (pageTitle.equals(\"Facilities\")) {\n\t\t\ttext_time.setVisibility(View.VISIBLE);\n\t\t\tdynamic_innerlayout.setVisibility(View.GONE);\n\t\t} else {\n\t\t\ttext_time.setVisibility(View.GONE);\n\t\t\tdynamic_innerlayout.setVisibility(View.VISIBLE);\n\t\t}\n\n\t\tif (LLDCApplication.selectedModel.getModelType() == LLDCApplication.TRAILS) {\n\t\t\t/*\n\t\t\t * if (LLDCApplication.isInsideThePark || LLDCApplication.isDebug) {\n\t\t\t * tvStartTheTrail.setVisibility(View.VISIBLE); } else {\n\t\t\t * tvStartTheTrail.setVisibility(View.GONE); }\n\t\t\t */\n\t\t\ttvStartTheTrail.setVisibility(View.VISIBLE);\n\t\t\tmExploreDetailsFragHandler.sendEmptyMessageDelayed(1101, 300000);\n\t\t} else {\n\t\t\ttvStartTheTrail.setVisibility(View.GONE);\n\t\t}\n\n\t\timg_imagedetls.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\n\t\t\t\tif (pageTitle.equals(\"Trails\")) {\n\t\t\t\t\tif (!LLDCApplication.isInsideThePark\n\t\t\t\t\t\t\t&& !LLDCApplication.isDebug) {\n\t\t\t\t\t\tLLDCApplication\n\t\t\t\t\t\t\t\t.onShowToastMesssage(\n\t\t\t\t\t\t\t\t\t\tgetActivity(),\n\t\t\t\t\t\t\t\t\t\t\"Navigation will not function as it appears you are outside of the park or your GPS is not active.\");\n\t\t\t\t\t} else if (LLDCApplication.selectedModel.getWyapoitnList()\n\t\t\t\t\t\t\t.size() > 0) {\n\t\t\t\t\t\tIntent intent = new Intent(getActivity(),\n\t\t\t\t\t\t\t\tMapNavigationActivity.class);\n\t\t\t\t\t\tintent.putExtra(\"PAGETITLE\", \"Trails\");\n\t\t\t\t\t\tgetActivity().startActivity(intent);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLLDCApplication.onShowToastMesssage(getActivity(),\n\t\t\t\t\t\t\t\t\"Trail data is not present.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tonLoadData();\n\t\treturn rootView;\n\t}", "@Override\n protected void initView() {\n view.setVideoThumbnail(model.getThumbnail());\n\n if (isInFocus) {\n playOrPauseVideoIfMomentIsInFocus();\n }\n\n view.setMomentTitle(model.getTitle());\n view.setCounterTimeText(\"\" + Math.round((model.getEndTimeMs() - model.getStartTimeMs())/ TimeUtil.MS_IN_SECOND));\n\n view.setState(isInFocus);\n }", "@Override\n public void onClick(View v) {\n int position = getAdapterPosition();\n Movies movies = mData.get(position);\n\n movies.setTitle(movies.getTitle());\n movies.setOverview(movies.getOverview());\n\n Intent intent = new Intent(itemView.getContext(), DetailMovieActivity.class);\n intent.putExtra(DetailMovieActivity.EXTRA_MOVIE, movies);\n itemView.getContext().startActivity(intent);\n }", "public interface MovieDetailsView extends MvpLceView<MovieItem> {\n}", "public static void setAllDetails(FullMovieInfo movie){\n\n\n head.setText(movie.getSubject());\n description.setText(movie.getBody());\n\n if (movie.getUrl().equals(\"\")) {\n image.setBackgroundResource(R.drawable.nopic);\n image.getBackground().setAlpha(150);\n } else {\n new DownloadImageTask(activity,l,context, image, movie.getUrl()).execute();\n }\n\n String voteText;\n if(0==movie.getVote_average()){//check if there are an available score\n rate.setVisibility(View.GONE);\n vote.setVisibility(View.VISIBLE);\n voteText = activity.getString(R.string.noinfomration2);\n }else {\n voteText = movie.getVote_average()+\"\";\n if((float)6<=movie.getVote_average()){//check if the score is high or low and paint the color red\\green in result\n movieLinear.setBackgroundResource(R.drawable.layoutstylegreen);\n }else{\n movieLinear.setBackgroundResource(R.drawable.layoutstylered);\n }\n }\n//-----------------all string is from the strings values so i could change language\n vote.setText(activity.getString(R.string.score)+\" \"+voteText);\n rate.setNumStars(5);\n rate.setMax(5);\n float rating = (float) 0.5*movie.getVote_average();\n rate.setStepSize((float)0.05);\n rate.setRating(rating);\n date.setText(activity.getString(R.string.releasedate)+\" \"+movie.getRelease_date());\n String money;\n if(0==movie.getBudget()){\n money = activity.getString(R.string.noinformation);\n }else {\n money = movie.getBudget() + \"\";\n }\n budget.setText(activity.getString(R.string.budget)+\" \"+money);\n if(0!=movie.getRuntime()) {\n int hours = movie.getRuntime() / 60;\n int minutes = movie.getRuntime() % 60;\n runtime.setText(activity.getString(R.string.movielenght)+\" \" + hours+\" \" + activity.getString(R.string.movielength2)+\" \" + minutes+\" \" + activity.getString(R.string.movielength3)+\" \");\n }else{\n runtime.setText(R.string.noinformationexisted);\n }\n\n movieName = movie.getSubject().toString();\n movieScore = movie.getVote_average()+\"\";\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tArrayList<VideoInfo> videoinfo = new ArrayList<VideoInfo>();\n\t\t\t\tfor(int i = 0;i<now_source.size();i++){\n\t\t\t\t\tVideoInfo vinfo = new VideoInfo();\n\t\t\t\t\tvinfo.title = now_source.get(i).getTitle();\n\t\t\t\t\tvinfo.url = now_source.get(i).getUrl();\n\t\t\t\t\tvideoinfo.add(vinfo);\n\t\t\t\t}\n\t\t\t\tif(null!=videoinfo&&videoinfo.size()>0){\n\t\t\t\t\tIntent intent = null;\n\t\t\t\t\tintent = new Intent(VodDetailsActivity.this,WebVideoPlayerActivity.class);\n//\t\t\t\t\tif(null!=domain && domain.contains(\"pps\")||domain.contains(\"qiyi\")){\n//\t\t\t\t\t\tintent = new Intent(VodDetailsActivity.this,MeidaActivity.class);\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tintent = new Intent(VodDetailsActivity.this,VideoPlayerActivity.class);\n//\t\t\t\t\t}\n\t\t\t\t\tintent.putParcelableArrayListExtra(\"videoinfo\",videoinfo);//数据集合\n\t\t\t\t\tintent.putExtra(\"albumPic\",albumPic);//图片路径\n\t\t\t\t\tintent.putExtra(\"vodtype\", vodtype);//影片类型\n\t\t\t\t\tintent.putExtra(\"vodstate\", vodstate);//影片情势\n\t\t\t\t\tintent.putExtra(\"nextlink\", nextlink);\n\t\t\t\t\tintent.putExtra(\"videoId\", videoId);//影片ID\n\t\t\t\t\tintent.putExtra(\"vodname\", vodname);//电影的名字\n\t\t\t\t\tintent.putExtra(\"sourceId\", sourceId);//源id\n\t\t\t\t\tintent.putExtra(\"domain\", domain);//domain\n\t\t\t\t\tintent.putExtra(\"playIndex\",gv_postion*10+position);//剧集标\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\toverridePendingTransition(android.R.anim.fade_in,android.R.anim.fade_out);\n\t\t\t\t}else{\n\t\t\t\t\tUtils.showToast(context,\n\t\t\t\t\t\t\t\"对不起!没有找到数据源,请切换其它源。\",\n\t\t\t\t\t\t\tR.drawable.toast_err);\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onDetailButtonClick(TextView aDetailTextView, int aMovieId) {\n // The user has clicked the detail button. Slide the detail button up to hide it.\n Animation slideOut = AnimationUtils.loadAnimation(getContext(), R.anim.detail_button_slide_up);\n aDetailTextView.startAnimation(slideOut);\n aDetailTextView.setVisibility(View.INVISIBLE);\n\n // Now open the MovieDetailActivity and pass the current movie information to it\n Intent intent = new Intent(getContext(), MovieDetailActivity.class);\n Bundle extras = new Bundle();\n extras.putInt(\"EXTRA_MOVIE_ID\", aMovieId);\n intent.putExtras(extras);\n startActivity(intent);\n }", "void displayDetails(String title, String description);", "public interface DetailListMvpView extends MvpView {\n\n void loadDetailCoach(Coaches coaches);\n}", "@Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id) {\n Toast.makeText(getActivity(), data.get(pos).get(\"Desc\"), Toast.LENGTH_SHORT).show();\n Intent i = new Intent(getActivity(), DetailActivity.class);\n i.putExtra(\"Play\",data.get(pos).get(\"Desc\"));\n i.putExtra(\"Detail\",data.get(pos).get(\"Player\"));\n i.putExtra(\"Category\",\"Diversity\");\n i.putExtra(\"Img\",data.get(pos).get(\"Imagemain\"));\n startActivity(i);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n if(savedInstanceState != null) {\n mStepArrayList = savedInstanceState.getParcelableArrayList(STEP_LIST_KEY);\n mListIndex = savedInstanceState.getInt(LIST_INDEX_KEY);\n playWhenReady = savedInstanceState.getBoolean(PLAY_WHEN_READY_KEY);\n if(!(mStepArrayList.get(mListIndex).mVideoUrl.equals(\"\"))) {\n videoPosition = savedInstanceState.getLong(VIDEO_POSITION_KEY);\n }\n }\n\n // Inflate the layout for this fragment\n View rootView = inflater.inflate(R.layout.fragment_step_description, container, false);\n\n ButterKnife.bind(this,rootView);\n\n if(mStepArrayList != null){\n if(mStepArrayList.get(mListIndex).mVideoUrl.equals(\"\")){\n //step does not contain video\n mVideoView.setVisibility(View.GONE);\n if (!(mStepArrayList.get(mListIndex).mThumbnailUrl.equals(\"\"))) {\n //step contains thumbnail image\n mStepThumbnailImageView.setVisibility(View.VISIBLE);\n showImage(mStepArrayList.get(mListIndex).mThumbnailUrl);\n }\n } else {\n //step contains video\n mStepThumbnailImageView.setVisibility(View.GONE);\n initializeExoPlayer(Uri.parse(mStepArrayList.get(mListIndex).mVideoUrl));\n }\n\n mDescriptionTextView.setText(mStepArrayList.get(mListIndex).mDescription);\n\n\n if(DetailsActivity.IS_TABLET) {\n mFabPrev.setVisibility(View.GONE);\n mFabNext.setVisibility(View.GONE);\n } else {\n //goes to next step\n mFabNext.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n if (mListIndex == (mStepArrayList.size() - 1)) {\n if(mToast != null){\n mToast.cancel();\n }\n mToast = Toast.makeText(getActivity(),\n \"This is Last Step\", Toast.LENGTH_SHORT);\n mToast.show();\n\n } else {\n mListIndex++;\n }\n mListener.onFragmentInteraction(mListIndex);\n }\n });\n\n //goes to previous step\n mFabPrev.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mListIndex == 0) {\n if(mToast != null){\n mToast.cancel();\n }\n mToast = Toast.makeText(getActivity(),\n \"This is First Step\", Toast.LENGTH_SHORT);\n mToast.show();\n\n } else {\n mListIndex--;\n }\n mListener.onFragmentInteraction(mListIndex);\n }\n });\n }\n }\n\n return rootView;\n }", "private void showMovieContent(View rootView, int movieId) {\n // For showing the movie content quickly,\n // some data are fetched from the intent object directly instead of being retrieved from server\n ((TextView) rootView.findViewById(R.id.tvMovieOverview)).setText(mMovie.getOverview());\n ((TextView) rootView.findViewById(R.id.tvYear)).setText(mMovie.getReleaseDate());\n ((TextView) rootView.findViewById(R.id.tvVoteAverage)).setText(String.valueOf(mMovie.getVoteAverage() + \"/10\"));\n\n BitmapImageViewTarget biv = new BitmapImageViewTarget((ImageView) rootView.findViewById(R.id.ivMovieThumbnail)) {\n @Override\n protected void setResource(Bitmap resource) {\n RoundedBitmapDrawable circularBitmapDrawable =\n RoundedBitmapDrawableFactory.create(getContext().getResources(), resource);\n circularBitmapDrawable.setCornerRadius(25);\n view.setImageDrawable(circularBitmapDrawable);\n }\n };\n Glide.with(getActivity()).load(mMovie.getPosterPath()).asBitmap().fitCenter()\n .into(biv);\n try {\n // Construct the URL for the query\n Uri.Builder uriBuilder = new Uri.Builder();\n uriBuilder.scheme(\"http\")\n .authority(\"api.themoviedb.org\")\n .appendPath(\"3\")\n .appendPath(\"movie\")\n .appendPath(String.valueOf(movieId))\n .appendQueryParameter(\"api_key\", BuildConfig.THE_MOVIE_DB_API_KEY);\n\n Log.i(LOG_TAG, uriBuilder.build().toString());\n\n URL url = new URL(uriBuilder.build().toString());\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.addRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setDoInput(true);\n new FetchMoiveTask().execute(urlConnection);\n }catch ( IOException e ){\n Log.e(LOG_TAG,\"error\", e);\n }\n }", "@Override\n public void onClick(View v) {\n if (storyBean.isRead() == 0) {\n mDailyCache.execSQL(DailyTable.updateReadFlag(storyBean.getTitle(),1));\n // mDailyCache.setIsRead(storyBean);\n holder.title.setTextColor(ContextCompat.getColor(mContext,R.color.color_read));\n }\n // debug for new details layout\n // Intent intent = new Intent(mContext,DailyDetailsActivity.class);\n Intent intent = new Intent(mContext, DailyDetails.class);\n Bundle bundle = new Bundle();\n bundle.putString(\"url\", DailyApi.daily_details_url + storyBean.getID());\n bundle.putString(\"title\", storyBean.getTitle());\n bundle.putString(\"body\", storyBean.getBody());\n bundle.putString(\"imageUrl\", storyBean.getLargepic());\n bundle.putString(\"id_small_image\", storyBean.getImages()[0]);\n bundle.putInt(\"id\", storyBean.getID());\n bundle.putInt(\"isRead\",storyBean.isRead());\n\n if (isCollection) {\n bundle.putBoolean(\"Collection\", true);\n } else {\n bundle.putBoolean(\"Collection\", storyBean.isCollected() == 1 ? true : false);\n }\n\n intent.putExtras(bundle);\n mContext.startActivity(intent);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_movie_details, container, false);\n\n\n movieTitle = (TextView) view.findViewById(R.id.detail_movie_title);\n movieReleaseYear = (TextView) view.findViewById(R.id.detail_movie_year);\n movieLength = (TextView) view.findViewById(R.id.detail_movie_length);\n movieRating = (TextView) view.findViewById(R.id.detail_movie_rating);\n moviePoster = (ImageView) view.findViewById(R.id.detail_movie_poster);\n movieOverview = (TextView) view.findViewById(R.id.detail_movie_overview);\n\n\n\n\n\n\n return view;\n }", "public interface DetailView {\n void onDetailLoaded();\n}", "private void updateVideo() {\n ArrayList<String> movieVideoArrayList = new ArrayList<String>();\n videoRecyclerView = findViewById(R.id.trailer_recycler_view);\n videoRecyclerView.setLayoutManager(new GridLayoutManager(this, 4));\n movieVideoAdapter = new MovieVideoAdapter(movieVideoArrayList, MovieDetailActivity.this);\n videoRecyclerView.setAdapter(movieVideoAdapter);\n }", "public void getSceneDetails() {\n Intent sceneIntent = getIntent();\n //TODO: set member strings = intent extras\n storyId = sceneIntent.getStringExtra(\"storyId\");\n chapterId = sceneIntent.getStringExtra(\"chapterId\");\n sceneId = sceneIntent.getStringExtra(\"selectedSceneId\");\n\n getAllFormFields();\n\n setSceneFormFields();\n }", "private void initActivities() {\n MainController mainController = new MainController();\n int n = mainController.getActivitiesByOwner(LoggedUser.getUser().getUsername()).size();\n panel = new JPanel(new GridLayout(n, 2, 10, 10));\n add(panel);\n for (int i = n - 1; i >= 0; i--) {\n panel.add(new JLabel(\" \" + mainController.getActivitiesByOwner\n (LoggedUser.getUser().getUsername()).get(i).getActivity()));\n panel.add(new JLabel(mainController.getActivitiesByOwner\n (LoggedUser.getUser().getUsername()).get(i).getTime() + \" \"));\n }\n }", "@Override\n\tprotected int initView() {\n\t\treturn R.layout.activity_zhusu_detail;\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_details);\n\n Intent intent = getIntent();\n Uri data = intent.getData();\n String key = intent.getStringExtra(SearchManager.EXTRA_DATA_KEY);\n if (data != null && key != null) {\n\n if (data.toString().equals(\"homeview://plex/playback\")) {\n\n Intent next = new Intent(this, PlaybackActivity.class);\n next.setAction(PlaybackActivity.ACTION_VIEW);\n next.putExtra(PlaybackActivity.KEY, key);\n PlexVideoItem vid = intent.getParcelableExtra(PlaybackActivity.VIDEO);\n if (vid != null)\n next.putExtra(PlaybackActivity.VIDEO, vid);\n startActivity(next);\n }\n }\n }", "@Override\n public void onClick(View v) {\n if (arg0 == 0) {//清理缓存\n final String filePath = Environment.getExternalStorageDirectory().getPath()+\"/video\";\n DataCleanManager.cleanApplicationData(Setinfo_Activity.this, filePath);\n try {\n //获取缓存大小\n notifyDataSetChanged();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n } else if (arg0 == 1) {//检查新版本\n presenter.getVersionInfo();\n } else if (arg0 == 2) { // 帮助与反馈\n Intent feedBackIntent = new Intent(Setinfo_Activity.this, FeedbackActivity.class);\n ScreenManager.getScreenManager().startPage(Setinfo_Activity.this, feedBackIntent, true);\n }else if(arg0 == 3){//关于我们\n\t\t\t\t\t\tIntent intent3 = new Intent(Setinfo_Activity.this,AboutMy_Activity.class);\n\t\t\t\t\t\tScreenManager.getScreenManager().startPage(Setinfo_Activity.this, intent3, true);\n\t\t\t\t\t}\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 }", "public interface MoviesView {\n void showOrHideProgress(boolean show);\n void networkError();\n void noInternet();\n void onMoviesLoaded(ArrayList<Movie> movieArrayList,boolean isFavourite);\n void noFavourites();\n}", "private void setupView() {\n refresh();\n if (isEmpty(movies)) {\n // Ok. so we have no movies. THat means one of two things. Either\n // we're trying to download the movies, or we tried and failed to\n // download them. In the former case just wait. We'll get a\n // notification when they're done. In the latter case, let the user\n // know.\n if (!isNullOrEmpty(getService().getUserAddress()) && getService().getDataProviderState() == DataProvider.State.Finished) {\n showNoInformationFoundDialog();\n }\n } else {\n setupMovieGrid();\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v=inflater.inflate(R.layout.fragment_video, container, false);\n\n names = getResources().getStringArray(R.array.names);\n profile_pics = getResources().obtainTypedArray(R.array.profile_pics);\n time = getResources().getStringArray(R.array.time);\n modelcardviewdetailsList = new ArrayList<>();\n for (int i = 0; i < names.length; i++) {\n Modelcardviewdetails modelcardviewdetails = new Modelcardviewdetails(names[i], time[i], profile_pics.getResourceId(i, -1));\n modelcardviewdetailsList.add(modelcardviewdetails);\n }\n\n recyclerview = (RecyclerView)v.findViewById(R.id.rcv_videos);\n LinearLayoutManager layoutManager = new LinearLayoutManager(container.getContext());\n recyclerview.setLayoutManager(layoutManager);\n AdapterCardview adapter = new AdapterCardview(modelcardviewdetailsList, getActivity());\n recyclerview.setAdapter(adapter);\n\n\n\n return v;\n }", "@Override\n public void onClickSubjectDetailListener(int position) {\n Intent intent = new Intent(SpecificSubjectActivity.this, VideoActivity.class);\n intent.putExtra(\"title\", mSubjectDetailList.get(position).getTitle());\n intent.putExtra(\"description\", mSubjectDetailList.get(position).getDescription());\n intent.putExtra(\"thumbnail\",mSubjectDetailList.get(position).getThumbnail());\n intent.putExtra(\"videoId\", mSubjectDetailList.get(position).getVideoId());\n startActivity(intent);\n }", "@Override\n public void onBindViewHolder(@NonNull ViewHolder viewHolder, int i) {\n // get movie data at specified position\n final Movie movie = movies.get(i); // get movie data specified position\n viewHolder.tvTitle.setText(movie.getTitle()); // sets viewholder's \"title\" to movie title\n viewHolder.tvOverview.setText(movie.getOverview());\n\n // determine the current orientation\n boolean isPortrait = context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT;\n\n\n\n // build url for poster image - combines base url with size and path\n String imageUrl = null;\n\n // if in portrait mode, load poster image:\n if (isPortrait) {\n imageUrl = config.getImageUrl(config.getPosterSize(), movie.getPosterPath());\n } else {\n imageUrl = config.getImageUrl(config.getBackdropSize(), movie.getBackdropPath());\n }\n\n // get correct placeholder and image\n int placeholderId = isPortrait ? R.drawable.flicks_movie_placeholder : R.drawable.flicks_backdrop_placeholder;\n ImageView imageView = isPortrait ? viewHolder.ivPosterImage : viewHolder.ivBackdropImage;\n // load image with glide!\n Glide.with(context)\n .load(imageUrl)\n .apply(RequestOptions.placeholderOf(placeholderId))\n .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(15, 0)))\n .apply(RequestOptions.errorOf(placeholderId))\n .into(imageView);\n // if you click on the image, opens youtube video\n imageView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) { // working on youtube part\n Intent intent = new Intent(context, MovieTrailerActivity.class); // makes intent\n\n // grab videolink\n//\n// String url = API_BASE_URL + \"/movie/\" + movie.getId() + \"/videos\"; // create url -- endpoint is videos\n// RequestParams params = new RequestParams();\n// params.put(API_KEY_PARAM, \"a07e22bc18f5cb106bfe4cc1f83ad8ed\"); // api key always required\n// client.get(url, params, new JsonHttpResponseHandler() {\n// @Override\n// public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n// try {\n// JSONArray results = response.getJSONArray(\"results\"); // root node\n// String video_key = results.getJSONObject(0).getString(\"key\");\n// Toast.makeText(context, video_key, Toast.LENGTH_SHORT).show();\n//\n// } catch (JSONException e) {\n// Toast.makeText(context, \"failed to retreive video\", Toast.LENGTH_SHORT).show();\n// }\n// }\n//\n// @Override\n// public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n// Toast.makeText(context, \"failed to retreive video\", Toast.LENGTH_SHORT).show();\n// }\n// });\n\n //intent.putExtra(Movie.class.getSimpleName(), Parcels.wrap(movie));\n // ^^ serializes movie using parceler. it uses short name as key, movie as value\n context.startActivity(intent); // start activity\n }\n });\n\n\n }", "public interface VideoContractView extends BaseContractView {\n\n void onLoadData(List<Card> news);\n\n void onShareClick(Card newsInfo);\n\n void onMoreFuncClick(Card newsInfo);\n\n void hideNextVideo();\n\n void nextVideo(View view);\n\n void clickView(View view);\n}", "@Override\n\t\tpublic void onClick(View v) {\n\n\t\t\tif (memreas_event_details_video_view.isPlaying()) {\n\t\t\t\tmemreas_event_details_video_view.pause();\n\t\t\t\tmemreas_event_details_video_view.setVisibility(View.GONE);\n\t\t\t\tmemreas_event_details_pager_image_view\n\t\t\t\t\t\t.setVisibility(View.VISIBLE);\n\t\t\t\tmemreas_event_details_pager_play_video_icon\n\t\t\t\t\t\t.setVisibility(View.VISIBLE);\n\t\t\t} else {\n\t\t\t\tmemreas_event_details_pager_framelayout.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\tmemreas_event_details_pager_image_view.setVisibility(View.GONE);\n\t\t\t\tmemreas_event_details_pager_play_video_icon\n\t\t\t\t\t\t.setVisibility(View.GONE);\n\t\t\t\t// mProgressDialog.setAndShow(\"preparing media...\");\n\t\t\t\tmemreas_event_details_video_view\n\t\t\t\t\t\t.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);\n\t\t\t\tmemreas_event_details_video_view.setVisibility(View.VISIBLE);\n\t\t\t\tmemreas_event_details_video_view.requestFocus();\n\t\t\t\tif (mediaController == null) {\n\t\t\t\t\tmediaController = new MediaController(context);\n\t\t\t\t}\n\t\t\t\tmemreas_event_details_video_view.setVideoURI(Uri\n\t\t\t\t\t\t.parse(media_url));\n\t\t\t\tmediaController.setAnchorView(memreas_event_details_video_view);\n\t\t\t\tmediaController\n\t\t\t\t\t\t.setMediaPlayer(memreas_event_details_video_view);\n\t\t\t\tmemreas_event_details_video_view\n\t\t\t\t\t\t.setMediaController(mediaController);\n\t\t\t\tmediaController.setEnabled(true);\n\t\t\t\tsetListeners();\n\t\t\t\tmemreas_event_details_video_view.requestLayout();\n\t\t\t\t// mProgressDialog.dismiss();\n\t\t\t}\n\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, MovieTrailerActivity.class); // makes intent\n\n // grab videolink\n//\n// String url = API_BASE_URL + \"/movie/\" + movie.getId() + \"/videos\"; // create url -- endpoint is videos\n// RequestParams params = new RequestParams();\n// params.put(API_KEY_PARAM, \"a07e22bc18f5cb106bfe4cc1f83ad8ed\"); // api key always required\n// client.get(url, params, new JsonHttpResponseHandler() {\n// @Override\n// public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n// try {\n// JSONArray results = response.getJSONArray(\"results\"); // root node\n// String video_key = results.getJSONObject(0).getString(\"key\");\n// Toast.makeText(context, video_key, Toast.LENGTH_SHORT).show();\n//\n// } catch (JSONException e) {\n// Toast.makeText(context, \"failed to retreive video\", Toast.LENGTH_SHORT).show();\n// }\n// }\n//\n// @Override\n// public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n// Toast.makeText(context, \"failed to retreive video\", Toast.LENGTH_SHORT).show();\n// }\n// });\n\n //intent.putExtra(Movie.class.getSimpleName(), Parcels.wrap(movie));\n // ^^ serializes movie using parceler. it uses short name as key, movie as value\n context.startActivity(intent); // start activity\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_details, container, false);\n ButterKnife.bind(this, rootView);\n Bundle b = getArguments();\n rate.setText(b.getString(\"user rating\"));\n release_data.setText(b.getString(\"release date\"));\n overview.setText(b.getString(\"overview\"));\n title.setText(b.getString(\"origin title\"));\n Picasso.with(getContext()).load(\"https://image.tmdb.org/t/p/w500\"+b.getString(\"movie poster\")).into(movie_poster);\n return rootView;\n }", "@Override\n public void onClick(View v) {\n\n Intent i = new Intent(context, DetailActivity.class); //create intent to switch screen\n\n //trying to place movie into putExtra by putting it into Parcelable value (bc method can't take movie object)\n //we use Parcelable (go to AndroidStudio ref. where they have the code to allow u to use Parceler library\n //essentially, you place the implementation code into buildgradle file\n i.putExtra(\"movie\", Parcels.wrap(movie));\n //add @Parcel to Movie class and add empty constructor as shown in AU (android U) page + empty constructor\n //now you can go to DetailActivity to retrieve the whole movie object just by using an intent\n\n context.startActivity(i);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_step_detail, container, false);\n\n if (mShowNext || mShowPrevious) {\n rootView.findViewById(R.id.rl_button_bar).setVisibility(View.VISIBLE);\n Button btnPrevious = (Button) rootView.findViewById(R.id.btn_previous);\n btnPrevious.setVisibility(mShowPrevious ? View.VISIBLE : View.GONE);\n btnPrevious.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mButtonCallback.onClickPrevious();\n }\n });\n\n Button btnNext = (Button) rootView.findViewById(R.id.btn_next);\n btnNext.setVisibility(mShowNext ? View.VISIBLE : View.GONE);\n btnNext.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mButtonCallback.onClickNext();\n }\n });\n } else {\n rootView.findViewById(R.id.rl_button_bar).setVisibility(View.GONE);\n }\n\n mDetailView = (ScrollView) rootView.findViewById(R.id.sv_details);\n TextView title = (TextView) rootView.findViewById(R.id.tv_step_detail_title);\n TextView desc = (TextView) rootView.findViewById(R.id.tv_step_detail_description);\n\n title.setText(String.format(getString(R.string.steps_title_format), mStepNumber));\n String description = mStep.getId() > 0 ? mStep.getDescription().substring(3)\n : mStep.getDescription();\n desc.setText(description);\n\n String url;\n if ((url = mStep.getVideoURL()) != null) {\n mExoPlayerView = (SimpleExoPlayerView) rootView.findViewById(R.id.ep_step_video);\n\n mMediaReceiver = new MediaReceiver();\n getContext().registerReceiver(mMediaReceiver,\n new IntentFilter(Intent.ACTION_MEDIA_BUTTON));\n\n initializeMediaSession();\n boolean playWhenReady = false;\n long position = 0;\n if (savedInstanceState != null) {\n playWhenReady = savedInstanceState.getBoolean(EXTRA_PLAY_WHEN_READY);\n position = savedInstanceState.getLong(EXTRA_VIDEO_POSITION);\n }\n initializePlayer(Uri.parse(url), playWhenReady, position);\n mExoPlayerView.setVisibility(View.VISIBLE);\n } else if ((url = mStep.getThumbnailURL()) != null) {\n ImageView thumbnail = (ImageView) rootView.findViewById(R.id.iv_step_thumb);\n thumbnail.setVisibility(View.VISIBLE);\n Picasso.with(getContext()).load(Uri.parse(url)).fit().centerCrop().into(thumbnail);\n }\n\n displayLayoutForOrientation(getResources().getConfiguration().orientation);\n\n return rootView;\n }", "private void populateVideos(Bundle savedInstanceState) {\n LinearLayoutManager layoutManager =\n new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false);\n mBinding.movieVideos.videosList.setLayoutManager(layoutManager);\n mBinding.movieVideos.videosList.setHasFixedSize(true);\n mBinding.movieVideos.videosList.setNestedScrollingEnabled(false);\n\n RecyclerView.ItemDecoration itemDecoration = new HorizontalItemDecoration(this);\n mBinding.movieVideos.videosList.addItemDecoration(itemDecoration);\n\n mVideoAdapter = new VideoAdapter(this);\n mBinding.movieVideos.videosList.setAdapter(mVideoAdapter);\n\n if (savedInstanceState != null && savedInstanceState.containsKey(BUNDLE_VIDEOS)) {\n mVideoAdapter.addVideosList(savedInstanceState.\n <Video>getParcelableArrayList(BUNDLE_VIDEOS));\n if (mVideoAdapter.getItemCount() == 0) {\n mBinding.movieVideos.videosLabel.setVisibility(View.GONE);\n }\n } else {\n Call<ApiResponse<Video>> call = mApiClient.getVideos(movie.movieId);\n\n call.enqueue(new Callback<ApiResponse<Video>>() {\n @Override\n public void onResponse(Call<ApiResponse<Video>> call,\n Response<ApiResponse<Video>> response) {\n List<Video> result = response.body().results;\n mVideoAdapter.addVideosList(result);\n if (result.size() == 0) {\n mBinding.movieVideos.videosLabel.setVisibility(View.GONE);\n }\n }\n\n @Override\n public void onFailure(Call<ApiResponse<Video>> call, Throwable t) {\n Toast.makeText(DetailActivity.this,\n getString(R.string.connection_error), Toast.LENGTH_LONG).show();\n }\n });\n }\n }", "@Override\n\tprotected void initData() {\n\t\tisSearch = (boolean) getIntent().getExtras().getBoolean(Constant.IntentKey.isSearch,false);\n\t\t\n\t\tif (isSearch) {//非来自直播列表\n\t\t\tarticleID = getIntent().getExtras().getLong(Constant.IntentKey.articleID);\n//\t\t\tprogressActivity.showLoading();\n\t\t\t\n\t\t\t// 查询发现详情\n\t\t\tobtainDetailRequest();\n\t\t} else {\n\t\t\tsquareLiveModel = (SquareLiveModel) getIntent().getExtras().getSerializable(Constant.IntentKey.squareLiveModel);\n\t\t\t\n\t\t\tinitLoadView();\n\t\t}\n\t\t\n\t\t//启动定时器\n//\t\tinitTimerTask();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View mainView = inflater.inflate(R.layout.fragment_task_details, container, false);\n taskTitle = (TextView) mainView.findViewById(R.id.titleView);\n taskDetails = (TextView) mainView.findViewById(R.id.detailView);\n\n\n Bundle bundle = getArguments();\n tasks = bundle.getParcelable(\"DETAIL\");\n taskTitle.setText(tasks.title);\n taskDetails.setText(tasks.description);\n return mainView;\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 interface IMovieDetailContract {\n\n void onClickVideoListener(Uri videoUri);\n void onLongClickVideoListener(Uri videoUri);\n\n interface View extends BaseView {\n void showMovieReviews(ArrayList<Review> reviews);\n void showMovieVideos(ArrayList<Video> videos);\n ArrayList<Video> getMovieVideoList();\n ArrayList<Review> getMovieReviewList();\n }\n\n interface Presenter extends BasePresenter {\n }\n\n}", "private void initView() {\n mRetrofit = new Retrofit.Builder()\n .baseUrl(Challenge1Activity.MY_BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n mTextViewDisplayTopRated = findViewById(R.id.text_view_display_toprated_movies);\n\n mTextViewPrev = findViewById(R.id.text_view_prev);\n mTextViewCurrentAndMaxPage = findViewById(R.id.text_view_current_and_max_page);\n mTextViewNext = findViewById(R.id.text_view_next);\n }", "public interface IFragmentView {\n\n void setCategoryItems(List<PictureModel> list);\n\n String getTitle();\n\n}", "public interface SubTagMvpView extends MvpView {\n void showData(List<Data> datas);\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n v=inflater.inflate(R.layout.fragment_movie_detail, container, false);\n Toolbar toolbar = (Toolbar) v.findViewById(R.id.toolbar);\n ((AppCompatActivity)getActivity()).setSupportActionBar(toolbar);\n\n\n\n ((AppCompatActivity)getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n setHasOptionsMenu(true);\n\n TextView t1=(TextView)v.findViewById(R.id.toolbar_title1);\n Bundle bundle = getArguments();\n if (bundle != null) {\n t = bundle.getString(\"title\");// t= movies.getResults().get(p).getTitle(); //\n ov = bundle.getString(\"overview\");//ov=movies.getResults().get(p).getOverview(); //\n date = bundle.getString(\"release_date\");// d=movies.getResults().get(p).getReleaseDate();//\n posterpath = bundle.getString(\"poster_path\");\n avg = bundle.getDouble(\"vote_average\");// r=movies.getResults().get(p).getVoteAverage();//\n id=bundle.getInt(\"id\");// id=movies.getResults().get(p).getId(); //\n }\n movieName = (TextView) v.findViewById(R.id.moviename);\n movieName.setText(t);\n\n\n imageView = (ImageView) v.findViewById(R.id.imageView);\n url = \"http://image.tmdb.org/t/p/w185\" + posterpath;\n Picasso.with(getActivity()).load(url).into(imageView);\n movieselected.setPosterPath(posterpath);\n\n rate = (TextView) v.findViewById(R.id.rate1);\n String av=\"\"+avg;\n rate.setText(av);\n movieselected.setVoteAverage(avg);\n\n date1 = (TextView) v.findViewById(R.id.date);\n date1.setText(date);\n movieselected.setReleaseDate(date);\n\n overview = (TextView) v.findViewById(R.id.overview);\n overview.setText(\"overview : \"+ov);\n movieselected.setOverview(ov);\n\n //ScrollView scrollView = (ScrollView) v.findViewById(R.id);\n //scrollView.setVisibility(View.VISIBLE); //this make error */\n\n //trailer\n//TextView trailer=(TextView)v.findViewById(R.id.trailertext);\n //trailer.setText(\"Trailers:\");\n\n\n JsonObjectRequest request;\n url=\"https://api.themoviedb.org/3/movie/\"+id+\"/videos?api_key=c2214231a6f7fb99706b8c91e78aee39\";\n RequestQueue queue;\n queue= Volley.newRequestQueue(getContext());\n request=new JsonObjectRequest(url, null, new Response.Listener<JSONObject>(){\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n final ArrayList <String>youtublist=new ArrayList();\n final ArrayList <String>youtublist1=new ArrayList();\n JSONArray Idarray =response.getJSONArray(\"results\");\n int j=1;\n // youtublist1.add(\"Trailers :\");\n //youtublist.add(\"trailers\");\n for (int i = 0; i < Idarray.length(); i++) {\n JSONObject jsonmovie=Idarray.getJSONObject(i);\n\n String type=jsonmovie.getString(\"type\");\n\n String key=jsonmovie.getString(\"key\");\n\n\n if(type.equals(\"Trailer\"))\n {\n String urlYoutube=\"https://www.youtube.com/watch?v=\"+key;\n youtublist.add(urlYoutube);\n\n youtublist1.add(\"trailer #\"+j);\n j++;\n }\n else\n {\n continue;\n }\n\n }\n Toast.makeText(getContext(),\"You can press on any trailer to show short video \", Toast.LENGTH_SHORT).show();\n Trailer_andReviewAdapter Adapter1=new Trailer_andReviewAdapter(getActivity(),R.layout.trailerorreviewitem, youtublist1);\n list=(ListView)v.findViewById(R.id.listViewTr);\n list.setClickable(true);\n list.setAdapter(Adapter1);\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView <? > arg0, View view, int position, long id) {\n // When clicked, show youtup\n Intent i=new Intent(Intent.ACTION_VIEW, Uri.parse( youtublist.get(position)));\n startActivity(i);\n }\n\n });\n }\n\n\n catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n\n\n\n queue.add(request);\n//reviews\n // TextView review=(TextView)v.findViewById(R.id.rev);\n // review.setText(\"Reviews\");\n\n JsonObjectRequest request2;\n String url2=\"https://api.themoviedb.org/3/movie/\"+id+\"/reviews?api_key=c2214231a6f7fb99706b8c91e78aee39\";\n queue= Volley.newRequestQueue(getContext());\n request2=new JsonObjectRequest(url2, null, new Response.Listener<JSONObject>(){\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n final ArrayList <String>reviewlist=new ArrayList();\n JSONArray Idarray =response.getJSONArray(\"results\");\n\n reviewlist.add(\"Reviews :\");\n for (int i = 0; i < Idarray.length(); i++) {\n JSONObject jsonmovie=Idarray.getJSONObject(i);\n\n String authorname=jsonmovie.getString(\"author\");\n String review=jsonmovie.getString(\"content\");\n\n\n reviewlist.add(\"Author: \"+authorname+\" \"+\" \"+\" \"+\" \"+\" \"+\" \"+\" \"+review);\n }\n\n if(reviewlist.size()==1)\n {\n //Toast toast = Toast.makeText(getContext(),\"This film has not review\", Toast.LENGTH_SHORT);\n // toast.show();\n reviewlist.add(\"This movie has not any review\");\n }\n\n Trailer_andReviewAdapter Adapter2 = new Trailer_andReviewAdapter(getActivity(), R.layout.trailerorreviewitem, reviewlist);\n list2 = (ListView) v.findViewById(R.id.listViewRev);\n\n list2.setAdapter(Adapter2);\n\n }\n\n\n catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n\n\n\n queue.add(request2);\n\n\n ImageButton backbutton=(ImageButton)v.findViewById(R.id.backbutton);\n backbutton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i=new Intent(getActivity(),MainActivity.class);\n startActivity(i);\n }\n });\n\n\n\n\n\n\n/*//saveButton\n<Button\n android:layout_width=\"wrap_content\"\n android:layout_height=\"wrap_content\"\n android:id=\"@+id/savebtn\"\n android:layout_below=\"@id/date\"\n android:text=\"Mark as favourite\"\n android:layout_alignParentRight=\"true\"\n android:layout_marginTop=\"17dp\"\n />\n\n <Button\n android:layout_width=\"wrap_content\"\n android:layout_height=\"wrap_content\"\n android:id=\"@+id/unsavebtn\"\n android:layout_below=\"@id/savebtn\"\n android:text=\"Mark as unfavourite\"\n android:layout_alignParentRight=\"true\"\n android:layout_marginTop=\"17dp\"\n />\n */\n/*\n Button b=(Button)v.findViewById(R.id.savebtn);\n b.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n listener.favmovie(posterpath);\n\n }\n });\n\n /*\n <ImageButton android:id=\"@+id/favouritebtn\"\n android:layout_width=\"60dp\"\n android:layout_height=\"60dp\"\n android:layout_marginLeft=\"250dp\"\n android:src=\"@mipmap/ic_staroff\"\n android:background=\"#00ffffff\"\n android:onClick=\"onToggleStar\"\n android:clickable=\"true\"/>\n\n <ImageButton android:id=\"@+id/favbtn2\"\n android:layout_width=\"60dp\"\n android:layout_height=\"60dp\"\n android:layout_marginLeft=\"250dp\"\n android:src=\"@mipmap/ic_staroff\"\n android:background=\"#00ffffff\"\n android:onClick=\"onToggleStar\"\n android:clickable=\"true\"/>\n */\n /*\n final ImageButton im2 = (ImageButton) v.findViewById(R.id.favbtn2);\n final ImageButton im1 = (ImageButton) v.findViewById(R.id.favouritebtn);\n im1.setVisibility(View.VISIBLE);\n im2.setVisibility(View.INVISIBLE);\n im1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n /*boolean isFavourite = readState();\n\n if (isFavourite) {\n im.setBackgroundResource(R.mipmap.ic_staroff);\n isFavourite = false;\n saveState(isFavourite);\n\n } else {\n im.setBackgroundResource(R.mipmap.ic_staron);\n isFavourite = true;\n saveState(isFavourite);\n\n }\n im2.setVisibility(View.VISIBLE);\n im1.setVisibility(View.INVISIBLE);\n }\n }); */\n\n return v;\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tLogger.d(TAG, \"onCreate.....\");\n\t\tsetContentView(R.layout.mv_video_details);\n\t\tcontext = this;\n\t\tdao = new VodDao(this);\n\t\tinitData();\n\t\tinitView();\n\n\t}", "@Override\n public void onBindViewHolder(MovieAdapter.MovieViewHolder holder, int position) {\n final Movie movie = movies.get(position);\n holder.movie_title.setText(movie.getTitle());\n holder.movie_vote_average.setText(movie.getVoteAverage().toString());\n holder.movie_release_date.setText(movie.getReleaseDate());\n Picasso.get().load(movie.getPosterPath()).into(holder.movie_poster);\n // Layout set as clikable to show the details of movie\n holder.movie_layout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(context, MovieDetailsActivity.class);\n intent.putExtra(\"movie_title\", movie.getTitle());\n intent.putExtra(\"movie_original_title\", movie.getOriginalTitle());\n intent.putExtra(\"movie_poster_path\", movie.getPosterPath());\n intent.putExtra(\"movie_vote_average\", movie.getVoteAverage().toString());\n intent.putExtra(\"movie_release_date\", movie.getReleaseDate());\n intent.putExtra(\"movie_overview\", movie.getOverview());\n context.startActivity(intent);\n }\n });\n }", "@Override\n public void onDetailsClick(int position) {\n Intent intent = new Intent(getActivity(), MovieViewActivity.class);\n intent.putExtra(\"movieName\", memoirs.get(position).getMovieName());\n intent.putExtra(\"userId\", userId);\n intent.putExtra(\"from\", \"memoir\");\n startActivity(intent);\n }", "public interface OwnerDetailsView extends BaseUIView {\n void addBaseLabel(ImageVerticalKeyValueLabel label);\n\n void addDynamicLabel(ImageHorizontalKeyValueLabel label);\n\n void setFollowersCount(String followersCount);\n\n void setFollowingCount(String followeringCount);\n\n void setUpToolbar(String title);\n\n void setOwnerDescription(String description);\n\n void stopProgress();\n\n void showProgress();\n\n void loadHeaderImage(String url);\n}", "private void setupView() {\n view.setName(advertisement.getTitle());\n view.setPrice(advertisement.getPrice());\n view.setDescription(advertisement.getDescription());\n view.setDate(advertisement.getDatePublished());\n view.setTags(advertisement.getTags());\n setCondition();\n if (advertisement.getImageUrl() != null) { //the url here is null right after upload\n view.setImageUrl(advertisement.getImageUrl());\n }\n }", "public interface ClothesDetailActivityView {\n void showProgress();\n void hideProgress();\n void showClothesDetail(ClothesViewModel clothesViewModel);\n void showErrorLoading(String message);\n\n}", "private void displayTrailerInfo(List<Trailer> trailers) {\n //checks if the Trailer object has a name. If not, assigns a default name to it\n if (trailers.get(0).getName() == null) {\n setDefaultTrailerName(trailers.get(0));\n }\n //sets the value for the trailer name\n video1.setText(trailers.get(0).getName());\n //sets the trailer's tag to be used when launching Youtube app to view the trailer\n play1.setTag(trailers.get(0).getKey());\n play1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n playVideo(v);\n }\n });\n\n //if there is more than 1 trailer, show the second one\n if (trailers.size() > 1) {\n //checks if the Trailer object has a name. If not, assigns a default name to it\n if (trailers.get(1).getName() == null) {\n setDefaultTrailerName(trailers.get(1));\n }\n //sets the value for the trailer name\n video2.setText(trailers.get(1).getName());\n //sets the trailer's tag to be used when launching Youtube app to view the trailer\n play2.setTag(trailers.get(1).getKey());\n play2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n playVideo(v);\n }\n });\n //makes the \"play\" image and the name text view visible\n video2.setVisibility(View.VISIBLE);\n play2.setVisibility(View.VISIBLE);\n }\n //if there are more than 2 trailers, show the third one\n if (trailers.size() > 2) {\n //checks if the Trailer object has a name. If not, assigns a default name to it\n if (trailers.get(2).getName() == null) {\n setDefaultTrailerName(trailers.get(2));\n }\n //sets the value for the trailer name\n video3.setText(trailers.get(2).getName());\n //sets the trailer's tag to be used when launching Youtube app to view the trailer\n play3.setTag(trailers.get(2).getKey());\n play3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n playVideo(v);\n }\n });\n //makes the \"play\" image and the name text view visible\n video3.setVisibility(View.VISIBLE);\n play3.setVisibility(View.VISIBLE);\n }\n\n }", "private void initViews(){\n rootView = View.inflate(getContext(), R.layout.fragment_titles, null);\n unbinder = ButterKnife.bind(this, rootView);\n listener = new TitleListener() {\n @Override\n public void onClick(View view, int position, String id , String label) {\n Intent intent = new Intent();\n intent.putExtra(MEConstants.TITLE_ID, id);\n intent.putExtra(MEConstants.TITLE_LABEL , label);\n\n getTargetFragment().onActivityResult(getTargetRequestCode() , 109 , intent);\n\n dismiss();\n }\n };\n if(!DeviceConnectivity.isNetworkAvailable(getContext())) {\n loader.setVisibility(View.GONE);\n noTitles.setVisibility(View.GONE);\n llConnectivityDialog.setVisibility(View.VISIBLE);\n llTitles.setVisibility(View.GONE);\n } else {\n getTitlesWS();\n }\n }", "private void showMovieDataView() {\n // hide the error message display\n mErrorMessageDisplay.setVisibility(View.INVISIBLE);\n // show the list of movies\n mMoviesRecyclerView.setVisibility(View.VISIBLE);\n }", "private void showMovies() {\n mDisplayErrorTV.setVisibility(View.INVISIBLE);\n mDisplayMoviesRV.setVisibility(View.VISIBLE);\n }", "public interface ShareEveryDayDetailView extends BaseView {\n\n /**\n * 获取id\n *\n * @return\n */\n String getNewsId();\n\n String getPage();\n\n String getPerpage();\n\n String getType();\n\n String getParentCommentId();\n\n\n\n /**\n * 获取每日分享详情成功\n */\n void getShareEveryDayDetailSuccess(ShareEveryDayDetailListInfo info, int maxpage); /**\n * 获取每日分享详情成功\n */\n void getJobBangDetailSuccess(JobBangDetailListInfo info, int maxpage);\n /**\n * 获取每日分享留言详情成功\n */\n void getShareEveryDaySendCommenSuccess();\n}", "@Override protected void initViews() {\n\t\tsetFragments(F_PopularFragment.newInstance(T_HomeActivity.this), F_TimelineFragment.newInstance(T_HomeActivity.this));\n\t}", "public interface DetailView extends View {\n\n void setItem(SearchItem searchItem);\n\n void showFavouriteState(boolean isFavourite);\n}", "@Override\n\tprotected void setupData() {\n\t\tisFirst = getIntent().getExtras().getBoolean(\"IS_FIRST\");\n\t\tcid = getIntent().getExtras().getString(FirstCategoryAct.class.getName());\n\t\tString title;\n\t\tif(isFirst){\n\t\t\ttitle = getIntent().getExtras().getString(\"TITLE_BAR\") + getResources().getString(R.string.tv_article_all);\n\t\t}else{\n\t\t\ttitle = getResources().getString(R.string.tv_article_all2);\n\t\t}\n\t\t\n\t\tsetGCenter(true, title);\n\t\tsetGLeft(true, R.drawable.back_selector);\n\n\t\tgetData(NET_ARTICLE, false);\n\t}", "interface MainView {\n\n void showProgress();\n\n void hideProgress();\n\n void setDataToListView(User[] noticeUser);\n\n void setDataToListView(Post[] noticePost);\n\n void onResponseFailure(Throwable throwable);\n\n }", "public interface IshowPersonalCommentActivityView extends IBaseActivityView{\n void showPersonalCommentSuccess(List<CommentEntity> commentList, boolean isHaveMore);\n void showPersonalCommentFail();\n}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_posts_details, container, false);\r\n\r\n vm = new ViewModelProvider(requireActivity()).get(MainActivityVM.class);\r\n\r\n title = view.findViewById(R.id.title);\r\n body = view.findViewById(R.id.body);\r\n\r\n Post post = vm.getPostDetails();\r\n\r\n title.setText(post.getTitle());\r\n body.setText(post.getBody());\r\n\r\n\r\n// vm.getPostDetails().observe(getActivity(), new Observer<Post>() {\r\n// @Override\r\n// public void onChanged(Post post) {\r\n// title.setText(post.getTitle());\r\n// body.setText(post.getBody());\r\n// }\r\n// });\r\n\r\n return view;\r\n }", "private void initViews() {\n ListFragment listFragment = ListFragment.newInstance();\n fragmentManager.beginTransaction().replace(R.id.holder, listFragment, \"List fragment\").commit();\n\n if (findViewById(R.id.detail_fragment) != null) {\n isTablet = true;\n DetailFragment detailFragment = DetailFragment.newInstance();\n fragmentManager.beginTransaction().replace(R.id.detail_fragment, detailFragment, \"Detail fragment\").addToBackStack(null).commit();\n }\n }", "@Override\n public void onClick(View v) {\n Movie movieItem = (Movie) containerView.getTag (); // getting the current movie item from setTag(movieItem)\n int position = getAdapterPosition (); //getting the position index i.e. it start from 0\n Log.d(\"Position\", \"\"+position + movieItem.getTitle ());\n Intent intent = new Intent (v.getContext (), DetailActivity.class);\n\n // intent.putParcelableArrayListExtra(\"ALLMOVIELIST\", (ArrayList<? extends Parcelable>) allList);\n intent.putExtra (\"movieTitle\", movieItem.getTitle ());\n intent.putExtra (\"movieImage\", movieItem.getImage());\n\n v.getContext ().startActivity (intent);\n }" ]
[ "0.65086186", "0.64274335", "0.6260261", "0.6224185", "0.6059388", "0.60502136", "0.6040935", "0.60404813", "0.6003163", "0.59970975", "0.5996006", "0.59858394", "0.5948042", "0.5903201", "0.5870083", "0.5803606", "0.5792522", "0.57557464", "0.5752385", "0.5752059", "0.5751068", "0.5747986", "0.5746337", "0.5740406", "0.57389456", "0.5698867", "0.56978303", "0.5694456", "0.5687863", "0.56675905", "0.5666394", "0.5648338", "0.56382585", "0.56370115", "0.5635939", "0.56351686", "0.56309325", "0.5621704", "0.5617599", "0.56075615", "0.55966985", "0.55900675", "0.558922", "0.55789775", "0.5576768", "0.55596256", "0.5559108", "0.5535796", "0.55353653", "0.55262315", "0.55206954", "0.55171084", "0.5510207", "0.5505102", "0.5498889", "0.5498526", "0.5488951", "0.54869753", "0.546676", "0.54648954", "0.5452877", "0.544457", "0.5444537", "0.5443199", "0.54335225", "0.543033", "0.5423572", "0.5421271", "0.5414663", "0.5414302", "0.54129374", "0.5409429", "0.5399578", "0.5396135", "0.5394606", "0.539195", "0.5390319", "0.5386909", "0.5377272", "0.53725094", "0.5369524", "0.5363302", "0.53611845", "0.5359933", "0.53591156", "0.53448164", "0.53445184", "0.5342095", "0.53419065", "0.53418374", "0.5334873", "0.5332164", "0.5325161", "0.53217137", "0.5320484", "0.53174955", "0.5316895", "0.5314761", "0.5313983", "0.53101176", "0.5308698" ]
0.0
-1
fetch videos and populate their views
private void populateVideos(Bundle savedInstanceState) { LinearLayoutManager layoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false); mBinding.movieVideos.videosList.setLayoutManager(layoutManager); mBinding.movieVideos.videosList.setHasFixedSize(true); mBinding.movieVideos.videosList.setNestedScrollingEnabled(false); RecyclerView.ItemDecoration itemDecoration = new HorizontalItemDecoration(this); mBinding.movieVideos.videosList.addItemDecoration(itemDecoration); mVideoAdapter = new VideoAdapter(this); mBinding.movieVideos.videosList.setAdapter(mVideoAdapter); if (savedInstanceState != null && savedInstanceState.containsKey(BUNDLE_VIDEOS)) { mVideoAdapter.addVideosList(savedInstanceState. <Video>getParcelableArrayList(BUNDLE_VIDEOS)); if (mVideoAdapter.getItemCount() == 0) { mBinding.movieVideos.videosLabel.setVisibility(View.GONE); } } else { Call<ApiResponse<Video>> call = mApiClient.getVideos(movie.movieId); call.enqueue(new Callback<ApiResponse<Video>>() { @Override public void onResponse(Call<ApiResponse<Video>> call, Response<ApiResponse<Video>> response) { List<Video> result = response.body().results; mVideoAdapter.addVideosList(result); if (result.size() == 0) { mBinding.movieVideos.videosLabel.setVisibility(View.GONE); } } @Override public void onFailure(Call<ApiResponse<Video>> call, Throwable t) { Toast.makeText(DetailActivity.this, getString(R.string.connection_error), Toast.LENGTH_LONG).show(); } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "VideosClient getVideos();", "private void getVideos() {\n\n StringRequest videosRequest = new StringRequest(VIDEOS_URL+query, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n //parse data from webservice to get Contracts as Java object\n Example videos = new Gson().fromJson(response, Example.class);\n\n setAdapter(videos.getItems());\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Videos\", \"Error\");\n }\n });\n\n Volley.newRequestQueue(this).add(videosRequest);\n }", "private void getVideo() {\n // create the url\n String temp = movie.getId().toString();\n String url = API_BASE_URL+\"/movie/\"+temp+\"/videos\";\n // set the request parameters\n RequestParams params = new RequestParams();\n params.put(API_KEY_PARAM, getString(R.string.api_key)); // Always needs API key\n // request a GET response expecting a JSON object response\n\n client.get(url,params, new JsonHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n // load the results into movies list\n\n try {\n JSONArray results = response.getJSONArray(\"results\");\n JSONObject curMovie = results.getJSONObject(0);\n key = curMovie.getString(\"key\");\n\n } catch (JSONException e) {\n logError(\"Failed to parse play_video endpoint\", e, true);\n }\n\n\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n logError(\"Failed to get data from Now_playing endpoint\", throwable, true);\n }\n });\n\n }", "List<Video> getAll();", "public void fetchVideo(View view) {\n Log.i(\"progress\", \"fetchVideo\");\n\n startActivityForResult(requestVideoFileIntent,0);\n }", "private void updateVideo() {\n ArrayList<String> movieVideoArrayList = new ArrayList<String>();\n videoRecyclerView = findViewById(R.id.trailer_recycler_view);\n videoRecyclerView.setLayoutManager(new GridLayoutManager(this, 4));\n movieVideoAdapter = new MovieVideoAdapter(movieVideoArrayList, MovieDetailActivity.this);\n videoRecyclerView.setAdapter(movieVideoAdapter);\n }", "public void setUpVideo() {\n\n videosViewPager.setVisibility(VISIBLE);\n StorageReference filePath = storageReference.child(\"images\").child(new ArrayList<>(videos.keySet()).get(position));\n filePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n videosViewPager.setVideoURI(uri);\n videosViewPager.setMediaController(mediaController);\n mediaController.setAnchorView(videosViewPager);\n videosViewPager.requestFocus();\n }\n });\n //String videoPath = \"android.resource://\"+activity.getPackageName()+\"/\";\n //Uri uri = Uri.parse(videoPath);\n\n// DisplayMetrics displayMetrics = new DisplayMetrics();\n// activity.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n// int height = displayMetrics.heightPixels;\n// int width = displayMetrics.widthPixels;\n//\n//\n// videosViewPager.setMinimumHeight(height);\n// videosViewPager.setMinimumWidth(width);\n// videosViewPager.setVideoURI(uri);\n// videosViewPager.setMediaController(mediaController);\n// mediaController.setAnchorView(videosViewPager);\n// videosViewPager.requestFocus();\n //videosViewPager.start();\n\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_detail_vid, container, false);\n pb = view.findViewById(R.id.vid_pb);\n pbText = view.findViewById(R.id.vid_pb_text);\n rv = view.findViewById(R.id.vid_item_list);\n rv.setLayoutManager(new GridLayoutManager(getContext(), 1));\n if (item != null)\n setVideo(item);\n else {\n if (DetailActivity.url.contains(\"amcet\")) {\n ParserAmcet parserAmcet = new ParserAmcet(DetailActivity.url, null, new ItemHtml(),\n new OnTaskCallback() {\n @Override\n public void OnCompleted(ArrayList<ItemHtml> items, ItemHtml itempath) {\n setVideo(itempath);\n }\n });\n parserAmcet.execute();\n } else if (DetailActivity.url.contains(\"kino-fs\")) {\n ParserKinoFS parserKinoFS = new ParserKinoFS(DetailActivity.url, null, new ItemHtml(),\n new OnTaskCallback() {\n @Override\n public void OnCompleted(ArrayList<ItemHtml> items, ItemHtml itempath) {\n setVideo(itempath);\n }\n });\n parserKinoFS.execute();\n } else if (DetailActivity.url.contains(\"animevost\")) {\n ParserAnimevost parserAnimevost = new ParserAnimevost(DetailActivity.url, null, new ItemHtml(),\n new OnTaskCallback() {\n @Override\n public void OnCompleted(ArrayList<ItemHtml> items, ItemHtml itempath) {\n setVideo(itempath);\n }\n });\n parserAnimevost.execute();\n } else {\n ParserHtml parserHtml = new ParserHtml(DetailActivity.url, null, new ItemHtml(),\n new OnTaskCallback() {\n @Override\n public void OnCompleted(ArrayList<ItemHtml> items, ItemHtml itempath) {\n setVideo(itempath);\n }\n });\n parserHtml.execute();\n }\n }\n return view;\n }", "@RequestMapping(value = VideoSvcApi.VIDEO_SVC_PATH, method = RequestMethod.GET)\n\tpublic @ResponseBody Collection<Video> getVideoList() {\n\t\treturn Lists.newArrayList(videos.findAll());\n\t}", "private void parseJsonAndReturnUrl(String jsonData){\n String videoUri, videoName;\n videos = new ArrayList<>();\n Video video = null;\n try {\n JSONObject root = new JSONObject(jsonData);\n JSONArray topicsArray = root.getJSONArray(\"topic_data\");\n if(topicsArray.length() == 0){\n return;\n }\n for(int i=0; i< topicsArray.length(); i++){\n JSONArray topics = topicsArray.getJSONArray(i);\n videoUri = topics.getString(3);\n\n Log.d(TAG, \"video path: \"+videoUri);\n\n videoName = topics.getString(0);\n\n Log.d(TAG, \"video name: \"+videoUri);\n\n video = new Video();\n\n video.setmVideoName(videoName);\n video.setmVideoUrl(videoUri);\n\n videos.add(video);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n try {\n JSONObject videoJson = response;\n JSONArray videoArray = videoJson.getJSONArray(\"items\");\n for (int i = 0; i < videoArray.length(); i++) {\n JSONObject videoObject = videoArray.getJSONObject(i);\n JSONObject snippet = videoObject.getJSONObject(TAG_SNIPPET);\n JSONObject contentDetails = videoObject.getJSONObject(TAG_CONTENTDETAILS);\n JSONObject thumbnails = snippet.getJSONObject(TAG_THUMB).getJSONObject(TAG_THUMB_MEDIUM);\n\n String title = snippet.getString(TAG_TITLE);\n String description = snippet.getString(TAG_DESCRIPTION);\n String id = contentDetails.getString(TAG_ID);\n String thumbnailUrl = thumbnails.getString(TAG_THUMB_MEDIUM_URL);\n\n videoContent.addItem(videoContent.createVideoItem(id,title,description,thumbnailUrl));\n }\n\n progressBar.setVisibility(View.GONE);\n videoRecyclerViewAdapter.notifyDataSetChanged();\n\n\n }\n // Try and catch are included to handle any errors due to JSON\n catch (JSONException e) {\n // If an error occurs, this prints the error to the log\n e.printStackTrace();\n }\n }", "@RequestMapping(value=VideoSvcApi.VIDEO_SVC_PATH, method=RequestMethod.GET)\n\tpublic @ResponseBody Collection<Video> getVideos() {\n\t\treturn videos;\n\t}", "public List<Video> getAllVideos() {\n\t\tList<Video> videoList = new ArrayList<Video>();\n\t\t// Select All Query\n\t\tString selectQuery = \"SELECT * FROM \" + VivaFrame.TABLE_NAME;\n\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\n\t\t// looping through all rows and adding to list\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tVideo video = new Video();\n\t\t\t\tvideo.setID(Integer.parseInt(cursor.getString(0)));\n\t\t\t\tvideo.setFolderNumber(Integer.parseInt(cursor.getString(1)));\n\t\t\t\tvideo.setName(cursor.getString(2));\n\t\t\t\tvideo.setPhoneNumber(cursor.getString(3));\n\t\t\t\t// Adding contact to list\n\t\t\t\tvideoList.add(video);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\t// return contact list\n\t\treturn videoList;\n\t}", "public int getVideos() {\n return videos;\n }", "private void fetchMovieDetails() {\n Stream.of(movieListings).forEach(movieListing -> {\n Picasso.with(MoviesApplication.getApp()).load(movieListing.getPosterUrl()).fetch();\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieDetails(movieListing.getId()).enqueue(movieDetailCallback);\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieVideos(movieListing.getId()).enqueue(movieVideoCallback);\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieReviews(movieListing.getId()).enqueue(movieReviewCallback);\n });\n }", "@RequestMapping(value=VideoSvcApi.VIDEO_SVC_PATH, method=RequestMethod.GET)\n\tpublic @ResponseBody Collection<Video> getVideos() {\n\t\t// TODONE Implement the logic to return the list of all videos.\n\t\tassert(videos != null);\n\t\t\n\t\treturn videos.values();\n\t}", "private void loadMoreItems() {\n isLoading = true;\n\n currentPage += 1;\n\n Call findMyFeedVideosCall = vimeoService.findMyFeedVideos(currentPage, PAGE_SIZE);\n calls.add(findMyFeedVideosCall);\n findMyFeedVideosCall.enqueue(findMyFeedVideosNextFetchCallback);\n }", "@Override\n public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) {\n youTubePlayer.loadVideos(videoIdList);\n }", "private void loadItems() {\n try {\n if (ServerIdUtil.isServerId(memberId)) {\n if (ServerIdUtil.containsServerId(memberId)) {\n memberId = ServerIdUtil.getLocalId(memberId);\n } else {\n return;\n }\n }\n List<VideoReference> videoReferences = new Select().from(VideoReference.class).where(VideoReference_Table.userId.is(memberId)).orderBy(OrderBy.fromProperty(VideoReference_Table.date).descending()).queryList();\n List<String> videoIds = new ArrayList<>();\n for (VideoReference videoReference : videoReferences) {\n videoIds.add(videoReference.getId());\n }\n itemList = new Select().from(Video.class).where(Video_Table.id.in(videoIds)).orderBy(OrderBy.fromProperty(Video_Table.date).descending()).queryList();\n } catch (Throwable t) {\n itemList = new ArrayList<>();\n }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onLoadVideo(String result) {\n\n\t\t\t\t\t\t\t\t}", "List<Videoinfo> selectAll();", "@Override\n public void onBindViewHolder(@NonNull ViewHolder viewHolder, int i) {\n // get movie data at specified position\n final Movie movie = movies.get(i); // get movie data specified position\n viewHolder.tvTitle.setText(movie.getTitle()); // sets viewholder's \"title\" to movie title\n viewHolder.tvOverview.setText(movie.getOverview());\n\n // determine the current orientation\n boolean isPortrait = context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT;\n\n\n\n // build url for poster image - combines base url with size and path\n String imageUrl = null;\n\n // if in portrait mode, load poster image:\n if (isPortrait) {\n imageUrl = config.getImageUrl(config.getPosterSize(), movie.getPosterPath());\n } else {\n imageUrl = config.getImageUrl(config.getBackdropSize(), movie.getBackdropPath());\n }\n\n // get correct placeholder and image\n int placeholderId = isPortrait ? R.drawable.flicks_movie_placeholder : R.drawable.flicks_backdrop_placeholder;\n ImageView imageView = isPortrait ? viewHolder.ivPosterImage : viewHolder.ivBackdropImage;\n // load image with glide!\n Glide.with(context)\n .load(imageUrl)\n .apply(RequestOptions.placeholderOf(placeholderId))\n .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(15, 0)))\n .apply(RequestOptions.errorOf(placeholderId))\n .into(imageView);\n // if you click on the image, opens youtube video\n imageView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) { // working on youtube part\n Intent intent = new Intent(context, MovieTrailerActivity.class); // makes intent\n\n // grab videolink\n//\n// String url = API_BASE_URL + \"/movie/\" + movie.getId() + \"/videos\"; // create url -- endpoint is videos\n// RequestParams params = new RequestParams();\n// params.put(API_KEY_PARAM, \"a07e22bc18f5cb106bfe4cc1f83ad8ed\"); // api key always required\n// client.get(url, params, new JsonHttpResponseHandler() {\n// @Override\n// public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n// try {\n// JSONArray results = response.getJSONArray(\"results\"); // root node\n// String video_key = results.getJSONObject(0).getString(\"key\");\n// Toast.makeText(context, video_key, Toast.LENGTH_SHORT).show();\n//\n// } catch (JSONException e) {\n// Toast.makeText(context, \"failed to retreive video\", Toast.LENGTH_SHORT).show();\n// }\n// }\n//\n// @Override\n// public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n// Toast.makeText(context, \"failed to retreive video\", Toast.LENGTH_SHORT).show();\n// }\n// });\n\n //intent.putExtra(Movie.class.getSimpleName(), Parcels.wrap(movie));\n // ^^ serializes movie using parceler. it uses short name as key, movie as value\n context.startActivity(intent); // start activity\n }\n });\n\n\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View mvView = inflater.inflate(R.layout.fragment_mv, container, false);\r\n\r\n mvRecycleView = (RecyclerView) mvView.findViewById(R.id.recyclerView_mv);\r\n\r\n maps = new HashMap<>();\r\n maps.put(\"method\",\"baidu.ting.mv.searchMV\");\r\n maps.put(\"page_num\",\"1\");\r\n maps.put(\"page_size\",\"20\");\r\n initData(maps);\r\n\r\n\r\n\r\n mvRecycleView.setLayoutManager(new GridLayoutManager(getActivity(), 2));\r\n adapterVideoList = new MVAdapter(getActivity());\r\n\r\n mvRecycleView.setAdapter(adapterVideoList);\r\n//用okgo实现\r\n adapterVideoList.setOnItemClickListener(new MVAdapter.OnItemClickListener() {\r\n @Override\r\n public void onItemClick(View view, int position, String mvID) {\r\n /* //加载mv\r\n Map<String ,String > map1 = new HashMap<String, String>();\r\n map1.put(\"method\",\"baidu.ting.mv.playMV\");\r\n map1.put(\"mv_id\",mvID);\r\n loadmvData(map1);*/\r\n Log.d(TAG,position+\"\"+mvID);\r\n OkGo.<String>get(ApiStore.MVINFO_URL + mvID)\r\n .execute(new StringCallback() {\r\n @Override\r\n public void onSuccess(Response<String> response) {\r\n Gson gson = new Gson();\r\n MVInfo mvInfo = gson.fromJson(response.body(), MVInfo.class);\r\n MVInfo.ResultBean result = mvInfo.getResult();\r\n String file_link = result.getFiles().getValue31().getFile_link();\r\n Toast.makeText(getActivity(), file_link, Toast.LENGTH_SHORT).show();\r\n JZVideoPlayerStandard.startFullscreen(getActivity(),JZVideoPlayerStandard.class,\r\n file_link,result.getMv_info().getTitle());\r\n }\r\n });\r\n\r\n }\r\n });\r\n return mvView;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v=inflater.inflate(R.layout.fragment_video, container, false);\n\n names = getResources().getStringArray(R.array.names);\n profile_pics = getResources().obtainTypedArray(R.array.profile_pics);\n time = getResources().getStringArray(R.array.time);\n modelcardviewdetailsList = new ArrayList<>();\n for (int i = 0; i < names.length; i++) {\n Modelcardviewdetails modelcardviewdetails = new Modelcardviewdetails(names[i], time[i], profile_pics.getResourceId(i, -1));\n modelcardviewdetailsList.add(modelcardviewdetails);\n }\n\n recyclerview = (RecyclerView)v.findViewById(R.id.rcv_videos);\n LinearLayoutManager layoutManager = new LinearLayoutManager(container.getContext());\n recyclerview.setLayoutManager(layoutManager);\n AdapterCardview adapter = new AdapterCardview(modelcardviewdetailsList, getActivity());\n recyclerview.setAdapter(adapter);\n\n\n\n return v;\n }", "@Override\n\t\t\t\t\tpublic void onLoadVideo(String result) {\n\n\t\t\t\t\t}", "private void initValets(){\n //valet in charge of getting movie database data\n mMovieValet = new MovieValet(this);\n //request favorite movie list from database\n mMovieValet.requestMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //valet in charge of getting poster refresh database data\n mRefreshValet = new RefreshValet(this);\n }", "protected List<Video> processInputURL(String url) {\n videos = new ArrayList<Video>();\n videos.add(new Video(url));\n retrieveSubtitles();\n return videos;\n }", "@Override\n\t\t\tpublic void onLoadVideo(String result) {\n\t\t\t}", "@Override\n public void onResponse(String response) {\n Example videos = new Gson().fromJson(response, Example.class);\n\n setAdapter(videos.getItems());\n }", "private void getGalleryData() {\n\n // Get relevant columns for use later.\n String[] projection = {\n MediaStore.Files.FileColumns._ID,\n MediaStore.Files.FileColumns.DATA,\n MediaStore.Files.FileColumns.DATE_ADDED,\n MediaStore.Files.FileColumns.MEDIA_TYPE,\n MediaStore.Files.FileColumns.MIME_TYPE,\n MediaStore.Files.FileColumns.TITLE\n };\n\n // Return only video and image metadata.\n String selection = MediaStore.Files.FileColumns.MEDIA_TYPE + \"=\"\n + MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE\n + Constants.OR_TXT\n + MediaStore.Files.FileColumns.MEDIA_TYPE + \"=\"\n + MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO;\n\n Uri queryUri = MediaStore.Files.getContentUri(Constants.EXTERNAL_MEMORY);\n\n CursorLoader cursorLoader = new CursorLoader(\n this,\n queryUri,\n projection,\n selection,\n null, // Selection args (none).\n MediaStore.Files.FileColumns.DATE_ADDED + Constants.SORTING_ORDER // Sort order.\n );\n\n Cursor cursor = cursorLoader.loadInBackground();\n //int columnIndex = cursor.getColumnIndex(MediaStore.Video.Thumbnails.DATA);\n\n if (cursor.moveToFirst()) {\n do {\n // String data = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Thumbnails.DATA));\n String image = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));\n //String video = cursor.getString(cursor.getColumnIndex(MediaStore.Video.Media.DATA));\n mGalleryData.add(image);\n\n // String uri = cursor.getString(columnIndex);\n } while (cursor.moveToNext());\n }\n cursor.close();\n mGalleryData.size();\n // add gallery fragment\n addGalleryFragment();\n }", "private void showMovieContent(View rootView, int movieId) {\n // For showing the movie content quickly,\n // some data are fetched from the intent object directly instead of being retrieved from server\n ((TextView) rootView.findViewById(R.id.tvMovieOverview)).setText(mMovie.getOverview());\n ((TextView) rootView.findViewById(R.id.tvYear)).setText(mMovie.getReleaseDate());\n ((TextView) rootView.findViewById(R.id.tvVoteAverage)).setText(String.valueOf(mMovie.getVoteAverage() + \"/10\"));\n\n BitmapImageViewTarget biv = new BitmapImageViewTarget((ImageView) rootView.findViewById(R.id.ivMovieThumbnail)) {\n @Override\n protected void setResource(Bitmap resource) {\n RoundedBitmapDrawable circularBitmapDrawable =\n RoundedBitmapDrawableFactory.create(getContext().getResources(), resource);\n circularBitmapDrawable.setCornerRadius(25);\n view.setImageDrawable(circularBitmapDrawable);\n }\n };\n Glide.with(getActivity()).load(mMovie.getPosterPath()).asBitmap().fitCenter()\n .into(biv);\n try {\n // Construct the URL for the query\n Uri.Builder uriBuilder = new Uri.Builder();\n uriBuilder.scheme(\"http\")\n .authority(\"api.themoviedb.org\")\n .appendPath(\"3\")\n .appendPath(\"movie\")\n .appendPath(String.valueOf(movieId))\n .appendQueryParameter(\"api_key\", BuildConfig.THE_MOVIE_DB_API_KEY);\n\n Log.i(LOG_TAG, uriBuilder.build().toString());\n\n URL url = new URL(uriBuilder.build().toString());\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.addRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setDoInput(true);\n new FetchMoiveTask().execute(urlConnection);\n }catch ( IOException e ){\n Log.e(LOG_TAG,\"error\", e);\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_media_videos, container, false);\n\n AllocateMemory(v);\n context = getActivity();\n lang_arbi();\n if (CheckNetwork.isNetworkAvailable(getActivity())) {\n CALL_GET_MEDIAVIDEOS_API(Media.u_id);\n } else {\n Toast.makeText(getActivity(), \"Please Check your Internet Connection\", Toast.LENGTH_SHORT).show();\n }\n Login_freg.hideSoftKeyboard(getActivity());\n /*premium_lawyer_adapter = new Premium_Lawyer_adapter(getActivity(), premium_lawyer_models);\n recycler_media_videos.setLayoutManager(new GridLayoutManager(getActivity(), 3));\n recycler_media_videos.setItemAnimator(new DefaultItemAnimator());\n recycler_media_videos.setAdapter(premium_lawyer_adapter);*/\n\n /*articles_adapter = new Premium_article_adpter(getActivity(), article_models);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);\n recycler_media_videos.setLayoutManager(mLayoutManager);\n recycler_media_videos.setItemAnimator(new DefaultItemAnimator());\n recycler_media_videos.setAdapter(articles_adapter);*/\n\n media_video_adapter = new Media_Video_Adapter(getActivity(), media_video_models);\n RecyclerView.LayoutManager mLayoutManager1 = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);\n recycler_media_videos.setLayoutManager(mLayoutManager1);\n recycler_media_videos.setItemAnimator(new DefaultItemAnimator());\n recycler_media_videos.setAdapter(media_video_adapter);\n\n\n return v;\n }", "private void loadMoviesData()\n {\n showMoviesDataView();\n new FetchMovieData(this, new FetchMovieDataCompleteListener()).execute(MOVIE_DB_URL_POPULAR+API_Key);\n\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_video);\n\t\tex = getIntent().getExtras();\n\t\t \n\n\t HashMap<String, String> mp = new HashMap<String, String>();\n\t\t mp.put(\"tag\", \"realVid\");\n\t\t if(ex.getString(\"cat\").equals(new String(\"ppv\")))\n\t\t {\n\t\t\t String vidttl =\"\";\n String vidtitle = ex.getString(\"title\");\n\t\t \t int pos = vidtitle.indexOf(\"Pay Per View\");\n\t\t\t\tif(pos!= -1)\n\t\t\t\t\tvidttl = vidtitle.substring(0,pos-1);\n\t\t\t\tmp.put(\"title\",vidttl);\n\t\t }\n\t\t else\n\t\t\t mp.put(\"title\", ex.getString(\"title\"));\n\t\t GetRealVidData gvd = new GetRealVidData(mp,this);\n\t\t gvd.execute(serverUrl);\n\t\t youTubeView1 = (YouTubePlayerView)findViewById(R.id.youtube_view1);\n\t\t \n\t\t \n\t\t/*\n\t\t if(ex!=null)\n\t\t \tvid = ex.getString(\"url\");\n\t\t//TextView tv = (TextView)findViewById(R.id.textView1);\n\t\t//VideoView videoView = (VideoView)findViewById(R.id.videoV);\n\t\tint pos = vid.indexOf(\"?rel\");\n\t\tif(pos!= -1)\n\t\t\tvidid = vid.substring(0, pos);\n\t\telse \n\t\t\tvidid = vid;\n\t\t\n\t\tVIDEO = vidid;\n YouTubePlayerView youTubeView = (YouTubePlayerView)findViewById(R.id.youtube_view);\n */\n // youTubeView.initialize(DEVELOPER_KEY, this);\n\n }", "@Override\r\n\tpublic void onViewCreated(View view, Bundle savedInstanceState) {\n\t\tsuper.onViewCreated(view, savedInstanceState);\r\n\t\tplayView = view.findViewById(R.id.play);\r\n\t\tplayView.setOnClickListener(this);\r\n\t\tvideoView = (VideoView) view.findViewById(R.id.video);\r\n\t\tListView listView = (ListView) view.findViewById(R.id.listview);\r\n\t\tadapter = new LiveListAdapter(getActivity(), list);\r\n\t\tlistView.setAdapter(adapter);\r\n\t\trequest();\r\n\t}", "com.google.ads.googleads.v6.resources.Video getVideo();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n int layoutResId;\n View view;\n VideoView video;\n ImageView imageView;\n GlideDrawableImageViewTarget imageViewTarget;\n switch (mPage) {\n case 0:\n layoutResId = R.layout.fragment_bigimage;\n view = setupView(container, layoutResId);\n imageView = (ImageView) view.findViewById(R.id.fullImage);\n imageView.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.viewer_intro));\n break;\n case 1:\n layoutResId = R.layout.fragment_bigimage;\n view = setupView(container, layoutResId);\n imageView = (ImageView) view.findViewById(R.id.fullImage);\n imageViewTarget = new GlideDrawableImageViewTarget(imageView);\n Glide.with(this).load(R.drawable.viewer_select).into(imageViewTarget);\n break;\n case 2:\n layoutResId = R.layout.fragment_bigimage;\n view = setupView(container, layoutResId);\n imageView = (ImageView) view.findViewById(R.id.fullImage);\n imageView.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.viewer_three));\n break;\n case 3:\n layoutResId = R.layout.fragment_bigimage;\n view = setupView(container, layoutResId);\n imageView = (ImageView) view.findViewById(R.id.fullImage);\n imageView.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.viewer_search));\n break;\n case 4:\n layoutResId = R.layout.fragment_bigimage;\n view = setupView(container, layoutResId);\n imageView = (ImageView) view.findViewById(R.id.fullImage);\n imageView.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.viewer_five));\n break;\n default:\n layoutResId = R.layout.fragment_bigmovie;\n view = setupView(container, layoutResId);\n video = (VideoView) view.findViewById(R.id.movie);\n String uripath = \"android.resource://\" + getActivity().getPackageName() + \"/\" + R.raw.viewer_experience;\n Uri uri = Uri.parse(uripath);\n video.setVideoURI(uri);\n video.setOnPreparedListener (new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.setLooping(true);\n }\n });\n video.start();\n\n }\n\n return view;\n }", "@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)\n public Single<List<Uri>> multipleVideos(@NonNull FragmentActivity activity) {\n return requestImage(activity, true, MimeType.VIDEO);\n }", "@Override\n\tpublic List<VideoInfo> getVideos(Map<String,Object> map) {\n\t\treturn dao.getAboutVideos(map);\n\t}", "private void setVideo(){\n /* if(detailsBean==null){\n showToast(\"没有获取到信息\");\n return;\n }\n UserManager.getInstance().setDetailsBean(detailsBean);\n upCallShowSetVideoData = new UpCallShowSetVideoData();\n upCallShowSetVideoData.smobile = Preferences.getString(Preferences.UserMobile,null);\n upCallShowSetVideoData.iringid = detailsBean.iringid;\n if (callShowSetVideoProtocol == null) {\n callShowSetVideoProtocol = new CallShowSetVideoProtocol(null, upCallShowSetVideoData, handler);\n callShowSetVideoProtocol.showWaitDialog();\n }\n callShowSetVideoProtocol.stratDownloadThread(null, ServiceUri.Spcl, upCallShowSetVideoData, handler,true);*/\n }", "@GET\n @Produces(\"application/json\")\n public Response getAllMusicVideos(){\n \n //get all music videos from the DB\n List<MusicVideo> listOfMusicVideos = selectAllMusicVideosFromDB() ;\n \n //log the number of music videos\n LOGGER.log(Level.INFO, String.format(\"There are %d music videos on the server\", listOfMusicVideos.size())) ;\n \n //set poster image for each music video\n listOfMusicVideos = setPosterImageForMusicVideos(listOfMusicVideos) ;\n \n //sort list\n listOfMusicVideos.sort(null) ;\n \n //parse list of music videos to JSON and set JSON as entity of response\n Gson gson = new GsonBuilder()\n .excludeFieldsWithoutExposeAnnotation()\n .serializeNulls()\n .create();\n String jsonString = gson.toJson(listOfMusicVideos) ;\n Response.ResponseBuilder responseBuilder = Response.ok() ;\n responseBuilder.entity(jsonString) ;\n \n return responseBuilder.build() ;\n }", "MovieVideo getMovieVideoByVideoid(String videoid);", "public List<Movie> dVD() {\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/new_releases.json?\"\n + \"apikey=yedukp76ffytfuy24zsqk7f5\";\n apicall(url);\n Gson gson = new Gson();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n System.out.println(url);\n return movieData;\n }", "@Override\n public void onReloadClick() {\n videosAdapter.updateFooter(VideosAdapter.FooterType.LOAD_MORE);\n\n Call findMyFeedVideosCall = vimeoService.findMyFeedVideos(currentPage, PAGE_SIZE);\n calls.add(findMyFeedVideosCall);\n findMyFeedVideosCall.enqueue(findMyFeedVideosNextFetchCallback);\n }", "@Override\n public void onResponse(Response<VideosResponse> response) {\n VideosResponse mResponse = response.body();\n ArrayList<VideosResult> results = (ArrayList<VideosResult>) mResponse.getResults();\n Bundle bundle = new Bundle();\n ArrayList<String> names = new ArrayList<String>();\n ArrayList<String> keys = new ArrayList<String>();\n for ( VideosResult result: results) {\n names.add(result.getName());\n keys.add(result.getKey());\n }\n bundle.putStringArrayList(\"name\", names);\n bundle.putStringArrayList(\"key\", keys);\n final AvailableTrailersFragment dialog = new AvailableTrailersFragment();\n dialog.setArguments(bundle);\n dialog.show(getActivity().getSupportFragmentManager(), \"Videos_name\");\n }", "public void playVideo(View view){\n YT_View.initialize(YouTubeConfig.getApiKey(), onInitializedListener);\n }", "public ArrayList<DeviceMediaItem> getAllImages(Context contx) {\n ArrayList<DeviceMediaItem> images = new ArrayList<>();\n Uri allImagesuri = android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI;\n String[] projection = {MediaStore.Images.ImageColumns.DATA, MediaStore.Images.Media.DISPLAY_NAME,\n MediaStore.Images.Media.SIZE, MediaStore.Images.Media.DATE_ADDED};\n Cursor cursor = contx.getContentResolver().query(allImagesuri, projection, null, null, null);\n try {\n cursor.moveToFirst();\n do {\n DeviceMediaItem pic = new DeviceMediaItem();\n\n pic.setName(cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DISPLAY_NAME)));\n pic.setPath(cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA)));\n String date = getDate(cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATE_ADDED)));\n pic.setDate(date);\n\n images.add(pic);\n } while (cursor.moveToNext());\n cursor.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n Uri allVideosuri = android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI;\n String[] vidProjection = {MediaStore.Video.VideoColumns.DATA, MediaStore.Video.Media.DISPLAY_NAME,\n MediaStore.Video.Media.SIZE, MediaStore.Video.Media.DATE_ADDED};\n Cursor vidCursor = contx.getContentResolver().query(allVideosuri, vidProjection, null, null, null);\n try {\n vidCursor.moveToFirst();\n do {\n DeviceMediaItem pic = new DeviceMediaItem();\n\n pic.setName(vidCursor.getString(vidCursor.getColumnIndexOrThrow(MediaStore.Video.Media.DISPLAY_NAME)));\n pic.setPath(vidCursor.getString(vidCursor.getColumnIndexOrThrow(MediaStore.Video.Media.DATA)));\n String date = getDate(vidCursor.getLong(vidCursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATE_ADDED)));\n pic.setDate(date);\n\n images.add(pic);\n } while (vidCursor.moveToNext());\n vidCursor.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return images;\n }", "public YoutubeResultsAdapter(List<YoutubeVideoModelAdapter> videos) {\n this.videos = videos;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_news_feeds, container, false);\n if (getArguments() != null) {\n url = getArguments().getString(AppConstants.URL);\n heading = getArguments().getString(AppConstants.HEADING);\n }\n\n myVideosDtoList = new ArrayList<>();\n Newsfeeds = view.findViewById(R.id.newsFeedRecyclerView);\n headingTextView = view.findViewById(R.id.headingTextView);\n loadingProgressBar = view.findViewById(R.id.mainProgressBar);\n challengeDao = new ChallengeDao(url);\n udpateHotChallenge();\n linearLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);\n Newsfeeds.setLayoutManager(linearLayoutManager);\n Newsfeeds.setItemAnimator(new DefaultItemAnimator());\n Newsfeeds.setHasFixedSize(true);\n newsAdapter = new NewsAdapter(getActivity(), heading, myVideosDtoList);\n Newsfeeds.setAdapter(newsAdapter);\n headingTextView.setText(heading);\n\n Newsfeeds.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n LinearLayoutManager linearLayoutManager = (LinearLayoutManager) Newsfeeds.getLayoutManager();\n int totalItemCount = myVideosDtoList.size();\n int lastVisibleItemPosition = linearLayoutManager.findLastVisibleItemPosition();\n int firstVisibleItemPosition = linearLayoutManager.findFirstVisibleItemPosition();\n if (!isLoading && totalItemCount <= (lastVisibleItemPosition + visibleThreshold)) {\n loadMore();\n } else {\n isLoading = false;\n }\n }\n });\n\n// Newsfeeds.addOnScrollListener(new PaginationScrollListener(linearLayoutManager) {\n// @Override\n// protected void loadMoreItems() {\n// isLoading = true;\n// currentPage += 1; //Increment page index to load the next one\n// loadNextPage();\n// }\n//\n// @Override\n// public int getTotalPageCount() {\n// return TOTAL_PAGES;\n// }\n//\n// @Override\n// public boolean isLastPage() {\n// return isLastPage;\n// }\n//\n// @Override\n// public boolean isLoading() {\n// return isLoading;\n// }\n// });\n//// mocking 1 second network delay\n// new Handler().postDelayed(new Runnable() {\n// @Override\n// public void run() {\n// loadFirstPage();\n// }\n// }, 1000);\n return view;\n }", "public void downloadVideo(Context context, VideoView videoView){\n \t\t this.videoView = videoView;\n \t\t download = new DownloadVideo(context, SAVE_PATH);\n \t\t download.execute();\n \t }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.video__gallery_fragment, container, false);\n\n firestore=FirebaseFirestore.getInstance();\n videoRecyclerView=view.findViewById(R.id.videoRecycler);\n\n\n list= new ArrayList<>();\n\n setAdapter();\n GetVideoDetails();\n\n return view;\n }", "public List<Video> getVideoList() {\n return (ArrayList<Video>) mVideoServiceProxy.getVideos();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_see__video, container, false);\n\n\n init(view);\n\n\n fullScreenButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n FullScreen();\n\n }\n });\n\n\n\n Bundle bundle = this.getArguments();\n videoId = bundle.getString(getString(R.string.videoId));\n\n\n isLike_icon.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n isLike();\n\n }\n });\n\n\n\n addToBookmark.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n AddBookmark();\n }\n });\n\n bookmark.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n AddBookmark();\n }\n });\n\n send_comment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n sendComment();\n }\n });\n showVideo();\n checkBookmark();\n checkVideoLike();\n checkUserVideoHistory(); // it also increase number of views\n return view;\n }", "private void addViews() {\n // Add self VideoView\n addSelfView(getVideoView(null));\n\n // Add remote VideoView(s)\n int maxIndex = getNumPeers();\n for (int i = 0; i < maxIndex; i++) {\n // Iterate over the remote Peers only (first Peer is self Peer)\n addRemoteView(getPeerId(i + 1));\n }\n }", "private void initiatePlayer() {\n ExoPlayerVideoHandler.getInstance().initiateLoaderController(\n this,\n loadingImage,\n exoPlayerView,\n ExoPlayerVideoHandler.getInstance().getVideoResolution()!=null?ExoPlayerVideoHandler.getInstance().getVideoResolution():getString(R.string.default_resolution),\n this\n );\n ExoPlayerVideoHandler.getInstance().playVideo();\n content = ExoPlayerVideoHandler.getInstance().getCurrentVideoInfo();\n //ExoPlayerVideoHandler.getInstance().goToForeground();\n setSpinnerValue();\n }", "private void prepareYoutubeVideo() {\r\n LinearLayout main = findViewById(R.id.eventMainLayout);\r\n\r\n YouTubePlayerView playerView = findViewById(R.id.youtube_player_view);\r\n if (playerView != null) {\r\n main.removeView(findViewById(R.id.textVideoTitle));\r\n main.removeView(playerView);\r\n }\r\n\r\n TextView videoTitle = (TextView) getLayoutInflater().inflate(R.layout.component_videotitle, null);\r\n LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\r\n LinearLayout.LayoutParams.WRAP_CONTENT,\r\n LinearLayout.LayoutParams.WRAP_CONTENT\r\n );\r\n int marginTitle = (int) ResolutionUtil.convertDpToPixels(this, 16);\r\n params.setMargins(marginTitle, 0,0, marginTitle);\r\n videoTitle.setLayoutParams(params);\r\n\r\n YouTubePlayerView view = (YouTubePlayerView) getLayoutInflater().inflate(R.layout.component_youtubeview, null);\r\n\r\n view.addYouTubePlayerListener(new AbstractYouTubePlayerListener() {\r\n @Override\r\n public void onReady(YouTubePlayer youTubePlayer) {\r\n String videoId = YoutubeUtil.getYoutubeVideoIdFromUrl(event.youtubeUrl);\r\n youTubePlayer.loadVideo(videoId, 0);\r\n youTubePlayer.pause();\r\n }\r\n });\r\n\r\n main.addView(videoTitle);\r\n main.addView(view);\r\n }", "@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n public List<ApiVideoDTO> getVideoList(ApiWrapperList<ApiVideoDTO> wrapper, OptionsIndexVideo options) {\n IndexParams params = new IndexParams(options);\n\n SqlScalars sqlScalars = new SqlScalars(generateSqlForVideoList(params));\n sqlScalars.addScalar(LITERAL_ID, LongType.INSTANCE);\n sqlScalars.addScalar(LITERAL_VIDEO_TYPE, StringType.INSTANCE); \n sqlScalars.addScalar(LITERAL_TITLE, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_ORIGINAL_TITLE, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_SORT_TITLE, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_VIDEO_YEAR, IntegerType.INSTANCE);\n sqlScalars.addScalar(LITERAL_RELEASE_DATE, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_SERIES_ID, LongType.INSTANCE);\n sqlScalars.addScalar(LITERAL_SEASON_ID, LongType.INSTANCE);\n sqlScalars.addScalar(LITERAL_SEASON, LongType.INSTANCE);\n sqlScalars.addScalar(LITERAL_EPISODE, LongType.INSTANCE);\n sqlScalars.addScalar(LITERAL_WATCHED, BooleanType.INSTANCE);\n\t\tsqlScalars.addScalar(LITERAL_LIBRARY_BASE, StringType.INSTANCE);\n\n if (params.checkNewest()) {\n sqlScalars.addScalar(\"newest\", TimestampType.INSTANCE);\n }\n\n // add Scalars for additional data item columns\n DataItemTools.addDataItemScalars(sqlScalars, params.getDataItems());\n // add additional parameters\n params.addScalarParameters(sqlScalars);\n\n List<ApiVideoDTO> queryResults = executeQueryWithTransform(ApiVideoDTO.class, sqlScalars, wrapper);\n\n if (!queryResults.isEmpty() && CollectionUtils.isNotEmpty(options.getArtworkTypes())) {\n LOG.trace(\"Adding artwork to index videos\");\n\n // build the meta data maps for faster retrieval\n Map<MetaDataType, List<Long>> metaDataIds = new EnumMap<>(MetaDataType.class);\n for (MetaDataType mdt : MetaDataType.values()) {\n metaDataIds.put(mdt, new ArrayList());\n }\n Map<String, ApiVideoDTO> metaDataResults = new HashMap<>();\n for (ApiVideoDTO video : queryResults) {\n // add the item to the map for further processing\n metaDataResults.put(KeyMaker.makeKey(video), video);\n // add the ID to the list\n metaDataIds.get(video.getVideoType()).add(video.getId());\n }\n // remove any blank entries\n for (MetaDataType mdt : MetaDataType.values()) {\n if (CollectionUtils.isEmpty(metaDataIds.get(mdt))) {\n metaDataIds.remove(mdt);\n }\n }\n\n addArtworks(metaDataIds, metaDataResults, options);\n }\n \n return queryResults;\n }", "public List<VideoBlockModel> getVideos() {\n return (List<VideoBlockModel>) (List) getVideos(false);\n }", "@Override\n public void getMovieContentData() {\n Cursor movieCursor = queryMovieData();\n\n ArrayList<MovieData> movieData = new ArrayList<>();\n\n if(movieCursor != null) {\n //do stuff\n while(movieCursor.moveToNext()) {\n MovieData movie = new MovieData();\n movie.setName(movieCursor.getString(movieCursor.getColumnIndex(MovieUriContract.MovieEntry.COLUMN_NAME)));\n movie.setDate(movieCursor.getString(movieCursor.getColumnIndex(MovieUriContract.MovieEntry.COLUMN_RELEASE_DATE)));\n movie.setGenreId(movieCursor.getInt(movieCursor.getColumnIndex(MovieUriContract.MovieEntry.COLUMN_GENRE)));\n }\n movieCursor.close();\n }\n\n //query genre data next, using the GenreId in Movie Data\n for (MovieData movie : movieData) {\n Cursor genreCursor = queryGenreData(movie.getGenreId());\n\n if(genreCursor != null) {\n //do stuff\n if (genreCursor.moveToFirst()) {\n movie.setGenre(movieCursor.getString(movieCursor.getColumnIndex(MovieUriContract.GenreEntry.COLUMN_NAME)));\n }\n genreCursor.close();\n }\n }\n\n view.updateMovieDataView(movieData);\n }", "public void Init(Context context, Map<String,Boolean> videos, int position, View view) {\n this.context = context;\n this.videos = videos;\n this.position = position;\n activity = (Activity) context;\n this.view = view;\n storageReference = FirebaseStorage.getInstance().getReference();\n //videosViewPager = (VideosViewPager)findViewById(R.id.videosViewPager);\n mediaController = new MediaController(context);\n mediaController.setMediaPlayer(mediaPlayerControls);\n setUpVideo();\n\n }", "public List<Video> getVideo() {\n\t\treturn null;\n\t}", "private void loadPopularMovies() {\n\n try {\n\n if (API_KEY.isEmpty()) {\n Toast.makeText(getApplicationContext(), \"Invalid API key\", Toast.LENGTH_SHORT).show();\n pd.dismiss();\n return;\n\n }\n Client Client = new Client();\n MovieService apiMovieService =\n Client.getClient().create(MovieService.class);\n Call<MovieResult> call = apiMovieService.getPopularMovies(API_KEY);\n call.enqueue(new Callback<MovieResult>() {\n @Override\n public void onResponse(Call<MovieResult> call, Response<MovieResult> response) {\n List<Movie> movies = response.body().getResults();\n recyclerView.setAdapter(new MovieAdapter(getApplicationContext(), movies));\n recyclerView.smoothScrollToPosition(0);\n\n\n }\n\n @Override\n public void onFailure(Call<MovieResult> call, Throwable t) {\n Log.d(\"Error\", t.getMessage());\n Toast.makeText(MainActivity.this, \"Error fetching data\", Toast.LENGTH_SHORT).show();\n }\n });\n\n\n } catch (Exception e) {\n Log.d(\"Error\", e.getMessage());\n Toast.makeText(this, e.toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n }", "@Override\n\tpublic List<CourseVideo> getCourseVideo(int courseid) {\n\t\tSession session = DataBaseHelper.getSession();\n\t\tsession.clear();\n\t\tList list = session.createSQLQuery(\"select * from coursevideo where courseid=\"+courseid).list();\n\t\tList<CourseVideo> courseVideos;\n\t\tif (list.size() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tcourseVideos = new ArrayList<>();\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tObject[] obj = (Object[]) list.get(i);\n\t\t\t\tCourseVideo courseVideo = new CourseVideo();\n\t\t\t\tcourseVideo.setId((Integer)obj[0]);\n\t\t\t\tcourseVideo.setCourseid((Integer)obj[1]);\n\t\t\t\tcourseVideo.setCoursename((String)obj[2]);\n\t\t\t\tcourseVideo.setCourseurl((String)obj[3]);\n\t\t\t\tcourseVideos.add(courseVideo);\n\t\t\t}\n\t\t\treturn courseVideos;\n\t\t}\n\t}", "@Override\n public CompletableFuture<SearchListResponse> fetchVideosResponse(String query,\n boolean isChannelID) {\n return CompletableFuture.supplyAsync(() -> {\n try {\n ytService = getService();\n YouTube.Search.List req1 =\n ytService.search().list(\"snippet\").setKey(DEVELOPER_KEY)\n .setType(\"video\").setOrder(\"date\").setMaxResults(10L);\n if (isChannelID) {\n req1 = req1.setChannelId(query);\n } else {\n req1 = req1.setQ(query);\n }\n return req1.execute();\n } catch (IOException | GeneralSecurityException e) {\n e.printStackTrace();\n return new SearchListResponse();\n }\n });\n }", "public interface VideoApiInterface {\n\n @GET(\"playlists?part=snippet&maxResults=50&key=\"+ Const.API_KEY+\"&channelId=\"+Const.CHANNEL_ID_EN)\n Call<ChannelInfoResult> getChannelInfoResult();\n\n @GET(\"playlistItems?part=snippet&maxResults=20\")\n Call<PlayListItem> getListVideoPlayList(@Query(\"playlistId\") String playlistID, @Query(\"key\") String key);\n\n @GET(\"videos\")\n Call<VideoStatistic> getVideoStatistic(@Query(\"id\") String videoID,\n @Query(\"key\") String key,\n @Query(\"part\") String part);\n\n @GET(\"channels?part=snippet&id=\"+Const.CHANNEL_ID_EN\n +\"&fields=items%2Fsnippet%2Fthumbnails&key=\"+Const.API_KEY)\n Call<Channel> getChannelAvatar();\n\n}", "List<VideoDTO> getVideosList(List<Video> videos) throws TransferObjectException;", "public ArrayList<VideoDTO> getFavouriteVideosArrayList() {\n try {\n ArrayList<VideoDTO> arrayListNewVideoDTOs = new ArrayList<VideoDTO>();\n SQLiteDatabase database = this.getWritableDatabase();\n database.enableWriteAheadLogging();\n String getFavoutiteVideosListQuery = \"SELECT * FROM \" + VideoTable.VIDEO_TABLE + \" WHERE \" + VideoTable.KEY_VIDEO_IS_FAVORITE + \"=1 \" + \" GROUP BY \" + VideoTable.KEY_VIDEO_ID + \" ORDER BY \" + VideoTable.KEY_VIDEO_NAME + \" ASC\";\n Cursor cursor = database.rawQuery(getFavoutiteVideosListQuery, null);\n if (cursor.moveToFirst()) {\n do {\n VideoDTO videoDTO = new VideoDTO();\n videoDTO.setVideoId(cursor.getLong(cursor.getColumnIndex(VideoTable.KEY_VIDEO_ID)));\n videoDTO.setVideoName(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_NAME)));\n videoDTO.setVideoShortDescription(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_SHORT_DESC)));\n videoDTO.setVideoLongDescription(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_LONG_DESC)));\n videoDTO.setVideoShortUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_SHORT_URL)));\n videoDTO.setVideoLongUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_LONG_URL)));\n videoDTO.setVideoThumbnailUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_THUMB_URL)));\n videoDTO.setVideoStillUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_STILL_URL)));\n videoDTO.setVideoCoverUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_COVER_URL)));\n videoDTO.setVideoWideStillUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_WIDE_STILL_URL)));\n videoDTO.setVideoBadgeUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_BADGE_URL)));\n videoDTO.setVideoDuration(cursor.getLong(cursor.getColumnIndex(VideoTable.KEY_VIDEO_DURATION)));\n videoDTO.setVideoTags(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_TAGS)));\n if (cursor.getInt(cursor.getColumnIndex(VideoTable.KEY_VIDEO_IS_FAVORITE)) == 0)\n videoDTO.setVideoIsFavorite(false);\n else\n videoDTO.setVideoIsFavorite(true);\n\n videoDTO.setVideoIndex(cursor.getInt(cursor.getColumnIndex(VideoTable.KEY_VIDEO_INDEX)));\n videoDTO.setPlaylistName(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_NAME)));\n videoDTO.setPlaylistId(cursor.getLong(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_ID)));\n videoDTO.setPlaylistThumbnailUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_THUMB_URL)));\n videoDTO.setPlaylistShortDescription(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_SHORT_DESC)));\n videoDTO.setPlaylistLongDescription(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_LONG_DESC)));\n videoDTO.setPlaylistTags(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_TAGS)));\n videoDTO.setPlaylistReferenceId(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_REFERENCE_ID)));\n videoDTO.setVideoSocialUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_SOCIAL_URL)));\n\n arrayListNewVideoDTOs.add(videoDTO);\n } while (cursor.moveToNext());\n }\n\n cursor.close();\n return arrayListNewVideoDTOs;\n } catch (Exception e) {\n e.printStackTrace();\n return new ArrayList<VideoDTO>();\n }\n\n }", "@Override\n\t\tprotected Object doInBackground(Object... params) {\n\n\t\t\tYouTube youtube = new YouTube.Builder(transport, jsonFactory,\n\t\t\t\t\tcredential).setApplicationName(Constants.APP_NAME).build();\n\t\t\ttry {\n\n\t\t\t\tVideoListResponse videosResponse = youtube.videos()\n\t\t\t\t\t\t.list(\"snippet\").setId(videoId).execute();\n\t\t\t\tvideoDescription = videosResponse.getItems().get(0)\n\t\t\t\t\t\t.getSnippet().getDescription();\n\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n\n try {\n JSONArray results = response.getJSONArray(\"results\");\n JSONObject curMovie = results.getJSONObject(0);\n key = curMovie.getString(\"key\");\n\n } catch (JSONException e) {\n logError(\"Failed to parse play_video endpoint\", e, true);\n }\n\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.video_gallery);\n\n mClient = Singleton.Instance().mClientMethod(this);\n\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n connectionDetector = new ConnectionDetector(getApplicationContext());\n sessionManager = new SessionManager(getApplicationContext(), sharedPrefValue);\n branchId = sessionManager.getUserDetails().get(SessionManager.KEY_BRANCH_ID);\n\n setUpRecyclerView();\n\n if (connectionDetector.isConnectingToInternet()) {\n fetchChannelId();\n } else {\n noDataAvailableTextView.setText(R.string.noDataAvailable);\n FancyToast.makeText(this, getString(R.string.no_internet), FancyToast.LENGTH_SHORT, FancyToast.ERROR, false).show();\n }\n\n videoDetailsArrayList = new ArrayList<>();\n youtubeVideoAdapter = new YoutubeVideoAdapter(this, videoDetailsArrayList);\n youtubeVideoAdapter.setClickListener(this);\n }", "private void listFileMyVideo() throws JSONException {\n\n listFileMyVideo = new JSONArray();\n\n int count = countFileMyVideo();\n\n for (int i = 0; count > i; i++) {\n\n JSONObject obj = new JSONObject();\n obj.put(\"name\", get_FileName(getPathMyVideo(), i));\n obj.put(\"path\", get_FilePath(getPathMyVideo(), i));\n\n listFileMyVideo.put(obj);\n }\n }", "private void findViews() {\n tv_loading_netspeed = findViewById(R.id.tv_loading_netspeed);\n ll_loading = findViewById(R.id.ll_loading);\n media_controller = findViewById(R.id.media_controller);\n llTop = (LinearLayout) findViewById(R.id.ll_top);\n tvName = (TextView) findViewById(R.id.tv_name);\n ivBattery = (ImageView) findViewById(R.id.iv_battery);\n tvSystemItem = (TextView) findViewById(R.id.tv_system_item);\n btnVoice = (Button) findViewById(R.id.btn_voice);\n btnSwichPlayer = (Button) findViewById(R.id.btn_swich_player);\n llBottom = (LinearLayout) findViewById(R.id.ll_bottom);\n tvCurrentItem = (TextView) findViewById(R.id.tv_current_item);\n tvDuration = (TextView) findViewById(R.id.tv_duration);\n btnExit = (Button) findViewById(R.id.btn_exit);\n btnPre = (Button) findViewById(R.id.btn_pre);\n btnVideoStartPause = (Button) findViewById(R.id.btn_video_start_pause);\n btnVideoNext = (Button) findViewById(R.id.btn_video_next);\n btnVideoVideoSwitchScree = (Button) findViewById(R.id.btn_video_video_switch_scree);\n seekbarVideo = findViewById(R.id.seekbarVideo);\n seekbarAudio = findViewById(R.id.seekbarAudio);\n ll_buffer = findViewById(R.id.ll_buffer);\n tv_netspeed = findViewById(R.id.tv_netspeed);\n btnVoice.setOnClickListener(this);\n btnSwichPlayer.setOnClickListener(this);\n btnExit.setOnClickListener(this);\n btnPre.setOnClickListener(this);\n btnVideoStartPause.setOnClickListener(this);\n btnVideoNext.setOnClickListener(this);\n btnVideoVideoSwitchScree.setOnClickListener(this);\n seekbarVideo.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n if (fromUser) {\n videoView.seekTo(progress);\n }\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n handler.removeMessages(HIDE_MEDIACONTROLLER);\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n handler.sendEmptyMessageDelayed(HIDE_MEDIACONTROLLER, 5000);\n }\n\n\n });\n\n\n }", "private void setupPlayer() {\n\n\n\n Video video = createVideoFromUrl(\"https://sonyhdslive-lh.akamaihd.net/i/LIVELINEARCHANNELWAHSD_2@324771/index_100_av-p.m3u8?sd=10&rebase=on&id=AgC2SfL6YBG2JpMHMVl8BkTC0SpVbBy%2frYkaeUHMRu8inYQ3DHLx4I+pRLNhOPyxeLBTSrs2hL4lZw%3d%3d&hdntl=exp=1496471827~acl=%2fi%2f*~data=hdntl~hmac=808df26a60cb28eff4d28a242510d2dba361d9d8658f1e3bbe3090f85e633632\");\n brightcoveVideoView.add(video);\n brightcoveVideoView.start();\n// ImaManager.setupIma(brightcoveVideoView, googleAds);\n\n }", "private void setupView() {\n refresh();\n if (isEmpty(movies)) {\n // Ok. so we have no movies. THat means one of two things. Either\n // we're trying to download the movies, or we tried and failed to\n // download them. In the former case just wait. We'll get a\n // notification when they're done. In the latter case, let the user\n // know.\n if (!isNullOrEmpty(getService().getUserAddress()) && getService().getDataProviderState() == DataProvider.State.Finished) {\n showNoInformationFoundDialog();\n }\n } else {\n setupMovieGrid();\n }\n }", "private void loadMovies() {\n try {\n SharedPreferences prefs = getActivity().getSharedPreferences(\n PREFS_NAME, 0);\n if (prefs.contains(SP_FEED)) {\n\n JSONObject jsonObject = new JSONObject(prefs.getString(SP_FEED,\n \"\"));\n\n JSONArray jsonMovieArray;\n jsonMovieArray = (JSONArray) ((JSONObject) jsonObject\n .get(\"feed\")).get(\"entry\");\n\n if (jsonMovieArray != null) {\n int len = jsonMovieArray.length();\n for (int i = 0; i < len; i++) {\n JSONObject jsonMovie = (JSONObject) jsonMovieArray\n .get(i);\n mList.add(new Movie(jsonMovie));\n }\n }\n }\n\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // Update adapter\n mArrayAdapter.notifyDataSetChanged();\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_home,container,false);\r\n\r\n\r\n recyclerView = view.findViewById(R.id.filesRV);\r\n if (videoFiles !=null && videoFiles.size() > 0)\r\n {\r\n videoAdapter = new VideoAdapter(getContext(),videoFiles);\r\n recyclerView.setAdapter(videoAdapter);\r\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext(),RecyclerView.VERTICAL,false));\r\n }\r\n\r\n\r\n return view;\r\n }", "@Override\n public View getView(int pos, View view, ViewGroup arg2) {\n ViewHolder vh;\n if(view==null){\n view= LayoutInflater.from(mContext).inflate(R.layout.look_item, null);\n vh=new ViewHolder();\n\n vh.iv_video = (ImageView) view.findViewById(R.id.iv_video);\n vh.tv_title = (TextView) view.findViewById(R.id.tv_title);\n view.setTag(vh);\n }else{\n vh=(ViewHolder)view.getTag();\n }\n\n VideoListBean videoListBean = videoListBeanList.get(pos);\n\n if(!StringUtils.isEmpty(videoListBean.getTitle())){\n vh.tv_title.setText(videoListBean.getTitle());\n }\n if(videoListBean.getType()==0 || videoListBean.getType()==1){\n if(!StringUtils.isEmpty(videoListBean.getCover_img())){\n imageLoader.displayImage(videoListBean.getCover_img(), vh.iv_video, PictureOption.getSimpleOptions());\n }else {\n String url = videoListBean.getVideo_url();\n if(!StringUtils.isEmpty(url)){\n mVideoThumbLoader.showThumbByAsynctack(url, vh.iv_video);\n }\n }\n\n }else if(videoListBean.getType()==2){\n List<ShowPhotoContentBean> showPhotoContentBeans = null;\n if(!StringUtils.isEmpty(videoListBean.getPics())){\n try{\n showPhotoContentBeans = gson.fromJson(videoListBean.getPics(),new TypeToken<List<ShowPhotoContentBean>>(){}.getType());\n if(showPhotoContentBeans != null && showPhotoContentBeans.size()>0){\n imageLoader.displayImage(showPhotoContentBeans.get(0).getPic1(), vh.iv_video, PictureOption.getSimpleOptions());\n }\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }\n\n return view;\n }", "public ArrayList<MovieUrl> query(){\n ArrayList<MovieUrl> arrayList = new ArrayList<MovieUrl>();\n Cursor cursor = database.query(DATABASE_TABLE, null, null, null, null, null, null);\n cursor.moveToFirst();\n MovieUrl movieUrl;\n if (cursor.getCount() > 0){\n do {\n movieUrl = new MovieUrl();\n movieUrl.setId(cursor.getInt(cursor.getColumnIndexOrThrow(_ID)));\n movieUrl.setTitleMovie(cursor.getString(cursor.getColumnIndexOrThrow(DbMediaContract.VideoColumns.TITLE_VIDEO)));\n movieUrl.setUrlMovie(cursor.getString(cursor.getColumnIndexOrThrow(DbMediaContract.VideoColumns.URL_VIDEO)));\n\n arrayList.add(movieUrl);\n cursor.moveToNext();\n } while (!cursor.isAfterLast());\n }\n cursor.close();\n return arrayList;\n }", "public void verVideo(View v) {\n ViewVideo.setVideoURI(Uri.parse(getExternalFilesDir(null) + \"/\" + txtNombreArchivo.getText().toString()));\n /*Ejecutamos el video*/\n ViewVideo.start();\n }", "@Override\n public ArrayList<Movie> loadInBackground() {\n\n\n URL movieRequestUrl = JsonUtils.createUrl(searchUrl);\n String movieSearchResults = null;\n ArrayList<Movie> movieResultData = new ArrayList<>();\n\n try {\n movieSearchResults = JsonUtils\n .getResponseFromHttpUrl(movieRequestUrl);\n movieResultData.addAll(OpenMovieJsonUtils.parseMovieJson(movieSearchResults));\n\n return movieResultData;\n\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n\n }", "@Override\n\tpublic List<VideoInfo> cgdetailedVideos(Map<String,Object> map) {\n\t\treturn dao.getAboutVideos(map);\n\t}", "public Video getVideo(int id) {\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\t/*\n\t\t * Cursor cursor = db.query(TABLE_CONTACTS, new String[] { KEY_ID,\n\t\t * KEY_NAME, KEY_PH_NO }, KEY_ID + \"=?\", new String[] {\n\t\t * String.valueOf(id) }, null, null, null, null);\n\t\t */\n\t\tCursor cursor = db.query(VivaFrame.TABLE_NAME, new String[] {\n\t\t\t\tVivaFrame.COLUMN_NAME_VI_ID, VivaFrame.COLUMN_NAME_VI_FOLDER,\n\t\t\t\tVivaFrame.COLUMN_NAME_VI_NAME, VivaFrame.COLUMN_NAME_VI_URL },\n\t\t\t\tVivaFrame.COLUMN_NAME_VI_ID + \"=?\",\n\t\t\t\tnew String[] { String.valueOf(id) }, null, null, null, null);\n\t\tif (cursor != null)\n\t\t\tcursor.moveToFirst();\n\n\t\tVideo video = new Video(Integer.parseInt(cursor.getString(0)),\n\t\t\t\tInteger.parseInt(cursor.getString(1)), cursor.getString(2),\n\t\t\t\tcursor.getString(3));\n\t\t// return contact\n\t\treturn video;\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(VideoDetailsActivity.this,\"Reciever fot the result. Do some processing bro\",Toast.LENGTH_LONG).show();\n mVideoView.setVideoURI();\n }", "@Override\n protected void initParams() {\n mVideoList.clear();\n mVideoList.addAll((Collection<? extends GetPlaybackCameraListResult.VideoEntity>) getArguments().getSerializable(\"videoList\"));\n mWorkoutId = getArguments().getInt(\"workoutid\");\n mOwnerId = getArguments().getInt(\"userid\");\n if (mVideoList.size() > 0) {\n mVideoNoneLl.setVisibility(View.GONE);\n }\n //初始化列表\n mAdapter = new HistoryVideoAdapter(mContext, mVideoList);\n mVideoRV.setAdapter(mAdapter);\n LinearLayoutManager manager = new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false);\n mVideoRV.setLayoutManager(manager);\n mVideoRV.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n if (newState == RecyclerView.SCROLL_STATE_IDLE) {\n mAdapter.highlightItem(getMiddlePosition());\n mCurrPos = getMiddlePosition() - 2;\n EventBus.getDefault().post(new EventUpdateVideoPos(mCurrPos));\n //将位置移动到中间位置\n ((LinearLayoutManager) recyclerView.getLayoutManager()).scrollToPositionWithOffset(getScrollPosition(), 0);\n mSelectV.setBackgroundResource(R.drawable.bg_history_video_selection);\n } else {\n mSelectV.setBackgroundResource(R.drawable.bg_history_video_selection_scroll);\n }\n }\n\n @Override\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n// mCurrPos = (int) (getScrollPosition()/mAdapter.getItemWidth()) - 2;\n }\n });\n mAdapter.setOnItemClickListener(new HistoryVideoAdapter.MyItemClickListener() {\n @Override\n public void onItemClick(int postion) {\n mAdapter.highlightItem(getMiddlePosition());\n updateHighlightPos(postion);\n mCurrPos = postion - 2;\n EventBus.getDefault().post(new EventUpdateVideoPos(postion - 2));\n }\n });\n// updateHighlightPos((mVideoList.size() / 2 + 2));\n }", "public void loadPlaybackList(JSONArray videoContentsJSON, Map selectionMap) {\n for (int i = 0; i < videoContentsJSON.length(); i++) {\n try {\n JSONObject videoJson = videoContentsJSON.getJSONObject(i);\n VideoItem videoItem = getVideoItem(videoJson);\n selectionMap.put(videoItem.getContentTitle(), videoItem);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(context, MovieTrailerActivity.class); // makes intent\n\n // grab videolink\n//\n// String url = API_BASE_URL + \"/movie/\" + movie.getId() + \"/videos\"; // create url -- endpoint is videos\n// RequestParams params = new RequestParams();\n// params.put(API_KEY_PARAM, \"a07e22bc18f5cb106bfe4cc1f83ad8ed\"); // api key always required\n// client.get(url, params, new JsonHttpResponseHandler() {\n// @Override\n// public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n// try {\n// JSONArray results = response.getJSONArray(\"results\"); // root node\n// String video_key = results.getJSONObject(0).getString(\"key\");\n// Toast.makeText(context, video_key, Toast.LENGTH_SHORT).show();\n//\n// } catch (JSONException e) {\n// Toast.makeText(context, \"failed to retreive video\", Toast.LENGTH_SHORT).show();\n// }\n// }\n//\n// @Override\n// public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n// Toast.makeText(context, \"failed to retreive video\", Toast.LENGTH_SHORT).show();\n// }\n// });\n\n //intent.putExtra(Movie.class.getSimpleName(), Parcels.wrap(movie));\n // ^^ serializes movie using parceler. it uses short name as key, movie as value\n context.startActivity(intent); // start activity\n }", "public void fetchFavoritedMovies() {\n favoritesSelected = true;\n Cursor cursor =\n getActivity().getContentResolver().query(MovieContract.FavoriteMovieEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n ArrayList<MovieModel> movieModels = new ArrayList<>();\n if (cursor != null) {\n while (cursor.moveToNext()) {\n MovieModel movieModel = new MovieModel(getActivity(), cursor);\n // Get the trailers and reviews\n String movieId = cursor.getString(cursor.getColumnIndex(MovieContract.FavoriteMovieEntry._ID));\n Cursor trailerCursor =\n getActivity().getContentResolver().query(MovieContract.TrailerEntry.CONTENT_URI,\n null,\n MovieContract.TrailerEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n Cursor reviewCursor =\n getActivity().getContentResolver().query(MovieContract.ReviewEntry.CONTENT_URI,\n null,\n MovieContract.ReviewEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n ArrayList<MovieTrailerModel> movieTrailerModels = new ArrayList<>();\n ArrayList<MovieReviewModel> movieReviewModels = new ArrayList<>();\n if (trailerCursor != null) {\n while (trailerCursor.moveToNext()) {\n movieTrailerModels.add(new MovieTrailerModel(getActivity(), trailerCursor));\n }\n trailerCursor.close();\n }\n if (reviewCursor != null) {\n while (reviewCursor.moveToNext()) {\n movieReviewModels.add(new MovieReviewModel(getActivity(), reviewCursor));\n }\n reviewCursor.close();\n }\n movieModel.setReviews(movieReviewModels);\n movieModel.setTrailers(movieTrailerModels);\n movieModels.add(movieModel);\n }\n cursor.close();\n }\n movieGridAdapter.setMovieModels(movieModels);\n }", "@Override\n public List<Movie> loadInBackground() {\n\n // obtain the Url, used for the http request\n URL url = AppUtilities.buildUrl(pageNumberBeingQueried, sortOrderOfResults,\n searchQuerySubmitted, preferredMovieGenre, preferredStartYear,\n preferredEndYear, preferenceValuesAreDefault);\n\n // perform the url request\n String jsonResponseString = null;\n try {\n jsonResponseString = AppUtilities.getResponseFromHttpUrl(url);\n } catch (IOException io_exception) {\n io_exception.printStackTrace();\n }\n\n // initialise the return object\n List<Movie> movieList = null;\n\n // if the response String is not null - parse it\n if (jsonResponseString != null) {\n // call helper method to parse JSON\n Pair<List<Movie>, Integer> result = JsonUtilities.extractFromJSONString(jsonResponseString);\n movieList = result.first;\n jsonResponseCode = result.second;\n }\n return movieList;\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tArrayList<VideoInfo> videoinfo = new ArrayList<VideoInfo>();\n\t\t\t\tfor(int i = 0;i<now_source.size();i++){\n\t\t\t\t\tVideoInfo vinfo = new VideoInfo();\n\t\t\t\t\tvinfo.title = now_source.get(i).getTitle();\n\t\t\t\t\tvinfo.url = now_source.get(i).getUrl();\n\t\t\t\t\tvideoinfo.add(vinfo);\n\t\t\t\t}\n\t\t\t\tif(null!=videoinfo&&videoinfo.size()>0){\n\t\t\t\t\tIntent intent = null;\n\t\t\t\t\tintent = new Intent(VodDetailsActivity.this,WebVideoPlayerActivity.class);\n//\t\t\t\t\tif(null!=domain && domain.contains(\"pps\")||domain.contains(\"qiyi\")){\n//\t\t\t\t\t\tintent = new Intent(VodDetailsActivity.this,MeidaActivity.class);\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tintent = new Intent(VodDetailsActivity.this,VideoPlayerActivity.class);\n//\t\t\t\t\t}\n\t\t\t\t\tintent.putParcelableArrayListExtra(\"videoinfo\",videoinfo);//数据集合\n\t\t\t\t\tintent.putExtra(\"albumPic\",albumPic);//图片路径\n\t\t\t\t\tintent.putExtra(\"vodtype\", vodtype);//影片类型\n\t\t\t\t\tintent.putExtra(\"vodstate\", vodstate);//影片情势\n\t\t\t\t\tintent.putExtra(\"nextlink\", nextlink);\n\t\t\t\t\tintent.putExtra(\"videoId\", videoId);//影片ID\n\t\t\t\t\tintent.putExtra(\"vodname\", vodname);//电影的名字\n\t\t\t\t\tintent.putExtra(\"sourceId\", sourceId);//源id\n\t\t\t\t\tintent.putExtra(\"domain\", domain);//domain\n\t\t\t\t\tintent.putExtra(\"playIndex\",gv_postion*10+position);//剧集标\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\toverridePendingTransition(android.R.anim.fade_in,android.R.anim.fade_out);\n\t\t\t\t}else{\n\t\t\t\t\tUtils.showToast(context,\n\t\t\t\t\t\t\t\"对不起!没有找到数据源,请切换其它源。\",\n\t\t\t\t\t\t\tR.drawable.toast_err);\n\t\t\t\t}\n\t\t\t}", "public void preparePlayer() {\n uriParse();\n dataSourceFactory = buildDataSourceFactory(bandwidthMeter);\n\n switch (tipoVideo) {\n case 0:\n videoSource = new DashMediaSource(uri, dataSourceFactory, new DefaultDashChunkSource.Factory(dataSourceFactory), null, null);\n break;\n case 1:\n videoSource = new HlsMediaSource(uri, dataSourceFactory, null, null);\n break;\n case 2:\n videoSource = new ExtractorMediaSource(uri, dataSourceFactory, new DefaultExtractorsFactory(), null, null);\n break;\n }\n\n player.prepare(videoSource);\n\n }", "public LiveData<List<Movie>> fetchMovies(String option) {\n return Api.fetchMovies(option);\n }", "private void showCachedMovieList() {\n String cacheData = AppPrefs.getInstance(this).getCacheData();\n showMovieList(new Gson().fromJson(cacheData, MovieResponse.class));\n }", "@Override\n public void onClick(View view) {\n getOps().downloadVideo();\n }", "@Override\n public void onInitializationSuccess(YouTubePlayer.Provider provider,\n YouTubePlayer youTubePlayer, boolean b) {\n youTubePlayer.loadVideo(videoId);\n }", "private void loadMovies(String uri){\n showNothing();\n progressBar.setVisibility(View.VISIBLE);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, uri,\n null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n progressBar.setVisibility(View.INVISIBLE);\n\n movieArrayList = Movie.getAllMovies(response.toString());\n\n loadRecyclerViewWithMovies(movieArrayList);\n\n showMovies();\n } catch (JSONException | NullPointerException e) {\n if(sortBy == Order.TOP_RATED || sortBy == Order.POPULARITY)\n showError();\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if(sortBy == Order.TOP_RATED || sortBy == Order.POPULARITY)\n showError();\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "public List<CourseComponent> getVideos(boolean downloadableOnly) {\n List<CourseComponent> videos = new ArrayList<>();\n fetchAllLeafComponents(videos, EnumSet.of(BlockType.VIDEO));\n // Confirm that these are actually VideoBlockModel instances.\n // This is necessary because if for some reason the data is null,\n // then the block is represented as an HtmlBlockModel, even if\n // the type is video. This should not actually happen in practice\n // though; this is just a safeguard to handle that unlikely case.\n for (Iterator<CourseComponent> videosIterator = videos.iterator();\n videosIterator.hasNext(); ) {\n CourseComponent videoComponent = videosIterator.next();\n if (!(videoComponent instanceof VideoBlockModel) ||\n downloadableOnly && videoComponent.getDownloadableVideosCount() == 0) {\n // Remove a video component if its not downloadable when we're only looking for the\n // ones that are downloadable\n videosIterator.remove();\n }\n }\n return videos;\n }", "@Override\n public void onVideoStarted() {\n }", "@Override\n\tpublic List<VideoInfo> searchVideos(Map<String,Object> map) {\n\t\treturn dao.getAboutVideos(map);\n\t}", "private void loadTopRatedMovies() {\n\n try {\n if (API_KEY.isEmpty()) {\n Toast.makeText(getApplicationContext(), \"Invalid API key\", Toast.LENGTH_SHORT).show();\n pd.dismiss();\n return;\n\n }\n Client Client = new Client();\n MovieService apiMovieService =\n Client.getClient().create(MovieService.class);\n Call<MovieResult> call = apiMovieService.getTopRatedMovies(API_KEY);\n call.enqueue(new Callback<MovieResult>() {\n @Override\n public void onResponse(Call<MovieResult> call, Response<MovieResult> response) {\n List<Movie> movies = response.body().getResults();\n recyclerView.setAdapter(new MovieAdapter(getApplicationContext(), movies));\n recyclerView.smoothScrollToPosition(0);\n\n\n }\n\n @Override\n public void onFailure(Call<MovieResult> call, Throwable t) {\n Log.d(\"Error\", t.getMessage());\n Toast.makeText(MainActivity.this, \"Error fetching data\", Toast.LENGTH_SHORT).show();\n }\n });\n\n\n } catch (Exception e) {\n Log.d(\"Error\", e.getMessage());\n Toast.makeText(this, e.toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public void getJsonRequest() {\n String url = Constants.PLAY_LIST_ITEM_URL+\"?part=\"+Constants.PART+\"&playlistId=\"+playlistId+\"&maxResults=50&key=\"+Constants.API_KEY;\n StringRequest stringRequest = new StringRequest(Request.Method.GET, url,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n try {\n JSONObject jsonObject = new JSONObject(response);\n JSONArray jsonArray = jsonObject.getJSONArray(\"items\");\n for (int i = 0; i < jsonArray.length(); i++){\n JSONObject jsonObject1 = jsonArray.getJSONObject(i);\n\n\n /*\n *------------------Creating Snippet Object for fetching items like title, description, thumbnail Object etc---------------\n */\n JSONObject snippetObject = jsonObject1.getJSONObject(\"snippet\");\n String title = snippetObject.getString(\"title\");\n String description = snippetObject.getString(\"description\");\n\n\n /*\n *------------------Creating thumbnail Object for fetching thumbnail url----------------\n */\n\n JSONObject thumbnailObject = snippetObject.getJSONObject(\"thumbnails\").getJSONObject(\"high\");\n String thumbnail = thumbnailObject.getString(\"url\");\n\n\n /*\n *-----------------creating resource Json Object for fetching videoId here----------\n */\n\n JSONObject resourceObject = snippetObject.getJSONObject(\"resourceId\");\n String videoId = resourceObject.getString(\"videoId\");\n\n mSubjectDetailList.add(new SubjectDetailsDataModel(title,description,thumbnail,videoId));\n }\n mShimmerViewContainer.stopShimmer();\n mShimmerViewContainer.setVisibility(View.GONE);\n setAdapter(mSubjectDetailList);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(),\"error\"+error.getMessage(),Toast.LENGTH_SHORT).show();\n }\n });\n MySingleton.getInstance(getApplicationContext()).addTORequestQueue(stringRequest);\n }" ]
[ "0.73309684", "0.72596043", "0.7096264", "0.7028033", "0.6895013", "0.6765469", "0.6672863", "0.66132015", "0.6373126", "0.6368088", "0.633543", "0.6276877", "0.62542886", "0.62225616", "0.6218292", "0.61977535", "0.6175995", "0.61635965", "0.61555254", "0.61332077", "0.6131873", "0.6088574", "0.6075952", "0.6044466", "0.6043962", "0.6032705", "0.6017539", "0.6004993", "0.5999655", "0.5989978", "0.5987383", "0.5984299", "0.597383", "0.59699", "0.59685445", "0.5944579", "0.5944358", "0.5926824", "0.59203696", "0.5914286", "0.59074163", "0.5904584", "0.58908755", "0.58879286", "0.58636826", "0.5863356", "0.5862568", "0.5859802", "0.58516335", "0.5849783", "0.58492315", "0.5833513", "0.58326644", "0.5829228", "0.5827823", "0.5821778", "0.5816691", "0.58160204", "0.5803657", "0.579856", "0.5785314", "0.57850426", "0.57757413", "0.5774938", "0.57709473", "0.5769812", "0.57462466", "0.5740395", "0.5734407", "0.57224494", "0.57108885", "0.5691933", "0.56896514", "0.5679459", "0.56772417", "0.567621", "0.5670671", "0.56701785", "0.56673884", "0.56542295", "0.56357545", "0.5631537", "0.56238484", "0.56237525", "0.5622618", "0.56156313", "0.56004465", "0.5596977", "0.55958843", "0.5591013", "0.5583976", "0.55728126", "0.55684495", "0.55611247", "0.5541676", "0.5532294", "0.5526223", "0.5521168", "0.551793", "0.55096114" ]
0.7066681
3
fetch reviews and populate their views
private void populateReviews(Bundle savedInstanceState) { LinearLayoutManager layoutManager = new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false); mBinding.movieReviews.reviewsList.setLayoutManager(layoutManager); mBinding.movieReviews.reviewsList.setHasFixedSize(true); mBinding.movieReviews.reviewsList.setNestedScrollingEnabled(false); RecyclerView.ItemDecoration itemDecoration = new HorizontalItemDecoration(this); mBinding.movieReviews.reviewsList.addItemDecoration(itemDecoration); mReviewAdapter = new ReviewAdapter(this); mBinding.movieReviews.reviewsList.setAdapter(mReviewAdapter); if (savedInstanceState != null && savedInstanceState.containsKey(BUNDLE_REVIEWS)) { mReviewAdapter.addReviewsList(savedInstanceState. <Review>getParcelableArrayList(BUNDLE_REVIEWS)); if (mReviewAdapter.getItemCount() == 0) { mBinding.movieReviews.reviewsLabel.setVisibility(View.GONE); } } else { Call<ApiResponse<Review>> call = mApiClient.getReviews(movie.movieId); call.enqueue(new Callback<ApiResponse<Review>>() { @Override public void onResponse(Call<ApiResponse<Review>> call, Response<ApiResponse<Review>> response) { List<Review> result = response.body().results; mReviewAdapter.addReviewsList(result); if (result.size() == 0) { mBinding.movieReviews.reviewsLabel.setVisibility(View.GONE); } } @Override public void onFailure(Call<ApiResponse<Review>> call, Throwable t) { Toast.makeText(DetailActivity.this, getString(R.string.connection_error), Toast.LENGTH_LONG).show(); } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateReviews(){\r\n FetchReviewsTask reviewsTask = new FetchReviewsTask();\r\n reviewsTask.execute(MovieId);\r\n }", "public void showReviews(View view) {\n if (reviewNo > 0) {\n //send the List of Review objects to the host activity\n listener.displayReviews(reviews);\n }\n }", "private void showReviews() {\n reviewsList = (LinearLayout) rootView.findViewById(R.id.reviews_list);\n LayoutInflater inflater = getActivity().getLayoutInflater();\n for (Review review : reviews) {\n View reviewView = inflater.inflate(R.layout.list_item_review, container, false);\n\n TextView reviewAuthor = (TextView) reviewView.findViewById(R.id.review_author);\n reviewAuthor.setText(review.getAuthor());\n\n TextView reviewContent = (TextView) reviewView.findViewById(R.id.review_content);\n reviewContent.setText(review.getContent());\n\n reviewsList.addView(reviewView);\n }\n }", "private void updateReviews() {\n ArrayList<MovieReview> movieReviewArrayList = new ArrayList<>();\n reviewRecyclerView = findViewById(R.id.reviews_recycler_view);\n reviewRecyclerView.setLayoutManager(new LinearLayoutManager(this));\n movieReviewAdapter = new MovieReviewAdapter(movieReviewArrayList, MovieDetailActivity.this);\n reviewRecyclerView.setAdapter(movieVideoAdapter);\n }", "private void setupReviewsList() {\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(DetailActivity.this, RecyclerView.VERTICAL, false);\n reviewsRecyclerView.setLayoutManager(linearLayoutManager);\n reviewsRecyclerView.setHasFixedSize(true);\n\n //setting up adapter\n ReviewAdapter reviewAdapter = new ReviewAdapter(DetailActivity.this, reviewArrayList);\n reviewsRecyclerView.setAdapter(reviewAdapter);\n }", "public void setReviewsList(ArrayList<Review> reviews) {\n this.reviews = reviews;\n }", "public void setReviews(ArrayList<String> reviews) {\n this.reviews = reviews;\n }", "ArrayList<Review> getMoreReviews()\n {\n ArrayList<Review> reviews = new ArrayList<>();\n\n if (hasInfo && curReviewURL != null && !curReviewURL.equals(\"\"))\n {\n try\n {\n Document reviewResultPage = Jsoup.connect(curReviewURL)\n .userAgent(\"Mozilla/5.0\").ignoreHttpErrors(true)\n .ignoreContentType(true).get();\n\n // Handles the rare case where the API gives an error.\n if (reviewResultPage.getElementsByTag(\"title\").text().equals(\"Error\"))\n {\n return reviews;\n }\n\n Elements unparsedReviews = reviewResultPage.getElementsByTag(\"review\");\n\n for (Element unparsedReview : unparsedReviews)\n {\n String reviewTitle = unparsedReview.getElementsByTag(\"title\").text();\n String reviewText = unparsedReview.getElementsByTag(\"reviewText\").text();\n StarRating starRating = StarRating.valueOf(Integer.parseInt(unparsedReview\n .getElementsByTag(\"rating\")\n .text()));\n Integer numHelpful = Integer.parseInt(unparsedReview.getElementsByTag(\"upVotes\").text());\n Integer numUnhelpful = Integer.parseInt(unparsedReview.getElementsByTag(\"downVotes\").text());\n\n // Each parsed review datum is added to a new review and added to the product's\n // reviews, the date is always null since Walmart reviews do not have dates.\n reviews.add(new Review(reviewTitle, reviewText, starRating, null\n , numHelpful, numUnhelpful, Retailer.WALMART));\n }\n\n curReviewPageNum++;\n\n // Set the current review URL to the next page.\n WalmartRequestHelper walmartRequestHelper = new WalmartRequestHelper(itemID, curReviewPageNum);\n curReviewURL = walmartRequestHelper.getRequestURL();\n }\n catch (IOException ioe)\n {\n ioe.printStackTrace();\n }\n }\n\n return reviews;\n }", "private void loadReviews(){\n cursor = db.rawQuery(\"SELECT * FROM REVIEW WHERE BookID = \"+bookIDSelected+\";\", null);\n startManagingCursor(cursor);\n List<String[]> reviews = new ArrayList<>();\n double sumRating = 0;\n\n while(cursor.moveToNext()){\n String[] arr ={\n String.valueOf(cursor.getInt(0)),\n String.valueOf(cursor.getDouble(3)),\n cursor.getString(2)\n };\n reviews.add(arr);\n sumRating += cursor.getDouble(3);\n }\n setRatingTotal( sumRating / reviews.size() );\n //Toast.makeText(this, ratingTotal+\" = \"+sumRating+\" / \"+reviews.size(), Toast.LENGTH_SHORT).show();\n ratingBarTotal = findViewById(R.id.rvRatingBarTotal);\n ratingBarTotal.setRating((float) ratingTotal);\n\n txtNumRv = findViewById(R.id.rvTxtNumRv);\n txtNoRv = findViewById(R.id.rvTxtNoReview);\n DecimalFormat df = new DecimalFormat(\"#.##\");\n if(reviews.size() == 0){\n txtNumRv.setText( R.string.noReviewsYet );\n } else {\n txtNumRv.setText(df.format(ratingTotal) + \" / \" + reviews.size() + \" reviews\");\n txtNoRv.setVisibility(View.INVISIBLE);\n }\n\n listView = findViewById(R.id.rvListView);\n listView.setAdapter(adapter = new ReviewAdapter(reviews));\n\n }", "public void setReviews(Set<Review> reviews) {\n this.reviews = reviews;\n }", "public void setReviews(ArrayList<Review> reviews) {\n\t\tthis.reviews = reviews;\n\t}", "public void viewAllReviews(View v){\n //Check if initialized to prevent null pointer\n if(currentBook.reviews != null) {\n int startIndex = mReviews.getChildCount() - 1; //Get index of last visible view\n int endIndex = currentBook.reviews.size() - 1; //Get index of last possible view\n\n //If there exist more views than are shown\n if(endIndex > startIndex){\n reviewAdapter(currentBook.reviews, mReviews, startIndex, endIndex, true);\n mSeeAll.setVisibility(GONE);\n }\n }\n }", "@RequestMapping(value=\"reviews\", method=RequestMethod.GET,\n\t\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\t\t@ResponseBody\n\t\tpublic ResponseEntity<List<ReviewBean>> getReviews(){\n\t\t\t//Call on session to get current user's reviews\n\t\t\t//For now it just grabs hardcoded user's reviews\n\t\t\treturn new ResponseEntity<List<ReviewBean>>(this.dao.getAllReviewsByUserId(72), HttpStatus.OK);\n\t\t}", "void setReviewStats()\n {\n if (hasInfo)\n {\n curReviewPageNum = 1;\n WalmartRequestHelper walmartRequestHelper = new WalmartRequestHelper(itemID, curReviewPageNum);\n\n curReviewURL = walmartRequestHelper.getRequestURL();\n\n Integer numStars[] = new Integer[5];\n\n for (int i = 0; i < 5; i++)\n {\n numStars[i] = 0;\n }\n\n try\n {\n Document reviewResultPage = Jsoup.connect(curReviewURL).userAgent(\"Mozilla\")\n .ignoreHttpErrors(true).ignoreContentType(true).get();\n\n // Handles the rare case where the API gives an error.\n if (reviewResultPage.getElementsByTag(\"title\").text().equals(\"Error\"))\n {\n return;\n }\n\n Elements unparsedRatings = reviewResultPage.getElementsByTag(\"ratingCounts\");\n\n // Review statistics are only generated if ratings can be found.\n if (unparsedRatings.size() != 0)\n {\n for (int i = 0; i < unparsedRatings.size(); i++)\n {\n String unparsedRatingCount = unparsedRatings.get(i).getElementsByTag(\"count\").text();\n\n if (!unparsedRatingCount.equals(\"\"))\n {\n numStars[i] = Integer.parseInt(unparsedRatings.get(i).text());\n }\n else\n {\n // No ratings could be found\n numStars[i] = 0;\n }\n }\n\n reviewStats = new ReviewStats(numStars);\n }\n else\n {\n reviewStats = new ReviewStats(numStars);\n }\n }\n catch (IOException ioe)\n {\n ioe.printStackTrace();\n }\n }\n }", "private void calculate() {\n //Making Database Connection\n String restaurant_id = partner.getRestaurant_id();\n DatabaseReference myRef = FirebaseDatabase.getInstance().getReference(\"reviews\");\n\n Query query = myRef.orderByChild(\"res_id\").equalTo(restaurant_id);\n query.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (snapshot.exists()) {\n reviewsNum = snapshot.getChildrenCount();\n Log.d(TAG, \"onDataChange: Found: \"+reviewsNum+\" reviews\");\n if(reviewsNum>31){\n mReviewsCount.setText(\"30+\");\n }else{\n mReviewsCount.setText(reviewsNum+\"\");\n }\n }\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n fetchRatings();\n\n\n /* myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull @NotNull DataSnapshot snapshot) {\n for(DataSnapshot ds:snapshot.getChildren()){\n // Log.d(TAG, \"onDataChange: Reviews \"+ds.toString());\n ReviewModel review = ds.getValue(ReviewModel.class);\n // Log.d(TAG, \"onDataChange: DataSnapshot : \"+ds.toString());\n // Log.d(TAG, \"onDataChange: Review : \"+review.toString());\n reviews.add(review);\n }\n Log.d(TAG, \"onDataChange: Added All Reviews\");\n showReviews();\n }\n\n @Override\n public void onCancelled(@NonNull @NotNull DatabaseError error) {\n\n }\n });*/\n }", "public void fillReviews(int totalEntries) {\n StoreAPI storeOperations = new StoreAPIMongoImpl();\n for (int i = 0; i < totalEntries; i++) {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n Date date = new Date();\n int getRandomUserId = getRandomNumber(0, 999);\n Fairy fairy = Fairy.create();\n TextProducer text = fairy.textProducer();\n storeOperations.postReview(i, \"user_\" + getRandomUserId, \"password_\" + getRandomUserId, (long) getRandomNumber(0, 9999), getRandomNumber(1, 5), text.paragraph(getRandomNumber(1, 5)), dateFormat.format(date));\n }\n }", "public Set<Review> getReviews() {\n return reviews;\n }", "public void deliverResult(ArrayList<Reviews> reviews) {\n mReviews = reviews;\n super.deliverResult(reviews);\n }", "private void initializeReviewsAdapter() {\n mReviewsAdapter = new ReviewsAdapter(mUserReviewDataArrayList, this, this, TRUE);\n mBinding.rvPdpProductReviews.setAdapter(mReviewsAdapter);\n }", "private void readReviews(final String filename) \n\t{\n\t\ttry\n\t\t{\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(new File(\"dataset\" + File.separator + filename)));\n\t\t\tString line;\n\t\t\t\n\t\t\twhile ((line = br.readLine()) != null) \n\t\t\t{\n\t\t\t\tString[] tokens = line.split(\";;\");\n\t\t\t\tif(tokens.length != 12)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Error reading from file \\\"\" + filename + \"\\\"\");\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString reviewId = tokens[0];\n\t\t\t\tString reviewerUrl = tokens[1];\n\t\t\t\t\n\t\t\t\tString productCategory = tokens[2];\n\t\t\t\tString productId = tokens[3];\n\t\t\t\tString productName = tokens[4];\n\t\t\t\t\n\t\t\t\tString reviewTitle = tokens[5];\n\t\t\t\tString reviewText = tokens[6];\n\t\t\t\tdouble reviewRating = Double.parseDouble(tokens[7]);\n\t\t\t\tString reviewDate = tokens[8];\n\t\t\t\t\n\t\t\t\tint posVotes = Integer.parseInt(tokens[9]);\n\t\t\t\tint totalVotes = Integer.parseInt(tokens[10]);\n\t\t\t\tdouble helpfulness = Double.parseDouble(tokens[11]);\n\t\t\t\t\n\t\t\t\treviews.add(new Review(reviewId, reviewerUrl, productCategory, productId, productName, reviewTitle, reviewText, reviewRating, reviewDate, posVotes, totalVotes, helpfulness));\n\t\t\t\t\n\t\t\t\t/** stores the helpfulness of reviews rated from 1 to 5 **/\t\t\t\n\t\t\t\tif (reviewRating == (int)(reviewRating))\n\t\t\t\t{\n\t\t\t\t\tList<Double> list = ratings.containsKey(reviewRating)? ratings.get(reviewRating): new ArrayList<Double>();\n\t\t\t\t\tlist.add(helpfulness);\n\t\t\t\t\tratings.put(reviewRating, list);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// update the information in for the product\n\t\t\t\tupdateProduct(productId, reviewRating);\n\t\t\t\t// create a new ReviewInstance object\n\t\t\t\tReviewInstance ri = new ReviewInstance();\n\t\t\t\t// store rating of this review\n\t\t\t\tri.setRating(reviewRating);\n\t\t\t\t// classify whether this review is helpful or not\n\t\t\t\tri.setReviewHelpfulness(helpfulness>=0.75 ? \"helpful\" : \"unhelpful\");\n\t\t\t\t\n\t\t\t\t// store the ReviewInstance\n\t\t\t\tthis.reInstanceList.add(ri);\n\t\t\t\treInstanceMap.put(reviewId, ri);\n\t\t\t}\n\t\t\tcomputeStdDevRating();\n\t\t\tbr.close();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void addReviews(List<Review> reviewsLoaded){\n\n if(reviewsLoaded==null)\n return;\n\n reviews.addAll(reviewsLoaded);\n notifyDataSetChanged();\n }", "@Override\n public void getReviews(ArrayList<String> author, ArrayList<String> content) {\n if (author.size() > 0 && content.size() > 0 && author.size() == content.size()) {\n ContentValues[] reviewsArray = new ContentValues[author.size()];\n for (int i = 0; i < author.size(); i++) {\n ContentValues reviewsData = new ContentValues();\n reviewsData.put(MovieContract.ReviewEntry.COLUMN_MOVIE_ID, movieObject.getId());\n reviewsData.put(MovieContract.ReviewEntry.COLUMN_AUTHOR, author.get(i));\n reviewsData.put(MovieContract.ReviewEntry.COLUMN_CONTENT, content.get(i));\n reviewsArray[i] = reviewsData;\n }\n Uri reviewsUri = MovieContract.ReviewEntry.CONTENT_URI.buildUpon().appendPath(Integer.toString(movieObject.getId())).build();\n getContext().getContentResolver().bulkInsert(reviewsUri, reviewsArray);\n }\n currentPage++;\n if (currentPage <= maxPage) {\n GetReviewsFromApi getReviewsFromApi = new GetReviewsFromApi(getContext(), MovieDetailsFragment.this, movieObject.getId());\n getReviewsFromApi.execute();\n }\n }", "@GET(\"/attractions/{attractionId}/reviews\")\n Call<List<Review>> getReviews(\n @Path(\"attractionId\") int attractionId\n );", "private Map<Profile, String> review(){\n\t\treturn allReviews;\n\t}", "public ArrayList<Review> getReviewsList() {\n return reviews;\n }", "FetchRequest<Review> byId(String id);", "public void reviews(Parameters parameters, final onSuccessCallback callback){\n getJSONArray(parameters.buildQuery(Endpoint.REVIEWS), new onSuccessCallback() {\n @Override\n public void onSuccess(JSONArray result) {\n callback.onSuccess(result);\n }\n\n @Override\n public void onError(VolleyError error) {\n callback.onError(error);\n }\n });\n }", "@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)\n\t\tpublic ResponseEntity<Object> getReviews(HttpServletResponse response) {\n\t\t\t\n\t\t\tresponse.addHeader(\"Date\", new Date().toString());\n\t\t\tresponse.setHeader(\"Cache-Control\",\"no-cache,no-store,must-revalidate\");\n\t\t response.setHeader(\"Pragma\",\"no-cache\");\n\t\t response.setHeader(\"Version\",\"Mechanic API V-2.0\");\n\t\t response.setDateHeader(\"Expires\", 0);\n\t\t \n\t\t\treturn new ResponseEntity<>( reviewService.getReviews(), HttpStatus.OK);\n\t\t}", "public ArrayList<String> getReviews() {\n return reviews;\n }", "public ReviewsAdapter() {\n\t\tmovieReviews = new ArrayList<MovieReview>();\n\t}", "public ArrayList<Review> getReviews() {\n\t\treturn reviews;\n\t}", "private void displayProductComment() {\n WooCommerceService service = ServiceGenerator.createService(WooCommerceService.class);\n final Call<ProductReviewsResponse> productReviewsResponseCall = service.getProductReviewsById(productId);\n productReviewsResponseCall.enqueue(new Callback<ProductReviewsResponse>() {\n @Override\n public void onResponse(Call<ProductReviewsResponse> call, Response<ProductReviewsResponse> response) {\n ProductReviewsResponse productReviewsResponse = response.body();\n List<ProductReview> productReviews = productReviewsResponse.getProductReviews();\n recyclerViewAdapter = new CommentAdapter(productReviews);\n recyclerView.setAdapter(recyclerViewAdapter);\n }\n\n @Override\n public void onFailure(Call<ProductReviewsResponse> call, Throwable t) {\n Log.e(\"ERROR\", t.getMessage());\n }\n });\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_reviews, container, false);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = MoviesActivity.cm.getActiveNetworkInfo();\n QUERY_BASE_URL_R = MDB_MOVIE_PATH1 + MDB_CURRENT_MOVIE_ID + MDB_REVIEWS_PATH2;\n\n if (networkInfo != null && networkInfo.isConnected()) {\n\n // Get a reference to the LoaderManager, in order to interact with loaders.\n LoaderManager loaderManager = getLoaderManager();\n // Initialize the loader. Pass in the int ID constant defined above and pass in null for\n // the bundle. Pass in this activity for the LoaderCallbacks parameter (which is valid\n // because this activity implements the LoaderCallbacks interface).\n loaderManager.initLoader(REVIEWS_LOADER_ID, null, ReviewsFragment.this);\n\n } else {\n // Otherwise, display error\n // First, hide loading indicator so error message will be visible\n View loadingIndicator1 = view.findViewById(R.id.loading_indicator2);\n loadingIndicator1.setVisibility(View.GONE);\n // Set empty state text to display \"No internet connection\"\n mEmptyStateTextView2 = view.findViewById(R.id.empty_view2);\n mEmptyStateTextView2.setText(R.string.no_internet);\n }\n\n reviewsRecyclerView = view.findViewById(R.id.list_reviews);\n reviewsRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n mAdapterR = new MovieReviewsAdapter(reviewsList);\n reviewsRecyclerView.setAdapter(mAdapterR);\n reviewsRecyclerView.addItemDecoration(new android.support.v7.widget.DividerItemDecoration(getActivity(), DividerItemDecoration.HORIZONTAL_LIST));\n reviewsRecyclerView.setItemAnimator(new DefaultItemAnimator());\n\n return view;\n }", "public void refreshReviewList() {\n reviewListModel.clear();\n int index = gamesList.getSelectedIndex();\n String gameName = gamesListModel.getElementAt(index).toString();\n String gameID = dbMgr.getGameID(gameName);\n List<List<String>> userReviews = dbMgr.getReviewsByGame(gameID);\n\n // fill list with review for currently selected game\n for (int i = 0; i < userReviews.size(); i++) {\n reviewListModel.addElement(userReviews.get(i).get(0) + \", \" + userReviews.get(i).get(1) + \"/10\"); \n }\n\n reviewList.setModel(reviewListModel);\n }", "public void fetchFavoritedMovies() {\n favoritesSelected = true;\n Cursor cursor =\n getActivity().getContentResolver().query(MovieContract.FavoriteMovieEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n ArrayList<MovieModel> movieModels = new ArrayList<>();\n if (cursor != null) {\n while (cursor.moveToNext()) {\n MovieModel movieModel = new MovieModel(getActivity(), cursor);\n // Get the trailers and reviews\n String movieId = cursor.getString(cursor.getColumnIndex(MovieContract.FavoriteMovieEntry._ID));\n Cursor trailerCursor =\n getActivity().getContentResolver().query(MovieContract.TrailerEntry.CONTENT_URI,\n null,\n MovieContract.TrailerEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n Cursor reviewCursor =\n getActivity().getContentResolver().query(MovieContract.ReviewEntry.CONTENT_URI,\n null,\n MovieContract.ReviewEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n ArrayList<MovieTrailerModel> movieTrailerModels = new ArrayList<>();\n ArrayList<MovieReviewModel> movieReviewModels = new ArrayList<>();\n if (trailerCursor != null) {\n while (trailerCursor.moveToNext()) {\n movieTrailerModels.add(new MovieTrailerModel(getActivity(), trailerCursor));\n }\n trailerCursor.close();\n }\n if (reviewCursor != null) {\n while (reviewCursor.moveToNext()) {\n movieReviewModels.add(new MovieReviewModel(getActivity(), reviewCursor));\n }\n reviewCursor.close();\n }\n movieModel.setReviews(movieReviewModels);\n movieModel.setTrailers(movieTrailerModels);\n movieModels.add(movieModel);\n }\n cursor.close();\n }\n movieGridAdapter.setMovieModels(movieModels);\n }", "public void refreshSearchReviewList() {\n reviewSearchModel.clear();\n int index = gamesSearchList.getSelectedIndex();\n String gameName = gamesSearchListModel.getElementAt(index).toString();\n String gameID = dbMgr.getGameID(gameName);\n List<List<String>> userReviews = dbMgr.getReviewsByGame(gameID);\n\n // fill list with review for currently selected game\n for (int i = 0; i < userReviews.size(); i++) {\n reviewSearchModel.addElement(userReviews.get(i).get(0) + \", \" + userReviews.get(i).get(1) + \"/10\"); \n }\n\n reviewSearch.setModel(reviewSearchModel);\n }", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n // Get data based on position\n RestroomDist restroom = restrooms.get(position);\n\n holder.sr_tvAddress.setText(restroom.getRestroom().getName());\n holder.sr_tvLocDistance.setText(String.format(\"%.2f\", restroom.getDistance()) + \" m\");\n //holder.sr_tvRatings.setText(String.valueOf(restroom.getRestroom().getRating()));\n\n Gson gson = new Gson();\n\n double ave = 0;\n double total = 0;\n\n ArrayList<Review> reviews = restroom.getRestroom().getReviews();\n ArrayList<String> strReviews = new ArrayList<>();\n\n for(Review review : reviews) {\n total += review.getRating();\n }\n\n if (!reviews.isEmpty())\n ave = total / reviews.size();\n\n holder.sr_tvRatings.setText(String.format(\"%.1f\", ave));\n holder.sr_tvRateCount.setText(\"(\" + reviews.size() + \" ratings)\");\n\n double finalAve = ave;\n holder.sr_imvArrow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // navigate to <View Restroom Details activity>\n Intent i = new Intent(v.getContext(), ViewRestRmActivity.class);\n\n // TODO get id of document\n i.putExtra(MapsActivity.ADDRESS_TAG, restroom.getRestroom().getName());\n i.putExtra(MapsActivity.DISTANCE_TAG, String.format(\"%.2f\", restroom.getDistance()));\n i.putExtra(MapsActivity.RATING_TAG, String.valueOf(finalAve));\n i.putExtra(MapsActivity.RATE_COUNT_TAG, String.valueOf(reviews.size()));\n i.putExtra(MapsActivity.CATEG_PAID, restroom.getRestroom().getCateg_paid());\n i.putExtra(MapsActivity.CATEG_DISABILITY, restroom.getRestroom().getCateg_disability());\n i.putExtra(MapsActivity.CATEG_BIDET, restroom.getRestroom().getCateg_bidet());\n i.putExtra(MapsActivity.CATEG_LOCTYPE, restroom.getRestroom().getCateg_loc_type());\n i.putExtra(MapsActivity.CATEG_TOILETRIES, restroom.getRestroom().getCateg_toiletries());\n i.putExtra(MapsActivity.LATITUDE_TAG, restroom.getRestroom().getLatitude());\n i.putExtra(MapsActivity.LONGITUDE_TAG, restroom.getRestroom().getLongitude());\n\n strReviews.clear();\n\n for(Review review : reviews) {\n strReviews.add(gson.toJson(review));\n }\n\n i.putExtra(MapsActivity.REVIEWS_ARRAY, strReviews);\n\n// i.putExtra(MapsActivity.RATE_COUNT_TAG, );\n // putExtra() for filters\n\n v.getContext().startActivity(i);\n }\n });\n }", "public GiftCardProductQuery reviews(ProductReviewsQueryDefinition queryDef) {\n return reviews(args -> {}, queryDef);\n }", "public ArrayList<ReviewDTO> getAll(){\n\t\tArrayList<ReviewDTO> all = new ArrayList<>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tResourceSet result = dbManagement.executeXPath(REVIEW_COLLECTION_ID, \"data(//review)\", TARGET_NAMESPACE_PUBLICATION);\r\n\t\t\tif (result == null) {\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tResourceIterator i = result.getIterator();\r\n\t\t\tResource res = null;\r\n\t\t\tReviewDTO dto = new ReviewDTO();\r\n\t\t\twhile (i.hasMoreResources()) {\r\n\t\t\t\tSystem.out.println(\"******\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tres = i.nextResource();\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(res.getContent().toString());\r\n\t\t\t\t\t// TODO svaki xml pretvoriti u dto i dodati u listu\r\n\t\t\t\t} finally {\r\n\t\t\t\t\t// don't forget to cleanup resources\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t((EXistResource) res).freeResources();\r\n\t\t\t\t\t} catch (XMLDBException 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\r\n\t\t\t\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"error\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn all;\r\n\t}", "private void getReview() {\r\n String newReviewText = reviewText.getText().toString();\r\n float stars = ratingStars.getRating();\r\n if (newReviewText != null) {\r\n String filename = \"review_yo.csv\";\r\n Write.writeReview(newReviewText, stars, filename);\r\n } else {\r\n newReviewText = \"No reviews available\";\r\n String filename = \"review_yo.csv\";\r\n Write.writeReview(newReviewText, stars, filename);\r\n\r\n }\r\n }", "@GetMapping(\"/films/title/{title}/{reviewId}/comments\")\n public @ResponseBody\n List<Comment> getAllCommentsFromReview(@PathVariable String reviewId){\n Review review = reviewService.getReviewByReviewId(Integer.parseInt(reviewId));\n return commentService.getAllCommentsByReview(review);\n }", "@GET\n\t@Path(\"{id}/reviews\")\n\t@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n\tpublic Response getApplicationReviews(\n\t\t\t@HeaderParam(\"ORSKey\") String orsKey,\n\t\t\t@HeaderParam(\"ShortKey\") String shortKey,\n\t\t\t@PathParam(\"id\") String id) {\n\t\tif (!Security.instance.isInternalUser(orsKey, shortKey)) {\n\t\t\tthrow new ForbiddenException(\"User does not have permission\");\n\t\t}\n\t\tList<Review> list = ReviewsDao.instance.getByApplication(id);\n\t\tif (list == null) {\n\t\t\tthrow new NotFoundException(\"Review list not found\");\n\t\t} else {\n\t\t\tGenericEntity<List<Review>> returnList = new GenericEntity<List<Review>>(list) {};\n\t\t\treturn Response.ok(returnList).build();\n\t\t}\n\t}", "@Override\r\n\tpublic List<ReviewVO> reviewListAll() {\n\t\treturn sqlSession.selectList(namespace + \".reviewListAll\");\r\n\t}", "ImmutableList<SchemaOrgType> getReviewsList();", "private List<ApartmentReviewBean> getReviewComments(String query, int id) {\n\t\tResultSet rs=null;\n\t\tList<ApartmentReviewBean> apartmentReviews = new ArrayList<ApartmentReviewBean>();\n\t\ttry {\n\t\t\t\n\t\t\t//pstmt = con.prepareStatement(query);\n\t\t\tPreparedStatement pstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setInt(1, id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tApartmentReviewBean review = new ApartmentReviewBean();\n\t\t\t\treview.setComments(rs.getString(\"comments\"));\n\t\t\t\treview.setRating(rs.getInt(\"rating\"));\n\t\t\t\tapartmentReviews.add(review);\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn apartmentReviews;\n\t\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t\treviewsRef.orderByValue().addValueEventListener(new ValueEventListener() {\n\t\t\t@Override\n\t\t\tpublic void onDataChange(DataSnapshot dataSnapshot) {\n\t\t\t\tint childs = (int) dataSnapshot.getChildrenCount();\n\t\t\t\tReviewsList.clear();\n\t\t\t\tfor (int i = 0; i < childs; i++) {\n\t\t\t\t\tReviews rev = dataSnapshot.child(String.valueOf(i)).getValue(Reviews.class); //get each child starting at \"0\" to \"n-1\"\n\t\t\t\t\tReviewsList.add(rev); //add to the list\n\t\t\t\t\tmAdapter.notifyDataSetChanged();\n\t\t\t\t\tif(ReviewsList.size() > 0){\n\t\t\t\t\t\tmNoReview.setVisibility(View.INVISIBLE);\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 onCancelled(DatabaseError databaseError) {\n\n\t\t\t}\n\t\t});\n\n\t}", "public GiftCardProductQuery reviews(ReviewsArgumentsDefinition argsDef, ProductReviewsQueryDefinition queryDef) {\n startField(\"reviews\");\n\n ReviewsArguments args = new ReviewsArguments(_queryBuilder);\n argsDef.define(args);\n ReviewsArguments.end(args);\n\n _queryBuilder.append('{');\n queryDef.define(new ProductReviewsQuery(_queryBuilder));\n _queryBuilder.append('}');\n\n return this;\n }", "public static ArrayList<Review> getReviewInfo(String placeID) {\r\n\t\tArrayList<Review> reviewList = new ArrayList<Review>();\r\n\t\tString output = \"\";\r\n\t\ttry {\r\n\t\t\tURL url = new URL(\"https://maps.googleapis.com/maps/api/place/details/json?place_id=\"+placeID+\"&fields=review&key=AIzaSyAcM2vc8-2JY9I5P7jgvt61TCYa1vo0b98\");\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection)url.openConnection();\r\n\t\t\tconn.setRequestMethod(\"GET\");\r\n\t\t\tconn.connect();\r\n\t\t\tint responsecode = conn.getResponseCode();\r\n\t\t\tif(responsecode != 200) {\r\n\t\t\t\tthrow new RuntimeException(\"HttpResponseCode: \"+responsecode);\r\n\t\t\t} else {\r\n\t\t\t\tJSONParser parse = new JSONParser();\r\n\t\t\t\tScanner scanner = new Scanner(url.openStream());\r\n\t\t\t\twhile (scanner.hasNext()) {\r\n\t\t\t\t\toutput+=scanner.nextLine();\r\n\t\t\t\t}\r\n\t\t\t\tJSONObject jsonobject = (JSONObject)parse.parse(output);\r\n\t\t\t\tJSONObject jsonobject2 = (JSONObject) jsonobject.get(\"result\");\r\n\t\t\t\tJSONArray reviewArray = (JSONArray)jsonobject2.get(\"reviews\");\r\n\t\t\t\tfor (int count=0; count<reviewArray.size(); count++) {\r\n\t\t\t\t\tJSONObject jsonObject3 = (JSONObject) reviewArray.get(count);\r\n\t\t\t\t\tReview newReview = new Review();\r\n\t\t\t\t\t newReview.setReviewer(jsonObject3.get(\"author_name\").toString());\r\n\t\t\t\t\t newReview.setReview(jsonObject3.get(\"text\").toString());\r\n\t\t\t\t\t newReview.setRating(jsonObject3.get(\"rating\").toString()+\".0\");\r\n\t\t\t\t\t reviewList.add(newReview);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Reviews retrieved.\");\r\n\t\t\t\tscanner.close();\r\n\t\t\t}\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn reviewList;\r\n\t}", "public void setReview_id(String review_id) {\n this.review_id = review_id;\n }", "public void setReview(double review) {\r\n this.review = review;\r\n }", "public List<Review> getAllReview() \n\t{\n\t\tList<Review> reviews = new ArrayList<Review>();\n\t\treviewRepository.findAll().forEach(review -> reviews.add(review));\n\t\treturn reviews;\n\t}", "private void fetchMovieDetails() {\n Stream.of(movieListings).forEach(movieListing -> {\n Picasso.with(MoviesApplication.getApp()).load(movieListing.getPosterUrl()).fetch();\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieDetails(movieListing.getId()).enqueue(movieDetailCallback);\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieVideos(movieListing.getId()).enqueue(movieVideoCallback);\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieReviews(movieListing.getId()).enqueue(movieReviewCallback);\n });\n }", "private void getReviewListData() {\n final ProgressDialog progressDialog = new ProgressDialog(getActivity());\n progressDialog.setCancelable(false); // set cancelable to false\n progressDialog.setMessage(\"Please Wait\"); // set message\n progressDialog.show(); // show progress dialog\n\n\n (RetrofitClient.getInstance().getResponse().getReviewsByJob(JobName)).enqueue(new Callback<List<ReviewDTO>>() {\n @Override\n public void onResponse(Call<List<ReviewDTO>> call, Response<List<ReviewDTO>> response) {\n //Log.d(\"responseGET\", response.body().get(0).getName());\n progressDialog.dismiss(); //dismiss progress dialog\n reviewListResponseData = response.body();\n setDataInRecyclerView();\n }\n\n @Override\n public void onFailure(Call<List<ReviewDTO>> call, Throwable t) {\n // if error occurs in network transaction then we can get the error in this method.\n Toast.makeText(getActivity(), t.toString(), Toast.LENGTH_LONG).show();\n progressDialog.dismiss(); //dismiss progress dialog\n }\n });\n }", "@Override\n public void onLoadFinished(Loader<ArrayList<SingleMovieReview>> loader, ArrayList<SingleMovieReview> reviews) {\n Log.i(LOG_TAG, \"onLoadFinished ReviewsFragment\");\n\n View loadingIndicator = view.findViewById(R.id.loading_indicator2);\n loadingIndicator.setVisibility(View.GONE);\n\n reviewsRecyclerView.setVisibility(View.VISIBLE);\n mAdapterR = new MovieReviewsAdapter(reviewsList);\n\n\n // If there is a valid list of {@link Movies}s, then add them to the adapter's\n // data set. This will trigger the ListView to update.\n if (reviews != null && !reviews.isEmpty()) {\n mAdapterR = new MovieReviewsAdapter(reviews);\n reviewsRecyclerView.setAdapter(mAdapterR);\n }\n }", "private void loadData() {\n if (mItem != null) {\n Picasso.with(getActivity()).load(mItem.getPictureFile()).\n placeholder(R.drawable.loading)\n .error(R.drawable.error)\n .fit() //\n .into(((ImageView) getView().findViewById(R.id.detailImageView)));\n ((EditText) getView().findViewById(R.id.visitstextView))\n .setText(\"\" + mItem.getVisits());\n\n ((TextView) getView().findViewById(R.id.detailTextView))\n .setText(\"\" + mItem.getTitle());\n ((RatingBar) getView().findViewById(R.id.detailsratingBar)).setRating((float) mItem.getRating());\n\n ReviewModelAdapter mReviewAdapter = new ReviewModelAdapter(getActivity(), R.id.txt_line1);\n try {\n mReviewAdapter.addAll(mItem.getReviews(getActivity()).all().toList());\n } catch (Exception e) {\n\n }\n ((ListView) getView().findViewById(R.id.detailsreviewlistview)).setAdapter(mReviewAdapter);\n\n\n }\n }", "Builder addReviews(Review value);", "public ReviewRepository() {\n Review vrGameOne = new Review(1L, \"BeatSaber\", \"/images/BeatSaber-photo1.jpg\",\n \"/images/BeatSaber-photo2.jpg\", \"Fitness/Rhythm\",\n \"This game is so much fun! It also gives you a great workout if you play on Expert Plus mode.\",\n \"May 1, 2018\", \"Beat Saber is a virtual reality rhythm game where the player slices \" +\n \"blocks representing musical beats with a pair of sabers.\");\n Review vrGameTwo = new Review(2L, \"The Room\", \"/images/the-room-photo1.jpg\",\n \"/images/the-room-photo2.jpg\", \"Puzzle/Adventure\", \"This game is \" +\n \"challenging but fun. I like how you are able to get hints if you get stuck.\", \"March 26, 2020\",\n \"The Room is game where the player has to solve puzzles to advance. Each level \" +\n \"has a different theme.\");\n Review vrGameThree = new Review(3L, \"Synth Riders\", \"/images/synth-riders-photo1.jpg\",\n \"/images/synth-riders-photo2.jpg\", \"Dance/Rhythm\", \"This game is so much fun. \" +\n \"It has great music and I love the neon environment.\", \"June 21, 2018\", \"Synth Riders is \" +\n \"a lot like Beat Saber, but instead of slicing blocks with sabers, the player hits multicolored orbs \" +\n \"representing musical beats.\");\n Review vrGameFour = new Review(4L, \"Bigscreen\", \"/images/bigscreen-photo1.jpg\",\n \"/images/bigscreen-photo2.jpg\", \"Entertainment\", \"I love this VR game. It \" +\n \"feels like you are actually in the movie theater! An added bonus is that you can mute other \" +\n \"people in the theater if they are being too loud! I love it!\", \"May 21, 2019\",\n \"BigScreen is a virtual reality movie theater. You can watch movies (even 3D ones) \" +\n \"with random people, or you can join a private theater with just you and your friends. In \" +\n \"addition to movies, there are also rooms where you can watch TV shows.\");\n\n reviewList.put(vrGameOne.getId(), vrGameOne);\n reviewList.put(vrGameTwo.getId(), vrGameTwo);\n reviewList.put(vrGameThree.getId(), vrGameThree);\n reviewList.put(vrGameFour.getId(), vrGameFour);\n }", "public void listAllReview() throws ServletException, IOException {\r\n\t\tlistAllReview(null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_movie_reviews, container, false);\n ButterKnife.bind(this,view);\n if(getArguments().containsKey(Movie.TAG)) {\n mMovie = getArguments().getParcelable(Movie.TAG);\n }else{\n throw new IllegalArgumentException(\"No movie passed to fragment\");\n }\n GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(),mNumberOfColumns);\n ScrollListener scrollListener = new ScrollListener(gridLayoutManager) {\n @Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadReviews(page + 1);\n }\n\n };\n\n mReviewList.setLayoutManager(gridLayoutManager);\n mReviewList.setHasFixedSize(true);\n\n mReviewAdapter = new ReviewAdapter();\n mReviewList.setAdapter(mReviewAdapter);\n mReviewList.addOnScrollListener(scrollListener);\n\n onRestoreState(savedInstanceState);\n return view;\n }", "List<Review> getReviewByProductId(Integer productId);", "private void show_review(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException, SecurityException {\n\t\tString restaurant = request.getParameter(\"key\");\n\t\tString restaurant_Name = request.getParameter(\"key_Name\");\n\t\tString restaurant_loc = request.getParameter(\"key_loc\");\n\t\tServletContext servletContext = getServletContext();\n\t\tWebApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\t\trrDaoImplementation rrDaoImplementation = (rrDaoImplementation) appContext.getBean(\"rrDaoImplementation\");\n\n\t\tList<?> rate = null;\n\t\trate = (List<?>) rrDaoImplementation.gettAllRatenReview();\n\t\tSystem.out.println(\"Review Sati\" + restaurant);\n\t\trequest.setAttribute(\"rrid\", restaurant);\n\t\trequest.setAttribute(\"rrname\", restaurant_Name);\n\t\trequest.setAttribute(\"rrloc\", restaurant_loc);\n\t\trequest.setAttribute(\"rate_review\", rate);\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/view/reviewpage.jsp\").forward(request, response);\n\t}", "@GetMapping(\"/customer/reviews/{count}\")\n\tpublic Set<Customer> getCustomerByReviewsCount(@PathVariable(\"count\") Integer count){\n\t\tSet<Customer> set = customerRepository.getCustomerByReviewsCount(count);\n\t\treturn set;\n\t}", "public void setReview(List<ReviewType> review) {\n\t this.review = review;\n\t}", "@Override\n public HotelReviewResponseDTO getHotelReviews(String hotelId, String gender, String residentialCity) {\n Optional<Hotel> optionalHotel = hotelRepository.findByHotelId(hotelId);\n Hotel hotel = optionalHotel.orElseThrow(() -> {\n logger.error(\"Hotel information not found | hotelId:{}\", hotelId);\n return new BookingServiceException(\"Hotel information not found | hotelId:\" + hotelId);\n });\n if (hotel.isDeleted()) {\n logger.info(\"Hotel is inactive | hotelId:{}\", hotelId);\n throw new BookingServiceException(\"Hotel is inactive | hotelId:\" + hotelId);\n }\n boolean filterByGender = !ObjectUtils.isEmpty(gender);\n boolean filterByCity = !ObjectUtils.isEmpty(residentialCity);\n List<Review> reviews = reviewRepository.findByHotel(hotel);\n logger.info(\"Fetched hotel reviews information successfully | hotelId:{}\", hotelId);\n List<ReviewResponseDTO> reviewResponses = reviews.stream()\n .filter(review -> {\n boolean isDeleted = !review.isDeleted();\n boolean genderFilter = !filterByGender || (review.getReviewedBy() != null && review.getReviewedBy().getGender().equalsIgnoreCase(gender));\n boolean cityFilter = !filterByCity || (review.getReviewedBy() != null && review.getReviewedBy().getResidentialCity().equalsIgnoreCase(residentialCity));\n return isDeleted && genderFilter && cityFilter;\n })\n .map(review -> {\n ReviewResponseDTO reviewResponse = new ReviewResponseDTO();\n reviewResponse.setReviewId(review.getReviewId());\n reviewResponse.setComment(review.getComment());\n reviewResponse.setRatingValue(review.getRatingValue());\n if (review.getReviewedBy() != null) {\n reviewResponse.setReviewedBy(review.getReviewedBy().getFullName());\n }\n reviewResponse.setReviewedDate(review.getReviewedDate());\n return reviewResponse;\n })\n .collect(Collectors.toList());\n long ratingCount = reviews.stream().filter(review -> !review.isDeleted()).count();\n double averageRating = reviews.stream()\n .filter(review -> !review.isDeleted())\n .collect(Collectors.summarizingDouble(Review::getRatingValue))\n .getAverage();\n\n HotelReviewResponseDTO hotelReviewResponse = new HotelReviewResponseDTO();\n hotelReviewResponse.setAverageRating(averageRating);\n hotelReviewResponse.setRatingCount(ratingCount);\n hotelReviewResponse.setReviews(reviewResponses);\n return hotelReviewResponse;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_recipe3, container, false);\n ArrayList<Review_data> review_list = new ArrayList<>();\n review_list.clear();\n\n review_view = (ListView)rootView.findViewById(R.id.recipe_review_list);\n\n HashMap re_map= ((Recipe_Info)Recipe_Info.context_main).review_map_key;\n HashMap re_map_data;\n\n for(Object key: re_map.keySet()){\n re_map_data = (HashMap)re_map.get(key);\n\n Review_data review_data = new Review_data();\n review_data.setdata(re_map_data.get(\"name\").toString(),(String)re_map_data.get(\"text\").toString(),\n Float.parseFloat(String.valueOf(re_map_data.get(\"star\"))),re_map_data.get(\"date\").toString());\n\n review_list.add(review_data);\n\n }\n\n listAdapter = new ListAdapter(getActivity(),R.layout.review_layout,review_list);\n\n review_view.setAdapter(listAdapter);\n\n return rootView;\n }", "public int getReviewId()\r\n {\r\n return this.reviewId;\r\n }", "public Review() {\n this.review_id = \"\";\n this.user_id = \"\";\n this.business_id = \"\";\n this.stars = 0;\n this.useful = 0;\n this.funny = 0;\n this.cool = 0;\n this.date = LocalDateTime.now();\n this.text = \"\";\n }", "@Override\n public void showReview() {\n }", "@Override\r\n\tpublic ReviewDTO review_detail(int r_idx) throws Exception {\n\t\treturn null;\r\n\t}", "public static Collection<BookReview> getALL() {\n }", "@Override\r\n\tpublic ReviewVO selectReview(int r_no) {\n\t\treturn ss.selectOne(\"selectReview\", r_no);\r\n\t}", "public void setReview(final Review review);", "public Review getReviewById(String id) \n\t{\n\t\treturn reviewRepository.findById(id).get();\n\t}", "public Review loadReviewForUser(){\n\n return null;\n }", "private void setDataInRecyclerView() {\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());\n recyclerView.setLayoutManager(linearLayoutManager);\n // call the constructor of UsersAdapter to send the reference and data to Adapter\n ReviewAdapter reviewAdapter = new ReviewAdapter(reviewListResponseData, this);\n recyclerView.setAdapter(reviewAdapter); // set the Adapter to RecyclerView\n }", "public static List<Review> extractReviewData(String stringUrl, int movieId) {\n String jsonResponse = fetchResponse(stringUrl);\n if (jsonResponse == null) {\n return null;\n }\n List<Review> reviews = new ArrayList<>();\n try {\n JSONObject baseJsonResponse = new JSONObject(jsonResponse);\n JSONArray resultsJSONArray = baseJsonResponse.getJSONArray(RESULTS_KEY);\n for (int i = 0; i < resultsJSONArray.length(); i++) {\n JSONObject currentMovie = resultsJSONArray.getJSONObject(i);\n String author = currentMovie.optString(REVIEW_AUTHOR_KEY);\n String content = currentMovie.optString(REVIEW_CONTENT_KEY);\n String reviewId = currentMovie.optString(REVIEW_ID_KEY);\n String reviewUrl = currentMovie.optString(REVIEW_URL_KEY);\n Review review = new Review(reviewId, movieId, author, content, reviewUrl);\n reviews.add(review);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return reviews;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_review, container, false);\n ListView reviewlistview = (ListView) rootView.findViewById(R.id.reviewsList);\n\n //Initializes Array and Adapter containing reviews\n ArrayList<String> reviewList = new ArrayList<>(0);\n reviewAdapter = new ArrayAdapter<>(getActivity(), R.layout.reviewtext, reviewList);\n\n //Sets Adapter to the review view\n reviewlistview.setAdapter(reviewAdapter);\n\n //Fetches Reviews\n FetchReviews fetchReviews = new FetchReviews();\n fetchReviews.execute();\n return rootView;\n }", "public GetMovieReviewsResponse getMovieReviews(int movieId, String language, Integer page) {\n // /movie/{movie_id}/reviews\n String path = String.format(\"/movie/%s/reviews\", movieId);\n Map<String, Object> requestParams = new HashMap<>();\n requestParams.put(\"language\", language);\n requestParams.put(\"page\", page);\n return restClient.get(path, requestParams, new TypeReference<>() {\n\n\n }\n );\n }", "public String getReview_id() {\n return this.review_id;\n }", "@When(\"^Check for review$\")\n\tpublic void check_for_review() throws Throwable {\n\t\twait.WaitForElement(profilepage.getreviewlink(), 70);\n\t\tprofilepage.clickonreviewtab();\n\t}", "private List<Review> getUserReviews(String user_ID) {\n\t\tList<Review> Reviews = new ArrayList<Review>();\n\t\tfor (Review review : reviews) {\n\t\t\tif (user_ID.equals(review.getUserID())) {\n\t\t\t\tReviews.add(review);\n\t\t\t}\n\t\t}\n\n\t\treturn Reviews;\n\t}", "public void setReviewList(List<Review> reviewList) {\n this.reviewList = reviewList;\n notifyDataSetChanged();\n }", "public Reviews (ArrayList<Review> list)\n\t{\n\t\tthis.list = list;\n\t}", "private void add_ratereview(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tint hotel_userid;\n\t\tString name_user = (String) request.getSession().getAttribute(\"username\");\n\t\tServletContext servletContext = getServletContext();\n\t\tWebApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\t\tuserDaoImplementation userDaoImplementation = (userDaoImplementation) appContext\n\t\t\t\t.getBean(\"userDaoImplementation\");\n\t\tUser user1 = null;\n\t\tuser1 = userDaoImplementation.getuserbyid(name_user);\n\t\thotel_userid = user1.getUserId();\n\t\tString hotel_id = request.getParameter(\"key\");\n\t\tString hotel_name = request.getParameter(\"key_Name\");\n\t\tString hotel_loc = request.getParameter(\"key_loc\");\n\t\tString rrate = request.getParameter(\"review_rate\");\n\t\tString rreview = request.getParameter(\"rate_review\");\n\t\tRateReview rateReview = new RateReview();\n\t\trateReview.setRest_id(Integer.parseInt(hotel_id));\n\t\tSystem.out.println(\"sddede\"+hotel_id);\n\t\trateReview.setUser_id(hotel_userid);\n\t\trateReview.setRate(Integer.parseInt(rrate));\n\t\trateReview.setReview(rreview);\n\t\trestDaoImplementation restDaoImplementation = (restDaoImplementation) appContext\n\t\t\t\t.getBean(\"restDaoImplementation\");\n\t\tRest rest1 = null;\n\t\trest1 = restDaoImplementation.getrestbyid(Integer.parseInt(hotel_id));\n\t\tint count = rest1.getCount();\n\t\tfloat ratefrmrest = rest1.getRate_avg();\n\t\tfloat totalrating = (count * ratefrmrest) + (Integer.parseInt(rrate));\n\t\tint updated_count = count + 1;\n\t\tfloat final_rate = totalrating / updated_count;\n\t\tRest rest = new Rest();\n\t\trest.setCount(updated_count);\n\t\trest.setRate_avg(final_rate);\n\t\trest.setLocation(hotel_loc);\n\t\trest.setRestId(Integer.parseInt(hotel_id));\n\t\trest.setRestName(hotel_name);\n\t\trestDaoImplementation.updateRest_info(rest);\n\t\trrDaoImplementation rrDaoImplementation = (rrDaoImplementation) appContext.getBean(\"rrDaoImplementation\");\n\t\trrDaoImplementation.insert(rateReview);\n\t\tresponse.sendRedirect(\"restaurant\");\n\n\t}", "public List<Object> nextDocument() throws IOException {\n\t\t\n\t\tList<Object> reviewList = new ArrayList<>();\n\t\tString line = null;\n\t\tString url = null; \n\t String restID = null;\n\t\tString restName = null;\n\t\tString restDesc = null;\n\t\tString revID = null;\n\t\tString revContent = null;\n\t\tif((line = br.readLine()) != null) {\n\t\t\twhile(!line.equals(\"<restaurant>\")) {\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\t\n\t\t\tif(line.equals(\"<restaurant>\")) { \n\t\t\t\t// Get url\n\t\t\t\tline = br.readLine(); \n\t\t\t\turl = line.substring(5, line.length()-6);\n\t\t\t\t\n\t\t\t\t// Get restaurant's ID \n\t\t\t\tline = br.readLine();\n\t\t\t\trestID = line.substring(5, line.length()-6);\n\t\t\t\t\n\t\t\t\t// Get restaurant's name\n\t\t\t\tline = br.readLine();\n\t\t\t\trestName = line.substring(7, line.length()-8);\n\t\t\t\t\n\t\t\t\t// Get restaurant's description\n\t\t\t\tline = br.readLine();\n\t\t\t\trestDesc = line.substring(13, line.length()-14); \n\t\t\t}\n \n\t\t\twhile (!line.equals(\"<reviews>\")) { \n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\t\n\t\t // Here, we reach the line containing tag \"<reviews>\"\n\t\t\tline = br.readLine();\n\t\t\t\n\t\t\tint i = 1; // Keep track of each review\n\t\t\twhile(!line.equals(\"</reviews>\")) {\t\n\t\t\t\t// Intiate a review object in each interation \n\t\t\t\tReview review = new Review();\n\t\t\t\t\n\t\t\t\t// Set its restaurant's url, name and desc\n\t\t\t\treview.setRestUrl(url);\n\t\t\t\treview.setRestName(restName); \n\t\t\t\treview.setRestDesc(restDesc);\n\t\t\t\t\n\t\t\t\t// Get review's ID\n\t\t\t\trevID = restID + \"-\" + String.valueOf(i); \n\t\t\t\treview.setId(revID);\n\t\t\t\t\n\t\t\t\trevContent = line.replaceAll(HTML_TAG, \" \").replaceAll(\"( )+\", \" \").trim();\n\t\t\t\treview.setOriginalContent(revContent);\n\t\t\t\t\n\t\t\t\treviewList.add(review);\n\t\t\t\t\n\t\t\t\ti++;\n\t\t\t\tline = br.readLine();\n\t\t\t}\n\t\t\tbr.readLine();\n\t\t\treturn reviewList;\n\t\t}\n\t\t\n\t\tif(br != null) {\n\t\t\tbr.close();\n\t\t}\n\t\t\t\n\t\treturn null;\n\t}", "public ReviewRepository(Review ...reviewsToAdd) {\n for(Review review: reviewsToAdd) {\n reviewList.put(review.getId(), review);\n }\n }", "protected void fetch() {\n HttpClient client = new HttpClient();\n client.getHostConfiguration().setHost(HOST, PORT, SCHEME);\n\n List<String> prefectures = getCodes(client, PATH_PREF, \"pref\");\n List<String> categories = getCodes(client, PATH_CTG, \"category_s\");\n\n // This is a workaround for the gnavi API.\n // Gnavi API only allows max 1000 records for output.\n // Therefore, we divide records into smaller pieces\n // by prefectures and categories.\n for (String prefecture: prefectures) {\n for (String category: categories) {\n logger.debug(\"Prefecture: {}\", prefecture);\n logger.debug(\"Category: {}\", category);\n getVenues(client, prefecture, category, 1);\n }\n }\n }", "private void populateViews(List<ParseUser> friendUsers){\n retrieveCheeseCountsLocally();\n populateUserView();\n populateFriendsListView(friendUsers);\n populateHistoryListView();\n\t}", "public GiftCardProductQuery reviewCount() {\n startField(\"review_count\");\n\n return this;\n }", "public void setReview(java.lang.String[] review) {\n this.review = review;\n }", "QueryRequest<Review> query();", "public ViewHolder(View view) {\n reviewAuthorTextView = (TextView) view.findViewById(R.id.list_review_author);\n reviewContentsTextView = (TextView) view.findViewById(R.id.list_review_contents);\n //reviewURLTextView = (TextView) view.findViewById(R.id.list_review_url);\n }", "@POST(\"/attractions/{attractionId}/reviews\")\n Call<Review> postReview(\n @Path(\"attractionId\") int attractionId,\n @Header(\"Authorization\") String bearer,\n @Body Review review\n );", "public String getReview(){\n\t\treturn this.review;\n\t}", "public AggregationReview getReview() {\n return review;\n }", "@Override\n public Loader<ArrayList<Reviews>> onCreateLoader(int id, final Bundle args) {\n\n return new AsyncTaskLoader<ArrayList<Reviews>>(this) {\n\n\n @Override\n protected void onStartLoading() {\n super.onStartLoading();\n\n if (mReviews != null) {\n deliverResult(mReviews);\n } else {\n forceLoad();\n }\n }\n\n @Override\n public ArrayList<Reviews> loadInBackground() {\n String idOfMovie = args.getString(ID_OF_MOVIE);\n\n if (idOfMovie == null) {\n return null;\n }\n URL urlForFetchMovieDetails = NetworkUtils.buildURL(idOfMovie + \"/reviews\");\n\n if (urlForFetchMovieDetails != null) {\n try {\n String responseFromAPI = null;\n try {\n responseFromAPI = NetworkUtils.getResponseFromHttpUrl(urlForFetchMovieDetails);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return ReviewsParser.getReviewsFromJson(responseFromAPI);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return null;\n }\n\n /**\n * Sends the result of the load to the registered listener.\n *\n * @param reviews The result of the load\n */\n public void deliverResult(ArrayList<Reviews> reviews) {\n mReviews = reviews;\n super.deliverResult(reviews);\n }\n };\n }", "private void populateViewCollections() {\n\n\t}", "public void setReviewRatingStatistics(final ReviewRatingStatistics reviewRatingStatistics);", "@GetMapping(\"/movie/{name}\")\r\n public List<ReviewDetails> getReviewByMovieName(@PathVariable(\"name\") String name){\r\n return reviewRepository.getReviewByMovieName(name);\r\n }", "public ReviewRecord load(ReviewRecord review) {\n\t\t return super.doSelect(review);\n\t}" ]
[ "0.71582633", "0.70410323", "0.6929347", "0.67431456", "0.6685898", "0.66827035", "0.66381466", "0.66024035", "0.6588489", "0.6558766", "0.65412015", "0.64915645", "0.6358005", "0.635071", "0.63484645", "0.6331309", "0.6316084", "0.63034976", "0.6280411", "0.6197593", "0.6165941", "0.61508", "0.6141076", "0.6056434", "0.60124403", "0.60108143", "0.5981885", "0.5961613", "0.5924027", "0.5890548", "0.58719677", "0.58107746", "0.5783055", "0.577882", "0.57651687", "0.5739786", "0.5732095", "0.5730415", "0.5699548", "0.56725013", "0.56518817", "0.56509095", "0.5627188", "0.56178963", "0.56015116", "0.5594781", "0.55869436", "0.5571919", "0.55599815", "0.5553427", "0.55490714", "0.5542195", "0.55374247", "0.5536145", "0.55357456", "0.5528525", "0.55050623", "0.55031174", "0.54876184", "0.54855204", "0.54823244", "0.5430891", "0.5425365", "0.5411981", "0.539684", "0.5386711", "0.5365599", "0.53485346", "0.5339536", "0.5335039", "0.53338856", "0.53117645", "0.5294667", "0.5284522", "0.52802205", "0.5278428", "0.5278368", "0.5274325", "0.5257062", "0.5253912", "0.5249183", "0.5244946", "0.52377295", "0.52242655", "0.5222602", "0.52195376", "0.52055126", "0.5203482", "0.517683", "0.5169285", "0.51670754", "0.5152191", "0.5149786", "0.51438904", "0.51368064", "0.51358443", "0.5134561", "0.51305246", "0.5108471", "0.5103042" ]
0.7202112
0
adds the movie to favorite or remove it if it already exists adding favorite means adds it to sql database
public void onClickFavoriteButton() { String snackBarText; if (isFavorite) { diskIO.execute(new Runnable() { @Override public void run() { mDatabase.movieDao().delete(movie); } }); isFavorite = false; mBinding.favoriteButton.setImageResource(R.drawable.ic_star_border_white_24px); snackBarText = getString(R.string.remove_favorite); } else { diskIO.execute(new Runnable() { @Override public void run() { mDatabase.movieDao().insert(movie); } }); isFavorite = true; mBinding.favoriteButton.setImageResource(R.drawable.ic_star_white_24px); snackBarText = getString(R.string.add_favorite); } Snackbar.make(mBinding.coordinatorLayout, snackBarText, Snackbar.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addMovieToFavorites(Movie movie) {\n movie.setFavorite(true);\n isFavorite = true;\n //change the star from gray to yellow\n star.setImageResource(R.drawable.ic_grade_yellow_36px);\n //save the poster in local storage\n String imageName = saveMoviePoster();\n\n //load the necessary movie fields into the ContentValues object\n ContentValues values = new ContentValues();\n values.put(FavoriteMoviesContract.MovieEntry.MOVIEDB_ID, movie.getId());\n values.put(FavoriteMoviesContract.MovieEntry.AVERAGE_VOTE, movie.getVoteAverage());\n values.put(FavoriteMoviesContract.MovieEntry.ORIGINAL_TITLE, movie.getOriginalTitle());\n values.put(FavoriteMoviesContract.MovieEntry.RELEASE_YEAR, movie.getReleaseYear());\n values.put(FavoriteMoviesContract.MovieEntry.RUNTIME, movie.getRuntime());\n values.put(FavoriteMoviesContract.MovieEntry.SYNOPSIS, movie.getSynopsis());\n values.put(FavoriteMoviesContract.MovieEntry.POSTER_IMAGE_NAME, imageName);\n\n //insert the movie into the Favorites db\n Uri uri = getActivity().getContentResolver().\n insert(FavoriteMoviesContract.MovieEntry.CONTENT_URI, values);\n\n if (uri != null) {\n String successMessage = \"You have successfully added \" + movie.getOriginalTitle() +\n \" to the Favorites collection\";\n Toast.makeText(getActivity(), successMessage, Toast.LENGTH_LONG).show();\n }\n }", "public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void addToFavorites() {\n\n // Create new content values object\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ID, sMovie.getMovieId());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_TITLE, sMovie.getMovieTitle());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ORIGINAL_TITLE, sMovie.getMovieOriginalTitle());\n contentValues.put(FavMovieEntry.COLUMN_POSTER_PATH, sMovie.getPoster());\n contentValues.put(FavMovieEntry.COLUMN_BACKDROP_PATH, sMovie.getMovieBackdrop());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RELEASE_DATE, sMovie.getReleaseDate());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RATING, sMovie.getVoteAverage());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_SYNOPSIS, sMovie.getPlotSynopsis());\n\n try {\n mCurrentMovieUri = getContentResolver().insert(FavMovieEntry.CONTENT_URI,\n contentValues);\n } catch (IllegalArgumentException e) {\n mCurrentMovieUri = null;\n Log.v(LOG_TAG, e.toString());\n }\n\n if (mCurrentMovieUri != null) {\n isAddedToFavorites();\n }\n\n }", "public void saveMovieToFavorites() {\n Cursor moviecursor = this.getContentResolver().query(MovieContract.MovieEntry.CONTENT_URI, null, MovieContract.MovieEntry.COLUMN_NAME_MOVIE_ID + \" = \" + mMovie.getID(), null, null, null);\n if(moviecursor.getCount() == 0) { // first time this movie has been favorited insert record\n Uri movieUri = this.getContentResolver().insert(MovieContract.MovieEntry.CONTENT_URI, Constants.createMovieRecord(mMovie));\n long movieid = ContentUris.parseId(movieUri);\n int insertedTrailerCount = this.getContentResolver().bulkInsert(MovieContract.TrailerEntry.CONTENT_URI, Constants.createBulkTrailerValues(Constants.mTrailers, movieid));\n int insertedReviewCount = this.getContentResolver().bulkInsert(MovieContract.ReviewEntry.CONTENT_URI, Constants.createBulkReviewValues(Constants.mReviews, movieid));\n\n if(insertedTrailerCount < 1)\n Log.e(TAG,\"Trailer failed to insert\");\n\n if(insertedReviewCount < 1)\n Log.e(TAG, \" Review failed to insert\");\n }\n }", "private void addMovieToDb() {\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(MovieColumns.ADULT,mMovie.getAdult());\n contentValues.put(MovieColumns.BACKDROP_PATH,mMovie.getBackdropPath());\n contentValues.put(MovieColumns.GENRE,Utils.arrayToString(mMovie.getGenreIds()));\n contentValues.put(MovieColumns.MOV_ID,mMovie.getMovieId());\n contentValues.put(MovieColumns.ORIGINAL_LANGUAGE,mMovie.getOrigLanguage());\n contentValues.put(MovieColumns.ORIGINAL_TITLE,mMovie.getOrigTitle());\n contentValues.put(MovieColumns.OVERVIEW,mMovie.getOverview());\n contentValues.put(MovieColumns.RELEASE_DATE,mMovie.getReleaseDate());\n contentValues.put(MovieColumns.POSTER_PATH,mMovie.getPosterPath());\n contentValues.put(MovieColumns.POPULARITY,mMovie.getPopularity());\n contentValues.put(MovieColumns.TITLE,mMovie.getTitle());\n contentValues.put(MovieColumns.VIDEO, mMovie.getVideo());\n contentValues.put(MovieColumns.VOTE_AVERAGE, mMovie.getVoteAverage());\n contentValues.put(MovieColumns.VOTE_COUNT, mMovie.getVoteCount());\n\n try {\n getActivity().getContentResolver().insert(MoviesProvider.Movies.MOVIES_URI, contentValues);\n Toast.makeText(getContext(),getString(R.string.movie_added_as_favorite),Toast.LENGTH_SHORT).show();\n }catch (Exception ex){\n if(ex instanceof SQLiteConstraintException){\n Toast.makeText(getContext(), getString(R.string.movie_already_added_as_favorite), Toast.LENGTH_SHORT).show();\n }else {\n Toast.makeText(getContext(), getString(R.string.movie_added_as_favorite_problem), Toast.LENGTH_SHORT).show();\n }\n }\n }", "public void removeFavorite(){\n //check if movie is in the user favorite list\n if(mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is in the favorite list, mark that list has changed\n mFavoriteChanged = true;\n\n //update movie item favorite status\n mMovie.setFavorite(false);\n\n //delete movie item from favorite database table\n mMovieValet.deleteFavorite(mMovie);\n\n //remove movie item from favorite movie list buffer\n mMovieStaff.removeFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public boolean addToFavourites(String name){\n SQLiteDatabase db =this.getReadableDatabase();\n ContentValues contentVal = new ContentValues();\n contentVal.put(FAVOURITES,true);\n db.update(Db_Table,contentVal, \"movie_name = ?\",new String[]{ name });\n return true;\n }", "public long addMovieToFavorites(long movieId) {\n if (!isMovieIsFavorite(movieId)) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = insertFavoriteMovieIntoContentValues(movieId);\n long rowId = database.insert(FavoriteMoviesEntry.TABLE_NAME, null, values);\n database.close();\n return rowId;\n } else return 0;\n }", "public void addData(Movie movieToAdd, View view)\n {\n /* Creating a DatabaseHelper Instance to access the getData Method in order to get the\n * Title (Index 1 in terms of Columns) of all the saved Movies in the Database and to make\n * sure that the Title of the Movie to be registered isn't equals to any of the existing movies\n */\n DatabaseHelper databaseHelper = new DatabaseHelper(context);\n Cursor c = databaseHelper.getData();\n\n ArrayList<String> listLabels = new ArrayList<>();\n\n while(c.moveToNext())\n {\n //get the value from the database in column 1\n //then add it to the ArrayList\n listLabels.add(c.getString(1));\n }\n\n // Error Message if the Title of the Movie to Add Already is found\n if (listLabels.contains(movieToAdd.getTitle()))\n\n Snackbar.make(view, \"Movie Already has already been Registered !!!\",Snackbar.LENGTH_SHORT)\n .setBackgroundTint(context.getResources().getColor(R.color.transparent_yellow))\n .setTextColor(context.getResources().getColor(R.color.grey_black))\n .show();\n\n else\n {\n int favorite = 0;\n\n if (movieToAdd.isFavorite())\n\n favorite = 1;\n\n /* the execSQL Method simply executes this query on the Database, in this Query UPDATE is\n * used to specify the Table Name to Update, SET specifies the Column name to Update in this\n * case COL8 contains favorites and WHERE is the condition in this case it is to make sure\n * that the Movie Title Matches with the given title\n */\n this.getWritableDatabase().execSQL(\n \"INSERT INTO \" + TABLE_NAME +\n \" (title, year, director, actor_actress, rating, review, favorite)\" +\n \" values('\"\n + movieToAdd.getTitle() + \"', '\" + movieToAdd.getYear() + \"', '\"\n + movieToAdd.getDirector() + \"', '\" + movieToAdd.getActorActress() + \"', \"\n + movieToAdd.getRating() + \", '\" + movieToAdd.getReview() + \"', \" + favorite\n + \")\");\n\n Snackbar.make(view, \"Successfully Registered !\",Snackbar.LENGTH_SHORT)\n .setBackgroundTint(context.getResources().getColor(R.color.transparent_yellow))\n .setTextColor(context.getResources().getColor(R.color.grey_black))\n .show();\n }\n }", "private boolean checkIfFavorite() {\n if (favoriteIds.contains(movie.getId())) {\n movie.setFavorite(true);\n return true;\n }\n movie.setFavorite(false);\n return false;\n }", "private boolean isAddedToFavorites() {\n boolean isFavorite = false;\n\n String[] projection = {FavMovieEntry.COLUMN_MOVIE_ID};\n String selection = FavMovieEntry.COLUMN_MOVIE_ID + \"=?\";\n String[] selectionArgs = new String[]{\n String.valueOf(sMovie.getMovieId())};\n\n Cursor cursor = this.getContentResolver().query(\n FavMovieEntry.CONTENT_URI,\n projection,\n selection,\n selectionArgs,\n null\n );\n\n if (cursor != null && cursor.moveToFirst()) {\n if (cursor.getCount() > 0) {\n isFavorite = true;\n long currentIndex = cursor.getLong(cursor.getColumnIndex(FavMovieEntry.COLUMN_MOVIE_ID));\n mCurrentMovieUri = ContentUris.withAppendedId(FavMovieEntry.CONTENT_URI, currentIndex);\n } else {\n isFavorite = false;\n\n mCurrentMovieUri = null;\n }\n cursor.close();\n }\n\n return isFavorite;\n }", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "private void addToDatabase(Favorites favorites) {\n FirebaseUser currentUser = mAuth.getCurrentUser();\n String uid = currentUser.getUid();\n mDatabase = db.getReference();\n\n mDatabase.child(\"favorites\").child(uid).setValue(favorites);\n }", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "public void addToWish( String product_id, String product_name,String product_brand, String product_img,\n String product_price,String product_desc, String product_discount, String product_varieties )\n {\n boolean isAdded = mDatabaseFavorite.insert(product_id, product_name,product_brand, product_img,\n product_price,product_discount);\n\n if (isAdded == true)\n {\n Toast.makeText(DetailActivity.this,\"Added to Favorite\",Toast.LENGTH_SHORT).show();\n\n }\n\n else {\n\n Toast.makeText(DetailActivity.this,\"Already present in favoriteList\",Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public boolean removeFromFavourites(String name){\n SQLiteDatabase db =this.getReadableDatabase();\n ContentValues contentVal = new ContentValues();\n contentVal.put(FAVOURITES,false);\n db.update(Db_Table,contentVal, \"movie_name = ?\",new String[]{ name });\n return true;\n }", "void addToFavorites(int recipeId);", "public void makeFavorite(String title, int favorite)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n\n /* the execSQL Method simply executes this query on the Database, in this Query UPDATE is\n * used to specify the Table Name to Update, SET specifies the Column name to Update in this\n * case COL8 contains favorites and WHERE is the condition in this case it is to make sure\n * that the Movie Title Matches with the given title\n */\n db.execSQL(\n \"UPDATE \" + TABLE_NAME +\n \" SET \" + COL8 + \" = \" + favorite +\n \" WHERE \" + COL2 + \" = '\" + title + \"'\");\n }", "public void addFavourite(RecipeDbItem1 recipeDbItem1)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,recipeDbItem1.getID());\n values.put(KEY_TITLE,recipeDbItem1.getTitle());\n //insert a row\n db.insert(TABLE_FAVOURITES,null,values);\n db.close();\n //System.out.println(\"\\n Inserted into Favourites Table: \"+recipeDbItem1.getID()+\" \"+recipeDbItem1.getTitle());\n }", "public void addTermToFavourites(Term term) {\n // Set the favourited status of the term\n term.setFavourited(1);\n // Add the term to the table favourites\n addTermWithId(term, TABLE_FAVOURITES);\n // Update the favourite status of the term in the table terms\n updateTermFavouritedFlag(term, TABLE_TERMS);\n }", "public boolean insertFavToDB(Favorite favorite) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(mDBAccountString, favorite.getAccount());\n contentValues.put(mDBTitleString, favorite.getTitle());\n contentValues.put(mDBDescString, favorite.getDescription());\n contentValues.put(mDBURLString, favorite.getUrl());\n long rowId = mFavSQLiteDB.insert(\"Favorites\", null, contentValues);\n return rowId != -1; //If insert fails, rowID will equal -1\n }", "@Override\n public void FavouriteMovieSelected(View view) {\n if(view.getTag().equals(MovieDetailAdapter.FAVOURITE)) {\n StoreFavoriteMovieIntentService.startAction_ADD_FAV_MOVIE(getActivity(),\n mMovieItem,\n movieDeatailAdapter.getmMovieItemDetail());\n } else {\n StoreFavoriteMovieIntentService.removeFavriteMovie(getActivity(),mMovieItem.getId());\n }\n movieDeatailAdapter.notifyDataSetChanged();\n }", "public static boolean addMovie(SQLiteDatabase db, ContentValues cv){\n long _id;\n try{\n _id = db.insert(\"MOVIE\", null, cv);\n //Log.v(TAG, \"Movie Added with ID \"+_id);\n /*\n if(context != null){\n Toast.makeText(context, \"Movie added to Favorites\", Toast.LENGTH_SHORT).show();\n }\n */\n return true;\n }catch (Exception e){\n Log.e(TAG, e.getMessage());\n return false;\n }\n }", "public void addFavMusic(Music music) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(Music.COLUMN_PATH, music.getMusicPath());\n values.put(Music.COLUMN_NAME, music.getMusicTitle());\n values.put(Music.COLUMN_FAV, music.isLike());\n db.insert(Music.TABLE_NAME, null, values);\n db.close();\n }", "@Override\n public void onClick(View v) {\n FavouriteDatabase fd = new FavouriteDatabase();\n fd.addToFavouritesList(catID);\n Toast.makeText(getContext(), \"Added to your Favourites\", Toast.LENGTH_SHORT).show();\n }", "public void onClickAddTask(View view) {\n\n // Insert new Movie data via a ContentResolver\n\n\n ContentValues mUpdateValues = new ContentValues();\n // Defines selection criteria for the rows you want to update\n /*\n * Sets the updated value and updates the selected words.\n */\n\n if (fav == 0) {\n mRatingBar.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), android.R.drawable.btn_star_big_on));\n mUpdateValues.put(MoviesContract.MovieEntry.COLUMN_PRIORITY, 1);\n } else {\n mRatingBar.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), android.R.drawable.btn_star_big_off));\n mUpdateValues.put(MoviesContract.MovieEntry.COLUMN_PRIORITY, 0);\n }\n int mRowsUpdated = getContentResolver().update(\n MoviesContract.MovieEntry.buildMoviesUri(_id),\n mUpdateValues,\n MoviesContract.MovieEntry._ID+\"=?\",\n new String[] {String.valueOf(_id)});\n\n\n }", "@Override\n\tpublic void addFavorit(FavorisImpl newfavorit) {\n\t\t\n\t}", "public void onClicked() {\n mypreference = PreferenceManager.getDefaultSharedPreferences(getContext());\n SharedPreferences.Editor editorpref = mypreference.edit();\n Gson gson = new Gson();\n //retrieve the stored ArrayList of fovorite movies as json format\n String storedJsonList = mypreference.getString(\"storedjsonList\", \"\");\n // get the type of this json format\n Type type = new TypeToken<ArrayList<ItemsClass>>() {\n }.getType();\n ArrayList<ItemsClass> movieArrayList = new ArrayList<ItemsClass>();\n //create array list of the retrieved json\n // store it in my Arraylist\n movieArrayList = gson.fromJson(storedJsonList, type);\n\n// favo.setSelected(va[0]);\n ischecked = va[0];\n if (va[0] == true) {\n\n if (movieArrayList == null) {\n\n favoImageButton.setImageResource(R.drawable.liked);\n\n String loadedPosterString = encodeTobase64(theposterImage);\n\n\n serItems.add(new ItemsClass(loadedPosterString, title, releaseDate, overview, rate, id));\n\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id + \"and you list size is\" + serItems.size(), Toast.LENGTH_SHORT).show();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n\n } else if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n int detectId = serItems.get(i).getId();\n if (serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you already have this movie in favorite list \", Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.liked);\n break;\n } else if (serItems.size() > 0 && detectId != id && i < serItems.size() - 1) {\n\n continue;\n\n } else if (detectId != id && i == serItems.size() - 1 && i > serItems.size() - 2) {\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n serItems.add(new ItemsClass(storedPoster, title, releaseDate, overview, rate, id));\n serItems.size();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n break;\n }\n\n }\n }\n\n } else {\n if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n\n int detectId = serItems.get(i).getId();\n if (i < serItems.size() && serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you have deleted this movie this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n mypreference = getContext().getSharedPreferences(\"moviepref\", Context.MODE_PRIVATE);\n editorpref.putString(\"storedPoster\", \"\");\n editorpref.putString(\"storedTitle\", \"\");\n editorpref.putString(\"storedOverview\", \"\");\n editorpref.putString(\"storedDate\", \"\");\n editorpref.putFloat(\"storedrating\", (float) 0.0);\n editorpref.commit();\n va[0] = !va[0];\n//\n break;\n } else if (detectId != id && i < serItems.size() - 1) {\n continue;\n } else if (detectId == id && i == serItems.size() - 1) {\n Toast.makeText(getContext(), \" actually you don't have this movie in your favorite list \", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }\n }", "private void addSelectedtoFavorites(){\n\t\t\n\t\tCursor c=getContentResolver().query(Uri.parse(Const.URI_STRING+\"/videolist/\"+mPlayListId), null, null, null, null);\n\t\tif(mCheckData==null || c==null){\n\t\t\tLogging.e(\"Error Data NULL\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(mCheckData.size()!=c.getCount()){\n\t\t\tLogging.e(\"Error Data and Cursor count has different value\");\n\t\t}\n\t\t\n\t\tif(c!=null){\n\t\t\tLogging.d(\"Insert Start\");\n\t\t \tfor(int i=0;i<c.getCount();i++){\n\t \t\tBoolean tagged=mCheckData.get(i);\n\t \t\tif(tagged){\n\t \t\t\tc.moveToPosition(i);\n\t \t\t\tContentValues cv=new ContentValues();\n\t \t\t\tcv.put(MyList.PRJ_TITLE, c.getString(c.getColumnIndex(PlayList.PRJ_TITLE)));\n\t \t\t\tcv.put(MyList.PRJ_PLAYLIST_ID, mTitle);\n\t \t\t\tcv.put(MyList.PRJ_DESCRIPTION, c.getString(c.getColumnIndex(PlayList.PRJ_DESCRIPTION)));\n\t \t\t\tcv.put(MyList.PRJ_DURATION, c.getString(c.getColumnIndex(PlayList.PRJ_DURATION)));\n\t \t\t\tcv.put(MyList.PRJ_THUMNAIL, c.getString(c.getColumnIndex(PlayList.PRJ_THUMNAIL)));\n\t \t\t\tcv.put(MyList.PRJ_VIDEO_ID, c.getString(c.getColumnIndex(PlayList.PRJ_VIDEO_ID)));\n\t \t\t\t\n\t \t\t\tgetContentResolver().insert(Uri.parse(\"content://\"+Const.MYLIST_AUTHORITY+\"/videolist\"), cv);\n\t \t\t\tLogging.d(\"Insert \"+i);\n\t \t\t}\n\t \t}\n\t\t \tc.close();\n\t\t \tLogging.d(\"Insert End\");\n\t\t}\n\t}", "private void removeFromFavorites() {\n int rowsDeleted;\n\n if (mCurrentMovieUri != null) {\n rowsDeleted = getContentResolver().delete(\n mCurrentMovieUri,\n null,\n null);\n }\n }", "public void addMovie(ArrayList<Movie> movies)\n {\n String title = \"\";\n String director = \"\";\n String actor1 = \"\";\n String actor2 = \"\";\n String actor3 = \"\";\n int rating = 0;\n \n title = insertTitle();\n boolean checkResult = checkMovieRedundancyByTitle(movies, title);\n if (checkResult == true)\n return;\n \n director = insertDirector();\n actor1 = insertActor(1);\n actor2 = insertActor(2);\n if (actor2.length() != 0)\n actor3 = insertActor(3);\n \n rating = insertRating();\n \n Movie film = createNewMovie(title,director,actor1,actor2,actor3,rating);\n movies.add(film);\n displayOneFilm(film);\n System.out.println(\"\\n\\t\\t\\t >>>>> Yeayy, \" + title.toUpperCase() + \" successfully ADD to database! <<<<< \");\n }", "private void retrieveFavoritesCompleted(ArrayList<MovieItem> movies){\n //get number of favorite movies in the list\n int count = movies.size();\n\n //check if there are any movies\n if(count > 0){\n //save movies to buffer\n mMovieStaff.setMovies(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //check if the current poster fragment is displaying the user favorite list\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE){\n //yes, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void enterData(String name,int year,String director,String cast,int rating , String reviews , boolean fav){\n movieDB = getWritableDatabase();\n movieDB.execSQL(\"insert into \"+Db_Table+ \" (\" + MOVIE_NAME + \",\" + MOVIE_YEAR + \",\" + MOVIE_DIRECTOR + \",\" + MOVIE_CAST + \",\" + MOVIE_RATING + \",\"+MOVIE_REVIEWS+\",\"+FAVOURITES+\") values('\" +name+\"','\"+year+\"','\"+director+\"','\"+cast+\"','\"+rating+\"','\"+reviews+\"','\"+fav+\"');\");\n Toast.makeText(ctx, \"Movie Saved Successfully \", Toast.LENGTH_SHORT).show();\n Log.i(\"add\",\"done\");\n }", "public void addUserMovie(Long movie, Integer mark, Integer wishlist) throws IllegalOperationException;", "public void addFavourite(View view){\n // We need to get the input from the fields\n EditText editTextName = (EditText) findViewById(R.id.editTextItemName);\n\n // First we need to make sure that the two required fields have entries and are valid\n if (editTextName.length() == 0) {\n Context context = getApplicationContext();\n CharSequence text = \"Missing Name.\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n return;\n }\n\n Context context = getApplicationContext();\n CharSequence text = \"Entry added as favourite\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n view.setClickable(false); // Turns button off //\n view.setVisibility(View.INVISIBLE);\n\n // Also make text entry invisible\n editTextName.setVisibility(editTextName.INVISIBLE);\n\n Globals.l.add(editTextName.getText().toString(),Globals.f);\n\n\n }", "public boolean toggleIsFavorite(ContentValues contentValues) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n String movieId = contentValues.getAsString(FavoriteMovieContract.FavoriteMovie.COLUMN_MOVIE_ID);\n\n if (getIsFavorite(movieId)) {\n db.delete(TABLE_NAME, COLUMN_MOVIE_ID + \" = ?\", new String[] { movieId });\n return false;\n } else {\n ContentValues values = new ContentValues();\n values.put(COLUMN_MOVIE_ID, movieId);\n\n db.insert(TABLE_NAME, null, values);\n return true;\n }\n }", "public void deleteMovieFromFavorites(int id) {\n movie.setFavorite(false);\n isFavorite = false;\n //change the star from yellow to gray\n star.setImageResource(R.drawable.ic_grade_gray_36px);\n //delete the poster from local storage\n deleteMoviePoster();\n String stringId = Integer.toString(id);\n Uri uri = FavoriteMoviesContract.MovieEntry.CONTENT_URI.buildUpon()\n .appendPath(stringId).build();\n String whereClause = \"moviedb_id=?\";\n String[] whereArgs = new String[]{stringId};\n\n int rowsDeleted = getActivity().getContentResolver().delete(uri, whereClause, whereArgs);\n if (rowsDeleted > 0) {\n String successMessage = \"You have successfully deleted \" + movie.getOriginalTitle() +\n \" from the Favorites collection\";\n Toast.makeText(getActivity(), successMessage, Toast.LENGTH_LONG).show();\n } else {\n String errorMessage = \"An error occurred while deleting \" + movie.getOriginalTitle() +\n \" from the Favorites collection\";\n Toast.makeText(getActivity(), errorMessage, Toast.LENGTH_LONG).show();\n }\n }", "public void editMovie(int id, Movie movie)\n {\n // Since SQLite does not support Booleans, an Integer is used with 0 as false and 1 as true\n int favorite = 0;\n\n if (movie.isFavorite())\n\n favorite = 1;\n\n /* the execSQL Method simply executes this query on the Database, in this Query REPLACE INTO\n * replaces a Row in the table based on the movieId value specified\n */\n this.getWritableDatabase().execSQL(\n \"REPLACE INTO \" + TABLE_NAME +\n \" (movieId, title, year, director, actor_actress, rating, review, favorite)\" +\n \" Values(\" + id + \", '\" + movie.getTitle() + \"', '\" + movie.getYear() + \"', '\" + movie.getDirector() +\n \"', '\" + movie.getActorActress() + \"', \" + movie.getRating() + \", '\" + movie.getReview() +\n \"', \" + favorite + \")\");\n }", "@Override\n public void addProductToFavorites(View view, Intent intent) {\n try {\n if(iProduct != null && view != null && intent != null){\n Context context = view.getContext();\n String jsonProduct = intent.getStringExtra(CommonPresenter.DETAIL_PRODUCT);\n Product product = CommonPresenter.getProductFromJSON(jsonProduct);\n CRUDFavorite crudFavorite = new CRUDFavorite(context);\n boolean isProductExists = crudFavorite.isProductExists(product.getProductId());\n if(isProductExists){\n crudFavorite.deleteByProductId(product.getProductId());\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_delete_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_add_to_favorite_32dp);\n }\n else{\n crudFavorite.add(new Favorite(0, product));\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_add_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_favorite_32dp);\n }\n }\n }\n catch (Exception ex){\n Log.e(\"TAG_ERROR\", \"ProductPresenter-->addProductToFavorites() : \"+ex.getMessage());\n }\n }", "private ArrayList<MovieItem> getFavoriteMovies(){\n //get list of favorite movies from buffer\n ArrayList<MovieItem> movies = mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //check if favorite movie list has changed\n if(mFavoriteChanged){\n //list has changed, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //return movie list\n return movies;\n }", "public void addToFavorites(View view) {\n FirebaseUser currentUser = mAuth.getCurrentUser();\n String uid = currentUser.getUid();\n mDatabase = db.getReference(\"favorites\").child(uid);\n\n ValueEventListener postListener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n favorites = dataSnapshot.getValue(Favorites.class);\n favorites.addVolume(currentVolume.getTitle(), currentVolume.getId());\n addToDatabase(favorites);\n Intent intent = new Intent(VolumeActivity.this, FavoritesActivity.class);\n startActivity(intent);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n // Getting Post failed, log a message\n Log.w(\"FavoritesActivity\", \"loadPost:onCancelled\", databaseError.toException());\n // ...\n }\n\n };\n mDatabase.addListenerForSingleValueEvent(postListener);\n }", "public List<MovieModel> addFavData(Cursor c) {\n\n if (c == null)\n return null;\n List<MovieModel> temp = new ArrayList<>();\n if (c.moveToFirst()) {\n while (c.moveToNext()) {\n MovieModel movieModel = new MovieModel();\n movieModel.setId(c.getLong(c.getColumnIndex(MovieColumns._ID)));\n movieModel.setTitle(c.getString(c.getColumnIndex(MovieColumns.NAME_TITLE)));\n movieModel.setOverView(c.getString(c.getColumnIndex(MovieColumns.NAME_OVERVIEW)));\n movieModel.setPosterPath(c.getString(c.getColumnIndex(MovieColumns.NAME_POSTERPATH)));\n movieModel.setVote_average(c.getDouble(c.getColumnIndex(MovieColumns.NAME_VOTE_AVERAGE)));\n movieModel.setReleaseDate(c.getString(c.getColumnIndex(MovieColumns.NAME_RELEASE_DATE)));\n movieModel.setFav(true);\n temp.add(movieModel);\n }\n }\n List<MovieModel> tempReturn = movieModelList;\n this.movieModelList = temp;\n\n /* if(movieModelList==null)\n movieModelList=temp;\n else {\n movieModelList.addAll(temp);\n }*/\n this.notifyDataSetChanged();\n return tempReturn;\n }", "public static void updateFavorite(String userId, final String foodId, final boolean option, final ImageButton favButton) {\n //get database reference\n final DatabaseReference dbref = FirebaseDatabase.getInstance().getReference(\"users\").child(userId);\n //add eventlistener to reference\n dbref.child(\"favoritesList\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n ArrayList<String> updated = new ArrayList<>();\n boolean exists = false;\n for (DataSnapshot favDataSnapshot : dataSnapshot.getChildren()) {\n String fav = favDataSnapshot.getValue(String.class);\n if (!option) {\n if (foodId.equals(fav))\n Log.d(\"favor\", \"this one should be deleted \");\n else\n updated.add(fav);\n } else {\n if (foodId.equals(fav)) {\n exists = true;\n updated.add(fav);\n } else\n updated.add(fav);\n }\n }\n if (!exists && option) {\n favButton.setImageResource(R.drawable.ic_favorite);\n updated.add(foodId);\n }\n else\n favButton.setImageResource(R.drawable.ic_favorite_empty);\n dbref.child(\"favoritesList\").setValue(updated);\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "Movie addMovie(final Movie movie);", "public void setFavorite(int favorite) throws Exception {\n if (favorite == 0) {mFavorite = false;}\n else if (favorite == 1) {mFavorite = true;}\n else {throw new Exception(\"Error: Cannot resolve movie 'favorite' \");}\n }", "public boolean isMovieIsFavorite(long movieId) {\n SQLiteDatabase sqLiteDatabase = this.getReadableDatabase();\n String query = \"SELECT * FROM \" + FavoriteMoviesEntry.TABLE_NAME + \" WHERE \" + FavoriteMoviesEntry.COLUMN_MOVIE_ID + \" = \" + movieId;\n Cursor cursor = sqLiteDatabase.rawQuery(query, null);\n\n if (cursor.moveToFirst()) {\n cursor.close();\n return true;\n } else {\n cursor.close();\n return false;\n }\n }", "@Override\n public void onClick(View view) {\n isFavorite = !isFavorite;\n\n if (isFavorite) {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_add_to_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.saveFavorite(ShowTeacherActivity.this, teacher);\n ibFavorite.setImageResource(R.drawable.ic_favorite_full);\n } else {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_delete_from_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.deleteFavorite(ShowTeacherActivity.this, teacher.getId());\n ibFavorite.setImageResource(R.drawable.ic_favorite_border);\n }\n }", "@Override\n\tpublic void onCreate(final Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tthis.datasource = super.getDatasource();\n\t\tthis.context = super.getContext();\n\n\t\tthis.setContentView(R.layout.add_or_edit_favorite);\n\n\t\t// get values of calling activity\n\t\tfinal int selectedFavoriteId = this.getIntent().getIntExtra(DBConstants.COL_FAVORITE_ID, -1);\n\t\tfinal String selectedFavoriteName = this.getIntent().getStringExtra(DBConstants.COL_FAVORITE_NAME);\n\n\t\t// set the title to match the activity\n\t\tthis.textViewTitle = (TextView) this.findViewById(R.id.titleAddFavorite);\n\t\tthis.textViewTitle.setText(R.string.title_edit_name_favoritelist);\n\n\t\tthis.editTextFavoriteName = (EditText) this.findViewById(R.id.editTextNameAddFavoritelist);\n\t\tthis.editTextFavoriteName.setText(selectedFavoriteName);\n\t\tthis.editTextFavoriteName.addTextChangedListener(super.getTextWatcher(R.id.editTextNameAddFavoritelist));\n\n\t\tthis.buttonEditFavorite = (Button) this.findViewById(R.id.buttonConfirmAddFavoritelist);\n\t\tthis.buttonEditFavorite.setText(R.string.button_text_save);\n\n\t\tthis.buttonEditFavorite.setOnClickListener(new OnClickListener() {\n\n\t\t\tpublic void onClick(final View v) {\n\t\t\t\tif (EditFavoriteActivity.super.setErrorOnEmptyEditTexts(editTextIds)) {\n\n\t\t\t\t\t// check whether there is already a favoritelist with this\n\t\t\t\t\t// name\n\t\t\t\t\tfinal Favorite alreadyExistingFavorite = EditFavoriteActivity.this.datasource\n\t\t\t\t\t\t\t.getFavoriteByName(EditFavoriteActivity.this.editTextFavoriteName.getText().toString());\n\n\t\t\t\t\tif (alreadyExistingFavorite == null) {\n\n\t\t\t\t\t\tfinal Favorite favoriteToUpdate = new Favorite();\n\t\t\t\t\t\tfavoriteToUpdate.setId(selectedFavoriteId);\n\t\t\t\t\t\tfavoriteToUpdate.setName(EditFavoriteActivity.this.editTextFavoriteName.getText().toString());\n\n\t\t\t\t\t\tEditFavoriteActivity.this.datasource.updateFavorite(favoriteToUpdate);\n\t\t\t\t\t\tEditFavoriteActivity.this.finish();\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast.makeText(EditFavoriteActivity.this.context,\n\t\t\t\t\t\t\t\tEditFavoriteActivity.this.getString(R.string.msg_favorite_already_exists), Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "boolean isFavorite(int id);", "public void setFavoriteFlag(int flag, long videoID) {\n try {\n SQLiteDatabase database = this.getReadableDatabase();\n database.enableWriteAheadLogging();\n ContentValues contents = new ContentValues();\n contents.put(VideoTable.KEY_VIDEO_IS_FAVORITE, flag);\n database.update(VideoTable.VIDEO_TABLE, contents, VideoTable.KEY_VIDEO_ID + \"=?\", new String[]{\"\" + videoID});\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void addSimilarMovie(Movie movie){\n\t \tsimilarMovies.add(movie);\n\t }", "public static void saveFavouritesIntoDB(final AppDatabase db, final ViewModel viewModel, final LifecycleOwner lifecycleOwner, final Food food, final String restaurantId, final long userId){\n final LiveData<FavouriteMeal> favouriteMealLiveData;\n\n //TODO: check if there is a way to set new data to viewmodel without use setter method\n //Cast the ViewModel to the specific ViewModel\n if (viewModel instanceof DishDetailsViewModel) {\n ((DishDetailsViewModel) viewModel).setData(food.getMealId(), -1, restaurantId);\n favouriteMealLiveData = ((DishDetailsViewModel) viewModel).getFavouriteMealByMealId();\n }\n else if(viewModel instanceof RestaurantMenuViewModel) {\n ((RestaurantMenuViewModel) viewModel).setData(food.getMealId(), restaurantId, -1);\n favouriteMealLiveData = ((RestaurantMenuViewModel) viewModel).getFavouriteMealByMealId();\n } else {\n favouriteMealLiveData = null;\n }\n\n //Check if the food is already into the DB of favourites, if so I add only the join beetween userId and mealId, otherwise\n //I add the meal into the DB of favourites\n favouriteMealLiveData.observe(lifecycleOwner, new Observer<FavouriteMeal>() {\n @Override\n public void onChanged(@Nullable final FavouriteMeal favouriteMeal) {\n favouriteMealLiveData.removeObserver(this);\n final long favouriteMealId;\n //If null the food in not already inside the DB\n if (favouriteMeal == null){\n final FavouriteMeal newFavouriteMeal = new FavouriteMeal();\n newFavouriteMeal.setFoodType(food.getFoodType());\n newFavouriteMeal.setImageName(food.getImageName());\n newFavouriteMeal.setMealId(food.getMealId());\n newFavouriteMeal.setName(food.getName());\n newFavouriteMeal.setPrice(food.getPrice());\n newFavouriteMeal.setRestaurantId(restaurantId);\n newFavouriteMeal.setDescription(food.getDescription());\n\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n long favouriteMealId = db.favouriteMealsDao().insertFavouriteMeal(newFavouriteMeal);\n insertFavouriteDetails(db, userId, favouriteMealId, viewModel, food, lifecycleOwner);\n }\n });\n } else {\n favouriteMealId = favouriteMeal.getId();\n insertFavouriteDetails(db, userId, favouriteMealId, viewModel, food, lifecycleOwner);\n }\n }\n });\n\n\n }", "public boolean isAlreadyFavorited(){\r\n if(ui.isIsUserAuthenticated()){\r\n Users user = ui.getUser();\r\n if(user.getFavorites() != null){\r\n return user.getFavorites().contains(recipe);\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "private void removeFromFavorites() {\n favoriteBool = false;\n preferencesConfig.writeRemoveFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Removed from favorites\", Toast.LENGTH_SHORT).show();\n\n }", "public static boolean isMovieFavorite(Context context, String movieId) {\n String selection = MovieContract.FavoriteEntry.COLUMN_MOVIE_ID + \" = ?\";\n String[] selectionArgs = {movieId};\n\n Cursor cursor = context.getContentResolver().query(MovieContract.FavoriteEntry.CONTENT_URI,\n new String[]{MovieContract.FavoriteEntry._ID},\n selection,\n selectionArgs,\n null);\n\n if (cursor.moveToFirst())\n return true;\n\n return false;\n }", "public void setFavorite(boolean favorite) {\n this.favorite = favorite;\n }", "public void addFilm(Film film){\r\n this.cinema_film_list.add(film);\r\n }", "private static void insertFavouriteDetails(final AppDatabase db, long userId, long favouriteMealId, ViewModel viewModel, final Food food, LifecycleOwner lifecycleOwner){\n final FavouriteMealUserJoin favouriteMealUserJoin = new FavouriteMealUserJoin(userId, favouriteMealId);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n db.favouriteMealsDao().insertMealUser(favouriteMealUserJoin);\n }\n });\n\n //Retrieve the list of ingredients for the new favourite meal and check if it is already inside the DB\n for(final Ingredient ingredient : food.getIngredients()){\n final LiveData<Ingredient> ingredientLiveData;\n\n if (viewModel instanceof DishDetailsViewModel) {\n ((DishDetailsViewModel) viewModel).setIngredientName(ingredient.getIngredientName());\n ingredientLiveData = ((DishDetailsViewModel) viewModel).getIngredient();\n }\n else if(viewModel instanceof RestaurantMenuViewModel) {\n ((RestaurantMenuViewModel) viewModel).setIngredientName(ingredient.getIngredientName());\n ingredientLiveData = ((RestaurantMenuViewModel) viewModel).getIngredient();\n } else{\n ingredientLiveData = null;\n }\n\n if (ingredientLiveData != null) {\n ingredientLiveData.observe(lifecycleOwner, new Observer<Ingredient>() {\n @Override\n public void onChanged(@Nullable com.udacity.thefedex87.takemyorder.room.entity.Ingredient ingredientTmp) {\n final com.udacity.thefedex87.takemyorder.room.entity.Ingredient ingredientIntoDB;\n\n ingredientLiveData.removeObserver(this);\n\n //If ingredient is already inside the table I take it\n if (ingredientTmp != null) {\n ingredientIntoDB = ingredientTmp;\n } else {\n //If ingrediente is not already inside the ingredient table, I instanciate it and save it into the table\n ingredientIntoDB = new com.udacity.thefedex87.takemyorder.room.entity.Ingredient();\n\n ingredientIntoDB.setIngredientName(ingredient.getIngredientName());\n\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n db.favouriteMealsDao().insertIngredient(ingredientIntoDB);\n }\n });\n }\n\n //Create the new entry for many-to-many relation beetween meal and ingredient\n final FavouriteMealIngredientJoin favouriteMealIngredientJoin = new FavouriteMealIngredientJoin(ingredientIntoDB.getIngredientName(),\n food.getMealId());\n\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n db.favouriteMealsDao().insertMealIngredient(favouriteMealIngredientJoin);\n }\n });\n }\n });\n }\n }\n }", "void deleteFavorite(int id);", "private void setUpFavoriteMovieButton () {\n MovieDetailsViewModelFactory factory = new MovieDetailsViewModelFactory (mDb, movie.getMovieId());\n final MovieDetailsViewModel viewModel = ViewModelProviders.of(this, factory).get(MovieDetailsViewModel.class);\n\n // Observe the LiveData object in the ViewModel. Use it also when removing the observer\n viewModel.getMovie().observe(this, new Observer<Movie>() {\n @Override\n public void onChanged(@Nullable Movie dbMovie) {\n viewModel.getMovie().removeObserver(this);\n\n if (dbMovie == null) {\n favoriteMoviesButton.setChecked (false);\n } else if ((movie.getMovieId() == dbMovie.getMovieId()) && !favoriteMoviesButton.isChecked ()){\n favoriteMoviesButton.setChecked (true);\n } else {\n favoriteMoviesButton.setChecked (false);\n }\n }\n });\n }", "public void onFavouritesPress(View view) {\n\n favouritesDBHandler.addGame(game);\n Toast.makeText(getContext(), game.getName() + \" has been added to your favourites!\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n\tpublic void addFilm(com.dutproject.cinemaproject.model.bean.Film film) {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprotected void updateSessionFavorites(SMTSession session, PageViewVO fav, boolean isDelete) {\n\t\t// get the Favs map off of the session.\n\t\tMap<String,List<PageViewVO>> favMap = (Map<String,List<PageViewVO>>)session.getAttribute(MyFavoritesAction.MY_FAVORITES);\n\t\tList<PageViewVO> favs = favMap.get(fav.getReferenceCode());\n\t\tif (favs == null) favs = new ArrayList<>();\n\t\tif (isDelete) {\n\t\t\t// remove fav\n\t\t\tremoveFromSession(favs, fav.getPageId());\n\t\t} else {\n\t\t\t// add fav\n\t\t\tfavs.add(fav);\n\t\t}\n\t\t// replace the favs map on the session.\n\t\tsession.setAttribute(MyFavoritesAction.MY_FAVORITES, favMap);\n\t}", "@Override\n public void onCreate(SQLiteDatabase db) {\n final String CREATE_TABLE_FAVOURITES_COMMAND = \"CREATE TABLE \" + FavouritesDatabaseContract.FavouriteEntry.TABLE_NAME\n + \" ( \" + FavouritesDatabaseContract.FavouriteEntry._ID + \" INTEGER PRIMARY KEY AUTOINCREMENT, \" + FavouritesDatabaseContract.FavouriteEntry.COLUMN_MOVIE_POSTER_URI + \" TEXT NOT NULL, \" + FavouritesDatabaseContract.FavouriteEntry.COLUMN_MOVIE_NAME\n + \" TEXT NOT NULL, \" + FavouritesDatabaseContract.FavouriteEntry.COLUMN_MOVIE_AVERAGE_RATING + \" REAL NOT NULL, \" + FavouritesDatabaseContract.FavouriteEntry.COLUMN_MOVIE_ID\n + \" INTEGER NOT NULL, \" + FavouritesDatabaseContract.FavouriteEntry.COLUMN_MOVIE_RELEASE_YEAR + \" TEXT NOT NULL, \" + FavouritesDatabaseContract.FavouriteEntry.COLUMN_MOVIE_SYNOPSIS\n + \" TEXT NOT NULL, \" + FavouritesDatabaseContract.FavouriteEntry.COLUMN_MOVIE_GENRES + \" TEXT NOT NULL, \" + FavouritesDatabaseContract.FavouriteEntry.COLUMN_MOVIE_ACTIVE + \" INTEGER NOT NULL DEFAULT 1 );\";\n\n Log.d(\"FavouriteDbHeler\", CREATE_TABLE_FAVOURITES_COMMAND);\n //create the required tables and database\n db.execSQL(CREATE_TABLE_FAVOURITES_COMMAND);\n }", "public void setFavorite(boolean favorite) {\n isFavorite = favorite;\n }", "public static boolean checkForFavorite(Context context,String id){\n Set<String> setSavedFav = getAllFavorites(context);\n if(setSavedFav!=null){\n Log.v(TAG,\"SAVED ID: \"+setSavedFav);\n if(setSavedFav.contains(id))\n return true;\n }\n return false;\n }", "private void deleteMoviesFromDb(String stringUrlFavorite) {\n Uri contentUri;\n switch (stringUrlFavorite) {\n case Constants.STRING_URL_FAVORITE:\n contentUri = MovieContract.MovieEntry.CONTENT_URI_FAVORITE;\n break;\n default:\n return;\n }\n getContext().getContentResolver().delete(contentUri, null, null);\n }", "private void getAllFavorite(){\n\n\n MainViewModel viewModel = ViewModelProviders.of(this).get(MainViewModel.class);\n viewModel.getFavorite().observe(this, new Observer<List<FavoriteEntry>>() {\n @Override\n public void onChanged(@Nullable List<FavoriteEntry> imageEntries) {\n List<Movie> movies = new ArrayList<>();\n for (FavoriteEntry entry : imageEntries){\n Movie movie = new Movie();\n movie.setId(entry.getMovieid());\n movie.setOverview(entry.getOverview());\n movie.setOriginalTitle(entry.getTitle());\n movie.setPosterPath(entry.getPosterpath());\n movie.setVoteAverage(entry.getUserrating());\n movie.setReleaseDate(entry.getReleasedate());\n movies.add(movie);\n }\n\n adapter.setMovies(movies);\n }\n });\n }", "public void favorite(int index)\n {\n if (latest != null && latest.index == index)\n {\n if (this.showFavorites && !latest.morph.favorite)\n {\n this.toRemove.put(index, new MorphRemove(index, latest.typeIndex));\n this.remove(index);\n }\n\n latest = null;\n }\n }", "public void fetchFavoritedMovies() {\n favoritesSelected = true;\n Cursor cursor =\n getActivity().getContentResolver().query(MovieContract.FavoriteMovieEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n ArrayList<MovieModel> movieModels = new ArrayList<>();\n if (cursor != null) {\n while (cursor.moveToNext()) {\n MovieModel movieModel = new MovieModel(getActivity(), cursor);\n // Get the trailers and reviews\n String movieId = cursor.getString(cursor.getColumnIndex(MovieContract.FavoriteMovieEntry._ID));\n Cursor trailerCursor =\n getActivity().getContentResolver().query(MovieContract.TrailerEntry.CONTENT_URI,\n null,\n MovieContract.TrailerEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n Cursor reviewCursor =\n getActivity().getContentResolver().query(MovieContract.ReviewEntry.CONTENT_URI,\n null,\n MovieContract.ReviewEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n ArrayList<MovieTrailerModel> movieTrailerModels = new ArrayList<>();\n ArrayList<MovieReviewModel> movieReviewModels = new ArrayList<>();\n if (trailerCursor != null) {\n while (trailerCursor.moveToNext()) {\n movieTrailerModels.add(new MovieTrailerModel(getActivity(), trailerCursor));\n }\n trailerCursor.close();\n }\n if (reviewCursor != null) {\n while (reviewCursor.moveToNext()) {\n movieReviewModels.add(new MovieReviewModel(getActivity(), reviewCursor));\n }\n reviewCursor.close();\n }\n movieModel.setReviews(movieReviewModels);\n movieModel.setTrailers(movieTrailerModels);\n movieModels.add(movieModel);\n }\n cursor.close();\n }\n movieGridAdapter.setMovieModels(movieModels);\n }", "public static void findFavourites() {\n DataManager.currentFavouritesList.clear();\n\n for (int i = 0; i < DataManager.fullFavouritesList.size(); i++) {\n Attraction attraction = DataManager.findAttractionByName(DataManager.fullFavouritesList.get(i));\n\n if (attraction != null) {\n DataManager.currentFavouritesList.add(attraction);\n }\n }\n\n FavouritesListFragment.backgroundLayout.setVisibility(DataManager.currentFavouritesList.size() == 0 ? View.VISIBLE : View.INVISIBLE);\n\n AttractionsListFragment.attractionsAdapter.notifyDataSetChanged();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n\n return true;\n }\n if (id == R.id.action_fav) {\n Intent intent = new Intent(getApplicationContext(),ThirdActivity.class);\n startActivity(intent);\n return true;\n }\n if (id == R.id.action_addfav) {\n\n int i = 0;\n Map<String, ?> map = sharedPreferences.getAll();\n for(Map.Entry mEntry : map.entrySet()){\n if(Pattern.matches(\"fav \"+titre.getText(), mEntry.getKey()+\"\")){\n Toast.makeText(this,titre.getText()+\" removed from favorite\",Toast.LENGTH_SHORT).show();\n sharedPreferences\n .edit()\n .remove(mEntry.getKey()+\"\")\n .remove(titre.getText()+\" id\")\n .apply();\n i=1;\n }\n }\n\n if(i==0) {\n Toast.makeText(this, titre.getText() + \" added to favorite\", Toast.LENGTH_SHORT).show();\n sharedPreferences\n .edit()\n .putString(\"fav \" + titre.getText(), titre.getText() + \"\")\n .putInt(titre.getText() + \" id\", idAnime)\n .apply();\n }\n i=0;\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public void onCreate(SQLiteDatabase sqLiteDatabase) {\n final String CREATE_TABLE = \"CREATE TABLE \" + FavoriteEntry.TABLE_NAME + \" (\" +\r\n FavoriteEntry._ID + \" INTEGER PRIMARY KEY, \" +\r\n FavoriteEntry.COLUMN_MOVIE_ID + \" INTEGER UNIQUE NOT NULL, \" +\r\n FavoriteEntry.COLUMN_TITLE + \" TEXT NOT NULL, \" +\r\n FavoriteEntry.COLUMN_ORIGINAL_TITLE + \" TEXT NOT NULL, \" +\r\n FavoriteEntry.COLUMN_OVERVIEW + \" TEXT NOT NULL, \" +\r\n FavoriteEntry.COLUMN_POSTER_PATH + \" TEXT NOT NULL, \" +\r\n FavoriteEntry.COLUMN_RELEASE_DATE + \" DATE NOT NULL, \" +\r\n FavoriteEntry.COLUMN_RELEASE_TIME + \" VARCHAR(60) NOT NULL, \" +\r\n FavoriteEntry.COLUMN_RUNNING_TIME + \" VARCHAR(60) NOT NULL, \" +\r\n FavoriteEntry.COLUMN_VOTE_COUNT + \" INTEGER NOT NULL, \" +\r\n FavoriteEntry.COLUMN_VOTE_AVG + \" SMALLINT NOT NULL, \" +\r\n FavoriteEntry.COLUMN_POPULARITY + \" INTEGER NOT NULL, \" +\r\n FavoriteEntry.COLUMN_VIDEO + \" BOOLEAN NOT NULL);\";\r\n\r\n sqLiteDatabase.execSQL(CREATE_TABLE);\r\n }", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "public void addMovie(final Movie movie) {\n if (!this.getMovieNames().contains(movie.getName())) {\n this.movies.add(movie);\n }\n }", "public static void addIntoPracticedWords(Word word) {\n word.setFavorited(true);\n favWords.add(word);\n // Set the word favourite status to true in dictionary after adding the word to practice list\n if (Dictionary.getDictionary().contains(word)) {\n Dictionary.getWord(word).setFavorited(true);\n }\n }", "public static void saveFavorite(CourseBean bean) {\n\t\tDatabaseHelper dbHelper = DatabaseHelper.getInstance(MainApplication.sContext);\n\t\tdb = dbHelper.getReadableDatabase();\n\t\tif (isExist(bean.getId())) {\n\t\t\tupdateCourse(bean);\n\t\t} else {\n\t\t\t//fuck the different schedule id.\n\t\t\t//insertCourse(bean, ConstVar.COURSE_SHOW_INFO);\n\t\t}\n\n\t}", "@Override\n\tpublic int updateFavoriteVO(FavoriteVO vo) {\n\t\treturn 0;\n\t}", "public void saveFavorites(Context context, List<Recipes> favorites) {\n SharedPreferences settings;\n SharedPreferences.Editor editor;\n\n settings = context.getSharedPreferences(PREFS_NAME,\n Context.MODE_PRIVATE);\n editor = settings.edit();\n\n Gson gson = new Gson();\n String jsonFavorites = gson.toJson(favorites);\n\n editor.putString(FAVORITES, jsonFavorites);\n\n editor.apply();\n }", "public void onClicklistenerForFavorites(View view){\n if(isAlreadyFavorteis() == true){\n Boolean hasDeleted = dBhelper.deleteFavortiesByCategoryId(userAskAbout,inputSpinnerOne.getSelectedItemPosition(),inputSpinnertow.getSelectedItemPosition());\n if(hasDeleted == true) {\n Toast.makeText(getApplicationContext(), \"Your data has deleted in Favorties\", Toast.LENGTH_LONG).show();\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites);\n isAlreadyFavorties = false;\n }\n\n }else\n {\n favortiesMethed();\n isAlreadyFavorties = true;\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites_pressed);\n }\n\n }", "public void saveFavorites(Context context, List<ClassDataGejala> favorites) {\n SharedPreferences settings;\n SharedPreferences.Editor editor;\n\n settings = context.getSharedPreferences(GEJALA,\n Context.MODE_PRIVATE);\n editor = settings.edit();\n\n Gson gson = new Gson();\n String jsonFavorites = gson.toJson(favorites);\n\n editor.putString(GEJALA, jsonFavorites);\n\n editor.commit();\n }", "@Override\n protected void onPostResume() {\n super.onPostResume();\n if (movieList != null){movieList.clear();}\n movieList.addAll((ArrayList<DbMovie>) db.getAllFavouritesList());\n if (favouritesRecyclerViewAdapter != null) {\n favouritesRecyclerViewAdapter.notifyDataSetChanged();\n }\n if (db.getMoviesCount() == 0) {\n noResultTextView.setText(\"No results found!!!\");\n }\n }", "public long createFavorite(String title, String body) {\n ContentValues initialValues = new ContentValues();\n initialValues.put(KEY_TITLE, title);\n initialValues.put(KEY_BODY, body);\n\n return mDb.insert(DATABASE_TABLE_FAVORITES, null, initialValues);\n }", "public static boolean favoritar(Carro carro) {\n CarroDAO dao = CarrosApplication.getInstance().getCarroDAO();\n boolean favorito = isFavorito(carro);\n if (favorito) {\n // Remove dos favoritos\n dao.delete(carro);\n return false;\n }\n // Adiciona nos favoritos\n dao.insert(carro);\n return true;\n }", "public void setFavortieid(Integer favortieid) {\n this.favortieid = favortieid;\n }", "public void toggleFavorites()\n {\n this.showFavorites = !this.showFavorites;\n this.setupMorphs(Morphing.get(this.mc.thePlayer));\n }", "public void setToFavorite(boolean favorite) {\n this.isFavorite = favorite;\n }", "int insertSelective(MemberFav record);", "@Override\n public void onFavoriteDatabaseChanged() {\n //setCategoryCount(FileCategory.Favorite, mFavoriteList.getCount());\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_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 }", "public void deleteTermFromFavourites(int id) {\n // Get the term\n Term term = getTerm(id, TABLE_FAVOURITES);\n // Set the favourited status of the term\n term.setFavourited(0);\n // Update the favourite status of the term in the table terms\n updateTermFavouritedFlag(term, TABLE_TERMS);\n // Delete the term from the table favourites\n deleteTerm(term, TABLE_FAVOURITES);\n /*\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_FAVOURITES, KEY_ID + \" = ?\",\n new String[] { String.valueOf(term.getId()) });\n db.close();\n */\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_favorite:\n ItemFavoriteUrl db = new ItemFavoriteUrl(webView.getTitle(), webView.getUrl());\n db.save();\n adapter.notifyDataSetChanged();\n //adapter.add(ItemFavoriteUrl.findById(ItemFavoriteUrl.class, ItemFavoriteUrl.count(ItemFavoriteUrl.class)));\n Toast.makeText(MainActivity.this, R.string.favorite_saved, Toast.LENGTH_SHORT).show();\n /*for (int i=0; i<ItemFavoriteUrl.count(ItemFavoriteUrl.class); i++) {\n db = ItemFavoriteUrl.find\n Log.d(\"db\", db.url);\n }*/\n Log.d(\"count\", adapter.getCount() + \"\");\n break;\n\n case R.id.action_clear:\n ItemFavoriteUrl.deleteAll(ItemFavoriteUrl.class);\n adapter.notifyDataSetChanged();\n Toast.makeText(MainActivity.this, R.string.clear, Toast.LENGTH_SHORT).show();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onCreate(SQLiteDatabase db) {\n\n db.execSQL(\"CREATE TABLE \" + favoritesTable + \" (\" + colID + \" INTEGER PRIMARY KEY AUTOINCREMENT , \" + colMovieID + \" Text , \" + colPosterPath + \" TEXT , \" + colTitle + \" TEXT , \" + colPlot + \" TEXT , \" + colRating + \" TEXT , \" + colRelease + \" TEXT)\");\n\n }", "public void toggleFavorite() {\n setFavorite(!mFavorite);\n }", "public void addBusinessToFavorites(Business business) {\n for(Business b : favorites) {\n if(b.getTitle().equals(business.getTitle()))\n return;\n }\n\n //add business to favorites list.\n favorites.add(business);\n }", "void putSuggestions(Context context, @NonNull List<BaseMovie> suggestions) {\n Log.d(Constants.TAG, \"[FirestorePersistentCache]::putSuggestions: adding new suggestions\");\n\n // Add missing suggestions to the SharedPreferences\n PersistentCache<BaseMovie> cache = new PersistentCache<>(context);\n Map<String, BaseMovie> missingMovies = new HashMap<>();\n for (BaseMovie suggestion : suggestions) {\n String key = SUGGESTIONS_PREFIX + suggestion.getId();\n if (cache.get(key, BaseMovie.class) == null) {\n Log.d(Constants.TAG,\n \"[FirestorePersistentCache]::putSuggestions: suggestion misssing, adding movie (\" + suggestion.getTitle() + \")\");\n missingMovies.put(key, suggestion);\n\n } else {\n Log.d(Constants.TAG,\n \"[FirestorePersistentCache]::putSuggestions: suggestion already present, skipping movie (\" + suggestion.getTitle() + \")\");\n }\n }\n\n cache.putObjects(missingMovies);\n }", "public boolean deleteFavoriteMovie(long movieId) {\n SQLiteDatabase database = this.getWritableDatabase();\n int rowsDeleted = database.delete(FavoriteMoviesEntry.TABLE_NAME, FavoriteMoviesEntry.COLUMN_MOVIE_ID + \"=?\", new String[]{Long.toString(movieId)});\n if (rowsDeleted > 0) {\n return true;\n } else {\n return false;\n }\n }", "protected void updateProfileFavorites(ActionRequest req, PageViewVO fav) throws ActionException {\n\t\tlog.debug(\"updateProfileFavorites...\");\n\n\t\tMyFavoritesAction mfa = new MyFavoritesAction(getActionInit());\n\t\tmfa.setAttributes(getAttributes());\n\t\tmfa.setDBConnection(dbConn);\n\n\t\tboolean isDelete = Convert.formatBoolean(req.getParameter(\"isDelete\"));\n\t\tif (isDelete) {\n\t\t\tmfa.deleteFavorite(req);\n\t\t} else {\n\t\t\t// set additional req params needed for inserts.\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_TYPE_CD, fav.getReferenceCode());\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_REL_ID, fav.getPageId());\n\t\t\tmfa.insertFavorite(req);\n\t\t}\n\n\t\tupdateSessionFavorites(req.getSession(),fav,isDelete);\n\n\t}", "private void deleteFav() {\n\n // Call the ContentResolver to delete the favourite at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentFavUri\n // content URI already identifies the fav that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentFavUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n\n // Close the activity\n finish();\n }", "@Override\n\tpublic void removeFavorit(int id) {\n\t\t\n\t}" ]
[ "0.7967912", "0.7928937", "0.77029145", "0.76929545", "0.7492546", "0.7244194", "0.7243822", "0.72092897", "0.6971154", "0.6911034", "0.68410754", "0.68244594", "0.6724305", "0.67120546", "0.6689503", "0.66439605", "0.6596112", "0.6551984", "0.65232396", "0.6423804", "0.6398422", "0.6348542", "0.63305897", "0.63277847", "0.63200676", "0.62941784", "0.61539406", "0.61384606", "0.6129194", "0.61260474", "0.6099078", "0.60985386", "0.60912156", "0.6078541", "0.6060554", "0.60584027", "0.60414743", "0.603484", "0.60328627", "0.6031527", "0.60261816", "0.6019972", "0.60033214", "0.6003093", "0.5992747", "0.59704906", "0.59602857", "0.591149", "0.5872163", "0.58336866", "0.5831366", "0.58243454", "0.58183825", "0.5807621", "0.58052397", "0.5785261", "0.57769585", "0.5776899", "0.5770263", "0.57679385", "0.5762309", "0.57373726", "0.5736778", "0.5725283", "0.5712835", "0.57107323", "0.57030964", "0.5687775", "0.5669616", "0.5656506", "0.56534857", "0.563264", "0.56317973", "0.56209505", "0.56095093", "0.56024563", "0.5596258", "0.5584367", "0.5578475", "0.5573532", "0.5564727", "0.5559135", "0.5551803", "0.55497473", "0.55446327", "0.5542332", "0.5531516", "0.55237156", "0.5521506", "0.5517939", "0.5516726", "0.5504238", "0.5503987", "0.55024886", "0.549329", "0.54911435", "0.5485483", "0.5482462", "0.5481418", "0.5480477" ]
0.61908305
26
0 = false, 1 = true
public OrotParser() { createPackagesJson(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean booleanOf();", "boolean getValue();", "public abstract boolean read_boolean();", "public boolean isProcessed() \n{\nObject oo = get_Value(\"Processed\");\nif (oo != null) \n{\n if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();\n return \"Y\".equals(oo);\n}\nreturn false;\n}", "public Boolean int_to_boolean(int arg){\r\n\t\tif (arg == 1)\r\n\t\t\treturn true;\r\n\t\telse return false;\r\n\t}", "boolean hasS1();", "boolean getBoolValue();", "boolean getBoolValue();", "boolean getResult();", "boolean getResult();", "boolean getResult();", "boolean getResult();", "void mo64153a(boolean z);", "void mo6661a(boolean z);", "boolean mo38970a();", "private boolean intToBoolean(int arg) {\n\t\tif (arg == 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean isSimpleValue();", "Boolean conditionResult();", "boolean mo30282b();", "void mo21069a(boolean z);", "void mo197b(boolean z);", "boolean mo54429b();", "boolean mo44967d();", "void mo3305a(boolean z);", "void mo9701a(boolean z);", "Boolean isPassed();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "boolean pass();", "void mo22049es(boolean z);", "void mo99838a(boolean z);", "public LlvmValue visit(BooleanType n){\n\t\treturn LlvmPrimitiveType.I1;\n\t}", "boolean isValue();", "void mo21071b(boolean z);", "boolean hasPass();", "boolean hasPass();", "void boolean1(boolean a);", "boolean mo34114a();", "public boolean nextBoolean(){\r\n\t\treturn (nextInt() & 0x10) == 0;\r\n\t}", "boolean mo44966c();", "public abstract boolean mo36211n();", "void mo12636a(boolean z);", "public Boolean asBoolean();", "int isActive();", "boolean readBoolean();", "boolean isOp();", "boolean internal();", "boolean mo23707a();", "void mo98208a(boolean z);", "boolean hasNum1();", "Boolean getCompletelyCorrect();", "public static void main(String[] args){\n int num= 120;\n boolean positive = num>0;\n boolean negative = num <0;\n boolean zero = num ==0;\n\n\n System.out.println(num + \" is positive? \"+positive);\n System.out.println(num + \" is negative? \"+negative);\n System.out.println(num + \" is zero? \"+zero);\n\n\n\n }", "boolean mo1836b();", "BoolOperation createBoolOperation();", "public boolean tom();", "public abstract boolean isPositive();", "boolean mo4830a();", "void mo54420a(boolean z, boolean z2);", "boolean mo1489a();", "void mo1492b(boolean z);", "boolean mo1969a();", "boolean mo54431c();", "public static void main(String[] args) {\n\t\n\tSystem.out.println(10>9);\n\tboolean resultA = 10> 9; \n\t\n\tSystem.out.println(resultA);\n\tSystem.out.println(10>=9); // greater or equal\n\t\n\tboolean resultB= 10>=9; \n\tSystem.out.println(resultB);\n\t\n\tboolean resultC = 10<=9; \n\tSystem.out.println(resultC);\n\t\n\tboolean resultD= 1100 <1200;\n\tSystem.out.println(resultD);\n\t\n\tboolean resultE = 1000 < 1000; \n\tSystem.out.println(resultE);\n\t\t\t\n\tboolean resultF = 1000 <= 1000; \n\tSystem.out.println(resultF);\n\t\n\t\n\t\n\t\n\tboolean A = ! false ; \n\tSystem.out.println(A);\n\t\n\tboolean B = ! true; \n\tSystem.out.println(B);\n\t\n\tboolean C = ! false !=false; \n\tSystem.out.println(C);\n\t\n\t\n\t\n\t// practice ! (not) : \n\t\n\tboolean g = false; \n\tSystem.out.println(g);\n\t\n\tSystem.out.println(! g);\n\t\n\tSystem.out.println(!true == false);\n\t\n\t\n\t\n\tboolean h = \"Batch 12\" == \"Batch13\"; \n\tSystem.out.println(h);\n\n\tSystem.out.println( \" batch12\" != \"Batch12\");\n\tSystem.out.println(\"Kuzzat\" == \"bad guy\");\n\t\n\t\n\tint Num = 198; \n\tSystem.out.println(Num %= 2);\n\t\n\tbyte byteNum = 30; \n\t// int INum = INum + byteNum ; // we must give value to local variables . \n\t\n\t\n\tString str; \n\t// System.out.println(str);\n\t\n\t\n\t\n}", "public abstract boolean mo66253b();", "boolean getB21();", "void mo1488a(boolean z);", "private boolean convertToBoolean (String s) {\n return (\"1\".equalsIgnoreCase(s)\n || \"yes\".equalsIgnoreCase(s)\n || \"true\".equalsIgnoreCase(s)\n || \"on\".equalsIgnoreCase(s)\n || \"y\".equalsIgnoreCase(s)\n || \"t\".equalsIgnoreCase(s));\n }", "boolean hasVal();", "boolean hasVal();", "public static void main(String[] args) {\n\r\n\r\n\t\t boolean value = true;\r\n\r\n\t\t value = false;\r\n\r\n\t\t System.out.println(\"The value for the Boolean variable is : \"+ value);\r\n\t\r\n\r\n}", "static boolean boolFrBit(int input){\n return input!=0;\n }", "boolean mo2803a(boolean z);", "public static void main(String[] args) {\nboolean a, b, c;\na =true;\nb = false;\nc =a && b;\n\nSystem.out.println(\"c = a&&B:\" + c);\nc = a||b;\nSystem.out.println(\"c = a||b:\" + c);\nc = a==b;\nSystem.out.println(\"c = a==b:\" + c);\nc = a!=b;\nSystem.out.println(\"c = a!=b:\" + c);\n\n\n\n\t}", "boolean isChecked();", "boolean isChecked();", "public static void main(String[] args) {\nboolean var=false;\nboolean var1=true;\n\nSystem.out.println(var +\" \"+var1);\n\t}", "boolean hasBoolValue();", "boolean getB22();", "public Object bool(String value) {\r\n if (value == null) return null;\r\n return isOracle() ? Integer.valueOf((isTrue(value) ? 1 : 0)) :\r\n Boolean.valueOf(isTrue(value));\r\n }", "boolean mo72115d();", "boolean mo1835a();", "private String parseBoolean () {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n char chr=next();//get next character\r\n assert \"ft\".indexOf(chr)>=0;//assert valid boolean start character\r\n switch (chr) {//switch on first character\r\n case 'f': skip(4);//skip to last character\r\n return \"false\";\r\n case 't': skip(3);//skip to last character\r\n return \"true\";\r\n default: assert false;//assert that we do not reach this statement\r\n return null;\r\n }//switch on first character\r\n \r\n }", "public static void main(String[] args) { , or , not\n // truth table -> t=1 f=0\n // a =t b= f c = a and b => a.b =0=>f\n\n // except 0 every no. is treated as true\n // int a=1 int b=2 a and b => a.b\n // and -> a=1 , b=2, a and b => a.b\n\n\n // and\n boolean a= false;\n boolean b= false;\n\n boolean c= a && b; // a.b\n System.out.println(c);\n\n //or\n boolean f= true;\n boolean d= true;\n\n boolean e= f || d; // a+b\n System.out.println(e);\n\n // not\n boolean g =true;\n boolean h= !g;\n System.out.println(h);\n\n }", "boolean mo106365g();", "public boolean getValue();", "boolean isZero();", "boolean getB25();", "boolean mo54442g();", "boolean hasS2();", "@Test\n public void testCaseOfBool() {\n String o = \"\";\n AtomicBoolean success = new AtomicBoolean(false);\n match(o).caseOf(true, s -> success.set(true));\n assertTrue(success.get());\n }", "public TrueValue (){\n }", "@Test\n public void testCaseOfBool() {\n AtomicBoolean success = new AtomicBoolean(false);\n match(42L).caseOf(true, s -> success.set(true));\n assertTrue(success.get());\n }", "boolean getBit(int index);", "boolean hasPrimitive();", "boolean getStatus();", "boolean getStatus();", "boolean getStatus();", "boolean isAlwaysTrue();", "boolean mo1502i();" ]
[ "0.66675025", "0.6425454", "0.63142824", "0.62767935", "0.62416255", "0.62361836", "0.61929035", "0.61929035", "0.6180804", "0.6180804", "0.6180804", "0.6180804", "0.6148348", "0.6121819", "0.61194015", "0.6115446", "0.6109804", "0.61068904", "0.6103862", "0.61030453", "0.6097995", "0.60960144", "0.609301", "0.60908824", "0.60813326", "0.60808146", "0.60756296", "0.60756296", "0.60756296", "0.60756296", "0.6071642", "0.60656357", "0.6065329", "0.60598755", "0.6058874", "0.60544854", "0.6041483", "0.6041483", "0.6039181", "0.6038293", "0.60327375", "0.6028634", "0.60229075", "0.6010451", "0.60065365", "0.60001045", "0.59996235", "0.59982586", "0.5992923", "0.5991097", "0.5982659", "0.59728336", "0.5969161", "0.5969087", "0.5956096", "0.5953846", "0.5952041", "0.59514046", "0.5949783", "0.5942396", "0.59398", "0.5935646", "0.5933632", "0.59333444", "0.59285444", "0.59259504", "0.5923687", "0.5902986", "0.5902762", "0.59001774", "0.59001774", "0.5897726", "0.5897637", "0.5896208", "0.5896093", "0.58922815", "0.58922815", "0.5891419", "0.5880576", "0.58716434", "0.58701444", "0.5867904", "0.58640707", "0.5863903", "0.5859373", "0.5858113", "0.58451223", "0.58406246", "0.5837589", "0.583544", "0.583298", "0.58306795", "0.58305174", "0.582923", "0.58291125", "0.5826612", "0.5824221", "0.5824221", "0.5824221", "0.5822459", "0.58206165" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { ArrayList<Integer> numbers = new ArrayList<Integer>(); numbers.add(5); numbers.add(50); numbers.add(10); numbers.add(60); numbers.add(15); numbers.add(70); System.out.println(numbers); List<Integer> evenNumbers = numbers.stream().filter(I -> I%2==0).collect(Collectors.toList()); System.out.println(evenNumbers); }
{ "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
This method checks if the device is connected to internet services..
public boolean isNetworkAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); Log.i("Utilities","isNetworkAvailable()"+(activeNetworkInfo != null && activeNetworkInfo.isConnected())); return activeNetworkInfo != null && activeNetworkInfo.isConnected(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkInternetConnection() {\n\n ConnectivityManager connectivityManager = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n\n return (networkInfo != null && networkInfo.isConnected());\n\n }", "private Boolean checkInternetConnectivity(){\n // Code to check the network connectivity status\n ConnectivityManager connMgr = (ConnectivityManager)\n getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return networkInfo != null && networkInfo.isConnected();\n }", "private boolean checkInternetConnection() {\n ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n\n return networkInfo != null && networkInfo.isConnectedOrConnecting();\n }", "boolean isInternetConnected(){\n\n ConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n\n return networkInfo!=null && networkInfo.isConnected(); // -> true if we have internet connected\n\n }", "public boolean isOnline() {\n ConnectivityManager conMgr = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = conMgr.getActiveNetworkInfo();\n // In case it's not notify it through a toast\n if(netInfo == null || !netInfo.isConnected() || !netInfo.isAvailable()){\n Toast.makeText(MainActivity.this, \"No Internet connection!\", Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }", "private boolean isInternetConnected() {\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo ni = cm.getActiveNetworkInfo();\n if (ni!=null && ni.isAvailable() && ni.isConnected()) {\n return true;\n } else {\n return false;\n }\n }", "private boolean checkInternetConnection() {\n ConnectivityManager cm =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n return activeNetwork != null && activeNetwork.isConnectedOrConnecting();\n }", "public void checkConnectivity(){\n ConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);\n mIsOnline = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE)\n .isConnectedOrConnecting() || cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI)\n .isConnectedOrConnecting();\n }", "private boolean isDeviceConnectedToInternet() {\n ConnectivityManager cm =\n (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n return activeNetwork != null && activeNetwork.isConnectedOrConnecting();\n }", "public boolean isConnectingToInternet(){\n ConnectivityManager connectivity = (ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity != null)\n {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null)\n for (int i = 0; i < info.length; i++)\n if (info[i].getState() == NetworkInfo.State.CONNECTED)\n {\n return true;\n }\n \n }\n return false;\n }", "public boolean isConnectingToInternet(){\n ConnectivityManager connectivity = (ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity != null)\n {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null)\n for (int i = 0; i < info.length; i++)\n if (info[i].getState() == NetworkInfo.State.CONNECTED)\n {\n return true;\n }\n \n }\n return false;\n }", "private boolean isOnline(){\n ConnectivityManager cm= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n if(netInfo != null && netInfo.isConnectedOrConnecting()){\n return true;\n } else{\n return false;\n }\n }", "private boolean isConnectedToInternet(){\n ConnectivityManager connectivityManager = (ConnectivityManager) main.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n return networkInfo != null && networkInfo.isConnected();\n }", "private boolean isOnline() {\n Context context = getApplicationContext();\n ConnectivityManager cm = (ConnectivityManager) context\n .getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n if (netInfo != null && netInfo.isConnectedOrConnecting()) {\n return true;\n }\n return false;\n }", "private boolean isOnline() {\n ConnectivityManager conMgr = (ConnectivityManager) getApplicationContext().getSystemService(CONNECTIVITY_SERVICE);\n if (conMgr != null) {\n NetworkInfo netInfo = conMgr.getActiveNetworkInfo();\n if (netInfo == null || !netInfo.isConnected() || !netInfo.isAvailable()) {\n Toast.makeText(this, \"No Internet connection!\", Toast.LENGTH_LONG).show();\n return false;\n }\n }\n return true;\n }", "private boolean isConnectedToInternet() {\n ConnectivityManager conManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = conManager.getActiveNetworkInfo();\n return networkInfo != null && networkInfo.isConnected();\n }", "private Boolean hasInternetConnection() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n if ((networkInfo != null) && networkInfo.isConnected()) {\n return true;\n } else {\n makeToast(\"There is no internet connection\");\n return false;\n }\n }", "private boolean isOnline() {\n ConnectivityManager connect = (ConnectivityManager) this.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = connect.getActiveNetworkInfo();\n if(netInfo != null && netInfo.isConnected()){\n return true;\n }\n return false;\n }", "private boolean isConnectedToInternet() {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n return cm.getActiveNetworkInfo() != null && cm.getActiveNetworkInfo().isConnected();\n }", "private boolean ifNet() {\n \t\t\n \t\tConnectivityManager connectivity = (ConnectivityManager) this\n \t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n \t\tif (connectivity != null) {\n \t\t\tNetworkInfo[] info = connectivity.getAllNetworkInfo();\n \t\t\tif (info != null)\n \t\t\t\tfor (int i = 0; i < info.length; i++)\n \t\t\t\t\tif (info[i].getState() == NetworkInfo.State.CONNECTED) {\n \t\t\t\t\t\treturn true;\n \t\t\t\t\t}\n\n \t\t}\n \t\treturn false;\n \t}", "private boolean isInternetAvailable() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n Network[] networks = connectivityManager.getAllNetworks();\n NetworkInfo networkInfo;\n for (Network mNetwork : networks) {\n networkInfo = connectivityManager.getNetworkInfo(mNetwork);\n if (networkInfo.getState().equals(NetworkInfo.State.CONNECTED)) {\n return true;\n }\n }\n } else {\n if (connectivityManager != null) {\n NetworkInfo[] info = connectivityManager.getAllNetworkInfo();\n if (info != null) {\n for (NetworkInfo networkInfo : info) {\n if (networkInfo.getState() == NetworkInfo.State.CONNECTED) {\n return true;\n }\n }\n }\n }\n }\n Toast.makeText(getContext(), getString(R.string.internet_connection_needed),Toast.LENGTH_SHORT).show();\n return false;\n }", "public boolean internetIsConnected() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return networkInfo != null && networkInfo.isConnected();\n }", "public boolean checkInternetConnection()\n {\n ConnectivityManager cm =\n (ConnectivityManager)getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n return activeNetwork != null && activeNetwork.isConnectedOrConnecting();\n }", "public boolean isOnline() {\n \t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n \t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n \t\t\n \t\tif (netInfo != null && netInfo.isConnected()) {\n \t\t\treturn true;\n \t\t} else{\n \t\t\t\n \t\t\treturn false;\n \t\t}\n \t\t\n \t}", "private boolean checkConnection() {\n return InternetConnectivityReceiver.isConnected();\n }", "public boolean checkInternetConnection(@NonNull Context context) {\n return ((ConnectivityManager) context.getSystemService(\n Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo() != null;\n }", "private boolean checkNetworkState() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\n if (connectivityManager.getActiveNetworkInfo() == null || !connectivityManager.getActiveNetworkInfo().isConnected()) {\n showNetworkAlert();\n return false;\n }\n\n else return true;\n }", "public boolean isOnline() {\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnected();\n }", "private boolean isNetworkAvailable() {\n // Create a connectivity manager and\n // get the service type currently in use (Wi-fi, 3g etc)\n ConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);\n // Get network info from the service\n NetworkInfo networkInfo = cm.getActiveNetworkInfo();\n\n // return true or false based on connection\n return (networkInfo != null)\n && networkInfo.isConnected()\n && networkInfo.isAvailable();\n }", "public static boolean checkInternetConnection(Context context) {\n ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "public boolean isOnline() {\r\n\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\r\n\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\r\n\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public final int isInternetOn() {\n ConnectivityManager connec =\r\n (ConnectivityManager)getSystemService(getBaseContext().CONNECTIVITY_SERVICE);\r\n\r\n // Check for network connections\r\n if ( connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTED ||\r\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTING ||\r\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTING ||\r\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTED ) {\r\n\r\n // if connected with internet\r\n\r\n //Toast.makeText(this, \" Connected \", Toast.LENGTH_LONG).show();\r\n return 1;\r\n\r\n } else if (\r\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.DISCONNECTED ||\r\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.DISCONNECTED ) {\r\n\r\n //Toast.makeText(this, \" Not Connected \", Toast.LENGTH_LONG).show();\r\n return 0;\r\n }\r\n return 0;\r\n }", "public boolean isOnline() {\n boolean connected = false;\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() == NetworkInfo.State.CONNECTED || connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState() == NetworkInfo.State.CONNECTED) {\n connected = true;\n } else {\n connected = false;\n }\n return connected;\n }", "public final boolean isInternetOn() {\n ConnectivityManager connec =\n (ConnectivityManager)context.getSystemService(context.CONNECTIVITY_SERVICE);\n\n // Check for network connections\n if ( connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTED ||\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTED ) {\n\n // if connected with internet\n\n Toast.makeText(context, \" Connected \", Toast.LENGTH_LONG).show();\n return true;\n\n } else if (\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.DISCONNECTED ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.DISCONNECTED ) {\n\n Toast.makeText(context, \" Not Connected \", Toast.LENGTH_LONG).show();\n return false;\n }\n return false;\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr != null ? connMgr.getActiveNetworkInfo() : null;\n return (networkInfo != null && networkInfo.isConnected());\n }", "public boolean isOnline() {\n ConnectivityManager cm =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n if (netInfo != null && netInfo.isConnectedOrConnecting()) {\n return true;\n }\n return false;\n }", "protected boolean checkNetworkStatus() {\n\n ConnectivityManager manager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = manager.getActiveNetworkInfo();\n\n if ((activeNetworkInfo != null && activeNetworkInfo.isConnected())) {\n return true;\n } else {\n return false;\n }\n }", "public static boolean isConnectedToInternet(Context con){\n ConnectivityManager connectivity = (ConnectivityManager) con.getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity != null)\n {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null)\n for (int i = 0; i < info.length; i++)\n if (info[i].getState() == NetworkInfo.State.CONNECTED)\n {\n return true;\n }\n\n }\n return false;\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "public boolean isNetworkConnected(Context context) { \n\t\t\tif (context != null) { \n\t\t\t\tConnectivityManager mConnectivityManager = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); \n\t\t\t\tNetworkInfo mNetworkInfo = mConnectivityManager.getActiveNetworkInfo(); \n\t\t\t\tif (mNetworkInfo != null) { \n\t\t\t\t\treturn mNetworkInfo.isAvailable(); \n\t\t\t\t} \n\t\t\t} \n\t\t\treturn false; \n\t}", "public static boolean isInternetOn(Context context) {\n _context = context;\n ConnectivityManager connec = null;\n // get Connectivity Manager object to check connection\n //ConnectivityManager connec = \n //(ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);\n // get Connectivity Manager object to check connection\n try {\n connec = (ConnectivityManager) _context.getSystemService(Context.CONNECTIVITY_SERVICE);\n // 0 is Mobile dataconnection\n // 1 for Wifi Connection\n NetworkInfo activeNetwork = connec.getActiveNetworkInfo();\n if (activeNetwork != null) {\n if (connec.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTED) {\n //Common.IsLocalConnection = 2;\n return true;\n\n } else if (connec.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTED ||\n connec.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTING) {\n //Common.IsLocalConnection = 1;\n return true;\n } else if (connec.getNetworkInfo(0).getState() == NetworkInfo.State.DISCONNECTED ||\n connec.getNetworkInfo(1).getState() == NetworkInfo.State.DISCONNECTED) {\n //Common.IsLocalConnection = 0;\n return false;\n } // Check for network connections\n } else {\n // not connected to the internet\n }\n } catch (Exception ex) {\n CrashAnalytics.CrashReport(ex);\n }\n return false;\n }", "public boolean isInternetIsConnected(Context context) {\n try {\n ConnectivityManager cm = getConnectivityManager(context);\n assert cm != null;\n @SuppressLint(\"MissingPermission\") NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n if (activeNetwork != null) { // connected to the internet\n if (activeNetwork.getType() == ConnectivityManager.TYPE_WIFI) {\n // connected to wifi\n // Toast.makeText(context, activeNetwork.getTypeName(), Toast.LENGTH_SHORT).show();\n return true;\n\n } else if (activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE) {\n // connected to the mobile provider's data plan\n // Toast.makeText(context, activeNetwork.getTypeName(), Toast.LENGTH_SHORT).show();\n return true;\n }\n } else {\n // not connected to the internet\n return false;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "private boolean isConnectedToNetwork() {\n ConnectivityManager cManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = cManager.getActiveNetworkInfo();\n return activeNetworkInfo != null;\n }", "public boolean isNetworkAvailable() {\n initNetwork();\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n}", "private void checkConnectivity() {\n ConnectivityManager conMan = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo.State mobile = conMan.getNetworkInfo(0).getState();\n NetworkInfo.State wifi = conMan.getNetworkInfo(1).getState();\n if (!(mobile == NetworkInfo.State.CONNECTED || wifi == NetworkInfo.State.CONNECTED)) {\n Toast.makeText(context, R.string.data_error_message, Toast.LENGTH_LONG).show();\n }\n }", "public boolean internetErisimi() {\n\n ConnectivityManager conMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\n if (conMgr.getActiveNetworkInfo() != null\n\n && conMgr.getActiveNetworkInfo().isAvailable()\n\n && conMgr.getActiveNetworkInfo().isConnected()) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "public static boolean isConnectedToInternet() {\n String pingServerURL = pingBackUrl.substring(0, pingBackUrl.indexOf(\"/\", \"http://url\".length()));\n try {\n URL url = new URL(pingServerURL);\n HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n urlConn.connect();\n return (HttpURLConnection.HTTP_NOT_FOUND != urlConn.getResponseCode());\n } catch (MalformedURLException e) {\n LOG.error(\"LeadCapture : Error creating HTTP connection to the server : \" + pingServerURL);\n \n } catch (IOException e) {\n LOG.error(\"LeadCapture : Error creating HTTP connection to the server : \" + pingServerURL);\n }\n return false;\n }", "private boolean isOnline() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) owner.getBaseContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public static boolean isOnline() {\n ConnectivityManager cm =\n (ConnectivityManager) MainApplication.getGlobalContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "public boolean isOnline() {\n\t\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "boolean isNetworkAvailable();", "public boolean ConnectionCheck(){\n ConnectivityManager cm =\n (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n return isConnected;\n }", "public boolean isOnline() {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "private boolean isNetworkAvailable(){\n ConnectivityManager connectivityManager = (ConnectivityManager)\n getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n\n }", "public boolean isOnline() {\n ConnectivityManager cm =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "public boolean isOnline() {\n ConnectivityManager cm =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "public final boolean isInternetOn() {\n ConnectivityManager connec =\n (ConnectivityManager) getSystemService(getBaseContext().CONNECTIVITY_SERVICE);\n\n // Check for network connections\n if (connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTED ||\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTING ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.CONNECTED) {\n\n // if connected with internet\n\n\n return true;\n\n } else if (\n connec.getNetworkInfo(0).getState() == android.net.NetworkInfo.State.DISCONNECTED ||\n connec.getNetworkInfo(1).getState() == android.net.NetworkInfo.State.DISCONNECTED) {\n\n\n return false;\n }\n return false;\n }", "public boolean isOnline() {\n ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Activity.CONNECTIVITY_SERVICE);\n assert connMgr != null;\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "public boolean isOnline() {\n\t\tboolean connected = false;\n\t\t\n\t\tConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\n\t\t if(connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() == NetworkInfo.State.CONNECTED || \n\t\t connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState() == NetworkInfo.State.CONNECTED) {\n\t\t //we are connected to a network\n\t\t connected = true;\n\t\t }\n\t\t else\n\t\t {\n\t\t connected = false;\n\t\t }\n\t\t return connected;\n\t}", "protected boolean isOnline() {\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = cm.getActiveNetworkInfo();\n\n // Check now for connectivity\n if (networkInfo != null && networkInfo.isConnectedOrConnecting()) {\n return true;\n } else {\n return false;\n }\n }", "private boolean isOnline() {\n\t\tConnectivityManager cm = (ConnectivityManager) getApplicationContext()\n\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n\t\treturn cm.getActiveNetworkInfo() != null\n\t\t\t\t&& cm.getActiveNetworkInfo().isConnectedOrConnecting();\n\n\t}", "public boolean isOnline() {\n\n\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isOnline() {\n\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean isNetworkAvailable() {\n Context context = getApplicationContext();\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting();\n return isConnected;\n }", "public boolean isConnected() {\n ConnectivityManager manager = (ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo info = manager.getActiveNetworkInfo();\n if (info != null && info.isConnected()) {\n return true;\n } else {\n return false;\n }\n }", "private boolean isNetworkAvailable(Context context) {\n ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity != null) {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null) {\n for (int i = 0; i < info.length; i++) {\n Log.v(LOGTAG, String.valueOf(i));\n if (info[i].getState() == NetworkInfo.State.CONNECTED) {\n Log.v(LOGTAG, \"connected!\");\n return true;\n }\n }\n }\n }\n return false;\n }", "private boolean isNetWorkConnected()\n {\n boolean connectedOrNot = false;\n\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n if (activeNetwork != null)\n {\n if (activeNetwork.getType() == ConnectivityManager.TYPE_WIFI)\n {\n connectedOrNot = true;\n }\n\n else if (activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE)\n {\n connectedOrNot = true;\n }\n\n }\n\n else\n {\n connectedOrNot = false;\n }\n \n return connectedOrNot;\n }", "protected boolean isOnline() {\n\n ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n\n boolean isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n\n //check if the connection id wifi or mobile data\n boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;\n\n return isConnected;\n\n }", "private static boolean isConnectingToInternet() {\n ConnectivityManager connectivity = (ConnectivityManager) context\n .getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity != null) {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null)\n for (int i = 0; i < info.length; i++)\n if (info[i].getState() == NetworkInfo.State.CONNECTED) {\n // return connectivity.getActiveNetworkInfo() != null\n // && connectivity.getActiveNetworkInfo()\n // .isConnectedOrConnecting();\n return true;\n }\n }\n return false;\n }", "public static boolean isOnline() {\n ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkinfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkinfo != null && activeNetworkinfo.isConnected();\n }", "public static boolean isOnline(Context context) {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "public boolean probarInternet() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public boolean isNetworkAvailable() {\n ConnectivityManager connectivity = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivity == null) {\n return false;\n } else {\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null) {\n for (int i = 0; i < info.length; i++) {\n if (info[i].getState() == NetworkInfo.State.CONNECTED) {\n return true;\n }\n }\n }\n }\n return false;\n }", "public boolean hasInternetConnection(final Context context) {\n\t\tConnectivityManager conMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tif (conMgr.getActiveNetworkInfo() != null\n\t\t\t\t&& conMgr.getActiveNetworkInfo().isAvailable()\n\t\t\t\t&& conMgr.getActiveNetworkInfo().isConnected()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr =\n (ConnectivityManager) mActivity.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "public static boolean isInternetOn(Context context)\r\n {\r\n ConnectivityManager cm = (ConnectivityManager) context\r\n .getSystemService(Context.CONNECTIVITY_SERVICE);\r\n // test for connection\r\n if (cm.getActiveNetworkInfo() != null\r\n && cm.getActiveNetworkInfo().isAvailable()\r\n && cm.getActiveNetworkInfo().isConnected())\r\n {\r\n // No need to bother user when everything's ok :)\r\n Log.d(logVerifyNet, \"Internet is working\");\r\n return true;\r\n }\r\n else\r\n {\r\n Toast.makeText(context, \"No internet connection...\", Toast.LENGTH_LONG).show();\r\n Log.d(logVerifyNet, \"No internet connection...\");\r\n return false;\r\n }\r\n }", "private boolean isNetworkAvailable() {\r\n ConnectivityManager connectivityManager \r\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\r\n return activeNetworkInfo != null;\r\n }", "private boolean isDeviceOnline() {\r\n ConnectivityManager connMgr = (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\r\n return (networkInfo != null && networkInfo.isConnected());\r\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr = (ConnectivityManager) this.getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "public static boolean isInternetAvailable(Context c) {\n\n ConnectivityManager connectivity = (ConnectivityManager) c\n .getSystemService(Context.CONNECTIVITY_SERVICE);\n\n if (connectivity != null) {\n\n NetworkInfo[] info = connectivity.getAllNetworkInfo();\n if (info != null)\n for (int i = 0; i < info.length; i++)\n if (info[i].getState() == NetworkInfo.State.CONNECTED) {\n return true;\n }\n }\n\n return false;\n }", "public boolean isNetworkAvailable() {\n try {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n } catch (Exception e) {\n FirebaseCrash.report(new Exception(\"Error while trying to check network availability \" + e));\n return false;\n }\n }", "public static boolean isConnect() {\n try {\n if (!isConnectingToInternet()) {\n // Internet Connection is not present\n Toast.makeText(context, \"Please Check your connection\", Toast.LENGTH_LONG).show();\n return false;\n }\n } catch (Exception e) {\n\n }\n return true;\n }", "private boolean isNetworkAvailable() {\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "private boolean isDeviceOnline() {\n ConnectivityManager connMgr =\n (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "public boolean isOnline() {\n final ConnectivityManager conMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n if (conMgr.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTED\n || conMgr.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTED) {\n return true;\n } else {\n return false;\n }\n }", "public static boolean isInternetAvailable(Context context) {\n Log.d(TAG, \"isInternetAvailable\");\n ConnectivityManager mConMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n return mConMgr.getActiveNetworkInfo() != null\n && mConMgr.getActiveNetworkInfo().isAvailable()\n && mConMgr.getActiveNetworkInfo().isConnected();\n }", "private boolean haveNetworkConnection() {\n boolean haveConnectedWifi = false;\n boolean haveConnectedMobile = false;\n\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo[] netInfo = cm.getAllNetworkInfo();\n for (NetworkInfo ni : netInfo) {\n if (ni.getTypeName().equalsIgnoreCase(\"WIFI\"))\n if (ni.isConnected())\n haveConnectedWifi = true;\n if (ni.getTypeName().equalsIgnoreCase(\"MOBILE\"))\n if (ni.isConnected())\n haveConnectedMobile = true;\n }\n return haveConnectedWifi || haveConnectedMobile;\n }", "private boolean isNetworkAvailable()\n\t{\n\t\tNetworkInfo info = mConnectivityManager.getActiveNetworkInfo();\n\n\t\treturn info != null && info.isConnected();\n\t}", "private static boolean isNetworkAvailable(Context context) {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public boolean hasActiveInternetConnection()\n {\n Runtime runtime = Runtime.getRuntime();\n try {\n Process ipProcess = runtime.exec(\"/system/bin/ping -c 1 8.8.8.8\");\n int exitValue = ipProcess.waitFor();\n return (exitValue == 0);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return false;\n }", "private boolean networkIsAvailable() {\t\t\t\t\t\t\t\t\n\t\tConnectivityManager connectivityManager \t\t\t\t\t\t\t\t\n\t\t= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\t\t\t\t\t\t\t\t\n\t\tNetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\t\t\t\t\t\t\t\t\n\t\treturn activeNetworkInfo != null && activeNetworkInfo.isConnectedOrConnecting();\t\t\t\t\t\t\t\t\n\t}", "protected boolean NetworkAviable() {\n\t\t\tConnectivityManager cm =(ConnectivityManager)contextyeild.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\t NetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\t if (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t \t try{\n\t\t \t\t \n\t\t \t \t//new OnGetPondsdata().execute();\n\t\t \t }catch(Exception e){\n\t\t \t\t e.printStackTrace();\n\t\t \t }\n\t\t \t \t\n\t\t return true;\t\t \n\t\t }\n\t\t else{ \n\t\t \t\n\t\t \t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(contextyeild, \"No internet connection\", Toast.LENGTH_SHORT).show();\t\t\t\t\t\n\t\t }\n\t\t return false;\n\t\t\t}", "private boolean isNetworkStatusAvialable(Context applicationContext) {\n ConnectivityManager connectivityManager = (ConnectivityManager) getBaseContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivityManager != null) {\n NetworkInfo netInfos = connectivityManager.getActiveNetworkInfo();\n if (netInfos != null)\n if (netInfos.isConnected())\n\n return true;\n\n }\n\n return false;\n }", "private boolean haveNetworkConnection() {\n\t boolean haveConnectedWifi = false;\n\t boolean haveConnectedMobile = false;\n\n\t ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t NetworkInfo[] netCon = cm.getAllNetworkInfo();\n\t for (NetworkInfo nc : netCon) {\n\t if (nc.getTypeName().equalsIgnoreCase(\"WIFI\"))\n\t if (nc.isConnected())\n\t haveConnectedWifi = true;\n\t if (nc.getTypeName().equalsIgnoreCase(\"MOBILE\"))\n\t if (nc.isConnected())\n\t haveConnectedMobile = true;\n\t }\n\t return haveConnectedWifi || haveConnectedMobile;\n\t}", "private Boolean isConnected() {\r\n ConnectivityManager cm = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\r\n Boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting();\r\n return isConnected;\r\n }", "public boolean networkAvailable() {\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = cm.getActiveNetworkInfo();\n // if network is off, networkInfo will be null\n //otherwise check if we are connected\n if (networkInfo != null && networkInfo.isConnected()) {\n return true;\n }\n return false;\n }", "public boolean haveNetworkAccess() {\n ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n if (manager != null) {\n NetworkInfo connection = manager.getActiveNetworkInfo();\n if (connection != null && connection.isConnectedOrConnecting()) {\n return true;\n }\n }\n return false;\n }", "public Boolean isOnlineNet() {\n\n try {\n Process p = java.lang.Runtime.getRuntime().exec(\"ping -c 1 www.google.es\");\n\n int val = p.waitFor();\n boolean reachable = (val == 0);\n return reachable;\n\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return false;\n }", "public static boolean hasInternetConnectivity(Context applicationContext) {\n\t\tConnectivityManager connManager = (ConnectivityManager)applicationContext.\n\t\t\t\t getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo info = connManager.getActiveNetworkInfo();\n\t\tif(info != null) return info.isConnected();\n\t\telse return false;\n\t}" ]
[ "0.7987454", "0.7976686", "0.79602385", "0.794465", "0.7936885", "0.7916883", "0.7908568", "0.79010427", "0.78990567", "0.7884653", "0.7884653", "0.7882594", "0.7873065", "0.78454596", "0.78155077", "0.7814182", "0.7795741", "0.77219576", "0.77182984", "0.77122366", "0.76713306", "0.7656988", "0.76470226", "0.7631517", "0.7603351", "0.7599715", "0.75765395", "0.7573786", "0.7566359", "0.75647515", "0.7556912", "0.75552815", "0.7543333", "0.7539423", "0.75367737", "0.75296277", "0.75277334", "0.7514314", "0.75140905", "0.750938", "0.750938", "0.75054157", "0.7502699", "0.75001603", "0.74935603", "0.74919623", "0.74915767", "0.74650615", "0.74621683", "0.74616104", "0.7460664", "0.7458123", "0.7457807", "0.74539536", "0.7452986", "0.7450297", "0.74477947", "0.74477947", "0.7445269", "0.7444369", "0.74434114", "0.7439441", "0.7439267", "0.74360824", "0.7435982", "0.74185205", "0.74169904", "0.7409236", "0.7401851", "0.74016714", "0.7401079", "0.73965216", "0.7388647", "0.7388448", "0.738822", "0.73853606", "0.7379783", "0.7376291", "0.737449", "0.7368653", "0.73548055", "0.7347307", "0.7345387", "0.73328733", "0.733238", "0.7330767", "0.73272705", "0.73270285", "0.73240024", "0.73219687", "0.7318023", "0.73106307", "0.73090845", "0.73024106", "0.7299433", "0.72984844", "0.729678", "0.7281007", "0.7278327", "0.72769314", "0.7274352" ]
0.0
-1
This method will return a string that will suggest the type of network connected it would return Wifi or MobileData
public String getNetworkType(){ String networkType=null; ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo newNetworkInfo = connectivityManager.getActiveNetworkInfo(); if(newNetworkInfo.getType()== ConnectivityManager.TYPE_WIFI){ networkType=mContext.getResources() .getString(R.string.wifiString); } else if(newNetworkInfo.getType()== ConnectivityManager.TYPE_MOBILE){ networkType=mContext.getResources() .getString(R.string.mobiledataString); } return networkType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String getConnectivityType(Context context) {\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n int type = info.getType();\n int subType = info.getSubtype();\n\n if(type == ConnectivityManager.TYPE_WIFI)\n return \"WIFI\";\n else\n return mobileTypeToString.get(subType);\n }", "public String getNetwork() {\n initNetwork();\n NetworkInfo networkInfo =\n connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n if (networkInfo != null &&\n networkInfo.getState() == NetworkInfo.State.CONNECTED) {\n Logger.d(\"Current Network: WIFI\");\n return NETWORK_WIFI;\n } else {\n return getTelephonyNetworkType();\n }\n }", "public static String getConnetionType(Context context) {\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n int type = info.getType();\n int subType = info.getSubtype();\n\n\n\n if (type == ConnectivityManager.TYPE_WIFI) {\n return \"WIFI\";\n } else if (type == ConnectivityManager.TYPE_MOBILE) {\n switch (subType) {\n case TelephonyManager.NETWORK_TYPE_1xRTT:\n return \"1xRTT ()\"; // ~ 50-100 kbps\n case TelephonyManager.NETWORK_TYPE_CDMA:\n return \"CDMA\"; // ~ 14-64 kbps\n case TelephonyManager.NETWORK_TYPE_EDGE:\n return \"EDGE\"; // ~ 50-100 kbps\n case TelephonyManager.NETWORK_TYPE_EVDO_0:\n return \"EVDO 0\"; // ~ 400-1000 kbps\n case TelephonyManager.NETWORK_TYPE_EVDO_A:\n return \"EVDO A\"; // ~ 600-1400 kbps\n case TelephonyManager.NETWORK_TYPE_GPRS:\n return \"GPRS\"; // ~ 100 kbps\n case TelephonyManager.NETWORK_TYPE_HSDPA:\n return \"HSDPA\"; // ~ 2-14 Mbps\n case TelephonyManager.NETWORK_TYPE_HSPA:\n return \"HSPA\"; // ~ 700-1700 kbps\n case TelephonyManager.NETWORK_TYPE_HSUPA:\n return \"HSUPA\"; // ~ 1-23 Mbps\n case TelephonyManager.NETWORK_TYPE_UMTS:\n return \"UMTS\"; // ~ 400-7000 kbps\n /*\n * Above API level 7, make sure to set android:targetSdkVersion\n * to appropriate level to use these\n */\n case TelephonyManager.NETWORK_TYPE_EHRPD: // API level 11\n return \"EHRPD\"; // ~ 1-2 Mbps\n case TelephonyManager.NETWORK_TYPE_EVDO_B: // API level 9\n return \"EVDO B\"; // ~ 5 Mbps\n case TelephonyManager.NETWORK_TYPE_HSPAP: // API level 13\n return \"HSPAP\"; // ~ 10-20 Mbps\n case TelephonyManager.NETWORK_TYPE_IDEN: // API level 8\n return \"IDEN\"; // ~25 kbps\n case TelephonyManager.NETWORK_TYPE_LTE: // API level 11\n return \"LTE\"; // ~ 10+ Mbps\n // Unknown\n case TelephonyManager.NETWORK_TYPE_UNKNOWN:\n default:\n return \"unknown connection type\";\n }\n } else {\n return \"unknown connection type\";\n }\n }", "public static String getCurrentConnectionType(Context context) {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo info = cm.getActiveNetworkInfo();\n\n if (info == null || !info.isConnected()) return \"-\"; //not connected\n if (info.getType() == ConnectivityManager.TYPE_WIFI) return \"WIFI\";\n\n if (info.getType() == ConnectivityManager.TYPE_MOBILE) {\n int networkType = info.getSubtype();\n switch (networkType) {\n case TelephonyManager.NETWORK_TYPE_GPRS:\n case TelephonyManager.NETWORK_TYPE_EDGE:\n case TelephonyManager.NETWORK_TYPE_CDMA:\n case TelephonyManager.NETWORK_TYPE_1xRTT:\n case TelephonyManager.NETWORK_TYPE_IDEN: //api<8 : replace by 11\n return \"2G\";\n case TelephonyManager.NETWORK_TYPE_UMTS:\n case TelephonyManager.NETWORK_TYPE_EVDO_0:\n case TelephonyManager.NETWORK_TYPE_EVDO_A:\n case TelephonyManager.NETWORK_TYPE_HSDPA:\n case TelephonyManager.NETWORK_TYPE_HSUPA:\n case TelephonyManager.NETWORK_TYPE_HSPA:\n case TelephonyManager.NETWORK_TYPE_EVDO_B: //api<9 : replace by 14\n case TelephonyManager.NETWORK_TYPE_EHRPD: //api<11 : replace by 12\n case TelephonyManager.NETWORK_TYPE_HSPAP: //api<13 : replace by 15\n return \"3G\";\n case TelephonyManager.NETWORK_TYPE_LTE: //api<11 : replace by 13\n return \"4G\";\n default:\n return \"Unknown\";\n }\n }\n return \"Unknown\";\n }", "public static String getNetworkType(Context context) {\n\t\ttry {\n\t\t\treturn ((ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo().getTypeName();\n\t\t}\n\t\tcatch(Exception e) { return \"NotAvailable\"; }\n\t}", "public String getNetworkType() {\n // Whether EDGE, UMTS, etc...\n return SystemProperties.get(TelephonyProperties.PROPERTY_DATA_NETWORK_TYPE, \"Unknown\");\n }", "private String getTelephonyNetworkType() {\n assert NETWORK_TYPES[14].compareTo(\"EHRPD\") == 0;\n\n int networkType = telephonyManager.getNetworkType();\n if (networkType < NETWORK_TYPES.length) {\n return NETWORK_TYPES[telephonyManager.getNetworkType()];\n } else {\n return \"Unrecognized: \" + networkType;\n }\n }", "public static String getNetworkType(Context context) {\n try {\n TelephonyManager mTelephonyManager = (TelephonyManager)\n context.getSystemService(Context.TELEPHONY_SERVICE);\n int networkType = mTelephonyManager.getNetworkType();\n switch (networkType) {\n case TelephonyManager.NETWORK_TYPE_GPRS:\n case TelephonyManager.NETWORK_TYPE_EDGE:\n case TelephonyManager.NETWORK_TYPE_CDMA:\n case TelephonyManager.NETWORK_TYPE_1xRTT:\n case TelephonyManager.NETWORK_TYPE_IDEN:\n return \"2g\";\n case TelephonyManager.NETWORK_TYPE_UMTS:\n case TelephonyManager.NETWORK_TYPE_EVDO_0:\n case TelephonyManager.NETWORK_TYPE_EVDO_A:\n /**\n From this link https://en.wikipedia.org/wiki/Evolution-Data_Optimized ..NETWORK_TYPE_EVDO_0 & NETWORK_TYPE_EVDO_A\n EV-DO is an evolution of the CDMA2000 (IS-2000) standard that supports high data rates.\n\n Where CDMA2000 https://en.wikipedia.org/wiki/CDMA2000 .CDMA2000 is a family of 3G[1] mobile technology standards for sending voice,\n data, and signaling data between mobile phones and cell sites.\n */\n case TelephonyManager.NETWORK_TYPE_HSDPA:\n case TelephonyManager.NETWORK_TYPE_HSUPA:\n case TelephonyManager.NETWORK_TYPE_HSPA:\n case TelephonyManager.NETWORK_TYPE_EVDO_B:\n case TelephonyManager.NETWORK_TYPE_EHRPD:\n case TelephonyManager.NETWORK_TYPE_HSPAP:\n //Log.d(\"Type\", \"3g\");\n //For 3g HSDPA , HSPAP(HSPA+) are main networktype which are under 3g Network\n //But from other constants also it will 3g like HSPA,HSDPA etc which are in 3g case.\n //Some cases are added after testing(real) in device with 3g enable data\n //and speed also matters to decide 3g network type\n //https://en.wikipedia.org/wiki/4G#Data_rate_comparison\n return \"3g\";\n case TelephonyManager.NETWORK_TYPE_LTE:\n //No specification for the 4g but from wiki\n //I found(LTE (Long-Term Evolution, commonly marketed as 4G LTE))\n //https://en.wikipedia.org/wiki/LTE_(telecommunication)\n return \"4g\";\n default:\n return \"Unknown\";\n }\n } catch (Exception e) {\n e.printStackTrace();\n return \"Unknown\";\n }\n }", "public String getNetworkType(Context context) {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n assert cm != null;\n @SuppressLint(\"MissingPermission\") NetworkInfo info = cm.getActiveNetworkInfo();\n return info.getTypeName();\n }", "public String getIpConnectivity() {\n int v4Conn = checkIPCompatibility(\"ipv4\");\n int v6Conn = checkIPCompatibility(\"ipv6\");\n if (v4Conn == IP_TYPE_CONNECTIVITY && v6Conn == IP_TYPE_CONNECTIVITY)\n return IP_TYPE_IPV4_IPV6_BOTH;\n if (v4Conn == IP_TYPE_CONNECTIVITY && v6Conn != IP_TYPE_CONNECTIVITY)\n return IP_TYPE_IPV4_ONLY;\n if (v4Conn != IP_TYPE_CONNECTIVITY && v6Conn == IP_TYPE_CONNECTIVITY)\n return IP_TYPE_IPV6_ONLY;\n if (v4Conn == IP_TYPE_UNCONNECTIVITY && v6Conn == IP_TYPE_UNCONNECTIVITY)\n return IP_TYPE_NONE;\n return IP_TYPE_UNKNOWN;\n }", "private void checkConnectionType() {\n NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo();\n String message = \"\";\n\n if(activeNetwork != null) {\n // output message is assigned based on the detected connection type\n switch (activeNetwork.getType()) {\n case ConnectivityManager.TYPE_WIFI:\n message = \"WiFi is connected!\";\n break;\n case ConnectivityManager.TYPE_MOBILE:\n message = \"Mobile Network is connected!\";\n break;\n }\n } else {\n message = \"No connection detected!\";\n }\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "public static int getConnectedType(Context context) {\n if (context != null) {\n ConnectivityManager mConnectivityManager = (ConnectivityManager) context\n .getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo mNetworkInfo = mConnectivityManager.getActiveNetworkInfo();\n if (mNetworkInfo != null && mNetworkInfo.isAvailable()) {\n return mNetworkInfo.getType();\n }\n }\n return -1;\n }", "public String getNetworkType() {\n return this.mNetInfo.getTypeName();\n }", "public static String checkingNetworkSpeed(int type, int subType) {\n if (type == ConnectivityManager.TYPE_WIFI) {\n return \"WIFI\";\n } else if (type == ConnectivityManager.TYPE_MOBILE) {\n switch (subType) {\n case TelephonyManager.NETWORK_TYPE_1xRTT:\n return \"1xRTT\";\n case TelephonyManager.NETWORK_TYPE_CDMA:\n return \"CDMA\";\n case TelephonyManager.NETWORK_TYPE_EDGE:\n return \"EDGE\";\n case TelephonyManager.NETWORK_TYPE_EVDO_0:\n return \"EVDO_0\";\n case TelephonyManager.NETWORK_TYPE_EVDO_A:\n return \"EVDO_A\";\n case TelephonyManager.NETWORK_TYPE_GPRS:\n return \"GPRS (2.5G)\";\n case TelephonyManager.NETWORK_TYPE_HSDPA:\n return \"HSDPA(4G)\";\n case TelephonyManager.NETWORK_TYPE_HSPA:\n return \"HSPA (4G)\";\n case TelephonyManager.NETWORK_TYPE_HSUPA:\n return \"HSUPA (3G)\";\n case TelephonyManager.NETWORK_TYPE_UMTS:\n return \"UMTS (3G)\";\n\n // API level 7 not supported this type\n case NETWORK_TYPE_EHRPD:\n return \"EHRPD\";\n case NETWORK_TYPE_EVDO_B:\n return \"EVDO_B\";\n case NETWORK_TYPE_HSPAP:\n return \"HSPA+ (4G)\";\n case NETWORK_TYPE_IDEN:\n return \"IDEN\";\n case NETWORK_TYPE_LTE:\n return \"LTE (4G)\";\n // Unknown type\n case TelephonyManager.NETWORK_TYPE_UNKNOWN:\n return \"未知网络\";\n default:\n return \"\";\n }\n } else {\n return \"\";\n }\n }", "public String getType() {\n\t\t\n\t\tif(this instanceof Friend_Connection) {\n\t\t\treturn \"[FRIEND]\";\n\t\t\t\n\t\t}else if(this instanceof Couple_Connection){\n\t\t\treturn \"[COUPLE]\";\n\t\t\n\t\t}else if(this instanceof Parent_Connection) {\n\t\t\treturn \"[RELATIVE]\";\n\t\t\n\t\t}else if(this instanceof Colleagues_Connection) {\n\t\t\treturn \"[COLLEAGUE]\";\n\t\t\n\t\t}else if(this instanceof Classmates_Connection) {\n\t\t\treturn \"[CLASSMATE]\";\n\t\t}else {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t}", "private boolean isNetWorkConnected()\n {\n boolean connectedOrNot = false;\n\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n if (activeNetwork != null)\n {\n if (activeNetwork.getType() == ConnectivityManager.TYPE_WIFI)\n {\n connectedOrNot = true;\n }\n\n else if (activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE)\n {\n connectedOrNot = true;\n }\n\n }\n\n else\n {\n connectedOrNot = false;\n }\n \n return connectedOrNot;\n }", "public int g() {\n try {\n if (this.h == null) {\n this.h = (ConnectivityManager) this.b.getApplicationContext().getSystemService(\"connectivity\");\n }\n NetworkInfo activeNetworkInfo = this.h.getActiveNetworkInfo();\n if (activeNetworkInfo != null) {\n if (activeNetworkInfo.isConnected()) {\n return activeNetworkInfo.getType() == 1 ? 2 : 1;\n }\n }\n } catch (Exception unused) {\n }\n return 0;\n }", "public static String getConnectivityStatusString(Context context) {\r\n int conn = NetworkUtil.getConnectivityStatus(context);\r\n String status = null;\r\n if (conn == 1) {\r\n status = \"Connected\";\r\n } else if (conn == 2) {\r\n status = \"Connected\";\r\n } else if (conn == 0) {\r\n status = \"Not-Connected\";\r\n }\r\n return status;\r\n }", "public static String m587k(Context context) {\r\n try {\r\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(\"phone\");\r\n if (telephonyManager != null) {\r\n return String.valueOf(telephonyManager.getNetworkType());\r\n }\r\n } catch (Exception e) {\r\n }\r\n return null;\r\n }", "private String getProtocolName(final WifiConfiguration config) {\r\n\t\tfinal BitSet allowedKeyMng = config.allowedKeyManagement;\r\n\r\n\t\tif (allowedKeyMng.get(WifiConfiguration.KeyMgmt.WPA_PSK)) {\r\n\t\t\t// DIFFER WPA AND WPA2\r\n\t\t\tif (config.allowedProtocols.get(WifiConfiguration.Protocol.RSN)) {\r\n\t\t\t\treturn \"WPA2\";\r\n\t\t\t} else {\r\n\t\t\t\treturn \"WPA\";\r\n\t\t\t}\r\n\t\t} else if (allowedKeyMng.get(WifiConfiguration.KeyMgmt.WPA_EAP)\r\n\t\t\t\t|| allowedKeyMng.get(WifiConfiguration.KeyMgmt.IEEE8021X)) {\r\n\t\t\treturn \"WPA\";\r\n\t\t} else {\r\n\t\t\tif (config.wepKeys[0] != null) {\r\n\t\t\t\treturn \"WEP\";\r\n\t\t\t} else {\r\n\t\t\t\treturn \"NONE\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public String getWifiInfo() {\n\t\treturn (mWifiInfo == null) ? \"NULL\" : mWifiInfo.toString();\n\t}", "IsisNetworkType networkType();", "public void checkNetworks(){\n\t if(operatorName.contains(\"odafone\") || operatorName.contains(\"VODAFONE\")){\n\t \tcode = \"*100\" + encodedHash;\n\t \t//contact network provider\n\t \tcallUSSD(code);\n\t }\n\t //t-mobile - telekom\n\t else if(operatorName.contains(\"t-\") || operatorName.contains(\"T-\") || operatorName.contains(\"T Mobile\")\n\t \t\t || operatorName.contains(\"elekom\") || operatorName.contains(\"TELEKOM\")){\n\t \tcode = \"*100\" + encodedHash;\n\t \t//contact network provider\n\t \tcallUSSD(code);\n\t }\n\t //e-plus\n\t else if(operatorName.contains(\"plus\") || operatorName.contains(\"Plus\") || operatorName.contains(\"PLUS\")){\n\t \tcode = \"*100\" + encodedHash;\n\t \t//contact network provider\n\t \tcallUSSD(code);\n\t }\n\t //o2\n\t else if(operatorName.contains(\"o2\") || operatorName.contains(\"O2\")){\n\t \tcode = \"*101\" + encodedHash;\n\t \t//contact network provider\n\t \tcallUSSD(code);\n\t }\n\t \n\t else{\n\t \t//if network is not supported\t\n\t \tdiyUssd();\n\t }\n\t }", "public static int getConnectionStatus(Context context) {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n if (activeNetwork != null) {\n if (activeNetwork.getType() == ConnectivityManager.TYPE_WIFI)\n return WIFI;\n if (activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE)\n return MOBILE;\n }\n return NOT_CONNECTED;\n }", "@Override\n protected String getConnectionTypes() {\n // <connection type>:<connection number>,...\n return String.format(\"%s:1,%s:*\", FEDERATED_NETWORK, ORIGINAL_NETWORK);\n }", "public static boolean isNetConnected(Context context){\n\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n //This for Wifi.\n NetworkInfo wifiNetwork = cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n if (wifiNetwork != null && wifiNetwork.isConnected())\n return true;\n\n //This for Mobile Network.\n NetworkInfo mobileNetwork = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);\n if (mobileNetwork != null && mobileNetwork.isConnected())\n return true;\n\n //This for Return true else false for Current status.\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n if (activeNetwork != null && activeNetwork.isConnected())\n return true;\n\n return false;\n }", "public String getWifiName(Context context) {\n WifiManager manager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\n if (manager.isWifiEnabled()) {\n WifiInfo wifiInfo = manager.getConnectionInfo();\n if (wifiInfo != null) {\n NetworkInfo.DetailedState state = WifiInfo.getDetailedStateOf(wifiInfo.getSupplicantState());\n if (state == NetworkInfo.DetailedState.CONNECTED || state == NetworkInfo.DetailedState.OBTAINING_IPADDR) {\n return wifiInfo.getSSID();\n }\n }\n }\n return null;\n }", "private static boolean isConnected(Context context, int networkType) {\n\t\tNetworkInfo networkInfo = null;\n\t\tif (connectivityManager != null) {\n\t\t\tnetworkInfo = connectivityManager.getNetworkInfo(networkType);\n\t\t}\n\t\treturn networkInfo == null ? false : networkInfo.isConnected();\n\t}", "public static NetworkInfo getNetworkInfo(Context context){\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n return cm.getActiveNetworkInfo();\n }", "public static NetworkInfo getNetworkInfo(Context context){\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n return cm.getActiveNetworkInfo();\n }", "@Override\n\tpublic String getNetworkType()\n\t{\n\t\treturn DeviceNetworkType.UEI;\n\t}", "private boolean haveNetworkConnection() {\n boolean haveConnectedWifi = false;\n boolean haveConnectedMobile = false;\n\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo[] netInfo = cm.getAllNetworkInfo();\n for (NetworkInfo ni : netInfo) {\n if (ni.getTypeName().equalsIgnoreCase(\"WIFI\"))\n if (ni.isConnected())\n haveConnectedWifi = true;\n if (ni.getTypeName().equalsIgnoreCase(\"MOBILE\"))\n if (ni.isConnected())\n haveConnectedMobile = true;\n }\n return haveConnectedWifi || haveConnectedMobile;\n }", "@ApiModelProperty(example = \"WLAN\", value = \"WLAN / LAN / ...\")\n public String getConnectionType() {\n return connectionType;\n }", "public boolean WifiAvaible() {\n boolean Wifi = false;\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo[] netInfo = cm.getAllNetworkInfo();\n for (NetworkInfo NI : netInfo) {\n if (NI.getTypeName().equalsIgnoreCase(\"WIFI\")){\n if (NI.isConnected()){\n Wifi = true;\n }\n }\n }\n return Wifi;\n }", "private boolean haveNetworkConnection() {\n boolean haveConnectedWifi = false;\n boolean haveConnectedMobile = false;\n\n ConnectivityManager cm = (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo[] netInfo = cm.getAllNetworkInfo();\n for (NetworkInfo ni : netInfo) {\n if (ni.getTypeName().equalsIgnoreCase(\"WIFI\"))\n if (ni.isConnected())\n haveConnectedWifi = true;\n if (ni.getTypeName().equalsIgnoreCase(\"MOBILE\"))\n if (ni.isConnected())\n haveConnectedMobile = true;\n }\n return haveConnectedWifi || haveConnectedMobile;\n }", "public static boolean isConnectionFast(int type, int subType){\n if(type==ConnectivityManager.TYPE_WIFI){\n \tSystem.out.println(\"WIFI\");\n \t\n return true;\n }else if(type==ConnectivityManager.TYPE_MOBILE){\n \t\n \tSystem.out.println(\"mobile\");\n \t\n switch(subType){\n case TelephonyManager.NETWORK_TYPE_1xRTT:\n return false; // ~ 50-100 kbps\n case TelephonyManager.NETWORK_TYPE_CDMA:\n return false; // ~ 14-64 kbps\n case TelephonyManager.NETWORK_TYPE_EDGE:\n return false; // ~ 50-100 kbps\n case TelephonyManager.NETWORK_TYPE_EVDO_0:\n return true; // ~ 400-1000 kbps\n case TelephonyManager.NETWORK_TYPE_EVDO_A:\n return true; // ~ 600-1400 kbps\n case TelephonyManager.NETWORK_TYPE_GPRS:\n \tSystem.out.println(\"GPRS\");\n return false; // ~ 100 kbps\n case TelephonyManager.NETWORK_TYPE_HSDPA:\n return true; // ~ 2-14 Mbps\n case TelephonyManager.NETWORK_TYPE_HSPA:\n return true; // ~ 700-1700 kbps\n case TelephonyManager.NETWORK_TYPE_HSUPA:\n return true; // ~ 1-23 Mbps\n case TelephonyManager.NETWORK_TYPE_UMTS:\n \tSystem.out.println(\"UMTS\");\n return true; // ~ 400-7000 kbps\n /*\n * Above API level 7, make sure to set android:targetSdkVersion \n * to appropriate level to use these\n */\n case TelephonyManager.NETWORK_TYPE_EHRPD: // API level 11 \n return true; // ~ 1-2 Mbps\n case TelephonyManager.NETWORK_TYPE_EVDO_B: // API level 9\n return true; // ~ 5 Mbps\n case TelephonyManager.NETWORK_TYPE_HSPAP: // API level 13\n return true; // ~ 10-20 Mbps\n case TelephonyManager.NETWORK_TYPE_IDEN: // API level 8\n return false; // ~25 kbps \n case TelephonyManager.NETWORK_TYPE_LTE: // API level 11\n return true; // ~ 10+ Mbps\n // Unknown\n case TelephonyManager.NETWORK_TYPE_UNKNOWN:\n default:\n return false;\n }\n }else{\n return false;\n }\n }", "public String getNetwork() {\n String[] ipOctets = ipAddress.split(\"\\\\.\");\n String[] subnetOctets = subnetMask.split(\"\\\\.\");\n String[] result = ipOctets;\n\n for (int i = 0; i < 4; i++) {\n if (!\"255\".equals(subnetOctets[i])) {\n int sub = Integer.parseInt(subnetOctets[i]);\n int ip = Integer.parseInt(ipOctets[i]);\n result[i] = String.format(\"%s\", (ip & sub));\n }\n }\n\n return String.join(\".\", result);\n }", "public String getAdNetworkType2() {\r\n return adNetworkType2;\r\n }", "public String getAdNetworkType1() {\r\n return adNetworkType1;\r\n }", "public static int getConnectivityStatus(Context context) {\r\n ConnectivityManager cm = (ConnectivityManager) context\r\n .getSystemService(Context.CONNECTIVITY_SERVICE);\r\n\r\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\r\n if (null != activeNetwork) {\r\n if (activeNetwork.getType() == ConnectivityManager.TYPE_WIFI)\r\n return 1;\r\n\r\n if (activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE)\r\n return 2;\r\n }\r\n return 0;\r\n }", "private String getWifiCarrierName() {\n WifiManager wifiManager =\n (WifiManager) context.getSystemService(Context.WIFI_SERVICE);\n WifiInfo wifiInfo = wifiManager.getConnectionInfo();\n if (wifiInfo != null) {\n return wifiInfo.getSSID();\n }\n return null;\n }", "private boolean haveNetworkConnection() {\n\t boolean haveConnectedWifi = false;\n\t boolean haveConnectedMobile = false;\n\n\t ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t NetworkInfo[] netCon = cm.getAllNetworkInfo();\n\t for (NetworkInfo nc : netCon) {\n\t if (nc.getTypeName().equalsIgnoreCase(\"WIFI\"))\n\t if (nc.isConnected())\n\t haveConnectedWifi = true;\n\t if (nc.getTypeName().equalsIgnoreCase(\"MOBILE\"))\n\t if (nc.isConnected())\n\t haveConnectedMobile = true;\n\t }\n\t return haveConnectedWifi || haveConnectedMobile;\n\t}", "@SuppressLint(\"MissingPermission\")\n private NetworkInfo getActiveNetworkInfo(){\n ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n return connectivityManager == null ? null : connectivityManager.getActiveNetworkInfo();\n }", "private boolean ifNet() {\n \t\t\n \t\tConnectivityManager connectivity = (ConnectivityManager) this\n \t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n \t\tif (connectivity != null) {\n \t\t\tNetworkInfo[] info = connectivity.getAllNetworkInfo();\n \t\t\tif (info != null)\n \t\t\t\tfor (int i = 0; i < info.length; i++)\n \t\t\t\t\tif (info[i].getState() == NetworkInfo.State.CONNECTED) {\n \t\t\t\t\t\treturn true;\n \t\t\t\t\t}\n\n \t\t}\n \t\treturn false;\n \t}", "public static boolean isConnected(Context context, int netWorkType) {\n\t\ttry {\n\t\t\tConnectivityManager connManager = (ConnectivityManager) context\n\t\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\tNetworkInfo info = connManager.getNetworkInfo(netWorkType);\n\t\t\treturn info != null && info.isConnected();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public static int m21418u(Context context) {\n ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(\"connectivity\");\n if (connectivityManager == null) {\n return 0;\n }\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n if (activeNetworkInfo != null && activeNetworkInfo.isAvailable()) {\n NetworkInfo networkInfo = connectivityManager.getNetworkInfo(1);\n if (networkInfo != null) {\n State state = networkInfo.getState();\n if (state != null && (state == State.CONNECTED || state == State.CONNECTING)) {\n return 1;\n }\n }\n NetworkInfo networkInfo2 = connectivityManager.getNetworkInfo(0);\n if (networkInfo2 != null) {\n State state2 = networkInfo2.getState();\n String subtypeName = networkInfo2.getSubtypeName();\n if (state2 != null && (state2 == State.CONNECTED || state2 == State.CONNECTING)) {\n switch (activeNetworkInfo.getSubtype()) {\n case 1:\n case 2:\n case 4:\n case 7:\n case 11:\n return 2;\n case 3:\n case 5:\n case 6:\n case 8:\n case 9:\n case 10:\n case 12:\n case 14:\n case 15:\n return 3;\n case 13:\n return 4;\n default:\n return (subtypeName.equalsIgnoreCase(\"TD-SCDMA\") || subtypeName.equalsIgnoreCase(\"WCDMA\") || subtypeName.equalsIgnoreCase(\"CDMA2000\")) ? 3 : 5;\n }\n }\n }\n }\n return 0;\n }", "@Override\n\tprotected ConnectionType getConnectionType() {\n\t\treturn ConnectionType.Network;\n\t}", "public String getProtocolAsString()\n\t{\n\t\tswitch (m_iProtocolType)\n\t\t{\n\t\t\tcase PROTOCOL_TYPE_RAW_TCP:\n\t\t\t\treturn PROTOCOL_STR_TYPE_RAW_TCP;\n\t\t\tcase PROTOCOL_TYPE_SOCKS:\n\t\t\t\treturn PROTOCOL_STR_TYPE_SOCKS;\n\t\t\tcase PROTOCOL_TYPE_HTTPS:\n\t\t\t\treturn PROTOCOL_STR_TYPE_HTTPS;\n\t\t\tcase PROTOCOL_TYPE_HTTP:\n\t\t\t\treturn PROTOCOL_STR_TYPE_HTTP;\n\t\t\tcase PROTOCOL_TYPE_RAW_UNIX:\n\t\t\t\treturn PROTOCOL_STR_TYPE_RAW_UNIX;\n\t\t\tdefault:\n\t\t\t\treturn PROTOCOL_STR_TYPE_UNKNOWN;\n\t\t}\n\t}", "public String getWifiName() {\n return wifiName;\n }", "public interface NetworkType {\n\n /**\n * Vehicletypes in the order they are send in info packets.\n */\n public enum NetworkVehicleType {\n NETWORK_VEH_TRAIN,\n NETWORK_VEH_LORRY,\n NETWORK_VEH_BUS,\n NETWORK_VEH_PLANE,\n NETWORK_VEH_SHIP,\n NETWORK_VEH_END;\n\n public static int length() {\n return Arrays\n .asList(NetworkVehicleType.values())\n .indexOf(NetworkVehicleType.NETWORK_VEH_END);\n }\n };\n\n public enum DestType {\n DESTTYPE_BROADCAST, // /< Send message/notice to all clients (All)\n DESTTYPE_TEAM, // /< Send message/notice to everyone playing the same company (Team)\n DESTTYPE_CLIENT, // /< Send message/notice to only a certain client (Private)\n };\n\n /**\n * Actions that can be used for NetworkTextMessage\n */\n public enum NetworkAction {\n NETWORK_ACTION_JOIN,\n NETWORK_ACTION_LEAVE,\n NETWORK_ACTION_SERVER_MESSAGE,\n NETWORK_ACTION_CHAT,\n NETWORK_ACTION_CHAT_COMPANY,\n NETWORK_ACTION_CHAT_CLIENT,\n NETWORK_ACTION_GIVE_MONEY,\n NETWORK_ACTION_NAME_CHANGE,\n NETWORK_ACTION_COMPANY_SPECTATOR,\n NETWORK_ACTION_COMPANY_JOIN,\n NETWORK_ACTION_COMPANY_NEW,\n NETWORK_ACTION_KICKED,\n NETWORK_ACTION_EXTERNAL_CHAT,\n };\n\n public enum NetworkErrorCode {\n NETWORK_ERROR_GENERAL, // Try to use this one like never\n\n /* Signals from clients */\n NETWORK_ERROR_DESYNC,\n NETWORK_ERROR_SAVEGAME_FAILED,\n NETWORK_ERROR_CONNECTION_LOST,\n NETWORK_ERROR_ILLEGAL_PACKET,\n NETWORK_ERROR_NEWGRF_MISMATCH,\n /* Signals from servers */\n NETWORK_ERROR_NOT_AUTHORIZED,\n NETWORK_ERROR_NOT_EXPECTED,\n NETWORK_ERROR_WRONG_REVISION,\n NETWORK_ERROR_NAME_IN_USE,\n NETWORK_ERROR_WRONG_PASSWORD,\n NETWORK_ERROR_COMPANY_MISMATCH, // Happens in CLIENT_COMMAND\n NETWORK_ERROR_KICKED,\n NETWORK_ERROR_CHEATER,\n NETWORK_ERROR_FULL,\n NETWORK_ERROR_TOO_MANY_COMMANDS,\n NETWORK_ERROR_TIMEOUT_PASSWORD,\n NETWORK_ERROR_TIMEOUT_COMPUTER,\n NETWORK_ERROR_TIMEOUT_MAP,\n NETWORK_ERROR_TIMEOUT_JOIN,\n NETWORK_ERROR_INVALID_CLIENT_NAME,\n NETWORK_ERROR_END;\n\n public static NetworkErrorCode valueOf(int order) {\n for (NetworkErrorCode value : values()) {\n if (value.ordinal() == order) {\n return value;\n }\n }\n return null;\n }\n };\n\n}", "@Override\n\tprotected void onNetworkConnected(NetType type) {\n\n\t}", "public static String getNetMac() {\n\t\tif (!mInitialized) Log.v(\"OpenIp\", \"Initialisation isn't done\");\n\t\treturn netMac;\n\t}", "public final String getDeviceType(){\n return TYPE;\n }", "public static String getDeviceType(Context c) {\r\n\t\tUiModeManager uiModeManager = (UiModeManager) c.getSystemService(Context.UI_MODE_SERVICE);\r\n\t\tint modeType = uiModeManager.getCurrentModeType();\r\n\t\tswitch (modeType){\r\n\t\t\tcase Configuration.UI_MODE_TYPE_TELEVISION:\r\n\t\t\t\treturn \"TELEVISION\";\r\n\t\t\tcase Configuration.UI_MODE_TYPE_WATCH:\r\n\t\t\t\treturn \"WATCH\";\r\n\t\t\tcase Configuration.UI_MODE_TYPE_NORMAL:\r\n\t\t\t\tString type = isTablet(c) ? \"TABLET\" : \"PHONE\";\r\n\t\t\t\treturn type;\r\n\t\t\tcase Configuration.UI_MODE_TYPE_UNDEFINED:\r\n\t\t\t\treturn \"UNKOWN\";\r\n\t\t\tdefault:\r\n\t\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public String deviceType(){\n String deviceType;\n size = driver.manage().window().getSize();\n if((size.getHeight()>800)&&(size.getWidth()>500)){\n return deviceType = \"iPad\";\n } else {\n return deviceType = \"iPhone\";\n }\n }", "public static boolean isConnectedWifi(Context context){\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_WIFI);\n }", "public static boolean isConnectedWifi(Context context){\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_WIFI);\n }", "private void wifiName() {\n\t\tSystem.out.println(\"The wifi name is Redmi\");\n\t}", "private String getClientIP(){\n try {\n ConnectivityManager connManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);\n @SuppressWarnings(\"deprecation\")\n NetworkInfo wifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n @SuppressWarnings(\"deprecation\")\n NetworkInfo mobile = connManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);\n\n if (wifi.isConnected()) {\n // If Wi-Fi connected\n return getWifiIP();\n }\n\n if (mobile.isConnected()) {\n // If Internet connected\n return getMobileIP();\n }\n\n return null;\n }catch(SecurityException e){\n return null;\n }\n }", "@SuppressWarnings(\"unused\")\n\tprivate String getControlDeviceinfo(int controlType) {\n\t\tString data = null;\n\t\tswitch (controlType) {\n\t\tcase 0:\n\t\t\tdata = \"重启设备\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 1:\n\t\t\tdata = \"清除日志\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 2:\n\t\t\tdata = \"关机\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 3:\n\t\t\tdata = \"恢复记录日志\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 4:\n\t\t\tdata = \"停止记录日志\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 5:\n\t\t\tdata = \"恢复出厂\";\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tdata = \"未定义类型:\" +Integer.toString(controlType);\n\t\t\tbreak;\n\t\t}\n\t\treturn data;\n\t}", "public void showNetworkStatus(com.miui.networkassistant.netdiagnose.NetworkDiagnosticsUtils.NetworkState r3) {\n /*\n r2 = this;\n int[] r0 = com.miui.networkassistant.ui.activity.NetworkDiagnosticsActivity.AnonymousClass8.$SwitchMap$com$miui$networkassistant$netdiagnose$NetworkDiagnosticsUtils$NetworkState\n int r3 = r3.ordinal()\n r3 = r0[r3]\n r0 = 1\n r1 = 2131758456(0x7f100d78, float:1.9147877E38)\n if (r3 == r0) goto L_0x0027\n r0 = 2\n if (r3 == r0) goto L_0x0015\n r0 = 3\n if (r3 == r0) goto L_0x0015\n goto L_0x0047\n L_0x0015:\n r2.lastStr = r1\n L_0x0017:\n android.widget.TextView r3 = r2.mTvCurrentActiveNetworkType\n android.content.res.Resources r0 = r2.getResources()\n int r1 = r2.lastStr\n java.lang.String r0 = r0.getString(r1)\n r3.setText(r0)\n goto L_0x0047\n L_0x0027:\n boolean r3 = b.b.c.h.f.i(r2)\n if (r3 == 0) goto L_0x0033\n r3 = 2131755812(0x7f100324, float:1.9142514E38)\n L_0x0030:\n r2.lastStr = r3\n goto L_0x0017\n L_0x0033:\n boolean r3 = b.b.c.h.f.l(r2)\n if (r3 == 0) goto L_0x003d\n r3 = 2131755814(0x7f100326, float:1.9142518E38)\n goto L_0x0030\n L_0x003d:\n boolean r3 = b.b.c.h.f.h(r2)\n if (r3 == 0) goto L_0x0015\n r3 = 2131755813(0x7f100325, float:1.9142516E38)\n goto L_0x0030\n L_0x0047:\n android.widget.TextView r3 = r2.mTvCurrentActiveNetworkType\n r0 = 0\n r3.setVisibility(r0)\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.miui.networkassistant.ui.activity.NetworkDiagnosticsActivity.showNetworkStatus(com.miui.networkassistant.netdiagnose.NetworkDiagnosticsUtils$NetworkState):void\");\n }", "public String findMyConnection(BufferedReader lines) throws IOException{\n\t\tList<List<String>> cnCentral = new ArrayList<>();\n\t\tList<String> cnTypes = new ArrayList<>();\n\t\tcnTypes.add(\"Ethernet\");\n\t\tcnTypes.add(\"Wireless\");\n\t\tString connectionname = \"\";\n\t\tString s = null;\n\t\tList<String> cnInfo = new ArrayList<>();\n\t\twhile ((s = lines.readLine()) != null) {\n\t\t\tif(cnTypes.contains(s.split(\" \")[0])) {\n\t\t\t\tcnCentral.add(cnInfo);\n\t\t\t\tcnInfo= new ArrayList<>();\n\t\t\t}\n\t\t\tfor(String word : s.split(\" \")) {\n\t\t\t\tcnInfo.add(word);\n\t\t\t}\n\t\t}\n\t\tcnCentral.add(cnInfo);\n\t\tfor(List<String> networkInfo: cnCentral) {\n\t\t\tif(networkInfo.contains(\"disconnected\") || networkInfo.contains(\"Local\") || networkInfo.contains(\"Configuration\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfor(String word : networkInfo) {\n\t\t\t\tif(word.equals(\"adapter\")) {\n\t\t\t\t\tconnectionname = networkInfo.get(networkInfo.indexOf(word)+1);\n\t\t\t\t\tif(connectionname.contains(\":\")) {\n\t\t\t\t\t\tconnectionname = connectionname.substring(0, connectionname.length()-1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tconnectionname = connectionname + \" \" + networkInfo.get(networkInfo.indexOf(word)+2).substring(0, \n\t\t\t\t\t\t\t\tnetworkInfo.get(networkInfo.indexOf(word)+2).length()-1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\\\"\"+connectionname + \"\\\"\";\n\n}", "public boolean isNetworkAvailable() {\n boolean haveConnectedWifi = false;\n boolean haveConnectedMobile = false;\n\n ConnectivityManager cm = (ConnectivityManager) getActivity().getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo[] netInfo = cm.getAllNetworkInfo();\n for (NetworkInfo ni : netInfo) {\n if (ni.getTypeName().equalsIgnoreCase(\"WIFI\"))\n if (ni.isConnected())\n haveConnectedWifi = true;\n if (ni.getTypeName().equalsIgnoreCase(\"MOBILE\"))\n if (ni.isConnected())\n haveConnectedMobile = true;\n }\n return haveConnectedWifi || haveConnectedMobile;\n }", "public boolean isNetworkAvailable() {\n boolean haveConnectedWifi = false;\n boolean haveConnectedMobile = false;\n\n ConnectivityManager cm = (ConnectivityManager) getActivity().getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo[] netInfo = cm.getAllNetworkInfo();\n for (NetworkInfo ni : netInfo) {\n if (ni.getTypeName().equalsIgnoreCase(\"WIFI\"))\n if (ni.isConnected())\n haveConnectedWifi = true;\n if (ni.getTypeName().equalsIgnoreCase(\"MOBILE\"))\n if (ni.isConnected())\n haveConnectedMobile = true;\n }\n return haveConnectedWifi || haveConnectedMobile;\n }", "private String[] getNetworkInformation(Context context)\n {\n String[] output = new String[4];\n\n WifiManager wifiMgr = (WifiManager) getSystemService(Context.WIFI_SERVICE);\n WifiInfo wifiInfo = wifiMgr.getConnectionInfo();\n int ip = wifiInfo.getIpAddress();\n String ipAddress = Formatter.formatIpAddress(ip);\n output[0] = ipAddress;\n // Get DNS Server\n final DhcpInfo dhcp = wifiMgr.getDhcpInfo();\n output[1] = Formatter.formatIpAddress(dhcp.netmask);\n output[2] = Formatter.formatIpAddress(dhcp.gateway);\n output[3] = Formatter.formatIpAddress(dhcp.dns1);\n return output;\n }", "public String getDnResolvability() {\n int v4Resv = checkDomainNameResolvable(\"ipv4\");\n int v6Resv = checkDomainNameResolvable(\"ipv6\");\n if (v4Resv == DN_RESOLVABLE && v6Resv == DN_RESOLVABLE)\n return IP_TYPE_IPV4_IPV6_BOTH;\n if (v4Resv == DN_RESOLVABLE && v6Resv != DN_RESOLVABLE)\n return IP_TYPE_IPV4_ONLY;\n if (v4Resv != DN_RESOLVABLE && v6Resv == DN_RESOLVABLE)\n return IP_TYPE_IPV6_ONLY;\n if (v4Resv == DN_UNRESOLVABLE && v6Resv == DN_UNRESOLVABLE)\n return IP_TYPE_NONE;\n return IP_TYPE_UNKNOWN;\n }", "public String getNetworkName() {\n return Phone.FEATURE_ENABLE_RCSE;\n }", "@TargetApi(Build.VERSION_CODES.M)\n @SuppressLint(\"MissingPermission\")\n private boolean isConnectedThroughWifi_Q() {\n //Get ConnectivityManager.\n ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n //Check WIFI capability in currently active network.\n if (connectivityManager != null) {\n Network activeNetwork = connectivityManager.getActiveNetwork();\n if (activeNetwork == null) { //No default network is currently active.\n return false;\n }\n\n NetworkCapabilities networkCapabilities = connectivityManager.getNetworkCapabilities(activeNetwork);\n if (networkCapabilities != null && isConnectionValidated(networkCapabilities) && isWifiTypeConnection(networkCapabilities)) {\n return true;\n }\n }\n\n return false;\n }", "public PhoneWifiInfo getConnectedWifi() {\n\t\tWifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\t\tList<WifiConfiguration> configurations = wifiManager\n\t\t\t\t.getConfiguredNetworks();\n\t\tif (wifiInfo == null || configurations == null) {\n\t\t\treturn null;\n\t\t}\n\t\tWifiConfiguration matched = null;\n\t\tfor (WifiConfiguration item : configurations) {\n\t\t\tif (item.SSID.equals(wifiInfo.getSSID())) {\n\t\t\t\tmatched = item;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (matched == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn new WifiInfoWrapper(wifiInfo, matched);\n\t}", "public static String getNetworkManagerName() {\n \t\treturn getNetworkManagerClass().getSimpleName();\n \t}", "private boolean isConnectedViaWifi() {\n ConnectivityManager connectivityManager =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\n if (connectivityManager != null) {\n NetworkInfo netInfo = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n return netInfo != null && netInfo.isConnected();\n } else {\n return false;\n }\n }", "private void updateConnectedFlags() {\n ConnectivityManager connMgr =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeInfo = connMgr.getActiveNetworkInfo();\n if (activeInfo != null && activeInfo.isConnected()) {\n wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI;\n mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE;\n } else {\n wifiConnected = false;\n mobileConnected = false;\n }\n wifiConnected = true;\n mobileConnected = true;\n System.out.println(\"Change 3\");\n }", "String getInterfacesAsString() {\n List<NetworkInterface> interfaces;\n try {\n interfaces = Collections.list(NetworkInterface.getNetworkInterfaces());\n } catch (Exception e) {\n return \"\";\n }\n\n StringBuilder sb = new StringBuilder(\"\");\n for (NetworkInterface nif : interfaces) {\n try {\n // Android doesn't have a supportsBroadcast() but the Go net.Interface wants\n // one, so we say the interface has broadcast if it has multicast.\n sb.append(String.format(java.util.Locale.ROOT, \"%s %d %d %b %b %b %b %b |\", nif.getName(),\n nif.getIndex(), nif.getMTU(), nif.isUp(), nif.supportsMulticast(),\n nif.isLoopback(), nif.isPointToPoint(), nif.supportsMulticast()));\n\n for (InterfaceAddress ia : nif.getInterfaceAddresses()) {\n // InterfaceAddress == hostname + \"/\" + IP\n String[] parts = ia.toString().split(\"/\", 0);\n if (parts.length > 1) {\n sb.append(String.format(java.util.Locale.ROOT, \"%s/%d \", parts[1], ia.getNetworkPrefixLength()));\n }\n }\n } catch (Exception e) {\n // TODO(dgentry) should log the exception not silently suppress it.\n continue;\n }\n sb.append(\"\\n\");\n }\n\n return sb.toString();\n }", "public boolean checkNetWork(Activity aActivity){\n switch (NetworkUtil.getConnectivityStatus(aActivity)) {\n case OFFLINE:\n MessageUtility.showToast(aActivity,\"No Internet Connection\");\n return false;\n case WIFI_CONNECTED_WITHOUT_INTERNET:\n MessageUtility.showToast(aActivity,\"No Internet Connection\");\n return false;\n case MOBILE_DATA_CONNECTED:\n case WIFI_CONNECTED_WITH_INTERNET:\n return true;\n case UNKNOWN:\n MessageUtility.showToast(aActivity,\"No Internet Connection\");\n return false;\n default:\n return false;\n }\n }", "private boolean isWificonnected(){\n\t\tConnectivityManager connMgr\n\t\t= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo networkInfo\n\t\t= connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI); \n\t\tboolean isWifiConn = networkInfo.isConnected();\n\t\treturn isWifiConn;\n\t}", "public String getWlanMacAddress() {\n WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);\n WifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\n String macAddress = wifiInfo == null ? null : wifiInfo.getMacAddress();\n return !TextUtils.isEmpty(macAddress) ? macAddress : \"Unavailable\";\n }", "private void checkConnectivity() {\n ConnectivityManager conMan = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo.State mobile = conMan.getNetworkInfo(0).getState();\n NetworkInfo.State wifi = conMan.getNetworkInfo(1).getState();\n if (!(mobile == NetworkInfo.State.CONNECTED || wifi == NetworkInfo.State.CONNECTED)) {\n Toast.makeText(context, R.string.data_error_message, Toast.LENGTH_LONG).show();\n }\n }", "public String getDataState() {\n int state = mTelephonyManager.getDataState();\n String display = \"unknown\";\n\n switch (state) {\n case TelephonyManager.DATA_CONNECTED:\n display = \"Connected\";\n break;\n case TelephonyManager.DATA_SUSPENDED:\n display = \"Suspended\";\n break;\n case TelephonyManager.DATA_CONNECTING:\n display = \"Connecting\";\n break;\n case TelephonyManager.DATA_DISCONNECTED:\n display = \"Disconnected\";\n break;\n }\n\n return display;\n }", "private RouterKind getRouterKind(String bssid) {\n if (bssid.matches(\"(64:68:0C:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(00:1D:20:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(00:1B:20:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(38:72:C0:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(00:23:F8:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(30:39:F2:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(8C:0C:A3:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(5C:33:8E:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(C8:6C:87:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(D0:AE:EC:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(00:19:15:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND;\n } else if (bssid.matches(\"(00:1A:2B:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.COM_KIND_1A2B;\n } else if (bssid.matches(\"(00:1F:A4:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.ZYX_KIND;\n } else if (bssid.matches(\"(F4:3E:61:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.ZYX_KIND;\n } else if (bssid.matches(\"(40:4A:03:[0-9A-Fa-f:]{8})\")) {\n return RouterKind.ZYX_KIND;\n }\n return RouterKind.UNK_KIND;\n }", "private String getWifiIPAddress() {\n\t\tWifiManager wifiManager = (WifiManager) this.getSystemService(this.WIFI_SERVICE);\n\t\tWifiInfo wifiInfo = wifiManager.getConnectionInfo();\n\n\t\tint ipAddress = wifiInfo.getIpAddress();\n\n\t\tif(ipAddress != 0)\n\t\t\t//\n\t\t\treturn String.format(\"%d.%d.%d.%d\",\n\t\t\t\t\t(ipAddress & 0xff), (ipAddress >> 8 & 0xff),\n\t\t\t\t\t(ipAddress >> 16 & 0xff), (ipAddress >> 24 & 0xff));\n\t\telse\n\t\t\treturn \"127.0.0.1\";\n\t}", "public static String getNetSSID() {\n\t\tif (!mInitialized) Log.v(\"OpenIp\", \"Initialisation isn't done\");\n\t\treturn netSSID;\n\t}", "private boolean configuredNetwork(Context context, WifiConfiguration config) {\n boolean connResult = false;\n if (config != null) {\n connResult = Wifi.connectToConfiguredNetwork(context, mWifiManager, config, false);\n }\n return connResult;\n }", "public static boolean isConnectedWifi(Context context) {\n NetworkInfo info = getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_WIFI);\n }", "public String getNetworkState() {\n return this.NetworkState;\n }", "public String getNetworkname() {\n return networkname;\n }", "private String getWifiIP()\n {\n WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE);\n @SuppressWarnings(\"deprecation\")\n String ip = Formatter.formatIpAddress(wm.getConnectionInfo().getIpAddress());\n return ip;\n }", "java.lang.String getPhy();", "public void onNetConnected(AbNetUtils.NetType type) {\n\n\t}", "private String getProtocolName(final int subtype) {\r\n\t\tswitch (subtype) {\r\n\t\tcase TelephonyManager.NETWORK_TYPE_1xRTT:\r\n\t\t\treturn \"1xrtt\"; // ~ 50-100 kbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_CDMA:\r\n\t\t\treturn \"cdma\"; // ~ 14-64 kbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_EDGE:\r\n\t\t\treturn \"edge\"; // ~ 50-100 kbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_EVDO_0:\r\n\t\t\treturn \"evdo0\"; // ~ 400-1000 kbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_EVDO_A:\r\n\t\t\treturn \"evdoa\"; // ~ 600-1400 kbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_GPRS:\r\n\t\t\treturn \"gprs\"; // ~ 100 kbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_HSDPA:\r\n\t\t\treturn \"hsdpa\"; // ~ 2-14 Mbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_HSPA:\r\n\t\t\treturn \"hspa\"; // ~ 700-1700 kbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_HSUPA:\r\n\t\t\treturn \"hsupa\"; // ~ 1-23 Mbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_UMTS:\r\n\t\t\treturn \"umts\"; // ~ 400-7000 kbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_EHRPD: // API level 11\r\n\t\t\treturn \"ehrpd\"; // ~ 1-2 Mbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_EVDO_B: // API level 9\r\n\t\t\treturn \"evdob\"; // ~ 5 Mbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_HSPAP: // API level 13\r\n\t\t\treturn \"hspap\"; // ~ 10-20 Mbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_IDEN: // API level 8\r\n\t\t\treturn \"iden\"; // ~25 kbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_LTE: // API level 11\r\n\t\t\treturn \"lte\"; // ~ 10+ Mbps\r\n\t\tcase TelephonyManager.NETWORK_TYPE_UNKNOWN:\r\n\t\t\treturn \"unknown\";\r\n\t\tdefault:\r\n\t\t\treturn \"unknown\";\r\n\t\t}\r\n\t}", "protected boolean isOnline() {\n\n ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n\n boolean isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n\n //check if the connection id wifi or mobile data\n boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;\n\n return isConnected;\n\n }", "public boolean isConnected(Context context) {\n\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netinfo = cm.getActiveNetworkInfo();\n\n if (netinfo != null && netinfo.isConnectedOrConnecting()) {\n android.net.NetworkInfo wifi = cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n android.net.NetworkInfo mobile = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);\n\n if ((mobile != null && mobile.isConnectedOrConnecting()) || (wifi != null && wifi.isConnectedOrConnecting()))\n return true;\n else return false;\n } else\n return false;\n }", "public interface NetworkStateChangeObserver {\n /**\n * 网络状态消失时\n */\n void onNetworkDisconnected();\n\n /**\n * 当Wifi连接时\n */\n void onWifiConnected();\n\n /**\n * 当移动网络连接时\n */\n void onMobileDataTrafficConnected();\n\n /**\n * 当4G连接时\n */\n void on4GConnected();\n\n\n /**\n * 网络可用的情况(可能是Wifi,流量,蓝牙等网络可用)\n */\n void onNetworkAvailable();\n\n /**\n * 网络完全不可用的情况(Wifi,流量,蓝牙等网络都不可用)\n */\n void onNetworkNotAvailable();\n\n /**\n * 蜂窝网络可用的情况\n */\n void onCellularAvailable();\n\n /**\n * WIFI网络可用的情况\n */\n void onWIFIAvailable();\n\n /**\n * 蓝牙网络可用的情况\n */\n void onBluetoothAvailable();\n\n /**\n * 以太网络可用的情况\n */\n void onEthernetAvailable();\n\n /**\n * VPN网络可用的情况\n */\n void onVPNAvailable();\n\n /**\n * 6LoWPAN 网络可用的情况\n */\n void onLOWPANAvailable();\n}", "public void getNetworkConnection() {\n System.out.println(((AndroidDriver) getDriver()).getConnection());\n }", "private static String m21383C(Context context) {\n WifiInfo wifiInfo;\n String str = \"02:00:00:00:00:00\";\n if (context == null) {\n return str;\n }\n WifiManager wifiManager = (WifiManager) context.getApplicationContext().getSystemService(\"wifi\");\n if (wifiManager == null) {\n return str;\n }\n try {\n wifiInfo = wifiManager.getConnectionInfo();\n } catch (Exception e) {\n C5205o.m21464a((Throwable) e);\n wifiInfo = null;\n }\n if (wifiInfo == null) {\n return null;\n }\n String macAddress = wifiInfo.getMacAddress();\n if (!TextUtils.isEmpty(macAddress)) {\n macAddress = macAddress.toUpperCase(Locale.ENGLISH);\n }\n return macAddress;\n }", "@Override\r\n\tpublic void onNetChange(boolean isNetConnected) {\n\t\tif (isNetConnected) {\r\n\t\t\tShowToast(R.string.network_error_not_connected);\r\n\t\t}\r\n\t}", "public static boolean isWifiConnected(Context context) {\n ConnectivityManager mConnectivityManager = (ConnectivityManager) context\n .getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo mWiFiNetworkInfo = mConnectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n if (mWiFiNetworkInfo != null) {\n // WifiManager manager = (WifiManager)\n // IdealseeApplication.mContext.getSystemService(Context.WIFI_SERVICE);\n // WifiInfo wifiInfo = manager.getConnectionInfo();\n return mWiFiNetworkInfo.isConnected();\n }\n return false;\n }", "private boolean isConnectedThroughWifi_preQ() {\n if (checkNetworkStatePermission()) return false;\n\n NetworkInfo activeNetworkInfo = getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected() && activeNetworkInfo.getType() == ConnectivityManager.TYPE_WIFI;\n }", "java.lang.String getMachineType();", "public interface Wifi {\n\n\t/**\n\t * Activar el WIFI\n\t */\n\tpublic void activarWifi();\n\t/**\n\t * Desactivar el WIFI\n\t */\n\tpublic void desactivarWifi();\n\t/**\n\t * Verificar si estamos en modo avion\n\t * @return\n\t */\n\tpublic boolean estaEnModoAvion();\n\t\n}", "private int getPreferredNetworkMode(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getPreferredNetworkMode(int):int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getPreferredNetworkMode(int):int\");\n }" ]
[ "0.7947504", "0.7921868", "0.7663765", "0.7571402", "0.7570006", "0.75359297", "0.7528607", "0.7491876", "0.7408777", "0.7340082", "0.71848035", "0.7065054", "0.699592", "0.6837948", "0.6661996", "0.66011524", "0.64850944", "0.64689004", "0.6413185", "0.64112914", "0.63900447", "0.63851076", "0.63822544", "0.6367187", "0.6336738", "0.6322994", "0.63034624", "0.62393457", "0.62285894", "0.62285894", "0.6225282", "0.62228245", "0.6210191", "0.61854583", "0.61661875", "0.61588913", "0.61306494", "0.6125702", "0.61143464", "0.60914564", "0.6068868", "0.60675436", "0.6066172", "0.60340786", "0.6031284", "0.60152346", "0.60090435", "0.59966105", "0.5957976", "0.59559757", "0.59365344", "0.5920689", "0.5900577", "0.58999157", "0.5896993", "0.58689237", "0.58689237", "0.5841911", "0.5818105", "0.5813915", "0.5803102", "0.58027005", "0.5799965", "0.5799965", "0.57982415", "0.57954425", "0.5793649", "0.57891494", "0.57871264", "0.57825243", "0.57824475", "0.57756156", "0.5762364", "0.57614225", "0.5757", "0.57306916", "0.57254875", "0.5714592", "0.5703909", "0.5702382", "0.5699114", "0.5696327", "0.56916976", "0.56832445", "0.5681296", "0.56674844", "0.56333977", "0.5623956", "0.55705047", "0.55701184", "0.55690086", "0.5566303", "0.55494714", "0.5546073", "0.55454093", "0.5513441", "0.5513197", "0.5512833", "0.550329", "0.550192" ]
0.81419027
0
This method displays a dialog to get user preferences for syncing images in the absence of Network.
public AlertDialog.Builder connectivityAlert(){ mAlertDialogBuilder = new AlertDialog.Builder(mContext); Log.i(TAG,"in connectivyAlert!!!!!"); mAlertDialogBuilder.setMessage(R.string.connectivityLossMessageString) .setPositiveButton(R.string.wifiString,new DialogInterface.OnClickListener(){ @Override public void onClick(DialogInterface dialog, int id){ Log.i(TAG,"+ve Button"); // Toast.makeText(mContext,"positive Button",Toast.LENGTH_SHORT).show(); Toast.makeText(mContext,R.string.uploadRequestOnNoNetwork,Toast.LENGTH_SHORT).show(); writeSyncPreferences(mContext.getString(R.string.wifiString)); //TODO - call a function that enters records to the SQLite database //Challenge- how to get the values from the UploadCamPicsActivity class? insertRecords(); mContext.startActivity(new Intent(mContext,MainActivity.class)); ((Activity)mContext).finish(); } }) .setNegativeButton(R.string.mobiledataString,new DialogInterface.OnClickListener(){ @Override public void onClick(DialogInterface dialog, int id){ // Log.i(TAG," -ve Button"); //Toast.makeText(mContext,"negative Button",Toast.LENGTH_SHORT).show(); Toast.makeText(mContext,R.string.uploadRequestOnNoNetwork,Toast.LENGTH_SHORT).show(); writeSyncPreferences(mContext.getString(R.string.mobiledataString)); //TODO - call a function that enters records to the SQLite database insertRecords(); mContext.startActivity(new Intent(mContext,MainActivity.class)); ((Activity)mContext).finish(); } }); return mAlertDialogBuilder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "private void showUserPreferences() {\r\n MyAccount ma = state.getMyAccount();\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 mOriginName.setEnabled(!ma.isPersistent());\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 = new StringBuilder(this.getText(R.string.summary_preference_username));\r\n if (ma.getUsername().length() > 0) {\r\n summary.append(\": \" + ma.getUsername());\r\n } else {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(ma.canSetUsername());\r\n\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(ma.canChangeOAuth());\r\n\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\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 mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(ma.getConnection().isPasswordNeeded());\r\n\r\n int titleResId;\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 (ma.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 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 mVerifyCredentials.setTitle(titleResId);\r\n mVerifyCredentials.setSummary(summary);\r\n mVerifyCredentials.setEnabled(ma.isOAuth() || ma.getCredentialsPresent());\r\n }", "private void showPreference(){\r\n if(userPreferencesForm == null) {\r\n userPreferencesForm = new UserPreferencesForm(mdiForm,true);\r\n }\r\n userPreferencesForm.loadUserPreferences(mdiForm.getUserId());\r\n userPreferencesForm.setUserName(mdiForm.getUserName());\r\n userPreferencesForm.display();\r\n }", "private void showChoosePictureDialog() {\n String[] permissions = PermissionConstants.checkIfPermissionsAreGranted(this,\n PermissionConstants.READ_STORAGE, PermissionConstants.WRITE_STORGAE,\n PermissionConstants.CAMERA);\n if(permissions.length > 0) {\n PermissionConstants.askForPermissions(this, PERMISSIONS_REQUEST, permissions);\n } else {\n EasyImage.openChooserWithGallery(this, \"\", 0);\n }\n }", "public void openDialog() {\r\n\t\tString filename = this.getFileName();\r\n\t\tif (filename.equals(null) || filename.equals(\"\") ) {\r\n\t\t\ttext.append(\"\\nPlease select valid image\");\r\n\t\t\topenDialog();\r\n\t\t}\r\n\t\tdisplay_img = this.loadImage(filename);\r\n\r\n\t}", "@Override\r\n protected void onPreExecute() {\n if( progressDialog == null ) {\r\n progressDialog = ProgressDialog.show( context, context.getString(R.string.pref_sync_callings_now_title),\"\");\r\n }\r\n }", "private void loadCloudImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_cloud, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n getImagesList();\n }\n });\n\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "@Override\r\n\tpublic void pictureUpdated() {\r\n\t\tif(mDialog != null)\r\n\t\t\tmDialog.loadPicture();\r\n\t\t\r\n\t}", "private void basicInfoDialogPrompt() {\n if(!prefBool){\n BasicInfoDialog dialog = new BasicInfoDialog();\n dialog.show(getFragmentManager(), \"info_dialog_prompt\");\n }\n }", "private void displayFileChooser() {\n\n // Initiate file chooser, and set title\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Save Poster\");\n\n // Set extension filter\n FileChooser.ExtensionFilter filter = new FileChooser.ExtensionFilter(\"Image\", \"*.jpg\");\n fileChooser.getExtensionFilters().add(filter);\n\n // If preferences file is empty\n if (userDirectoryString.equals(\"empty\")) {\n\n userDirectoryString = System.getProperty(\"user.home\");\n }\n\n File userDirectory = new File(userDirectoryString);\n\n // If it can't access User Home, default to C drive\n if (!userDirectory.canRead()) {\n userDirectory = new File(\"C:\\\\\");\n }\n\n // Set the initial save directory\n fileChooser.setInitialDirectory(userDirectory);\n\n if (movie != null) {\n\n // Get movie's title and set an initial file name\n String movieTitle = movie.getMovieTitle();\n\n // Replace any invalid characters\n movieTitle = movieTitle.replaceAll(\"[\\\"/?\\\"*><|]\", \"\").replace(\":\", \"-\");\n\n // Set initial file name\n fileChooser.setInitialFileName(movieTitle);\n }\n\n // Show file chooser dialog\n File file = fileChooser.showSaveDialog(primaryStage);\n\n // Check file isn't null, so it the image view\n if (file != null && imgPoster.getImage() != null) {\n\n try {\n\n ImageIO.write(SwingFXUtils.fromFXImage(imgPoster.getImage(), null), \"jpg\", file);\n setLblStatus(\"Poster saved successfully.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Update preferences with the new location, and local variable\n preferences.put(\"saveLocation\", file.getParentFile().toString());\n userDirectoryString = file.getParentFile().toString();\n }\n }", "private void showImageUpload() {\n\n //Showing dialog\n\n final Dialog dialog = new Dialog(UserHomeActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.useruploadimage);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.show();\n\n\n //Hooks\n // backButton = dialog.findViewById(R.id.backButton);\n\n //User will click on back button\n/* backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n }\n });*/\n\n\n submitUserImage = dialog.findViewById(R.id.submitUserQuoteandJokes);\n uploadUserImageView = dialog.findViewById(R.id.uploadImage);\n imageType = dialog.findViewById(R.id.typeDetails);\n\n\n userUploadContent = dialog.findViewById(R.id.shareAndUploadJokesAndQuote);\n\n\n //getting the url from upload image\n uploadUserImageView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n //calling choose picture\n\n choosePicture();\n\n }\n });\n\n\n\n userUploadContent.setText(\"Upload Jokes and Quotes\");\n\n // Uncheck or reset the radio buttons initially\n\n imageType.clearCheck();\n\n\n // Add the Listener to the RadioGroup\n imageType.setOnCheckedChangeListener(\n new RadioGroup\n .OnCheckedChangeListener() {\n @Override\n\n // The flow will come here when\n // any of the radio buttons in the radioGroup\n // has been clicked\n\n // Check which radio button has been clicked\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n // Get the selected Radio Button\n RadioButton\n radioButton\n = (RadioButton) group\n .findViewById(checkedId);\n }\n });\n\n\n\n\n //Submit image user\n submitUserImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n //checking internet Connectivity\n\n InternetConnectivityCheck connectivityCheck = new InternetConnectivityCheck();\n\n if (connectivityCheck.isNetworkAvailable(UserHomeActivity.this)) {\n\n // When submit button is clicked,\n // Ge the Radio Button which is set\n // If no Radio Button is set, -1 will be returned\n\n int selectedId = imageType.getCheckedRadioButtonId();\n\n if (selectedId == -1) {\n Toast.makeText(UserHomeActivity.this,\n \"Please select the type\",\n Toast.LENGTH_SHORT)\n .show();\n } else if (imageUri == null) {\n\n Toast.makeText(UserHomeActivity.this,\n \"Image would not be empty\",\n Toast.LENGTH_SHORT)\n .show();\n\n } else {\n RadioButton radioButton\n = (RadioButton) imageType\n .findViewById(selectedId);\n\n //Calling method to upload image\n\n updateImage(resultUri, radioButton.getText().toString(),dialog);\n\n }\n }\n else{\n\n Toast.makeText(UserHomeActivity.this, \"Network error\", Toast.LENGTH_SHORT).show();\n }\n\n }\n\n });\n\n\n }", "void showFileManagerDialog();", "@Override\n\tprotected void okPressed() {\n\t\tfor (int i = 0; i < LAST_USED_PREF_IDS.length; i++) {\n\t\t\tlatencyPrefs.setValue(LAST_USED_PREF_IDS[i], localValues.get(LAST_USED_PREF_IDS[i]));\n\t\t}\n\t\t// Save the show dialog pref\n\t\tlatencyPrefs.setValue(Constants.DONT_SHOW_DIALOG, dontShowDialog);\n\t\tsavePreferences();\n\n\t\tsuper.okPressed();\n\t}", "private void showLoserDialog() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"You Have Been Defeated \" + player1.getName() + \",Computer Wins!!\", new ButtonType(\"Close\", ButtonBar.ButtonData.NO), new ButtonType(\"Try Again?\", ButtonBar.ButtonData.YES));\n alert.setGraphic(new ImageView(new Image(this.getClass().getResourceAsStream(\"/Images/bronze.png\"))));\n alert.setHeaderText(null);\n alert.setTitle(\"Computer Wins\");\n alert.showAndWait();\n if (alert.getResult().getButtonData() == ButtonBar.ButtonData.YES) {\n onReset();\n }\n }", "public ConfigureUpdatesDialog() {\n super(StrangeEons.getWindow(), ModalityType.TOOLKIT_MODAL);\n initComponents();\n AbstractGameComponentEditor.localizeComboBoxLabels(frequencyCombo, null);\n AbstractGameComponentEditor.localizeComboBoxLabels(actionCombo, null);\n banner.setIcon(new ImageIcon(\n ResourceKit.createBleedBanner(((ImageIcon) banner.getIcon()).getImage())\n ));\n setLocationRelativeTo(getParent());\n\n Settings s = Settings.getUser();\n s.set(\"core-dialog-shown\", \"yes\");\n //doNotShowCheck.setSelected( s.getYesNo( \"core-dialog-autoinstall\" ) );\n\n frequencyCombo.setSelectedIndex(AutomaticUpdater.getUpdateFrequency());\n actionCombo.setSelectedIndex(AutomaticUpdater.getUpdateAction() == 0 ? 0 : 1);\n newPluginsCheck.setSelected(AutomaticUpdater.isShowingNewPlugins());\n appUpdateCheck.setSelected(AutomaticUpdater.isShowingAppUpdates());\n doneInit = true;\n }", "private void showImageSizeOptionDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tCharSequence title = res.getString(R.string.stream_set_res_photo);\n\n\t\tfinal String[] imageSizeUIString = uiDisplayResource.getImageSize();\n\t\tif (imageSizeUIString == null) {\n\t\t\tWriteLogToDevice.writeLog(\"[Error] -- SettingView: \",\n\t\t\t\t\t\"imageSizeUIString == null\");\n\t\t\tpreviewHandler\n\t\t\t\t\t.obtainMessage(GlobalApp.MESSAGE_UPDATE_UI_IMAGE_SIZE)\n\t\t\t\t\t.sendToTarget();\n\t\t\treturn;\n\t\t}\n\t\tint length = imageSizeUIString.length;\n\n\t\tint curIdx = 0;\n\t\tUIInfo uiInfo = reflection.refecltFromSDKToUI(\n\t\t\t\tSDKReflectToUI.SETTING_UI_IMAGE_SIZE,\n\t\t\t\tcameraProperties.getCurrentImageSize());\n\n\t\tfor (int ii = 0; ii < length; ii++) {\n\t\t\tWriteLogToDevice.writeLog(\"[Normal] -- SettingView: \",\n\t\t\t\t\t\"uiInfo.uiStringInSetting == \" + uiInfo.uiStringInSetting);\n\t\t\tif (imageSizeUIString[ii].equals(uiInfo.uiStringInSetting)) {\n\t\t\t\tcurIdx = ii;\n\t\t\t}\n\t\t}\n\n\t\tDialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\n\t\t\t\tString value = (String) reflection.refecltFromUItoSDK(\n\t\t\t\t\t\tUIReflectToSDK.SETTING_SDK_IMAGE_SIZE,\n\t\t\t\t\t\timageSizeUIString[arg1]);\n\t\t\t\tcameraProperties.setImageSize(value);\n\t\t\t\tpreviewHandler.obtainMessage(\n\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_IMAGE_SIZE).sendToTarget();\n\t\t\t\targ0.dismiss();\n\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t}\n\t\t};\n\t\tshowOptionDialog(title, imageSizeUIString, curIdx, listener, false);\n\t}", "public PreferencesDialog() {\r\n\t\tWindow window;\r\n\t\t// if is mac\r\n\t\tif (SystemInfo.isMac()) {\r\n\t\t\twindow = new JFrame(ResourceManager.getString(\"preferences.title\"));\r\n\t\t\t// dispose this dialog if presse close button\r\n\t\t\t((JFrame) window).setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\t\t// no resizable\r\n\t\t\t((JFrame) window).setResizable(false);\r\n\t\t} else {\r\n\t\t\twindow = new JDialog(MainWindow.getInstance(), ResourceManager.getString(\"preferences.title\"), true);\r\n\t\t\t// dispose this dialog if presse close button\r\n\t\t\t((JDialog) window).setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\r\n\t\t\t// no resizable\r\n\t\t\t((JDialog) window).setResizable(false);\r\n\t\t}\r\n\r\n\t\t// set dialog icon\r\n\t\twindow.setIconImage(ResourceManager.getIcon(\"/icons/16x16/preferences.png\").getImage());\r\n\t\t// contruct dialog UI\r\n\t\tinitComponents(window);\r\n\t\twindow.setMinimumSize(new Dimension(300, 300));\r\n\t\t// adjust window preferred size\r\n\t\twindow.pack();\r\n\t\t// center of screen\r\n\t\twindow.setLocationRelativeTo(null);\r\n\t\t// show\r\n\t\twindow.setVisible(true);\r\n\t}", "private void preferences() {\n final Preferences prefs = Preferences.userNodeForPackage(DesktopPane.class);\n final JFileChooser chooser = new JFileChooser(prefs.get(SCREENSHOT_DIRECTORY_PREFS, null));\n chooser.setDialogTitle(\"Output directory for screenshots\");\n chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n switch (chooser.showOpenDialog(this)) {\n case JFileChooser.APPROVE_OPTION: {\n final File directory = chooser.getSelectedFile();\n if (directory != null) {\n prefs.put(SCREENSHOT_DIRECTORY_PREFS, directory.getPath());\n }\n break;\n }\n }\n }", "private void showUserSettings() {\n\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"\\n Send report:\"+ sharedPrefs.getBoolean(\"prefSendReport\", true));\n\t}", "private void showUserSettings() {\n\t\t\tSharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\tbuilder.append(\"\\n Send report:\"+ sharedPrefs.getBoolean(\"prefSendReport\", true));\n\t\t}", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging In.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging in.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "private void showDialogNoNet() {\n View view = getLayoutInflater().inflate(R.layout.dialog_no_internet, null);\n\n Button btn_retry = (Button) view.findViewById(R.id.btn_retry);\n\n final Dialog dialog = new Dialog(this, android.R.style.Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor);\n dialog.setCanceledOnTouchOutside(false);\n dialog.setContentView(view);\n dialog.show();\n\n btn_retry.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //retry and close dialogue\n if (dialog.isShowing()) {\n dialog.cancel();\n onRetryLoadPaperGroups();\n }\n }\n });\n }", "private void showState() {\n\n\t\t// If a dialog is being displayed, remove it.\n\t\tif (_dialog != null) {\n\t\t\t_dialog.dismiss();\n\t\t\t_dialog = null;\n\t\t}\n\t\t\n\t\tResources resources = getResources();\n\t\t\n\t\tImageButton addPhotoButton = (ImageButton)(findViewById(R.id.capture_text_photo_button_add_photo));\n\t\tImageButton removePhotoButton = (ImageButton)(findViewById(R.id.capture_text_photo_button_remove_photo));\n\t\t\n\t\t// Update the photo and the photo button.\n\t\tif ((null != _photoFile) && (_photoFile.exists())) {\n\t\t\tOptions bitmapOptions = new Options();\n\t\t\tbitmapOptions.inSampleSize = 4; // Open the bitmap as 1/4 its original size to save memory.\n\t\t\tBitmap photoBitmap = BitmapFactory.decodeFile(_photoFile.getAbsolutePath(), bitmapOptions);\n\t\t\t((ImageView)findViewById(R.id.capture_text_photo_imageview_photo)).setImageBitmap(photoBitmap);\n\t\t\taddPhotoButton.setVisibility(View.GONE);\n\t\t\tremovePhotoButton.setVisibility(View.VISIBLE);\t\n\t\t} else { \n\t\t\t((ImageView)findViewById(R.id.capture_text_photo_imageview_photo)).setImageBitmap(null);\n\t\t\taddPhotoButton.setVisibility(View.VISIBLE);\n\t\t\tremovePhotoButton.setVisibility(View.GONE);\t\n\t\t\t\n\t\t}\n\n\t\tswitch (_state) {\n\t\tcase DATA_MOMENT:\n\t\t\t// Nothing to do.\n\t\t\tbreak;\n\t\tcase FAILED_ALLOW_ACK:\n\t\t\t// Show a 'failed' dialog.\n\t\t\tAlertDialog failedDialog = new AlertDialog.Builder(this).create();\n\t\t\tfailedDialog.setTitle(resources.getString(R.string.error_dialog_title));\n\t\t\tfailedDialog.setMessage(_errorMessage);\n\t\t\tfailedDialog.setButton(DialogInterface.BUTTON_POSITIVE, \"OK\", this);\n\t\t\tfailedDialog.setCancelable(false); // Prevent the user from cancelling the dialog with the back key.\n\t\t\tfailedDialog.show();\n\t\t\t_dialog = failedDialog;\n\t\t\tbreak;\n\t\tcase FAILED_INVALID_CREDENTIALS:\n\t\t\t\n\t\t\t// Don't redirect more than once.\n\t\t\t_errorMessage = \"\";\n\t\t\t_state = State.DATA_MOMENT;\n\t\t\t\n\t\t\t// Clear credentials saved in the store.\n\t\t\tCredentialStore.getInstance().clear();\n\t\t\t\n\t\t\t// Go back to the sign in activity.\n\t\t\tSignInActivity.signInAgain(this);\n\t\t\t\n\t\t\t// Show the user some toast explaining why they have been redirected.\n\t\t\tToast.makeText(this, resources.getString(R.string.sign_in_redirected_because_credentials_invalid), Toast.LENGTH_LONG).show();\n\t\t\t\n\t\t\t// We leave the text field as-is (and let it get its state persisted), then if the user goes back, they can try again with their original text.\n\t\t\tbreak;\n\t\tcase FAILED_NO_LOCATION_PROVIDERS_ENABLED:\n\t\t\t// Show a dialog.\n\t\t\tAlertDialog noGpsfailedDialog = new AlertDialog.Builder(this).create();\n\t\t\tnoGpsfailedDialog.setTitle(resources.getString(R.string.error_dialog_title));\n\t\t\tnoGpsfailedDialog.setMessage(resources.getString(R.string.error_no_location_services));\n\t\t\tnoGpsfailedDialog.setButton(DialogInterface.BUTTON_POSITIVE, \"OK\", this);\n\t\t\tnoGpsfailedDialog.setCancelable(false); // Prevent the user from cancelling the dialog with the back key.\n\t\t\tnoGpsfailedDialog.show();\n\t\t\t_dialog = noGpsfailedDialog;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new UnexpectedEnumValueException(_state);\n\t\t}\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog.show();\n\t\t\tprogressDialog.setMessage(\"Contacting server for sharing...\");\n\t\t}", "private void showCameraConfigurationDialog() {\n\n\t\tLayoutInflater factory = LayoutInflater.from(context);\n\t\tView textEntryView = factory.inflate(R.layout.camera_name_password_set,\n\t\t\t\tnull);\n\t\tfinal EditText cameraName = (EditText) textEntryView\n\t\t\t\t.findViewById(R.id.camera_name);\n\t\tfinal String name = cameraProperties.getCameraSsid();\n\t\tcameraName.setText(name);\n\t\tfinal EditText cameraPassword = (EditText) textEntryView\n\t\t\t\t.findViewById(R.id.wifi_password);\n\t\tfinal String password = cameraProperties.getCameraPassword();\n\t\tcameraPassword.setText(password);\n\t\tAlertDialog.Builder ad1 = new AlertDialog.Builder(context);\n\t\tad1.setTitle(R.string.camera_wifi_configuration);\n\t\tad1.setIcon(android.R.drawable.ic_dialog_info);\n\t\tad1.setView(textEntryView);\n\t\tad1.setCancelable(true);\n\t\tad1.setPositiveButton(R.string.camera_configuration_set,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int arg1) {\n\n\t\t\t\t\t\tString temp1 = cameraName.getText().toString();\n\t\t\t\t\t\tif (temp1.length() > 20) {\n\t\t\t\t\t\t\tToast.makeText(context, R.string.camera_name_limit,\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t// do not allow dialog close\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tField field = dialog.getClass().getSuperclass()\n\t\t\t\t\t\t\t\t\t\t.getDeclaredField(\"mShowing\");\n\t\t\t\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\t\t\t\tfield.set(dialog, false);\n\n\t\t\t\t\t\t\t} catch (Exception 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\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tString temp = cameraPassword.getText().toString();\n\t\t\t\t\t\tif (temp.length() > 10 || temp.length() < 8) {\n\t\t\t\t\t\t\tToast.makeText(context, R.string.password_limit,\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t// do not allow dialog close\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tField field = dialog.getClass().getSuperclass()\n\t\t\t\t\t\t\t\t\t\t.getDeclaredField(\"mShowing\");\n\t\t\t\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\t\t\t\tfield.set(dialog, false);\n\n\t\t\t\t\t\t\t} catch (Exception 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\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// allow dialog close\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tField field = dialog.getClass().getSuperclass()\n\t\t\t\t\t\t\t\t\t.getDeclaredField(\"mShowing\");\n\t\t\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\t\t\tfield.set(dialog, true);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (name.equals(cameraName.getText().toString()) == false) {\n\t\t\t\t\t\t\tcameraProperties.setCameraSsid(cameraName.getText()\n\t\t\t\t\t\t\t\t\t.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (password.equals(temp) == false) {\n\t\t\t\t\t\t\tcameraProperties.setCameraPassword(cameraPassword\n\t\t\t\t\t\t\t\t\t.getText().toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tad1.show();\n\t}", "public PreferencesDialog (JFrame owner)\n {\n this (owner, \"OPENMARKOV User Preferences\",\n OpenMarkovPreferences.OPENMARKOV_NODE_PREFERENCES, true/*\n * ,\n * OpenMarkovPreferences\n * .\n * OPENMARKOV_KERNEL_PREFERENCES\n * , false\n */);\n }", "private void showImageChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Profile Image\"), CHOOSE_IMAGE);\n }", "private void showImagePickDialog() {\n String[] options = {\"Camera\", \"Gallery\"};\n //dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Pick Image\")\n .setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (which == 0) {\n //Camera Clicked\n if (checkCameraPermission()) {\n // cameraPermission allowed\n pickFromCamera();\n } else {\n // cameraPermission not allowed, request\n requestCameraPermission();\n }\n } else {\n //Gallery Clicked\n if (checkStoragePermission()) {\n // Storage Permission allowed\n pickFromGallery();\n } else {\n // Storage Permission not allowed, request\n requestStoragePermission();\n\n }\n\n }\n }\n }).show();\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 }", "protected void showSettingsChangedDialog() {\n new AlertDialog.Builder(getActivity())\n .setTitle(R.string.dialog_settings_changed_title)\n .setMessage(R.string.dialog_settings_changed_description)\n .setPositiveButton(android.R.string.yes, this)\n .setNegativeButton(android.R.string.no, this)\n .show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t progressDialog = new AutoTuningInitDialog(mChannelActivity, R.style.dialog);\n\t\t\tprogressDialog.show();\t\t\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\tprotected void updateLaunchConfigurationDialog() {\n\t\tsuper.updateLaunchConfigurationDialog();\n\t}", "public final void updateGUIFromPrefs() {\n try {\n angleStepSizeSpinner_.setValue(Double.parseDouble(prefs_.get(PrefUtils.ANGLESTEPSIZE, \"0.0\")));\n startAngleField_.setText(prefs_.get(PrefUtils.STARTANGLE, \"\"));\n doubleZeroCheckBox_.setSelected(Boolean.parseBoolean(prefs_.get(PrefUtils.DOUBLEZERO, \"\")));\n saveImagesCheckBox_.setSelected(Boolean.parseBoolean(prefs_.get(PrefUtils.ACQSAVEIMAGES, \"\")));\n acqdirRootField_.setText(prefs_.get(PrefUtils.ACQDIRROOT, \"\"));\n acqnamePrefixField_.setText(prefs_.get(PrefUtils.ACQNAMEPREFIX, \"\"));\n String channelGroup = core_.getChannelGroup();\n prefs_.put(PrefUtils.CHANNEL, channelGroup + \": \" + core_.getCurrentConfig(channelGroup));\n coeff3Field_.setText(PrefUtils.parseCal(3, prefs_, gui_));\n coeff2Field_.setText(PrefUtils.parseCal(2, prefs_, gui_));\n coeff1Field_.setText(PrefUtils.parseCal(1, prefs_, gui_));\n coeff0Field_.setText(PrefUtils.parseCal(0, prefs_, gui_));\n channelField_.setText(prefs_.get(PrefUtils.CHANNEL,\"\"));\n } catch (Exception ex) {\n Logger.getLogger(AcquisitionPanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\t\t\tpublic void onSuccess(BackupSettingsModel result) {\n\t\t\t\tif (result==null)\n\t\t\t\t{\n\t\t\t\t\tthisWindow.unmask();\n\t\t\t\t\t\n\t\t\t\t\tMessageBox messageBox = new MessageBox();\n\t\t\t\t\tmessageBox.getDialog().ensureDebugId(\"58bc28a3-da8b-4eff-a97d-bb3bc86fa02e\");\n\t\t\t\t\tmessageBox.setIcon(MessageBox.WARNING);\n\t\t\t\t\tmessageBox.setTitleHtml(UIContext.Messages.messageBoxTitleWarning(UIContext.productNameVCM));\n\t\t\t\t\tmessageBox.setMessage(UIContext.Constants.coldStandbySettingConfigureBackup());\n\t\t\t\t\tmessageBox.setModal(true);\n\t\t\t\t\tmessageBox.addCallback(new Listener<MessageBoxEvent>() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void handleEvent(MessageBoxEvent be) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tthisWindow.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t\tmessageBox.show();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//full node backup, don't check the whether selected system or bootable volumes.\n\t\t\t\t\tif(result.getBackupVolumes().getIsFullMachine()){\n\t\t\t\t\t\tpopulateUI();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tMessageBox messageBox = new MessageBox();\n\t\t\t\t\t\tmessageBox.getDialog().ensureDebugId(\"148b80f0-00a2-4929-90de-ac3a12afae1e\");\n\t\t\t\t\t\tmessageBox.setIcon(MessageBox.WARNING);\n\t\t\t\t\t\tmessageBox.setTitleHtml(UIContext.Messages.messageBoxTitleWarning(UIContext.productNameVCM));\n\t\t\t\t\t\tmessageBox.setMessage(UIContext.Messages.coldStandbySettingConfigureBackupFullMachine(UIContext.productNameD2D));\n\t\t\t\t\t\tmessageBox.addCallback(new Listener<MessageBoxEvent>() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void handleEvent(MessageBoxEvent be) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tthisWindow.hide();\n\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\tmessageBox.show();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*final List<String> backupConfigVolumes=result.getBackupVolumes().selectedVolumesList;\n\t\t\t\t\t\t\n\t\t\t\t\t\tservice.getVolumesWithDetails(result.getDestination(), result.getDestUserName(), \n\t\t\t\t\t\t\t\tresult.getDestPassword(), new BaseAsyncCallback<List<FileModel>>() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onSuccess(List<FileModel> fileModelList) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(fileModelList == null || fileModelList.size() == 0) \n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tboolean isBootVolume=false;\n\t\t\t\t\t\t\t\tboolean isSystemVolume=false;\n\t\t\t\t\t\t\t\tfor (FileModel volume : fileModelList) {\n\t\t\t\t\t\t\t\t\tVolumeModel volumeModel=(VolumeModel)volume;\n\t\t\t\t\t\t\t\t\tif(volumeModel==null){\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfor(String volumeName:backupConfigVolumes){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(removeEndSlash(volume.getName()).compareToIgnoreCase(volumeName)==0)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(VolumeSubStatus.isBootVolume(volumeModel.getSubStatus())){\n\t\t\t\t\t\t\t\t\t\t\t\tisBootVolume=true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif(VolumeSubStatus.isBootVolume(volumeModel.getSubStatus())){\n\t\t\t\t\t\t\t\t\t\t\t\tisSystemVolume=true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(isBootVolume&&isSystemVolume){\n\t\t\t\t\t\t\t\t\tpopulateUI();\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\t\n\t\t\t\t\t\t\t\t\tMessageBox messageBox = new MessageBox();\n\t\t\t\t\t\t\t\t\tmessageBox.getDialog().ensureDebugId(\"856c2186-0fea-4a2b-8c30-a4e0a0a3ff34\");\n\t\t\t\t\t\t\t\t\tmessageBox.setIcon(MessageBox.WARNING);\n\t\t\t\t\t\t\t\t\tmessageBox.setTitle(UIContext.Constants.messageBoxTitleWarning());\n\t\t\t\t\t\t\t\t\tmessageBox.setMessage(UIContext.Constants.coldStandbySettingConfigureBackupSysBoot());\n\t\t\t\t\t\t\t\t\tmessageBox.addCallback(new Listener<MessageBoxEvent>() {\n\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void handleEvent(MessageBoxEvent be) {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\tthisWindow.hide();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tmessageBox.show();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});*/\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t}", "private void ShowCurrentFace() \n {\n if( m_DoneInit )\n {\n String file = \"/tsbtool_gui/facepackage/\"+String.format(\"%02x.BMP\",m_ImageNumber).toUpperCase();\n //new javax.swing.ImageIcon(getClass().getResource(\"/tsbtool_gui/facepackage/00.png\")\n Image face = GetImage(file);\n if( face != null )\n {\n mFaceBox.setIcon( new ImageIcon( face));\n m_FaceLabel.setText(String.format(\"%02x\",m_ImageNumber).toUpperCase());\n }\n else\n JOptionPane.showMessageDialog(this, \"Problem with \"+file);\n AutoUpdateRoster();\n }\n }", "private void showWhiteBalanceOptionDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tCharSequence title = res.getString(R.string.setting_awb);\n\n\t\tfinal String[] whiteBalanceUIString = uiDisplayResource\n\t\t\t\t.getWhiteBalanceUIString();\n\t\tif (whiteBalanceUIString == null) {\n\t\t\tWriteLogToDevice.writeLog(\"[Error] -- SettingView: \",\n\t\t\t\t\t\"whiteBalanceUIString == null\");\n\t\t\treturn;\n\t\t}\n\t\tint length = whiteBalanceUIString.length;\n\n\t\tint curIdx = 0;\n\t\tUIInfo uiInfo = reflection.refecltFromSDKToUI(\n\t\t\t\tSDKReflectToUI.SETTING_UI_WHITE_BALANCE,\n\t\t\t\tcameraProperties.getCurrentWhiteBalance());\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (whiteBalanceUIString[i].equals(uiInfo.uiStringInSetting)) {\n\t\t\t\tcurIdx = i;\n\t\t\t}\n\t\t}\n\n\t\tDialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\tint value = (Integer) reflection.refecltFromUItoSDK(\n\t\t\t\t\t\tUIReflectToSDK.SETTING_SDK_WHITE_BALANCE,\n\t\t\t\t\t\twhiteBalanceUIString[arg1]);\n\t\t\t\tcameraProperties.setWhiteBalance(value);\n\t\t\t\tpreviewHandler.obtainMessage(\n\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_WHITE_BALANCE_ICON)\n\t\t\t\t\t\t.sendToTarget();\n\t\t\t\targ0.dismiss();\n\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t}\n\t\t};\n\t\tshowOptionDialog(title, whiteBalanceUIString, curIdx, listener, true);\n\t}", "private void showFormatConfirmDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\tbuilder.setMessage(R.string.setting_format_desc);\n\t\tbuilder.setNegativeButton(R.string.setting_no,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setPositiveButton(R.string.setting_yes,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t// handler.obtainMessage(REQUEST_FORMAT_SD_CARD).sendToTarget();\n\t\t\t\t\t\tFormatSDCard formatSDCard = new FormatSDCard(handler);\n\t\t\t\t\t\tformatSDCard.start();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tdialog = builder.create();\n\t\tdialog.show();\n\t}", "public void showCorrectDialog() {\n\t\t //get correct dialog box image\n\t\t URL greenIconURL = getClass().getResource(\"green.png\");\n\t\t Image greenImage = getToolkit().getImage(greenIconURL);\n\t\t ImageIcon greenIcon = new ImageIcon(greenImage);\n\t\t \n\t\t //show dialog box\n\t\t JOptionPane.showMessageDialog(this,\n\t\t\t\t \"Good job!\", //answer message\n\t\t\t\t \"Correct\", //title bar\n\t\t\t\t JOptionPane.INFORMATION_MESSAGE, \n\t\t\t\t greenIcon);\n\t\t \n\t\t //enable next button\n\t\t next.setEnabled(true);\n\t }", "private void newConfiguration() {\n checkSave();\n config = new Configuration();\n\n // create a ConfigurationDialog\n ConfigurationDialog cdialog = new ConfigurationDialog(frame, NEW, config, getConfigurations());\n cdialog.pack();\n cdialog.setLocationRelativeTo(frame);\n cdialog.setVisible(true);\n\n // if the data is valid, create an ImageDialog to allow registration of the image\n if (cdialog.isDataValid()) {\n System.out.println(\"config name: \"+config.getName());\n if (config.useBlankImage()) {\n System.out.println(\"blank image: \"+config.getImageHeight()+\" x \"+config.getImageWidth());\n }\n else {\n System.out.println(\"image name: \"+addSlashes(config.getImageName()));\n config.setImageName(addSlashes(config.getImageName()));\n }\n\n ImageDialog idialog = new ImageDialog(frame, NEW, config);\n idialog.pack();\n idialog.setLocationRelativeTo(frame);\n idialog.setVisible(true); \n\n // if the ImageDialog data is valid, create a blank motes object and calls viewConfiguration\n if (idialog.isDataValid()) {\n System.out.println(\"minPixelX: \"+config.getMinimumPixelX());\n System.out.println(\"minPixelY: \"+config.getMinimumPixelY());\n System.out.println(\"maxPixelX: \"+config.getMaximumPixelX());\n System.out.println(\"maxPixelY: \"+config.getMaximumPixelY());\n System.out.println(\"minRealX: \"+config.getMinimumRealX());\n System.out.println(\"minRealY: \"+config.getMinimumRealY());\n System.out.println(\"maxRealX: \"+config.getMaximumRealX());\n System.out.println(\"maxRealY: \"+config.getMaximumRealY());\n config.notSaved();\n configSave.setEnabled(true);\n configClose.setEnabled(true);\n motes = new Motes();\n viewConfiguration(DEFAULT_DB_CONFIG_TABLE);\n }\n else {\n config = new Configuration();\n }\n }\n }", "private void showProfilePicture() {\n File pic = sender.getProfilePic();\n if (pic == null || !pic.exists()) {\n profilePic.setText(Wrapers.htmlWraper(\"No Profile Picture Found.\"));\n } else {\n profilePic.setIcon(Images.profilePic(pic));\n profilePic.setText(null);\n }\n }", "public PreferredRemoteDialog( JDialog owner, Collection< Remote > preferredRemotes )\n {\n super( owner, \"Preferred Remotes\", true );\n createGui( owner, preferredRemotes );\n }", "public void showIncorrectDialog() {\n\t\t //get incorrect dialog box image\n\t\t URL redIconURL = getClass().getResource(\"red.png\");\n\t\t Image redImage = getToolkit().getImage(redIconURL);\n\t\t ImageIcon redIcon = new ImageIcon(redImage);\n\t\t \n\t\t //show dialog box\n\t\t JOptionPane.showMessageDialog(this,\n\t\t\t\t \"Try again.\", //answer message\n\t\t\t\t \"Incorrect\", //title bar\n\t\t\t\t JOptionPane.INFORMATION_MESSAGE, \n\t\t\t\t redIcon);\n\t }", "private void getUserProfile() {\n mFirstname.setText(\"FirstName: \"+userPreferences.getAgentFirstName());\n mLastname.setText(\"LastName: \"+userPreferences.getAgentLastName());\n\n\n Log.i(\"username\",userPreferences.getAgentUsername());\n if(userPreferences.getAgentUsername()==null){\n mUsernameTxt.setText(\"\");\n }else if(userPreferences.getAgentUsername().equals(\"null\")){\n mUsernameTxt.setText(\"\");\n }else{\n mUsernameTxt.setText(userPreferences.getAgentUsername());\n }\n\n mEmail.setText(\"Email: \"+userPreferences.getAgentEmail());\n mPhoneNum.setText(\"Phone No: \"+userPreferences.getAgentPhoneNUM());\n\n\n /* mPinProfileTxt.setText(\"Pin: \"+userPreferences.getPin());\n mBank.setText(\"Bank Name: \"+userPreferences.getBank());\n mAccountName.setText(\"Acct Name: \"+userPreferences.getAccountName());\n mAccountNumber.setText(\"Acct No: \"+userPreferences.getAccountNumber());*/\n\n mProgressBarProfile.setVisibility(View.VISIBLE);\n if(personal_img_url==null) {\n Glide.with(this).load(userPreferences.getAgentProfileImg()).apply(new RequestOptions().fitCenter().circleCrop()).into(mProfilePhoto);\n }else{\n Glide.with(this).load(personal_img_url).apply(new RequestOptions().fitCenter().circleCrop()).into(mProfilePhoto);\n\n }\n mProgressBarProfile.setVisibility(View.GONE);\n }", "private void showFileChooser(){\n\t\t//Create the file chooser with a default directory of the last downloadPath (default will be user.home\\Downloads\\)\n\t\tJFileChooser chooser = new JFileChooser(downloadPath);\n\t\t//Allow the file chooser to only select directories\n\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\t//Set the title\n\t\tchooser.setDialogTitle(\"Choose where to save your images\");\n\t\t//If the user chose a directory, then set the new path\n\t\tif(chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION){\t\n\t\t\tdownloadPath = chooser.getSelectedFile().getAbsolutePath() + File.separator;\n\t\t}\n\t\t//If the user did not choose a directory, then reset to default path\n\t\telse{\n\t\t\tsetDefaultPath();\n\t\t}\n\t\t//Check to see if the path is completed by a \\\n\t\tif(!downloadPath.endsWith(File.separator)){\n\t\t\tdownloadPath += File.separator;\n\t\t}\n\t\t//Update to let the user see where their files are downloaded\n\t\tcurrentPath.setText(downloadPath);\n\t\tcurrentPath.setToolTipText(downloadPath);\n\t}", "@Override\r\n protected void onPostExecute(JSONObject jso) {\r\n try {\r\n dlg.dismiss();\r\n } catch (Exception e1) { \r\n // Ignore this error \r\n }\r\n if (jso != null) {\r\n try {\r\n boolean succeeded = jso.getBoolean(\"succeeded\");\r\n String message = jso.getString(\"message\");\r\n \r\n if (succeeded) {\r\n // Finish this activity in order to start properly \r\n // after redirection from Browser\r\n // Because of initializations in onCreate...\r\n AccountSettingsActivity.this.finish();\r\n } else {\r\n Toast.makeText(AccountSettingsActivity.this, message, Toast.LENGTH_LONG).show();\r\n \r\n state.builder.setCredentialsVerificationStatus(CredentialsVerificationStatus.FAILED);\r\n showUserPreferences();\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Action\n public void showDnetBox()\n {\n int answer;\n int index = getMoteIndexFromList();\n int address = 0xFF, freqChann, netId, secu;\n SwapMote mote = null;\n\n // Get current network settings\n try\n {\n freqChann = swapDmt.getFreqChannel();\n netId = swapDmt.getNetworkId();\n secu = swapDmt.getSecurityOpt();\n\n if (index >= 0)\n {\n address = mote.getAddress();\n mote = swapDmt.getMote(index);\n }\n\n NetworkPanel netPanel = new NetworkPanel(address, freqChann, netId, secu);\n answer = JOptionPane.showConfirmDialog(null, netPanel, \"Device's Network Settings\",\n JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);\n\n if (answer == JOptionPane.OK_OPTION)\n {\n address = netPanel.getAddress();\n freqChann = netPanel.getFreqChannel();\n netId = netPanel.getNetworkId();\n secu = netPanel.getSecurity();\n\n boolean runSync = false;\n // Mote not selected or mote with power-down mode?\n if (mote == null)\n runSync = true;\n else if (mote.getPwrDownMode())\n runSync = true;\n\n if (runSync)\n {\n // Display SYNC waiting screen\n syncDiag = new SyncDialog(null, true);\n syncDiag.setVisible(true);\n\n // Sync dialog closed by the user?\n if (syncDiag != null)\n {\n syncDiag = null;\n return;\n }\n\n // Sync signal received\n if (syncAddress > 0)\n mote = swapDmt.getMoteFromAddress(syncAddress);\n }\n\n // Send new parameters only if the mote has been contacted\n if (mote != null)\n {\n if (mote.getAddress() != address)\n {\n if (!mote.sendAddressWack(address))\n {\n JOptionPane.showMessageDialog(null, \"Unable to set device network address\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n return;\n }\n }\n if (swapDmt.getNetworkId() != netId)\n {\n if (!mote.sendNetworkIdWack(netId))\n {\n JOptionPane.showMessageDialog(null, \"Unable to set Network ID on device\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n return;\n }\n }\n if (swapDmt.getFreqChannel() != freqChann)\n {\n if (!mote.sendFreqChannelWack(freqChann))\n {\n JOptionPane.showMessageDialog(null, \"Unable to set frequency channel on device\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n return;\n }\n }\n if (swapDmt.getSecurityOpt() != secu)\n {\n if (!mote.sendSecurityWack(secu))\n {\n JOptionPane.showMessageDialog(null, \"Unable to set security option on device\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n return;\n }\n }\n }\n else\n JOptionPane.showMessageDialog(null, \"Unable to contact remote device\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n }\n }\n catch(CcException ex)\n {\n ex.display();\n }\n }", "private void loadLocalImageConfirm()\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Load\").setMessage(\"Load image?\");\n\n builder.setPositiveButton(R.string.open_local, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n ((MainActivity) getActivity()).loadLocalImage();\n }\n });\n\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "private void showSettingsDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);\n builder.setTitle(getString(R.string.dialog_permission_title));\n builder.setMessage(getString(R.string.dialog_permission_message));\n builder.setPositiveButton(getString(R.string.go_to_settings), (dialog, which) -> {\n dialog.cancel();\n openSettings();\n });\n builder.setNegativeButton(getString(android.R.string.cancel), (dialog, which) -> dialog.cancel());\n builder.show();\n\n }", "private void getConfirmTransferView() {\n if (isFastDoubleClick()) return;\n String transferValue = transferValueEdit.getText().toString().trim();\n String receiveAddress = mCetReceiverAddress.getText();\n transferDialog = new TransferDialog(this, (password, progressBar) -> {\n this.progressBar = progressBar;\n if (TextUtils.isEmpty(password)) {\n Toast.makeText(mActivity, R.string.password_not_null, Toast.LENGTH_SHORT).show();\n } else if (!WalletService.checkPassword(mActivity, password, mPresenter.getWalletItem())) {\n Toast.makeText(mActivity, R.string.password_fail, Toast.LENGTH_SHORT).show();\n } else {\n transferDialog.setButtonClickAble(false);\n progressBar.setVisibility(View.VISIBLE);\n mPresenter.handleTransferAction(password, transferValue, receiveAddress);\n }\n });\n transferDialog.setConfirmData(mPresenter.getWalletItem().address, receiveAddress,\n NumberUtil.getDecimalValid_8(Double.parseDouble(transferValue)) + mPresenter.getTokenItem().symbol,\n feeValueText.getText().toString());\n }", "private void showDialog(){\n progress = new ProgressDialog(this);\n progress.setTitle(getString(R.string.progress_dialog_loading));\n progress.setMessage(getString(R.string.progress_dialog_authenticating_with_firebase));\n progress.setCancelable(false);\n progress.show();\n }", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "private void updateUI() {\n if (mAccount != null) {\n signInButton.setEnabled(false);\n signOutButton.setEnabled(true);\n callGraphApiInteractiveButton.setEnabled(true);\n callGraphApiSilentButton.setEnabled(true);\n currentUserTextView.setText(mAccount.getUsername());\n } else {\n signInButton.setEnabled(true);\n signOutButton.setEnabled(false);\n callGraphApiInteractiveButton.setEnabled(false);\n callGraphApiSilentButton.setEnabled(false);\n currentUserTextView.setText(\"None\");\n }\n\n deviceModeTextView.setText(mSingleAccountApp.isSharedDevice() ? \"Shared\" : \"Non-shared\");\n }", "public void ShowNoInternetDialog() {\r\n showAlertDialog(LoginUserActivity.this, getResources().getString(R.string.text_no_internet_connection),\r\n getResources().getString(R.string.text_please_check_your_network), false);\r\n }", "protected String getSettingsDialogTitle() {\r\n return \"Server options\";\r\n }", "@Override\n protected void onPreExecute() {\n\n dialog.setCancelable(true);\n dialog.setMessage(\"Fetching...\");\n\n dialog.show();\n\n }", "public void showTipDialog() {\n this.controller.showTipModal(C7251R.string.lys_dls_photo_tip_title, C7251R.string.lys_dls_photo_tip_text, NavigationTag.LYSAddPhotosTip);\n }", "@Override\n protected void onPreExecute() {\n progress = ProgressDialog.show(ModeSelection.this, \"Connecting...\", \"Please wait!!!\"); //show a progress dialog\n }", "public PreferredRemoteDialog( JFrame owner, Collection< Remote > preferredRemotes )\n {\n super( owner, \"Preferred Remotes\", true );\n createGui( owner, preferredRemotes );\n }", "private void showDialog() {\n if (!progressDialog.isShowing())\n progressDialog.show();\n }", "private void showNetworksDialog() {\n\n final MainPanel panel = mFileSystemController.getActivePanel();\n \n if (panel == null || panel.getActivity() == null) {\n // very weired situation; try to avoid crash.\n return;\n }\n\n final Dialog dialog = new Dialog(panel.getActivity(), R.style.Action_Dialog);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n View dialogView = View.inflate(App.sInstance.getApplicationContext(), R.layout.network_type_chooser, null);\n\n final ListView networks = (ListView) dialogView.findViewById(R.id.network_types);\n final NetworkChooserAdapter adapter = new NetworkChooserAdapter();\n networks.setAdapter(adapter);\n\n dialogView.findViewById(R.id.cancel).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n }\n });\n\n networks.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n NetworkEnum network = (NetworkEnum) view.getTag();\n\n switch (network) {\n case FTP:\n openFTP(panel);\n break;\n case SFTP:\n openSFTP(panel);\n break;\n case SMB:\n openSmb(panel);\n break;\n case Dropbox:\n openDropbox(panel);\n break;\n case SkyDrive:\n openSkyDrive(panel);\n break;\n case YandexDisk:\n openYandexDisk(panel);\n break;\n case GoogleDrive:\n openGoogleDrive(panel);\n break;\n case MediaFire:\n openMediaFire(panel);\n break;\n case WebDav:\n openWebDav(panel);\n break;\n }\n\n if (dialog.isShowing()) {\n dialog.dismiss();\n }\n }\n });\n\n dialog.setContentView(dialogView);\n dialog.show();\n\n adjustDialogSize(dialog, panel);\n }", "@Action\n public void showGnetBox()\n {\n int answer;\n \n // Get current network settings\n try\n {\n int address = swapDmt.getGatewayAddress();\n int freqChann = swapDmt.getFreqChannel();\n int netId = swapDmt.getNetworkId();\n int secu = swapDmt.getSecurityOpt();\n\n NetworkPanel netPanel = new NetworkPanel(address, freqChann, netId, secu);\n answer = JOptionPane.showConfirmDialog(null, netPanel, \"Gateway's Network Settings\",\n JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);\n\n if (answer == JOptionPane.OK_OPTION)\n {\n address = netPanel.getAddress();\n freqChann = netPanel.getFreqChannel();\n netId = netPanel.getNetworkId();\n secu = netPanel.getSecurity();\n\n if (!swapDmt.setNetworkParams(address, freqChann, netId, secu))\n JOptionPane.showMessageDialog(null, \"Unable to set gateway's network settings\\n\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n }\n }\n catch(CcException ex)\n {\n ex.display();\n }\n }", "private void displayPromptForEnablingInternet() {\n final AlertDialog.Builder builder =\n new AlertDialog.Builder(getActivity());\n final String actionWifiSettings = Settings.ACTION_WIFI_SETTINGS;\n final String actionWirelessSettings = Settings.ACTION_WIRELESS_SETTINGS;\n final String message = getString(R.string.enable_network);\n\n builder.setMessage(message)\n .setPositiveButton(getString(R.string.bt_wifi),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int idButton) {\n getActivity().startActivity(new Intent(actionWifiSettings));\n dialog.dismiss();\n }\n })\n .setNegativeButton(getString(R.string.bt_mobile_network),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int idButton) {\n getActivity().startActivity(new Intent(actionWirelessSettings));\n dialog.dismiss();\n }\n })\n .setNeutralButton(getString(R.string.bt_cancel),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int idButton) {\n dialog.cancel();\n }\n });\n builder.create().show();\n }", "protected final void showLoadingDialog() {\n }", "private void showSettingsDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(getString(R.string.permission));\n builder.setMessage(getString(R.string.setting_permission));\n builder.setPositiveButton(getString(R.string.go_setting), (dialog, which) -> {\n dialog.cancel();\n openSettings();\n });\n builder.setNegativeButton(getString(R.string.cancel), (dialog, which) -> dialog.cancel());\n builder.show();\n\n }", "private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }", "protected void showAlertbox() {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"위치서비스 비활성화\");\n builder.setMessage(\"현위치를 탐색하기 위해서 위치서비스가 필요합니다. 위치 설정을 켜시고 다시 현위치를 탐색해주세요.\");\n builder.setCancelable(true);\n builder.setPositiveButton(\"설정\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));\n }\n });\n builder.setNegativeButton(\"취소\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n builder.create().show();\n }", "public static void ShowAdminPreferences() {\n if (Controller.permission.GetUserPermission(\"EditUser\")) {\n ToggleVisibility(UsersPage.adminWindow);\n } else {\n DialogWindow.NoAccessTo(\"Admin options\");\n }\n }", "private void initDialog() {\n }", "private void showLoadDialog() {\n\t\tSet<String> entries = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getStringSet(RECORDED_ENTRIES, null);\n\t\tfinal String[] entriesArray = Arrays.copyOf(entries.toArray(), entries.toArray().length, String[].class);\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(R.string.pick_a_recording);\n\t\tbuilder.setItems(entriesArray, new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int item) {\n\t\t \t// Load the JSON\n\t\t \tnew LoadRecordingAsyncTask(entriesArray[item]).execute();\n\t\t }\n\t\t});\n\t\tAlertDialog alert = builder.create();\n\t\talert.show();\n\t}", "protected void mProfileImageSelection() {\n\n final CharSequence[] options = {\"Camera\", \"Gallery\", \"Cancel\"};\n\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper\n (ApplicationActivity.this, R.style.AlertDialogCustom));\n\n builder.setIcon(R.mipmap.profile_icon);\n builder.setTitle(\"Profile Picture\");\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n\n //Camera Option\n if (options[item].equals(\"Camera\")) {\n Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, CAMERA_REQUEST);\n }\n\n //Gallery Option\n else if (options[item].equals(\"Gallery\")) {\n Intent intent = new Intent(Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(intent, GALLERY_REQUEST);\n }\n\n //Cancel Option\n else if (options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n\n builder.show();\n }", "private void ConnectDialog(){\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n\t\tbuilder.setIcon(R.mipmap.ic_launcher);\n\t\tbuilder.setTitle(\"请输入主机名称和密码\");\n\t\t// 通过LayoutInflater来加载一个xml的布局文件作为一个View对象\n\t\tView view = LayoutInflater.from(MainActivity.this).inflate(R.layout.dialog, null);\n\t\t// 设置我们自己定义的布局文件作为弹出框的Content\n\t\tbuilder.setView(view);\n\n\t\tfinal EditText username = (EditText)view.findViewById(R.id.username);\n\t\tfinal EditText password = (EditText)view.findViewById(R.id.password);\n\n\t\tbuilder.setPositiveButton(\"确定\", new DialogInterface.OnClickListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tString a = username.getText().toString().trim();\n\t\t\t\tString b = password.getText().toString().trim();\n\n\t\t\t\tSwitchToSlaveRemoteController(a,b);\n\t\t\t}\n\t\t});\n\t\tbuilder.setNegativeButton(\"取消\", new DialogInterface.OnClickListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\n\t\t\t}\n\t\t});\n\t\tbuilder.show();\n\t}", "private void buildSuccessDialog(){\n\t\tmainDialog = new JDialog(mainWindow,\"Success!\");\n\t\t//mainDialog.getContentPane().removeAll();\n\t\tJPanel p1 = new JPanel (new BorderLayout());\n\t\tp1.setBackground(Color.white);\n\t\t//success text\n\t\tJLabel lab = new JLabel(\"Login Successful!\");\n\t\tlab.setFont( new Font(\"URW Gothic L\",Font.BOLD, 15));\n\t\tlab.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tp1.add(lab, BorderLayout.NORTH);\n\t\t\n\t\t//success image\n\t\tImageIcon img = new ImageIcon (\"./client_images/success.png\");\n\t\timg = new ImageIcon ( img.getImage().getScaledInstance(100,100,Image.SCALE_DEFAULT));\n\t\tJLabel imgLabel = new JLabel(img);\n\t\tp1.add(imgLabel,BorderLayout.CENTER);\n\n\t\tJButton ok = new JButton (\"Ok\");\n\t\t//pressing ok closes the application\n\t\t//register action listener (anonymous inner class is sufficient)\n\t\tok.addActionListener (new ActionListener(){\n\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\t//call GUI's close up method to gracefully release all\n\t\t\t\t\t\t\t//resources\n\t\t\t\t\t\t\tClientGui.this.closeUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\tp1.add(ok,BorderLayout.SOUTH);\n\n\t\t//settings of the dialog box\n\t\tmainDialog.getContentPane().add(p1);\n\t\tmainDialog.setLocationRelativeTo(mainWindow);\n\t\tmainDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\tmainDialog.setModal(true);\n\t\tmainDialog.setMinimumSize(new Dimension(300,200));\n\t\tmainDialog.setMaximumSize(new Dimension(300,200));\n\t\tmainDialog.setResizable(false);\n\t\tmainDialog.setVisible(true);\n\t\n\t}", "private void showDestinationDirChooser() {\r\n\t\tDirectoryChooser chooser = new DirectoryChooser();\r\n\t\tchooser.setTitle(\"Pick destination directory for split DARs. Hint: use a folder on TeacherShare.\");\r\n\t\tFile defaultDirectory = new File(System.getenv(\"userprofile\") + \"\\\\Desktop\");\r\n\t\tchooser.setInitialDirectory(defaultDirectory);\r\n\t\tFile selectedDirectory = chooser.showDialog(null);\r\n\r\n\t\tif (selectedDirectory != null) {\r\n\t\t\tString messageS = null;\r\n\t\t\tmessageS = selectedDirectory.getAbsolutePath();\r\n\t\t\tpreferences.setProperty(prefOutputPath, messageS);\r\n\t\t\tdestinationDirFX.update();\r\n\t\t}\r\n\t}", "@Override\n public void showDiscardDialog() {\n //Creating an AlertDialog with a message, and listeners for the positive, neutral and negative buttons\n AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());\n //Set the Message\n builder.setMessage(R.string.product_config_unsaved_changes_dialog_message);\n //Set the Positive Button and its listener\n builder.setPositiveButton(R.string.product_config_unsaved_changes_dialog_positive_text, mUnsavedDialogOnClickListener);\n //Set the Negative Button and its listener\n builder.setNegativeButton(R.string.product_config_unsaved_changes_dialog_negative_text, mUnsavedDialogOnClickListener);\n //Set the Neutral Button and its listener\n builder.setNeutralButton(R.string.product_config_unsaved_changes_dialog_neutral_text, mUnsavedDialogOnClickListener);\n //Lock the Orientation\n OrientationUtility.lockCurrentScreenOrientation(requireActivity());\n //Create and display the AlertDialog\n builder.create().show();\n }", "private void createConnectionConfigurationDialog(String message) {\n\t\tmainWindow.readConnectionConfigurationFromDialog(message);\n\t}", "private void displayAboutDialog() {\n final String message = \"AUTHORS\\n\" + \"Kaitlyn Kinerk and Alan Fowler\\n\"\n + \"TCSS 305 - UW Tacoma - 6/8/2016\\n\" + \"\\nIMAGE CREDIT\\n\"\n + \"Background: \"\n + \"http://wallpapercave.com/purple-galaxy-wallpaper\";\n JOptionPane.showMessageDialog(null, message, \"About\", JOptionPane.PLAIN_MESSAGE,\n new ImageIcon(\"icon.gif\"));\n }", "@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Downloading Outlet Inventory..\");\n Dialog.setCancelable(false);\n Dialog.show();\n }", "@Override\n public void buttonActions(String label) {\n\n if (!Objects.equals(label, \"Google_auth\") && (this.auth == null || this.auth.refresh_token.isEmpty())) {\n forceGoogleAuth();\n return;\n }\n\n switch (label) {\n case \"Google_auth\":\n //JOptionPane.showMessageDialog(null, \"Eggs are not supposed to be green.\");\n this.setUp();\n break;\n case \"add_file\":\n addFile();\n break;\n case \"remove_list\":\n\n Parameters.removeLoadedFiles();\n myFiles = new ArrayList<>();\n displayFiles();\n JOptionPane.showMessageDialog(null, \"La liste des fichiers synchronis\\u00e9s a \\u00e9t\\u00e9 supprim\\u00e9 \");\n break;\n case \"sync\":\n alert.show(\"Synchronisation en cours...\");\n Runnable r = this::sync;\n new Thread(r).start();\n break;\n case \"settings\":\n JTextField TextBoxDelay = new JTextField();\n JTextField TextBoxDefaultId = new JTextField();\n JTextField TextBoxDefaultLocalFolder = new JTextField();\n\n //init with default current value\n TextBoxDelay.setText(Integer.toString(refreshTimer / (60 * 1000)));\n TextBoxDefaultId.setText(settings[1]);\n TextBoxDefaultLocalFolder.setText(settings[2]);\n\n\n Object[] fields = {\n \"D\\u00e9lai entre chaque synchronisation en minute : \", TextBoxDelay,\n \"ID du fichier Google Drive à importer en readOnly : \", TextBoxDefaultId,\n \"Chemin du dossier de récupération de ce fichier : \", TextBoxDefaultLocalFolder\n };\n int selection = JOptionPane.showConfirmDialog(null, fields, \"Paramètres\", JOptionPane.OK_CANCEL_OPTION);\n\n if (selection == JOptionPane.OK_OPTION) {\n //default\n int delayInt;\n\n String delay = TextBoxDelay.getText();\n if (!delay.isEmpty()) {\n delayInt = Integer.parseInt(delay);\n if (delayInt <= 0 || delayInt > 200) {\n settingsError(\"Le format du d\\u00e9lai est invalide\");\n return;\n }\n } else {\n settingsError(\"Vous devez indiquer un d\\u00e9lai\");\n return;\n }\n\n String TextDefaultId = TextBoxDefaultId.getText();\n String TextDefaultLocalFolder = TextBoxDefaultLocalFolder.getText();\n\n File folder = new File(TextDefaultLocalFolder);\n\n if (!TextDefaultLocalFolder.isEmpty()) {\n if (Files.notExists(folder.toPath())) {\n settingsError(\"Le chemin du dossier n'est pas valide\");\n return;\n } else if (!folder.isDirectory()) {\n settingsError(\"le chemin correspond à un fichier et non à un dossier\");\n return;\n }\n }\n\n if ((TextDefaultId.isEmpty() && !TextDefaultLocalFolder.isEmpty()) || (!TextDefaultId.isEmpty() && TextDefaultLocalFolder.isEmpty())) {\n settingsError(\"Vous devez compléter tous les champs ou laisser vide à la fois l'ID et le chemin du dossier\");\n return;\n }\n\n\n settings[0] = TextBoxDelay.getText();\n settings[1] = TextDefaultId;\n settings[2] = TextDefaultLocalFolder;\n\n int newTimer = delayInt * 60 * 1000;\n if (newTimer != this.refreshTimer) {\n this.refreshTimer = newTimer;\n System.out.println(\"New timer in milliseconds : \" + refreshTimer);\n this.timer.stop();\n this.timer.setInitialDelay(refreshTimer);\n this.timer.setDelay(refreshTimer);\n this.timer.start();\n }\n\n Parameters.setSettings(settings);\n\n\n return;\n }\n\n break;\n }\n }", "public void getSaveConfMess() {\n JOptionPane.showMessageDialog(this, \"Your changes have been saved.\", \"Changes Confirmed\", PLAIN_MESSAGE);\n }", "private void showOptionBar(){\n\n\n //Shared preferences object of AutoLogin\n\n final AutoLogin autoLogin = new AutoLogin(UserHomeActivity.this);\n\n //Showing dialog\n\n final Dialog dialog = new Dialog(UserHomeActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.showoption);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n dialog.show();\n\n\n //Hooks\n\n backButton = dialog.findViewById(R.id.backButton);\n termsAndCondition =dialog. findViewById(R.id.terms);\n languageOption = dialog.findViewById(R.id.changeLanguage);\n logoutUser = dialog.findViewById(R.id.userLogout);\n\n userFeedback = dialog.findViewById(R.id.feedback);\n\n\n final InternetConnectivityCheck connectivityCheck = new InternetConnectivityCheck();\n\n //User will click on back button\n backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.dismiss();\n }\n });\n\n //dialog to show terms and condition\n\n termsAndCondition.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n //calling dialog method\n\n showTermsAndCondition(dialog);\n\n }\n });\n\n //Logout the user when user will click on logout button\n logoutUser.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n autoLogin.removeUser(UserHomeActivity.this);\n Intent intent = new Intent(UserHomeActivity.this,UserDetailsActivity.class);\n startActivity(intent);\n Toast.makeText(UserHomeActivity.this, \"Logout SuccessFully\", Toast.LENGTH_SHORT).show();\n finish();\n\n }\n });\n\n //on clicking language change button user will redirect on language Activity\n\n languageOption.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n Intent intent = new Intent(UserHomeActivity.this, LanguageActivity.class);\n intent.putExtra(\"connectType\",\"Home\");\n startActivity(intent);\n\n }\n });\n\n\n //For feedback\n\n userFeedback.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if(connectivityCheck.isNetworkAvailable(UserHomeActivity.this)) {\n\n //dismissing the dialog and showing feedback dialog\n\n dialog.dismiss();\n showFeedbackDialog();\n }\n else{\n\n Toast.makeText(UserHomeActivity.this, \"Network error\", Toast.LENGTH_SHORT).show();\n }\n\n }\n });\n\n\n }", "public void refreshGUIConfiguration() {\n\t\tcbxFEP.setSelectedItem(Initializer.getFEPname());\n\t\ttxtPort.setText(String.valueOf(Initializer.getPortNumber()));\n\t\t\n\t\tfor(Map.Entry<String, String> value : Initializer.getConfigurationTracker().getFepPropertiesMap().entrySet()) {\n\t\t\tif(value.getKey().equals(\"valueOfBitfield76\")) {\n\t\t\t\tSystem.out.println(value.getValue());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().sendResponseVariableName).equalsIgnoreCase(\"No\")) {\n\t\t\trdbtnDontSendResponse.setSelected(true);\n\t\t} else {\n\t\t\trdbtnSendResponse.setSelected(true);\n\t\t}\n\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().authorizationResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().approvalValue)) {\n\t\t\trdbtnAuthorizationApprove.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().authorizationResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().declineValue)) {\n\t\t\trdbtnAuthorizationDecline.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().authorizationResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().partialApprovalValue)) {\n\t\t\trdbtnAuthorizationPartiallyapprove.setSelected(true);\n\t\t}\n\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().financialSalesResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().approvalValue)) {\n\t\t\trdbtnFinancialSalesApprove.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().financialSalesResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().declineValue)) {\n\t\t\trdbtnFinancialSalesDecline.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().financialSalesResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().partialApprovalValue)) {\n\t\t\trdbtnFinancialSalesPartiallyapprove.setSelected(true);\n\t\t}\n\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().financialForceDraftResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().approvalValue)) {\n\t\t\trdbtnFinancialForceDraftApprove.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().financialForceDraftResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().declineValue)) {\n\t\t\trdbtnFinancialForceDraftDecline.setSelected(true);\n\t\t}\n\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().reconciliationResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().approvalValue)) {\n\t\t\trdbtnReconciliationApprove.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().reconciliationResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().declineValue)) {\n\t\t\trdbtnReconciliationDecline.setSelected(true);\n\t\t}\n\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().reversalResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().approvalValue)) {\n\t\t\trdbtnReversalApprove.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().reversalResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().declineValue)) {\n\t\t\trdbtnReversalDecline.setSelected(true);\n\t\t}\n\n\t\ttxtDeclineCode\n\t\t\t\t.setText(Initializer.getConfigurationTracker().getFepPropertiesMap().get(\"ValueOfBitfield39Decline\"));\n\t\ttxtApprovalAmount.setText(Initializer.getConfigurationTracker().getFepPropertiesMap().get(\"valueOfBitfield4\"));\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap().get(\"isHalfApprovalRequired\")\n\t\t\t\t.equalsIgnoreCase(\"true\")) {\n\t\t\tchckbxApproveForHalf.setSelected(true);\n\t\t\ttxtApprovalAmount.setEnabled(false);\n\t\t} else {\n\t\t\tchckbxApproveForHalf.setSelected(false);\n\t\t\ttxtApprovalAmount.setEnabled(true);\n\t\t}\n\t\t\n\t\tlogger.debug(\"GUI configuration updated based on the FEP properties configured\");\n\t}", "public void showImageChooser() {\n Intent intent2 = new Intent();\n intent2.setType(\"image/*\");\n intent2.setAction(\"android.intent.action.GET_CONTENT\");\n startActivityForResult(Intent.createChooser(intent2, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "private void showSettingsDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(Ter.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 }", "@SuppressLint(\"InflateParams\")\n private void showGoToSettingsDialog() {\n View view = LayoutInflater.from(activity).inflate(R.layout.go_to_setting, null, false);\n TextView message = (TextView) view.findViewById(R.id.fingerprint_required);\n TextView description = (TextView) view.findViewById(R.id.go_to_setting_description);\n message.setText((String) call.argument(\"fingerprintRequired\"));\n description.setText((String) call.argument(\"goToSettingDescription\"));\n Context context = new ContextThemeWrapper(activity, R.style.AlertDialogCustom);\n OnClickListener goToSettingHandler = new OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n stop(false);\n activity.startActivity(new Intent(Settings.ACTION_SECURITY_SETTINGS));\n }\n };\n OnClickListener cancelHandler = new OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n stop(false);\n }\n };\n new AlertDialog.Builder(context).setView(view)\n .setPositiveButton((String) call.argument(\"goToSetting\"), goToSettingHandler)\n .setNegativeButton((String) call.argument(CANCEL_BUTTON), cancelHandler).setCancelable(false).show();\n }", "private void showImagePickDialog() {\n String[] options = {\"Camera\",\"Gallery\"};\n //dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Pick Image\")\n .setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (which == 0){\n //camera clicked\n if (checkCameraPermission()){\n //camera permission allowed\n pickFromCamera();\n }\n else {\n //not allowed ,request\n requestCameraPermission();\n\n }\n }\n else {\n //gallery clicked\n if (checkStoragePermission()){\n //storage permission allowed\n pickFromGallery();\n\n }\n else {\n //not allowed,request\n requestStoragePermission();\n\n }\n }\n }\n })\n .show();\n }", "@Override\n protected void onPreExecute() {\n Dialog.setMessage(\"Downloading Pending Delivery Status..\");\n Dialog.setCancelable(false);\n Dialog.show();\n }", "private void launchProfilePicOptions() {\n // pop up the dialog\n AlertDialog.Builder pictureOptions = new AlertDialog.Builder(this);\n pictureOptions.setTitle(\"Camera Access\");\n // Set up click listener, firing intents open camera\n DialogInterface.OnClickListener itemListener = (dialog, item) -> {\n // Item is ID_PHOTO_PICKER_FROM_CAMERA\n // Call the onPhotoPickerItemSelected in the parent\n // activity, i.e., CameraControlActivity in this case\n onPhotoPickerItemSelected(item);\n };\n // Set the item/s to display and create the dialog\n pictureOptions.setItems(R.array.ui_profile_photo_picker_items, itemListener);\n pictureOptions.show();\n }", "private void setProgDialDownload(){\n sProgDialDownload.setMessage(getResources().getString(R.string.pdBuffer_inProgress));\n sProgDialDownload.setIndeterminate(true);\n sProgDialDownload.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n sProgDialDownload.setCancelable(false);\n }", "private static void changeSettings() {\n\t\t\n\t\tfinal Settings sett = config;\n\t\t\n\t\tfinal JDialog settingsDialog = new JDialog(frame, \"Change settings\");\n\t\t\n\t\tsettingsDialog.getContentPane().setLayout(new BorderLayout());\n\t\tsettingsDialog.setPreferredSize(new Dimension(350,150));\n\t\t\n\t\tJPanel settings = new JPanel();\n\t\tsettings.setLayout(new GridLayout(3,2));\n\t\t\n\t\tJLabel lblDB = new JLabel(\"Update DB dynamically\");\n\t\tJRadioButton rbDB = new JRadioButton();\n\t\trbDB.setSelected(sett.isUpdateDB());\n\t\trbDB.addItemListener(new ItemListener(){\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED){\n\t\t\t\t\tsett.setUpdateDB(true);\n\t\t\t\t} else if(e.getStateChange() == ItemEvent.DESELECTED){\n\t\t\t\t\tsett.setUpdateDB(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\t\t\n\t\tJLabel lblGUI = new JLabel(\"Use Graphical User Interface\");\n\t\tJRadioButton rbGUI = new JRadioButton();\n\t\trbGUI.setSelected(sett.isGUI());\n\t\trbGUI.addItemListener(new ItemListener() {\n\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange() == ItemEvent.SELECTED){\n\t\t\t\t\tsett.setGUI(true);\n\t\t\t\t} else if(e.getStateChange() == ItemEvent.DESELECTED){\n\t\t\t\t\tsett.setGUI(false);\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t});\n\t\t\n\t\tJLabel lblFile = new JLabel(\"Working file\");\n\t\tfinal JTextField tfFile = new JTextField(sett.getWorkingFile());\n\t\t\t\t\n\t\tsettings.add(lblDB);\n\t\tsettings.add(rbDB);\n\t\tsettings.add(lblGUI);\n\t\tsettings.add(rbGUI);\n\t\tsettings.add(lblFile);\n\t\tsettings.add(tfFile);\n\t\t\n\t\tJButton btnSave = new JButton(\"Save settings\");\n\t\tbtnSave.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(!saved) {\n\t\t \t\tint option = JOptionPane.showOptionDialog(frame,\n\t\t \t\t\t\t\"Updating the settings will reset the application\\nThere are unsaved changes\\nDo you want to save them now?\",\n\t\t \t\t\t\t\"Unsaved changes\",JOptionPane.YES_NO_CANCEL_OPTION,\n\t\t \t\t\t\tJOptionPane.WARNING_MESSAGE, null, null, 0);\n\t\t \t\tswitch(option) {\n\t\t \t\tcase 0:\n\t\t \t\t\ttoggleSaved(portfolio.save(WORKING_FILE));\n\t\t \t\tdefault:\n\t\t \t\t\tbreak; \t \t\t\n\t\t \t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsett.setWorkingFile(tfFile.getText());\n\t\t\t\t\n\t\t\t\tsett.save();\n\t\t\t\tconfig = new Settings(sett);\n\t\t\t\tsettingsDialog.dispose();\n\t\t\t\t\n\t\t\t\tif(!sett.isGUI()){\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\texit = false;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!sett.isUpdateDB()){\n\t\t\t\t\tportfolio.init(config.getWorkingFile());\n\t\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION);\n\t\t\t\t\tbtnRestore.setEnabled(true);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tportfolio.initDB();\n\t\t\t\t\tframe.setTitle(\"JProject v.\"+VERSION+\" ** Linked to Database **\");\n\t\t\t\t\tbtnRestore.setEnabled(false);\n\t\t\t\t}\n\t\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\t\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\t\tsel.init(portfolio);\n\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tsettingsDialog.add(settings, BorderLayout.CENTER);\n\t\tsettingsDialog.add(btnSave, BorderLayout.PAGE_END);\n\t\t\n\t\tsettingsDialog.pack();\n\t\tsettingsDialog.setVisible(true);\t\n\t}", "private void getUserImage(){\r\n \t//setProgressBarIndeterminateVisibility(true);\r\n \t\r\n \tusername=null;\r\n \tfor(int i=0; i<senderList.size(); i++) {\t// kovetkezo felhasznalo kepe\r\n \t\tString str=senderList.get(i);\r\n \t\tif (!userImage.containsKey(str)) {\r\n \t\t\tusername=str;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (username==null) return;\r\n \t\r\n\t String url = \"ImageDownload?size=medium&username=\" + username +\r\n\t \t\t\t\t\t\t \"&ssid=\" + UserInfo.getSSID();\r\n\t downloadUserImage = new HttpGetByteConnection(url, mHandler, TASK_GETUSERIMAGE);\r\n\t downloadUserImage.start();\r\n }", "public void setDisplayDialog(String dialog)\n\t{\n\t\tdisplayDialog = dialog;\n\t\trepaint();\n\t}", "@Override \r\n \tprotected IDialogSettings getDialogSettings() {\n \t\tIDialogSettings temp = super.getDialogSettings();\t\r\n \t\treturn temp;\r\n \t}", "public interface GlobalConstants {\n\n int DEFAULT_BITMAP_WIDTH = 200;\n int DEFAULT_BITMAP_HEIGHT = 200;\n\n String KEY_SCALING_VALUE = \"scalingValue\";\n String KEY_DIALOG_TITLE = \"dialogTitle\";\n String KEY_DIALOG_BACKGROUND_COLOUR = \"dialogBackgroundColour\";\n String KEY_DIALOG_TITLE_TEXT_COLOUR = \"dialogTitleTextColour\";\n String KEY_DIALOG_BUTTON_TEXT_COLOUR = \"dialogButtonTextColour\";\n String KEY_BITMAP_HEIGHT = \"bitmapHeight\";\n String KEY_BITMAP_WIDTH = \"bitmapWidth\";\n String KEY_DIRECTORY_NAME = \"directoryName\";\n\n String FORWARD_SLASH = \"/\";\n String HASH_SYMBOL = \"#\";\n String EXTENSION_JPG = \".jpg\";\n String EXTENSION_JPEG = \".jpeg\";\n String EXTENSION_PNG = \".png\";\n\n int DEFAULT_SCALING_VALUE = 300;\n String DEFAULT_DIALOG_TITLE = \"Choose image from:\";\n String DEFAULT_DIRECTORY_NAME = \"pik-a-pic\";\n int DEFAULT_BACKGROUND_COLOR = Color.parseColor(\"#FFFFFF\");\n int DEFAULT_DIALOG_TITLE_TEXT_COLOR = Color.parseColor(\"#787878\");\n int DEFAULT_DIALOG_BUTTON_TEXT_COLOR = Color.parseColor(\"#0C9B8E\");\n}", "@Override\r\n\tpublic void showNoNetwork() {\n\t\tdialog.cancel();\r\n\t\tshowNetView(false);\r\n\t}", "public void updateChooser()\r\n\t{\r\n\t\t/*\twhat shall we do here ? */\r\n\t}", "private void showPasswordChooserDialog(){\n if (getFragmentManager().findFragmentByTag(PASSWORD_FRAGMENT_TAG) != null){\n return;\n }\n PasswordDialogFragment fragment = PasswordDialogFragment.createFragment(R.string.box_sharesdk_password, R.string.box_sharesdk_set_password, R.string.box_sharesdk_ok, R.string.box_sharesdk_cancel );\n fragment.show(getFragmentManager(), PASSWORD_FRAGMENT_TAG);\n }", "public void processSetImageBackground() {\n AppYesNoDialogSingleton dialog = AppYesNoDialogSingleton.getSingleton();\n \n // POP UP THE DIALOG\n dialog.show(\"Set Image Background\", \"Would you like to have a background image?\");\n \n // IF USER CHOSE YES\n if (dialog.getSelection()) {\n // WE'LL NEED TO GET CUSTOMIZED STUFF WITH THIS\n PropertiesManager props = PropertiesManager.getPropertiesManager();\n\n // AND NOW ASK THE USER FOR THE FILE TO OPEN\n FileChooser fc = new FileChooser();\n fc.setInitialDirectory(new File(PATH_WORK));\n fc.setTitle(props.getProperty(LOAD_WORK_TITLE));\n File selectedFile = fc.showOpenDialog(app.getGUI().getWindow());\n \n // SET THE BACKGROUND IMAGE\n dataManager.setImageBackground(selectedFile);\n }\n else {\n // REMOVE THE BACKGROUND IMAGE\n dataManager.removeImageBackground();\n } \n }", "private void notConnectedDialog() {\n final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(mContext);\n alertDialogBuilder.setTitle(mContext.getResources().getString(R.string.not_connected_title));\n alertDialogBuilder.setCancelable(false);\n alertDialogBuilder.setMessage(mContext.getResources().getString(R.string.not_connected_message));\n\n alertDialogBuilder.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface arg0, int arg1) {\n alertDialog.dismiss();\n finish();\n }\n });\n\n alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n\n }", "private void showDialog() {\n try {\n pDialog.setMessage(getString(R.string.please_wait));\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.setCanceledOnTouchOutside(false);\n pDialog.show();\n } catch (Exception e) {\n // TODO: handle exception\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 }" ]
[ "0.62064195", "0.62031764", "0.60212135", "0.58892137", "0.5738159", "0.56444424", "0.5612263", "0.55962425", "0.5593463", "0.55839145", "0.5573756", "0.5568141", "0.5547306", "0.5518311", "0.55125964", "0.5504899", "0.5502627", "0.54990715", "0.5482527", "0.54493284", "0.5433111", "0.54189986", "0.53993136", "0.5369846", "0.5362632", "0.5353207", "0.5349951", "0.5333667", "0.53237635", "0.5323175", "0.53172284", "0.52857584", "0.52850455", "0.5273485", "0.5269968", "0.52592576", "0.52588165", "0.52556336", "0.5241326", "0.52235126", "0.52223206", "0.521303", "0.52118653", "0.5198725", "0.5198059", "0.51952994", "0.5187448", "0.5181721", "0.518115", "0.5173121", "0.517082", "0.51585406", "0.5156916", "0.5154202", "0.5146122", "0.5132805", "0.512851", "0.51266825", "0.51222795", "0.5121475", "0.5120467", "0.5113074", "0.5107029", "0.5104699", "0.51040274", "0.5100812", "0.50919986", "0.50887036", "0.5080908", "0.5066267", "0.5057413", "0.505566", "0.50523174", "0.5050824", "0.5046586", "0.5045397", "0.5044926", "0.5044671", "0.504454", "0.504344", "0.5041947", "0.50388116", "0.50283283", "0.50245166", "0.50178236", "0.5016351", "0.5016275", "0.50148565", "0.50146335", "0.5012597", "0.50070935", "0.50033087", "0.50033", "0.50028926", "0.5001422", "0.49999845", "0.49943176", "0.4989484", "0.4988866", "0.49782455", "0.49757928" ]
0.0
-1
Log.i(TAG," ve Button"); Toast.makeText(mContext,"negative Button",Toast.LENGTH_SHORT).show();
@Override public void onClick(DialogInterface dialog, int id){ Toast.makeText(mContext,R.string.uploadRequestOnNoNetwork,Toast.LENGTH_SHORT).show(); writeSyncPreferences(mContext.getString(R.string.mobiledataString)); //TODO - call a function that enters records to the SQLite database insertRecords(); mContext.startActivity(new Intent(mContext,MainActivity.class)); ((Activity)mContext).finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n Toast.makeText(MainActivity.this, \"Goodbye!\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Not Ready Yet :(\", Toast.LENGTH_SHORT).show();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\r\n\t\t\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"등록완료\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\r\n\t\t\t\t\t \r\n\t\t\t}", "@Override\n public void onClick(View v) {\n Toast.makeText(getContext(),\"hey uuuu clicked me \",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message! Your emergnecy conctacts will be notified!\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message!\", Toast.LENGTH_SHORT).show();\n\n }", "public void ClickFunction(){\n System.out.println(\"Click Function\");\n alertButton.setText(\"Cancel\");\n\n// click = !click;\n// if(click) {\n// SendTextMessage stm = new SendTextMessage();\n// stm.sendMessage(getActivity(), false);\n//\n// alertButton.setText(\"Cancel\");\n// makeSound_shake ();\n//\n// //Toast.makeText( getActivity(),\"Alert!\", Toast.LENGTH_SHORT).show();\n// }\n// else{\n// SendTextMessage stm = new SendTextMessage();\n// stm.sendMessage(getActivity(), true);\n// }\n\n }", "public void doNegativeClick() {\n // Do stuff here.\n Log.i(\"FragmentAlertDialog\", \"Negative click!\");\n }", "@Override\n public void onClick(View v) {\n CustomToast.show(getContext(),\"Service will be available Soon\");\n }", "@Override\n public void onClick(View v) {\n Toast tst = Toast.makeText(MainActivity.this, \"test\", Toast.LENGTH_SHORT);\n tst.show();\n Test();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"模块开发中,敬请期待\", Toast.LENGTH_SHORT).show();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(getApplication(), \"right\", 1).show();\r\n\t\t\t}", "@Override\n public void onDialogNegativeClick(DialogFragment dialog) {\n Toast.makeText(this, \"No\", Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(MainActivity.this, \"Hello World\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View v) {\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Coming soon.\", Toast.LENGTH_SHORT);\n toast.show();\n\n }", "public void onClick(DialogInterface arg0, int arg1) {\n// Toast.makeText(getApplicationContext(), \"User Is Not Wish To Exit\", Toast.LENGTH_SHORT).show();\n }", "public void onClick(DialogInterface arg0, int arg1) {\n// Toast.makeText(getApplicationContext(), \"User Is Not Wish To Exit\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Button 1\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "public void onClick(DialogInterface arg0, int arg1) {\n// Toast.makeText(getApplicationContext(), \"User Is Not Wish To Exit\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tToast.makeText(mContext, \"购物\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n public void onButtonClick(int nButtonIndex) {\n Toast.makeText(this, \"onButtonClick:\" + nButtonIndex, Toast.LENGTH_SHORT).show();\n }", "@Override\n \t\t\t\tpublic void onClick(View v) {\n \t\t\t\t\tnegativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n \t\t\t\t}", "@Override\n \t\t\t\tpublic void onClick(View v) {\n \t\t\t\t\tnegativeButtonClickListener.onClick(dialog, DialogInterface.BUTTON_NEGATIVE);\n \t\t\t\t}", "@Override\n public void clickNegative() {\n Toast.makeText(this, \"Cancelled\", Toast.LENGTH_SHORT).show();\n viewList();\n\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n \t\t\tToast.makeText(getApplicationContext(), \"Long click to change negative control channel\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n String s = v.getTag().toString();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, s, duration);\n toast.show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(LoginActivity.this, \"Reset Password\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n String toastText = \"Hello World\";\n\n // This is how long we want to show the toast\n int duration = Toast.LENGTH_SHORT;\n\n // Get the context\n Context context = getApplicationContext();\n\n // Create the toast\n Toast toast = Toast.makeText(context, toastText, duration);\n\n // Show the toast\n toast.show();\n }", "public void onClick(DialogInterface arg0, int arg1) {\n // the button was clicked\n Toast.makeText(getApplicationContext(), \"Professional backhand-Male Video\", Toast.LENGTH_LONG).show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartThread();\n\t\t\t Toast.makeText(getContext(), \"Êղسɹ¦\", 1).show();\n\t\t\t}", "@Override\n public void onClick(View v) {\n Toast.makeText(mContext, \"You Clicked \" + position, Toast.LENGTH_LONG).show();\n }", "public void onClick(View v) {\n System.out.println(\"Click on Listener: \" + click);\n if(!click) {\n click = !click;\n MainActivity.updateAlert(click);\n alertButton.setText(\"Cancel\");\n Toast.makeText( getActivity(),\"Alert!\", Toast.LENGTH_SHORT).show();\n activity = \"Button\";\n makeSound ();\n SendTextMessage stm = new SendTextMessage();\n stm.sendMessage(getActivity(), false);\n }\n else{\n showAuthenticationScreen();\n SendTextMessage stm = new SendTextMessage();\n stm.sendMessage(getActivity(), true);\n }\n\n\n\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tToast.makeText(getContext(), \"告辞!\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n buttonCancelClicked();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Long click to change negative control channel\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Long click to change negative control channel\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Long click to change negative control channel\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n public void onClick(View v) {\n Toast.makeText(RecycleTestActivity.this, pos + \"\", Toast.LENGTH_SHORT)\n .show();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(CanvasActivity.this, \"HIHIHI\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tAlertDialog.Builder builder=new AlertDialog.Builder(getActivity());\t\r\n\t\t\tbuilder.setTitle(\"Version 1.0\")\r\n\t\t\t.setMessage(\"With the App User Easily get the Work and directly Interact with Admin.\");\r\n\t\tbuilder.setNegativeButton(\"CLOSE\", new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int which) {\r\n // Write your code here to execute after dialog closed\r\n Toast.makeText(getActivity().getApplicationContext(), \"You clicked on CLOSE\", Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n \r\n // Showing Alert Message\r\n builder.show();\r\n\t\t}", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my Capstone app!\", Toast.LENGTH_SHORT);\n toast.show();\n }", "@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setText(\"Android is AWESOME!!\");\n }", "@Override\n public void onClick(View v) {\n Context context = getApplicationContext();\n // When the Hello button on the app is pressed this line of code will show *Hello, how are you?!\"\n Toast toast = Toast.makeText(context,\n \"Contact details for the college are - \" +\n \"\\n\\t CSN College, Tramore Road, Co.Cork\" +\n \"\\n\\t Phone number: 021-4961020\" +\n \"\\n\\t Email: [email protected]\", Toast.LENGTH_LONG);\n // This is for the toast message to show.\n toast.show();\n\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View view) {\n Toast msg = Toast.makeText(NicogetActivity.this, \"Je confirme !\", Toast.LENGTH_LONG);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n }", "@Override\n public void onClick(View v) {\n if (SHOW_DEBUG)\n Toast.makeText(v.getContext(), \"Yep, this all action \", Toast.LENGTH_SHORT)\n .show();\n fab.startAnimation(fab_show);\n }", "@OnClick(R.id.btnAlert)\n public void onBtnAlertClicked() {\n AlertDialog.Builder alert = new AlertDialog.Builder(this);\n alert.setTitle(\"Keluar\");\n alert.setMessage(\"Anda yakin ingin keluar dari Aplikasi ?\");\n\n alert.setPositiveButton(\"Ya\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // tampilkan toast\n Toast.makeText(MessageBoxActivity.this, \"Ya dipilih\", Toast.LENGTH_LONG).show();\n\n }\n });\n alert.setNegativeButton(\"Tidak\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // tampilkan toast\n Toast.makeText(MessageBoxActivity.this, \"Tidak dipilih\", Toast.LENGTH_LONG).show();\n } \n });\n alert.setNeutralButton(\"Batal\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // tampilkan toast\n Toast.makeText(MessageBoxActivity.this, \"batal dipilih\", Toast.LENGTH_LONG).show();\n }\n });\n\n\n\n }", "@Override\n protected void negativeClick() {\n\n }", "@Override\n public void onClick(View v)\n {\n \n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tToast.makeText(Test.this, Boolean.toString(tagButton.getStatus()), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"Uh-oh! something went wrong, please try again.\",Toast.LENGTH_SHORT).show();\n }", "public void onClick(View v) \n {\n Button b = (Button) v;\n Toast.makeText(this.mAnchorView.getContext(), b.getText(), Toast.LENGTH_SHORT).show();\n this.dismiss();\n }", "public void doPositiveClick() {\n // Do stuff here.\n Log.i(\"FragmentAlertDialog\", \"Positive click!\");\n }", "public void buttonOnClick(View v) {\n\n }", "@Override\n\tpublic void onNegativeButtonClicked(int requestCode) {\n\n\t}", "public void doNegativeClick() {\n\t\tToast.makeText(this, \"Заполните все нужные поля\", Toast.LENGTH_SHORT)\n\t\t\t\t.show();\n\t}", "private void cancelToast() {\n\t\tToast.makeText(getActivity(),\n\t\t\t\t\t\"Vorgang abgebrochen\",\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}", "public void onClick(View v) {\n lbl.setText(\"Hola jose\");\n }", "public void btn_geri2(View v) {\n }", "@Override\n public void onClick(View v) {\n builder.setMessage(R.string.alertMessage)\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //buClick();\n //finish();\n dialog.cancel();\n calculat();\n\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n\n }\n });\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(R.string.alertTitle);\n alert.show();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString balance=getBalance();\n\t\t\t\tString detail=ActMore.this.getResources().getString(R.string.need_extra_detail);\n\t\t\t\tString me=ActMore.this.getResources().getString(R.string.current_coin);\n\t\t\t\tString chuui=ActMore.this.getResources().getString(R.string.coin_error);\n\t\t\t\tAlertDialog alertDialog = new AlertDialog.Builder(ActMore.this)\n\t\t\t\t.setTitle(R.string.need_extra)\n\t\t\t\t.setMessage(detail+\"\\n\"+me+balance+\"\\n\"+chuui).\n\t\t\t\tsetNeutralButton(R.string.get_coin, new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which){\n\t\t\t\t\t\t//new WallThread().start();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.setPositiveButton(R.string.activate, new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which){\n\t\t\t\t\t\tToast.makeText(ActMore.this,\n\t\t\t\t\t\t\t\tR.string.processing,\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t//new WallThread().start();\n\t\t\t\t\t}\n\t\t\t\t}).setNegativeButton(R.string.confirm,\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which){\n\t\t\t\t\t\n\t\t\t\t\t}}).create(); //创建对话框\n\t\t\t\t\talertDialog.show(); // 显示对话框\t\n\t\n\t\t\t}", "@Override\n public void onClick(View v) {\n tv.setText(\" \");\n positive = true;\n flag = true;\n temp = 0.0;\n }", "@Override\n\tpublic void onTestButtonClick(FeaturedItem o) {\n\t\tToast.makeText(this, \"Este mensaje se genera en el fragmento pero lo maneja la actividad\", Toast.LENGTH_SHORT).show();\t\t\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmsg();\n\t\t\t}", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my Build It Bigger app!\", Toast.LENGTH_SHORT);\n toast.show();\n }", "@Override\n public void onClick(View v) {\n UIHelper.showMessageBoxActivity(mContext);\n }", "@Override\n public void onClick(View v) {\n\n if(activity.lancerBody())\n activity.getBtnSuivant().setText(R.string.emplacement_douloureux);\n else\n activity.getBtnSuivant().setText(R.string.precision);\n }", "public void yell(String message){\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n aManager.cancel(pIntent);\n Toast.makeText(getApplicationContext(), \"Cancel\", Toast.LENGTH_SHORT).show();\n }", "public void onClickShowAlert(View view) {\n AlertDialog.Builder myAlertBuilder = new\n AlertDialog.Builder(MainActivity.this);\n // Set the dialog title and message.\n myAlertBuilder.setTitle(\"Alert\");\n myAlertBuilder.setMessage(\"Click OK to continue, or Cancel to stop:\");\n // Add the dialog buttons.\n myAlertBuilder.setPositiveButton(\"OK\", new\n DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // User clicked OK button.\n Toast.makeText(getApplicationContext(), \"Pressed OK\",\n Toast.LENGTH_SHORT).show();\n }\n });\n myAlertBuilder.setNegativeButton(\"Cancel\", new\n DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // User cancelled the dialog.\n Toast.makeText(getApplicationContext(), \"Pressed Cancel\",\n Toast.LENGTH_SHORT).show();\n }\n });\n // Create and show the AlertDialog.\n myAlertBuilder.show();\n }", "@Override\n public void onClick(View v) {\n\n\n }", "@Override\n public void onMenuClick() {\n Toast.makeText(activity.getApplicationContext(), \"Menu click\",\n Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getActivity(), \"clicked okay\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"\"+e.getMessage(),Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onClick(View v) {\n Log.d(\"Notification-debug\", \"Ignore button\");\n finish();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(AddActivty.this, \"جاري رفع المنتج\", Toast.LENGTH_SHORT).show();\n StoreProductInformation();\n\n\n\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel(); \n Toast.makeText(context,\"you choose no action for alertbox\", \n Toast.LENGTH_SHORT).show(); \n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v)\n {\n\n\n\n\n\n }", "@Override\n public void onClick(View v) {\n builder.setMessage(R.string.dialog_message2).setTitle(R.string.dialog_title);\n\n //Setting message manually and performing action on button click\n builder.setMessage(\"Do you want to cancel?\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n Toast.makeText(getApplicationContext(), \"payment cancelled\",\n Toast.LENGTH_SHORT).show();\n }\n })\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n Toast.makeText(getApplicationContext(), \"payment not cancelled\",\n Toast.LENGTH_SHORT).show();\n }\n });\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(\"Cancel\");\n alert.show();\n }", "@Override\n public void onClick(View view) {\n Toast.makeText(MeetDetails.this,\n \"WIP: Ir a EditarCita\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "public void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\thandler.sendEmptyMessage(0);\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View arg0) {\n\n }", "private void sendToCatDance()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Dance'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n //Toast.makeText(getApplicationContext(), \"you clicked NO\",\n // Toast.LENGTH_SHORT).show();\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"MineSweeper!!\",\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }" ]
[ "0.7599518", "0.75684243", "0.7560056", "0.75319415", "0.7161373", "0.7130555", "0.71042395", "0.70695084", "0.6967956", "0.69370407", "0.6936252", "0.69254184", "0.69099414", "0.6885756", "0.68829155", "0.68815696", "0.68815696", "0.684469", "0.6842247", "0.682747", "0.6820905", "0.67865825", "0.67865825", "0.6776233", "0.67558116", "0.6752957", "0.67283344", "0.67009926", "0.6672625", "0.6662629", "0.6657247", "0.6641795", "0.6623178", "0.66115415", "0.66013026", "0.66013026", "0.66013026", "0.65817887", "0.6563714", "0.65516776", "0.65253055", "0.65060467", "0.6504381", "0.65013933", "0.6496475", "0.6477897", "0.6468982", "0.64653265", "0.6458846", "0.6456646", "0.6441037", "0.6440433", "0.643098", "0.6413026", "0.639836", "0.6394644", "0.6392246", "0.6388197", "0.6369055", "0.636804", "0.6368001", "0.6366257", "0.63593173", "0.6355793", "0.63450044", "0.63421124", "0.6341927", "0.6340891", "0.63383555", "0.63380426", "0.6320129", "0.6311281", "0.63010514", "0.62990993", "0.62946093", "0.6277627", "0.625978", "0.62470853", "0.62303746", "0.62300694", "0.62300694", "0.62300694", "0.62222105", "0.62189007", "0.6218319", "0.6213791", "0.6213791", "0.6213791", "0.6213791", "0.6213791", "0.6213791", "0.6213017", "0.62052715", "0.6203708", "0.61999035", "0.61949575", "0.61901736", "0.6185447", "0.61833364", "0.6182111", "0.6182111" ]
0.0
-1
This method checks if the user's Syncing properties are set
public boolean checkSharedPreference(String username){ mSharedPreference = mContext.getSharedPreferences(mContext.getString( R.string.sharedpreferencesFileName),Context.MODE_PRIVATE); if(mSharedPreference.getString(username,"Sync_Preference").equals("Sync_Preference")){ return false; } else return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasSyncNail() {\n for (final Nail nail : getNails()) {\n if (nail.getPropertyType().equals(PropertyType.SYNCHRONIZATION)) return true;\n }\n\n return false;\n }", "public boolean needsSync() {\n return myNeedsSync;\n }", "public boolean setSynchronize() {\n boolean isSynchronize = checkSynchronize();\n editor.putBoolean(Constans.KeyPreference.TURN_SYNCHRONIZE, !isSynchronize);\n editor.commit();\n return !isSynchronize;\n }", "public boolean isSynchronizing() {\n\t\treturn false;\n\t}", "static public boolean isSyncEnabled(Context context) {\n Cursor cursor = null;\n try {\n cursor = context.getContentResolver().query(CONTENT_URI, new String[] { VALUE },\n KEY + \"=?\", new String[] { KEY_SYNC_ENABLED }, null);\n if (cursor == null || !cursor.moveToFirst()) {\n return false;\n }\n return cursor.getInt(0) != 0;\n } finally {\n if (cursor != null) cursor.close();\n }\n }", "public Boolean getSyncFlag() {\n return syncFlag;\n }", "public Boolean getSyncFlag() {\n return syncFlag;\n }", "public boolean getActualsInSync()\r\n {\r\n return (m_actualsInSync);\r\n }", "private void checkSyncDirExists() {\n syncDirString = IVLEOfflineStorage.GetPropertyValue(Constants.SyncDirectory);\n if(syncDirString != null || syncDirString != \"\") {\n jTextField3.setText(syncDirString);\n } else {\n jTextField3.setText(\"Please Select a Sync Directory.\");\n }\n }", "private boolean checkIfChanged() {\n //get everything\n if ((!fname.getText().toString().equals(prefs.getString(\"fname\", null))\n || (!lname.getText().toString().equals(prefs.getString(\"lname\", null)))\n || (!email.getText().toString().equals(prefs.getString(\"email\", null)))\n || (!password.getText().toString().equals(prefs.getString(\"password\", null)))\n || (!(spinner_curr.getSelectedItemPosition() == (prefs.getInt(\"curr\", 0))))\n || (!(spinner_stock.getSelectedItemPosition() == (prefs.getInt(\"stock\", 0)))))) {\n return true;\n }\n return false;\n }", "public boolean requireAllPresenceValues() throws android.os.RemoteException;", "public boolean hasUserSettings() {\r\n return processModel.getUserInfos() != null;\r\n }", "private static boolean updateRequired(Context context) {\r\n\t\tSharedPreferences pref = context.getSharedPreferences(\r\n\t\t\t\tUSER_ID_SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);\r\n\r\n\t\tif (pref.contains(LAST_UPDATE)) {\r\n\r\n\t\t\tLong lastUpdate = pref.getLong(LAST_UPDATE, -1);\r\n\t\t\tLong now = new Date().getTime();\r\n\r\n\t\t\treturn (now - lastUpdate) > TIME_IN_MILLIS;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public boolean isUpdateUserInitialized() {\n return updateUser_is_initialized; \n }", "public boolean isvSync() {\n return vSync;\n }", "private boolean checkPropertyUpdateView() {\n \t\treturn Boolean.getBoolean(PROPERTY_RIENA_LNF_UPDATE_VIEW);\n \t}", "public static boolean isProfileOutOfSync() {\n return profileOutOfSync || profile == null;\n }", "@Override\n protected void doEnsureSettingHasValue(Boolean value) throws Throwable {\n loadUrlSyncByContent(mXWalkContent, client,\n UrlUtils.getTestFileUrl(\"xwalkview/localStorage.html\"));\n assertEquals(\n value == ENABLED ? HAS_LOCAL_STORAGE : NO_LOCAL_STORAGE,\n client.getChangedTitle());\n }", "Boolean autoSync();", "boolean hasAutomlObjectTrackingConfig();", "private void checkPreferences() {\n String email = pref.get(EMAIL, EMPTY);\n String hashedPassword = pref.get(PASSWORD, EMPTY);\n if(!email.equals(EMPTY) && !hashedPassword.equals(EMPTY)){\n rememberMe.setSelected(true);\n emailField.setText(email);\n String passTemp = getStringWithPasswordLength();\n passwordField.setText(passTemp);\n }\n }", "private boolean isDeviceProvisionedInSettingsDb() {\n return Settings.Global.getInt(this.mContext.getContentResolver(), \"device_provisioned\", 0) != 0;\n }", "default boolean isNeedToBeUpdated()\n {\n return getUpdateState().isUpdated();\n }", "public String getSyncStatus(){\n String msg = null;\n if(this.dbSyncCount() == 0){\n msg = \"SQLite and Remote MySQL DBs are in Sync!\";\n }else{\n msg = \"DB Sync neededn\";\n }\n return msg;\n }", "public void setActualsInSync(boolean actualsInSync)\r\n {\r\n m_actualsInSync = actualsInSync;\r\n }", "boolean hasSettings();", "boolean hasSettings();", "public void setSync(boolean sync) {\n this.sync = sync;\n }", "public boolean isUserSettingsOK() {\r\n return (userSettings != null && userSettings.isValid());\r\n }", "boolean hasUpdateUfsMode();", "public boolean sync() throws VlException \n\t{\n\t return false; \n\t}", "boolean isSetCurrentrun();", "public String getSyncStatus(){\n\n String msg = null;\n if(this.dbSyncCount() == 0){\n msg = \"SQLite and Remote MySQL DBs are in Sync!\";\n }else{\n msg = \"DB Sync needed\\n\";\n }\n return msg;\n }", "public boolean getMasterSyncAutomatically() {\n return ContentResolver.getMasterSyncAutomatically();\n }", "public String getSyncStatus()\n {\n String msg = null;\n if(this.dbSyncCount() == 0)\n {\n msg = \"SQLite and Remote MySQL DBs are in Sync!\";\n }else{\n msg = \"DB Sync needed\\n\";\n }\n return msg;\n }", "@Override public boolean requireAllPresenceValues() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_requireAllPresenceValues, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "public int getUserSyncState() {\n return userSyncState;\n }", "@Override\n public boolean getAutoTimeRequired() {\n if (!mHasFeature) {\n return false;\n }\n synchronized (getLockObject()) {\n ActiveAdmin deviceOwner = getDeviceOwnerAdminLocked();\n if (deviceOwner != null && deviceOwner.requireAutoTime) {\n // If the device owner enforces auto time, we don't need to check the PO's\n return true;\n }\n\n // Now check to see if any profile owner on any user enforces auto time\n for (Integer userId : mOwners.getProfileOwnerKeys()) {\n ActiveAdmin profileOwner = getProfileOwnerAdminLocked(userId);\n if (profileOwner != null && profileOwner.requireAutoTime) {\n return true;\n }\n }\n\n return false;\n }\n }", "private void checkPreferences() {\n final Editor editor = AppUtils.getInstance().pPrefs.edit();\n boolean changed = false;\n if (AppUtils.getInstance().pPrefs.getString(Api.PREF_MODE, \"\").length() == 0) {\n editor.putString(Api.PREF_MODE, Api.MODE_WHITELIST);\n changed = true;\n }\n if (changed)\n editor.commit();\n }", "public boolean synchronize() {\n\t\treturn false;\n\t}", "public boolean isSynchronized() {\n return (getAccessFlags() & Constants.ACCESS_SYNCHRONIZED) > 0;\n }", "public void setSyncFlag(Boolean syncFlag) {\n this.syncFlag = syncFlag;\n }", "public void setSyncFlag(Boolean syncFlag) {\n this.syncFlag = syncFlag;\n }", "public boolean isSynchronized()\n {\n ensureLoaded();\n return m_flags.isSynchronized();\n }", "private void checkForDefaultSharedPreferences(){\n preferenceValuesAreDefault = (preferredMovieGenre.equals(getString(R.string.pref_genre_any_value)) &&\n preferredStartYear.equals(getString(R.string.pref_earliest_year_default)) &&\n preferredEndYear.equals(getString(R.string.pref_latest_year_default)));\n }", "public Boolean outOfSync() {\n return this.outOfSync;\n }", "public boolean isForceCheckIn() {\n return this.forceCheckIn;\n }", "protected boolean isMultiplePropertiesChanging() {\n return multiplePropertiesChanging;\n }", "public boolean isSendOnlyUpdatedField() {\n return sendOnlyUpdatedField;\n }", "private boolean areRealmsNotificationsEnabled()\r\n\t{\r\n\t\treturn Minecraft.getMinecraft().gameSettings.getOptionOrdinalValue(GameSettings.Options.REALMS_NOTIFICATIONS) && this.realmsNotification != null;\r\n\t}", "boolean hasObjectTrackingConfig();", "private void checkSyncFlags(GridIoMessage msg) {\n if (!(ClientAbstractMultiNodeSelfTest.commSpiEnabled))\n return;\n\n Object o = msg.message();\n if (!(o instanceof GridDistributedLockRequest))\n return;\n\n IgniteKernal g = ((IgniteKernal) (G.ignite(ignite.configuration().getNodeId())));\n GridCacheContext<Object, Object> cacheCtx = g.internalCache(ClientAbstractMultiNodeSelfTest.REPLICATED_ASYNC_CACHE_NAME).context();\n IgniteTxManager tm = cacheCtx.tm();\n GridCacheVersion v = version();\n IgniteInternalTx t = tm.tx(v);\n if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject(\"x1\"))))\n assertEquals((\"Invalid tx flags: \" + t), CacheWriteSynchronizationMode.FULL_ASYNC, syncMode());\n else\n if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject(\"x2\"))))\n assertEquals((\"Invalid tx flags: \" + t), CacheWriteSynchronizationMode.FULL_SYNC, syncMode());\n else\n if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject(\"x3\"))))\n assertEquals((\"Invalid tx flags: \" + t), CacheWriteSynchronizationMode.FULL_ASYNC, syncMode());\n else\n if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject(\"x4\"))))\n assertEquals((\"Invalid tx flags: \" + t), CacheWriteSynchronizationMode.FULL_SYNC, syncMode());\n\n\n\n\n }", "public boolean shouldUpdateVersionOnOwnedMappingChange(){\r\n return this.lockOnChangeMode == LockOnChange.OWNING;\r\n }", "boolean getValidSettings();", "protected boolean useRemoteSync(UMOEvent event)\n {\n boolean remoteSync = false;\n if (event.getEndpoint().getConnector().isRemoteSyncEnabled())\n {\n remoteSync = event.getEndpoint().isRemoteSync()\n || event.getMessage().getBooleanProperty(\n MuleProperties.MULE_REMOTE_SYNC_PROPERTY, false);\n if (remoteSync)\n {\n // component will be null for client calls\n if (event.getComponent() != null)\n {\n remoteSync = event.getComponent().getDescriptor().getResponseRouter() == null;\n }\n }\n }\n if (!remoteSync)\n {\n event.getMessage().removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY);\n }\n return remoteSync;\n }", "public static Boolean getKeyTippNotifications() {\n\n\t\tSharedPreferences sharedPref = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(MainActivity.getContext());\n\t\tBoolean syncConnPref = sharedPref.getBoolean(keyTippNotifications,\n\t\t\t\tfalse);\n\n\t\treturn syncConnPref;\n\t}", "@VTID(39)\n boolean getRequireManualUpdate();", "public synchronized boolean m58821d() {\n C15665p loadSettingsData;\n loadSettingsData = this.f48447c.loadSettingsData(SettingsCacheBehavior.SKIP_CACHE_LOOKUP);\n m58817a(loadSettingsData);\n if (loadSettingsData == null) {\n C15608c.m58560h().mo12794e(\"Fabric\", \"Failed to force reload of settings from Crashlytics.\", null);\n }\n return loadSettingsData != null;\n }", "void checkConnection() {\n\n //Call method which checks for connection.\n boolean isNetworkConnected = isNetworkConnected();\n\n //If there is a data connection currently available for use, attempt to authenticate login details with Firebase,\n // allow user to login offline but without a profile and access only to local storage.\n if(isNetworkConnected) {\n\n //If there is an active data connection, set authenticated value to true\n authenticated = true;\n }\n\n else {\n\n //If there is an active data connection, set authenticated value to false\n authenticated = false;\n }\n }", "public boolean mayRestore() {\n return Objects.nonNull(serverToken) && Objects.nonNull(clientToken);\n }", "public boolean is_set_json_conf() {\n return this.json_conf != null;\n }", "@Override\r\n\tpublic boolean isSynchronized() {\n\t\treturn false;\r\n\t}", "public static boolean isSyncPolicyStoreEnabled(Configuration conf) {\n boolean syncStoreOnCreate;\n boolean syncStoreOnDrop;\n boolean syncStoreOnAlter;\n\n syncStoreOnCreate = Boolean\n .parseBoolean(conf.get(AUTHZ_SYNC_CREATE_WITH_POLICY_STORE.getVar(),\n AUTHZ_SYNC_CREATE_WITH_POLICY_STORE.getDefault()));\n syncStoreOnDrop = Boolean.parseBoolean(conf.get(AUTHZ_SYNC_DROP_WITH_POLICY_STORE.getVar(),\n AUTHZ_SYNC_DROP_WITH_POLICY_STORE.getDefault()));\n syncStoreOnAlter = Boolean.parseBoolean(conf.get(AUTHZ_SYNC_ALTER_WITH_POLICY_STORE.getVar(),\n AUTHZ_SYNC_ALTER_WITH_POLICY_STORE.getDefault()));\n\n return syncStoreOnCreate || syncStoreOnDrop || syncStoreOnAlter;\n }", "public synchronized boolean m58820c() {\n C15665p loadSettingsData;\n loadSettingsData = this.f48447c.loadSettingsData();\n m58817a(loadSettingsData);\n return loadSettingsData != null;\n }", "public final boolean isValueLockedSetted() {\n\t\treturn engine.isPropertySetted(Properties.VALUE_LOCKED);\n\t}", "public boolean isRefreshRequired() {\r\n boolean retValue;\r\n retValue = super.isRefreshRequired();\r\n return retValue;\r\n }", "public @Bool boolean isLocked()\r\n\t\tthrows PropertyNotPresentException;", "protected boolean validateProperties() throws IOException, Throwable {\n return (disableDNS() &&\n rebootAndWait(\"all\") &&\n changeProps() &&\n enableDNS() &&\n rebootAndWait(\"all\"));\n }", "public SyncOption getSyncOption() {\n return this.SyncOption;\n }", "public boolean checkChangeSavedAction(){\n ((AccountDetailFragment) getFragment(AccountDetailFragment.class)).syncData();\n if(mLastSaveAccount != null){\n return mLastSaveAccount.equalAllFields(mCurrentAccount);\n }else{\n return true;\n }\n }", "private boolean userMadeChanges() {\n\t\treturn userMadeChanges(null);\n\t}", "private boolean hasUserImportantView() {\n int userID = this.sharedPreferences.getInt(Constants.SP_USER_ID_KEY, 0);\n return this.sharedPreferences.getBoolean(serverName + \"_\" + userID, false);\n }", "private boolean checkUserData() {\n UserAccount userAccount = new UserAccount(this);\n customer = userAccount.getCustomer();\n return customer != null;\n }", "final public boolean requiresProtection()\r\n {\r\n return requires_PRO;\r\n }", "boolean isClockNotSynchronized();", "@Override\n\tpublic boolean isConsistent() {\n\t\treturn true;\n\t}", "private boolean isOptionFileExists(){\n SharedPreferences sp = getActivity().getPreferences(Context.MODE_PRIVATE);\n if (sp.contains(\"OptionsJson\")){\n return true;\n }\n else return false;\n }", "private static boolean verifyProperties(Properties pProperties){\n boolean completeParams = false;\n if (pProperties.getProperty(UtilsConnection.CONSUMER_KEY) != null &&\n pProperties.getProperty(UtilsConnection.CONSUMER_SECRET) != null &&\n pProperties.getProperty(UtilsConnection.ACCESS_TOKEN) != null &&\n pProperties.getProperty(UtilsConnection.ACCESS_TOKEN_SECRET) != null )\n completeParams = true;\n return completeParams;\n }", "@java.lang.Override\n public boolean hasDeviceSettings() {\n return deviceSettings_ != null;\n }", "boolean hasSetProperty();", "public boolean isSetIsinctransfer() {\n return __isset_bit_vector.get(__ISINCTRANSFER_ISSET_ID);\n }", "boolean hasOfflineUserDataJob();", "public boolean isWatching() {\n return isPubKeyOnly();\n }", "boolean isDataConnectionAsDesired() {\n boolean roaming = phone.getServiceState().getRoaming();\n\n if (phone.mSIMRecords.getRecordsLoaded() &&\n phone.mSST.getCurrentGprsState() == ServiceState.STATE_IN_SERVICE &&\n (!roaming || getDataOnRoamingEnabled()) &&\n !mIsWifiConnected ) {\n return (state == State.CONNECTED);\n }\n return true;\n }", "public boolean isSetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(VALUE$12) != null;\n }\n }", "@Override\n public boolean isDirty() {\n\n boolean dirty = false ;\n String tmp = null ;\n\n if( this.useProxy != super.useProxyCB.isSelected() ) {\n dirty = true ;\n }\n if( !dirty ) {\n tmp = super.proxyHostTF.getText() ;\n dirty = !UIHelper.isEqual( this.proxyHost, tmp ) ;\n }\n if( !dirty ) {\n tmp = super.proxyPortTF.getText() ;\n dirty = !UIHelper.isEqual( String.valueOf( this.proxyPort ), tmp ) ;\n }\n if( !dirty ) {\n if( this.useAuth != super.useProxyAuthCB.isSelected() ) {\n dirty = true ;\n }\n }\n if( !dirty ) {\n tmp = super.userIdTF.getText() ;\n dirty = !UIHelper.isEqual( this.userName, tmp ) ;\n }\n if( !dirty ) {\n tmp = new String( super.passwordTF.getPassword() ) ;\n dirty = !UIHelper.isEqual( String.valueOf( this.password ), tmp ) ;\n }\n\n return dirty ;\n }", "@Schema(description = \"Whether to skip attempting to do a synced flush on the filesystem of the container (default: false), which is less safe but may be required if the container is unhealthy\")\n public Boolean isSkipSyncedFlush() {\n return skipSyncedFlush;\n }", "private boolean hasChanges() {\n for (Map.Entry<EditText, Integer> e : mPrefKeys.entrySet()) {\n String field = e.getKey().getText().toString();\n String pref = Pref.get(this, e.getValue()).replace(Data.DEACTIVATED_MARKER, \"\");\n if (!field.equals(pref))\n return true;\n }\n return false;\n }", "private boolean isAutoRemoveUnknownShares(Session session) {\n Property property = XctxFileStorageProperties.AUTO_REMOVE_UNKNOWN_SHARES;\n try {\n return services.getServiceSafe(LeanConfigurationService.class).getBooleanProperty(session.getUserId(), session.getContextId(), property);\n } catch (OXException e) {\n LOG.error(\"Error getting {}, falling back to defaults.\", property, e);\n return b(property.getDefaultValue(Boolean.class));\n }\n }", "public boolean isSetUpdate_time() {\n return this.update_time != null;\n }", "public boolean hasSettings() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "private void isSystemReady() {\n\tif ((moStore.getAuthenticationDefinition().getQuery() == null)\n\t\t|| moStore.getJdbcConnectionDetails() == null) {\n\t moSessionStore.setSystemToHaltState();\n\n\t return;\n\t}// if ((moStore.getAuthenticationDefinition().getQuery() == null)\n\n\tmoSessionStore.setSystemToReadyState();\n }", "public void isCurrentSettingOn() {\n // Clear events before putting them back\n currentPersonEvents.clear();\n\n ArrayList<String> currentPeopleList = new ArrayList<String>();\n\n if(isMaleEventsOn) {\n currentPeopleList.addAll(maleSpouse);\n }\n if(isFemaleEventsOn) {\n currentPeopleList.addAll(femaleSpouse);\n }\n\n if(isMaleEventsOn && isFatherSideOn) {\n currentPeopleList.addAll(paternalAncestorsMales);\n }\n\n if(isFemaleEventsOn && isMotherSideOn) {\n currentPeopleList.addAll(paternalAncestorsFemales);\n }\n\n if(isMaleEventsOn && isMotherSideOn) {\n currentPeopleList.addAll(maternalAncestorsMales);\n }\n if(isFemaleEventsOn && isMotherSideOn) {\n currentPeopleList.addAll(maternalAncestorsFemales);\n }\n\n for (int i = 0; i < currentPeopleList.size(); i++) {\n\n String personID = currentPeopleList.get(i);\n ArrayList<Event> eventList = personEvents.get(personID);\n\n currentPersonEvents.put(personID, eventList);\n }\n }", "public boolean isConsistent() {\n\t\tif (fRepoPath == null || (fStartId == null && fHistoryLength < 0))\n\t\t\treturn false;\n\n\t\tif (fOutputHunkGraph)\n\t\t\treturn true;\n\n\t\tif (fBuildPath == null)\n\t\t\treturn false;\n\n\t\tif (fTestClassRootPath != null && fClassRootPath != null)\n\t\t\treturn true;\n\n\t\tif ((fTestJacocoExecPath == null) != (fSourceRootPath.size() == 0)\n\t\t\t\t|| (fTestJacocoExecPath == null) != (fClassRootPath == null)\n\t\t\t\t|| (fClassRootPath == null) != (fSourceRootPath.size() == 0))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public boolean isSetValue() {\n return this.value != null;\n }", "private boolean _requiresOnboarding() {\n return OnboardingModel.getOnboardingData() == null;\n }", "public boolean isSetValue() {\n return this.value != null;\n }", "public boolean hasSettings() {\n return ((bitField0_ & 0x00000200) == 0x00000200);\n }", "@Override\r\n protected boolean validateSystemSettings() {\n return true;\r\n }", "public boolean isStoredInObject() {\r\n return lockValueStored == IN_OBJECT;\r\n }" ]
[ "0.67024916", "0.6646394", "0.66243565", "0.6428483", "0.63842684", "0.6225687", "0.6225687", "0.6216846", "0.615314", "0.6115072", "0.60322464", "0.5913244", "0.5909951", "0.5909134", "0.5900908", "0.5835054", "0.58067846", "0.58057976", "0.57881397", "0.5786076", "0.57767683", "0.57707506", "0.57483965", "0.57070047", "0.57022995", "0.56951636", "0.56951636", "0.56939095", "0.56864554", "0.5676436", "0.56717324", "0.5650174", "0.5641832", "0.56416196", "0.56290215", "0.56186897", "0.5591951", "0.5579632", "0.5572667", "0.5571397", "0.5562712", "0.5551359", "0.5551359", "0.555132", "0.55494356", "0.55381167", "0.5529807", "0.55105186", "0.5505765", "0.5504326", "0.54983836", "0.5490984", "0.5489011", "0.5488056", "0.5479584", "0.54755473", "0.54726374", "0.54660064", "0.5458731", "0.54554516", "0.54412276", "0.54392403", "0.54305106", "0.5425458", "0.5423407", "0.54211825", "0.54196024", "0.540915", "0.5400048", "0.53995097", "0.53985614", "0.5398063", "0.53931975", "0.53845376", "0.5382326", "0.538127", "0.53773904", "0.53768426", "0.5375106", "0.5371501", "0.5368304", "0.5366913", "0.5360487", "0.53598756", "0.5358478", "0.53561795", "0.5352159", "0.53514946", "0.5351104", "0.5348917", "0.5346101", "0.5345819", "0.53403646", "0.5325827", "0.5325811", "0.5325717", "0.5321034", "0.531369", "0.53091455", "0.5307188" ]
0.6292884
5
Method writes to the sharedPreferences file
public void writeSyncPreferences(String string){ mSharedPreference = mContext.getSharedPreferences(mContext.getString( R.string.sharedpreferencesFileName),Context.MODE_PRIVATE); SharedPreferences.Editor editor = mSharedPreference.edit(); editor.putString(getCurrentIdentity(),string); editor.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void savePreference() {\n\t\tString myEmail = ((TextView) findViewById(R.id.myEmail)).getText().toString();\n\t\tString myPassword = ((TextView) findViewById(R.id.myPassword)).getText().toString();\n\t\t\n\t\tEditor editor = sharedPreferences.edit();\n\t\teditor.putString(\"myEmail\", myEmail);\n\t\teditor.putString(\"myPassword\", myPassword);\n\t\teditor.putString(\"readOPtion\", Constants.READ_OPTION_SUBJECT_ONLY);\n\t\teditor.putInt(\"increment\", 10);\n\t\teditor.putString(\"bodyDoneFlag\", bodyDoneFlag);\n\t\teditor.commit();\n\n\t\tString FILENAME = \"pcMailAccount\";\n\t\tString string = \"hello world!\";\n\t\tString del = \"_____\";\n\t\t\n\t\tFile folder = new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM + \"/VoiceMail\");\n\t\tif (!folder.isDirectory()) {\n\t\t\tfolder.mkdirs();\n\t\t}\n \n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfolder.createNewFile();\n//\t\t\tfos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\t fos = new FileOutputStream(new File(folder, FILENAME));\n\t string = \"myEmail:\" + myEmail + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"myPassword:\" + myPassword + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"bodyDoneFlag:\" + bodyDoneFlag + del;\n\t\t\tfos.write(string.getBytes());\n\t\t\t\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private final synchronized void writePreferencesImpl() {\n if ( LOGD ) { Log.d( TAG, \"writePreferencesImpl \" + mPrefFile + \" \" + mPrefKey ); }\n\n mForcePreferenceWrite = false;\n\n SharedPreferences pref =\n Utilities.getContext().getSharedPreferences( mPrefFile, Context.MODE_PRIVATE );\n SharedPreferences.Editor edit = pref.edit();\n edit.putString( mPrefKey, getSerializedString() );\n Utilities.commitNoCrash(edit);\n }", "public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public static void SavePreferences()\n {\n try\n {\n StartSaveAnimation();\n PrintWriter writer = new PrintWriter(preferences_file_name, \"UTF-8\");\n \n writer.print(Utilities.BoolToInt(MusicManager.enable_music) + \"\\r\\n\");\n writer.print(Utilities.BoolToInt(PassiveDancer.englishMode) + \"\\r\\n\");\n \n writer.close();\n }\n catch(Exception e) { System.out.println(\"Problem writing in the file \" + preferences_file_name + \".\"); }\n }", "public void write() throws IOException {\n // No pairs to write\n if(map.size() == 0 || !isDirty) {\n System.err.println(\"preferences is already updated..\");\n return;\n }\n\n try(BufferedWriter bufferedWriter = Files.newBufferedWriter(fileName,\n StandardOpenOption.TRUNCATE_EXISTING,\n StandardOpenOption.CREATE))\n {\n for(Map.Entry<String, String> entry : map.entrySet()) {\n String key = entry.getKey();\n String value = entry.getValue();\n\n // Writes the current pair value in the format of 'key=value'\n bufferedWriter.write(String.format(\"%s=%s\\n\", key, value));\n }\n }\n\n isDirty = false;\n }", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\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 }", "private void saveSettings()\n {\n try\n {\n // If remember information is true then save the ip and port\n // properties to the projects config.properties file\n if ( rememberLoginIsSet_ )\n {\n properties_.setProperty( getString( R.string.saved_IP ), mIP_ );\n properties_.setProperty( getString( R.string.saved_Port ),\n mPort_ );\n }\n\n // Always save the remember login boolean\n properties_.setProperty( getString( R.string.saveInfo ),\n String.valueOf( rememberLoginIsSet_ ) );\n\n File propertiesFile =\n new File( this.getFilesDir().getPath().toString()\n + \"/properties.txt\" );\n FileOutputStream out =\n new FileOutputStream( propertiesFile );\n properties_.store( out, \"Swoop\" );\n out.close();\n }\n catch ( Exception ex )\n {\n System.err.print( ex );\n }\n }", "public void save() {\n savePrefs();\n }", "private void savePreferences(String key, String value) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(c);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public void save() {\n // Convert the settings to a string\n String output = readSettings();\n \n try {\n // Make sure the file exists\n if (!settingsFile.exists()) {\n File parent = settingsFile.getParentFile();\n parent.mkdirs();\n settingsFile.createNewFile(); \n }\n \n // Write the data into the file\n BufferedWriter writer = new BufferedWriter(new FileWriter(settingsFile));\n writer.write(output);\n writer.close(); \n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected void SavePreferences(String key, String value) {\n SharedPreferences data = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = data.edit();\n editor.putString(key, value);\n editor.commit();\n\n\n }", "private void savePreferences(String key, String value) {\n\t\tSharedPreferences sp = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tEditor edit = sp.edit();\n\t\tedit.putString(key, value);\n\t\tedit.commit();\n\t}", "public void writeEncounterNumPreferences(long encounterNum){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=mSharedPreference.edit();\n editor.putLong(mContext.getString(R.string.encounter),encounterNum);\n editor.commit();\n}", "void savePreferences() throws OntimizeJEERuntimeException;", "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 }", "public static boolean saveSharedPreferencesToFile(File dst, Context context) {\n\t\tboolean res = false;\n\t\tObjectOutputStream output = null;\n\t\ttry {\n\t\t\toutput = new ObjectOutputStream(new FileOutputStream(dst));\n\t\t\tSharedPreferences pref = PreferenceManager\n\t\t\t\t\t.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences adminPreferences = context.getSharedPreferences(\n\t\t\t\t\tAdminPreferencesActivity.ADMIN_PREFERENCES, 0);\n\n\t\t\t// output.writeObject(pref.getAll());\n\t\t\t// output.writeObject(adminPreferences.getAll());\n\n\t\t\tGson gson = new Gson();\n\t\t\toutput.writeObject(gson.toJson(pref.getAll()));\n\t\t\toutput.writeObject(gson.toJson(adminPreferences.getAll()));\n\t\t\tLog.i(\"AdminPreferencesActivity\", gson.toJson(pref.getAll()));\n\t\t\tLog.i(\"AdminPreferencesActivity\", gson.toJson(adminPreferences.getAll()));\n\t\t\t\n\t\t\tres = true;\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} finally {\n\t\t\ttry {\n\t\t\t\tif (output != null) {\n\t\t\t\t\toutput.flush();\n\t\t\t\t\toutput.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "private synchronized void storeAppSettings() {\n\t \n\t\n \tif(_appSettings != null){\t\n \t\tAppLogger.debug2(\"AppFrame.storeAppSettings saving.\");\n\n \t\ttry {\t \n \t\t\tFileOutputStream oFile = new FileOutputStream(_configFile);\n\t\t\tOutputStream setupOutput = new DataOutputStream(oFile);\t\t \t\t\t\t\n\t\t\t_appSettings.store(setupOutput, \"\");\t\t\n \t\t}catch(Exception oEx){\n \t\tAppLogger.error(oEx);\n \t\t}\t\t \t\t\t\t\t\t\n\t}\t\t\t\t \t\n }", "private static void persistSettings() {\n\t\ttry {\n\t\t\tBufferedWriter userConf = new BufferedWriter(new FileWriter(\n\t\t\t\t\tconf.getAbsolutePath()));\n\t\t\tproperties.store(userConf, null);\n\t\t\t// flush and close streams\n\t\t\tuserConf.flush();\n\t\t\tuserConf.close();\n\t\t} catch (IOException e) {\n\t\t\tlog.severe(\"Couldn't save config file.\");\n\t\t}\n\t}", "private static void writeStringValue(String path, String value){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(path, value);\n editor.apply();\n }", "@Override\n\n public void onClick(View arg0) {\n\n File f=new File(e1.getText().toString());\n\n FileWriter fw = null;\n\n try {\n fw = new FileWriter(f);\n } catch (IOException e3) {\n\n//\tTODO Auto-generated catch block\n\n e3.printStackTrace();\n }\n try {\n\n fw.write(e2.getText().toString());\n } catch (IOException e2) {\n// TODO Auto-generated catch block\n e2.printStackTrace();\n }\n try {\n\n fw.close();\n } catch (IOException e2) {\n\n//\tTODO Auto-generated catch block\n\n e2.printStackTrace();\n }\n SharedPreferences.Editor\n\n e=getPreferences(MODE_PRIVATE).edit();\n e.putString(\"fpath\", f.getPath());\n e.commit();\n Toast.makeText(getApplicationContext(), \"Saved Successfully\", Toast.LENGTH_LONG).show();\n\n }", "public void writeToSharedPreference(int value){\n SharedPreferences sharedPreferences = getActivity().getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putInt(\"NUMBER OF ITEMS\",value);\n editor.commit();\n\n }", "private void writePref() {\n SharedPreferences.Editor editor = sp.edit();\n long currentTime = System.currentTimeMillis();\n editor.putLong(UPDATE, currentTime);\n editor.commit();\n System.out.println(\"Time of current update: \" + getDateFromLong(currentTime));\n }", "public void saveDataToSharedPreference(View view) {\n email = emailEditText.getText().toString();\n name = nameEditText.getText().toString();\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.putString(\"name\",name);\n editor.putString(\"email\",email);\n editor.apply();\n\n Toast.makeText(context, \"Data saved successfully into SharedPreferences!\", Toast.LENGTH_SHORT).show();\n clearText();\n }", "public void save() throws FileNotFoundException, IOException\n {\n settings.store(new FileOutputStream(FILE), \"N3TPD Config File\");\n }", "public void save() {\n\t\tpreferences().flush();\n\t}", "public static void saveSettings() {\n\n Writer output = null;\n try {\n output = new BufferedWriter(new FileWriter(getConfigFile()));\n final Set<String> set = m_Settings.keySet();\n final Iterator<String> iter = set.iterator();\n while (iter.hasNext()) {\n final String sKey = iter.next();\n final String sValue = m_Settings.get(sKey);\n output.write(sKey + \"=\" + sValue + \"\\n\");\n }\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n finally {\n if (output != null) {\n try {\n output.close();\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n }\n }\n\n }", "public void savePreferences() {\n\t\tfinal IEclipsePreferences prefs = getPreferences();\n\t\ttry {\n\t\t\tprefs.flush();\n\t\t} catch (BackingStoreException e) {\n\t\t\tgetILog().log(createStatus(IStatus.ERROR, e));\n\t\t}\n\t}", "public void writeUserLog(String name){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"userlist\" ,name);\n mydata.commit();\n }", "public void storeUserPrefs(User user) {\n //start writing (open the file)\n SharedPreferences.Editor editor = prefs.edit();\n //put the data\n Gson gson = new Gson();\n String json = gson.toJson(user);\n editor.putString(USER_PREFS, json);\n //close the file\n editor.apply();\n }", "public void savePreferences(SharedPreferences preferences){\r\n\t\tSharedPreferences.Editor editor = preferences.edit();\r\n editor.putBoolean(\"initialSetupped\", initialSetuped);\r\n editor.putString(\"username\", userName);\r\n editor.putString(\"useremail\", userEmail);\r\n editor.putString(\"recipientemail\", recipientEmail);\r\n editor.putBoolean(\"option\", option.isPound());\r\n\r\n // Commit the edits!\r\n editor.commit();\r\n\t}", "public void saveData(){\n SharedPreferences sharedPreferences = getSharedPreferences(\"SHARED_PREFS\",MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"email_pref\",email.getText().toString());\n editor.putString(\"password_pref\",uPassword.getText().toString());\n editor.apply();\n }", "private void writeAccount() {\n SharedPreferences pref = getSharedPreferences(\"ACCOUNT\", Context.MODE_PRIVATE);\n SharedPreferences.Editor edt = pref.edit();\n\n edt.putString(\"email\", Me.getInstance().getEmail());\n edt.putString(\"password\", txtPassword.getText().toString().trim());\n\n edt.commit();\n }", "public void writeUserInro(String name,String key){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"uName\" ,name);\n mydata.putString(\"uKey\",key);\n mydata.commit();\n }", "private void exportSettings() {\n\t\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\t\tint returnVal = chooser.showSaveDialog(null);\n\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\tFile saved = chooser.getSelectedFile();\n\t\t\t\ttry {\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(saved));\n\t\t\t\t\twriter.write(mySettings);\n\t\t\t\t\twriter.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t}", "public static boolean saveSharedPreferencesToJsonFile(File dst, Context context) {\n\t\t\n\t\tSharedPreferences pref = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tSharedPreferences adminPreferences = context.getSharedPreferences(\n\t\t\t\tAdminPreferencesActivity.ADMIN_PREFERENCES, 0);\n\n\t\tGson gson = new Gson();\n\t\tString jsonPrefs = \"{\\n\\\"general_preferences\\\": \" + gson.toJson(pref.getAll()) + \",\\n\" \n\t\t\t\t\t\t+ \"\\\"admin_preferences\\\": \" + gson.toJson(adminPreferences.getAll())\n\t\t\t\t\t\t+ \"}\";\n\t\tLog.d(\"AdminPreferencesActivity\", jsonPrefs);\n\t\t\n\t\treturn FileUtils.writeStringToFile(dst, jsonPrefs);\n\t}", "private void savePreferences() {\n SharedPrefStatic.mJobTextStr = mEditTextJobText.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobSkillStr = mEditTextSkill.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobLocationStr = mEditTextLocation.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobAgeStr = mEditTextAge.getText().toString().replace(\" \", \"\");\n\n SharedPreferences sharedPref = getSharedPreferences(AppConstants.PREF_FILENAME, 0);\n SharedPreferences.Editor editer = sharedPref.edit();\n editer.putString(AppConstants.PREF_KEY_TEXT, SharedPrefStatic.mJobTextStr);\n editer.putString(AppConstants.PREF_KEY_SKILL, SharedPrefStatic.mJobSkillStr);\n editer.putString(AppConstants.PREF_KEY_LOCATION, SharedPrefStatic.mJobLocationStr);\n editer.putString(AppConstants.PREF_KEY_AGE, SharedPrefStatic.mJobAgeStr);\n\n // The commit runs faster.\n editer.apply();\n\n // Run this every time we're building a query.\n SharedPrefStatic.buildUriQuery();\n SharedPrefStatic.mEditIntentSaved = true;\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 }", "public static void saveToSharedPreference(String key, String value) {\n\n appSharePreference.edit().putString(key.toString(), value.toString()).apply();\n }", "public void savingPreferences()\n {\n SharedPreferences sharedPreferences = getSharedPreferences(preferenceSaveInfo,MODE_PRIVATE);\n\n\n //tao doi tuong editer\n SharedPreferences.Editor editor = sharedPreferences.edit();\n String user = txtUserName.getText().toString();\n String pass = txtPassWord.getText().toString();\n\n boolean bchk = chkSave.isChecked();\n\n\n if(!bchk)\n {\n //xoa du lieu luu truoc do\n editor.clear();\n }\n else\n {\n editor.putString(\"user\",user);\n editor.putString(\"pass\",pass);\n editor.putBoolean(\"checked\",bchk);\n }\n\n editor.commit();\n\n\n }", "private void savePreferences(){\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putInt(\"p1Count\", pOneCounter);\n editor.putInt(\"p2Count\", pTwoCounter);\n editor.putInt(\"pAICount\", pAICounter);\n editor.putInt(\"tieCount\", tieCounter);\n\n editor.commit();\n }", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final String value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putString(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "public synchronized static void saveSettings() {\n try {\n ObjectOutputStream objectOutputStream = null;\n try {\n objectOutputStream = new ObjectOutputStream(new FileOutputStream(settingsfile));\n objectOutputStream.writeUnshared(transferITModel.getProperties());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getHostHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUsernameHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getPasswordHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUsers());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUserRights());\n objectOutputStream.reset();\n objectOutputStream.flush();\n } catch (IOException ex1) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex1);\n }\n objectOutputStream.close();\n } catch (IOException ex) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void saveInPreference(String name, String content) {\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tSharedPreferences.Editor editor = preferences.edit();\n\t\teditor.putString(name, content);\n\t\teditor.commit();\n\t}", "public void saveValueToSharedPreference(Context context, String fileKey, Integer mode, String key, @Nullable String value) {\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileKey, mode);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value).apply();\n }", "public static void saveToPrefs(Context context,String key, String value) {\n SharedPreferences prefs = getSettings();\n final SharedPreferences.Editor editor = prefs.edit();\n editor.putString(key, value);\n editor.apply();\n }", "protected void storeSharedPrefs(String un2, String pwd2) {\n \teditor.putString(\"username\", un2);\n \teditor.putString(\"password\", pwd2); \t\n\t\teditor.commit(); //Commiting changes\n\t}", "public void update_storage( ) {\n SharedPreferences sp_file = getPreferences(Context.MODE_PRIVATE); //make shared preferences object\n SharedPreferences.Editor editor = sp_file.edit(); //make editor object\n editor.putInt(\"alarm_set\", alarm_set);\n editor.apply();\n }", "public static void save() throws IOException {\n FileOutputStream f_out = new\n FileOutputStream(settingsFile);\n ObjectOutputStream o_out = new\n ObjectOutputStream(f_out);\n SettingsSaver s = new SettingsSaver();\n o_out.writeObject(s);\n o_out.close();\n f_out.close();\n }", "protected void savePreferences() {\n String tmp_hostname = hostname.getHostName();\n System.out.println(\"stringified hostname was: \" + tmp_hostname);\n if (tmp_hostname != null) {\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"last_hostname\", tmp_hostname);\n editor.commit();\n }\n }", "public static void writeBoolean(Context context, String fileName, String key, boolean value) {\n if (context == null)\n return;\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileName, Context.MODE_PRIVATE);\n Editor editor = sharedPreferences.edit();\n editor.putBoolean(key, value);\n editor.apply();\n }", "public void saveData() {\n try {\n JsonWriter jw = new JsonWriter(openFileOutput(DATA_FILE, Context.MODE_PRIVATE));\n jw.write(user);\n jw.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public void savingVariablesWebConfig(){\n SharedPreferences prefs = getSharedPreferences(Constants.PREFERENCES_NAME, Context.MODE_PRIVATE);\n //Save data of user in preferences\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_ACCEPTED, \"3\");\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_VISIBLE, \"10\");\n editor.putString(Constants.PREF_VALUE_MAX_TIME_ORDERS, \"15\");\n editor.commit();\n }", "public void storePreferences(String userid, String token, JSONArray settings) throws JSONException {\n SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences(\"ca.gc.inspection.scoop\", Context.MODE_PRIVATE);\n\n JSONObject setting = settings.getJSONObject(0);\n Iterator<String> keys = setting.keys();\n while(keys.hasNext()){\n String settingKey = keys.next();\n if (settingKey.equals(useridStr)){ continue;}\n sharedPreferences.edit().putString(settingKey, setting.getString(settingKey)).apply();\n }\n\n // storing the token into shared preferences\n sharedPreferences.edit().putString(\"token\", token).apply();\n Config.token = token;\n\n // storing the user id into shared preferences\n sharedPreferences.edit().putString(useridStr, userid).apply();\n Config.currentUser = userid;\n\n // change activities once register is successful\n if(Config.token != null && Config.currentUser != null) registerSuccess();\n }", "private void save(String fileName, String json){\n mJSonNotifications = getSharedPreferences(fileName, MODE_PRIVATE);\n mJSonNotifications.edit().putString(fileName, json).apply();\n }", "public void writeKeysToFile(){\n if(d == null){\n calculateKeypair();\n }\n FileHandler fh = new FileHandler();\n fh.writeFile(sbPrivate.toString(), \"sk.txt\");\n fh.writeFile(sbPublic.toString(), \"pk.txt\");\n }", "private void saveSettings() {\n \tLog.i(\"T4Y-Settings\", \"Save mobile settings\");\n \t\n \tmobileSettings.setAllowAutoSynchronization(autoSynchronizationCheckBox.isChecked());\n mobileSettings.setAllowAutoScan(autoScanCheckBox.isChecked());\n mobileSettings.setAllowAutoSMSNotification(autoSMSNotificationCheckBox.isChecked());\n \n \tmainApplication.setMobileSettings(mobileSettings);\n }", "public void saveDictionaryToFile() {\n\t\tdictionary.saveDictionary();\n\t}", "void store() {\n UserPreferences.setLogFileCount(Integer.parseInt(logFileCount.getText()));\n if (!agencyLogoPathField.getText().isEmpty()) {\n File file = new File(agencyLogoPathField.getText());\n if (file.exists()) {\n ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, agencyLogoPathField.getText());\n }\n } else {\n ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, \"\");\n }\n UserPreferences.setMaxSolrVMSize((int)solrMaxHeapSpinner.getValue());\n if (memField.isEnabled()) { //if the field could of been changed we need to try and save it\n try {\n writeEtcConfFile();\n } catch (IOException ex) {\n logger.log(Level.WARNING, \"Unable to save config file to \" + PlatformUtil.getUserDirectory() + \"\\\\\" + ETC_FOLDER_NAME, ex);\n }\n }\n }", "public static void save(String key, String value, String filename,\n Context context) {\n\n SharedPreferences sp = context.getSharedPreferences(filename, 0);\n SharedPreferences.Editor edit = sp.edit();\n edit.putString(key, value);\n edit.commit();\n\n }", "private void savePreferenceData(String role){\n if (getIntent()!=null){\n SharedPreferences preferences = getSharedPreferences(detailPreference, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(preferenceKey, role);\n editor.apply();\n }\n }", "public Save(Game game) {\n\t\tthis(game, \"/\");\n\t\t\n\t\twritePrefs(\"Preferences\");\n\t}", "public void save(File configFile) {\n configFile.getParentFile().mkdirs();\n\n try {\n this.getProperties().store(new FileWriter(configFile), \"Redis Credentials\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void writeStringPrefs(String prefName, String prefValue) {\n editor = sPrefs.edit();\n editor.putString(prefName, prefValue);\n editor.apply();\n }", "public void storePreferences() throws Exception {\n\t\tupdatePreferences();\n\t\tPortletPreferences preferences = getPreferences();\n\t\tpreferences.store();\n\t}", "private static void saveSettings() {\n try {\n File settings = new File(\"settings.txt\");\n FileWriter writer = new FileWriter(settings);\n //Options\n writer.append(defaultSliderPosition + \"\\n\");\n writer.append(isVerticalSplitterPane + \"\\n\");\n writer.append(verboseCompiling + \"\\n\");\n writer.append(warningsEnabled + \"\\n\");\n writer.append(clearOnMethod + \"\\n\");\n writer.append(compileOptions + \"\\n\");\n writer.append(runOptions + \"\\n\");\n //Colors\n for(int i = 0; i < colorScheme.length; i++) \n writer.append(colorScheme[i].getRGB() + \"\\n\");\n writer.append(theme + \"\\n\");\n\n writer.close(); \n } catch (IOException i) {\n println(\"IO exception when saving settings.\", progErr);\n }\n }", "private void guardarPreferences() {\n\n\t\t// se capturan aqui, solo es leer los editText, no tienen metodos\n\t\t// propios en esta clase\n\t\tEditText nicknameText = (EditText) findViewById(R.id.nicknameEditText);\n\t\tEditText emailText = (EditText) findViewById(R.id.emailEditText);\n\n\t\tstrNickname = nicknameText.getText().toString();\n\t\tstrEmail = emailText.getText().toString();\n\t\t\n\t\t\n\t\tEditor editor = mGameSettings.edit();\n\t\t\n\t\t\t\teditor.putString(Constants.GAME_PREFERENCES_NICKNAME, strNickname);\n\t\t\t\teditor.putString(Constants.GAME_PREFERENCES_EMAIL, strEmail);\n\t\t\t\t\n\t\t\t\t//editor.putString(Constants.GAME_PREFERENCES_PASSWORD, strPassword);\n\t\t\t\t//editor.putLong(Constants.GAME_PREFERENCES_DOB, dayOfBirth);\n\t\t\t\teditor.putInt(Constants.GAME_PREFERENCES_GENDER, gender);\n\t\t\t\t//editor.putString(Constants.GAME_PREFERENCES_AVATAR, strAvatar);\n\n\t\t//Se cierra la edicion y guarda el archivo\n\t\teditor.commit();\n\t}", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final boolean value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putBoolean(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }", "public static void save()\n {\n try\n {\n FileOutputStream fOS = new FileOutputStream(propsFile); \n props.store(fOS, \"\");\n fOS.close();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public void storeChoicePrefs(ResultDetail restaurant) {\n SharedPreferences.Editor editor = prefs.edit();\n //put the data\n Gson gson = new Gson();\n String json = gson.toJson(restaurant);\n editor.putString(RESTAURANTS, json);\n //close the file\n editor.apply();\n }", "private void saveData() {\n\n SharedPreferences sharedPreferences=getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n\n editor.putString(\"name\",name.getText().toString());\n editor.putString(\"regnum\",regnum.getText().toString());\n editor.putInt(\"count\", count);\n editor.apply();\n\n }", "public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "private void saveInPreferences(String gameName) {\n //Store name in shared preferences\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"gameName\", gameName);\n editor.commit();\n\n //Check if gameName stored\n //String storedPreference = preferences.getString(\"gameName\",\"none\");\n //Log.d(\"checkGameName\", storedPreference);\n }", "private void saveInFile() {\n try {\n FileOutputStream fOut = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);\n\n OutputStreamWriter writer = new OutputStreamWriter(fOut);\n Gson gson = new Gson();\n gson.toJson(counters, writer);\n writer.flush();\n\n fOut.close();\n\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "private void savePreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n\n editor.putInt(\"entreeIndex\", spEntree.getSelectedItemPosition());\n editor.putInt(\"drinkIndex\", spDrink.getSelectedItemPosition());\n editor.putInt(\"dessertIndex\", spDessert.getSelectedItemPosition());\n\n editor.apply();\n }", "private static void saveJsonFile() {\n Log.println(Log.INFO, \"FileAccessing\", \"Writing settings file.\");\n JsonObject toSave = new JsonObject();\n JsonArray mappingControls = new JsonArray();\n for (int i = 0; i < TaskDetail.actionToTask.size(); i++) {\n JsonObject individualMapping = new JsonObject();\n TaskDetail detail = TaskDetail.actionToTask.valueAt(i);\n byte combinedAction = (byte) TaskDetail.actionToTask.keyAt(i);\n assert detail != null;\n int outerControl = detail.getTask();\n individualMapping.addProperty(\"combinedAction\", combinedAction);\n individualMapping.addProperty(\"task\", outerControl);\n mappingControls.add(individualMapping);\n }\n toSave.add(\"mappingControls\", mappingControls);\n\n JsonArray generalSettings = new JsonArray();\n for (SettingDetail setting : SettingDetail.settingDetails) {\n JsonObject individualSetting = new JsonObject();\n int status = setting.getCurrentIdx();\n individualSetting.addProperty(\"status\", status);\n generalSettings.add(individualSetting);\n }\n toSave.add(\"generalSettings\", generalSettings);\n\n JsonArray deviceList = new JsonArray();\n for (DeviceDetail device : DeviceDetail.deviceDetails) {\n JsonObject individualDevice = new JsonObject();\n individualDevice.addProperty(\"name\", device.deviceName);\n individualDevice.addProperty(\"mac\", device.macAddress);\n deviceList.add(individualDevice);\n }\n toSave.add(\"devices\", deviceList);\n\n JsonArray sensitivityList = new JsonArray();\n for (SensitivitySetting sensitivity : SensitivitySetting.sensitivitySettings) {\n JsonObject individualSensitivity = new JsonObject();\n individualSensitivity.addProperty(\"factor\", sensitivity.multiplicativeFactor);\n individualSensitivity.addProperty(\"sensitivity\", sensitivity.sensitivity);\n sensitivityList.add(individualSensitivity);\n }\n toSave.add(\"sensitivities\", sensitivityList);\n\n toSave.addProperty(\"currentlySelected\", DeviceDetail.getIndexSelected());\n\n try {\n FileOutputStream outputStreamWriter = context.openFileOutput(\"settingDetails.json\", Context.MODE_PRIVATE);\n outputStreamWriter.write(toSave.toString().getBytes());\n outputStreamWriter.close();\n } catch (IOException e) {\n Log.println(Log.ERROR, \"FileAccessing\", \"Settings file writing error.\");\n }\n }", "private void saveSettings() {\n SettingsModel settingsModel = new SettingsModel();\n settingsModel.saveState(NJNPStartActivity.this);\n\n File NJNPSettingsDirectory = new File(NJNPConstants.DIRECTORY_PATH + NJNPConstants.SETTINGS_FOLDER);\n NJNPSettingsDirectory.mkdirs();\n\n File file = new File(NJNPSettingsDirectory.getPath(), NJNPConstants.SETTINGS_FILE_NAME);\n\n FileOutputStream fos = null;\n ObjectOutputStream os = null;\n try {\n fos = new FileOutputStream(file);\n os = new ObjectOutputStream(fos);\n os.writeObject(settingsModel);\n os.close();\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(NJNP_ACTIVITY_TAG, \"File not found exception when saving settings: \" + e.getMessage());\n } catch (IOException e) {\n Log.e(NJNP_ACTIVITY_TAG, \"IO Exception when saving settings: \" + e.getMessage());\n }\n\n }", "public void saveDefault(File file) throws IOException {\r\n\t\ttry (\tFileOutputStream output = new FileOutputStream(file);\r\n\t\t\t\tBufferedWriter writer = new BufferedWriter(new OutputStreamWriter(output)) ) {\r\n\t\t\tfor (Preferences.Key key: Preferences.Key.values()) {\r\n\t\t\t\tfor (String comment: key.comments) {\r\n\t\t\t\t\twriter.write(\"# \" + comment);\r\n\t\t\t\t\twriter.newLine();\r\n\t\t\t\t}\r\n\t\t\t\twriter.write(key.id + \"=\" + key.getDefault(portable));\r\n\t\t\t\twriter.newLine();\r\n\t\t\t\twriter.newLine();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void writeToFile(String data,Context context) {\n try {\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(context.openFileOutput(\"config.txt\", Context.MODE_PRIVATE));\n outputStreamWriter.write(data);\n outputStreamWriter.close();\n }\n catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final Boolean value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putBoolean(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE); //This means the info is private and hence secured\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n editor.putString(\"password\", passwordInput.getText().toString());\n editor.apply();\n\n Toast.makeText(this, \"Saved!\", Toast.LENGTH_LONG).show();\n }", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveString(String key,String value)\n {\n preference.edit().putString(key,value).apply();\n }", "public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userinfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n\n editor.apply();\n Toast.makeText(this,\"Saved!\",Toast.LENGTH_LONG).show();\n }", "public void save(String filename) throws IOException {\r\n String newline = System.getProperty(\"line.separator\");\r\n FileWriter out = new FileWriter(filename);\r\n Enumeration e = keyvaluepairs.keys();\r\n while (e.hasMoreElements()) {\r\n String key = (String) e.nextElement();\r\n out.write(key + \"=\" + (String) keyvaluepairs.get(key) + newline);\r\n }\r\n out.close();\r\n }", "public static void savePreference(SharedPreferences prefs, String key, Boolean value) {\n Editor e = prefs.edit();\n e.putBoolean(key, value);\n e.commit();\n }", "public static void write(Context context, String key, String value) {\n\t\tSharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE);\n\t\tsp.edit().putString(key, value).commit();\n\t}", "public void saveSettings(Settings settings)\n {\n \tMainActivity.settings = settings;\n \t\n \t// Write the application settings\n \tSharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE);\n \tSharedPreferences.Editor editor = sharedPref.edit();\n \teditor.putInt(MainActivity.SETTINGS_HALF_TIME, settings.getHalfTimeDuration() );\n \teditor.putString(MainActivity.SETTINGS_TEAM_NAME, settings.getTeamName() );\n \teditor.commit();\n }", "@Override\n public void saveToPreferencesAdditional(PortletPreferences pp) {\n }", "public void saveMixerSettingsLocally() {\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tExtensionFilter filter = new ExtensionFilter(\"TXT files (*.txt)\", \"*.txt\");\n\t\tfileChooser.getExtensionFilters().add(filter);\n\t\tFile file = fileChooser.showSaveDialog(mainContainer.getScene().getWindow());\n\t\tString fullPath;\n\t\ttry {\n\t\t\tfullPath = file.getAbsolutePath();\n\t\t\tif (!fullPath.endsWith(\".txt\")) {\n\t\t\t\tfullPath = fullPath + \".txt\";\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tFileWriter writeFile = new FileWriter(fullPath);\n\t\t\t\twriteFile.write(Double.toString(sliderPitch.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderEchoLength.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderDecay.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderGain.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderFlangerLength.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderWetness.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Double.toString(sliderLfoFrequency.getValue()) + \"\\n\");\n\t\t\t\twriteFile.write(Float.toString((float) sliderLowPass.getValue()) + \"\\n\");\n\t\t\t\twriteFile.close();\n\t\t\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\t\t\talert.setTitle(bundle.getString(\"sMSsaveAlert1Title\"));\n\t\t\t\talert.setHeaderText(bundle.getString(\"sMSsaveAlert1Header\"));\n\t\t\t\talert.showAndWait();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(bundle.getString(\"mSSaveAlertTitle\"));\n\t\t\t\talert.setHeaderText(bundle.getString(\"mSSaveAlertHeader\"));\n\t\t\t\talert.setContentText(bundle.getString(\"mSSaveAlertContent\"));\n\t\t\t\talert.showAndWait();\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "private void persistData() {\n mSharedPref.storeLastScreen(SCREEN_NAME);\n }", "public void saveSettings(View view){\n SharedPreferences.Editor editor = settings.edit();\n\n // Write the values from the views to the editor\n editor.putInt(\"vocablesNumber\",Integer.parseInt(vocablesNumber.getSelectedItem().toString()));\n editor.putBoolean(\"screenOn\", screenOnSwitch.isChecked());\n editor.putFloat(\"delayBetweenVocables\",Float.valueOf(editTextDelay.getText().toString()));\n // Commit the edits\n editor.commit();\n\n // Send the user a message of success\n Toast.makeText(Settings.this,\"Settings saved!\",Toast.LENGTH_SHORT).show();\n // Go back to previous activity\n finish();\n }", "public void save(SubscriptionList sl) throws IOException {\n SharedPreferences setting = context.getSharedPreferences(prefFile, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = setting.edit();\n editor.putString(slKey, SubToString(sl));\n editor.commit();\n }", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "public static void savePreferences(Context context, String strKey, String strValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(strKey, strValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n\n }\n }", "public void saveString(int prefKey, String value) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(getResources().getString(prefKey), value);\n editor.apply();\n }", "public void saveInfo(View view) {\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n editor.putString(\"password\", passwordInput.getText().toString());\n editor.apply();\n\n usernameInput.setText(\"\");\n passwordInput.setText(\"\");\n\n Toast.makeText(this, \"Saved!\", Toast.LENGTH_LONG).show();\n }", "private void saveProps() {\n FileOutputStream out;\n \n try {\n out = new FileOutputStream(\"gamesettings.properties\");\n props.store(out, null);\n } catch (FileNotFoundException ex) {\n try {\n out = new FileOutputStream(new File(\"gamesettings.properties\"));\n props.store(out, null);\n } catch (FileNotFoundException ex1) {\n System.out.println(\"Saving failed!\");\n } catch (IOException ex1) {\n System.out.println(\"Saving failed!\");\n }\n } catch (IOException ex) {\n try {\n out = new FileOutputStream(new File(\"gamesettings.properties\"));\n props.store(out, null);\n } catch (FileNotFoundException ex1) {\n System.out.println(\"Saving failed!\");\n } catch (IOException ex1) {\n System.out.println(\"Saving failed!\");\n }\n }\n }" ]
[ "0.7927848", "0.7671658", "0.7588317", "0.73179275", "0.72862333", "0.7123592", "0.7066279", "0.7044305", "0.69915885", "0.6934103", "0.69291854", "0.6895137", "0.6828", "0.6807378", "0.6800928", "0.67661625", "0.6742058", "0.6741874", "0.67251074", "0.6724109", "0.6698112", "0.66625535", "0.6645738", "0.6634563", "0.66260093", "0.6587644", "0.6566133", "0.6564271", "0.6546236", "0.65460104", "0.6531948", "0.65156215", "0.65142626", "0.6493473", "0.64819574", "0.6474384", "0.6459862", "0.6448392", "0.6426186", "0.6421931", "0.6401429", "0.6397086", "0.63826925", "0.63794786", "0.6352688", "0.6347789", "0.63255614", "0.6268675", "0.6266743", "0.620971", "0.62086034", "0.61956966", "0.61798686", "0.61657715", "0.6165267", "0.61453193", "0.6123477", "0.6122098", "0.6119997", "0.6117561", "0.61165947", "0.6113018", "0.61094123", "0.6103558", "0.6094887", "0.60759187", "0.60729164", "0.6070915", "0.6065796", "0.60624", "0.60536146", "0.60476226", "0.60349685", "0.6030469", "0.602729", "0.6025391", "0.6019821", "0.6015532", "0.6011233", "0.60040003", "0.60029346", "0.6002334", "0.5995413", "0.5990439", "0.59707785", "0.59692067", "0.5967015", "0.5959232", "0.59585506", "0.59492165", "0.5941688", "0.59314704", "0.5923997", "0.5911146", "0.5908735", "0.59038424", "0.59022", "0.59021235", "0.5897789", "0.58973" ]
0.6730181
18
This method writes to the sharedpreferences file. the latest encounter number that will be used to identify an encounter locally in the absence of network. only maximum of 10 encounter numbers will be inserted in the SQLite table.
public void writeEncounterNumPreferences(long encounterNum){ mSharedPreference = mContext.getSharedPreferences(mContext.getString( R.string.sharedpreferencesFileName),Context.MODE_PRIVATE); SharedPreferences.Editor editor=mSharedPreference.edit(); editor.putLong(mContext.getString(R.string.encounter),encounterNum); editor.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeToSharedPreference(int value){\n SharedPreferences sharedPreferences = getActivity().getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putInt(\"NUMBER OF ITEMS\",value);\n editor.commit();\n\n }", "private void savePreferences(){\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putInt(\"p1Count\", pOneCounter);\n editor.putInt(\"p2Count\", pTwoCounter);\n editor.putInt(\"pAICount\", pAICounter);\n editor.putInt(\"tieCount\", tieCounter);\n\n editor.commit();\n }", "private final synchronized void writePreferencesImpl() {\n if ( LOGD ) { Log.d( TAG, \"writePreferencesImpl \" + mPrefFile + \" \" + mPrefKey ); }\n\n mForcePreferenceWrite = false;\n\n SharedPreferences pref =\n Utilities.getContext().getSharedPreferences( mPrefFile, Context.MODE_PRIVATE );\n SharedPreferences.Editor edit = pref.edit();\n edit.putString( mPrefKey, getSerializedString() );\n Utilities.commitNoCrash(edit);\n }", "private void savePreference() {\n\t\tString myEmail = ((TextView) findViewById(R.id.myEmail)).getText().toString();\n\t\tString myPassword = ((TextView) findViewById(R.id.myPassword)).getText().toString();\n\t\t\n\t\tEditor editor = sharedPreferences.edit();\n\t\teditor.putString(\"myEmail\", myEmail);\n\t\teditor.putString(\"myPassword\", myPassword);\n\t\teditor.putString(\"readOPtion\", Constants.READ_OPTION_SUBJECT_ONLY);\n\t\teditor.putInt(\"increment\", 10);\n\t\teditor.putString(\"bodyDoneFlag\", bodyDoneFlag);\n\t\teditor.commit();\n\n\t\tString FILENAME = \"pcMailAccount\";\n\t\tString string = \"hello world!\";\n\t\tString del = \"_____\";\n\t\t\n\t\tFile folder = new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM + \"/VoiceMail\");\n\t\tif (!folder.isDirectory()) {\n\t\t\tfolder.mkdirs();\n\t\t}\n \n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfolder.createNewFile();\n//\t\t\tfos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\t fos = new FileOutputStream(new File(folder, FILENAME));\n\t string = \"myEmail:\" + myEmail + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"myPassword:\" + myPassword + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"bodyDoneFlag:\" + bodyDoneFlag + del;\n\t\t\tfos.write(string.getBytes());\n\t\t\t\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void writePref() {\n SharedPreferences.Editor editor = sp.edit();\n long currentTime = System.currentTimeMillis();\n editor.putLong(UPDATE, currentTime);\n editor.commit();\n System.out.println(\"Time of current update: \" + getDateFromLong(currentTime));\n }", "private void saveInFile() {\n try {\n FileOutputStream fOut = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);\n\n OutputStreamWriter writer = new OutputStreamWriter(fOut);\n Gson gson = new Gson();\n gson.toJson(counters, writer);\n writer.flush();\n\n fOut.close();\n\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "private void savePreferences() {\n SharedPrefStatic.mJobTextStr = mEditTextJobText.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobSkillStr = mEditTextSkill.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobLocationStr = mEditTextLocation.getText().toString().replace(\" \", \"\");\n SharedPrefStatic.mJobAgeStr = mEditTextAge.getText().toString().replace(\" \", \"\");\n\n SharedPreferences sharedPref = getSharedPreferences(AppConstants.PREF_FILENAME, 0);\n SharedPreferences.Editor editer = sharedPref.edit();\n editer.putString(AppConstants.PREF_KEY_TEXT, SharedPrefStatic.mJobTextStr);\n editer.putString(AppConstants.PREF_KEY_SKILL, SharedPrefStatic.mJobSkillStr);\n editer.putString(AppConstants.PREF_KEY_LOCATION, SharedPrefStatic.mJobLocationStr);\n editer.putString(AppConstants.PREF_KEY_AGE, SharedPrefStatic.mJobAgeStr);\n\n // The commit runs faster.\n editer.apply();\n\n // Run this every time we're building a query.\n SharedPrefStatic.buildUriQuery();\n SharedPrefStatic.mEditIntentSaved = true;\n }", "public static void SaveCounter6(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter6, SaveCounter6).commit();\n\n }", "public static void SaveCounter5(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter5, SaveCounter5).commit();\n\n }", "public void Write_data() {\n // add-write text into file\n try {\n FileOutputStream fileout=openFileOutput(\"savedata11.txt\", MODE_PRIVATE);\n OutputStreamWriter outputWriter=new OutputStreamWriter(fileout);\n outputWriter.write(Integer.toString(_cnt));\n outputWriter.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void saveData() {\n\n SharedPreferences sharedPreferences=getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n\n editor.putString(\"name\",name.getText().toString());\n editor.putString(\"regnum\",regnum.getText().toString());\n editor.putInt(\"count\", count);\n editor.apply();\n\n }", "public static void SaveCounter4(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter4, SaveCounter4).commit();\n\n }", "public static void SaveCounter3(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter3, SaveCounter3).commit();\n\n }", "public static void addSaveCounter5(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter5 = prefs.getInt(saveCounter5, 0);\n SaveCounter5 = SaveCounter5 + SaveInc;\n prefs.edit().putInt(saveCounter5, SaveCounter5).commit();\n\n }", "private void saveInFile() {\n\t\tthis.deleteFile();\n\t\tfor (CounterModel obj : counterListModel.getCounterList()) {\n\t\t\ttry {\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tif (obj.getCounterName().equals(counterModel.getCounterName())) {\n\t\t\t\t\tobj = counterModel;\n\t\t\t\t}\n\t\t\t\tString json = gson.toJson(obj) +'\\n';\n\t\t\t\tFileOutputStream fos = openFileOutput(FILENAME,\n\t\t\t\t\t\tContext.MODE_APPEND);\n\t\t\t\tfos.write(json.getBytes());\n\t\t\t\tfos.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "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 }", "public static void addSaveCounter6(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter6 = prefs.getInt(saveCounter6, 0);\n SaveCounter6 = SaveCounter6 + SaveInc;\n prefs.edit().putInt(saveCounter6, SaveCounter6).commit();\n\n }", "public void write() throws IOException {\n // No pairs to write\n if(map.size() == 0 || !isDirty) {\n System.err.println(\"preferences is already updated..\");\n return;\n }\n\n try(BufferedWriter bufferedWriter = Files.newBufferedWriter(fileName,\n StandardOpenOption.TRUNCATE_EXISTING,\n StandardOpenOption.CREATE))\n {\n for(Map.Entry<String, String> entry : map.entrySet()) {\n String key = entry.getKey();\n String value = entry.getValue();\n\n // Writes the current pair value in the format of 'key=value'\n bufferedWriter.write(String.format(\"%s=%s\\n\", key, value));\n }\n }\n\n isDirty = false;\n }", "public void save() {\n savePrefs();\n }", "private void saveState() {\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n // Store our count..\n editor.putInt(\"count\", this._tally);\n\n // Save changes\n editor.commit();\n }", "private void persistHighScore() {\n final String userHomeFolder = System.getProperty(USER_HOME); \n final Path higheScoreFilePath = Paths.get(userHomeFolder, HIGH_SCORE_FILE);\n \n final File f = new File(higheScoreFilePath.toString());\n if (f.exists() && !f.isDirectory()) {\n PrintWriter writer = null;\n try {\n writer = new PrintWriter(higheScoreFilePath.toString());\n writer.print(\"\");\n writer.close();\n \n } catch (final IOException e) {\n emptyFunc();\n } \n \n try {\n writer = new PrintWriter(higheScoreFilePath.toString());\n writer.print(Integer.toString(this.myHighScoreInt));\n writer.close();\n \n } catch (final IOException e) {\n emptyFunc();\n } \n \n if (writer != null) {\n writer.close();\n } \n }\n }", "public static void addSaveCounter3(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter3 = prefs.getInt(saveCounter3, 0);\n SaveCounter3 = SaveCounter3 + SaveInc;\n prefs.edit().putInt(saveCounter3, SaveCounter3).commit();\n\n }", "private static void saveScore() {\n\t\tif (mContext != null) {\n\t\t\tEditor edit = mContext.getSharedPreferences(Defines.SHARED_PREF_NAME, Context.MODE_PRIVATE).edit();\n\t\t\tedit.putInt(Defines.SHARED_PREF_ACTIVITY_SCORE, DataStore.mActivityScore);\n\n\t\t\tfor (int x = 0; x < Defines.NUM_DAYS_SCORE_TO_SAVE; x++) {\n\t\t\t\tedit.putInt(Defines.SHARED_PREF_PREV_SCORE + x, DataStore.mPreviousActivityScores[x]);\n\t\t\t}\n\n\t\t\tif (mActivityScoreDate != null) {\n\t\t\t\tedit.putString(Defines.SHARED_PREF_SCORE_DATE, mActivityScoreDate.format2445());\n\t\t\t}\n\n\t\t\tedit.commit();\n\t\t}\n\t}", "public void save() {\n\t\tpreferences().flush();\n\t}", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }", "private void persistData() {\n mSharedPref.storeLastScreen(SCREEN_NAME);\n }", "private void savePreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n\n editor.putInt(\"entreeIndex\", spEntree.getSelectedItemPosition());\n editor.putInt(\"drinkIndex\", spDrink.getSelectedItemPosition());\n editor.putInt(\"dessertIndex\", spDessert.getSelectedItemPosition());\n\n editor.apply();\n }", "public void writeSyncPreferences(String string){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = mSharedPreference.edit();\n editor.putString(getCurrentIdentity(),string);\n editor.commit();\n }", "public static void addSaveCounter4(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter4 = prefs.getInt(saveCounter4, 0);\n SaveCounter4 = SaveCounter4 + SaveInc;\n prefs.edit().putInt(saveCounter4, SaveCounter4).commit();\n\n }", "public void update_storage( ) {\n SharedPreferences sp_file = getPreferences(Context.MODE_PRIVATE); //make shared preferences object\n SharedPreferences.Editor editor = sp_file.edit(); //make editor object\n editor.putInt(\"alarm_set\", alarm_set);\n editor.apply();\n }", "private void createSaveData(){\n try {\n File f = new File(filePath, highScores);\n FileWriter output = new FileWriter(f);\n BufferedWriter writer = new BufferedWriter(output);\n\n writer.write(\"0-0-0-0-0\");\n writer.newLine();\n writer.write(\".....-.....-.....-.....-.....\");\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void SaveCounter1(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter1, SaveCounter1).commit();\n\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 onPause() {\n super.onPause();\n moodIndex = prefs.getInt(\"memoryIndex\", 1);\n String lastJson = prefs.getString(\"memory\" + moodIndex, \"\");\n if (lastJson != null && !lastJson.equals(\"\")) {\n lastMood = gson.fromJson(lastJson, Mood.class);\n Calendar calendar1 = Calendar.getInstance();\n Calendar calendar2 = Calendar.getInstance();\n calendar1.setTimeInMillis(System.currentTimeMillis());//today's date\n calendar2.setTimeInMillis(lastMood.getTodaysDate());//date from lastMood\n\n if (calendar1.get(Calendar.DAY_OF_YEAR) != calendar2.get(Calendar.DAY_OF_YEAR) || calendar1.get(Calendar.YEAR) != calendar2.get(Calendar.YEAR)) {\n moodIndex++;// different date-> moodIndex+1\n if (moodIndex == 9)\n moodIndex = 1; // moodIndex= 1 to 8\n }\n }\n//now we save the mood at SharedPref key [\"memory\" +moodIndex]\n currentMood.setTodaysDate(System.currentTimeMillis()); //actualize date before saving\n String json = gson.toJson(currentMood); // currentMood -> json format\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"memory\" + moodIndex, json);// writing json in key [\"memory\" + moodIndex]\n editor.putInt(\"memoryIndex\", moodIndex);//writing last moodIndex in key memoryIndex\n editor.apply();\n }", "public void save() {\n SharedPreferences settings = activity.getSharedPreferences(\"Preferences\", 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putLong(\"bestDistance\", values.bestDistance);\n\n // Commit the edits!\n editor.commit();\n\n }", "public void save(View view){\n String name = editTextname.getText().toString();\n String host = editTexthost.getText().toString();\n if(name !=null && name.length()>0 && host != null && host.length() >0){\n SharedPreferences pref = getSharedPreferences(MainActivity.MY_PREFS_NAME,MODE_PRIVATE);\n int size = pref.getInt(\"size\", 0);\n SharedPreferences.Editor e = pref.edit();\n e.putString(\"name_\" + size, name);\n e.putString(\"hostPort_\" + size, host);\n e.putInt(\"size\", size + 1);\n e.commit();\n\n finish();\n }\n }", "private void savePreferences(String key, String value) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(c);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value);\n editor.apply();\n }", "@Override\n public void saveInt(String key, int value) {\n SharedPreferences.Editor prefs = mSharedPreferences.edit();\n prefs.putInt(key, value);\n prefs.commit();\n }", "public void writeUserLog(String name){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"userlist\" ,name);\n mydata.commit();\n }", "private void saveData( ) throws IOException {\n \tString FILENAME = \"data_file\";\n String stringT = Long.toString((SystemClock.elapsedRealtime() - timer.getBase())/1000)+\"\\n\";\n String stringS = textView.getText().toString()+\"\\n\";\n String stringD = Long.toString(System.currentTimeMillis())+\"\\n\";\n FileOutputStream fos;\n\t\ttry {\n\t\t\tfos = openFileOutput(FILENAME, Context.MODE_APPEND); //MODE_APPEND\n\t\t\tfos.write(stringS.getBytes());\n\t\t\tfos.write(stringT.getBytes());\n\t\t\tfos.write(stringD.getBytes());\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public static void saveIncInt(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveInc, SaveInc).commit();\n\n }", "private void currentStateSaveToSharedPref() {\n sharedPreferences = getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"nameOfActiveChallenge\", nameOfCurrentChallenge);\n editor.putInt(\"key1OfActiveChallenge\", key1OfActiveChallenge);\n editor.putString(\"dateOfLastEdit\", dateOfLastEdit);\n editor.putFloat(\"goal\", goal);\n editor.putFloat(\"carry\", carry);\n editor.putInt(\"challengeDaysRunning\", challengeDaysRunning);\n editor.commit();\n }", "private void saveCustomDeck() {\n try (PrintWriter pw = new PrintWriter(new FileWriter(USER_DECK))) {\n for (int i = 0; i < customDeck.size(); i++) {\n pw.print(customDeck.get(i) + \"\\n\\n\");\n }\n } catch (IOException ex) {\n System.out.println(\"FAILED TO SAVE SCORES\");\n }\n }", "public void saveDay() {\n day.setServices(serviciosTotales);\n day.setTasks(tasksTotales);\n\n databaseReference.child(day.getDate() + \"_\" + day.getUserId()).setValue(day);\n Toast.makeText(context, \"Creando archivo para enviar por correo.\", Toast.LENGTH_LONG).show();\n //todo, so far it will keep updating the day\naskPermissions();\n createExcel();\n\n }", "public static void addSaveCounter1(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter1 = prefs.getInt(saveCounter1, 0);\n SaveCounter1 = SaveCounter1 + SaveInc;\n prefs.edit().putInt(saveCounter1, SaveCounter1).commit();\n\n }", "private void saveSettings(String lastUpdate) {\n\t\t// save last update nfo\n\t\tSharedPreferences prefs = this.getSharedPreferences(Defs.PREFS_NAME, 0);\n\t\tSharedPreferences.Editor editor = prefs.edit();\n\n\t\teditor.putString(Defs.PREFS_KEY_LASTUPDATE, lastUpdate);\n\t\tString theDate = DateFormat.format(\"yyyyMMdd\", Calendar.getInstance()).toString();\n\t\teditor.putString(Defs.PREFS_KEY_LASTUPDATE_TIME, theDate);\n\t\t\n\t\teditor.commit();\n\t}", "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 }", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);//goes stream based on filename\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); //create buffer writer\n Gson gson = new Gson();\n gson.toJson(countbookList, out);//convert java object to json string & save in output\n out.flush();\n fos.close();\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "public static void SaveCounter2(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter2, SaveCounter2).commit();\n\n }", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static synchronized void save() {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n String team_backup = config.Server.serverdata_file_location + \"/teams\";\n\n Calendar dato = new GregorianCalendar();\n\n team_backup += dato.get(Calendar.YEAR) + \"-\" + dato.get(Calendar.DAY_OF_MONTH) + \"-\" + dato.get(Calendar.MONTH) + \"-\";\n team_backup += dato.get(Calendar.HOUR) + \"-\" + dato.get(Calendar.MINUTE) + \".ser\";\n\n admin.logging.globalserverMsg(\"Saving team data to file.\");\n\n try {\n FileOutputStream fil = new FileOutputStream(team_fil);\n FileOutputStream fil_backup = new FileOutputStream(team_backup);\n\n //Skriv til teams.txt\n ObjectOutputStream out = new ObjectOutputStream(fil);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n\n //Skriv til backup fil.\n out = new ObjectOutputStream(fil_backup);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n } catch (Exception e) {\n e.printStackTrace();\n admin.logging.globalserverMsg(\"Error saving team data to file.\");\n }\n }", "private void saveEvent(){\n String event_name = eventName.getText().toString();\r\n String coach = coach_string;\r\n String time = class_time_string;\r\n int nfcID= 4;\r\n\r\n Map<String, Object> data = new HashMap<>();\r\n\r\n data.put(\"event_name\", event_name);\r\n data.put(\"coach\", coach);\r\n data.put(\"class_time\", time);\r\n data.put(\"nfcID\", nfcID);\r\n\r\n Database.writeClassDb(data, time ,date);\r\n startActivity(new Intent(addCalenderEvent.this, CalendarActivity.class));\r\n finish();\r\n }", "public void savingVariablesWebConfig(){\n SharedPreferences prefs = getSharedPreferences(Constants.PREFERENCES_NAME, Context.MODE_PRIVATE);\n //Save data of user in preferences\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_ACCEPTED, \"3\");\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_VISIBLE, \"10\");\n editor.putString(Constants.PREF_VALUE_MAX_TIME_ORDERS, \"15\");\n editor.commit();\n }", "public void saveData(){\n SharedPreferences sharedPreferences = getSharedPreferences(\"SHARED_PREFS\",MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"email_pref\",email.getText().toString());\n editor.putString(\"password_pref\",uPassword.getText().toString());\n editor.apply();\n }", "public void setRecord(int value){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.getContext());\n SharedPreferences.Editor editor = prefs.edit(); editor.putInt(\"record\", value);\n editor.commit();\n }", "public void saveData() {\n try {\n JsonWriter jw = new JsonWriter(openFileOutput(DATA_FILE, Context.MODE_PRIVATE));\n jw.write(user);\n jw.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "protected void savePreferences() {\n String tmp_hostname = hostname.getHostName();\n System.out.println(\"stringified hostname was: \" + tmp_hostname);\n if (tmp_hostname != null) {\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"last_hostname\", tmp_hostname);\n editor.commit();\n }\n }", "private void saveData() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String jsonItem = gson.toJson(reminderItems);\n editor.putString(REMINDER_ITEM, jsonItem);\n editor.apply();\n }", "private void writeAccount() {\n SharedPreferences pref = getSharedPreferences(\"ACCOUNT\", Context.MODE_PRIVATE);\n SharedPreferences.Editor edt = pref.edit();\n\n edt.putString(\"email\", Me.getInstance().getEmail());\n edt.putString(\"password\", txtPassword.getText().toString().trim());\n\n edt.commit();\n }", "@Override\n\n public void onClick(View arg0) {\n\n File f=new File(e1.getText().toString());\n\n FileWriter fw = null;\n\n try {\n fw = new FileWriter(f);\n } catch (IOException e3) {\n\n//\tTODO Auto-generated catch block\n\n e3.printStackTrace();\n }\n try {\n\n fw.write(e2.getText().toString());\n } catch (IOException e2) {\n// TODO Auto-generated catch block\n e2.printStackTrace();\n }\n try {\n\n fw.close();\n } catch (IOException e2) {\n\n//\tTODO Auto-generated catch block\n\n e2.printStackTrace();\n }\n SharedPreferences.Editor\n\n e=getPreferences(MODE_PRIVATE).edit();\n e.putString(\"fpath\", f.getPath());\n e.commit();\n Toast.makeText(getApplicationContext(), \"Saved Successfully\", Toast.LENGTH_LONG).show();\n\n }", "public void writeIntPrefs(String prefName, int prefValue) {\n editor = sPrefs.edit();\n editor.putInt(prefName, prefValue);\n editor.apply();\n }", "protected void SavePreferences(String key, String value) {\n SharedPreferences data = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = data.edit();\n editor.putString(key, value);\n editor.commit();\n\n\n }", "public void saveActivity(int i){\n\n int activityID = i;\n\n SharedPreferences sp = this.getActivity().getSharedPreferences(SHARED_PREF_NAME,Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sp.edit();\n\n editor.putInt(KEY_CHOSENACTIVITY, activityID);\n\n editor.apply();\n }", "private void guardaRecord() {\n // Guardamos el record\n SharedPreferences datos = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor miEditor = datos.edit();\n miEditor.putInt(\"RECORD\", record);\n miEditor.apply();\n }", "public void putAttendanceByRoll(String rollNumber){\n int attendance=0;\n SQLiteDatabase sqLiteDatabase=helper.getWritableDatabase();\n ContentValues contentValues;\n String whereArgs[]={rollNumber};\n String columns[]={Constant.ATTENDANCE};\n String selectionArgs[]={rollNumber};\n Cursor cursor = sqLiteDatabase.query(Constant.TABLE_NAME, columns, Constant.ROLL_NUMBER + \" =?\", selectionArgs, null, null, null, null);\n while(cursor.moveToNext()){\n attendance=cursor.getInt(cursor.getColumnIndex(Constant.ATTENDANCE));\n //TODO: add to log file: Wrong BSSID sent.\n }\n cursor.close();\n contentValues=new ContentValues();\n contentValues.put(Constant.ATTENDANCE,attendance+1);\n Message.logMessages(\"updateAttRoll:\",\"Attendance updated\");\n sqLiteDatabase.update(Constant.TABLE_NAME,contentValues,Constant.ROLL_NUMBER+\"=?\",whereArgs);\n }", "public void saveGameSession() {\n\t\tlastSaved = ProjectZero.calendar.getTime().toString();\n\t\tAssetHandler.saveGameSession();\n\t}", "public void persist(final int num) {\n myPref.remove(myName + CLASSTYPE);\n\n myName = String.valueOf(num);\n\n myPref.put(myName + CLASSTYPE, getClass().getSimpleName());\n// System.out.println(\"saved: \" + myName + getClass().getSimpleName() + \" to: \" + myPref.absolutePath());\n\n extraPersist();\n }", "void savePreferences() throws OntimizeJEERuntimeException;", "public void save() {\n settingService.saveMaxScore(score);\r\n// powerUpCount = 0;\r\n// powerDownCount = 0;\r\n// purplePowerCount = 0;\r\n// yellowMadnessCount = 0;\r\n// shapeCount = 0;\r\n }", "public void setRecord3(int value){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.getContext());\n SharedPreferences.Editor editor = prefs.edit(); editor.putInt(\"record3\", value);\n editor.commit();\n }", "private void savePreferences(String key, String value) {\n\t\tSharedPreferences sp = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tEditor edit = sp.edit();\n\t\tedit.putString(key, value);\n\t\tedit.commit();\n\t}", "public void saveToDB() {\n \twipeDB();\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\tContentValues values = new ContentValues();\n\t\tfor (int i = 0; i < wallpapers.size(); i++) {\n\t\t\tvalues.put(EventDataSQLHelper.NODE, nodeToString(wallpapers.get(i)));\n\t\t\ttry {\t\t\t\t\n\t\t\t\tdb.insertOrThrow(EventDataSQLHelper.TABLE, null, values);\n\t\t\t\tLog.d(\"AddToDB\", nodeToString(wallpapers.get(i)));\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLog.d(\"AddToDB\", \"\" + e.getMessage());\n\t\t\t}\n\t\t}\n\t\tdb.close();\n }", "private void saveHighScore() {\n\n\t\tFileOutputStream os;\n\t\n\t\ttry {\n\t\t boolean exists = (new File(this.getFilesDir() + filename).exists());\n\t\t // Create the file and directories if they do not exist\n\t\t if (!exists) {\n\t\t\tnew File(this.getFilesDir() + \"\").mkdirs();\n\t\t\tnew File(this.getFilesDir() + filename);\n\t\t }\n\t\t // Saving the file\n\t\t os = new FileOutputStream(this.getFilesDir() + filename, false);\n\t\t ObjectOutputStream oos = new ObjectOutputStream(os);\n\t\t oos.writeObject(localScores);\n\t\t oos.close();\n\t\t os.close();\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n }", "private void saveNewAddress() {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(deviceAddress, \"previousDeviceAddress\");\n editor.commit();\n }", "public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private void saveToStorage() {\n FileOutputStream fos = null;\n try {\n fos = context.openFileOutput(\"GeoFences\", Context.MODE_PRIVATE);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(currentList);\n oos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void saveInPreferences(String gameName) {\n //Store name in shared preferences\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"gameName\", gameName);\n editor.commit();\n\n //Check if gameName stored\n //String storedPreference = preferences.getString(\"gameName\",\"none\");\n //Log.d(\"checkGameName\", storedPreference);\n }", "public void writeUserInro(String name,String key){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"uName\" ,name);\n mydata.putString(\"uKey\",key);\n mydata.commit();\n }", "private void saveData(){\n\t\tsynchronized(onlineAllInfoList){\n\t\t\tRecorder.save(onlineAllInfoList, onlineAllInfoListFileName);\n\t\t}\n\t\t//System.out.println(\"Saving onlineCompetitionInfoList...\");System.out.flush();\n\t\tsynchronized(onlineCompetitionInfoList){\n\t\t\tRecorder.save(onlineCompetitionInfoList, onlineCompetitionInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving competitionList...\");System.out.flush();\n\t\tsynchronized(competitionList){\n\t\t\tRecorder.save(competitionList, competitionInfoListFileName);\n\t\t}\n\t\t//System.out.println(\"Saving allAIInfoList...\");System.out.flush();\n\t\tsynchronized(allAIInfoList){\n\t\t\tRecorder.save(allAIInfoList, allInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving waitingInfoList...\");System.out.flush();\n\t\tsynchronized(waitingInfoList){\n\t\t\tRecorder.save(waitingInfoList, waitingInfoListFileName);\t\t\t\n\t\t}\n\t\t//System.out.println(\"Saving sortedAIInfoPool...\");System.out.flush();\n\t\tsynchronized(sortedAIInfoPool){\n\t\t\tRecorder.save(sortedAIInfoPool, sortedInfoListFileName);\t\t\t\n\t\t}\n\t}", "public static void addSaveCounter2(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter2 = prefs.getInt(saveCounter2, 0);\n SaveCounter2 = SaveCounter2 + SaveInc;\n prefs.edit().putInt(saveCounter2, SaveCounter2).commit();\n\n }", "@Override\n public void onPause() {\n SharedPreferences.Editor editor = savedValues.edit();\n editor.putInt(\"num1\", num1);\n editor.putInt(\"num2\", num2);\n editor.commit();\n\n super.onPause();\n }", "public void backup_StudentNumber(int number){\n try {\n outputStreamWriter = new OutputStreamWriter(context.openFileOutput(Constant.STUDENT_NUMBER_FILE, Context.MODE_PRIVATE));\n outputStreamWriter.write(number+\",\");\n outputStreamWriter.close();\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n }", "public void saveToSD() {\n sizeOfArrayList = scannedList.size();\n for (int i = 0; i < sizeOfArrayList; i++) {\n String fileName = \"STS\" + \".txt\";//like 2016_01_12.txt\n try {\n File root = new File(Environment.getExternalStorageDirectory() + File.separator + \"ScanToSheet\");\n if (!root.exists()) {\n root.mkdirs();\n }\n File gpxfile = new File(root, fileName);\n FileWriter writer = new FileWriter(gpxfile, true);\n writer.append(\"--------------------------------------------------------\\n\"\n +scannedList.get(i)+\"-\"+listDescOfItem.get(i)\n +\"\\n\"+listNoteOfItem.get(i)+\"\\n--------------------------------------------------------\\n\\n\\n\");\n writer.flush();\n writer.close();\n if(sizeOfArrayList==i+1){\n Snackbar.make(view, sizeOfArrayList+\" item saved to './ScanToSheet/STS.txt'...️\", Snackbar.LENGTH_LONG).show();\n }\n } catch (IOException e) {\n e.printStackTrace();\n\n }\n }\n }", "public void exportDB(){\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n\n\t\tprgUserData.setMessage(getResources().getText(R.string.please_wait_data_dump) );\n\t\tprgUserData.show();\n\n\t\tint myDeviceId = prefs.getInt(\"my_device_id\", 0);\n\t\t// String currentDateTimeString = DateFormat.getDateTimeInstance().format(\"dd-MM-yyyyhh:mm:ssa\");\n\t\tFile sd =new File(Environment.getExternalStorageDirectory().getPath() + \"/vkb_database\");\n\t\tsd.mkdirs();\n\t\tFile data = Environment.getDataDirectory();\n\t\tLog.d(\"dump1\",\"file sd:\"+sd);\n\t\tLog.d(\"dump1\",\"file data:\"+data);\n\t\tFileChannel source=null,sourceSess=null;\n\t\tFileChannel destination=null,destinationSess=null;\n\n\t\tString currentDBPath = \"/data/game.Typing/databases/UT_Marathi\";\n\t\tString currentDBSessPath = \"/data/game.Typing/databases/\"+ApplicationConstants.DATABASE_NAME;\n\n\t\tString backupDBPath = myDeviceId+\"_UT_Users\"+DateFormat.format(\"dd_MM_yyyy_hh_mm_ssa\",new Date(System.currentTimeMillis())).toString();\n\t\tString backupDBSessPath = myDeviceId+\"_UT_Sessions\"+DateFormat.format(\"dd_MM_yyyy_hh_mm_ssa\",new Date(System.currentTimeMillis())).toString();\n\n\t\tFile currentDB = new File(data, currentDBPath);\n\t\tFile currentSessDB = new File(data, currentDBSessPath);\n\n\t\tFile backupDB = new File(sd, backupDBPath);\n\t\tFile backupDBSess = new File(sd, backupDBSessPath);\n\n\t\ttry {\n\t\t\tsource = new FileInputStream(currentDB).getChannel();\n\t\t\tsourceSess = new FileInputStream(currentSessDB).getChannel();\n\n\t\t\tdestination = new FileOutputStream(backupDB).getChannel();\n\t\t\tdestinationSess = new FileOutputStream(backupDBSess).getChannel();\n\n\t\t\tdestination.transferFrom(source, 0, source.size());\n\t\t\tdestinationSess.transferFrom(sourceSess, 0, sourceSess.size());\n\n\t\t\tsource.close();\n\t\t\tsourceSess.close();\n\n\t\t\tdestination.close();\n\t\t\tdestinationSess.close();\n\n\t\t\tToast.makeText(this, \"DB Exported!\", Toast.LENGTH_LONG).show();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tToast.makeText(this, \"DB Exception!\", Toast.LENGTH_LONG).show();\n\t\t}\n\t\ttry{\n\t\t\tprgUserData.hide();\n\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private void saveDatabaseSettings() {\r\n\r\n\t\t// --- Get new database ID --------------------------------------------\r\n\t\tint newID = 0;\r\n\t\tString newIDString = this.getJTextFieldDatabaseID().getText();\r\n\t\tif (newIDString!=null && newIDString.isEmpty()==false) {\r\n\t\t\ttry {\r\n\t\t\t\tnewID = Integer.parseInt(newIDString); \r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// --- Save in the preferences ----------------------------------------\r\n\t\tBundleHelper.setIdScenarioResultForSetup(newID);\r\n\t}", "public void shareData(){\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n //now get Editor\n SharedPreferences.Editor editor = sharedPref.edit();\n //put your value\n editor.putInt(\"score3\", points);\n\n //commits your edits\n editor.commit();\n }", "public void savePreferences() {\n\t\tfinal IEclipsePreferences prefs = getPreferences();\n\t\ttry {\n\t\t\tprefs.flush();\n\t\t} catch (BackingStoreException e) {\n\t\t\tgetILog().log(createStatus(IStatus.ERROR, e));\n\t\t}\n\t}", "private void saveDataToFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // path for new accounts after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // path for existing accounts after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "@Override\n\tpublic void saveData()\n\t{\n ssaMain.d1.pin = ssaMain.tmp_pin1;\n ssaMain.d1.balance = ssaMain.tmp_balance1;\n System.out.println(\"Your account has been established successfully.\");\n\t}", "public static long updateStoragePrefreneces(Context ctx){\n\n //loads the osmdroid config from the shared preferences object.\n //if this is the first time launching this app, all settings are set defaults with one exception,\n //the tile cache. the default is the largest write storage partition, which could end up being\n //this app's private storage, depending on device config and permissions\n\n Configuration.getInstance().load(ctx, PreferenceManager.getDefaultSharedPreferences(ctx));\n\n //also note that our preference activity has the corresponding save method on the config object, but it can be called at any time.\n\n\n File dbFile = new File(Configuration.getInstance().getOsmdroidTileCache().getAbsolutePath() + File.separator + SqlTileWriter.DATABASE_FILENAME);\n if (Build.VERSION.SDK_INT >= 9 && dbFile.exists()) {\n return dbFile.length();\n }\n return -1;\n }", "public void saveScore() {\n if (this.currentScore > this.highScore) {\n this.highScore = this.currentScore;\n SharedPreferences sharedPref = this.getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putInt(\"High Score\", this.highScore);\n editor.commit();\n }\n }", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "public static void savePreferences(Context context, String strKey, int intValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putInt(strKey, intValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "private void write(int i) {\n\t\tEditor edit = preticketint.edit();\r\n\t\tedit.putInt(\"ticketint\", i);\r\n\t\tedit.commit();\r\n\t}", "public void setRecord2(int value){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.getContext());\n SharedPreferences.Editor editor = prefs.edit(); editor.putInt(\"record2\", value);\n editor.commit();\n }", "public static void SavePreferences()\n {\n try\n {\n StartSaveAnimation();\n PrintWriter writer = new PrintWriter(preferences_file_name, \"UTF-8\");\n \n writer.print(Utilities.BoolToInt(MusicManager.enable_music) + \"\\r\\n\");\n writer.print(Utilities.BoolToInt(PassiveDancer.englishMode) + \"\\r\\n\");\n \n writer.close();\n }\n catch(Exception e) { System.out.println(\"Problem writing in the file \" + preferences_file_name + \".\"); }\n }", "public static void save()\r\n\t{\r\n\r\n\t\ttry {\r\n\t\t\tObjectOutputStream fileOut = new ObjectOutputStream(new FileOutputStream(\"highscores.txt\"));\r\n\t\t\tfileOut.writeObject(hsd);\r\n\t\t\tfileOut.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Save File not found\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null,\"Unable to save data\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n\t\t\te.printStackTrace();\r\n\t\t\r\n\t\t}\r\n\r\n\t}", "public void Save(){\n\t SharedPreferences prefs = getActivity().getSharedPreferences(MainActivity.SHARED_PREFS_FILE, Context.MODE_PRIVATE);\n\t Editor editor = prefs.edit();\n\t try {\n\t editor.putString(MainActivity.STOCK_LIST_TAG, ObjectSerializer.serialize(list));\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t editor.putFloat(\"balance\", (float) balance);\n\t editor.commit();\n\t}", "private void writeHighscore(int highscore) {\n EditText eTName = findViewById(R.id.eTName);\n String name = eTName.getText().toString().trim();\n String name1 = preferences.getString(KEY_NAME+\"1\",\"\");\n String name2 = preferences.getString(KEY_NAME+\"2\",\"\");\n String name3 = preferences.getString(KEY_NAME+\"3\",\"\");\n int topscore1 = preferences.getInt(KEY+\"1\",0);\n int topscore2 = preferences.getInt(KEY+\"2\",0);\n int topscore3 = preferences.getInt(KEY+\"3\",0);\n if (highscore >= topscore1) {\n preferencesEditor.putInt(KEY+\"1\",highscore);\n preferencesEditor.putString(KEY_NAME+\"1\", name);\n preferencesEditor.putInt(KEY+\"2\",topscore1);\n preferencesEditor.putString(KEY_NAME+\"2\", name1);\n preferencesEditor.putInt(KEY+\"3\",topscore2);\n preferencesEditor.putString(KEY_NAME+\"3\", name2);\n } else if (highscore >= topscore2) {\n preferencesEditor.putInt(KEY+\"1\", topscore1);\n preferencesEditor.putString(KEY_NAME+\"1\", name1);\n preferencesEditor.putInt(KEY+\"2\", highscore);\n preferencesEditor.putString(KEY_NAME+\"2\", name);\n preferencesEditor.putInt(KEY+\"3\", topscore2);\n preferencesEditor.putString(KEY_NAME+\"3\", name2);\n } else {\n preferencesEditor.putInt(KEY+\"1\", topscore1);\n preferencesEditor.putString(KEY_NAME+\"1\", name1);\n preferencesEditor.putInt(KEY+\"2\", topscore2);\n preferencesEditor.putString(KEY_NAME+\"2\", name2);\n preferencesEditor.putInt(KEY+\"3\", highscore);\n preferencesEditor.putString(KEY_NAME+\"3\", name);\n }\n preferencesEditor.commit();\n }", "private void save(){\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor = preferences.edit();\n Gson gson = new Gson();\n String json = gson.toJson(downloadedBooks);\n editor.putString( LISTS_DOWNLOADED, json);\n json = gson.toJson(progress);\n editor.putString( LISTS_PROGRESS, json);\n editor.apply();\n }" ]
[ "0.66516197", "0.6302599", "0.6270905", "0.62642777", "0.6213827", "0.6199365", "0.6181417", "0.6174613", "0.61463237", "0.6069113", "0.602499", "0.59805447", "0.595192", "0.5933868", "0.5912857", "0.5893569", "0.5889812", "0.5882432", "0.58496284", "0.58302164", "0.5822056", "0.58207864", "0.5813081", "0.58012855", "0.5788934", "0.5788191", "0.57677656", "0.57662696", "0.574824", "0.57428277", "0.57422423", "0.57329917", "0.57117665", "0.57094055", "0.56703484", "0.56369203", "0.5628216", "0.5621613", "0.5605254", "0.5595596", "0.5593498", "0.5580792", "0.55669194", "0.5561077", "0.5553602", "0.55519545", "0.55239487", "0.5509384", "0.55035734", "0.5502988", "0.549684", "0.5484498", "0.54840827", "0.5475591", "0.5461055", "0.5458898", "0.5456648", "0.545614", "0.54559535", "0.5454372", "0.5453522", "0.5445555", "0.5440424", "0.54388976", "0.54296094", "0.5423025", "0.54186034", "0.54150486", "0.5411798", "0.54116505", "0.54076284", "0.5405298", "0.5401763", "0.5401391", "0.5398671", "0.53976625", "0.5389697", "0.5382316", "0.53760463", "0.5371938", "0.53512853", "0.53501207", "0.53480315", "0.5348004", "0.5338863", "0.5337687", "0.5334734", "0.5325244", "0.53207886", "0.53123885", "0.5306804", "0.52989745", "0.5296351", "0.5296138", "0.5291756", "0.52880734", "0.52878916", "0.5277817", "0.5266503", "0.5260003" ]
0.77480334
0
Gets the details of the user that is currently logged in
public String getCurrentIdentity(){ mSharedPreference = mContext.getSharedPreferences( mContext.getString(R.string.sharedpreferencesFileName),Context.MODE_PRIVATE); if(mSharedPreference.contains("zzxxyz")) { return mSharedPreference.getString("zzxxyz", ""); } else return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private EndUser getCurrentLoggedUserDetails() {\n\n\t\tEndUser endUser = endUserDAOImpl.findByUsername(getCurrentLoggedUserName()).getSingleResult();\n\n\t\treturn endUser;\n\n\t}", "@Override\r\n\tpublic User getCurrentUser() {\r\n\t\tString currentUserName = this.getCurrentUserName();\r\n\t\tUser userdetails = this.getByUsername(currentUserName);\r\n\t\treturn userdetails;\r\n\t}", "private String getLoggedInUser() {\r\n\t\tOptional<Authentication> authentication = Optional\r\n\t\t\t\t.ofNullable(SecurityContextHolder.getContext().getAuthentication());\r\n\t\treturn authentication.map(Authentication::getPrincipal).map(obj -> (UserDetails) obj)\r\n\t\t\t\t.map(UserDetails::getUsername).orElse(null);\r\n\t}", "User getCurrentLoggedInUser();", "UserDetails getCurrentUser();", "public User getLoggedUser();", "private User getCurrentUser() {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n String username = auth.getName();\n return userService.findByUsername(username);\n }", "public UserInfo getUserInfo() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is currently logged in.\");\n }\n return (UserInfo) authentication.getPrincipal();\n }", "public User getCurrentUser() {\n\t\tString id = contextHolder.getUserId();\r\n\t\treturn userRepository.get(id);\r\n\t}", "public User getUser(){\n\t\treturn currentUser;\n\t}", "public static User get() {\n User currentUser = (User) getCurrentRequest().getWrappedSession()\n .getAttribute(CURRENT_USER_DETAILS_ATTRIBUTE_KEY);\n if (currentUser == null) {\n return null;\n } else {\n return currentUser;\n }\n }", "LoggedUser getLoggedUser();", "@Override\n\tpublic User getCurrentUser() {\n\t\tint id = sessionService.getCurrentUserId();\n\t\treturn userDao.findById(id);\n\t}", "public UserDetails getLoggedInUser() {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n if (auth != null && auth.isAuthenticated()\n && !(SecurityContextHolder.getContext().getAuthentication() instanceof AnonymousAuthenticationToken)) {\n return (UserDetails) auth.getPrincipal();\n } else {\n LOGGER.debug(\"Tried getting a logged in user, but none was available.\");\n return null;\n }\n }", "public UserCredentials getProfileDetails() {\n return profile.getProfileDetails(currentUser);\n }", "public String getUser() {\r\n return user;\r\n }", "private String getLoggedUser() {\n\t\torg.springframework.security.core.userdetails.User user2 = \n\t\t\t\t(org.springframework.security.core.userdetails.User) \n\t\t\t\tSecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\tString name = user2.getUsername();\n\t\treturn name;\n\t}", "@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }", "public String getUser() {\n return user;\n }", "public String getUser() {\n return user;\n }", "public String getUser() {\n return user;\n }", "public String getUser() {\n return this.user;\n }", "public String getUser()\n {\n return this.user;\n }", "public String getUser()\n {\n return this.user;\n }", "public String getUser()\n {\n return this.user;\n }", "@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }", "public UserInfo getUserInfo() {\n return userInfo;\n }", "public static String getUser() {\n return user;\n }", "private User getUser() {\r\n\t\tUserService userService = UserServiceFactory.getUserService();\r\n\t\treturn userService.getCurrentUser();\r\n\t}", "public String getCurrentLoggedUserinfo() {\n\n\t\tClient client = Client.create();\n\n\t\tWebResource webResource = client.resource(\"http://localhost:8083/UserAccounts/UserAccountService/User_logins\");\n\n\t\tClientResponse response = webResource.accept(\"application/json\").get(ClientResponse.class);\n\n\t\tString output = response.getEntity(String.class);\n\n\t\tSystem.out.println(output);\n\n\t\treturn output;\n\n\t}", "public static String getUser() {\r\n return user;\r\n }", "public String getCurrentUser() {\n return currentUser;\n }", "public User getUser(){\n return this.getAccountController().getUser();\n }", "User getUserInformation(Long user_id);", "private String getUserData() { \n\t\t \n\t\tString userName;\n\t\tObject principial = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\t\n\t\tif(principial instanceof UserDetails) {\n\t\t\tuserName = ((UserDetails) principial).getUsername();\n\t\t} else {\n\t\t\tuserName = principial.toString(); \n\t\t}\n\t\treturn userName; \n\t}", "public UserDetails getUserDetails() {\r\n\t\treturn userDetails;\r\n\t}", "public String getUser() {\r\n\t\treturn user;\r\n\t}", "public String getUser() {\r\n\t\treturn user;\r\n\t}", "public User getCurrentUser() {\n return currentUser;\n }", "public UserInfo getUserInfo() {\r\n return userInfo;\r\n }", "public String getUser() {\n\t\treturn user;\n\t}", "public User getUser(){\r\n\t\treturn this.user;\r\n\t}", "public UserCredential getCurrentUser() {\n return this.currentUser;\n }", "public final User getUser() {\t\r\n\t\treturn this.user;\r\n\t}", "public User getUser(){\n\t\treturn this.user;\n\t}", "public String getCurrentUser() {\r\n return SecurityContextHolder.getContext().getAuthentication().getName();\r\n }", "@Override\n\tpublic UserInfo getUserInfo() {\n\t\tHttpSession session = RpcContext.getHttpSession();\n String auth = (String)session.getAttribute(\"auth\");\n UserInfo ui = null;\n if (auth != null) {\n\t switch(AuthType.valueOf(auth)) {\n\t\t case Database: {\n\t\t String username = (String)session.getAttribute(\"username\");\n\t\t \t\tui = _uim.select(username);\n\t\t \t\tbreak;\n\t\t }\n\t\t case OAuth: {\n\t\t \t\tString googleid = (String)session.getAttribute(\"googleid\");\n\t\t \t\tui = _uim.selectByGoogleId(googleid);\n\t\t \t\tbreak;\n\t\t }\n\t }\n }\n\t\treturn ui;\n\t}", "public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}", "public String getUser() {\n\t\t\treturn user;\n\t\t}", "private AuthenticatedUser getUser(AuthenticationContext context) {\n StepConfig stepConfig = context.getSequenceConfig().getStepMap().get(context.getCurrentStep() - 1);\n return stepConfig.getAuthenticatedUser();\n }", "public User findCurrentUser() {\n String username = SecurityContextHolder.getContext().getAuthentication().getName();\n return userRepository.findByUsername(username);\n }", "@RequestMapping(\"/currentuser\")\n\tpublic User getCurrentlyLoggedInUser() throws NoLoginInfoFoundException, URISyntaxException {\n\t\tUser currentUser = null;\n\t\tString username = loginService.getCurrentUsername();\n\t\tif (username != null) {\n\t\t\tList<User> allUsers = myUserDetailsService.getAllUsers();\n\t\t\tfor (User user : allUsers) {\n\t\t\t\tif (user.getEmail().equals(username)) {\n\t\t\t\t\tcurrentUser = user;\n\t\t\t\t\tURI uri = new URI(Constants.orderBaseurl + Constants.orderGetUserUrl);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tResponseEntity<User> response = restTemplate.postForEntity(uri, currentUser, User.class);\n\t\t\t\t\t\tSystem.out.println(response.getBody());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(e.toString());\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new NoLoginInfoFoundException(\"Please login to continue\");\n\t\t}\n\n\t\treturn currentUser;\n\t}", "public static String getLoggedUser() {\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\treturn auth.getName();\n\t}", "public String getUser(){\n \treturn user;\n }", "UserDetails getDetails();", "public User getUser() {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n return userRepository.findByEmail(auth.getName()).get();\n }", "public String getLoggedInUser() {\n\t\treturn null;\r\n\t}", "public User getUser() {\n\t\treturn this.user;\n\t}", "public User getUser() {\n\t\treturn this.user;\n\t}", "public User getUser() {\r\n\t\treturn user;\r\n\t}", "public User getUser() {\r\n\t\treturn user;\r\n\t}", "public User getUser() {\r\n\t\treturn user;\r\n\t}", "@Override\n\tpublic User getCurrentUser() {\n\t\treturn currentUser;\n\t}", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<>();\n // user name\n user.put(KEY_NAME, sharedPreferences.getString(KEY_NAME, null));\n // user rol\n user.put(KEY_ROL, sharedPreferences.getString(KEY_ROL, null));\n // user user\n user.put(KEY_USER, sharedPreferences.getString(KEY_USER, null));\n // user email id\n user.put(KEY_EMAIL, sharedPreferences.getString(KEY_EMAIL, null));\n // user avatar\n user.put(KEY_PHOTO, sharedPreferences.getString(KEY_PHOTO, null));\n // return user\n return user;\n }", "synchronized public String getUser()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getUserID();\n\t\t\t\n\t\treturn null;\n\t}", "public UserModel getUser() {\n return localUser;\n }", "public UserModel getUser() {\n return localUser;\n }", "public UserModel getUser() {\n return localUser;\n }", "public java.lang.String getUser() {\n return user;\n }", "public UserData getUser() {\n return user;\n }", "public String getUser() {\r\n\t\treturn _userName;\r\n\t}", "public User getUser() {\n\treturn user;\n }", "@RequestMapping(value = CURRENT_LOGGED_IN_USER, method = GET)\n @ResponseStatus(ACCEPTED)\n public ResponseEntity<String> getCurrentLoggedInUser() {\n HashMap<String, UserDTO> response = new HashMap<String, UserDTO>();\n response.put(HASHMAP_USER_KEY, convertFromUser(userServiceImpl.getCurrentLoggedInUser()));\n return new ResponseEntity<String>(gson().toJson(response, getHashMapOfStringAndUserDTO()), ACCEPTED);\n\n }", "public Long getUser() {\n return user;\n }", "public User getUser() {\r\n return user;\r\n }", "public User getLoggedUser(){\n\t\treturn loggedUser;\n\t}", "public User getUser(){\n\t\treturn user;\n\t}", "public User getUserLogged() {\n return userLogged;\n }", "public String getUserAccount() {\n return sessionData.getUserAccount();\n }", "private UserID getCurrentUser()\n\t{\n\t return (UserID)request.getSession().getAttribute(\"userID\");\n\t}", "public String getUser()\n {\n return _user;\n }", "public User getUser() {\n return user;\n }", "public User getUser() {\n return user;\n }", "public User getUser() {\n return user;\n }", "public User getUser() {\n return user;\n }", "public User getUser() {\n\t\treturn user;\n\t}", "public User getUser() {\n\t\treturn user;\n\t}", "public User getUser() {\n\t\treturn user;\n\t}", "public User getUser() {\n\t\treturn user;\n\t}", "public User getUser() {\n\t\treturn user;\n\t}", "public User getUser() {\n\t\treturn user;\n\t}", "@GET\n @Path(\"Current\")\n public User getCurrentUser() {\n return userFacade.getCurrentUser();\n }", "@Override\n\tpublic IUser getUser() {\n\t\treturn getInnerObject().getUser();\n\t}", "protected AuthenticatedUser getCurrentUser() {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n\n if (auth.getPrincipal() instanceof AuthenticatedUser) {\n return (AuthenticatedUser) auth.getPrincipal();\n }\n\n return null;\n }", "@Override\r\n\tpublic User getAuthenticatedUser()\r\n\t{\n\t\treturn userWpJauRestClientImpl.getUser().getUser();\r\n\t}", "public User getUser() { return this.user; }", "public HashMap<String, String> getUserDetails() {\n HashMap<String, String> user = new HashMap<String, String>();\n // user name\n\n user.put(KEY_ID, pref.getString(KEY_ID, null));\n user.put(KEY_EMAIL, pref.getString(KEY_EMAIL, null));\n user.put(KEY_NAME, pref.getString(KEY_NAME, null));\n return user;\n }", "public String getUser() {\n if(user == null)\n return \"\"; \n return user;\n }", "public AVUser getCurrentUser() {\n return this.currentUser;\n }", "@GetMapping(\"/me\")\n public UserDetails me(HttpServletRequest request) {\n return (UserDetails) request.getAttribute(\"user\");\n }", "public SimpleUser getUser() {\n return user;\n }" ]
[ "0.80277246", "0.800521", "0.7833175", "0.7734104", "0.77117485", "0.76654863", "0.76623005", "0.7611351", "0.7492579", "0.745035", "0.7433033", "0.74194926", "0.7417902", "0.7403107", "0.73753154", "0.73645234", "0.7364317", "0.73525673", "0.7352252", "0.7352252", "0.7352252", "0.7335204", "0.7309202", "0.7309202", "0.7309202", "0.7300289", "0.72988623", "0.729034", "0.72869897", "0.7286041", "0.728554", "0.7279585", "0.72784543", "0.7267897", "0.7265861", "0.72588784", "0.7258719", "0.7258719", "0.7245979", "0.7245764", "0.72438186", "0.72435147", "0.7238547", "0.7236865", "0.72330874", "0.72037476", "0.71989995", "0.71909416", "0.7187339", "0.7175737", "0.7172202", "0.71719", "0.71684355", "0.7167843", "0.7157615", "0.7141795", "0.71385175", "0.71350455", "0.71350455", "0.7125479", "0.7125479", "0.7125479", "0.71253335", "0.71238947", "0.71232337", "0.7122847", "0.7122847", "0.7122847", "0.7121784", "0.71208745", "0.71111214", "0.7109869", "0.7103402", "0.7099943", "0.7099309", "0.7098184", "0.7096566", "0.7088903", "0.70870346", "0.70864725", "0.70823914", "0.7075508", "0.7075508", "0.7075508", "0.7075508", "0.7068704", "0.7068704", "0.7068704", "0.7068704", "0.7068704", "0.7068704", "0.7062453", "0.7038755", "0.70352364", "0.7006156", "0.70056856", "0.6999519", "0.69883966", "0.69846153", "0.6966521", "0.69647074" ]
0.0
-1
Sets the details of the user that is currently logged in
public void setCurrentIdentity(String zzxxyz){ mSharedPreference = mContext.getSharedPreferences( mContext.getString(R.string.sharedpreferencesFileName),Context.MODE_PRIVATE); SharedPreferences.Editor editor=mSharedPreference.edit(); editor.putString("zzxxyz",zzxxyz); editor.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateCurrentTrempitUser() {\n\n // create the trempituser object\n TrempitUser currentUser = new TrempitUser();\n currentUser.setFullName(Profile.getCurrentProfile().getName());\n currentUser.setId(Long.valueOf(Profile.getCurrentProfile().getId()));\n\n // update the global variable so all activities can access the user\n globalState.setCurrentUser(currentUser);\n\n // insert the user to the server\n insertTrempitUserToServer(currentUser);\n\n Toast.makeText(this, \"logged in to facebook:\" + globalState.getCurrentUser().getFullName(), Toast.LENGTH_LONG).show();\n }", "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public void setUserDetails(){\n name = firebaseUser.getDisplayName();\n username.setText(name);\n\n Glide.with(this).load(firebaseUser.getPhotoUrl()).into(profileIcon);\n }", "public void setUser(User user) { this.user = user; }", "public void setCurrentUser(String username) {\n currentUser = username;\n }", "public void setLoggedUser(CustomEmployee user) {\n loggedUser = user;\n }", "private void loadUserInformation(){\n FirebaseUser user = mAuth.getCurrentUser();\n\n String displayEmail = user.getEmail();\n email.setText(\"Velkommenn \" + displayEmail+\"!\");\n }", "public void setUser(UserModel param) {\n localUserTracker = true;\n\n this.localUser = param;\n }", "public void setUser(UserModel param) {\n localUserTracker = true;\n\n this.localUser = param;\n }", "public void setUser(UserModel param) {\n localUserTracker = true;\n\n this.localUser = param;\n }", "public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "private void updateUserDetailsFromView() {\n\t\tcurrentDetails.setFirstName(detailDisplay.getFirstName().getValue());\n\t\tcurrentDetails.setLastName(detailDisplay.getLastName().getValue());\n\t\tcurrentDetails.setMiddleInitial(detailDisplay.getMiddleInitial().getValue());\n\t\tcurrentDetails.setTitle(detailDisplay.getTitle().getValue());\n\t\tcurrentDetails.setEmailAddress(detailDisplay.getEmailAddress().getValue());\n\t\tcurrentDetails.setPhoneNumber(detailDisplay.getPhoneNumber().getValue());\n\t\tcurrentDetails.setActive(detailDisplay.getIsActive().getValue());\n\t\t//currentDetails.setRootOid(detailDisplay.getRootOid().getValue());\n\t\tcurrentDetails.setRole(detailDisplay.getRole().getValue());\n\t\t\n\t\tcurrentDetails.setOid(detailDisplay.getOid().getValue());\n\t\tString orgId = detailDisplay.getOrganizationListBox().getValue();\n\t\tcurrentDetails.setOrganizationId(orgId);\n\t\tResult organization = detailDisplay.getOrganizationsMap().get(orgId);\n\t\tif (organization != null) {\n\t\t\tcurrentDetails.setOrganization(organization.getOrgName());\n\t\t} else {\n\t\t\tcurrentDetails.setOrganization(\"\");\n\t\t}\n\t}", "public void setUser(String user)\n {\n _user = user;\n }", "@Override\r\n\tpublic User getCurrentUser() {\r\n\t\tString currentUserName = this.getCurrentUserName();\r\n\t\tUser userdetails = this.getByUsername(currentUserName);\r\n\t\treturn userdetails;\r\n\t}", "private void updateUserDetails() {\n \tUser user=CurrentSession.getCurrentUser();\n \tjLabel1.setText(\"Name:\");\n jLabel2.setText(user.getFirstName()+\" \"+user.getLastName());\n jLabel3.setText(\"Card Number:\");\n jLabel4.setText(user.getCardNumber());\n jLabel5.setText(\"Daily Calorie Intake\");\n FoodPreference fp=new FoodPreference(user.getCardNumber());\n jLabel6.setText(\"\"+fp.getUserCalories());\n jLabel7.setText(\"Monthly Expenses\");\n jLabel8.setText(\"\"+user.getExpenses());\n\n\t\t\n\t}", "public void setUser(UserData data) {\n user = data;\n }", "private void updateUserLogin() {\n\t\tSessionManager sessionManager = new SessionManager(\n\t\t\t\tMyApps.getAppContext());\n\n\t\tRequestParams params = new RequestParams();\n\t\tparams.add(\"user_id\", sessionManager.getUserDetail().getUserID());\n\n\t\tLog.d(\"EL\", \"userID: \" + sessionManager.getUserDetail().getUserID());\n\n\t\tKraveRestClient.post(WebServiceConstants.AV_UPDATE_USER_PROFILE_DATA_1,\n\t\t\t\tparams, new JsonHttpResponseHandler() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tJSONObject response) {\n\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tLog.d(\"EL\", \"response: \" + response.toString(2));\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tThrowable throwable, JSONObject errorResponse) {\n\n\t\t\t\t\t\tsuper.onFailure(statusCode, headers, throwable,\n\t\t\t\t\t\t\t\terrorResponse);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "private static void updateUser() {\n\t currentUser = Structure.User(currentUser);\n\t CRUDUsers.compareWithRemote(currentUser).subscribe(new SingleSubscriber<User>() {\n\t\t @Override\n\t\t public void onSuccess(User value) {\n\t\t\t\tConnection.logIn(value);\n\t\t }\n\t\t\n\t\t @Override\n\t\t public void onError(Throwable error) {\n\t\t\t logOff();\n\t\t\t App.showMessage(error.getMessage());\n\t\t }\n\t });\n }", "void setCurrentUser(@Nullable User newCurrentUser) {\n currentUser = newCurrentUser;\n }", "public void setUser(User theUser) {\n\t\tmyUser = theUser;\n\t}", "public void setUser(User user) {\r\n this.user = user;\r\n }", "UserDetails getCurrentUser();", "private EndUser getCurrentLoggedUserDetails() {\n\n\t\tEndUser endUser = endUserDAOImpl.findByUsername(getCurrentLoggedUserName()).getSingleResult();\n\n\t\treturn endUser;\n\n\t}", "public void setUser(String user) {\r\n this.user = user;\r\n }", "private void setUser(){\n try{\n if (!mainUser.getUsername().equals(\"\")){\n this.userName.setText(mainUser.getUsername());\n }else{\n this.userName.setText(\"User\");\n }\n\n\n File file = new File(mainUser.getProfileImage());\n if (!file.exists()){\n file = new File(getClass().getResource(\"../images/eren.png\").getFile());\n }\n Image img = new Image(file.toURI().toString());\n profileImage.setImage(img);\n\n setEventLabel(\"Welcome \"+mainUser.getFname()+\" \"+mainUser.getLname()+\".\");\n }catch (NullPointerException e){\n AlertBox.alert(AlertType.ERROR, stackRoot, anchorRoot, \"There was an error while updating UserInfo\");\n }\n }", "private void setUser(HttpServletRequest req, Request sensorReq) {\n\t\tObject userObject = req.getAttribute(\"__user\");\n\t\tif ( null == userObject) \n\t\t{\n\t\t\tsensorReq.setUser(UserProfile.getAnonymous());\n\t\t} \n\t\telse \n\t\t{\n\t\t\tsensorReq.setUser((UserProfile) userObject);\n\t\t}\n\t}", "private void setAuthenticatedUser(HttpServletRequest req, HttpSession httpSess, String userName) {\n\t\t// Set the authentication\n\t\tauthComponent.setCurrentUser(userName);\n\n\t\t// Set up the user information\n\t\tUserTransaction tx = transactionService.getUserTransaction();\n\t\tNodeRef homeSpaceRef = null;\n\t\tUser user;\n\t\ttry {\n\t\t\ttx.begin();\n\t\t\tuser = new User(userName, authService.getCurrentTicket(), personService.getPerson(userName));\n\t\t\thomeSpaceRef = (NodeRef) nodeService.getProperty(personService.getPerson(userName), ContentModel.PROP_HOMEFOLDER);\n\t\t\tif(homeSpaceRef == null) {\n\t\t\t\tlogger.warn(\"Home Folder is null for user '\"+userName+\"', using company_home.\");\n\t\t\t\thomeSpaceRef = (NodeRef) nodeService.getRootNode(Repository.getStoreRef());\n\t\t\t}\n\t\t\tuser.setHomeSpaceId(homeSpaceRef.getId());\n\t\t\ttx.commit();\n\t\t} catch (Throwable ex) {\n\t\t\tlogger.error(ex);\n\n\t\t\ttry {\n\t\t\t\ttx.rollback();\n\t\t\t} catch (Exception ex2) {\n\t\t\t\tlogger.error(\"Failed to rollback transaction\", ex2);\n\t\t\t}\n\n\t\t\tif (ex instanceof RuntimeException) {\n\t\t\t\tthrow (RuntimeException) ex;\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"Failed to set authenticated user\", ex);\n\t\t\t}\n\t\t}\n\n\t\t// Store the user\n\t\thttpSess.setAttribute(AuthenticationHelper.AUTHENTICATION_USER, user);\n\t\thttpSess.setAttribute(LoginBean.LOGIN_EXTERNAL_AUTH, Boolean.TRUE);\n\n\t\t// Set the current locale from the Accept-Lanaguage header if available\n\t\tLocale userLocale = parseAcceptLanguageHeader(req, m_languages);\n\n\t\tif (userLocale != null) {\n\t\t\thttpSess.setAttribute(LOCALE, userLocale);\n\t\t\thttpSess.removeAttribute(MESSAGE_BUNDLE);\n\t\t}\n\n\t\t// Set the locale using the session\n\t\tI18NUtil.setLocale(Application.getLanguage(httpSess));\n\n\t}", "public void setUserDetails(UserDetails userDetails) {\r\n\t\tthis.userDetails = userDetails;\r\n\t}", "void setPassedUser(User passedUser);", "private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }", "public void setUser(User user) {\n\tthis.user = user;\n }", "public void setCurrentUser(AVUser aVUser) {\n this.currentUser = aVUser;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) \r\n\t{\n\t\tthis.user = user;\r\n\t}", "public void setCurrentUser(Person person) {\n assert person != null;\n this.currentUser = person;\n indicateUserLoginStatusChanged();\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.user = user;\n }", "@Override\n\tpublic User getCurrentUser() {\n\t\treturn currentUser;\n\t}", "public void updateUserDetails() {\n\t\tSystem.out.println(\"Calling updateUserDetails() Method To Update User Record\");\n\t\tuserDAO.updateUser(user);\n\t}", "private void loggedInUser() {\n\t\t\n\t}", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setUser(User user) {\r\n\t\tthis.user = user;\r\n\t}", "public void setLoggedUser(User loggedUser){\n\t\tthis.loggedUser = loggedUser;\n\t}", "public void populateUserInformation()\n {\n ViewInformationUser viewInformationUser = new ViewFXInformationUser();\n\n viewInformationUser.buildViewProfileInformation(clientToRegisteredClient((Client) user), nameLabel, surnameLabel, phoneLabel, emailLabel, addressVbox);\n }", "public void setCurrentUserAccount(String currentUserAccount);", "public void setUser (User user) {\n userId = user.id != null ? user.id : User.getUserId(user.username);\n }", "private void setSessionAttribs(HttpServletRequest req, BlogUser user) {\n\t\treq.getSession().setAttribute(\"current.user.id\", user.getId());\n\t\treq.getSession().setAttribute(\"current.user.fn\", user.getFirstName());\n\t\treq.getSession().setAttribute(\"current.user.ln\", user.getLastName());\n\t\treq.getSession().setAttribute(\"current.user.nick\", user.getNick());\n\t}", "private void setUserDetailsToView() {\n\t\tdetailDisplay.getFirstName().setValue(currentDetails.getFirstName());\n\t\tdetailDisplay.getLastName().setValue(currentDetails.getLastName());\n\t\tdetailDisplay.getMiddleInitial().setValue(currentDetails.getMiddleInitial());\n\t\tdetailDisplay.getLoginId().setText(currentDetails.getLoginId());\n\t\tdetailDisplay.getTitle().setValue(currentDetails.getTitle());\n\t\tdetailDisplay.getEmailAddress().setValue(currentDetails.getEmailAddress());\n\t\tdetailDisplay.getPhoneNumber().setValue(currentDetails.getPhoneNumber());\n\t\tdetailDisplay.getOrganizationListBox().setValue(currentDetails.getOrganizationId());\n\t\tdetailDisplay.getIsActive().setValue(currentDetails.isActive());\n\t\tif (!currentDetails.isActive()) {\n\t\t\tdetailDisplay.getIsRevoked().setValue(true);\n\t\t} else { // added else to fix default Revoked radio check in Mozilla (User Story 755)\n\t\t\tdetailDisplay.getIsRevoked().setValue(false);\n\t\t}\n\t\t\n\t\tdetailDisplay.setUserLocked(currentDetails.isLocked());\n\t\tif (currentDetails.isExistingUser()) {\n\t\t\tdetailDisplay.setShowRevokedStatus(currentDetails.isCurrentUserCanChangeAccountStatus());\n\t\t\t// detailDisplay.setUserIsDeletable(currentDetails.isCurrentUserCanChangeAccountStatus());\n\t\t} else {\n\t\t\tdetailDisplay.setShowRevokedStatus(false);\n\t\t\t//detailDisplay.setUserIsDeletable(false);\n\t\t}\n\t\tdetailDisplay.setUserIsActiveEditable(currentDetails.isCurrentUserCanChangeAccountStatus());\n\t\tdetailDisplay.setShowUnlockOption(currentDetails.isCurrentUserCanUnlock() && currentDetails.isActive());\n\t\tdetailDisplay.getRole().setValue(currentDetails.getRole());\n\t\tdetailDisplay.getOid().setValue(currentDetails.getOid());\n\t\tdetailDisplay.getOid().setTitle(currentDetails.getOid());\n\t\t//detailDisplay.getRootOid().setValue(currentDetails.getRootOid());\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "private void getCurrentUser() {\r\n // Eingeloggte Person holen\r\n currentUser = loginBean.getLoggedInPerson();\r\n\r\n if (currentUser != null && currentUser.getEmployees().isEmpty() == false) {\r\n employeeList.clear();\r\n employeeList.addAll(currentUser.getEmployees());\r\n }\r\n }", "public void setUser(UserDTO user)\r\n {\r\n if (!edit)\r\n {\r\n this.user = user;\r\n\r\n if (user != null)\r\n {\r\n textUser.setText(user.getUsername());\r\n\r\n }\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(this, \"Cannot select another person while you are adding or edditing the tree.\");\r\n }\r\n }", "@Override\n\tpublic User getCurrentUser() {\n\t\tint id = sessionService.getCurrentUserId();\n\t\treturn userDao.findById(id);\n\t}", "private void initializeCurrentUser() {\n if (enableLoginActivity && mAuth.getCurrentUser() != null) {\n try {\n initializeUser();\n refreshGoogleCalendarToken();\n } catch (PetRepeatException e) {\n Toast toast = Toast.makeText(this, getString(R.string.error_pet_already_existing),\n Toast.LENGTH_LONG);\n toast.show();\n }\n\n if (mAuth.getCurrentUser() != null) {\n mAuth.getCurrentUser().getIdToken(false).addOnCompleteListener(task -> {\n user.setToken(Objects.requireNonNull(task.getResult()).getToken());\n });\n }\n }\n }", "public void setCallingUser(entity.User value);", "public void setUserLogged(User userLogged) {\n this.userLogged = userLogged;\n }", "public static void userData(Context context)\r\n\t{\r\n\t\ttry {\r\n\t\t\tcontext.json(((Account)context.sessionAttribute(\"currentUser\")));\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tLogging.error(e);\r\n\t\t\tcontext.redirect(\"/index.html\");\r\n\t\t}\r\n\t}", "public void setCurrUser(User currUser) {\n this.currUser = currUser;\n }", "private boolean setLoggedInUser(String userId) {\n if (currentContext != null) {\n //Set the user Id when user is successfully logged_in\n if (mFireBaseAnalytics != null)\n mFireBaseAnalytics.setUserId(userId);\n SharedPreferences sharedPrefs = currentContext.getSharedPreferences(LOGIN_SHARED_PREF_NAME, 0);\n return sharedPrefs.edit().putString(USER_ID_SHARED_PREF_NAME, userId).commit() &&\n setLoggedInTime();\n }\n return false;\n }", "public void setAuthentication(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.putString(\"userid\", mUserId);\n preferencesEditor.putString(\"areaid\", mAreaId);\n preferencesEditor.commit();\n }", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "private void loadUserInformation() {\n FirebaseUser user = mAuth.getCurrentUser();\n\n if (user != null) {\n if (user.getPhotoUrl() != null) {\n Glide.with(this).load(user.getPhotoUrl().toString()).into(profilePic);\n }\n if (user.getDisplayName() != null) {\n name.setText(user.getDisplayName());\n }\n\n }\n\n }", "public void setUser(Long user) {\n this.user = user;\n }", "public void setUser(User user) {\n this.savedBy = user;\n }", "void setUser(User user, int id) {\n this.user = user;\n this.id = id;\n }", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(User user) {\n\t\tthis.user = user;\n\t}", "public void setUser(final SimpleUser user) {\n this.user = user;\n }", "public static void setUser(String user) {\n Account.user = user;\n }", "private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }", "User getCurrentLoggedInUser();", "@ApiModelProperty(value = \"Gets or sets Curren tUser.\")\n public UserInformation getCurrentUser() {\n return currentUser;\n }", "public void setUser(final User user) {\n this.user = user;\n }", "private void loadCurrentUserInformation() {\n if(currentUser!=null){\n currentUserUid=currentUser.getUid();\n databaseReference.child(\"Users Data\").child(\"Sign Up Info\").child(\"UID \"+currentUserUid).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n currentUserName=(String) dataSnapshot.child(\"Name\").getValue();\n currentUserPassword=(String)dataSnapshot.child(\"Password\").getValue();\n currentUserCity=(String)dataSnapshot.child(\"City\").getValue();\n currentProfileImage=(String)dataSnapshot.child(\"Profile Image Url\").getValue();\n displayUserProfile();\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }\n }", "private void setUser(UserService.User user) {\n this.userName = user.getName();\n\n DateFormat dateTimeInstance =\n SimpleDateFormat.getDateTimeInstance(DateFormat.LONG,\n DateFormat.LONG);\n this.lastUpdateString = dateTimeInstance.format(user.getLastUpdate());\n\n this.notifyPropertyChanged(BR.userName);\n this.notifyPropertyChanged(BR.lastUpdateString);\n }", "private void updateUI() {\n user = mAuth.getCurrentUser();\n if (user != null) {\n user.reload().addOnCompleteListener(userReloadListener);\n }\n }", "public void setlogUserIn() {\n\t\tmenu1.setOnAction(event -> {\n\t\t\topenUserSettings();\n\t\t});\n\t\tmenu2.setOnAction(event -> {\n\t\t\tsetlogUserOut();\n\t\t});\n\t\tuserMenuButton.setText(controller.loggedIn());\n\t\tuserMenuButton.setStyle(\"-fx-font-size: 10pt; -fx-text-fill:black;\"); // MUOTOILU CSSSSSÄÄÄÄN\n\t\tuserMenuButton.getItems().addAll(menu1, menu2);\n\t\tloggedinuser.setVisible(true);\n\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\tloggedinuser.setGraphic(userMenuButton);\n\t\tloggedinuser.setContentDisplay(ContentDisplay.RIGHT);\n\t\tuserSettings.setVisible(true);\n\t\tloginoption.setVisible(false);\n\t}", "public void assignCurrentAdminUser(final String val) {\n currentAdminUser = val;\n }", "public User getUser(){\n\t\treturn currentUser;\n\t}", "void setUser(OSecurityUser user);", "public void viewUser() {\n\t\tsuper.viewUser();\n\t}", "public void setUserid(java.lang.String value) {\n this.userid = value;\n }", "public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }", "public void setUser(java.lang.String user) {\n this.user = user;\n }", "public User getCurrentUser() {\n return currentUser;\n }", "@Override\n\tpublic UserFormData loggedIn(final UserFormData userData) {\n\t\tfinal Date now = new Date();\n\t\tLOG.info(new StringBuilder().append(\"User \" + userData.getEmail()).append(\" (login : \" + userData.getLogin())\n\t\t\t\t.append(\") juste logged in, updating stats data\").toString());\n\t\tSQL.insert(SQLs.USER_UPDATE_LAST_LOGIN, userData, new NVPair(\"currentDate\", now));\n\n\t\tthis.dataCache.clearCache(userData.getUserId().getValue());\n\t\treturn userData;\n\t}", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "public void setUser(String user) {\n\t\t\tthis.user = user;\n\t\t}", "public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}", "public void modifyUser() {\n\t\tUser selectedUser = null;\r\n\t\tselectedUser = tableUser.getSelectionModel().getSelectedItem();\r\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tif (selectedUser != null) {\r\n\t\t\t\tframeManager.modifyUser(user, selectedUser);\r\n\t\t\t\tpesquisar();\r\n\t\t\t} else {\r\n\t\t\t\tAlertUtils.alertErroSelecionar(\"Para modificar um usuario é necessário selecionar um!\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}" ]
[ "0.73294765", "0.7226554", "0.720221", "0.7037926", "0.6993507", "0.69691545", "0.6950193", "0.69460285", "0.69460285", "0.69460285", "0.6938781", "0.684511", "0.684511", "0.684511", "0.68395066", "0.6828291", "0.68243235", "0.68224204", "0.6821779", "0.681439", "0.68114746", "0.67623806", "0.6748912", "0.6747759", "0.6725839", "0.67137825", "0.66999274", "0.6675778", "0.6665145", "0.66628784", "0.6630356", "0.6627813", "0.6621771", "0.66130334", "0.6596395", "0.6593184", "0.6593184", "0.6593184", "0.6593184", "0.65908515", "0.6590466", "0.65890694", "0.65890694", "0.65890694", "0.65850574", "0.658022", "0.65775865", "0.65483946", "0.65483946", "0.6540038", "0.6501577", "0.64892983", "0.6485255", "0.64734805", "0.6471872", "0.6468129", "0.6467005", "0.64575124", "0.645111", "0.6447909", "0.644736", "0.64445746", "0.6443085", "0.64252925", "0.6420995", "0.64193535", "0.64143324", "0.6411133", "0.64042836", "0.6397261", "0.6391049", "0.6378437", "0.6378437", "0.6378437", "0.6378437", "0.6378437", "0.6378437", "0.63702154", "0.6339891", "0.633822", "0.63358724", "0.6335214", "0.6332144", "0.6323956", "0.63097036", "0.63040084", "0.62990886", "0.6297022", "0.6289011", "0.6283428", "0.6282602", "0.62782437", "0.62725824", "0.6255863", "0.6255685", "0.6250618", "0.62497747", "0.6246738", "0.62464964", "0.6229037", "0.62284154" ]
0.0
-1
Method to insert record in to the SQLite database
public void insertRecords(){ InsertToDB insertRecords= new InsertToDB(mDbhelper,mRecord); Log.i(TAG, "starting insertion on a new Thread!!"); idlingResource.increment(); new Thread(insertRecords).start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void insert(BnesBrowsingHis record) throws SQLException;", "int insert(Assist_table record);", "int insert(PmKeyDbObj record);", "int insert(Model record);", "void insert(OrderPreferential record) throws SQLException;", "int insert(AccessModelEntity record);", "public void insert() throws SQLException;", "int insert(UserInfo record);", "void insert(GfanCodeBanner record) throws SQLException;", "int insert(Basicinfo record);", "int insert(Engine record);", "int insert(Prueba record);", "Long insert(Access record);", "int insert(Tourst record);", "int insert(Storage record);", "int insert(Storage record);", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "int insert(StudentInfo record);", "int insert(GirlInfo record);", "void insert(IrpSignInfo record) throws SQLException;", "int insert(Transaction record);", "int insert(ActActivityRegister record);", "int insert(RecordLike record);", "Integer insert(JzAct record);", "int insert(DebtsRecordEntity record);", "int insert(Forumpost record);", "String insert(BookDO record);", "int insert(TestActivityEntity record);", "int insert(ParkCurrent record);", "void insert(PaymentTrade record);", "int insert(TrainingCourse record);", "int insert(Enfermedad record);", "int insert(ApplicationDO record);", "int insert(BookInfo record);", "int insert(DBPublicResources record);", "int insert(Course record);", "int insert(Course record);", "int insert(DataSync record);", "int insert(Storydetail record);", "int insert(Commet record);", "int insert(Ltsprojectpo record);", "int insert(ActivityHongbaoPrize record);", "int insert(SdkMobileVcode record);", "int insert(CmsActivity record);", "int insert(AccuseInfo record);", "int insert(IceApp record);", "int insert(FinMonthlySnapModel record);", "int insert(Tour record);", "int insert(TrainCourse record);", "int insert(TbSerdeParams record);", "int insert(PmPost record);", "int insert(Massage record);", "int insert(Cargo record);", "int insert(NewsInfo record);", "int insert(OrderDetail record);", "void insert(TResearchTeach record);", "int insert(LoginRecordDO record);", "int insert(UserInfoUserinfo record);", "int insert(Kaiwa record);", "int insert(ParseTableLog record);", "int insert(AnnouncementDO record);", "void insert(Mi004 record);", "int insert(ClinicalData record);", "int insert(Goods record);", "int insert(Body record);", "int insert(StudentEntity record);", "int insert(Journal record);", "@Override\n public void onClick(View view) {\n Log.d(\"CALL_TEST\", \"SAVE!\");\n DbManager db = DbManager.getInstance(getApplicationContext());\n\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"NAME\", \"홍길동\");\n contentValues.put(\"PHONE\", \"1234\");\n\n db.insert(contentValues);\n }", "int insert(TbSnapshot record);", "void insert(Disproduct record);", "int insert(Product record);", "int insert(NjProductTaticsRelation record);", "int insert(Article record);", "int insert(Appraise record);", "int insert(Caiwu record);", "int insert(OrderDetails record);", "int insert(HomeWork record);", "int insert(TCpySpouse record);", "int insert(ReEducation record);", "int insert(Abum record);", "int insert(PrefecturesMt record);", "int insert(Project record);", "int insert(Userinfo record);", "int insert(Payment record);", "int insert(News record);", "int insert(CmsRoomBook record);", "int insert(FundManagerDo record);", "int insert(SrHotelRoomInfo record);", "private long insert(SQLiteDatabase db, Object o) {\n\t\tContentValues values = createContentValues(o);\n\t\tif (values != null) {\n\t\t\treturn db.insert(getTableName(o.getClass()), null, values);\n\t\t}\n\t\treturn -1L;\n\t}", "int insert(ArticleDo record);", "int insert(Student record);", "int insert(Student record);", "int insert(Student record);", "int insert(SwipersDO record);", "int insert(QuestionOne record);", "int insert(AliUserInfoDO record);", "int insert(FinancialManagement record);", "int insert(Table2 record);", "int insert(SdkPhone record);", "int insert(AdminTab record);", "int insert(CptDataStore record);" ]
[ "0.74370563", "0.73922133", "0.7205262", "0.7187866", "0.71643007", "0.7159406", "0.715828", "0.7141956", "0.70896244", "0.70860684", "0.70860076", "0.7065169", "0.7059313", "0.7056167", "0.7032872", "0.7032872", "0.7029016", "0.70263296", "0.7004998", "0.69993585", "0.6992994", "0.6976166", "0.69689786", "0.6968469", "0.69564164", "0.69548726", "0.69537747", "0.6930908", "0.69290143", "0.69167", "0.6912758", "0.69099253", "0.69064", "0.6904589", "0.6893644", "0.6890547", "0.6890547", "0.68902814", "0.6888222", "0.68778074", "0.6876712", "0.68639314", "0.6855283", "0.68518794", "0.68518615", "0.6851793", "0.6848094", "0.6848082", "0.68436617", "0.684111", "0.6840377", "0.6833656", "0.6830111", "0.6826586", "0.68245393", "0.68235826", "0.682185", "0.6820902", "0.681531", "0.68071616", "0.6806072", "0.6803665", "0.6796251", "0.67908305", "0.67908275", "0.67884016", "0.67847884", "0.6779829", "0.67716706", "0.6764999", "0.67648697", "0.6759511", "0.67564654", "0.6748589", "0.6738127", "0.6737869", "0.6736443", "0.67222273", "0.67182267", "0.6710893", "0.6708591", "0.67065585", "0.6705086", "0.67019945", "0.67008215", "0.6700386", "0.67003417", "0.6699513", "0.6696305", "0.6696081", "0.66924906", "0.66924906", "0.66924906", "0.6689184", "0.6687777", "0.6687043", "0.6685309", "0.6680484", "0.6678088", "0.66775256", "0.667547" ]
0.0
-1
This method starts the Sync Service.
public void startSyncing(){ Log.i(TAG,"in start Syncing"); Intent intent = new Intent(mContext,SyncerService.class); if(!SyncerService.IsRunning) { intent.putExtra("SyncStarted", MainActivity.SYNC_STARTED); intent.putExtra("SyncComplete", MainActivity.SYNC_COMPLETE); } if(!SyncerService.IsRunning) { mContext.startService(intent); // Toast.makeText(mContext, "Service will be started!!", Toast.LENGTH_SHORT).show(); } else{ // Toast.makeText(mContext, "Syncing in progress already!!", Toast.LENGTH_SHORT).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startSync() {\n mLogger.d(\"Starting silent sync\");\n startSync(new IMediaSyncListener() {\n @Override\n public void step() {\n\n }\n\n @Override\n public void onFinish(int total, int ok, int ko) {\n mLogger.d(\"Silent sync finished, killing the service\");\n SyncService.this.onDestroy();\n }\n });\n }", "@Override\n\tpublic void startSync() throws Exception {\n\t}", "SyncStart createSyncStart();", "@Override\n public void start() throws SyncProcessException {\n }", "private void startService() {\n\n if (!mAlreadyStartedService ) {\n\n //mMsgView.setText(R.string.msg_location_service_started);\n\n //Start location sharing service to app server.........\n Intent intent = new Intent(this, LocationMonitoringService.class);\n startService(intent);\n\n mAlreadyStartedService = true;\n //Ends................................................\n }\n }", "void syncImmediately() {\r\n // Utilize the current time as the seed time for each of the RecipeSyncServices\r\n long currentTime = Utilities.getCurrentTime();\r\n\r\n // Initialize and start the Services\r\n Intent allRecipesIntent = new Intent(this, AllRecipesService.class);\r\n allRecipesIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(allRecipesIntent);\r\n\r\n Intent epicuriousIntent = new Intent(this, EpicuriousService.class);\r\n epicuriousIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(epicuriousIntent);\r\n\r\n Intent foodIntent = new Intent(this, FoodDotComService.class);\r\n foodIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(foodIntent);\r\n\r\n Intent seriousIntent = new Intent(this, SeriousEatsService.class);\r\n seriousIntent.putExtra(getString(R.string.extra_time), currentTime);\r\n startService(seriousIntent);\r\n }", "@Override\n\t public int onStartCommand(Intent intent, int flags, int startId) {\n\t \n\t\t \tToast.makeText(this, \"The new Service was onStartCommand\", Toast.LENGTH_LONG).show();\n\t\t \t\n\t\t \tOnStartUp();\n\t\t \t\n\t\t \t//new upload_sync().execute();\n\t\t \t\n\t return START_STICKY;\n\t }", "public void startService() {\n log_d( \"startService()\" );\n \tint state = execStartService();\n\t\tswitch( state ) {\n\t\t\tcase STATE_CONNECTED:\n\t\t\t\tshowTitleConnected( getDeviceName() );\n\t\t\t\thideButtonConnect();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tshowTitleNotConnected();\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\t\t\tpublic void start() {\n\t\t\t\tinitResource();\n\t\t\t\t//获取通讯录信息\n\t\t\t\tinitContactsData();\n\t\t\t\t//同步通讯录\n\t\t\t\tupLoadPhones();\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tvalues.setBtnStartVal(btn_start.isActivated());\r\n\t\t\t\tif (btn_start.isActivated()) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (syncsrv == null) {\r\n\t\t\t\t\t\t\tsyncsrv = new SyncService();\r\n\t\t\t\t\t\t\tSyncProc.loadConfig(new AndroidLogger());\r\n\t\t\t\t\t\t\tsyncsrv.start();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSyncProc.pause = false;\r\n\t\t\t\t\t\tvalues.setStatusStr(\"SyncService started.\");\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\tvalues.setStatusStr(\"cannot start service: \" + e.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSyncProc.pause = true;\r\n\t\t\t\t\tvalues.setStatusStr(\"SyncService paused.\");\r\n\t\t\t\t}\r\n\t\t\t\tvalues.resetAllControls();\r\n\t\t\t}", "protected void startService() {\n\t\t//if (!isServiceRunning(Constants.SERVICE_CLASS_NAME))\n\t\tthis.startService(new Intent(this, LottoService.class));\n\t}", "private void startStep3() {\n\n //And it will be keep running until you close the entire application from task manager.\n //This method will executed only once.\n\n if (!mAlreadyStartedService && mMsgView != null) {\n mMsgView.setText(R.string.msg_location_service_started);\n //Start location sharing service to app server.........\n Intent intent = new Intent(this, LocationMonitoringService.class);\n startService(intent);\n mAlreadyStartedService = true;\n //Ends................................................\n }\n }", "public void start() {\n \t\tLog.info(\"Starting service of repository requests\");\n \t\ttry {\n \t\t\tresetNameSpace();\n \t\t} catch (Exception e) {\n \t\t\tLog.logStackTrace(Level.WARNING, e);\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\tbyte[][]markerOmissions = new byte[2][];\n \t\tmarkerOmissions[0] = CommandMarkers.COMMAND_MARKER_REPO_START_WRITE;\n \t\tmarkerOmissions[1] = CommandMarkers.COMMAND_MARKER_BASIC_ENUMERATION;\n \t\t_markerFilter = new Exclude(markerOmissions);\n \t\t\n \t\t_periodicTimer = new Timer(true);\n \t\t_periodicTimer.scheduleAtFixedRate(new InterestTimer(), PERIOD, PERIOD);\n \n \t}", "public void startService() {\r\n Log.d(LOG, \"in startService\");\r\n startService(new Intent(getBaseContext(), EventListenerService.class));\r\n startService(new Intent(getBaseContext(), ActionService.class));\r\n getListenerService();\r\n\r\n }", "private void startService() {\n startService(new Intent(this, BackgroundMusicService.class));\n }", "public void start() {\n\t\tinstanceConfigUpdated();\n\n\t\tnew Thread(getUsageData, \"ResourceConsumptionManager : GetUsageData\").start();\n\n\t\tLoggingService.logInfo(MODULE_NAME, \"started\");\n\t}", "public void startSync(ISyncContext syncContext, String authority, Account account, Bundle extras) {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n if (extras != null) {\n extras.size();\n }\n Log.d(AbstractThreadedSyncAdapter.TAG, \"startSync() start \" + authority + WifiEnterpriseConfig.CA_CERT_ALIAS_DELIMITER + account + WifiEnterpriseConfig.CA_CERT_ALIAS_DELIMITER + extras);\n }\n try {\n SyncContext syncContextClient = new SyncContext(syncContext);\n Account threadsKey = AbstractThreadedSyncAdapter.this.toSyncKey(account);\n synchronized (AbstractThreadedSyncAdapter.this.mSyncThreadLock) {\n boolean alreadyInProgress;\n if (AbstractThreadedSyncAdapter.this.mSyncThreads.containsKey(threadsKey)) {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n Log.d(AbstractThreadedSyncAdapter.TAG, \" alreadyInProgress\");\n }\n alreadyInProgress = true;\n } else {\n if (AbstractThreadedSyncAdapter.this.mAutoInitialize && extras != null) {\n if (extras.getBoolean(ContentResolver.SYNC_EXTRAS_INITIALIZE, false)) {\n try {\n if (ContentResolver.getIsSyncable(account, authority) < 0) {\n ContentResolver.setIsSyncable(account, authority, 1);\n }\n syncContextClient.onFinished(new SyncResult());\n } catch (Throwable th) {\n syncContextClient.onFinished(new SyncResult());\n }\n }\n }\n SyncThread syncThread = new SyncThread(AbstractThreadedSyncAdapter.this, \"SyncAdapterThread-\" + AbstractThreadedSyncAdapter.this.mNumSyncStarts.incrementAndGet(), syncContextClient, authority, account, extras, null);\n AbstractThreadedSyncAdapter.this.mSyncThreads.put(threadsKey, syncThread);\n syncThread.start();\n alreadyInProgress = false;\n }\n }\n } catch (Throwable th2) {\n try {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n Log.d(AbstractThreadedSyncAdapter.TAG, \"startSync() caught exception\", th2);\n }\n throw th2;\n } catch (Throwable th3) {\n if (AbstractThreadedSyncAdapter.ENABLE_LOG) {\n Log.d(AbstractThreadedSyncAdapter.TAG, \"startSync() finishing\");\n }\n }\n }\n }", "@Override\n public synchronized void start() {\n init();\n }", "private void startServerService() {\n Intent intent = new Intent(this, MainServiceForServer.class);\n // Call bindService(..) method to bind service with UI.\n this.bindService(intent, serverServiceConnection, Context.BIND_AUTO_CREATE);\n Utils.log(\"Server Service Starting...\");\n\n //Disable Start Server Button And Enable Stop and Message Button\n messageButton.setEnabled(true);\n stopServerButton.setEnabled(true);\n startServerButton.setEnabled(false);\n\n\n }", "@Override\r\n public synchronized void start() throws Exception {\r\n if (isStopped()) {\r\n startClients();\r\n startServers();\r\n startHelper();\r\n super.start();\r\n }\r\n }", "public void run() {\n mSyncStart = null;\n\n // start sync\n SyncAdapter.requestSync(NumberValidation.this, true);\n\n // if we have been called internally, start ConversationList\n if (mFromInternal)\n startActivity(new Intent(getApplicationContext(), ConversationList.class));\n\n Toast.makeText(getApplicationContext(), R.string.msg_authenticated, Toast.LENGTH_LONG).show();\n\n // end this\n abortProgress();\n finish();\n }", "private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tIntent i = new Intent(this, M_Service.class);\n\t\tbindService(i, mServiceConn, Context.BIND_AUTO_CREATE);\n\t}", "private void run() {\n try {\n traceBeginAndSlog(\"InitBeforeStartServices\");\n SystemProperties.set(SYSPROP_START_COUNT, String.valueOf(this.mStartCount));\n SystemProperties.set(SYSPROP_START_ELAPSED, String.valueOf(this.mRuntimeStartElapsedTime));\n SystemProperties.set(SYSPROP_START_UPTIME, String.valueOf(this.mRuntimeStartUptime));\n EventLog.writeEvent((int) EventLogTags.SYSTEM_SERVER_START, Integer.valueOf(this.mStartCount), Long.valueOf(this.mRuntimeStartUptime), Long.valueOf(this.mRuntimeStartElapsedTime));\n if (System.currentTimeMillis() < 86400000) {\n Slog.w(TAG, \"System clock is before 1970; setting to 1970.\");\n SystemClock.setCurrentTimeMillis(86400000);\n }\n if (!SystemProperties.get(\"persist.sys.language\").isEmpty()) {\n SystemProperties.set(\"persist.sys.locale\", Locale.getDefault().toLanguageTag());\n SystemProperties.set(\"persist.sys.language\", \"\");\n SystemProperties.set(\"persist.sys.country\", \"\");\n SystemProperties.set(\"persist.sys.localevar\", \"\");\n }\n Binder.setWarnOnBlocking(true);\n PackageItemInfo.forceSafeLabels();\n SQLiteGlobal.sDefaultSyncMode = \"FULL\";\n SQLiteCompatibilityWalFlags.init((String) null);\n Slog.i(TAG, \"Entered the Android system server!\");\n int uptimeMillis = (int) SystemClock.elapsedRealtime();\n EventLog.writeEvent((int) EventLogTags.BOOT_PROGRESS_SYSTEM_RUN, uptimeMillis);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_system_server_init\", uptimeMillis);\n Jlog.d(30, \"JL_BOOT_PROGRESS_SYSTEM_RUN\");\n }\n SystemProperties.set(\"persist.sys.dalvik.vm.lib.2\", VMRuntime.getRuntime().vmLibrary());\n VMRuntime.getRuntime().clearGrowthLimit();\n VMRuntime.getRuntime().setTargetHeapUtilization(0.8f);\n Build.ensureFingerprintProperty();\n Environment.setUserRequired(true);\n BaseBundle.setShouldDefuse(true);\n Parcel.setStackTraceParceling(true);\n BinderInternal.disableBackgroundScheduling(true);\n BinderInternal.setMaxThreads(31);\n Process.setThreadPriority(-2);\n Process.setCanSelfBackground(false);\n Looper.prepareMainLooper();\n Looper.getMainLooper().setSlowLogThresholdMs(SLOW_DISPATCH_THRESHOLD_MS, SLOW_DELIVERY_THRESHOLD_MS);\n System.loadLibrary(\"android_servers\");\n if (Build.IS_DEBUGGABLE) {\n initZygoteChildHeapProfiling();\n }\n performPendingShutdown();\n createSystemContext();\n HwFeatureLoader.SystemServiceFeature.loadFeatureFramework(this.mSystemContext);\n this.mSystemServiceManager = new SystemServiceManager(this.mSystemContext);\n this.mSystemServiceManager.setStartInfo(this.mRuntimeRestart, this.mRuntimeStartElapsedTime, this.mRuntimeStartUptime);\n LocalServices.addService(SystemServiceManager.class, this.mSystemServiceManager);\n SystemServerInitThreadPool.get();\n traceEnd();\n try {\n traceBeginAndSlog(\"StartServices\");\n startBootstrapServices();\n startCoreServices();\n startOtherServices();\n SystemServerInitThreadPool.shutdown();\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n StrictMode.initVmDefaults(null);\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n int uptimeMillis2 = (int) SystemClock.elapsedRealtime();\n MetricsLogger.histogram((Context) null, \"boot_system_server_ready\", uptimeMillis2);\n if (uptimeMillis2 > 60000) {\n Slog.wtf(SYSTEM_SERVER_TIMING_TAG, \"SystemServer init took too long. uptimeMillis=\" + uptimeMillis2);\n }\n }\n LogBufferUtil.closeLogBufferAsNeed(this.mSystemContext);\n if (!VMRuntime.hasBootImageSpaces()) {\n Slog.wtf(TAG, \"Runtime is not running with a boot image!\");\n }\n Looper.loop();\n throw new RuntimeException(\"Main thread loop unexpectedly exited\");\n } catch (Throwable th) {\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n throw th;\n }\n } catch (Throwable th2) {\n traceEnd();\n throw th2;\n }\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Toast.makeText(getApplicationContext(), \"Database Sync Initialized.\", Toast.LENGTH_LONG).show();\n\n //instantiate the db.\n db = new Database(getApplicationContext());\n\n //instantiate the array list.\n dbases = new ArrayList<>();\n\n //get the file in here.\n if(db.countBlackSpot() > 0)\n {\n //Toast.makeText(UpdateService.this, \"There are Records to be Synced.\", Toast.LENGTH_SHORT).show();\n\n stats();\n }\n else{\n\n Toast.makeText(UpdateService.this, \"Database Record(s) are Synced.\", Toast.LENGTH_SHORT).show();\n }\n\n return super.onStartCommand(intent, flags, startId);\n }", "@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 syncStart(SyncRequest request) {\n boolean isAdd = mSyncRequestQueue.addRequest(request, mCurrentSyncRequest);\n if (isAdd) {\n if (!mIsSyncing) {\n syncNext();\n }\n }\n }", "public boolean startService_async(AMI_ServiceManager_startService __cb, String service);", "public void start()\n {\n }", "public void start() {\n threadPoolExecutor.setCorePoolSize(configurations.threadPoolSize());\n new Thread(this::startServer).start();\n }", "public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }", "public synchronized void start()\n {\n pluginMonitor.start();\n }", "public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}", "public synchronized void startUp() {\n if (coordinatingThread == null) {\n\n // force a change event to tell the controller to load handlerConfig\n configChangedQueue.offer(\"Loading RADIUS Config...\");\n\n Thread t = new Thread(this);\n t.setName(MessageFormat.format(Constants.COORDINATION_THREAD_NAME, this.getClass().getSimpleName()));\n t.setDaemon(true);\n t.start();\n coordinatingThread = t;\n } else {\n cLog.log(Level.WARNING, this.getClass().getSimpleName() + \".setServletConfig() called again. Service \"\n + \"already started. Ignoring.\");\n }\n }", "private void startServer() {\n mBluetoothGattServer = mBluetoothManager.openGattServer(this, mGattServerCallback);\n if (mBluetoothGattServer == null) {\n Log.w(TAG, \"Unable to create GATT server\");\n return;\n }\n\n mBluetoothGattServer.addService(TimeProfile.createTimeService());\n\n // Initialize the local UI\n updateLocalUi(System.currentTimeMillis());\n mBluetoothGattServer.addService(SecurityProfile.createSecurityService());\n //mBluetoothGattServer.addService(ConfigurationProfile.createConfigurationService());\n\n }", "@Override\n public synchronized void start() {\n m_startTime = getMsClock();\n m_running = true;\n }", "private synchronized void start()\n\t{\n\t\tregisterReceiver(\n\t\t\t\tmConnectivityReceiver,\n\t\t\t\tnew IntentFilter( ConnectivityManager.CONNECTIVITY_ACTION )\n\t\t);\n\n\t\ttry\n\t\t{\n\t\t\t// Show notification in status bar\n\t\t\tshowNotification();\n\t\t} catch ( Exception e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void start() {\n if (heartBeatService != null) {\n return;\n }\n super.start();\n heartBeatService.submit(new DataHeartbeatThread(this));\n pullSnapshotService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());\n pullSnapshotHintService = new PullSnapshotHintService(this);\n pullSnapshotHintService.start();\n resumePullSnapshotTasks();\n }", "@Override\r\n\tpublic synchronized void start() {\n\t\tsuper.start();\r\n\t}", "@Override\n\tpublic void onStart(Intent intent, int startId) {\n\t\tnew RunnableService(new runCallBack(){\n\n\t\t\t@Override\n\t\t\tpublic void start() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tinitResource();\n\t\t\t\t//获取通讯录信息\n\t\t\t\tinitContactsData();\n\t\t\t\t//同步通讯录\n\t\t\t\tupLoadPhones();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void end() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}, true);\n\t\n\t\t\n\t\tsuper.onStart(intent, startId);\n\t}", "private void startSkeletons() {\n if (this.skeletons_started) return;\n\n this.add_registration_api();\n this.registration_skeleton.start();\n this.add_service_api();\n this.service_skeleton.start();\n\n this.skeletons_started = true;\n }", "protected void startService() throws Exception {\n sqlDbManager = new SqlDbManager();\n theDaemon.setDbManager(sqlDbManager);\n sqlDbManager.initService(theDaemon);\n sqlDbManager.startService();\n }", "public static boolean start()\n\t{\n\t\tClient.getInstance();\n\t\treturn false;\n\t}", "@Test\n public void constructStartSyncAndStop() {\n // blockStartup is true by default, so this will sync the blockchain before awaitRunning completes\n kit.startAsync();\n kit.awaitRunning();\n kit.stopAsync();\n kit.awaitTerminated();\n }", "public void start() {\n notifyStart();\n simloop();\n notifyStop();\n }", "public void start(){\n\t\tboolean isMasterSyncEnabled = ContentResolver.getMasterSyncAutomatically();\n\t\tif(isMasterSyncEnabled)\n\t\t{\n\t\t\tboolean noRespNoti = SharedPref.getMainBool(SharedPref.Keys.NO_RESP_NOTI, curContext);\n\t\t\tboolean noAcceptNoti = SharedPref.getMainBool(SharedPref.Keys.NO_ACCEPT_NOTI, curContext);\n\t\t\t\n\t\t\tif( !noRespNoti || !noAcceptNoti ){\n\t\t\t\tNoti noti = null;\n\t\t\t\ttry {\n\t\t\t\t\tnoti = new DownloadNoti(curContext).execute().get();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) {\n\t\t\t\t\tLogAdp.e(getClass(), \"start()\", \"error during downloading noti\", e);\n\t\t\t\t\tnoti = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(noti != null){\n\t\t\t\t\t\n\t\t\t\t\tif(noti.isNewResp == null){\n\t\t\t\t\t\t//if user turn off respNoti on other device sync this setting\n\t\t\t\t\t\tif(!noRespNoti){\n\t\t\t\t\t\t\tSharedPref.setMain(SharedPref.Keys.NO_RESP_NOTI, true, curContext);\n\t\t\t\t\t\t\tnoRespNoti = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!noRespNoti && noti.isNewResp){\n\t\t\t\t\t\tstartNotify(R.string.resp_noti_title, R.string.resp_noti_description, NotiEnum.RESPOND);\n\t\t\t\t\t}\n\t\t\t\t\tif(noti.isNewAccept == null){\n\t\t\t\t\t\t//if user turn off respAccept on other device sync this setting\n\t\t\t\t\t\tif(!noAcceptNoti){\n\t\t\t\t\t\t\tnoRespNoti = true;\n\t\t\t\t\t\t\tSharedPref.setMain(SharedPref.Keys.NO_ACCEPT_NOTI, true, curContext);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!noAcceptNoti && noti.isNewAccept){\n\t\t\t\t\t\tstartNotify(R.string.accept_noti_title, R.string.accept_noti_description, NotiEnum.ACCEPT);\n\t\t\t\t\t}\n\t\t\t\t\t//if sync settings turn off getting noti\n\t\t\t\t\tif(noRespNoti && noAcceptNoti)\n\t\t\t\t\t\tnew Schedule(curContext).cancel();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}", "public Object startSync(\r\n\t\t\tString serverHost,\r\n\t\t\tshort serverPort,\r\n\t\t\tbyte[] serverCertificate,\r\n\t\t\tString serverUniqueId,\r\n\t\t\tString notifyEndpoint\r\n\t\t\t);", "@Override\n\tpublic void onStart(Intent intent, int startId) {\n\t\tthread.start();\n\t\tToast.makeText(this, \"Service Started\", Toast.LENGTH_LONG).show();\n\n\t}", "private void startPlayback() {\n // start player service using intent\n Intent intent = new Intent(mActivity, PlayerService.class);\n intent.setAction(ACTION_PLAY);\n intent.putExtra(EXTRA_STATION, mThisStation);\n mActivity.startService(intent);\n LogHelper.v(LOG_TAG, \"Starting player service.\");\n }", "public void start() {\r\n vcr().start();\t\r\n }", "public void start() throws StunException {\n stunStack = StunStack.getInstance();\n stunStack.start();\n\n stunProvider = stunStack.getProvider();\n\n\n started = true;\n }", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tIntent intent = new Intent(getActivity(), DownloadService.class);\n\t\tgetActivity().bindService(intent, mServiceConnection,\n\t\t\t\tService.BIND_AUTO_CREATE);\n\t}", "protected void start() {\n }", "@Override\n public synchronized void start() {\n\n lifecycleState = LifecycleState.START;\n }", "public boolean startService_async(AMI_ServiceManager_startService __cb, String service, java.util.Map<String, String> __ctx);", "public void startup() {\n\t\tstart();\n }", "public void start() {\n mStateMachine.sendMessage(SoftApStateMachine.CMD_START, mApConfig);\n }", "private void startLoggerService() {\n Intent intent = new Intent(this, GestureLoggerService.class);\n intent.putExtra(GestureLoggerService.EXTRA_START_SERVICE, true);\n\n startService(intent);\n }", "public void InitService() {\n\t\ttry {\r\n\t\t\tgetCommManager().register(this); \r\n\t\t} catch (CommunicationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tpt.getContext().startService( new Intent( pt.getContext(), PerfectTimeService.class ) );\n\t\t\t}", "protected void startIntentService() {\n Intent intent = new Intent(this.getActivity(), FetchAddressIntentService.class);\n intent.putExtra(Constants.RECEIVER, mResultReceiver);\n intent.putExtra(Constants.LOCATION_DATA_EXTRA, mLastLocation);\n this.getActivity().startService(intent);\n }", "public void start() {\n }", "public void startTask() {\n\t}", "@Override\n public void setUpAudioService() {\n\n if (!serviceBound) {\n\n Log.d(LOG_TAG, \"setUpAudioService(): Setting up SSMusicService...\");\n\n // Sets up the service intent and begins the service.\n audioIntent = new Intent(this, SSMusicService.class); // Sets a Intent to the service.\n bindService(audioIntent, musicConnection, Context.BIND_AUTO_CREATE); // Binds the service.\n startService(audioIntent); // Starts the service.\n }\n }", "@Override\n public void run() {\n try {\n logger.info(\"Starting\");\n communicator = Util.initialize();\n\n logger.info(\"Initialized\");\n\n ObjectAdapter adapter =\n communicator.createObjectAdapterWithEndpoints(\"Adapter\",\n String.format(\"tcp -h %s -p %d:udp -h %s -p %d\", hostAddress, hostPort, hostAddress, hostPort));\n\n logger.info(\"Adapter created\");\n\n com.zeroc.Ice.Object accountRegistererServant = new AccountRegistererImplementation(clients);\n com.zeroc.Ice.Object standardClientServant = new StandardManagerImplementation(clients);\n com.zeroc.Ice.Object premiumClientServant = new StandardManagerImplementation(clients);\n\n logger.info(\"Servants created\");\n\n adapter.add(accountRegistererServant, new Identity(\"accountRegistererServant\", null));\n adapter.add(standardClientServant, new Identity(\"standardClientServant\", null));\n adapter.add(premiumClientServant, new Identity(\"premiumClientServant\", null));\n\n logger.info(\"Servants added\");\n\n adapter.activate();\n\n logger.info(\"Adapter active. Waiting for termination.\");\n\n communicator.waitForShutdown();\n\n logger.info(\"Shutting down\");\n } catch (Exception e) {\n System.err.println(this.getClass().getName() + \" - ERROR: \" + e.getMessage());\n } finally {\n if (communicator != null) {\n try {\n logger.info(\"Destroying communicator\");\n communicator.destroy();\n } catch (Exception ignored) {\n // No need to handle this\n }\n }\n }\n }", "public void start() {\n\t\tSystem.out.println(\"开启系统1\");\r\n\t}", "@Override\r\n public Integer start(String[] strings) {\r\n //Load configuration from file \"app.conf\"\r\n IS.loadConfig();\r\n //Start Embedded DB Server\r\n IS.startDB();\r\n //start socket Server\r\n IS.startSocketServer();\r\n //start web server\r\n IS.startWebServer();\r\n\r\n //start CallbackController scheduler\r\n IS.startCallbackController();\r\n\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n try {\r\n //Subscribe for All Notifications via notification producer\r\n if (!IS.resumeCctConnection()) {\r\n IS.startCCT();\r\n }\r\n } finally {\r\n //Attach CCT Connection Monitor\r\n IS.attachCctSessionMonitor();\r\n }\r\n }\r\n }).start();\r\n\r\n return null;\r\n }", "@Override\n public void start() {\n // only start once, this is not foolproof as the active flag is set only\n // when the watchdog loop is entered\n if ( isActive() ) {\n return;\n }\n\n Log.info( \"Running server with \" + server.getMappings().size() + \" mappings\" );\n try {\n server.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start server on port '\" + server.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start server:\\n\" + ioe );\n System.exit( 1 );\n }\n\n if ( redirectServer != null ) {\n try {\n redirectServer.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start redirection server on port '\" + redirectServer.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start redirection server:\\n\" + ioe );\n }\n }\n\n // Save the name of the thread that is running this class\n final String oldName = Thread.currentThread().getName();\n\n // Rename this thread to the name of this class\n Thread.currentThread().setName( NAME );\n\n // very important to get park(millis) to operate\n current_thread = Thread.currentThread();\n\n // Parse through the configuration and initialize all the components\n initComponents();\n\n // if we have no components defined, install a wedge to keep the server open\n if ( components.size() == 0 ) {\n Wedge wedge = new Wedge();\n wedge.setLoader( this );\n components.put( wedge, getConfig() );\n activate( wedge, getConfig() );\n }\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.components_initialized\" ) );\n\n final StringBuffer b = new StringBuffer( NAME );\n b.append( \" v\" );\n b.append( VERSION.toString() );\n b.append( \" initialized - Loader:\" );\n b.append( Loader.API_NAME );\n b.append( \" v\" );\n b.append( Loader.API_VERSION );\n b.append( \" - Runtime: \" );\n b.append( System.getProperty( \"java.version\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"java.vendor\" ) );\n b.append( \")\" );\n b.append( \" - Platform: \" );\n b.append( System.getProperty( \"os.arch\" ) );\n b.append( \" OS: \" );\n b.append( System.getProperty( \"os.name\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"os.version\" ) );\n b.append( \")\" );\n Log.info( b );\n\n // enter a loop performing watchdog and maintenance functions\n watchdog();\n\n // The watchdog loop has exited, so we are done processing\n terminateComponents();\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.terminated\" ) );\n\n // Rename the thread back to what it was called before we were being run\n Thread.currentThread().setName( oldName );\n\n }", "private void startDiscovery() {\n client.startDiscovery(getResources().getString(R.string.service_id), endpointDiscoveryCallback, new DiscoveryOptions(STRATEGY));\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tLog.e(\"androidtalk\", \"service created\") ;\n\t\tSystem.out.println(\"androidtalk-service created\") ;\n\t\t\n\t}", "@Override\n\tprotected void start() {\n\t\tif (Cfg.DEBUG) {\n\t\t\tCheck.log(TAG + \" (actualStart)\");\n\t\t}\n\t\treadChatMessages();\n\t}", "public void start() {\n gateway.openConnection();\n }", "public void start() {\n\n\t}", "private void startIChatService() {\n Intent transportService = new Intent();\n transportService.setAction(IChatService.class.getCanonicalName());\n this.startService(transportService);\n Log.i(\"Interface\", \"Started IChatservice\");\n }", "public void startCollectSysTrafficTask() {\n\t\tsubmitCollectSysTrafficTask();\n\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}", "@Override\n\t\tpublic void run() {\n\t\t\tif(UpdateMonitor.getInstance(WelcomeActivity.this) != null){\n\t\t\t\tLog.d(TAG,\"Start OdmServiceSetting\");\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(WelcomeActivity.this, OdmServiceSetting.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tWelcomeActivity.this.finish();\n\t\t\t}else{\n\t\t\t\tmHandler.post(mStartRunnable);\n\t\t\t}\n\t\t}", "public void onCreate() {\n super.onCreate();\n LogUtil.d(DownloadService.class, \"Service onCreate\");\n\n if (mSystemFacade == null) {\n mSystemFacade = new SystemFacade(this);\n }\n\n dao = DownloadInfoDao.getInstace(getApplication());\n\n mSystemFacade.cancelAllNotifications();\n\n mNetReceiver = new NetworkConnectionChangeReceiver();\n mNetReceiver.regist(this);\n\n updateFromProvider();\n }", "@Override\n\tpublic void onStart(Intent intent, int startId) {\n\t\tsuper.onStart(intent, startId);\n\t\tLog.e(\"androidtalk\", \"service started\") ;\n\t\tSystem.out.println(\"androidtalk-service started\") ;\n\t}", "private void startBootstrapServices() {\n traceBeginAndSlog(\"StartWatchdog\");\n Watchdog watchdog = Watchdog.getInstance();\n watchdog.start();\n traceEnd();\n if (MAPLE_ENABLE) {\n this.mPrimaryZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$UyrPns7R814gZEylCbDKhe8It4.INSTANCE, \"PrimaryZygotePreload\");\n }\n Slog.i(TAG, \"Reading configuration...\");\n traceBeginAndSlog(\"ReadingSystemConfig\");\n SystemServerInitThreadPool.get().submit($$Lambda$YWiwiKm_Qgqb55C6tTuq_n2JzdY.INSTANCE, \"ReadingSystemConfig\");\n traceEnd();\n traceBeginAndSlog(\"StartInstaller\");\n this.installer = (Installer) this.mSystemServiceManager.startService(Installer.class);\n traceEnd();\n traceBeginAndSlog(\"DeviceIdentifiersPolicyService\");\n this.mSystemServiceManager.startService(DeviceIdentifiersPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"UriGrantsManagerService\");\n this.mSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartActivityManager\");\n ActivityTaskManagerService atm = this.mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();\n this.mActivityManagerService = ActivityManagerService.Lifecycle.startService(this.mSystemServiceManager, atm);\n this.mActivityManagerService.setSystemServiceManager(this.mSystemServiceManager);\n this.mActivityManagerService.setInstaller(this.installer);\n this.mWindowManagerGlobalLock = atm.getGlobalLock();\n traceEnd();\n traceBeginAndSlog(\"StartPowerManager\");\n try {\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(\"com.android.server.power.HwPowerManagerService\");\n } catch (RuntimeException e) {\n Slog.w(TAG, \"create HwPowerManagerService failed\");\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(PowerManagerService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartThermalManager\");\n this.mSystemServiceManager.startService(ThermalManagerService.class);\n traceEnd();\n try {\n Slog.i(TAG, \"PG Manager service\");\n this.mPGManagerService = PGManagerService.getInstance(this.mSystemContext);\n } catch (Throwable e2) {\n reportWtf(\"PG Manager service\", e2);\n }\n traceBeginAndSlog(\"InitPowerManagement\");\n this.mActivityManagerService.initPowerManagement();\n traceEnd();\n traceBeginAndSlog(\"StartRecoverySystemService\");\n this.mSystemServiceManager.startService(RecoverySystemService.class);\n traceEnd();\n RescueParty.noteBoot(this.mSystemContext);\n traceBeginAndSlog(\"StartLightsService\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.lights.LightsServiceBridge\");\n } catch (RuntimeException e3) {\n Slog.w(TAG, \"create LightsServiceBridge failed\");\n this.mSystemServiceManager.startService(LightsService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSidekickService\");\n if (SystemProperties.getBoolean(\"config.enable_sidekick_graphics\", false)) {\n this.mSystemServiceManager.startService(WEAR_SIDEKICK_SERVICE_CLASS);\n }\n traceEnd();\n traceBeginAndSlog(\"StartDisplayManager\");\n this.mDisplayManagerService = (DisplayManagerService) this.mSystemServiceManager.startService(DisplayManagerService.class);\n traceEnd();\n try {\n this.mSystemServiceManager.startService(\"com.android.server.security.HwSecurityService\");\n Slog.i(TAG, \"HwSecurityService start success\");\n } catch (Exception e4) {\n Slog.e(TAG, \"can't start HwSecurityService service\");\n }\n traceBeginAndSlog(\"WaitForDisplay\");\n this.mSystemServiceManager.startBootPhase(100);\n traceEnd();\n String cryptState = (String) VoldProperties.decrypt().orElse(\"\");\n if (ENCRYPTING_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Detected encryption in progress - only parsing core apps\");\n this.mOnlyCore = true;\n } else if (ENCRYPTED_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Device encrypted - only parsing core apps\");\n this.mOnlyCore = true;\n }\n HwBootCheck.bootSceneEnd(100);\n HwBootFail.setBootTimer(false);\n HwBootCheck.bootSceneStart(105, 900000);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_start\", (int) SystemClock.elapsedRealtime());\n }\n traceBeginAndSlog(\"StartPackageManagerService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"packagemanagermain\");\n this.mPackageManagerService = PackageManagerService.main(this.mSystemContext, this.installer, this.mFactoryTestMode != 0, this.mOnlyCore);\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n this.mFirstBoot = this.mPackageManagerService.isFirstBoot();\n this.mPackageManager = this.mSystemContext.getPackageManager();\n Slog.i(TAG, \"Finish_StartPackageManagerService\");\n traceEnd();\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_ready\", (int) SystemClock.elapsedRealtime());\n HwBootCheck.addBootInfo(\"[bootinfo]\\nisFirstBoot: \" + this.mFirstBoot + \"\\nisUpgrade: \" + this.mPackageManagerService.isUpgrade());\n HwBootCheck.bootSceneStart(101, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n }\n HwBootCheck.bootSceneEnd(105);\n if (!this.mOnlyCore && !SystemProperties.getBoolean(\"config.disable_otadexopt\", false)) {\n traceBeginAndSlog(\"StartOtaDexOptService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"moveab\");\n OtaDexoptService.main(this.mSystemContext, this.mPackageManagerService);\n } catch (Throwable th) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n throw th;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n }\n traceBeginAndSlog(\"StartUserManagerService\");\n this.mSystemServiceManager.startService(UserManagerService.LifeCycle.class);\n traceEnd();\n traceBeginAndSlog(\"InitAttributerCache\");\n AttributeCache.init(this.mSystemContext);\n traceEnd();\n traceBeginAndSlog(\"SetSystemProcess\");\n this.mActivityManagerService.setSystemProcess();\n traceEnd();\n traceBeginAndSlog(\"InitWatchdog\");\n watchdog.init(this.mSystemContext, this.mActivityManagerService);\n traceEnd();\n this.mDisplayManagerService.setupSchedulerPolicies();\n traceBeginAndSlog(\"StartOverlayManagerService\");\n this.mSystemServiceManager.startService(new OverlayManagerService(this.mSystemContext, this.installer));\n traceEnd();\n traceBeginAndSlog(\"StartSensorPrivacyService\");\n this.mSystemServiceManager.startService(new SensorPrivacyService(this.mSystemContext));\n traceEnd();\n if (SystemProperties.getInt(\"persist.sys.displayinset.top\", 0) > 0) {\n this.mActivityManagerService.updateSystemUiContext();\n ((DisplayManagerInternal) LocalServices.getService(DisplayManagerInternal.class)).onOverlayChanged();\n }\n this.mSensorServiceStart = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$oG4I04QJrkzCGs6IcMTKU2211A.INSTANCE, START_SENSOR_SERVICE);\n } catch (Throwable th2) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n throw th2;\n }\n }", "private void syncWithServer() {\n if (!mIsActivityResumedFromSleep) {\n LogHelper\n .log(TAG, \"Activity is not resuming from sleep. So service initialization will handle xmpp login.\");\n return;\n }\n RobotCommandServiceManager.loginXmppIfRequired(getApplicationContext());\n }", "@Override\n\tpublic void start() throws ServiceException\n\t{\n\t\t\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n Intent intent = new Intent(this, PlayerService.class);\n bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE);\n\n }", "public void start() {\n\t\ttrackerThread.start();\n\t}", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n L.d(\"onStartCommand called\");\n startMainActivity();\n\n /**\n * We want this service to continue running until it is explicitly\n * stopped, so return sticky.\n */\n return Service.START_STICKY;\n }", "@Override\n protected void onStart() {\n super.onStart();\n\n if (mBangingTunesItent == null) {\n mBangingTunesItent = new Intent(this, BangingTunes.class);\n final boolean bindIndicator = bindService(mBangingTunesItent, mServiceConnection, Context.BIND_AUTO_CREATE);\n final ComponentName componentName = startService(mBangingTunesItent);\n }\n }", "public void start() {\n\n }", "public void startService(View view) {\n startService(new Intent(getBaseContext(), MyFirstService.class));\n }", "private void startServiceThreads() {\n // Do after main thread name has been set\n this.metrics = new MasterMetrics();\n try {\n regionManager.start();\n serverManager.start();\n // Put up info server.\n int port = this.conf.getInt(\"hbase.master.info.port\", 60010);\n if (port >= 0) {\n String a = this.conf.get(\"hbase.master.info.bindAddress\", \"0.0.0.0\");\n this.infoServer = new InfoServer(MASTER, a, port, false);\n this.infoServer.setAttribute(MASTER, this);\n this.infoServer.start();\n }\n // Start the server so everything else is running before we start\n // receiving requests.\n this.server.start();\n } catch (IOException e) {\n if (e instanceof RemoteException) {\n try {\n e = RemoteExceptionHandler.decodeRemoteException((RemoteException) e);\n } catch (IOException ex) {\n LOG.warn(\"thread start\", ex);\n }\n }\n // Something happened during startup. Shut things down.\n this.closed.set(true);\n LOG.error(\"Failed startup\", e);\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Started service threads\");\n }\n }", "private void start() {\n\n\t}", "public void doStartService() throws ServiceException {\r\n super.doStartService();\r\n // Nothing to do\r\n }", "public static void start() {\n enableIncomingMessages(true);\n }", "@Override\n public void start(String name, Ice.Communicator communicator, String[] args)\n {\n mAdapter = communicator.createObjectAdapter(name);\n mAdapter.add( this, communicator.stringToIdentity(\"CorpusServer\"));\n initialize();\n mAdapter.activate();\n }", "@Override\n public void run() {\n syncToServer();\n }", "public void start()\n\t{\n\n\t\ttry\n\t\t{\n\t\t\tnew JDABuilder(this.appconfig.authType)\n\t\t\t\t.setToken(this.appconfig.authToken)\n\t\t\t\t.setAudioEnabled(false)\n\t\t\t\t.setAutoReconnect(true)\n\t\t\t\t.addEventListener(new DiscordMonitorListenerAdapterPrep())\n\t\t\t\t.buildBlocking(); // TODO use .buildAsync()?\n\t\t}\n\t\tcatch (LoginException | IllegalArgumentException e)\n\t\t{\n\t\t\tSystem.err.println(\"error: Log in failed. Please check provided token.\");\n\t\t}\n\t\tcatch (RateLimitedException e)\n\t\t{\n\t\t\tSystem.err.println(\"error: This application is being rate limited by Discord.\");\n\t\t}\n\t\tcatch (InterruptedException e)\n\t\t{\n\t\t\tSystem.err.println(\"fatal: Unexpected interrupt.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void start() {\n this.messenger.start();\n }", "@Override\n public void start() {\n smDrive.start();\n smArm.start();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t//绑定服务时会调用onCreate方法,此时启动服务\n\t\tLocalProxy = new SynchronousProxyServer(Parameters.LocalProxyPort);\n\t\tLocalProxy.initial();\n\t\tLocalProxy.start();\n\t\tSystem.out.println(\"LocalProxy run on \" + Parameters.LocalProxyPort);\n\t}", "public void start() {}" ]
[ "0.7376831", "0.7144083", "0.71255946", "0.7096317", "0.65971047", "0.64904404", "0.63879204", "0.6354661", "0.626047", "0.625023", "0.61860216", "0.6116219", "0.6108692", "0.60816985", "0.60556316", "0.60452664", "0.59943426", "0.5994269", "0.59860253", "0.59733737", "0.5936496", "0.59171903", "0.5887307", "0.5882585", "0.5880345", "0.5870723", "0.58523786", "0.58382744", "0.5782975", "0.57816005", "0.57806957", "0.5770458", "0.576906", "0.57655007", "0.57653844", "0.5750352", "0.57389486", "0.57333905", "0.57215464", "0.5719775", "0.5716418", "0.57157147", "0.57155204", "0.5713269", "0.56963766", "0.56898767", "0.5687047", "0.5682507", "0.5673365", "0.5662461", "0.5662021", "0.5652424", "0.56517214", "0.5644229", "0.56430113", "0.5642112", "0.5633919", "0.56338334", "0.5620338", "0.56200516", "0.5616226", "0.5615904", "0.561295", "0.56116945", "0.5608614", "0.55952907", "0.55951166", "0.5591491", "0.5588306", "0.5585952", "0.5580917", "0.55787504", "0.55748725", "0.55696195", "0.55595815", "0.5553933", "0.55478257", "0.55346054", "0.5533685", "0.5533073", "0.5531131", "0.55243015", "0.55231744", "0.55228966", "0.5521666", "0.551928", "0.5516114", "0.550561", "0.55019075", "0.5499637", "0.5495801", "0.5493904", "0.54877794", "0.5486852", "0.54861987", "0.54860765", "0.548325", "0.54832196", "0.54800975", "0.5478725" ]
0.7709895
0
This method redirects from one activity to the other..
public void redirect(int imagesUploaded, int imagesRequested,Activity FromClass,Class ToClass){ if(imagesRequested==imagesUploaded){ Toast.makeText(mContext,"All images were uploaded!",Toast.LENGTH_LONG).show(); } else if(imagesUploaded == 0 && imagesRequested ==0){ Toast.makeText(mContext,"The images will be uploaded on the availability of appropriate network!",Toast.LENGTH_LONG).show(); } else{ Toast.makeText(mContext,imagesRequested-imagesUploaded+"were uploaded!",Toast.LENGTH_LONG).show(); } ((Activity)FromClass).finish(); mContext.startActivity(new Intent(FromClass,ToClass)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void redirectTO() {\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n\n finish();\n }", "private void gotoOtherActivity() {\n finish();\n }", "private void redirectLoginScreen(Bundle bundle){\n Intent loginIntent = new Intent(PrivateUserRegActivity.this, LoginActivity.class);\n loginIntent.putExtras(bundle);\n startActivity(loginIntent);\n finish();\n }", "private void redirectToMain() {\n\t\tIntent intent = new Intent(this, Main.class);\r\n\t\tstartActivity(intent);\r\n\t\tfinish();\r\n\t}", "private void ToAnother() {\n\t\t\n\t\tiv_menu_icon = (ImageView)findViewById(R.id.iv_menu_icon);\n\t intent = new Intent(this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\t\n\t}", "private void returnToLoginActivity() {\n Intent returnToLogin = new Intent(this, Login.class);\n startActivity(returnToLogin);\n finish();\n }", "public void iniciarActivity() {\n\n Intent intent = new Intent(ActivityA.this, ActivityB.class);\n startActivity(intent);\n }", "private static void redirectActivity(Activity activity, Class aClass) {\n Intent intent = new Intent(activity, aClass);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(intent);\n }", "public void moveActivityToLogin() {\n Intent intent = new Intent(MainActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data){\n finish();\n startActivity(getIntent());\n }", "private void redirectLoginScreen() {\n Log.d(TAG, \"redirectLoginScreen: redirecting to login screen.\");\n Intent intent = new Intent(Register.this, LogIn.class);\n startActivity(intent);\n finish();\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.example.thirdapp.LocationActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"4\");\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, SecondActivity.class);\n startActivity(intent);\n\n }", "private void goToAuthScreen(){\n this.finish();\n\n Intent intent = new Intent(this, AuthStartActivity.class);\n startActivity(intent);\n }", "void redirect();", "public void transferActivity() {\n Intent intent = new Intent(this, AddInfoActivity.class);\n this.startActivity(intent);\n }", "@Override\n public void navigateToLogin() {\n startActivity(new Intent(this, LoginActivity.class));\n finish();\n }", "public void goWebSite() {\n\n if (mIsFirst) {\n mSnackbar.setText(getString(R.string.please_wait)).show();\n } else {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(mSiteData.getUrl()));\n //intent.putExtra(\"url\", webData.getUrl());\n //startActivity(intent);\n startActivityForResult(intent, 100);\n //showToolbarProgressBar();\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.UserServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"2\");\n\t\t\t}", "private void openNewActivity() {\n Intent intent = new Intent(this, NewNoteActivity.class);\n startActivityForResult(intent, SECOND_ACTIVITY_REQUEST);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity2.this, NewTripActivity.class);\n startActivityForResult(intent, NEW_TRIP_ACTIVITY_REQUEST_CODE);\n }", "@Override\n\t\t\tpublic void onClick() {\n\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"正在跳转\", 1000).show();\n\t\t\t\tIntent intentSwitch = new Intent(TestRolateAnimActivity.this,com.SamePlacesCommunity.Main.FeedServiceActivity.class); \n\t\t\t\tstartActivity(intentSwitch);\n\t\t\t\tSystem.out.println(\"1\");\n\t\t\t}", "public abstract String redirectTo();", "@Override\n public void onClick(View view) {\n int LAUNCH_SECOND_ACTIVITY = 1;\n Intent intent = new Intent(StartActivity.this, AboutActivity.class);\n startActivityForResult(intent, LAUNCH_SECOND_ACTIVITY);\n }", "public void goToActivity2 (View view)\n {\n Intent startNewActivityOpen = new Intent(MainActivity.this, CommentsViewActivity.class);\n startActivityForResult(startNewActivityOpen, 0);\n }", "private void goToLoginPage() {\n\n startActivity(new Intent(this,LoginActivity.class));\n finish();\n }", "public void ClickHome(View view){\n MainActivity.redirectActivity(this,MainActivity.class);\n\n }", "public void gotoProfileActivity()\n {\n Log.e(\"next\",\"\"+\"log\");\n startActivity(new Intent(OTPActivity.this, UserProfileActivity.class));\n finish();\n }", "private void launchTwo() {\n Intent intent = new Intent(getActivity(), SearchReviewActivity.class);\n\n startActivity(intent);\n }", "public void moveActivityToSunting() {\n Intent intent = new Intent(MainActivity.this, SuntingProfilActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }", "public void returnToLogin() {\n // Ako smo kliknuli na Login, kreiramo Intent za\n // prijelaz na Login aktivnost\n Intent i = new Intent(this, LoginActivity.class);\n // U slucaju povratka na Login zelimo izbrisati \"povijest\" navigiranja,\n // tako da nas \"Back\" gumb ne vrati prethodnu aktivnost\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // Prelazimo na Login aktivnost\n startActivity(i);\n // Zavrsavamo trenutnu aktivnost i oslobadjamo resurse\n finish();\n }", "@Override\n public void run() {\n Intent i = new Intent(First.this, Second.class);\n startActivity(i);\n\n // close this activity\n finish();\n }", "@Override\n public void onClick(View arg0) {\n Intent intent = new Intent(context, MainActivity2.class); //al click sul bottone apre una nuova activity\n startActivity(intent);\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n sampleApp.handleInteractiveRequestRedirect(requestCode, resultCode, data);\n }", "private void SendToMain(){\n Intent intent=new Intent(getApplicationContext(),Category.class);\n startActivity(intent);\n\n //by using this keyword every thing in this page is finished\n finish();\n\n }", "private void proceed() {\n finish();\n Intent onReturnView = new Intent(ChatMessage.this, MainActivity.class);\n startActivity(onReturnView);\n }", "public void goLoginActivity()\n {\n Intent intent = new Intent(this, LoginActivity.class);\n this.startActivity(intent);\n }", "private void returnToMain() {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tboolean isHave=\n\t\t\t\thasApplication(LoginActivity.this,\"com.hsic.tmj.myyhqworkspace\");\n\t\t\t\tif(!isHave){\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\tComponentName componetName = new ComponentName(\n\t\t\t\t\t\t//这个是另外一个应用程序的包名\n\t\t\t\t\t\t\"com.hsic.tmj.myyhqworkspace\",\n\t\t\t\t\t\t//这个参数是要启动的Activity\n\t\t\t\t\t\t\"com.hsic.tmj.myyhqworkspace.LoginActivity\");\n// Intent intent= new Intent(\"chroya.foo\");\n\t\t\t\tIntent intent= new Intent();\n\t\t\t\t//我们给他添加一个参数表示从apk1传过去的\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"arge1\", \"这是跳转过来的!来自apk1\");\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tintent.setComponent(componetName);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t\n\t\t\t}", "public void goToEntitySelectActivity() {\n Intent intent = new Intent(LoginActivity.this, EntitySelectActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n }", "private void HomePage(){\n Intent intent = new Intent();\n intent.setClass(FaultActivity.this, MainActivity.class);\n startActivity(intent);\n FaultActivity.this.finish();\n }", "@Override\n public void onSuccess(Void aVoid) {\n Intent a=new Intent(getApplicationContext(),NewsSports.class);\n startActivity(a);\n finish();\n }", "@Override\n public void jumpActivity() {\n startActivity(new Intent(MainActivity.this, MainActivity.class));\n }", "@Override\n public void onClick(View view) {\n\n Intent intent = new Intent(getActivity(), SecondActivity.class);\n\n startActivity(intent);\n\n }", "private void goLoginSignupActivity() {\n Intent intent = new Intent(this, LoginSignupActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }", "private void changeActivity(){\n FragmentManager fm = getSupportFragmentManager();\n for(int i = 0; i < fm.getBackStackEntryCount(); ++i) {\n fm.popBackStack();\n }\n Intent i = new Intent(this, SecondActivity.class);\n i.putExtra(\"team\", teamname);\n startActivity(i);\n }", "private void goToRegisterActivity() {\n Intent intent = new Intent(LoginActivity.this, RegisterAccountActivity.class);\n startActivityForResult(intent, 0);\n }", "@Override\n public void onClick(View view) {\n\n startActivity(getIntent());\n }", "private void activate_previous_activity(){\n\n Intent intent = new Intent(this,MainActivity.class);\n startActivity(intent);\n\n }", "private void startActivity(Class destination)\n {\n Intent intent = new Intent(MainActivity.this, destination);\n startActivity(intent);\n }", "public void openActivity(){\n Intent intent = new Intent();\n if(bopenLogin)\n {\n intent = new Intent(Splashscreen.this, Login.class);\n }\n else\n {\n intent = new Intent(Splashscreen.this, MainActivity.class);\n }\n startActivity(intent);\n finish();\n }", "private void launchOtherTransaction(){\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "@Override\n public void run(){\n Intent homeIntent = new Intent(MainActivity.this,login_page.class);//splashes to the login page.\n startActivity(homeIntent);\n finish();\n }", "public void proximaTela2(View view) {\n\n Intent intent = new Intent(this, Activity3.class);\n startActivity(intent);\n\n\n }", "@Override\n public void onSuccess(LoginResult loginResult) {\n startActivity(new Intent(LoginActivity.this, HomeActivity.class));\n }", "public void switchActivity(Class<?> destinationActivity, int requestCode) {\n Intent intent = new Intent(this, destinationActivity);\n startActivityForResult(intent, requestCode);\n }", "public static void navigateToActivity(Context A, Class <?> B) {\n Intent myIntent = new Intent(A, B);\n A.startActivity(myIntent);\n }", "private void goToMainActivity(){\n Log.d(TAG, \"goToMainActivity: called\");\n saveUserLogin(login);\n\n Intent intent = new Intent(\"android.intent.action.MapActivity\");\n view.getContext().startActivity(intent);\n }", "public void switchActivity(Class<?> destinationActivity) {\n startActivity(new Intent(this, destinationActivity));\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(MainActivity.this, AddressActivity.class);\n startActivityForResult(i,2);\n\n }", "private void onForgetPwd() {\n Intent intent = new Intent(this, ForgotPasswordActivity.class);\n startActivity(intent);\n finish();\n }", "private void goToMainActivity() {\n\n Intent mainIntent = new Intent(this, MainActivity.class);\n mainIntent.putExtra(DAF_YOMI_DETAILES, mDafYomiDetailes);\n startActivity(mainIntent);\n finish();\n\n }", "@Override\n public void onSuccess(Map<String, Object> retData) {\n startActivity(intent_main);\n }", "public void onClick(View arg0) {\n Intent nextScreen = new Intent(getApplicationContext(), ActivityTwo.class);\n\n //Sending data to another Activity\n nextScreen.putExtra(\"name_input\", inputName.getText().toString());\n nextScreen.putExtra(\"email_input\", inputEmail.getText().toString());\n\n Log.e(\"n\", inputName.getText() + \".\" + inputEmail.getText());\n\n startActivity(nextScreen);\n\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(ResultActivity.this, SecondActivity.class);\n intent.putExtra(\"data1\", Edata2.getText().toString());\n startActivity(intent);\n }", "private void goMainActivity() {\n Intent i = new Intent(this, ProfileActivity.class);\n startActivity(i);\n\n //prevents user going back to this screen after signing up\n finish();\n }", "private void toLoginActivity(){\n\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tMApplication app = (MApplication) getApplication();\n\t\tapp.addLoginAcitivity(this);\n\t}", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tIntent intent = new Intent(MainActivity.this, MainActivity2.class);\n\t\t\tstartActivity(intent);\n\t\t}", "private void Hello(View view) {\n Intent intent = new Intent(getActivity(), SecondActivity.class);\r\n intent.putExtra(\"Regular_visitor\", \"1\");\r\n startActivity(intent);\r\n // getActivity().finish();\r\n }", "@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\r\n startActivityForResult(intent, REQUEST_LOGIN);\r\n }", "private void redirectStore(String updateUrl) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(updateUrl));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(Login_page.this,registration_page.class);\n startActivity(i);\n finish();\n }", "public void startActivity() {\n\n Intent intent = new Intent(this, ActivityB.class);\n EditText editText = (EditText) findViewById(R.id.edtWriteSomething);\n String message = editText.getText().toString();\n intent.putExtra(\"EXTRA_MESSAGE\", message);\n startActivity(intent);\n }", "private void SendUserToInfoPage(){\n Intent intent = new Intent(sign_up_activity.this,user_info_activity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TASK);\n overridePendingTransition(0,0);\n startActivity(intent);\n finish();\n }", "@Override\n public void onClick(View arg0) {\n Intent i = new Intent(getApplicationContext(), web1.class);\n startActivity(i);\n }", "public void returnToLogin(View view){\r\n startActivity(new Intent(SignUpActivity.this, LoginActivity.class));\r\n finish();\r\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tintent = new Intent(Login.this, FinanceAss.class);\r\n\t\t\t\tintent.addFlags(intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\r\n\t\t\t\tLogin.this.startActivity(intent);\r\n\r\n\t\t\t}", "void redirectToLogin();", "void onSuccessRedirection(int taskID);", "private void commitIntentToActivityAndFinish(Class to)\r\n {\r\n Intent intent = new Intent(this, to);\r\n startActivity(intent);\r\n finish();\r\n }", "private void goRegisterActivity() {\n Intent i = new Intent(this, RegisterActivity.class);\n startActivity(i);\n finish();\n }", "public void redirect() {\n\t\tRequestContext context = RequestContext.getCurrentInstance();\n\t\tString ruta = \"\";\n\t\truta = MyUtil.basepathlogin() + \"inicio.xhtml\";\n\t\tcontext.addCallbackParam(\"ruta\", ruta);\n\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(mContext,Main2Activity.class);\n mContext.startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(getActivity(),anotherActivity1.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(Admin2Home.this, AdminLogin.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tAdmin2Home.this.finish();\n\t\t\t}", "@Override\n public void run() {\n\n\n Intent i;\n\n if(sharedperference.getToken()==null || sharedperference.getToken()==\"\") {\n i = new Intent(SplashScreen.this, MainActivity.class);\n }\n else{\n i = new Intent(SplashScreen.this, MainActivity.class);\n\n }\n\n //i = new Intent(SplashScreen.this, LanuageSelection.class);\n\n\n startActivity(i);\n finish();\n\n }", "@Override\n public void onClick(View v) {\n finish();\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent result = new Intent(RegistActivity.this, LoginActivity.class);\n\t\t\t\tstartActivity(result);\n\t\t\t\tfinish();\n\t\t\t}", "public OtherActivity () {\n super();\n location = \"nowhere\";\n }", "public void onClick(View v) {\n Intent activityChangeIntent = new Intent(MainActivity.this, Activity2.class);\n\n // currentContext.startActivity(activityChangeIntent);\n\n MainActivity.this.startActivity(activityChangeIntent);\n }", "private void call_register_details_activity_page()\n {\n\n\n Intent intent = new Intent(getApplicationContext(), b_register_details_activity.class);\n\n startActivity(intent);\n finish();\n\n }", "private void goToActivity(Class goToClass) {\n Intent intent = new Intent(MenuActivity.this, goToClass);\n intent.putExtra(USER_ID,user.getId());\n intent.putExtra(USERNAME,user.getUserName());\n startActivity(intent);\n }", "@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n if(resultCode == ACTIVITY_FOR_RESULT_ID){\r\n setResult(ACTIVITY_FOR_RESULT_ID);\r\n finish();\r\n }\r\n }", "public void switchActivity(Class<?> destinationActivity, Bundle bundle, int requestCode) {\n Intent intent = new Intent(this, destinationActivity);\n if (bundle != null)\n intent.putExtras(bundle);\n startActivityForResult(intent, requestCode);\n }", "@Override\n public void onFinish(){\n Intent intent = new Intent(getBaseContext(), CodakActivity.class);\n startActivity(intent);\n }", "private void moveToMainActivity(){\r\n Intent goToMainActivity = new Intent(workoutActivity.this, BodyGroups.class);\r\n startActivity(goToMainActivity);;\r\n }", "private void goToNavActivity() {\n Intent i = new Intent(MainActivity.this, NavActivity.class);\n startActivity(i);\n finish();\n }", "@Override\n public void onClick(View v) {\n Intent returns = new Intent(Welcome.this, Returns.class);\n startActivity(returns);\n\n }", "public void onSecondActivity(View view) {\n Intent intent = new Intent(getApplicationContext(), SecondActivity.class);\n intent.putExtra(Constants.KEY.TV_MAIN, etMain.getText().toString());\n\n switch (view.getId()){\n case R.id.btnFirst:\n// create person object\n Person person = new Person(etPersonName.getText().toString(), etPersonAge.getText().toString());\n// put person as extra to intent\n intent.putExtra(Constants.KEY.PERSON, person);\n\n break;\n case R.id.btnSecond:\n // create person object\n PersonP personP = new PersonP(etPersonName.getText().toString(), etPersonAge.getText().toString());\n// put person as extra to intent\n intent.putExtra(Constants.KEY.PERSON, personP);\n break;\n }\n\n// start activity\n startActivity(intent);\n\n\n\n }", "public void switchActivity(Class<?> destinationActivity, Bundle bundle) {\n Intent intent = new Intent(this, destinationActivity);\n if (bundle != null)\n intent.putExtras(bundle);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n if(MainActivity.userID==null) {\n Intent intent = new Intent(SignupActivity.this, LoginActivity.class);\n startActivityForResult(intent,2000);\n }\n else{\n //마이페이지 고고\n Intent intent = new Intent(SignupActivity.this, MypageActivity.class);\n //intent.putExtra(\"sauce name\",name );\n //intent.putExtra(\"userID\",userID);\n startActivity(intent);\n }\n }" ]
[ "0.7590754", "0.7464547", "0.6841636", "0.6733703", "0.66754115", "0.66705585", "0.6616019", "0.66119975", "0.6585617", "0.65624374", "0.6552081", "0.652888", "0.6495292", "0.64937", "0.6482568", "0.6482113", "0.6462087", "0.64597774", "0.6452407", "0.64398855", "0.6435065", "0.64229816", "0.64220035", "0.64183253", "0.6413655", "0.6405698", "0.63892317", "0.63660693", "0.636327", "0.6353336", "0.63354766", "0.63329256", "0.63321745", "0.6318929", "0.63155234", "0.6298348", "0.629151", "0.62836653", "0.62787783", "0.6274737", "0.62652826", "0.6258616", "0.6248614", "0.6246945", "0.62463564", "0.62452173", "0.6240559", "0.6240042", "0.62398267", "0.6239246", "0.6226841", "0.6226125", "0.6223494", "0.6219927", "0.6215556", "0.6212686", "0.62091863", "0.6208399", "0.6194182", "0.6191103", "0.6190565", "0.61835146", "0.61804456", "0.6178365", "0.6174903", "0.6166251", "0.61546415", "0.6153834", "0.6153737", "0.6144023", "0.61416626", "0.61372495", "0.61344856", "0.6125527", "0.6124135", "0.61216253", "0.61176693", "0.61123925", "0.61123234", "0.611141", "0.61016583", "0.6098372", "0.6095885", "0.6095769", "0.6092001", "0.60918796", "0.6089567", "0.60881025", "0.6082152", "0.60805565", "0.6074089", "0.60725576", "0.607112", "0.6059269", "0.6055675", "0.6053066", "0.6051873", "0.6036769", "0.6031728", "0.602962", "0.6028354" ]
0.0
-1
Prepares records for insertion to Database
public void prepareBatchForInsertToDB(Boolean isUploaded) { long encounterNum = getEncounterNumPreferences(); mRecord=new ArrayList<ImageRecordDBRecord>(); for (String filename : mImagePaths) { ImageRecordDBRecord record = new ImageRecordDBRecord(); record.setFileName(filename); record.setUsername(getCurrentIdentity()); Date date = new Date(); record.setDate(date); record.setIsUploaded(isUploaded); record.setmEncounterNum(encounterNum); mRecord.add(record); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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\n\tprotected void prepare() {\n\t\tOrder_ID = getRecord_ID();\n\t\tEventType = getParameterAsString(\"EventType\");\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\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}", "void onPrepareForSubmit() {\n\t\t// Create the same list as was rendered.\n\t\t// Loop will write its input field values into the list's objects.\n\n\t\tcreatePersonsList();\n\n\t\t// Prepare to take a copy of each field.\n\n\t\trowNum = -1;\n\t\tfirstNameFieldCopyByRowNum = new HashMap<Integer, FieldCopy>();\n\t\tlastNameFieldCopyByRowNum = new HashMap<Integer, FieldCopy>();\n\t\tregionFieldCopyByRowNum = new HashMap<Integer, FieldCopy>();\n\t\tstartDateFieldCopyByRowNum = new HashMap<Integer, FieldCopy>();\n\t}", "@Override\n public void prepare() throws QueryException {\n md = new MemData(data);\n\n final Iterator<Item> d = docs.iterator();\n final Iterator<byte[]> n = names.iterator();\n final Iterator<byte[]> p = paths.iterator();\n\n while(d.hasNext()) {\n md.insert(md.meta.size, -1, docData(d.next(), n.next(), p.next()));\n }\n }", "private void prepare( ) {\n super.prepare( schema.getCount( ) );\n serializer = new FieldSerializer[ fieldCount ];\n for ( int i = 0; i < fieldCount; i++ ) {\n FieldSchema field = schema.getField( i );\n serializer[i] = serializerByType[ field.getType().ordinal() ];\n }\n }", "public void prepare()\n\t{\n\t\tsuper.prepare();\n\t}", "private void insertFieldRows(Connection con,\n IdentifiedRecordTemplate template, GenericDataRecord record)\n throws SQLException, FormException, CryptoException {\n PreparedStatement insert = null;\n \n try {\n insert = con.prepareStatement(INSERT_FIELD);\n int recordId = record.getInternalId();\n String[] fieldNames = record.getFieldNames();\n Map<String, String> rows = new HashMap<String, String>();\n for (String fieldName : fieldNames) {\n Field field = record.getField(fieldName);\n String fieldValue = field.getStringValue();\n rows.put(fieldName, fieldValue);\n }\n \n if (template.isEncrypted()) {\n rows = getEncryptionService().encryptContent(rows);\n }\n \n for (String fieldName : rows.keySet()) {\n String fieldValue = rows.get(fieldName);\n insert.setInt(1, recordId);\n insert.setString(2, fieldName);\n insert.setString(3, fieldValue);\n insert.execute();\n }\n } finally {\n DBUtil.close(insert);\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(\"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}", "private void insertFields()\n {\n RideDetails details=new RideDetails();\n details.setStartPt(editStartingPt.getText().toString());\n details.setEndPt(editEndingPt.getText().toString());\n\n try {\n details.setTravelDate(dateFormatter.parse(editDate.getText().toString()));\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n details.setNoSpot(Integer.parseInt(editNoSpot.getText().toString()));\n\n\n dbOperations(details);\n\n }", "public void prepare() {\n\t}", "public void loadInitialData() {\n\t\t\texecuteTransaction(new Transaction<Boolean>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean execute(Connection conn) throws SQLException {\n\t\t\t\t\tList<Item> inventory;\n\t\t\t\t\tList<Location> locationList;\n\t\t\t\t\tList<User> userList;\n\t\t\t\t\tList<JointLocations> jointLocationsList;\n\t\t\t\t\t//List<Description> descriptionList; \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinventory = InitialData.getInventory();\n\t\t\t\t\t\tlocationList = InitialData.getLocations(); \n\t\t\t\t\t\tuserList = InitialData.getUsers();\n\t\t\t\t\t\tjointLocationsList = InitialData.getJointLocations();\n\t\t\t\t\t\t//descriptionList = //InitialData.getDescriptions();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Couldn't read initial data\", e);\n\t\t\t\t\t}\n\n\t\t\t\t\tPreparedStatement insertItem = null;\n\t\t\t\t\tPreparedStatement insertLocation = null; \n\t\t\t\t\tPreparedStatement insertUser = null;\n\t\t\t\t\tPreparedStatement insertJointLocations = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// AD: populate locations first since location_id is foreign key in inventory table\n\t\t\t\t\t\tinsertLocation = conn.prepareStatement(\"insert into locations (description_short, description_long) values (?, ?)\" );\n\t\t\t\t\t\tfor (Location location : locationList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertLocation.setString(1, location.getShortDescription());\n\t\t\t\t\t\t\tinsertLocation.setString(2, location.getLongDescription());\n\t\t\t\t\t\t\tinsertLocation.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertLocation.executeBatch(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertJointLocations = conn.prepareStatement(\"insert into jointLocations (fk_location_id, location_north, location_south, location_east, location_west) values (?, ?, ?, ?, ?)\" );\n\t\t\t\t\t\tfor (JointLocations jointLocations: jointLocationsList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertJointLocations.setInt(1, jointLocations.getLocationID());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(2, jointLocations.getLocationNorth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(3, jointLocations.getLocationSouth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(4, jointLocations.getLocationEast());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(5, jointLocations.getLocationWest());\n\t\t\t\t\t\t\tinsertJointLocations.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertJointLocations.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertItem = conn.prepareStatement(\"insert into inventory (location_id, item_name) values (?, ?)\");\n\t\t\t\t\t\tfor (Item item : inventory) \n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// Auto generate itemID\n\t\t\t\t\t\t\tinsertItem.setInt(1, item.getLocationID());\n\t\t\t\t\t\t\tinsertItem.setString(2, item.getName());\n\t\t\t\t\t\t\tinsertItem.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertItem.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertUser = conn.prepareStatement(\"insert into users (username, password) values (?, ?)\");\n\t\t\t\t\t\tfor(User user: userList) {\n\t\t\t\t\t\t\tinsertUser.setString(1, user.getUsername());\n\t\t\t\t\t\t\tinsertUser.setString(2, user.getPassword());\n\t\t\t\t\t\t\tinsertUser.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertUser.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Tables populated\");\n\t\t\t\t\t\t\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tDBUtil.closeQuietly(insertLocation);\t\n\t\t\t\t\t\tDBUtil.closeQuietly(insertItem);\n\t\t\t\t\t\tDBUtil.closeQuietly(insertUser);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "private void creates() {\n \tDBPeer.fetchTableColumns();\n \tDBPeer.fetchTableRows();\n \tDBPeer.fetchTableIndexes();\n \t\n for (int i = 0; i < creates.size(); i++) {\n creates.get(i).init();\n }\n \n DBPeer.updateTableColumns();\n DBPeer.updateTableRows();\n DBPeer.updateTableIndexes();\n }", "public void prepareAdd() {\r\n\t\tcurrent = new Customer();\r\n\t\tcurrent.setCustomerCode(generateCode.generateCustomerCode());\r\n\t}", "@Override\n\tpublic void preInsert() {\n\n\t}", "protected void insertDataIntoRecordings(Collection<Track> tracks) {\n\t\t// what happens if data already there?\n\t\t// big issue :(\n\t\t\n\t\t\ttry {\n\t\t\t\tPreparedStatement prep = conn.prepareStatement(\"INSERT INTO Recordings values (?, ?);\");\n\t\t\t\t\n\t\t\t\tfor (Track t : tracks) {\n\t\t\t\t\tprep.setString(1, t.getArtist());\n\t\t\t\t\tprep.setString(2, t.getName());\n\t\t\t\t\tprep.addBatch();\n\t\t\t\t\tSystem.out.println(\"Added \" +t.getArtist()+ \", \" +t.getName()+\" to recordings\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconn.setAutoCommit(false);\n\t \tprep.executeBatch();\n\t \tconn.setAutoCommit(true);\n\t \t\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Something went wrong with inserting batched data into Recordings\");\n\t\t\t\tSystem.out.println(\"Check System.err for details\");\n\t\t\t\te.printStackTrace(System.err);\n\t\t\t}\n\t\t\t\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()\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}", "@Before\n\tpublic void fillSomeDataIntoOurDb() {\n\t\tentityManager.persist(ago);\n\t\tentityManager.persist(teacherAgo);\n\t\tentityManager.persist(agoSubject);\n\t}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "private void processRecords()\n {\n // This is the way to connect the file to an inputstream in android\n InputStream inputStream = getResources().openRawResource(R.raw.products);\n\n Scanner scanner = new Scanner(inputStream);\n\n\n // skipping first row by reading it before loop and displaying it as column names\n String[] tableRow = scanner.nextLine().split(\",\");\n\n //Log.e(\"COLUMN NAMES\", Arrays.toString(tableRow));\n //Log.e(\"COLUMN NAMES SIZE\", String.valueOf(tableRow.length));\n\n\n // --- Truncate table (delete all rows and reset auto increment --\n // this line of code will be useful because for now we are forced to read file\n // everytime we open app, this way we do not have duplicate data.\n db.resetTable();\n\n while (scanner.hasNextLine())\n {\n tableRow = scanner.nextLine().split(\",\");\n //Log.e(\"COLUMN VALUES\", Arrays.toString(tableRow));\n //Log.e(\"COLUMN VALUES SIZE\", String.valueOf(tableRow.length));\n\n /*\n * Possible Change:\n * On each iteration a new Product() can be created and call the setter to set\n * its fields to the elements of the String array, example\n * product = new Product();\n * product.setNumber(tableRow[0]);\n * product.setBusinessName(tableRow[1]);\n * ...\n * db.insertData(product); // because the new insertData method would expect a\n * Product object instead\n *\n */\n\n // insert data\n if (db.insertData(tableRow))\n {\n //Log.e(\"Insert\", \"SUCCESSFUL INSERT AT \" + tableRow[0]);\n }\n else\n {\n //Log.e(\"Insert\", \"UNSUCCESSFUL INSERT\");\n }\n\n }\n }", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "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}", "public void prepare() {\n this.shifts = new ArrayList<>();\n this.rates = new ArrayList<>();\n // bootstrap shifts and rates\n this.prepareShifts();\n this.prepareRates();\n }", "public final void execute() {\n try {\n\n StringBuffer preparedTableBuf = new StringBuffer();\n preparedTableBuf.append(\"create table if not exists \");\n preparedTableBuf.append(tableName + \" (\");\n\n boolean isCompoundKey = false;\n boolean isAutoKey = \"generated\".equals(pkey);\n\n String[] pkeys = pkey.split(\",\");\n StringBuffer compoundKey = new StringBuffer();\n if (pkeys.length > 1) {\n isCompoundKey = true;\n compoundKey.append(\", PRIMARY KEY (\");\n for (int i = 0; i < pkeys.length; i++) {\n compoundKey.append(pkeys[i] + (i == pkeys.length - 1 ? \")\" : \", \"));\n }\n }\n\n if (isAutoKey) {\n preparedTableBuf\n .append(\"id integer NOT NULL PRIMARY KEY AUTO_INCREMENT, \");\n }\n for (int i = 0; i < fields.length; i++) {\n preparedTableBuf.append(fields[i]\n + \" \"\n + columnTypes[i]\n + (pkey.equals(fields[i]) ? \" NOT NULL UNIQUE PRIMARY KEY\" : \"\")\n + (i == fields.length - 1 ? (isCompoundKey ? compoundKey.toString()\n : \"\") + \")\" : \", \"));\n }\n\n PreparedStatement preparedTableCreate = conn\n .prepareStatement(preparedTableBuf.toString());\n\n log.info(\"Prepared Table Statement : \" + preparedTableBuf.toString());\n preparedTableCreate.executeUpdate();\n conn.commit();\n\n } catch (Exception e) {\n log.error(e);\n }\n\n try {\n\n StringBuffer preparedInsertBuf = new StringBuffer();\n preparedInsertBuf.append(\"insert into \");\n preparedInsertBuf.append(tableName + \" (\");\n\n for (int i = 0; i < fields.length; i++) {\n preparedInsertBuf.append(fields[i]\n + (i == fields.length - 1 ? \")\" : \", \"));\n }\n\n preparedInsertBuf.append(\" values(\");\n\n for (int i = 0; i < fields.length; i++) {\n preparedInsertBuf.append(\"?\" + (i == fields.length - 1 ? \")\" : \", \"));\n }\n\n PreparedStatement insertItemRecord = conn\n .prepareStatement(preparedInsertBuf.toString());\n\n log.info(\"Rows : \" + fileImporter.getRowCount());\n log.info(\"Prepared Insert Statement : \" + preparedInsertBuf.toString());\n\n Iterator<Row> riter = fileImporter.getRowIterator();\n\n int rows = 0;\n\n int[] result = null;\n\n while (riter.hasNext()) {\n Row row = riter.next();\n\n if (!row.isValid()) {\n continue;\n } else {\n rows++;\n }\n\n try {\n for (int i = 0; i < fields.length; i++) {\n if (columnTypes[i].contains(\"char\")) {\n insertItemRecord.setString(i + 1, row.getValue(fields[i]));\n } else if (\"integer\".equals(columnTypes[i])) {\n try {\n Integer value = Integer.parseInt(row.getValue(fields[i]));\n insertItemRecord.setInt(i + 1, value);\n } catch (Exception e) {\n insertItemRecord.setInt(i + 1, 0);\n }\n } else {\n log.error(\"unsupported column type\");\n }\n }\n\n insertItemRecord.addBatch();\n\n if (rows % batchSize == 0) {\n\n try {\n result = insertItemRecord.executeBatch();\n\n conn.commit();\n log.info(\"batch update : \" + result.length);\n } catch (BatchUpdateException e) {\n log.error(\"Batch Update failed\", e);\n log.error(\"result size: \"\n + (result == null ? \"null\" : result.length));\n\n }\n\n }\n } catch (Exception e) {\n log.error(\"couldn't process row properly\", e);\n }\n }\n // the last set of updates will probably not mod to 0\n\n try {\n result = insertItemRecord.executeBatch();\n conn.commit();\n log.info(\"batch update : \" + result.length);\n } catch (BatchUpdateException e) {\n log.error(\"Batch Update failed\", e);\n log.error(\"\");\n }\n\n } catch (Exception e) {\n log.error(e);\n e.printStackTrace();\n }\n }", "private void insertTemplateFieldRows(Connection con,\n IdentifiedRecordTemplate template) throws SQLException, FormException {\n PreparedStatement insert = null;\n \n try {\n insert = con.prepareStatement(INSERT_TEMPLATE_FIELD);\n \n int internalId = template.getInternalId();\n FieldTemplate[] fields = template.getFieldTemplates();\n for (int i = 0; i < fields.length; i++) {\n insert.setInt(1, internalId);\n insert.setString(2, fields[i].getFieldName());\n insert.setInt(3, i);\n insert.setString(4, fields[i].getTypeName());\n if (fields[i].isMandatory()) {\n insert.setInt(5, 1);\n } else {\n insert.setInt(5, 0);\n }\n if (fields[i].isReadOnly()) {\n insert.setInt(6, 1);\n } else {\n insert.setInt(6, 0);\n }\n insert.setInt(7, 1);\n insert.execute();\n }\n } finally {\n DBUtil.close(insert);\n }\n }", "@Override\n protected void doPrepare()\n {\n iwriter.prepareToCommit();\n super.doPrepare();\n }", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@Override\n\tpublic void prepare() {\n\t\t\n\t}", "void insertBatch(List<InspectionAgency> recordLst);", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void prepareToWrite(RecordWriter writer)\n\t\t\tthrows IOException {\n\t\tps = null;\n\t\tcon = null;\n\t\tString columns = \"?\";\n\t\tfor(int fields = 1; fields < fieldSize; fields++){\n\t\t\tcolumns = columns + \",?\";\n\t\t}\n\t\tString insertQuery = \"insert into \"+tableName+\" values (\"+columns+\")\";\n\t\ttry {\n\t\t\tif (user == null || pass == null) {\n\t\t\t\tcon = DriverManager.getConnection(jdbcURL);\n\t\t\t} else {\n\t\t\t\tcon = DriverManager.getConnection(jdbcURL, user, pass);\n\t\t\t}\n\t\t\tcon.setAutoCommit(false);\n\t\t\tps = con.prepareStatement(insertQuery);\n\t\t} catch (SQLException e) {\n\t\t\tlog.error(\"Unable to connect to JDBC @\" + jdbcURL);\n\t\t\tthrow new IOException(\"JDBC Error\", e);\n\t\t}\n\t\tcount = 0;\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}", "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 }", "int insert(Assist_table record);", "@Before\n public void testSetup(){\n \tjdbcTemplate.batchUpdate(new String[]{\n \t\t\t\"INSERT INTO taxon (id,uninomial,binomial,author,statusid,rankid,referenceid) VALUES\"\n \t\t\t+ \"(9470,'Verbena','×perriana','Moldenke',1,14,105),\"\n \t\t\t+ \"(9460,'Hybrid','Parent 1','Schkuhr ex Willdenow',1,14,105),\"\n \t\t\t+ \"(9466,'Hybrid','Parent 2','Marshall',1,14,105)\",\n \t\t\t\"INSERT INTO taxonomy (parentid,childid) VALUES (73,9470)\",\n \t\t\t\"INSERT INTO taxonomy (parentid,childid) VALUES (9466,1)\",\n \t\t\t\"INSERT INTO taxonhybridparent (id,childid,parentid) VALUES (729,9470,9460),(730,9470,9466)\",\n \t\t\t\"INSERT INTO taxonhabit (id,taxonid,habitid) VALUES (730,9470,1)\"});\n }", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }", "int insertSelective(Assist_table record);", "@Override\n\tpublic void prepare() {\n\t}", "@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}", "int insertSelective(DBPublicResources record);", "int insertSelective(PrescriptionVerifyRecordDetail record);", "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 }", "int insert(TbSerdeParams record);", "void insertBatch(List<TABLE41> recordLst);", "void prepareTables();", "private void batchImport() {\r\n m_jdbcTemplate.batchUpdate(createInsertQuery(),\r\n new BatchPreparedStatementSetter() {\r\n public void setValues(\r\n PreparedStatement ps, int i)\r\n throws SQLException {\r\n int j = 1;\r\n for (String property : m_propertyNames) {\r\n Map params = (Map) m_batch.get(\r\n i);\r\n ps.setObject(j++, params.get(\r\n property));\r\n }\r\n }\r\n\r\n public int getBatchSize() {\r\n return m_batch.size();\r\n }\r\n });\r\n }", "private void saveRecords() {\r\n// for (int i = 0; i < reviewRecords.size(); i++) {\r\n// ReviewRecords get = reviewRecords.get(i);\r\n// if (!get.toString().startsWith(\"null\")) {\r\n// Logs.e(get.toString());\r\n// }\r\n//\r\n// }\r\n\r\n SQLiteJDBC sqliteJDBC = new SQLiteJDBC(GlobalParameters.WORKING_REVIEW_DB_PATH);\r\n StringBuilder sqlTableItems = new StringBuilder();\r\n\r\n sqlTableItems.append(\" (\").append(\"StockCode\").append(\" TEXT PRIMARY KEY NOT NULL,\")\r\n .append(\"StockName\").append(\" TEXT, \")\r\n .append(\"Reference\").append(\" TEXT, \")\r\n .append(\"Methods\").append(\" TEXT, \")\r\n .append(\"ObStartDate\").append(\" TEXT, \")\r\n .append(\"Comments\").append(\" TEXT)\");\r\n\r\n// sqlTableItems.append(\" (\").append(\"StockCode\").append(\" TEXT PRIMARY KEY NOT NULL,\")\r\n// .append(\"StockName\").append(\" TEXT, \")\r\n// .append(\"Reference\").append(\" TEXT, \")\r\n// .append(\"Methods\").append(\" TEXT, \")\r\n// .append(\"ObStartDate\").append(\" TEXT, \")\r\n// .append(\"ObStartPrice\").append(\" TEXT, \")\r\n// .append(\"ObEndDate\").append(\" TEXT, \")\r\n// .append(\"ObEndPrice\").append(\" TEXT, \")\r\n// .append(\"Profit\").append(\" TEXT, \")\r\n// .append(\"Efficency\").append(\" TEXT, \")\r\n// .append(\"Comments\").append(\" TEXT)\");\r\n String tableName = \"Review\";\r\n sqliteJDBC.createTable(tableName, sqlTableItems.toString());\r\n sqliteJDBC.insertColumns(tableName, colNames, getListData());\r\n\r\n }", "private void insertAllRecords(SQLiteDatabase db) {\n ContentValues cv = new ContentValues();\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_ANIMAL_TYPE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"GOAT\");\n db.insert(TABLE_ANIMAL_TYPE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"SHEEP\");\n db.insert(TABLE_ANIMAL_TYPE, null, cv);\n cv.clear();\n\n //M2 : Aquisation Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_AQUISATION, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"BY PURCHASE\");\n db.insert(TABLE_AQUISATION, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"BY BIRTH\");\n db.insert(TABLE_AQUISATION, null, cv);\n cv.clear();\n\n //M3 : Breed Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n cv.put(KEY_ANIMAL_TYPE, 0);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n // TYPE 1\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"OSMANABADI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"SIROHI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"JAMNAPARI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 4);\n cv.put(KEY_FIELD, \"BEETAL\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 5);\n cv.put(KEY_FIELD, \"MARWARI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 6);\n cv.put(KEY_FIELD, \"BARBARI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 7);\n cv.put(KEY_FIELD, \"BOER\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 8);\n cv.put(KEY_FIELD, \"MADGYAL\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 9);\n cv.put(KEY_FIELD, \"TALICHERI\");\n cv.put(KEY_ANIMAL_TYPE, 1);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n // TYPE 2\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"GADDI\");\n cv.put(KEY_ANIMAL_TYPE, 2);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"MERINO\");\n cv.put(KEY_ANIMAL_TYPE, 2);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"DORSET\");\n cv.put(KEY_ANIMAL_TYPE, 2);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 4);\n cv.put(KEY_FIELD, \"BARBARI\");\n cv.put(KEY_ANIMAL_TYPE, 2);\n db.insert(TABLE_BREED, null, cv);\n cv.clear();\n\n //M4 : Purpose Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_PURPOSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"FOR BREEDING\");\n db.insert(TABLE_PURPOSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"FOR SALE\");\n db.insert(TABLE_PURPOSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"FOR EID\");\n db.insert(TABLE_PURPOSE, null, cv);\n cv.clear();\n\n //M5 : Release Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_RELEASE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"BY SALE\");\n db.insert(TABLE_RELEASE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"BY DEATH\");\n db.insert(TABLE_RELEASE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"BY CULLING\");\n db.insert(TABLE_RELEASE, null, cv);\n cv.clear();\n\n //M6 : Months Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"1\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"2\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"3\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 4);\n cv.put(KEY_FIELD, \"6\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 5);\n cv.put(KEY_FIELD, \"9\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 6);\n cv.put(KEY_FIELD, \"12\");\n db.insert(TABLE_MONTHS, null, cv);\n cv.clear();\n\n //M7 : Vaccine Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_VACCINE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"PPR\");\n db.insert(TABLE_VACCINE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"ETV\");\n db.insert(TABLE_VACCINE, null, cv);\n cv.clear();\n\n //M9 : Expense Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"SHED\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"ELECTRICITY\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"LABOUR\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 4);\n cv.put(KEY_FIELD, \"TELEPHONE\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 5);\n cv.put(KEY_FIELD, \"ANIMAL PURCHASE\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 6);\n cv.put(KEY_FIELD, \"WATER\");\n db.insert(TABLE_EXPENSE, null, cv);\n cv.clear();\n\n //M10 : Income Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_INCOME, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"ANIMAL SALE\");\n db.insert(TABLE_INCOME, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"MILK SALE\");\n db.insert(TABLE_INCOME, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"FODDER SALE\");\n db.insert(TABLE_INCOME, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 4);\n cv.put(KEY_FIELD, \"MANURE SALE\");\n db.insert(TABLE_INCOME, null, cv);\n cv.clear();\n\n //M11 : Action Feed Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_ACTION_FEED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"ADD STOCK\");\n db.insert(TABLE_ACTION_FEED, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"FEED ANIMALS\");\n db.insert(TABLE_ACTION_FEED, null, cv);\n cv.clear();\n\n //M12 : Action Feed Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_FEED_TYPE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"DRY\");\n db.insert(TABLE_FEED_TYPE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"GREEN\");\n db.insert(TABLE_FEED_TYPE, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 3);\n cv.put(KEY_FIELD, \"CONCENTRATED MIXTURE\");\n db.insert(TABLE_FEED_TYPE, null, cv);\n cv.clear();\n\n //M13 : Action Milk Table\n cv.put(KEY_SR_NO, 0);\n cv.put(KEY_FIELD, \"SELECT\");\n db.insert(TABLE_ACTION_MILK, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 1);\n cv.put(KEY_FIELD, \"PRODUCTION\");\n db.insert(TABLE_ACTION_MILK, null, cv);\n cv.clear();\n cv.put(KEY_SR_NO, 2);\n cv.put(KEY_FIELD, \"SALES\");\n db.insert(TABLE_ACTION_MILK, null, cv);\n cv.clear();\n }", "int insert(StatementsWithSorting record);", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n MonitoriaEntity entity = factory.manufacturePojo(MonitoriaEntity.class);\r\n\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "int insertSelective(ProcurementSource record);", "int insert(ProcurementSource record);", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "int insertSelective(FinMonthlySnapModel record);", "int insertSelective(QuestionWithBLOBs record);", "public void setupDB()\r\n\t{\n\tjdbcTemplateObject.execute(\"DROP TABLE IF EXISTS employee1 \");\r\n\r\n\tjdbcTemplateObject.\r\n\texecute(\"CREATE TABLE employee1\"\r\n\t+ \"(\" + \"name VARCHAR(255), id SERIAL)\");\r\n\t}", "int insert(PrescriptionVerifyRecordDetail record);", "private void preparedStatementForEmployeeData() {\n\t\ttry {\n\t\t\tConnection connection = this.getConnection();\n\t\t\tString sql = \"Select * from employee_payroll_2 WHERE name = ?\";\n\t\t\temployeePayrollDataStatement = connection.prepareStatement(sql);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void insert(organize_infoBean record);", "public void prepare() {\n if (getRequest().getMethod().equalsIgnoreCase(\"post\")) {\n // prevent failures on new\n String workdayReportId = getRequest().getParameter(\"workdayReport.id\");\n if (workdayReportId != null && !workdayReportId.equals(\"\")) {\n workdayReport = workdayReportManager.get(new Long(workdayReportId));\n }\n }\n }", "private void prepareData() throws InputException {\n String dia_db = getDate(dia.getValue());\n int semana_db = getWeek(dia_db);\n hrs = horas.getText();\n\n if (hrs.length() > 0) {\n horasDB = Integer.parseInt(String.valueOf(horas.getText()));\n } else {\n throw new InputException(\"Hora deve ser um valor entre 0 e 24\");\n }\n\n if( horasDB <= 0 || horasDB > 24 || hrs == null){\n throw new InputException(\"Hora deve ser um valor entre 0 e 24\");\n }\n\n TI ti_db = new TI(dia_db, semana_db, horasDB);\n Atividade atividade_db = null;\n int operation = INVALIDO;\n\n atividadeEscolhida = atividade.getSelectedItem().toString();\n if (atividadeEscolhida.equals(getString(R.string.nova_atividade))) {\n nomeAtividadeDB = nomeAtividade.getText().toString();\n if(nomeAtividadeDB.trim().equals(\"\")){\n throw new InputException(\"Nome da Atividade Inválido!\");\n }\n Categoria categoria_db = null;\n if(categoria.getValue() == TRABALHO) {\n categoria_db = Categoria.TRABALHO;\n } else if (categoria.getValue() == LAZER) {\n categoria_db = Categoria.LAZER;\n }\n\n Prioridade prioridade_db = null;\n int item_prioridade = prioridade.getSelectedItemPosition();\n if(item_prioridade == BAIXA) {\n prioridade_db = Prioridade.BAIXA;\n } else if (item_prioridade == MEDIA) {\n prioridade_db = Prioridade.MEDIA;\n } else if (item_prioridade == ALTA) {\n prioridade_db = Prioridade.ALTA;\n }\n\n operation = INSERIR;\n atividade_db = new Atividade(nomeAtividadeDB, categoria_db, prioridade_db, null);\n } else {\n operation = ATUALIZAR;\n atividade_db = mAtividade;\n }\n\n saveData(operation, atividade_db, ti_db);\n }", "protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }", "int insert(SupplyNeed record);", "int insert(RepaymentPlanInfoUn record);", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\r\n\t\tpd = new PreparedData();\r\n\r\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t\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\n\t\t\telse if(name.equals(\"AD_Client_ID\"))\n\t\t\t\tp_AD_Client_ID = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"AD_Org_ID\"))\n\t\t\t\tp_AD_Org_ID = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param01\"))\n\t\t\t\tparam_01 = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param02\"))\n\t\t\t\tparam_02 = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param03\"))\n\t\t\t\tparam_03 = (String)para[i].getParameterAsString();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param04\"))\n\t\t\t\tparam_04 = (String)para[i].getParameterAsString();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param05\"))\n\t\t\t\tparam_05 = (Timestamp)para[i].getParameterAsTimestamp();\n\t\t\t\n\t\t\telse if(name.equals(\"n_param06\"))\n\t\t\t\tparam_06 = (Timestamp)para[i].getParameterAsTimestamp();\n\t\t\t\n\t\t\telse if(name.equals(\"AD_User_ID\"))\n\t\t\t\tp_AD_User_ID = (int)para[i].getParameterAsInt();\n\t\t\t\n\t\t\telse if(name.equals(\"Report\"))\n\t\t\t\tp_Report = (int)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\t\n\t}", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }", "private void createDbRecords() throws IOException, JAXBException {\n }", "private void createTempDatabase() {\n\t\thandler = new ERXmlDocumentHandler(doc);\n\t\tList<String> filter = initFilter(subjectId);\n\t\tparseEntitys(filter);\n\t}", "private void insertRecordRow(Connection con,\n IdentifiedRecordTemplate template, GenericDataRecord record)\n throws SQLException {\n PreparedStatement insert = null;\n \n try {\n int internalId = getNextId(RECORD_TABLE, \"recordId\");\n record.setInternalId(internalId);\n int templateId = template.getInternalId();\n String externalId = record.getId();\n \n SilverTrace.debug(\"form\", \"GenericRecordSetManager.insertRecordRow\",\n \"root.MSG_GEN_PARAM_VALUE\", \"internalId = \" + internalId\n + \", templateId = \" + templateId + \", externalId = \" + externalId\n + \", language = \" + record.getLanguage());\n \n insert = con.prepareStatement(INSERT_RECORD);\n insert.setInt(1, internalId);\n insert.setInt(2, templateId);\n insert.setString(3, externalId);\n if (!I18NHelper.isI18N\n || I18NHelper.isDefaultLanguage(record.getLanguage())) {\n insert.setNull(4, Types.VARCHAR);\n } else {\n insert.setString(4, record.getLanguage());\n }\n insert.execute();\n } finally {\n DBUtil.close(insert);\n }\n }", "public void createAll() {\n SQLFormater SQLFormaterMoods = new SQLFormater(MOODS_TABLE_NAME, ID_FIELD); // objects help to form sql strings for creating tables\n SQLFormater SQLFormaterAnswers = new SQLFormater(ANSWERS_TABLE_NAME, ID_FIELD);\n\n String[] answersTableFields = {ANSWERS_FIELD, ID_MOODS_FIELD}; // ordered fields\n String[] moodsTableFields = {MOODS_FIELD, HI_FIELD, BYBY_FIELD};\n\n SQLFormaterMoods.setNewField(MOODS_FIELD, STRING_TYPE, \"NOT NULL\"); // creating tables\n SQLFormaterMoods.setNewField(HI_FIELD, STRING_TYPE, null);\n SQLFormaterMoods.setNewField(BYBY_FIELD, STRING_TYPE, null);\n dbConnection.execute(SQLFormaterMoods.getStringToCreateDB(null));\n\n SQLFormaterAnswers.setNewField(ANSWERS_FIELD, STRING_TYPE, \"NOT NULL\");\n SQLFormaterAnswers.setNewField(ID_MOODS_FIELD, INTEGER_TYPE, null);\n String reference = \"FOREIGN KEY (\" + ID_MOODS_FIELD + \")\" +\n \" REFERENCES \" + MOODS_TABLE_NAME +\n \"(\" + ID_FIELD + \")\";\n dbConnection.execute(SQLFormaterAnswers.getStringToCreateDB(reference)); // create table with reference\n\n insertTableValues(SQLFormaterMoods, moodsTableFields, getMoodsTableValues()); // inserting ordered values into tables\n insertTableValues(SQLFormaterAnswers, answersTableFields, getAnswersTableValues());\n }", "int insertSelective(OrderDetails record);", "void insertSelective(organize_infoBean record);", "public void prepStmt(String sql) {\n\t\ttry {\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t} catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t}", "private void insertData() {\n for (int i = 0; i < 3; i++) {\n PodamFactory factory = new PodamFactoryImpl();\n VisitaEntity entity = factory.manufacturePojo(VisitaEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n }", "private void insertData() \n {\n for (int i = 0; i < 3; i++) {\n TarjetaPrepagoEntity entity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n for(int i = 0; i < 3; i++)\n {\n PagoEntity pagos = factory.manufacturePojo(PagoEntity.class);\n em.persist(pagos);\n pagosData.add(pagos);\n\n }\n \n data.get(2).setSaldo(0.0);\n data.get(2).setPuntos(0.0);\n \n double valor = (Math.random()+1) *100;\n data.get(0).setSaldo(valor);\n data.get(0).setPuntos(valor); \n data.get(1).setSaldo(valor);\n data.get(1).setPuntos(valor);\n \n }", "public void writeInsertFieldsIntoRow(AbstractRecord record, AbstractSession session) {\n if (this.isReadOnly()) {\n return;\n }\n record.put(this.getField(), null);\n }", "private void insertData() {\n for (int i = 0; i < 3; i++) {\n RecipeEntity books = factory.manufacturePojo(RecipeEntity.class);\n em.persist(books);\n data.add(books);\n }\n }", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }", "void insert(OrderPreferential record) throws SQLException;", "int insertSelective(TbComEqpModel record);", "void insert(Mi004 record);", "private void insertDummyBook() {\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_NAME, getString(R.string.dummy_book_name));\n values.put(BookEntry.COLUMN_GENRE, BookEntry.GENRE_SELF_HELP);\n values.put(BookEntry.COLUMN_PRICE, getResources().getInteger(R.integer.dummy_book_price));\n values.put(BookEntry.COLUMN_QUANTITY, getResources().getInteger(R.integer.dummy_book_quantity));\n values.put(BookEntry.COLUMN_SUPPLIER, getString(R.string.dummy_book_supplier));\n values.put(DatabaseContract.BookEntry.COLUMN_SUPPLIER_PHONE, getString(R.string.dummy_supplier_phone_number));\n values.put(DatabaseContract.BookEntry.COLUMN_SUPPLIER_EMAIL, getString(R.string.dummy_book_supplier_email));\n getContentResolver().insert(BookEntry.CONTENT_URI, values);\n }", "int insertSelective(WizardValuationHistoryEntity record);", "int insertSelective(QuestionOne record);", "int insertSelective(PmPost record);", "public void prepare(IDb db, List<? extends Relation> relations);", "int insert(DBPublicResources record);", "protected void insertDataIntoPersons(Collection<User> users) {\n\t\t\ttry {\n\t\t\t\topenConnection();\n\t\t\t\tPreparedStatement prep = conn.prepareStatement(\"INSERT INTO Persons VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);\");\n\t\t\t\t//HUGEST IF STATEMENT EVAAAAAAH\n\t\t\t\tfor (User u : users) {\n\t\t\t\t\tif\n\t\t\t\t\t(\n\t\t\t\t\t\t\tu.getName() != null && u.getCountry() != null && \n\t\t\t\t\t\t\tu.getLanguage() != null && u.getGender() != null && \n\t\t\t\t\t\t\tu.getRegisteredDate() != null && u.getRealname() != null && \n\t\t\t\t\t\t\tu.getPlaycount() != 0 && u.getAge() != 0 && u.getNumPlaylists() != 0\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tprep.setString(1, u.getName());\n\t\t\t\t\t\tprep.setInt(2, u.getAge());\n\t\t\t\t\t\tprep.setString(3, u.getCountry());\n\t\t\t\t\t\tprep.setString(4, u.getLanguage());\n\t\t\t\t\t\tprep.setString(5, u.getGender());\n\t\t\t\t\t\tprep.setString(6, u.getRegisteredDate().toString());\n\t\t\t\t\t\tprep.setString(7, u.getRealname());\n\t\t\t\t\t\tprep.setInt(8, u.getPlaycount());\n\t\t\t\t\t\tprep.setInt(9, u.getNumPlaylists());\t\n\t\t\t\t\t\tprep.addBatch();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconn.setAutoCommit(false);\n\t \tprep.executeBatch();\n\t \tconn.setAutoCommit(true);\n\t \t\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Something went wrong with inserting batched data into Persons\");\n\t\t\t\tSystem.out.println(\"Check System.err for details\");\n\t\t\t\te.printStackTrace(System.err);\n\t\t\t}\n\t}", "int insert(Orderall record);", "int insertSelective(SupplyNeed record);", "private void insertPerform(){\n \tif(!verify()){\n \t\treturn;\n \t}\n \tString val=new String(\"\");\n \tval=val+\"'\"+jTextField1.getText()+\"', \"; // poNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker1.getValue()\n \t\t)\n \t\t+\"', \"; // poDate\n \tval=val+\"'\"+vndList[jTextField2.getSelectedIndex()-1]+\"', \"; // vndNo\n \tval=val+\"'\"+jTextField3.getText()+\"', \"; // qtnNo\n \tval=val+\"'\"+\n \t\tinventorycontroller.util.DateUtil.getRawFormat(\n \t\t\t(java.util.Date)jXDatePicker2.getValue()\n \t\t)\n \t\t+\"', \"; // qtnDate\n \tval=val+\"'\"+poAmount+\"', \"; // poTotal\n \tval=val+\"'pending', \"; // poStatus\n \tval=val+\"'\"+jEditorPane1.getText()+\"' \"; // remark\n \t\n \ttry{\n \t\tdbInterface1.cmdInsert(\"poMaster\", val);\n \t\tinsertPoBomDesc();\n \t\tinsertPoDesc();\n\t \tupdateBOM();\n \t}\n \tcatch(java.sql.SQLException ex){\n \t\tSystem.out.println (ex);\n \t}\n \tresetPerform();\n }", "int insert(FinMonthlySnapModel record);", "private static void prepareAdvData() {\n ADV_DATA.add(createDateTimePacket());\n ADV_DATA.add(createDeviceIdPacket());\n ADV_DATA.add(createDeviceSettingPacket());\n for (int i = 0; i < 3; i++) {\n ADV_DATA.add(createBlackOutTimePacket(i));\n }\n for (int i = 0; i < 3; i++) {\n ADV_DATA.add(createBlackOutDatePacket(i));\n }\n }", "@Override\n public void prepareTransient() {\n fixDates();\n untilWhenDate = assignDateField(untilWhen);\n }", "@Override\n @Transactional\n public void addBulkInsertsAfterExtraction() {\n List<ScrapBook> scrapBooks = new ArrayList<ScrapBook>();\n boolean jobDone = false;\n boolean pause = false;\n while (!jobDone) {\n pause = false;\n int lineCount = 0;\n while (!pause) {\n ++lineCount;\n if (lineCount % 30 == 0) {\n scrapBooks = springJdbcTemplateExtractor.getPaginationList(\"SELECT * FROM ScrapBook\", 1, 30);\n pause = true;\n }\n }\n //convert scrapbook to book and insert into db\n convertedToBookAndInsert(scrapBooks);\n // delete all inserted scrapbooks\n springJdbcTemplateExtractor.deleteCollection(scrapBooks);\n scrapBooks = null;\n if (0 == springJdbcTemplateExtractor.findTotalScrapBook()) {\n jobDone = true;\n }\n }\n }", "int insertSelective(PmKeyDbObj record);", "private void insertIntoIncidentTicketTables(Connection conn) {\n\n\tPreparedStatement pst = null;\n\tString insertIntoIncidentTicketQuery = \"INSERT INTO Incidentticket VALUES \" + \"(?, ?, ?, ?, ?, ?, ?);\";\n\n\ttry {\n\n\t\tfor (IncidentTicket IncidentTicket : this.getIncidentTicketObjects()) {\n\t\t\tpst = conn.prepareStatement(insertIntoIncidentTicketQuery);\n\t\t\tpst.setInt(1, IncidentTicket.getId());\n\t\t\tpst.setInt(2, IncidentTicket.getInapuserid());\n\t\t\tpst.setInt(3, IncidentTicket.getInappostid());\n\t\t\tpst.setInt(4, IncidentTicket.getAssignedTechnicianid());\n\t\t\tpst.setString(5, IncidentTicket.getDate());\n\t\t\tpst.setString(6, IncidentTicket.getTime());\n\t\t\tpst.setNString(7, IncidentTicket.getIssue());\n\n\t\t\tpst.executeUpdate();\n\t\t\tSystem.out.println(\"\\n\\nRecords Inserted into IncidentTicket Table Successfully\\n\");\n\n\t\t}\n\t\t//System.out.println(\"Abhinav\");\n\t} catch (SQLException e) {\n\t\tSystem.out.println(\"\\n---------Please Check Error Below for inserting values into Incident Ticket Table---------\\n\");\n\t\te.printStackTrace();\n\t}\n\n}" ]
[ "0.65170085", "0.6450228", "0.63528335", "0.62602997", "0.6245128", "0.6233077", "0.6124699", "0.6050355", "0.59876823", "0.5961354", "0.5950637", "0.5910971", "0.5887428", "0.5874399", "0.58640605", "0.5829496", "0.5818225", "0.5818217", "0.5817455", "0.58139473", "0.58085024", "0.5802161", "0.5801081", "0.57934564", "0.5779688", "0.57503825", "0.573291", "0.57311773", "0.5721099", "0.5720798", "0.5719943", "0.5703299", "0.5678441", "0.56623703", "0.5661372", "0.564969", "0.5647188", "0.56247604", "0.56178695", "0.56173587", "0.55777", "0.5572927", "0.55725026", "0.5569512", "0.5562541", "0.55588686", "0.55359226", "0.5530635", "0.55163884", "0.5504136", "0.54791045", "0.5477882", "0.54692805", "0.54686373", "0.5463743", "0.5463151", "0.5437925", "0.54373115", "0.5435586", "0.54350305", "0.54336804", "0.5433649", "0.54291284", "0.5427408", "0.542671", "0.5426043", "0.5425051", "0.5424868", "0.5423421", "0.5423416", "0.54220814", "0.5418854", "0.5417871", "0.5413735", "0.5407818", "0.5406809", "0.54005367", "0.53934836", "0.5391879", "0.538809", "0.5382557", "0.5380022", "0.5376604", "0.5376447", "0.53717375", "0.5367366", "0.53641224", "0.53572834", "0.5351029", "0.5348853", "0.53438264", "0.5341384", "0.53368485", "0.53340596", "0.53335226", "0.5332953", "0.53325474", "0.5332177", "0.53319436", "0.53301466" ]
0.61391175
6
Method that displays a snackbar
public void displaySnackBar(View layout,int message,int bgcolor){ Snackbar snack=null; View snackView; if(message == com.ibeis.wildbook.wildbook.R.string.offline) snack=Snackbar.make(layout,message,Snackbar.LENGTH_INDEFINITE); else snack=Snackbar.make(layout,message,Snackbar.LENGTH_SHORT); snackView = snack.getView(); snackView.setBackgroundColor(bgcolor); snack.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showErrorSnackbar();", "private void showSnackBar(String message) {\n }", "private void showSnackbarMessage(String message){\n if(view != null){\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).show();\n }\n }", "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 snackBar(String msg) {\n MySnackBar.createSnackBar(Objects.requireNonNull(getContext()), Objects.requireNonNull(getView()), msg);\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 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 void SnackBarB() {\n Snackbar.make(getWindow().getDecorView().getRootView(),\n \"Cálculos sobre cinemática de rotación.\", Snackbar.LENGTH_LONG).show();\n }", "public void showSnackBar(final View view, final String message) {\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).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 }", "public static void showRedSnackbar(String message, Activity activity, int snackbarDuration) {\n snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, snackbarDuration);\n View snackbarView = snackbar.getView();\n snackbarView.setBackgroundColor(Color.parseColor(RED));\n\n TextView snackbarText = snackbarView.findViewById(com.google.android.material.R.id.snackbar_text);\n snackbarText.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_vector_cross, 0, 0, 0);\n snackbarText.setCompoundDrawablePadding(ICON_PADDING_SNACKBAR);\n snackbarText.setGravity(Gravity.CENTER);\n\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n params.width = FrameLayout.LayoutParams.MATCH_PARENT;\n snackbarView.setLayoutParams(params);\n\n snackbar.show();\n }", "public static void showGreenSnackbar(String message, Activity activity, int snackbarDuration) {\n snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, snackbarDuration);\n View snackbarView = snackbar.getView();\n snackbarView.setBackgroundColor(Color.parseColor(GREEN));\n\n TextView snackbarText = snackbarView.findViewById(com.google.android.material.R.id.snackbar_text);\n snackbarText.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_vector_checkmark, 0, 0, 0);\n snackbarText.setCompoundDrawablePadding(ICON_PADDING_SNACKBAR);\n snackbarText.setGravity(Gravity.CENTER);\n\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n params.width = FrameLayout.LayoutParams.MATCH_PARENT;\n snackbarView.setLayoutParams(params);\n\n snackbar.show();\n }", "private void createSnackbar(String message) {\n Snackbar.make(mLayout, message, Snackbar.LENGTH_LONG).show();\n }", "private void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message = \"Good! Connected to Internet\";\n color = Color.WHITE;\n } else {\n message = \"Sorry! Not connected to internet\";\n color = Color.RED;\n }\n\n Snackbar snackbar = Snackbar\n .make(findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n\n View sbView = snackbar.getView();\n TextView textView = sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(color);\n snackbar.show();\n }", "void showErrorSnackbar(long syncInterval) {\r\n // Initialize the the parameters that will be used to create the String message\r\n int timePassed;\r\n String timeUnit;\r\n if (syncInterval < DAY_IN_SECONDS) {\r\n // If less than a day has passed, convert the number of seconds to hours\r\n timePassed = (int) (syncInterval / HOUR_IN_SECONDS);\r\n\r\n // Set the time unit to singular or multiple\r\n if (timePassed == 1) {\r\n timeUnit = getString(R.string.hour_singular);\r\n } else {\r\n timeUnit = getString(R.string.hour_multiple);\r\n }\r\n\r\n } else {\r\n // Convert the time passed to days\r\n timePassed = (int) (syncInterval / DAY_IN_SECONDS);\r\n\r\n // Set the time unit to singular or multiple\r\n if (timePassed == 1) {\r\n timeUnit = getString(R.string.day_singular);\r\n } else {\r\n timeUnit = getString(R.string.day_multiple);\r\n }\r\n }\r\n\r\n // Create the String message to display to the user to notify them of how long\r\n // since the last sync\r\n String timeString = getString(R.string.error_last_sync, timePassed + \" \" + timeUnit);\r\n\r\n // Create a Snackbar to hold the message\r\n mSnackBar = Snackbar.make(mDrawerLayout,\r\n timeString,\r\n Snackbar.LENGTH_INDEFINITE\r\n );\r\n\r\n // Set the Snackbar to be dismissed on click\r\n mSnackBar.getView().setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n mSnackBar.dismiss();\r\n }\r\n });\r\n\r\n // Show the Snackbar\r\n mSnackBar.show();\r\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 }", "@Override\n public void run() {\n snackbar.setVisibility(View.GONE); //This will remove the View. and free s the space occupied by the View\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 showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message = \"Good! Connected to Internet\";\n color = Color.WHITE;\n getUserLocation();\n } else {\n message = \"Sorry! Not connected to internet\";\n color = Color.RED;\n }\n\n Snackbar snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n\n View sbView = snackbar.getView();\n// TextView textView = (TextView) sbView.findViewById(a);\n// textView.setTextColor(color);\n snackbar.show();\n }", "public static void showSnackbar(Activity activity, final View parent, final String message, final String actionText) {\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n final Snackbar snackbar = Snackbar.make(parent, message, Snackbar.LENGTH_LONG)\n .setAction(actionText, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n snackbar.show();\n }\n });\n\n }", "@Override\n public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {\n Snackbar.make(findViewById(R.id.activity_coordinator_layout), t.getLocalizedMessage(), Snackbar.LENGTH_INDEFINITE).show();\n }", "protected void showMessage(@NonNull final String message) {\n SnackbarManager.show(Snackbar.with(this).text(message).colorResource(R.color.blende_red).swipeToDismiss(true));\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 }", "public static void showSnackbar(Activity context, String message){\r\n Snackbar.make(context.findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG)\r\n .setAction(\"Dismiss\", new View.OnClickListener(){\r\n @Override\r\n public void onClick(View v){\r\n // Dismisses automatically\r\n }\r\n }).setActionTextColor(context.getResources().getColor(R.color.colorAccent))\r\n .show();\r\n }", "void showSuccess(String message);", "@Override\n public void showError(@StringRes int messageId, @Nullable Object... args) {\n if (getView() != null) {\n //When we have the root view\n\n //Evaluating the message to be shown\n String messageToBeShown;\n if (args != null && args.length > 0) {\n //For the String Resource with args\n messageToBeShown = getString(messageId, args);\n } else {\n //For the String Resource without args\n messageToBeShown = getString(messageId);\n }\n\n if (!TextUtils.isEmpty(messageToBeShown)) {\n //Displaying the Snackbar message of indefinite time length\n //when we have the error message to be shown\n\n new SnackbarUtility(Snackbar.make(getView(), messageToBeShown, Snackbar.LENGTH_INDEFINITE))\n .revealCompleteMessage() //Removes the limit on max lines\n .setDismissAction(R.string.snackbar_action_ok) //For the Dismiss \"OK\" action\n .showSnack();\n }\n }\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 }", "void showForbiddenErrorSnackbar();", "void onSnackBarActionClicked(int uniqueId, View view);", "public void showNotification(String notificationText) {\n View parentLayout = findViewById(android.R.id.content);\n Snackbar mySnackbar = Snackbar.make(parentLayout, notificationText, Snackbar.LENGTH_LONG);\n mySnackbar.show();\n }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\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 }", "@Override\n public void onClick(View v) {\n Snackbar.make(v, \"I'm dead! =(\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }", "private void showErrorToast() {\n }", "public static void showSnack(final Context context, View view, boolean isConnected) {\n if (snackbar == null) {\n snackbar = Snackbar\n .make(view, context.getString(R.string.network_failure), Snackbar.LENGTH_INDEFINITE)\n .setAction(\"SETTINGS\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(android.provider.Settings.ACTION_SETTINGS);\n context.startActivity(intent);\n }\n });\n View sbView = snackbar.getView();\n TextView textView = sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(Color.WHITE);\n }\n\n if (!isConnected && !snackbar.isShown()) {\n snackbar.show();\n } else {\n snackbar.dismiss();\n snackbar = null;\n }\n }", "void showAlert(String message);", "void showToast(String message);", "void showToast(String message);", "private void muestraMensaje(int idMensaje) {\n final Snackbar snack=Snackbar.make(mLayout,idMensaje,Snackbar.LENGTH_LONG).\n setAction(R.string.texto_cerrar, v -> {\n // No necesitamos hacer nada, solo que se cierre\n });\n snack.show();\n }", "private void createSnack() {\n }", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void showMessage(String string) {\n\n }", "private void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "public void showMessage(String message);", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "void showSuccess();", "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 void displayToastMessage(String msg) {\n\t\tToast toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);\n\t\ttoast.setGravity(Gravity.CENTER, 0, 0);\n\t\ttoast.show();\n\t}", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Snackbar snackbar = Snackbar.make(findViewById(android.R.id.content), \"Error occurred! Please log out and log in again to upload the interview.\" + \"\\n\" + \"Note: Do not log out if you want to resume the offline interview process.\", Snackbar.LENGTH_LONG);\n View snackbarView = snackbar.getView();\n TextView tv = (TextView) snackbarView.findViewById(android.support.design.R.id.snackbar_text);\n tv.setTextColor(getResources().getColor(R.color.dashboard_count_color));\n tv.setMaxLines(5);\n //tv.setTextSize(17);\n //tv.setGravity(0);\n //snackbarView.setBackgroundColor(getResources().getColor(R.color.newblack));\n snackbar.show();\n }", "private void success() {\n showMessage(\"Congratulations!\", \"success\");\n }", "private void showDeletedSnackbar() {\n Snackbar.make(parent, \"Selected \" + getTypeDescription() + \" deleted.\", Snackbar.LENGTH_LONG)\n .setAction(\"Undo\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (previouslyDeletedItems.size() > 0) {\n // Re-add the items and update the list.\n listDao.insertRows(previouslyDeletedItems);\n reloadData();\n }\n }\n })\n .show();\n }", "@Override\r\n\t\tpublic void showMessage(String message) {\n\t\t\t\r\n\t\t}", "public void ShowValidation(String msg) {\n try {\n tv_validationtext.setText(msg);\n rl_validation.setVisibility(View.VISIBLE);\n tv_validationtext.startAnimation(appsingleton.shake_animation);\n } catch (Exception e) {\n e.printStackTrace();\n appsingleton.ToastMessage(\"\" + e.getMessage());\n }\n }", "private void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message =getString(R.string.back_online);\n TastyToast.makeText(getActivity(), message, TastyToast.LENGTH_SHORT, TastyToast.SUCCESS);\n } else {\n message =getString(R.string.you_are_offline);\n TastyToast.makeText(getActivity(), message, TastyToast.LENGTH_LONG, TastyToast.ERROR);\n }\n }", "void showError(String message);", "void showError(String message);", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "private void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message =getString(R.string.back_online);\n TastyToast.makeText(getApplicationContext(), message, TastyToast.LENGTH_SHORT, TastyToast.SUCCESS);\n } else {\n message =getString(R.string.you_are_offline);\n TastyToast.makeText(getApplicationContext(), message, TastyToast.LENGTH_LONG, TastyToast.ERROR);\n }\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\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}", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\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}", "public static void showWarningSnackBar(View layout, String text) {\n Snackbar s = Snackbar.make(layout, text, Snackbar.LENGTH_INDEFINITE);\n s.setAction(\"Retry\", v -> {\n s.dismiss();\n });\n s.show();\n }", "public void showMessage(){\n final AlertDialog.Builder alert = new AlertDialog.Builder(context);\n alert.setMessage(message);\n alert.setTitle(title);\n alert.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n alert.create().dismiss();\n }\n });\n alert.create().show();\n }", "private void showError(String message){\n\t\tsetupErrorState();\n\t\tsynapseAlert.showError(message);\n\t}", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }", "public void showErrorMessage(String message){\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }", "private void showMessage(int position) {\n // Open Bottom sheet and show details\n }", "@Override\n\tpublic void showMessage(String message) {\n\n\t}", "@Override\n public void onQuedadaCreadaError() {\n btn_publicar.setEnabled(true);\n Snackbar.make(myView,\"Error al crear la quedada\", Snackbar.LENGTH_SHORT).show();\n\n }", "@HippyMethod(name = \"show\")\n\tpublic void show(String message)\n\t{\n\t\tLogUtils.d(CLASSNAME, message);\n\t\t// Toast.makeText(hippyRootView.getContext(), message, Toast.LENGTH_SHORT).show();\n\t}", "void showError(String errorMessage);", "private void showErrorMessage(String message) {\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(this, message, duration);\n toast.show();\n\n }", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "private void displayToast(String message) {\n Toast.makeText(getLayoutInflater().getContext(), message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void displayMessage(String message) {\n Toast.makeText(getActivity(),message,Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onErrorResponse(VolleyError volleyError) {\n progressDialog.dismiss();\n\n // Showing error message if something goes wrong.\n Snackbar snackbar = Snackbar\n .make(coordinatorLayout, \"No internet connection!\", Snackbar.LENGTH_LONG)\n .setAction(\"RETRY\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n\n // Changing message text color\n snackbar.setActionTextColor(Color.RED);\n\n // Changing action button text color\n View sbView = snackbar.getView();\n TextView textView = (TextView) sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(Color.YELLOW);\n\n snackbar.show();\n }", "@Override\n public void onSuccess(Void unused) {\n Snackbar.make(save, R.string.sucessfull_update, BaseTransientBottomBar.LENGTH_SHORT).show();\n }", "private void showMessage(String message) {\n Toast.makeText(getApplicationContext(),message, Toast.LENGTH_LONG).show();\n }", "void showMessage(@NonNull BaseMessage message);", "private void showErrorOnToast(String msg) {\n mFailToLoadTextView.setVisibility(View.VISIBLE);\n mFailToLoadTextView.setText(R.string.error_msg_unable_to_load);\n Toast.makeText(MainActivity.this, msg, Toast.LENGTH_SHORT).show();\n }", "private void showErrorView() {\n Log.d(\"lodd\", \"showSuccessView: hjfj91919515\");\n\n }", "public void showError(String errorMessage);", "private void displayMessage(String message) {\n Log.d(\"Method\", \"displayMessage()\");\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "private void displayToast(String paintingDescription) {\n Toast.makeText(this, paintingDescription, Toast.LENGTH_SHORT).show();\n }", "public void showError (String message) {\r\n if(myAnimation != null){\r\n myAnimation.stop();\r\n }\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(ALERT_MESSAGE);\r\n alert.setContentText(message);\r\n alert.show();\r\n }", "void doShowRetry();", "public static void showSuccessSneaker(Context context, String msg) {\n\n if(!msg.endsWith(\".\")){\n msg=msg+\".\";\n }\n\n try {\n Sneaker.with((Activity) context)\n .setTitle(context.getString(R.string.app_name))\n .setMessage(msg)\n .sneakSuccess();\n }catch (Exception e){e.printStackTrace();}\n }", "void showSyncFailMessage();", "@Override\n public void showMessage(String msg) {\n String pesan = msg;\n if (pesan.equals(\"Post tidak ditemukan\")){\n txtNoData.setVisibility(View.VISIBLE);\n }\n }", "private void showNodeDiscoveryError(){\n View view = getView();\n if(view != null) {\n Snackbar snackbar = Snackbar\n .make(getView(), \"Knoten nicht im Wlan gefunden!\", Snackbar.LENGTH_LONG);\n int colorSnackRetry = ResourcesCompat.getColor(getResources(), R.color.colorSnackRetry, null);\n snackbar.setActionTextColor(colorSnackRetry);\n snackbar.show();\n } else {\n Log.d(ShowNodeWebsiteFragment.class.toString(), \"View is null\");\n }\n }", "public void showMessage(String message) \r\n\t\t{\t\t\t\r\n\t\t}", "public abstract void showMessageBox(String message);", "private void showToast(final int resid) {\n\t\tm_toastHandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tToast.makeText(InstrumentService.this, resid, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tprotected String showErrorMessage() {\n\t\treturn \"There has been an error. Payment cannot process at this time. Please check with your credit card compay.\";\n\t}", "void showErrorMsg(String string);" ]
[ "0.81631845", "0.8049236", "0.7707295", "0.7318469", "0.72002316", "0.7193589", "0.71365404", "0.70560676", "0.70375276", "0.7003116", "0.69925004", "0.6911676", "0.6900523", "0.6873789", "0.6864579", "0.68261844", "0.67547876", "0.67469686", "0.67469454", "0.6739422", "0.6723677", "0.67227477", "0.6713904", "0.6685055", "0.66728127", "0.6622922", "0.661215", "0.6596195", "0.6551654", "0.6547632", "0.65243775", "0.6471546", "0.6456758", "0.64222795", "0.64138675", "0.6368785", "0.6348721", "0.6348721", "0.63474154", "0.6309634", "0.6306843", "0.6298891", "0.6293183", "0.62824404", "0.62824374", "0.6278899", "0.6247699", "0.62180984", "0.6198329", "0.61971295", "0.6179997", "0.61651653", "0.61634684", "0.6155357", "0.61547637", "0.61473817", "0.61473817", "0.6142327", "0.613627", "0.6132697", "0.6132697", "0.6132697", "0.61239034", "0.61239034", "0.61130947", "0.6107223", "0.6101758", "0.6101154", "0.6101154", "0.61011046", "0.6094614", "0.6088891", "0.60869753", "0.60837877", "0.6082015", "0.60680926", "0.6052279", "0.6050047", "0.60373414", "0.60304976", "0.60232854", "0.6022423", "0.60216933", "0.60176826", "0.6014716", "0.6014188", "0.60038084", "0.6003132", "0.6002265", "0.5999163", "0.599325", "0.59796304", "0.59775704", "0.5969859", "0.5949647", "0.5941991", "0.5937135", "0.5928642", "0.59237224", "0.5914886" ]
0.6646284
25
if(degree.getDouble() < 0) return new Degree360(360 degree.getDouble()); else
public static Degree360 valueOf(Degree180 degree){ return new Degree360(degree.getDouble()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Degree createDegree();", "int getDegree();", "int getDegree();", "public Degree() {\n\t\tsuper();\n\t}", "public int getDegree(){\n return degree;\n }", "public Degree360 add(Degree360 degree){\n\t\treturn Degree360.valueOf(this.getDouble() + degree.getDouble());\r\n\t}", "@Override\n\t\tpublic int getDegree() {\n\t\t\treturn 0;\n\t\t}", "public int getDegreesOfFreedom() {return nu;}", "public double getDegree() {\n return degree;\n }", "@Override\n\t\tpublic int getDegree(Direction direction) {\n\t\t\treturn 0;\n\t\t}", "EDataType getAngleDegrees();", "public int getDegree()\r\n\t{\r\n\t\treturn degree;\r\n\t}", "private double AdjustDegree(double value)\n\t{\n\t\tif(value > 360.0)\n\t\t{\n\t\t\twhile (value > 360.0)\n\t\t\t{\n\t\t\t\tvalue -= 360.0;\n\t\t\t}\n\t\t}\n\t\tif(value < 0.0)\n\t\t{\n\t\t\twhile (value < 0.0)\n\t\t\t{\n\t\t\t\tvalue += 360.0;\n\t\t\t}\n\t\t}\n\t\treturn value;\n\t}", "public int updateDegree(){\r\n \r\n \tthis.degree = this.degree + this.rotSpeed;\r\n \tif (this.degree > 359) this.degree = 0;\r\n \t\r\n return this.degree;\r\n }", "public int getDegree(int v);", "private void setDegreeNum(double deg) {\r\n degreeNum = deg % 360.0;\r\n }", "public int getDegree() {\n return degree_;\n }", "int getStartRotationDegree();", "public double getDegreeNum() {\r\n return degreeNum;\r\n }", "public int getDegree() {\n\t\treturn degree;\n\t}", "public int getDegree() {\r\n\t\treturn this.degree;\r\n\t}", "abstract int degree(int i);", "int getEndRotationDegree();", "public int getDegree() {\n return degree_;\n }", "int getIndegree() {\n return indegree;\n }", "private static double radToDeg(float rad)\r\n/* 30: */ {\r\n/* 31:39 */ return rad * 180.0F / 3.141592653589793D;\r\n/* 32: */ }", "Angle createAngle();", "public int getDegree() {\n\t\t\t\treturn degree;\n\t\t\t}", "public static double to_360(double deg) {\n return modulo(deg,360);\n }", "public void setDegree(int degree);", "public int getDegrees() {\n\t\treturn (int) (value * (180.0d / Math.PI));\n\t}", "public static double reduce360Degrees(double degrees){\n return degrees % 360;\n }", "double getAngle();", "double getAngle();", "private static double degToRad(float deg)\r\n/* 25: */ {\r\n/* 26:32 */ return deg * 3.141592653589793D / 180.0D;\r\n/* 27: */ }", "public double getGyroInDeg(){\n return 0.0;//TODO:Pull gyro in radians and convert to degrees\n }", "public int degree(Position vp) throws InvalidPositionException;", "public double getAngle();", "public int inDegrees()\n {\n return dirInDegrees;\n }", "public int outDegree(Position vp) throws InvalidPositionException;", "public Unit<Angle> microradian() {return microradian;}", "int getRotationDegrees() {\n return rotationDegrees;\n }", "public double calculateDegToRetreat() {\r\n\t\tdouble newDeg = (degToAttack + 180) % 360;\r\n\t\tSystem.out.println(newDeg);\r\n\t\treturn newDeg;\r\n\t}", "public Position(double degrees, GeoOrientation o){\n this.degrees = degrees;\n orientation = o;\n }", "int getDegree(V v);", "public static double degreeToRadians(double num) { return (num*0.0174533); }", "public int getIndegree()\n\t{\n\t\treturn indegree ; \n\t}", "public int getDegree () {\n int size = myCoefficients.size();\n if (size <= 0) {\n return -1;\n }\n else {\n return size - 1;\n }\n }", "public double degrees() {\n return this.degrees;\n }", "public double getAngle () {\n return super.getAngle() % 360D;\n }", "public static AngularVelocity newDegreePerSecondValue()\n\t{\n\t\treturn new AngularVelocity(0.0, AngularVelocityUnit.DEGREES_PER_SEC);\n\t}", "public double findAngle() {\n return 0d;\n }", "private static double convertBearingTo360(double dBearing){\n\t\t\n\t\t//dOut = output\n\t\t\n\t\tdouble dOut;\n\t\t\n\t\tdOut = dBearing;\n\t\t\n\t\twhile(dOut>360){\n\t\t\tdOut=dOut-360.;\n\t\t}\n\t\twhile(dOut<0){\n\t\t\tdOut=dOut+360.;\n\t\t}\n\t\t\n\t\treturn dOut;\n\t}", "private static int convertDegreesToPolar(int degrees) {\n switch (degrees) {\n case -90:\n return 270;\n case -60:\n return 300;\n case -30:\n return 330;\n default:\n return degrees;\n }\n }", "float getD();", "public double getRADegrees() { return raDegrees; }", "AngleSmaller createAngleSmaller();", "public double getAngle() { return angle; }", "public Direction(int degrees)\n {\n dirInDegrees = degrees % FULL_CIRCLE;\n if ( dirInDegrees < 0 )\n dirInDegrees += FULL_CIRCLE;\n }", "public static double toRadians(double degree) {\n\t\treturn (degree * 3.14159) / 180;\r\n\t\t\r\n\t}", "public static float rad2deg(float rad) {return rad/D2R;}", "public static double findRadiun(int degree) {\r\n\t\treturn Math.toRadians(degree);\r\n\t}", "abstract double getOrgZ();", "public void setDegree(int value) {\n\t\t\t\tthis.degree = value;\n\t\t\t}", "public int getInDegree() {\n\t\treturn inDegree;\n\t}", "public double getRadians() {\r\n return degreeNum * (Math.PI / 180.0);\r\n }", "private double rad2deg(double rad) {\n return (rad * 180 / Math.PI);\n }", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\tdegree = Math.round(event.values[0]);\n\t}", "double getDegreesCoolingPerMBPerK();", "int getSensorRotationDegrees();", "@Test\n\tvoid toRadiansConversionTestWithDegreeInput() throws CustomException {\n\t\tdouble input = 180;\n\t\tdouble actual = 3.141592653589793;\n\t\tdouble result = TrigLib.sine(input);\n\t\tassertNotEquals(result, actual, \"Output is not as expected as input is not converted to radians\");\n\t}", "private double rad2deg(double rad) {\r\n return (rad * 180.0 / Math.PI);\r\n }", "public float getDCD();", "int getMaxRotation();", "double getCalibratedLevelAngle();", "protected void setDegreesOfFreedom(int degrees) {\n\tnu = degrees;\n }", "public Polynomial() {\n degree = 0;\n }", "protected static float toDegrees(int unit, float value) {\n \t\tswitch (unit) {\n \t\tcase CSSPrimitiveValue.CSS_DEG:\n \t\t\treturn value;\n \t\tcase CSSPrimitiveValue.CSS_RAD:\n \t\t\treturn (float) (value * 180 / Math.PI);\n \t\tcase CSSPrimitiveValue.CSS_GRAD:\n \t\t\treturn (value * 9 / 5);\n \t\tdefault:\n \t\t\tthrow new DOMException(DOMException.INVALID_ACCESS_ERR, \"\");\n \t\t}\n \t}", "public double getRotation();", "public int getDegree() {return getParametersArray().length - 1;}", "public double getStartAngle();", "public Degree getDegreeProgram()\n {\n return this.degree;\n }", "public static double to_180(double deg) {\n double d = to_360(deg);\n if (d > 180) {\n return d-360.0;\n } else {\n return d;\n }\n }", "public boolean isDegreeRequired ()\r\n {\r\n return degreeRequired;\r\n }", "public double getLoZ() {\r\n\treturn fieldLoZ;\r\n}", "@Test\n\tvoid toDegreesConversionTestWithRadianInput() throws CustomException {\n\t\tdouble input = 3.141592653589793;\n\t\tdouble actual = 180.0;\n\t\tdouble result = TrigLib.toDegrees(input);\n\t\tassertEquals(result, actual, \"Radian input converted into degree\");\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 }", "private static double m29994c(double d, double d2) {\n return ((d - d2) + 360.0d) % 360.0d;\n }", "public static AngularVelocity newDegreePerSecondValue(Double new_val)\n\t{\n\t\treturn new AngularVelocity(new_val, AngularVelocityUnit.DEGREES_PER_SEC);\n\t}", "@VisibleForTesting\n static double to180Degrees(double longitude) {\n if (longitude > 180) {\n return longitude - 360;\n } else if (longitude < -180) {\n return longitude + 360;\n }\n return longitude;\n }", "public float getDCM();", "private double rad2deg(double rad) {\r\n return (rad * 180.0 / Math.PI);\r\n }", "@Override\n\t\tpublic int getDegree(RelationshipType type, Direction direction) {\n\t\t\treturn 0;\n\t\t}", "double getAngle(int id);", "public static double toDegrees(double radian1) {\n\t\treturn (radian1 * 180) / 3.14159;\r\n\t\t\r\n\t}", "private double rad2deg(double rad) {\r\n\t\t\treturn (rad * 180 / Math.PI);\r\n\t\t}", "private double rad2deg(double rad) {\n return (rad * 180.0 / Math.PI);\n }", "private double rad2deg(double rad) {\n return (rad * 180.0 / Math.PI);\n }", "public int getDegree() {\n return coefs.length - 1;\n }", "public double getRot() {\n return this.rot;\n }" ]
[ "0.7006046", "0.67975336", "0.67975336", "0.6769296", "0.676544", "0.6664922", "0.6586692", "0.6529428", "0.639381", "0.63808656", "0.6378441", "0.63447535", "0.6337498", "0.62192184", "0.61920416", "0.6188948", "0.61570364", "0.61465657", "0.6110417", "0.60627794", "0.6060928", "0.60482866", "0.60267264", "0.60036093", "0.5955563", "0.59513104", "0.59322953", "0.5924953", "0.59202653", "0.5906981", "0.58531046", "0.58368313", "0.58346736", "0.58346736", "0.5826731", "0.5812468", "0.573857", "0.5716427", "0.56908286", "0.5678745", "0.56729245", "0.5669174", "0.5661987", "0.5660933", "0.5654659", "0.564351", "0.5630982", "0.5627984", "0.5611077", "0.56063163", "0.56028366", "0.56024456", "0.5593123", "0.55897945", "0.5558057", "0.5556587", "0.5552905", "0.55516356", "0.55391717", "0.55388105", "0.55305856", "0.5521008", "0.55142486", "0.55137163", "0.55127585", "0.5507121", "0.55053234", "0.5505279", "0.55028653", "0.55000484", "0.5486994", "0.5472849", "0.5471705", "0.547133", "0.54604506", "0.5459383", "0.5458662", "0.5455427", "0.54366153", "0.5435806", "0.54283553", "0.5426817", "0.54232275", "0.54223806", "0.5420568", "0.5412668", "0.5411315", "0.54102033", "0.539629", "0.5394146", "0.5391556", "0.5389331", "0.53856933", "0.5382671", "0.536973", "0.5368291", "0.53663534", "0.53663534", "0.53661025", "0.535935" ]
0.7702678
0
return Degree360.valueOf((this.getDouble() + degree.getDouble()) % 360);
public Degree360 add(Degree360 degree){ return Degree360.valueOf(this.getDouble() + degree.getDouble()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double to_360(double deg) {\n return modulo(deg,360);\n }", "public static double reduce360Degrees(double degrees){\n return degrees % 360;\n }", "public double getAngle () {\n return super.getAngle() % 360D;\n }", "public static Degree360 valueOf(Degree180 degree){\n\t\t\treturn new Degree360(degree.getDouble());\r\n\t}", "private double AdjustDegree(double value)\n\t{\n\t\tif(value > 360.0)\n\t\t{\n\t\t\twhile (value > 360.0)\n\t\t\t{\n\t\t\t\tvalue -= 360.0;\n\t\t\t}\n\t\t}\n\t\tif(value < 0.0)\n\t\t{\n\t\t\twhile (value < 0.0)\n\t\t\t{\n\t\t\t\tvalue += 360.0;\n\t\t\t}\n\t\t}\n\t\treturn value;\n\t}", "public int updateDegree(){\r\n \r\n \tthis.degree = this.degree + this.rotSpeed;\r\n \tif (this.degree > 359) this.degree = 0;\r\n \t\r\n return this.degree;\r\n }", "EDataType getAngleDegrees();", "private void setDegreeNum(double deg) {\r\n degreeNum = deg % 360.0;\r\n }", "int getDegree();", "int getDegree();", "public int getDegree(){\n return degree;\n }", "int getEndRotationDegree();", "public double calculateDegToRetreat() {\r\n\t\tdouble newDeg = (degToAttack + 180) % 360;\r\n\t\tSystem.out.println(newDeg);\r\n\t\treturn newDeg;\r\n\t}", "abstract int degree(int i);", "private static double radToDeg(float rad)\r\n/* 30: */ {\r\n/* 31:39 */ return rad * 180.0F / 3.141592653589793D;\r\n/* 32: */ }", "public int getDegrees() {\n\t\treturn (int) (value * (180.0d / Math.PI));\n\t}", "double getAngle();", "double getAngle();", "private static double degToRad(float deg)\r\n/* 25: */ {\r\n/* 26:32 */ return deg * 3.141592653589793D / 180.0D;\r\n/* 27: */ }", "int getStartRotationDegree();", "private static double convertBearingTo360(double dBearing){\n\t\t\n\t\t//dOut = output\n\t\t\n\t\tdouble dOut;\n\t\t\n\t\tdOut = dBearing;\n\t\t\n\t\twhile(dOut>360){\n\t\t\tdOut=dOut-360.;\n\t\t}\n\t\twhile(dOut<0){\n\t\t\tdOut=dOut+360.;\n\t\t}\n\t\t\n\t\treturn dOut;\n\t}", "public double getAngle();", "public int getDegree(int v);", "public double getDegree() {\n return degree;\n }", "public int inDegrees()\n {\n return dirInDegrees;\n }", "public int getDegree()\r\n\t{\r\n\t\treturn degree;\r\n\t}", "public static double getOrientDel(double currentOrient, double nextOrient){\n\t return (currentOrient + 180 - nextOrient) % 360 - 180;\n\t}", "public static double degreeToRadians(double num) { return (num*0.0174533); }", "public double nextAngle()\n {\n return nextAngle();\n }", "float calcRotate(float rotateDeg, float anglePerIn)\n {\n return rotateDeg / anglePerIn;\n }", "public static float rad2deg(float rad) {return rad/D2R;}", "public double getMyAngle() {\n return myAngle- STARTING_ANGLE;\n }", "public int getDegreesOfFreedom() {return nu;}", "private static double rad(double deg) {\n return deg*Math.PI/180;\n }", "int getRotationDegrees() {\n return rotationDegrees;\n }", "private static double m29994c(double d, double d2) {\n return ((d - d2) + 360.0d) % 360.0d;\n }", "@Override\n\t\tpublic int getDegree(Direction direction) {\n\t\t\treturn 0;\n\t\t}", "private double rad2deg(double rad) {\r\n return (rad * 180.0 / Math.PI);\r\n }", "public double getAngle() {\n\t\treturn 180 * (this.N - 2) / this.N;\n\t}", "public double turn (double degrees) {\n setHeading(getHeading() + degrees);\n return Math.abs(degrees);\n }", "private static double m29995d(double d, double d2) {\n return ((d2 - d) + 360.0d) % 360.0d;\n }", "private double rad2deg(double rad) {\n return (rad * 180 / Math.PI);\n }", "public double getRadians() {\r\n return degreeNum * (Math.PI / 180.0);\r\n }", "public double getAngle() { return angle; }", "private static double rotate(double bearing, double degrees) {\n double newBearing = bearing + degrees;\n if (newBearing >= 360) {\n newBearing -= 360;\n }\n return newBearing;\n }", "public static double findRadiun(int degree) {\r\n\t\treturn Math.toRadians(degree);\r\n\t}", "public int getDegree() {\n return degree_;\n }", "public double getAngle()\n {\n return (AngleAverage);\n }", "private double deg2rad(double deg) {\r\n\t\t\treturn (deg * Math.PI / 180.0);\r\n\t\t}", "int getIndegree() {\n return indegree;\n }", "public static double toRadians(double degree) {\n\t\treturn (degree * 3.14159) / 180;\r\n\t\t\r\n\t}", "public int getDegree() {\n\t\treturn degree;\n\t}", "public double degrees() {\n return this.degrees;\n }", "private double rad2deg(double rad) {\r\n return (rad * 180.0 / Math.PI);\r\n }", "private double deg2rad(double deg) {\r\n return (deg * Math.PI / 180.0);\r\n }", "private double rad2deg(double rad) {\n return (rad * 180.0 / Math.PI);\n }", "private double rad2deg(double rad) {\n return (rad * 180.0 / Math.PI);\n }", "public double radToDeg(double rads)\r\n\t{\r\n\t\treturn (rads * 180)/Math.PI;\r\n\t\t\r\n\t}", "private double rad2deg(double rad) {\r\n\t\t\treturn (rad * 180 / Math.PI);\r\n\t\t}", "int getSensorRotationDegrees();", "public static float map180to360(float angle) {\n return (angle + 360) % 360;\n }", "private double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }", "public double getRADegrees() { return raDegrees; }", "public static double reduce180Degrees(double degrees){\n //multiplies the reduced angle by the sign of the original since the mod operator is always positive.\n return (degrees % 180) * Math.signum(degrees);\n }", "public double findAngle() {\n return 0d;\n }", "public static float deg2rad(float deg) {return deg*D2R;}", "public double radians() {\n return Math.toRadians(this.degrees);\n }", "public int getAngle() {\r\n return angle;\r\n }", "private static double rad2deg(double rad) {\n return (rad * 180 / Math.PI);\n }", "private static double rad2deg(double rad) {\n return (rad * 180 / Math.PI);\n }", "private static double rad2deg(double rad) {\n return (rad * 180 / Math.PI);\n }", "public double getDegreeNum() {\r\n return degreeNum;\r\n }", "public double getStartAngle();", "private double rad2deg(double rad) {\n\t\treturn (rad * 180.0 / Math.PI);\n\t}", "double getAngle(int id);", "private double deg2rad(double deg) {\r\n return (deg * Math.PI / 180.0);\r\n }", "private static double rad2deg(double rad) {\r\n\t\treturn (rad * 180.0 / Math.PI);\r\n\t}", "public int getDegree() {\r\n\t\treturn this.degree;\r\n\t}", "public static double to_180(double deg) {\n double d = to_360(deg);\n if (d > 180) {\n return d-360.0;\n } else {\n return d;\n }\n }", "private double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }", "private double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }", "float getDir() {\n return degrees(_rotVector.heading());\n }", "public int getDegree() {\n return degree_;\n }", "public static double convertFromDegrees(double degreeMeasure, double countsPerRevolution) {\n return (countsPerRevolution / 360) * degreeMeasure;\n }", "@Override\n public int calculerPerimetre() {\n return (int)(rayon * 2 * Math.PI);\n }", "@Override\n\t\tpublic int getDegree() {\n\t\t\treturn 0;\n\t\t}", "public double getRot() {\n return this.rot;\n }", "protected void calculateTotalDegrees() {\r\n\t\tmTotalCircleDegrees = (360f - (mStartAngle - mEndAngle)) % 360f; // Length of the entire circle/arc\r\n\t\tif (mTotalCircleDegrees <= 0f) {\r\n\t\t\tmTotalCircleDegrees = 360f;\r\n\t\t}\r\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 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}", "private static double rad2deg(double rad) {\n return (rad * 180.0 / Math.PI);\n }", "public double evaluate(Map<String, Double> assignment) throws Exception {\n if (super.getExpression().evaluate(assignment) % 180 == 90) {\n return 0;\n }\n if (super.getExpression().evaluate(assignment) % 360 == 180) {\n return -1;\n }\n if (super.getExpression().evaluate(assignment) % 360 == 0) {\n return 1;\n }\n return Math.cos(Math.toRadians(super.getExpression().evaluate(assignment)));\n }", "public int getAngle(){\n\t\treturn (int)angle;\n\t}", "private static double rad2deg(double rad) {\n\t\treturn (rad * 180 / Math.PI);\n\t}", "private static double rad2deg(double rad) {\n\t\treturn (rad * 180.0 / Math.PI);\n\t}", "private static double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }", "public int getDegree() {\n\t\t\t\treturn degree;\n\t\t\t}", "private static double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }", "private static double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }", "private static double deg2rad(double deg) {\n return (deg * Math.PI / 180.0);\n }" ]
[ "0.71829695", "0.71532595", "0.7017412", "0.70138544", "0.69284004", "0.6866275", "0.67877364", "0.67743933", "0.6648926", "0.6648926", "0.6646616", "0.66453", "0.6618342", "0.6617692", "0.65920645", "0.6534255", "0.64937687", "0.64937687", "0.64663684", "0.6461472", "0.6423833", "0.63773346", "0.63342416", "0.630679", "0.62967926", "0.6270252", "0.6235604", "0.6231133", "0.6207974", "0.6194173", "0.6189842", "0.618118", "0.6173757", "0.6153765", "0.6146721", "0.6134453", "0.6128381", "0.6110968", "0.6108354", "0.6107138", "0.6105758", "0.6102971", "0.60746956", "0.6070384", "0.60698134", "0.60565627", "0.6029373", "0.6029261", "0.60204965", "0.601984", "0.6018141", "0.6016431", "0.601132", "0.6010428", "0.6008503", "0.59976524", "0.59976524", "0.59890294", "0.5984718", "0.5984402", "0.5978096", "0.59696406", "0.5965426", "0.59633577", "0.5960996", "0.5959309", "0.5957401", "0.59544784", "0.5936311", "0.5936311", "0.5936311", "0.5935634", "0.5934135", "0.59291404", "0.5912935", "0.5908224", "0.59003794", "0.58966804", "0.5883462", "0.5878704", "0.5878704", "0.5874672", "0.58727586", "0.5869548", "0.5866994", "0.5866462", "0.58663106", "0.58621204", "0.5860757", "0.5851982", "0.58481455", "0.5847207", "0.58445", "0.58403647", "0.5826766", "0.5819621", "0.58164936", "0.58116966", "0.58116966", "0.58116966" ]
0.7429665
0
This methods only purpose is to give the programmer more comfortability in generating a System.out.println(Object), which in addition has the classpath and name prepended. .toString() is called on all objects also.
private void out(Object obj) { System.out.println(deb + obj.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void println() { System.out.println( toString() ); }", "public void print(){\r\n System.out.println(toString());\r\n }", "public void print() {\r\n\t\t System.out.println(toString());\r\n\t }", "public void println(Object obj) {\n println(obj.toString());\n }", "public void print(Object obj) {\n print(obj.toString());\n }", "public void print() {\n System.out.println(toString());\n }", "public static void println(Object object) {\n\t\tGeneral.println(object);\n\t}", "public void print(Object o) {\n\t\tSystem.out.println(o);\n\t}", "public static void print(Object o) {\r\n System.out.println(o);\r\n }", "public void print(Object someObj) {\r\n this.print(someObj.toString());\r\n }", "public void print() {\n\t\tSystem.out.println(toString());\n\t}", "public String print();", "static void print (){\n \t\tSystem.out.println();\r\n \t}", "public void method_misc_1(Object obj)\r\n\t{\n\t\t\r\n\t\tSystem.out.println(obj.toString());\r\n\t}", "public static void print(Object o)\n\t{\n\t\tif(m_debugFlag) {\n\t\t\tSystem.out.print(o.toString());\n\t\t}\n\t}", "@VisibleForTesting\n void print();", "public static void print(Object s) {\n\t\tStdOut.println(s);\n\t}", "@Override\n\tprotected void print() {\n\t\tSystem.out.println(\"-----------\"+this.getName()+\"\");\n\t}", "static void pr(Object anyObject){\n\t\tSystem.out.println(anyObject);\n\t\t\n\t}", "public static void print() {\r\n System.out.println();\r\n }", "public void dump()\n {\n System.out.println(toString());\n }", "static void print (Object output){\r\n \t\tSystem.out.println(output);\r\n \t}", "public void printString() {\n\t\tSystem.out.println(name);\n\t\t\n\t\t\n\t}", "public static void println(Object o)\n\t{\n\t\tif(m_debugFlag) {\n\t\t\tSystem.out.println(o.toString());\n\t\t}\n\t}", "public void print() {\n System.out.println(this.toString());\n }", "public String toString(Object o) { return Objects.toString(o,null); }", "private static String asVerboseString(Object obj) {\n String name = obj.getClass().getSimpleName();\n String toString = String.valueOf(obj);\n if (toString.startsWith(name)) {\n return toString;\n } else {\n return String.format(\"%s:%s\", name, toString);\n }\n }", "public void println();", "public static String toString(Object obj)\n {\n return obj.getClass().getName() + \"@\" + Integer.toHexString(obj.hashCode()); //$NON-NLS-1$\n }", "public static String dump(Object object) {\n return dump(object, null, 0);\n }", "@Override\n\t\tpublic void print() {\n\n\t\t}", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "public String toString() {\n return (isRelative() ? \"\" : \"(not relative)\") + getName() + \": \" +\n getClassName();\n }", "public static void printClassPath() {\n ClassLoader cl = ClassLoader.getSystemClassLoader();\n URL[] urls = ((URLClassLoader) cl).getURLs();\n System.out.println(\"classpath BEGIN\");\n for (URL url : urls) {\n System.out.println(url.getFile());\n }\n System.out.println(\"classpath END\");\n System.out.flush();\n }", "public String print(){\n\t\treturn this.sonsPaths_.toString();\n\t}", "@Override\n public String toString() {\n ByteArrayOutputStream bs = new ByteArrayOutputStream();\n PrintStream out = new PrintStream(bs);\n output(out, \"\");\n return bs.toString();\n }", "public String toString() {\n\n\t\treturn Utilities.cutHeadAtLast(this.getClass().getName(), '.');\n\t}", "public void println()\n\t{\n\t\tSystem.out.println();\n\t}", "public String toString()\r\n/* 67: */ {\r\n/* 68:253 */ return getClass().getName();\r\n/* 69: */ }", "@Override//overring a library function\n public String toString() {\n return shape + \" \" + name;//toString() is called everytime printing is done\n }", "private static void println(Object... obj) {\r\n\t\tif (obj.length == 0) {\r\n\t\t\tSystem.out.println();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(obj[0]);\r\n\t\t}\r\n\t}", "public synchronized String print() {\r\n return super.print();\r\n }", "public static void print(Pointer object) {\n\t\tString str = object.display(); // put result of display method to str\r\n\t\tif(object instanceof CapitalPrint) // if the object is instance of CapitalPrint class\r\n\t\t\tstr = str.toUpperCase(); // str change the UpperCase\r\n\t\tSystem.out.println(str); // print out str\r\n\t\t\r\n\t}", "public String toString() {\n Class<? extends AST> tclass = this.getClass();\n // isolate relative name (starting after the rightmost '.')\n String absoluteClassName = tclass.toString();\n int dotIndex = absoluteClassName.lastIndexOf(\".\", absoluteClassName.length());\n String relativeClassName = absoluteClassName.substring(dotIndex+1);\n // retrieving fields (note that, unfortunately, they are not ordered)\n // TO DO : get rid of static fields (pb in case of singletons)\n Field[] fields = tclass.getDeclaredFields();\n // building string representation of the arguments of the nodes\n int arity = fields.length;\n String args = \"\";\n for(int index = 0; index < arity; index++) {\n String arg;\n try {\n arg = fields[index].get(this).toString(); // retrieve string representation of all arguments\n } catch (Exception e) {\n arg = \"?\"; // IllegalArgument or IllegalAccess Exception (this shouldn't happen)\n }\n if (index != 0) // a separator is required before each argument except the first\n args = args + \", \" + arg;\n//\t\t\t\targs = args + \" \" + arg;\n else\n args = args + arg;\n }\n return relativeClassName + \"(\" + args + \")\";\n//\t\treturn \"<\" + relativeClassName + \">\" + args + \"</\" + relativeClassName + \">\";\n }", "public void print()\r\n\t{\r\n\t\tSystem.out.println(\"Method name: \" + name);\r\n\t\tSystem.out.println(\"Return type: \" + returnType);\r\n\t\tSystem.out.println(\"Modifiers: \" + modifiers);\r\n\r\n\t\tif(exceptions != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Exceptions: \" + exceptions[0]);\r\n\t\t\tfor(int i = 1; i < exceptions.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\", \" + exceptions[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exceptions: none\");\r\n\t\t}\r\n\r\n\t\tif(parameters != null)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Parameters: \" + parameters[0]);\r\n\t\t\tfor(int i = 1; i < parameters.length; i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\", \" + parameters[i]);\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Parameters: none\");\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t}", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "public void dump ()\n {\n StringBuilder b = new StringBuilder ();\n dump (b, 0);\n System.out.print (b);\n }", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "public String print() {\n return print(new StringBuffer()).toString();\n }", "public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }", "void printObjectMethods(PrintWriter out) {\n\n\t\t// Print Object class constructor\n\t\tout.println(\"define %class.Object* @_ZN6ObjectC2EV( %class.Object* %self ) noreturn {\\n\"\n\t\t\t+ \"entry:\\n\"\n\t\t\t+ \"\\t%self.addr = alloca %class.Object*\\n\"\n\t\t\t+ \"\\tstore %class.Object* %self, %class.Object** %self.addr\\n\"\n\t\t\t+ \"\\t%self1 = load %class.Object*, %class.Object** %self.addr\\n\"\n\t\t\t+ \"\\tret %class.Object* %self1\\n\"\n\t\t\t+\"}\\n\");\n\n\t\tout.println(\"define %class.Object* @_ZN6Object5abort( %class.Object* %self ) noreturn {\\n\"\n\t\t\t+ \"entry:\\n\"\n\t\t\t+ \"\\tcall void @exit( i32 1 )\\n\"\n\t\t\t+ \"\\tret %class.Object* null\\n\"\n\t\t\t+ \"}\\n\");\n\t}", "@Override\r\n\tpublic void print() {\n\t}", "@Test\n public void printToString() {\n System.out.println(ModuleInfo.getFromModuleCode(\"CFG1010\").get());\n\n // Test module with preclusions\n System.out.println(ModuleInfo.getFromModuleCode(\"GER1000\").get());\n\n // Test module with prerequisites\n System.out.println(ModuleInfo.getFromModuleCode(\"CS2040\").get());\n }", "public void print();", "public void print();", "public void print();", "public void print();", "@Override\n\tpublic void print() {\n\t\t\n\t}", "public void print() {\n\t\tSystem.out.println(\\u000a);\n\t\tSystem.out.println(this.getClass().getName());\n\t\tClassB classB = new ClassB();\n\t\tclassB.print();\n\t}", "public String getDumpString() {\n return \"[clazz = \" + clazz + \" , name = \" + name + \" , elementType = \" + elementType + \" , primitivePointerType = \" + primitivePointerType + \"]\";\n }", "private static void dbg(Object... objects) {\n\t\tSystem.out.println(Arrays.deepToString(objects));\r\n\t}", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "@Override\n\tpublic void print() {\n\n\t}", "public void toStrings() {\n String output = \"\";\n output += \"Gen Price: $\" + genPrice + \"0\"+ \"\\n\";\n output += \"Bronze Price: $\" + bronzePrice +\"0\"+ \"\\n\";\n output += \"Silver Price: $\" + silverPrice +\"0\"+ \"\\n\";\n output += \"Gold Price: $\" + goldPrice +\"0\"+ \"\\n\";\n output += \"Vip Price: $\" + vipPrice +\"0\"+ \"\\n\";\n System.out.println(output);\n }", "void printToConsole() {\n\t\tSystem.out.println(\"PROVIDER DIRECTORY:\");\n\t\tfor (int i = 0; i < services.size(); i++) {\n\t\t\tString service = services.get(i).getServiceName() + \" (\" + services.get(i).getServiceNumber() + \") for $\" + services.get(i).getServiceFee();\n\t\t\tSystem.out.println(\"\\t\" + service);\n\t\t}\n\t}", "public static void println(String toPrint)\n {\n System.out.println(toPrint);\n }", "public String toString() ;", "public String toString(){\r\n\t\tString superString = super.toString();\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\t//Add the object to the string\r\n\t\tbuilder.append(\". \");\r\n\t\tif (this.error != null) {\r\n\t\t\tbuilder.append(error.toString());\r\n\t\t\tbuilder.append(\". \");\r\n\t\t}\r\n\t\tbuilder.append(\"Object: \");\r\n\t\tbuilder.append(object.toString());\r\n\t\tif (this.recordRoute)\r\n\t\t\tbuilder.append(\", [RECORD_ROUTE]\");\r\n\t\tif (this.reRouting) \r\n\t\t\tbuilder.append(\", [RE-ROUTING]\");\r\n\t\t//Add the masks to the string\r\n\t\tif (this.mask != null) {\r\n\t\t\tbuilder.append(\", label set: \");\r\n\t\t\tbuilder.append(mask.toString());\r\n\t\t}\r\n\t\treturn superString.concat(builder.toString());\r\n\t}", "public void printAllComponentsOnStdOut() {\r\n System.out.println(\"PackageComponent: \" + this.getName());\r\n System.out.println(\"Contains these ClassDiagramComponents: \");\r\n int counter = 1;\r\n for (ComponentBase component : classDiagramComponents) {\r\n System.out.println(\"Component no.\" + counter + \": \\t\" + component.getName());\r\n counter++;\r\n }\r\n }", "public static void printnb(Object o) {\r\n System.out.print(o);\r\n }", "@Override\n\t\t\tpublic void print(String str) {\n\t\t\t\tSystem.out.println(str);\n\t\t\t}" ]
[ "0.75131625", "0.7065727", "0.70617545", "0.6994059", "0.6963039", "0.6784537", "0.67630094", "0.67056894", "0.6702777", "0.66586024", "0.66498566", "0.6595667", "0.65912026", "0.6585759", "0.6558367", "0.6554494", "0.6553922", "0.65100086", "0.6476204", "0.6471845", "0.6461767", "0.6453833", "0.6434922", "0.643326", "0.64270264", "0.64012545", "0.63810027", "0.6359087", "0.6338659", "0.6337395", "0.6335197", "0.6334962", "0.63197756", "0.63179046", "0.630063", "0.6289797", "0.6285416", "0.62623125", "0.6259057", "0.62410176", "0.62397987", "0.6231557", "0.62180144", "0.621716", "0.61907995", "0.61811054", "0.61811054", "0.61811054", "0.61811054", "0.61811054", "0.61811054", "0.61811054", "0.61811054", "0.61811054", "0.617531", "0.61719376", "0.61633503", "0.61571664", "0.6148895", "0.61448175", "0.61435443", "0.61435443", "0.61435443", "0.61435443", "0.61412877", "0.612357", "0.61145747", "0.6114199", "0.61082244", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.60954195", "0.6088804", "0.6073908", "0.6070343", "0.606989", "0.60697746", "0.60624826", "0.60621476", "0.60530466", "0.6051891" ]
0.6635379
11
Created by mala on 17/1/17.
public interface RecyclerViewClickListener { public void onRecyclerViewItemClick(View v, int position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n public void init() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "private void init() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void init() {}", "@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 public void init() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\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 debite() {\n\t\t\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void method_4270() {}", "private void strin() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "public void mo6081a() {\n }", "public void mo21877s() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public void mo12628c() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public void m23075a() {\n }" ]
[ "0.60117203", "0.5841281", "0.5810327", "0.57574356", "0.57298005", "0.57298005", "0.57116884", "0.57076466", "0.57046914", "0.56711185", "0.5669878", "0.5653835", "0.56460893", "0.5639015", "0.5626781", "0.56201935", "0.5609706", "0.56075287", "0.5601411", "0.5557262", "0.55543417", "0.55543417", "0.55543417", "0.55543417", "0.55543417", "0.5549353", "0.5546333", "0.5532605", "0.5528872", "0.5527105", "0.5515238", "0.5513141", "0.5511732", "0.55027217", "0.5489341", "0.54776037", "0.54725856", "0.54503274", "0.54459596", "0.54459596", "0.54451627", "0.5442735", "0.5441684", "0.5426371", "0.5407856", "0.54069626", "0.54069626", "0.54069626", "0.5403595", "0.5402092", "0.5400148", "0.5399399", "0.5398539", "0.5398539", "0.5398539", "0.5396381", "0.5396381", "0.5396381", "0.53846", "0.53827834", "0.53802824", "0.53802824", "0.5377672", "0.5371051", "0.5371051", "0.5370877", "0.5370877", "0.5370877", "0.5370877", "0.5370877", "0.5370877", "0.5365161", "0.5346756", "0.5343557", "0.53424174", "0.5340594", "0.53359723", "0.5333861", "0.53276134", "0.53276134", "0.53276134", "0.53276134", "0.53276134", "0.53276134", "0.53276134", "0.5325834", "0.531124", "0.53090274", "0.53034073", "0.52855986", "0.52767736", "0.52745056", "0.5268056", "0.52674544", "0.52614444", "0.5247859", "0.5246568", "0.5243241", "0.5227868", "0.5227856", "0.52239496" ]
0.0
-1
Inputs an integer and calls displayDigits() by passing the integer entered
public static void main(String[] args) { int number = 0; java.util.Scanner keyboard = new java.util.Scanner(System.in); do { System.out.print("Enter an integer between 1 and 99999: "); number = keyboard.nextInt(); if (number >= 1 && number <= 99999) displayDigits(number); else System.out.print("Try again. "); } while (!(number >= 1 && number <= 99999)); keyboard.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f_number_user(){\n Scanner keyboard=new Scanner(System.in);\r\n int digits;\r\n System.out.println(\"input the entire number \");\r\n digits=keyboard.nextInt();\r\n return digits;\r\n }", "public static void main(String[] args) {\n f_menu();\r\n int cifras=0,n=f_number_user(),n2;\r\n do {\r\n if (n==0){\r\n cifras=1;\r\n }else {\r\n n = n / 10;\r\n cifras++;\r\n }\r\n }while (n!=0);\r\n n2=10*n*cifras;\r\n System.out.println(\"the number is: \"+n2+\" the number have: \"+cifras+\"digits\");\r\n }", "private static void printDigit(int number) {\n\t\tswitch (number) {\n\t\tcase 10:\n\t\t\tSystem.out.println(\"ten\");\n\t\t\tbreak;\n\n\t\tcase 20:\n\t\t\tSystem.out.println(\"twenty\");\n\n\t\t\tbreak;\n\t\tcase 30:\n\t\t\tSystem.out.println(\"thirty\");\n\n\t\t\tbreak;\n\t\t}\n\t}", "public static void displayDigits(int numberToSplit)\n\t\t\t{\n\t\t\t\tint number = numberToSplit;\n\t\t\t\tString numberAsString = \"\";\n\t\t\t\tint integerPart;\n\t\t\t\tint remainderPart;\n\t\t\t\t\n\t\t\t\tSystem.out.printf(\"Number to split: %d%n\", numberToSplit);\n\t\t\t\t\t\t\t\t\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tintegerPart = calculateIntegerPart(number);\n\t\t\t\t\tremainderPart = calculateRemainderPart(number);\n\t\t\t\t\tnumberAsString = remainderPart + \" \" + numberAsString;\n\t\t\t\t\tnumber = integerPart;\t\n\t\t\t\t\t\n\t\t\t\t} while (number >= 10);\n\t\t\t\t\n\t\t\t\tif (integerPart != 0)\n\t\t\t\t\tnumberAsString = integerPart + \" \" + numberAsString;\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tSystem.out.printf(\"The number after splitting represented as a String: %s\", numberAsString);\t\t\t\t\n\t\t\t\tSystem.out.println();\t\t\n\t\t\t\t\n\t\t\t}", "public static void printInt1(int number) {\n\t\tchar digit = (char) (number % 10 + '0');\r\n\t\tnumber = number / 10;\r\n\t\tif (number != 0)\r\n\t\t\tprintInt1(number);\r\n\t\tSystem.out.print(\" \" + digit);\r\n\t}", "public String digit(String digit);", "public static void main(String[] args) {\n f_menu();\n int total_digits = 0;\n int numberUser = f_number_user();\n if (numberUser!=0) {\n while (numberUser != 0) {\n numberUser = numberUser / 10;\n total_digits++;\n }\n }else{total_digits=1;}\n System.out.println(\"The total digits of the number is :\"+total_digits);\n }", "static public String nf(int num, int digits) {\n\t\tif (formatInt==null) nfInitFormats();\n\t\tformatInt.setMinimumIntegerDigits(digits);\n\t\treturn formatInt.format(num);\n\t}", "public void setLine_number_display_digits(int line_number_display_digits) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeInt(__io__address + 40, line_number_display_digits);\n\t\t} else {\n\t\t\t__io__block.writeInt(__io__address + 40, line_number_display_digits);\n\t\t}\n\t}", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(String.format(\"%d\", number));\n }", "public void setNumDigits(int digits) {\r\n \r\n //Set Value\r\n numDigits = digits;\r\n \r\n }", "short digits();", "private void display(int number)\n {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "public static int getDigits(int i) {\n\t\tif (i < 10) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 1 + getDigits(i / 10);\n\t}", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n\n }", "@Test\n public void testDigits() {\n final String result = calc.type(\"1 + 2 - 3\")\n .press_equalBtn()\n .result();\n\n Assert.assertEquals(result, \"0\");\n }", "public void digitPressed(int n) {\r\n if (this.entered.length() < 4) {\r\n this.entered += Integer.toString(n);\r\n //If it is the first digit entered, start ticking.\r\n if (this.entered.length() == 1) {\r\n this.ticks = 0;\r\n this.ticking = true;\r\n }\r\n\r\n else if (this.entered.length() == 4) {\r\n this.ticking = false;\r\n }\r\n }\r\n\r\n //Update the display.\r\n this.lockGui.setDisplay(this.entered);\r\n }", "private void display(int number) {\r\n TextView quantity_txt = (TextView) findViewById(R.id.quantity_textview);\r\n quantity_txt.setText(\"\" + number);\r\n }", "private void display(int number) {\n TextView quantityTextView = (TextView)\n findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n\n }", "public static int f_number_user() {\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"Input the number\");\n int number = keyboard.nextInt();\n return number;\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.minute_text_view);\n quantityTextView.setText(\"\" + number);\n\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(\n R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "void insertDigit(int digit);", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int number = scanner.nextInt();\n int secondDigit = (number / 10) % 10;\n System.out.println(secondDigit);\n }", "private void display(int number){\n TextView quantTV = (TextView) findViewById(R.id.quant_tv);\n quantTV.setText(\"\"+ number);\n }", "public int getLine_number_display_digits() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt(__io__address + 40);\n\t\t} else {\n\t\t\treturn __io__block.readInt(__io__address + 40);\n\t\t}\n\t}", "public static int returnDigit(int number) { \n\t\t\t\tif (number < 9) \n\t\t\t\t\treturn number; \n\t\t\t\treturn number / 10 + number % 10; \n\t\t\t}", "private void collectDigits(int number, List<Integer> digits) {\n if (number / 10 > 0) {\n collectDigits(number / 10, digits);\n }\n digits.add(number % 10);\n }", "private void displayPrice(int number) {\n }", "public static void printInt( int n ) {\n print( new Integer( n ).toString() );\n }", "private void display(int number) {\n TextView quantityText = findViewById(R.id.textCups);\n quantityText.setText(\"\" + number);\n }", "protected String correctDigits(int start, int digits)\n\t{\n\t\tString end = Integer.toString(start);\n\t\twhile(end.length() < digits)\n\t\t{\n\t\t\tend = \"0\" + end;\n\t\t}\n\t\treturn end;\n\t}", "public static int getDigit(int number)\n\t{\n\t\tif(number < 10)\n\t\t{\n\t\t\tSystem.out.println(number);\n\t\t\treturn number;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//ones place\n\t\t\tint firstDigit = number % 10;\n\t\t\t//tens place\n\t\t\tint secondDigit = number / 10;\n\t\t\tSystem.out.println(\"first and second is\" + (firstDigit + secondDigit));\n\t\t\treturn firstDigit + secondDigit;\n\t\t}\n\t}", "public void daffodilNum(int digit) {\n int count = 0;\n for (int i = (int) Math.pow(10, digit-1); i < (int) Math.pow(10, digit); i++) {\n int sum = 0;\n for (int index = 0; index < digit; index++) {\n int curDigit = (i / ((index == 0) ? 1 : ((int) Math.pow(10, index)))) % 10;\n sum += Math.pow(curDigit, 3);\n }\n if (sum == i) {\n System.out.print(i);\n System.out.print(' ');\n count++;\n if (count == 2) {\n System.out.println();\n count = 0;\n }\n }\n }\n }", "public static int getDigit(int cnumber) {\n if (cnumber < 9)\n return cnumber;\n return cnumber / 10 + cnumber % 10;\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"ENTER A NUMBER BETWEEN 0 AND 1000: \");\n int number = input.nextInt();\n \n //Extracting digits from the integer \n int number1 = number % 10;\n int number2 = (number / 10) % 10;\n int number3 = number / 100;\n\n //Adding the extracted digits\n int sum = number1 + number2 + number3;\n\n System.out.print(\"The sum of the digits is \" + sum +\"!\");\n \n }", "public int addDigits(int num) {\n\tif(num<10)\n\t return num;\n\telse if(num%9 ==0)\n\t return 9;\n\telse\n\t return num%9; \n}", "private static void digitSum(int UI)\n\t{\n\t\tint Sum = 0;\n\t\tint ValHold;\n\t\t\n\t\twhile (UI > 0)\n\t\t{\n\t\t\tValHold = UI%10;\n\t\t\tSum = Sum+ValHold;\n\t\t\tUI = UI/10;\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"The sum of the digits is: \"+Sum);\n\t\tSystem.out.println();\n\t}", "private static void displayNumbers(){\n BigInteger bigInteger = new BigInteger(create50DigitString());\n int i = 1;\n do {\n // Checking the remainder's int value == 0 since the requirement is to find the number greater than Long.MAX_VALUE and divisible by 2 or 3.\n if (bigInteger.remainder(new BigInteger(\"2\")).intValue() == 0 || bigInteger.remainder(new BigInteger(\"3\")).intValue() == 0) {\n System.out.println(bigInteger);\n i++;\n }\n// Incrementing the bigInteger\n bigInteger = bigInteger.add(new BigInteger(\"1\"));\n// Exit condition\n } while (i != 11);\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int userNum = -1;\n while (userNum < 0) {\n System.out.print(\"Please enter a number >= 0: \");\n userNum = sc.nextInt();\n }\n\n // TODOd #2: declare and initialize an ArrayList of Integer called \"digitsList\"\n ArrayList<Integer> digitsList = new ArrayList<>();\n\n // TODOd #3: add the digits from the given number into \"digitsList\"\n if (userNum == 0)\n digitsList.add(0);\n else\n while (userNum > 0) {\n digitsList.add(userNum % 10);\n userNum = userNum / 10;\n }\n\n // TODOd #4: reverse \"digitsList\"\n Collections.reverse(digitsList);\n\n // TODOd #5: print \"digitsList\"\n System.out.println(digitsList);\n\n }", "public void ex() {\n Integer num1;\n\tInteger num2;\n Scanner sc = new Scanner(System.in);\n //Solicitud de los datos\n System.out.println(\"Ingrese el valor de num1: \");\n num1 = sc.nextInt();\n System.out.println(\"Ingrese el valor de num2: \");\n num2 = sc.nextInt();\n //LLamado a los métodos\n\tdisplayNumberPlus10(num1, num2);\n displayNumberPlus100(num1, num2);\n\tdisplayNumberPlus1000(num1, num2);\n }", "public static void print(int x) {\r\n if (x > 9) {\r\n print(x / 10);\r\n }\r\n System.out.print(x % 10 + \" \");\r\n }", "void overflowDigits() {\n for (int i = 0; i < preDigits.length(); i++) {\n char digit = preDigits.charAt(i);\n // This could be implemented with a modulo, but compared to the main\n // loop this code is too quick to measure.\n if (digit == '9') {\n preDigits.setCharAt(i, '0');\n } else {\n preDigits.setCharAt(i, (char)(digit + 1));\n }\n }\n }", "private static void printNumber(){\r\n\t\tfor(int i = 1;i <= 10; i++)\r\n\t\t\tSystem.out.println(i);\r\n\t}", "private static void task44() {\n System.out.print(\"Enter value: \");\n int n = scanInt();\n\n String str = n + \" + \" + n + \"\" + n + \" + \" + n + \"\" + n + \"\" + n;\n System.out.println(\"\\n\" + str);\n System.out.printf(\"%d + %d%d + %d%d%d\", n, n, n, n, n, n);\n }", "public static String intToString(int num, int digits) {\n if (BuildConfig.DEBUG && !(digits > 0))\r\n \t\tthrow new AssertionError(\"Campo digits non valido\");\r\n\r\n // create variable length array of zeros\r\n char[] zeros = new char[digits];\r\n Arrays.fill(zeros, '0');\r\n // format number as String\r\n DecimalFormat df = new DecimalFormat(String.valueOf(zeros));\r\n\r\n return df.format(num);\r\n }", "public void print(int someInt) {\r\n print(someInt + \"\");\r\n }", "static void println(int integer){\n\t\tSystem.out.println(\"정수형 출력 \" + integer);\n\t}", "public static int getDigit(int number) {\r\n\t\tint rem = number % 10;\r\n\t\treturn rem + number / 10;\r\n\t}", "public void inputNumber(String number){\n\t\tchar[] strChar = number.toCharArray();\n\t\t\n\t\tfor(char NO: strChar){\n\t\t\tswitch (NO) {\n\t\t\tcase '1':\n\t\t\t\tscreen.click(one, \"NO 1\");\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\tscreen.click(tow, \"NO 2\");\n\t\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t\tscreen.click(three, \"NO 3\");\n\t\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\tscreen.click(four, \"NO 4\");\n\t\t\t\tbreak;\n\t\t\tcase '5':\n\t\t\t\tscreen.click(five, \"NO 5\");\n\t\t\t\tbreak;\n\t\t\tcase '6':\n\t\t\t\tscreen.click(six, \"NO 6\");\n\t\t\t\tbreak;\n\t\t\tcase '7':\n\t\t\t\tscreen.click(seven, \"NO 7\");\n\t\t\t\tbreak;\n\t\t\tcase '8':\n\t\t\t\tscreen.click(eight, \"NO 8\");\n\t\t\t\tbreak;\n\t\t\tcase '9':\n\t\t\t\tscreen.click(nine, \"NO 9\");\n\t\t\t\tbreak;\n\t\t\tcase '0':\n\t\t\t\tscreen.click(zero, \"NO 0\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void printInt() {\n\t\tint i = 500;\n\t\twhile (i >=25) {\n\t\t\tif(i%6==0 && i%8==0) {\n\t\t\t\tSystem.out.print(i + \" \");\n\t\t\t}\n\t\t\t// Do not forget to type increment, otherwise it will be infinite loop\n\t\t\ti--;\n\t\t}\n\t}", "public static int getDigit(int number){\r\n int j = 0 ;\r\n j = number % 10;\r\n j += number / 10;\r\n return j;\r\n }", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(String.valueOf(number));\n //quantityTextView.setText(new Integer(number).toString());\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"enter the number:\");\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tint a=sc.nextInt();\r\n\t\tint i=0,j=0;\r\n\t\tint n=a;\r\n\t\twhile(n>0)\r\n\t\t{\r\n\t\t\ti=n%10;\r\n\t\t\tj=j*10+i;\r\n\t\t\tn=n/10;\r\n\t\t\r\n\t\t}\r\n\t\tSystem.out.println(j);\r\n\t\t\r\n\r\n\t}", "public void handleNumber(String s){\n\t\tint numPressed = Integer.parseInt(s);\n\t\tif(currentInput.length() < 7){ //prevents overflow exception when parsing input as int\n\t\t\tcurrentInput += numPressed;\n\t\t\tif(state == ATM_State.LOGINPIN){\n\t\t\t\tgui.setDisplay(gui.getDisplay() + \"*\");\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tgui.setDisplay(gui.getDisplay() + numPressed);\n\t\t\t}\n\t\t}\n\t}", "private static int getDigit(final int input, final int n) {\n if (n <= 0) {\n return N_TOO_LOW;\n }\n if (input < Math.pow(10, n - 1)) {\n return DIGIT_NOT_FOUND;\n }\n return (int) Math.floor((input % (int) Math.pow(10, n)) / Math.pow(10, n - 1));\n }", "public void displayQuestionNumber(int questionNumber) {\n\n TextView questionView = (TextView) findViewById(R.id.question_number);\n questionView.setText(String.valueOf(questionNumber));\n\n\n }", "public void addDigit(int addMe){\n //Handle the case of user enter digits for the first time\n if (clearFlag){\n output.setText(\"\");\n }\n \n if (isLeft){\n left = (left*10) + addMe;\n output.setText(output.getText() + addMe);\n output.setToolTipText(\"\" + left);\n }\n else{\n right = (right*10) + addMe;\n output.setText(output.getText() + addMe);\n }\n }", "private void displayQuantity(int number) {\n TextView quantityTextView = findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "public int getNumDigits() {\r\n \r\n //Return Value\r\n return numDigits;\r\n \r\n }", "public void numberEvent(View view) {\n if (isNewOp)\n input.setText(\"\");\n isNewOp = false;\n String number = input.getText().toString();\n switch (view.getId()) {\n case R.id.oneBTN:\n number += \"1\";\n break;\n case R.id.twoBTN:\n number += \"2\";\n break;\n case R.id.threeBTN:\n number += \"3\";\n break;\n case R.id.fourBTN:\n number += \"4\";\n break;\n case R.id.fiveBTN:\n number += \"5\";\n break;\n case R.id.sixBTN:\n number += \"6\";\n break;\n case R.id.sevenBTN:\n number += \"7\";\n break;\n case R.id.eightBTN:\n number += \"8\";\n break;\n case R.id.nineBTN:\n number += \"9\";\n break;\n case R.id.zeroBTN:\n number += \"0\";\n break;\n case R.id.pointBTN:\n number += \".\";\n break;\n }\n input.setText(number);\n }", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(number);\n }", "public UI() {\n boolean keepGoing = true;\n\n while (keepGoing) {\n try {\n System.out.println(\"Which digit position of pi do you want to retrieve (starting from position 0)?\");\n\n int next = scanner.nextInt();\n\n String digit = Pi.findNthPiDigit(next);\n System.out.println(\"The digit at position \" + next + \" is \" + digit);\n } catch (OutOfBoundsException e) {\n System.out.println(e.getMessage());\n } catch (Exception e) {\n System.out.println(\"Invalid entry.\");\n }\n }\n }", "public static int digitCounter(int n){\r\n int counter=1;\r\n while(n>10){\r\n n=n/10;\r\n counter++;\r\n }\r\n System.out.println(\"conter : \" +counter);\r\n return counter;\r\n }", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\nint n=sc.nextInt();\nint temp=n;\nint sum=0;\nwhile(temp>0){\n\tint lastDigit=temp%10;\n\ttemp /= 10;\n\tsum += lastDigit;\n\tSystem.out.println(lastDigit+\" \"+temp+\" \"+sum);\n}\nSystem.out.println(\"Sum of the digits of \" + n +\" is \"+sum);\n//int numberofDigits=(int)Math.log10(n)+1;\n//System.out.println(numberofDigits);\n\t}", "public int addDigits(int num) {\n \tif (num == 0) {\n \t\treturn 0;\n \t}\n\n // the possible solution are between 1 and 9, and they always occur in order beginning from 1\n \tif (num % 9 == 0) {\n \t\treturn 9;\n \t}\n return num % 9;\n }", "public static void nDigits(int num) {\r\n for(int x = ((int)Math.pow(10, num - 1)); x < (int)Math.pow(10, num); x++) {\r\n if(x % 2 == 0){\r\n if(conditionChecker(x)) {\r\n System.out.println(x);\r\n }\r\n }\r\n }\r\n }", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(\n R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }", "public static void main(String args[])\n {\n Scanner input = new Scanner(System.in);\n int num = input.nextInt();\n int d1 = num%10;\n num /= 10;\n int d2 = num%10;\n num /= 10;\n num += (d2*10 + d1*100);\n System.out.print(num);\n }", "void addDigit(int digit) {\n preDigits.append((char)('0' + digit));\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter an integer\");\n\t\tint a = scan.nextInt();\n\t\t\n\t\tString result = (a>=0) ? (a<10? \"The integer is digit\" : \"The integer is not a digit\") : (\"Negative cannot be a digit\");\n\t\tSystem.out.println(result);\n\t\n\tscan.close();\n\t}", "int main()\n{\n int num,rem;\n cin>>num;\n rem=num%10;\n cout<<rem+(num/1000);\n}", "private void displayQuantity(int number) {\n TextView ob = findViewById(R.id.quantity_text_view);\n ob.setText(\"\"+number);\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\r\n\r\n System.out.println(\"Enter a number you want to find the sum of it's digits: \");\r\n\r\n\r\n // Numerical data input\r\n //To read numerical values of a certain data type XYZ, the function to use is nextXYZ().\r\n int sum_of_digits = sc.nextInt();\r\n\r\n //call function and assign to variable\r\n int result = sumDigits(sum_of_digits);\r\n\r\n //print all sum\r\n System.out.println(\"The sum of the digits in \" + sum_of_digits + \" is: \" + result);\r\n\r\n }", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint result = 0;\n\t\tint number = scanner.nextInt();\n\t\t\n\t\tif(number <= 99) {\n\t\t\tSystem.out.print(number);\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tif(number == 1000){\n\t\t\t\tnumber = 999;\n\t\t\t}\n\t\t\t\n\t\t\tresult = 99 + getResult(number);\n\t\t\t\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}", "public static int selectionScreensIntInput(int lowerBound,int upperBound){\n System.out.println(\"Enter a number:\");\n int num = 0;\n //while they don't input a valid choice(lower bound-upper bound\n while(num == 0) {\n try {\n int input = getIntegerInput();\n if (input >= lowerBound && input <= upperBound) {\n num = input;\n }else{\n System.out.println(\"That is not a valid number, please try again\\n\" +\n \"Enter a number:\");\n }\n } catch (InputMismatchException e) {\n System.out.println(\"That is not a valid number, please try again\\n\" +\n \"Enter a number:\");\n }\n }\n return num;\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n System.out.print(\"Input a number: \");\n int number = scan.nextInt();\n if (number > 0) {\n while (number % 2 == 0) {\n System.out.print(2 + \" \");\n number /= 2;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n while (number % i == 0) {\n System.out.print(i + \" \");\n number /= i;\n }\n }\n if (number > 2)\n System.out.print(number);\n }\n }", "private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\"+ number);\n }", "public static void main(String[] args) {\n int input = 7123456;\n int result = sumOfDigits(input, 0);\n System.out.println(result);\n }", "public DigitButtonListener(String aDigit)\r\n {\r\n digit = aDigit;\r\n }", "private void displayByID() { \n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the book you would like displayed:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\t\tSystem.out.println(inventoryObject.displayBySICID(sic_idHolder));\n\t\tgetUserInfo();\n\t}", "int promptNumber();", "public static int addDigits(int x)\n\t{\n\t\t//Method variable\n\t\tint sum = 0;\n\t\t//Assign while loop and return a value.\n\t\twhile(x>0)\n\t\t{\n\t\t\t sum = x%10+sum;\n\t\t\t x=x/10;\n\t\t}\n\t\treturn(sum);\n\t}", "public void print()\r\n {\r\n int i = numar.length()/3;\r\n while( i != 0 ){\r\n String n = numar.substring(0,3);\r\n numar = numar.substring(3);\r\n printNo(n);\r\n if( i == 3){\r\n System.out.print(\"million \");\r\n }\r\n else if( i == 2 ){\r\n System.out.print(\"thousand \");\r\n }\r\n i--;\r\n }\r\n }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nint num=sc.nextInt();\r\nint count=0;\r\nwhile(num!=0)\r\n{\r\n\tint n1=num%10;\r\n\tcount++;\r\n\tnum/=10;\r\n}\r\nSystem.out.println(count);\r\n\t}", "private static String digits(long val, int digits) {\n long hi = 1L << (digits * 4);\n return Long.toHexString(hi | (val & (hi - 1))).substring(1);\n }", "public static int digits(int a) {\n\t\tint digits=0; // initialize to 0 first\n\t\twhile(a !=0) { // while a is not 0 do under\n\t\t\ta = a/10; // since its dividing by integer if the number is lower than 10 it will return 0;\n\t\t\tdigits++; // when a/10 != 0 add 1 to digits \n\t\t}\n\t\treturn digits; // return digits\n\t}", "private void display() {\n TextView textview = (TextView) findViewById(R.id.textView);\n EditText editText = (EditText) findViewById(R.id.editNumber) ;\n textview.setText(\"TEXT\");\n editText.setText(\"\");\n\n }", "public static void printNumbers() {\n\t\tSystem.out.println(56);\n\t\tSystem.out.println(0b11); // 3 binary\n\t\tSystem.out.println(017); // 15 octal\n\t\tSystem.out.println(0x1F); //31 hexadecimal\n\t}", "public void reverseNumber() {\n\t\tint number = 123456789;\n\t\tint rev = 0;\n\t\twhile (number != 0) {\n\t\t\trev = rev * 10 + number % 10;\n\t\t\tnumber = number / 10;\n\t\t}\n\t\tSystem.out.println(rev);\n\t}", "private static String digits(long val, int digits) {\n\tlong hi = 1L << (digits * 4);\n\treturn Long.toHexString(hi | (val & (hi - 1))).substring(1);\n }", "private void screenWithUserInput(int input) {\n if(input == 1 || input == 2) {\n screenWithGivenValues(input, input + 3, 1 + 3, 2 + 3, 3 + 3, input, 0);\n }\n else if(input == 3) {\n screenWithGivenValues(input, input + 3, 100, 100, 100, input, 0);\n }\n }" ]
[ "0.6547", "0.61249775", "0.6047136", "0.6031754", "0.6019693", "0.5957321", "0.5919888", "0.58983094", "0.5676159", "0.56441337", "0.56230587", "0.5594957", "0.5581367", "0.5554459", "0.5524546", "0.55213207", "0.550898", "0.5505814", "0.5501076", "0.54982835", "0.5492878", "0.54879004", "0.54879004", "0.54879004", "0.54879004", "0.54879004", "0.54879004", "0.54879004", "0.5473315", "0.5470773", "0.5468798", "0.5467157", "0.5458034", "0.5439674", "0.5436425", "0.54133576", "0.5398827", "0.5392921", "0.53704035", "0.53663146", "0.53566104", "0.53372043", "0.5328557", "0.53102684", "0.5297027", "0.5296769", "0.5285802", "0.5281383", "0.52811253", "0.52766085", "0.52736455", "0.52197534", "0.5206788", "0.52053946", "0.519308", "0.5170395", "0.515625", "0.5152449", "0.5150149", "0.514701", "0.5137409", "0.5130347", "0.511644", "0.51123893", "0.51084644", "0.50846964", "0.5079302", "0.5078979", "0.5076787", "0.50750715", "0.5073024", "0.5070384", "0.5069087", "0.5067827", "0.5067469", "0.50558245", "0.5051947", "0.5039247", "0.5029982", "0.5029949", "0.50219584", "0.5021039", "0.5020223", "0.5012062", "0.5011812", "0.50111544", "0.5006336", "0.5000685", "0.500031", "0.4979224", "0.4978362", "0.49757487", "0.497479", "0.49723127", "0.496249", "0.4958371", "0.4958101", "0.49550614", "0.49485064", "0.4947309" ]
0.57665944
8
main end Calculates the integer part of the quotient when integer a is divided by integer b
public static int calculateIntegerPart(int a) { int integerPart = a / 10; return integerPart; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int division(int a, int b) {\n return a / b;\n }", "@Override\n\tpublic int calculation(int a, int b) {\n\t\treturn b/a;\n\t}", "public int div(int a, int b) {\n\t\t\treturn compute(a, b, OPER_DIV);\n\t\t}", "public static double div() {\n System.out.println(\"Enter dividend\");\n double a = getNumber();\n System.out.println(\"Enter divisor\");\n double b = getNumber();\n\n return a / b;\n }", "public static double div(double a, double b){\r\n\t\treturn a/b;\r\n\t}", "int div(int num1, int num2) {\n\t\treturn num1/num2;\n\t}", "@Override\r\n\tpublic int call(int a, int b) {\n\t\treturn a/b;\r\n\t}", "double divide (double a, double b) {\n\t\tdouble result = a/b;\n\t\treturn result;\n\t}", "public double divide(double a, double b, boolean rem){ return rem? a%b: a/b; }", "public static int p_div(){\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"please put the first number that you want to divide:\");\n int v_div_number_1 = keyboard.nextInt();\n System.out.println(\"please put the second number that you want to divide:\");\n int v_div_number_2 = keyboard.nextInt();\n int v_total_div= v_div_number_1/v_div_number_2;\n return v_total_div;\n }", "private static BigInteger divideAndRound(BigInteger a, BigInteger b) {\r\n BigInteger result = a.divide(b);\r\n //Case 1: Integer part of the quotient is positive, a%b*2>=b, then the float part of the quotient>=.5, therefore add 1 to quotient\r\n if(result.signum()>0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)>=0)\r\n result = result.add(BigInteger.ONE);\r\n //Case 2: Integer part of the quotient is negative, a%b*2<=b but a%b<>0 , \r\n //then the float part of the quotient<=-0.5, therefore subtract 1 from quotient\r\n else if(result.signum()<0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)<=0 && !a.mod(b).equals(BigInteger.ZERO))\r\n result = result.subtract(BigInteger.ONE);\r\n //Case 3: Integer part of the quotient is zero then two cases arise: a>0 or a<0\r\n else if(result.signum()==0)\r\n { \r\n //Case 1.1: a>0.5 then result=1\r\n if(a.compareTo(BigInteger.ZERO)>0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)>=0)\r\n result = BigInteger.ONE;\r\n //Case 1.1: a<-0.5 then result=-1\r\n else if(a.compareTo(BigInteger.ZERO)<0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)<=0)\r\n result = BigInteger.ZERO.subtract(BigInteger.ONE); //-1 :)\r\n }\r\n return result;\r\n }", "@Override\r\n\tpublic int umul(int a,int b) {\n\t\treturn a/b;\r\n\t}", "public static double div(double a, double b) {\n return a / b;\n }", "private long maxDivide(long a, long b) {\n\t\twhile (a % b == 0) {\n\t\t\ta = a / b;\n\t\t}\n\t\treturn a;\n\t}", "public int division(){\r\n return Math.round(x/y);\r\n }", "public int dividir(int a, int b) throws ExececaoCalculo{\n \n if(b==0){\n //ExececaoCalculo é uma class que esta nesse pacote atual\n throw new ExececaoCalculo(a, b);\n }\n return a/b;\n }", "public static int DIV_ROUND_UP(int a, int b) {\n\treturn (a + b - 1) / b;\n }", "public double divide(double a, double b) {\n\t\treturn a/b;\n\t}", "public static void calcIntegersDivBy()\r\n\t{\r\n\t\tint x = 5;\r\n\t\tint y = 20;\r\n\t\tint p = 3;\r\n\t\tint result = 0;\r\n\t\tif (x % p == 0)\r\n\t\t\tresult = (y / p - x / p + 1);\r\n\t\telse\r\n\t\t\tresult = (y / p - x / p);\r\n\t\tSystem.out.println(result);\r\n\t}", "BaseNumber divide(BaseNumber operand);", "@Override\n\tpublic double divide(double a, double b) {\n\t\treturn (a/b);\n\t}", "public static int division(int x, int y) {\n\t\treturn x/y;\n\t}", "public static double divide(double num1,double num2){\n\n // return num1/num2 ;\n\n if(num2==0){\n return 0 ;\n } else {\n return num1/num2 ;\n }\n }", "@Override\n\tpublic double divide(double in1, double in2) {\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n\t\tint a = 2;\n\t\tint b = 10;\n\t\tint c = a-(a/b)*b;\n\t\tSystem.out.println(c);\n\t\tint result = a;\n\t\twhile(result-b>=0){\n\t\t\tresult-=b;\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"result:\"+result);\n\t}", "@Override\r\n\tpublic int divNo(int a, int b) throws ArithmeticException {\n\t\tif(b==0)\r\n\t\t\tthrow new ArithmeticException();\r\n\t\treturn a/b;\r\n\t}", "public T div(T first, T second);", "private static void divide(int[] n1, int[] n2, int[] quotient, int []remainder) {\n\t\tif (isZero(n2)) {\n\t\t\tthrow new ArithmeticException (\"Divide by Zero\");\n\t\t}\n\t\t\n\t\tclear (remainder);\n\t\tclear (quotient);\n\t\t\n\t\t// if clearly greater, then copy integer remainder\n\t\tif (compareTo(n2,n1) > 0) {\n\t\t\tint idx = remainder.length-1;\n\t\t\tfor (int i = 0; i < n1.length; i++ ) { \n\t\t\t\tremainder[idx--] = n1[i];\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// This returns a copy of n1/n2\n\t\tn1 = reduce(n1);\n\t\tn2 = reduce(n2);\n\n\t\t// we have to extend, and reduce length. Note that this WILL terminate because\n\t\t// we would have left earlier if n2 were greater than n1.\n\t\twhile (compareTo(n2,0,n2.length,n1,0) > 0) {\n\t\t\tn2 = expand(n2);\n\t\t}\n\t\t\n\t\t// return string \"quot+remainder\";\n\t\tString result = subProcess(n1, n2);\n\t\t\n\t\t// pack into quotient/remainder.\n\t\tint idx = result.indexOf(\"+\");\n\t\tif (idx == -1) {\n\t\t\tfor (int i = 0; i < quotient.length; i++) {\n\t\t\t\tquotient[i] = 0;\n\t\t\t}\n\t\t\tpack(remainder,result); // ever happen?\n\t\t} else {\n\t\t\tpack(quotient,result.substring(0,idx));\n\t\t\tpack(remainder,result.substring(idx+1));\n\t\t}\n\t}", "public int divide(int dividend, int divisor) {\n long a=Math.abs((long )dividend);\n long b=Math.abs((long )divisor);\n boolean negative=false; \n if(dividend<0) negative=!negative; \n if(divisor<0) negative=!negative; \n int result=0;\n while(a>=b)\n {\n long c=b; \n for(int i=0; a>=c ; i++, c<<=1 )\n {\n a-=c; \n result+=1<<i;\n }\n }\n return negative? -result: result; \n }", "public static float div(int value1, int value2){\r\n return (float) value1 / value2;\r\n }", "public double divisao (double numero1, double numero2){\n\t}", "public static void main(String[] args) {\n\t\tint a=20;\n\t\tint b=0;\n\t\tint c=a/b;\n\t\tSystem.out.println(c);\n\t\tSystem.out.println(\"division=\"+c);\n\t\tSystem.out.println(c);\n\n\t}", "public BigInt divide(BigInt rhs) throws ArithmeticException, BigIntException {\n if (null == rhs) {\n throw new BigIntException(\"null parameter\");\n }\n\n if (rhs.equals(new BigInt(\"0\"))) {\n // The rhs is 0\n throw new ArithmeticException(\"Zero division\");\n }\n\n BigInt absNumerator = new BigInt(number, true);\n BigInt quotient = new BigInt(new ArrayList<Integer>(), true);\n BigInt origDenominator = new BigInt(rhs.number, true);\n BigInt denominator = new BigInt(rhs.number, true);\n while (0 >= denominator.compareTo(absNumerator)) {\n quotient = quotient.plus(new BigInt(\"1\"));\n denominator = denominator.plus(origDenominator);\n }\n\n quotient.isPositive = (isPositive == rhs.isPositive);\n\n return quotient;\n }", "@Test\n\tpublic void quotientAndReminder(){\n\t\t\n\t\tint dividend = 80;\n\t\tint divider = 40;\n\t\t\n\t\tint quotient = dividend/divider;\n\t\tint remainder = dividend%divider;\n\t\t\n\t\tSystem.out.println(\"quotient is :\" +quotient);\n\t\tSystem.out.println(\"remainder is : \"+ remainder);\n\t}", "public int devision(int a, int b) {\n\t\tSystem.out.println(\"Division Method is Called\");\n\t\tint c=a/b;\n\t\treturn c;\n\t}", "public static void main(String[] args) {\n\n int a=5;\n int b=0;\n\n System.out.println(\"a/b = \" + a/b);\n\n }", "@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}", "public int division(int x,int y){\n System.out.println(\"division methods\");\n int d=x/y;\n return d;\n\n }", "public static double divide(int left, int right){\n double output = (double)left/right;\n if (output == Double.POSITIVE_INFINITY) {\n throw new ArithmeticException(\"Cannot divide by 0\");\n }\n return (double)left / right;\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }" ]
[ "0.82245", "0.78680307", "0.7667095", "0.7510611", "0.7509976", "0.7487984", "0.7434108", "0.7378785", "0.7363042", "0.73484033", "0.7338673", "0.7328137", "0.7286065", "0.72319967", "0.7219647", "0.71396214", "0.7137207", "0.71284163", "0.71248025", "0.7115824", "0.7108444", "0.6867956", "0.6853135", "0.68483925", "0.67973393", "0.6779472", "0.6759249", "0.6736839", "0.6718317", "0.6702052", "0.66595536", "0.65970325", "0.6579868", "0.65609175", "0.65517783", "0.65443057", "0.6539206", "0.6536386", "0.65318537", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6530406", "0.6529804", "0.6529804", "0.6529804", "0.6529804", "0.6529804", "0.6529804", "0.6529804", "0.6529804", "0.6529804", "0.6529804", "0.6529804" ]
0.0
-1
Calculates the integer remainder when integer a is divided by integer b
public static int calculateRemainderPart(int a) { int remainderPart = a % 10; return remainderPart; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int modulo(int a, int b) {\n return a % b;\n }", "private static int cprModFunction(int a, int b) {\n\t\tint res = a % b;\n\t\tif (res < 0)\n\t\t\tres += b;\n\t\treturn res;\n\t}", "public double divide(double a, double b, boolean rem){ return rem? a%b: a/b; }", "public int division(int a, int b) {\n return a / b;\n }", "public static int mod(int a,int b) {\n\t\tif (b == 0) return 0;\n\t\tif (b<0) {\n\t\t\treturn -mod(-a,-b);\n\t\t} else if(a<0) {\n\t\t\twhile (Math.abs(a-b)>b)a+=b;\n\t\t\treturn a;\n\t\t} else {\n\t\t\twhile (a-b>=0) a-=b;\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}", "private static int wrap(int a, int b)\n {\n return (a < 0) ? (a % b + b) : (a % b);\n }", "public int div(int a, int b) {\n\t\t\treturn compute(a, b, OPER_DIV);\n\t\t}", "public static float modulus(float a, float b)\n\t{\n\t\treturn (a % b + b) % b;\n\t}", "@Override\r\n\tpublic int umul(int a,int b) {\n\t\treturn a/b;\r\n\t}", "private long maxDivide(long a, long b) {\n\t\twhile (a % b == 0) {\n\t\t\ta = a / b;\n\t\t}\n\t\treturn a;\n\t}", "@Override\n\tpublic int calculation(int a, int b) {\n\t\treturn b/a;\n\t}", "int getRemainder(int num, int divisor) {\n\t\treturn (num - divisor * (num/divisor));\n\t}", "static int modulo(int x, int y) {\n return (x%y);\n }", "public int dividir(int a, int b) throws ExececaoCalculo{\n \n if(b==0){\n //ExececaoCalculo é uma class que esta nesse pacote atual\n throw new ExececaoCalculo(a, b);\n }\n return a/b;\n }", "private static void helloHelloModulo() {\n int a = 1;\n int b = 10;\n int c = 1 / 10;\n\n int d = 1 % 10;\n\n\n System.out.println(\" Result deleniya \" + c);\n System.out.println(\" Result deleniya \" + d);\n\n\n int делимое = 75;\n int делитель = 13;\n int f = делимое % делитель;\n\n int остаток = делимое - (делимое / делитель) * делитель;\n int j = 7 % 2;\n\n System.out.println(f);\n System.out.println(остаток);\n\n\n }", "@Test\n\tpublic void quotientAndReminder(){\n\t\t\n\t\tint dividend = 80;\n\t\tint divider = 40;\n\t\t\n\t\tint quotient = dividend/divider;\n\t\tint remainder = dividend%divider;\n\t\t\n\t\tSystem.out.println(\"quotient is :\" +quotient);\n\t\tSystem.out.println(\"remainder is : \"+ remainder);\n\t}", "private int getRemainder (int numerator, int denominator)\n {\n if (denominator >= numerator)\n return 0;\n\n int diff = numerator;\n while (diff >= denominator)\n {\n diff = diff - denominator;\n }\n\n return diff;\n }", "int div(int num1, int num2) {\n\t\treturn num1/num2;\n\t}", "private static int gcd(int a, int b)\r\n\t{\r\n\t\tint remainder = a % b;\r\n\t\tif(remainder == 0)\r\n\t\t{\r\n\t\t\treturn b;\r\n\t\t}\r\n\t\treturn gcd(b, remainder);\r\n\t}", "public static int mod(int x, int y) {\n return x % y;\n }", "public static int DIV_ROUND_UP(int a, int b) {\n\treturn (a + b - 1) / b;\n }", "private static BigInteger divideAndRound(BigInteger a, BigInteger b) {\r\n BigInteger result = a.divide(b);\r\n //Case 1: Integer part of the quotient is positive, a%b*2>=b, then the float part of the quotient>=.5, therefore add 1 to quotient\r\n if(result.signum()>0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)>=0)\r\n result = result.add(BigInteger.ONE);\r\n //Case 2: Integer part of the quotient is negative, a%b*2<=b but a%b<>0 , \r\n //then the float part of the quotient<=-0.5, therefore subtract 1 from quotient\r\n else if(result.signum()<0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)<=0 && !a.mod(b).equals(BigInteger.ZERO))\r\n result = result.subtract(BigInteger.ONE);\r\n //Case 3: Integer part of the quotient is zero then two cases arise: a>0 or a<0\r\n else if(result.signum()==0)\r\n { \r\n //Case 1.1: a>0.5 then result=1\r\n if(a.compareTo(BigInteger.ZERO)>0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)>=0)\r\n result = BigInteger.ONE;\r\n //Case 1.1: a<-0.5 then result=-1\r\n else if(a.compareTo(BigInteger.ZERO)<0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)<=0)\r\n result = BigInteger.ZERO.subtract(BigInteger.ONE); //-1 :)\r\n }\r\n return result;\r\n }", "public static void calcIntegersDivBy()\r\n\t{\r\n\t\tint x = 5;\r\n\t\tint y = 20;\r\n\t\tint p = 3;\r\n\t\tint result = 0;\r\n\t\tif (x % p == 0)\r\n\t\t\tresult = (y / p - x / p + 1);\r\n\t\telse\r\n\t\t\tresult = (y / p - x / p);\r\n\t\tSystem.out.println(result);\r\n\t}", "public static double div(double a, double b){\r\n\t\treturn a/b;\r\n\t}", "public static int gcd(int a, int b) {\r\n\t\twhile(b > 0) {\r\n\t\t\tint temp = b;\r\n\t\t\tb = a % b;\r\n\t\t\ta = temp;\r\n\t\t}\r\n\t\t\r\n\t\treturn a;\r\n\t}", "@Override\r\n\tpublic int divNo(int a, int b) throws ArithmeticException {\n\t\tif(b==0)\r\n\t\t\tthrow new ArithmeticException();\r\n\t\treturn a/b;\r\n\t}", "public static double div() {\n System.out.println(\"Enter dividend\");\n double a = getNumber();\n System.out.println(\"Enter divisor\");\n double b = getNumber();\n\n return a / b;\n }", "private static int gcd(int a, int b) {\n\t\tif(a==0){\n\t\t\treturn b;\n\t\t}\n\t\treturn gcd(b%a,a);\n\t}", "public static int gcd(int a, int b) {\n int t = 0;\n while (b != 0) {\n t = b;\n b = a % b;\n a = t;\n }\n return Math.abs(a);\n }", "public static double div(double a, double b) {\n return a / b;\n }", "static int gcd(int a, int b) {\r\n\t\tif (b == 0)\r\n\t\t\treturn a;\r\n\t\treturn gcd(b, a % b);\r\n\t}", "public T div(T first, T second);", "int getRemainderPercent();", "public static long mod(int dividend, int divisor) {\r\n\t\tif(dividend < divisor) return dividend;\r\n\t\tif(dividend == divisor) return 0; \r\n\t\tif(divisor == 1) return dividend;\r\n\t\t\r\n\t\treturn mod(dividend - divisor, divisor); \r\n\t}", "private static int gcd (int a, int b) {\n int m = Math.max (Math.abs (a), Math.abs (b));\n if (m == 0) throw new ArithmeticException (\" zero in gcd \");\n int n = Math.min (Math.abs (a), Math.abs (b));\n while (n > 0) {\n a = m % n;\n m = n;\n n = a;\n }\n return m;\n }", "@Override\r\n\tpublic int call(int a, int b) {\n\t\treturn a/b;\r\n\t}", "public static int getRemainder(int num1, int num2) {\n\t\tString message = \"Remainder of this operation is: \";\n\t\tint result = num1 % num2;\n\t\tSystem.out.println(message+result);\n\t\treturn result;\n\t\t\n\t//\tSystem.out.println(\"Method execution is complete\");\n\t}", "public static NodeValue numericMod(NodeValue nv1, NodeValue nv2) {\n switch (XSDFuncOp.classifyNumeric(\"mod\", nv1, nv2)) {\n // a = (a idiv b)*b+(a mod b)\n // => except corner cases (none or xsd:decimal except precision?)\n // a - (a idiv b)*b\n\n case OP_INTEGER :\n // Not BigInteger.mod. F&O != Java.\n BigInteger bi1 = nv1.getInteger();\n BigInteger bi2 = nv2.getInteger();\n if ( BigInteger.ZERO.equals(bi2) )\n throw new ExprEvalException(\"Divide by zero in MOD\") ;\n BigInteger bi3 = bi1.remainder(bi2);\n return NodeValue.makeInteger(bi3);\n case OP_DECIMAL :\n BigDecimal bd_a = nv1.getDecimal();\n BigDecimal bd_b = nv2.getDecimal();\n if ( BigDecimal.ZERO.compareTo(bd_b) == 0 )\n throw new ExprEvalException(\"Divide by zero in MOD\") ;\n // This is the MOD for X&O\n BigDecimal bd_mod = bd_a.remainder(bd_b);\n return NodeValue.makeDecimal(bd_mod);\n case OP_FLOAT :\n float f1 = nv1.getFloat();\n float f2 = nv2.getFloat();\n if ( f2 == 0 )\n throw new ExprEvalException(\"Divide by zero in MOD\") ;\n return NodeValue.makeFloat( f1 % f2) ;\n case OP_DOUBLE :\n double d1 = nv1.getDouble();\n double d2 = nv2.getDouble();\n if ( d2 == 0 )\n throw new ExprEvalException(\"Divide by zero in MOD\") ;\n return NodeValue.makeDouble(d1 % d2) ;\n default :\n throw new ARQInternalErrorException(\"Unrecognized numeric operation : (\" + nv1 + \" ,\" + nv2 + \")\") ;\n }\n }", "BaseNumber divide(BaseNumber operand);", "private int gcd(int a, int b){\r\n int r, temp;\r\n if( a<b ){ temp = a; a = b; b = temp; }\r\n while( b!=0 ){ r = a%b; a = b; b = r; }\r\n return a;\r\n }", "public static int p_div(){\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"please put the first number that you want to divide:\");\n int v_div_number_1 = keyboard.nextInt();\n System.out.println(\"please put the second number that you want to divide:\");\n int v_div_number_2 = keyboard.nextInt();\n int v_total_div= v_div_number_1/v_div_number_2;\n return v_total_div;\n }", "static int greatestDenominator(int a, int b) {\n int denominator = 0;\n\n // Loops from 0 to max(a, b) to test denominators\n for (int i = 1; i < Math.max(a, b); i++) {\n if (a % i == 0 && b % i == 0) {\n denominator = i;\n }\n }\n\n return denominator;\n }", "public int divide(int dividend, int divisor) {\n long a=Math.abs((long )dividend);\n long b=Math.abs((long )divisor);\n boolean negative=false; \n if(dividend<0) negative=!negative; \n if(divisor<0) negative=!negative; \n int result=0;\n while(a>=b)\n {\n long c=b; \n for(int i=0; a>=c ; i++, c<<=1 )\n {\n a-=c; \n result+=1<<i;\n }\n }\n return negative? -result: result; \n }", "public static int gcd(int a, int b) {\n\t\t// take absolute values\n\t\tif (a < 0) {\n\t\t\ta *= -1;\n\t\t}\n\t\tif (b < 0) {\n\t\t\tb *= -1;\n\t\t}\n\n\t\t// ensure a > b\n\t\tif (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\t// a = b * (a / b) + (a % b)\n\t\t// then b = (a % b) * ((a % b) / b) + (a % b) % b\n\t\t// by the division algorithm. Execute until some\n\t\t// such product has no remainder, the remainder of\n\t\t// the previous equation is GCD(a, b).\n\t\twhile (b > 0) {\n\t\t\tint temp = b;\n\t\t\tb = a % b;\n\t\t\ta = temp;\n\t\t}\n\t\treturn a;\n\t}", "public static int lcm(int a, int b) {\r\n\t\treturn a * (b / gcd(a, b));\r\n\t}", "public LongNum div2(LongNum divided){\n LongNum res = divided.copy();\n for(int i = res.size()-1;i>=0;i--){\n if(i!=0)res.set(i-1,res.get(i-1)+(res.get(i)%2)*base);\n res.set(i , Math.floorDiv(res.get(i),2));\n }\n return res;\n }", "private static void divide(int[] n1, int[] n2, int[] quotient, int []remainder) {\n\t\tif (isZero(n2)) {\n\t\t\tthrow new ArithmeticException (\"Divide by Zero\");\n\t\t}\n\t\t\n\t\tclear (remainder);\n\t\tclear (quotient);\n\t\t\n\t\t// if clearly greater, then copy integer remainder\n\t\tif (compareTo(n2,n1) > 0) {\n\t\t\tint idx = remainder.length-1;\n\t\t\tfor (int i = 0; i < n1.length; i++ ) { \n\t\t\t\tremainder[idx--] = n1[i];\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// This returns a copy of n1/n2\n\t\tn1 = reduce(n1);\n\t\tn2 = reduce(n2);\n\n\t\t// we have to extend, and reduce length. Note that this WILL terminate because\n\t\t// we would have left earlier if n2 were greater than n1.\n\t\twhile (compareTo(n2,0,n2.length,n1,0) > 0) {\n\t\t\tn2 = expand(n2);\n\t\t}\n\t\t\n\t\t// return string \"quot+remainder\";\n\t\tString result = subProcess(n1, n2);\n\t\t\n\t\t// pack into quotient/remainder.\n\t\tint idx = result.indexOf(\"+\");\n\t\tif (idx == -1) {\n\t\t\tfor (int i = 0; i < quotient.length; i++) {\n\t\t\t\tquotient[i] = 0;\n\t\t\t}\n\t\t\tpack(remainder,result); // ever happen?\n\t\t} else {\n\t\t\tpack(quotient,result.substring(0,idx));\n\t\t\tpack(remainder,result.substring(idx+1));\n\t\t}\n\t}", "@Test\n public void test(){\n int a = 3;\n int b = 6;\n System.out.println(a % b);\n System.out.println(Long.MAX_VALUE);\n }", "public static int gcd(int a, int b){\n int tmp = a;\r\n a = Math.max(a,b);\r\n b = Math.min(tmp,b);\r\n \r\n //write GCD\r\n int remainder;\r\n do{\r\n remainder = a%b;\r\n a = b;\r\n b = remainder;\r\n } while(remainder !=0);\r\n \r\n return a;\r\n }", "public int division(){\r\n return Math.round(x/y);\r\n }", "public int gcd(int a, int b) {\n\t\tint result;\n\t\tif (a > 0) {\n\t\t\tresult = gcd(b % a, a);\n\t\t} else {\n\t\t\tresult = b;\n\t\t}\n\n\t\treturn result;\n\t}", "public int gcd(int a, int b) {\n // write your code here\n if (b != 0) {\n return gcd(b, a % b);\n }\n else\n return a;\n }", "private static boolean gcd(int a, int b) {\n while (b > 0) {\n int temp = b;\n b = a % b;\n a = temp;\n }\n return a == 1;\n }", "public int pgcdByDE(int a, int b) throws Exception{\n if(a <1 || b <1){\n throw new Exception(\"a et b doivent etre >= 1\");\n }\n int reste = a > b ? a % b : b % a;\n if(reste == 0)\n return a > b ? b : a;\n if(a > b){\n a = reste;\n }else b = reste;\n return pgcdByDE(a,b);\n }", "private static long modPow(long a, long b, long c) {\n long res = 1;\n for (int i = 0; i < b; i++)\n {\n res *= a;\n res %= c;\n }\n return res % c;\n }", "public static NumberP Modulo(NumberP first, NumberP second)\n {\n return OperationsManaged.PerformArithmeticOperation\n (\n first, second, ExistingOperations.Modulo\n ); \t\n }", "public HugeUInt mod(HugeUInt b) {\r\n \t HugeUInt q = new HugeUInt(this);\r\n HugeUInt t;\r\n HugeUInt m;\r\n int lenA = q.getSize();\r\n int lenB = b.getSize();\r\n int sh = lenA - lenB;\r\n int d; \r\n while (b.compareTo(q) <= 0) {\r\n \tsh = lenA - lenB;\r\n t = q.shiftRight(sh);\r\n if (t.compareTo(b) < 0) {\r\n sh--;\r\n }\r\n d = 9;\r\n m = b.multiply(d).shiftLeft(sh);\r\n while (q.compareTo(m) < 0) {\r\n d--;\r\n m = b.multiply(d).shiftLeft(sh);\r\n }\r\n q = q.subtract(m);\r\n q.trim();\r\n lenA = q.getSize();\r\n }\r\n q.trim();\r\n return q;\r\n }", "public static int divide_naive(int dividend, int divisor) {\n \tboolean flag = ((new Long(dividend)>0) && (new Long(divisor)>0)) || ((new Long(dividend)<0) && (new Long(divisor)<0)) ? true : false;\n// \tSystem.out.println(\"flag=\"+flag);\n \tlong r = 0;\n \tlong dividend_abs = Math.abs(new Long(dividend));\n// \tSystem.out.println(\"dividend_abs=\"+dividend_abs);\n \tlong divisor_abs = Math.abs(new Long(divisor));\n \twhile(dividend_abs>=divisor_abs) {\n \t\tdividend_abs-=divisor_abs;\n \t\t++r;\n \t}\n// \tSystem.out.println(\"r=\"+r);\n \tif (r>Integer.MAX_VALUE || r<Integer.MIN_VALUE)\n \t\tr = Integer.MAX_VALUE;\n \treturn flag?new Long(r).intValue():-new Long(r).intValue();\n }", "long modInverse(long a, long m) \r\n { \r\n\t\t long m0 = m; \r\n long y = 0, x = 1; \r\n \r\n if (m == 1) \r\n return 0; \r\n \r\n while (a > 1) \r\n { \r\n // q is quotient \r\n \tlong q = a / m; \r\n \r\n \tlong t = m; \r\n \r\n // m is remainder now, process \r\n // same as Euclid's algo \r\n m = a % m; \r\n a = t; \r\n t = y; \r\n \r\n // Update x and y \r\n y = x - q * y; \r\n x = t; \r\n } \r\n \r\n // Make x positive \r\n if (x < 0) \r\n x += m0; \r\n \r\n return x; \r\n }", "public int devision(int a, int b) {\n\t\tSystem.out.println(\"Division Method is Called\");\n\t\tint c=a/b;\n\t\treturn c;\n\t}", "public static NumberP Division(NumberP first, NumberP second)\n {\n return OperationsManaged.PerformArithmeticOperation\n (\n first, second, ExistingOperations.Division\n ); \t\n }", "double divide (double a, double b) {\n\t\tdouble result = a/b;\n\t\treturn result;\n\t}", "public static boolean dividesEvenly(int a, int b) {\n if ((a % b) == 0) {\n return true;\n } else {\n return false;\n }\n }", "private static int modExp(int a, int b, int n) {\n\n // get a char array of the bits in b\n char[] k = (Integer.toBinaryString(b)).toCharArray();\n\n // initialize variables\n int c = 0, f = 1;\n // loop over every bit in k\n for (int i = 0; i < k.length; i ++) {\n\n // for every bit, i.e. if 0 or 1, do this\n c *= 2;\n f = (f * f) % n;\n\n // If current bit is equal to 1, then do this\n if (k[i] == '1') {\n c += 1;\n f = (f * a) % n;\n }\n }\n\n // returns the remainder\n return f;\n }", "@Override\npublic void div(int a, int b) {\n\t\n}", "public static void main(String[] args) {\n\n double fraction = 1/2.0;\n System.out.println(fraction);\n\n //Modules is the remainder of a division problem\n //25 % 6 = 1\n //31 % 5 = 1\n //17 % 3 = 2\n //4 % 2 = 0\n //5 % 2 = 1\n //6 % 2 = 0\n //121 % 100 = 21\n // 47 % 15 = 2\n //55 % 15 =10\n\n //5 + 2 * 4 =\n //12 / 2 - 4 =\n //4 + 17 % 2 -1 =\n //4 + 5 * 2 / 2 + 1 =\n //4 * (6 + 3 * 2) + 7 =\n\n System.out.println(5 + 2 * 4);\n System.out.println (12 / 2 -4);\n System.out.println(4 + 17 % 2 - 1);\n System.out.println(4 + 5 * 2 / 2 + 1);\n System.out.println(4 * (6 + 3 *2) + 7);\n\n\n }", "public static double modulo(double val, double mod) {\n double n = Math.floor(val / mod);\n double r = val - n * mod;\n return Util.almost_equals(r,mod) ? 0.0 : r;\n }", "static int modInverse(int a, int m) \n\t{ \n\t\tint m0 = m; \n\t\tint y = 0, x = 1; \n\t\tif (m == 1) \n\t\t{ \n\t\t\treturn 0; \n\t\t} \n\n\t\twhile (a > 1) \n\t\t{ \n\n\t\t\t// q is quotient \n\t\t\tint q = a / m; \n\t\t\tint t = m; \n\n\t\t\t// m is remainder now, process \n\t\t\t// same as Euclid's algo \n\t\t\tm = a % m; \n\t\t\ta = t; \n\t\t\tt = y; \n\n\t\t\t// Update y and x \n\t\t\ty = x - q * y; \n\t\t\tx = t; \n\t\t} \n\n\t\t// Make x positive \n\t\tif (x < 0) \n\t\t{ \n\t\t\tx += m0; \n\t\t} \n\n\t\treturn x; \n\t}", "public void reduct() {\n\t\tint divider = bunmo;\n\t\tif(bunja < bunmo){\n\t\t\tdivider = bunja;\n\t\t}\n\t\twhile(divider > 1){\n//\t\twhile(!util.Uitl.isPrime(bunmo)||!util.Uitl.isPrime(bunja)){\n\t\t\tboolean canDivide = (bunmo%divider==0)&&(bunja%divider==0);\n\t\t\tif(canDivide){\n\t\t\t\tbunja/=divider;\n\t\t\t\tbunmo/=divider;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tdivider--;\n\t\t\t}\n\t\t}\n\t}", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }", "public int Div(int num){\n\tint count01 ;\n\tint count02 ;\n\tint aux03 ;\n\n\tcount01 = 0 ;\n\tcount02 = 0 ;\n\taux03 = num - 1 ;\n\twhile (count02 < aux03) {\n\t count01 = count01 + 1 ;\n\t count02 = count02 + 2 ;\n\t}\n\treturn count01 ;\t\n }" ]
[ "0.7886016", "0.77447885", "0.74249285", "0.74088156", "0.7310927", "0.72306633", "0.71583587", "0.71409637", "0.70472527", "0.6984994", "0.69783455", "0.6937385", "0.6924119", "0.6864746", "0.684865", "0.6807433", "0.67972183", "0.6779019", "0.67511296", "0.6711954", "0.66958976", "0.66915953", "0.6671181", "0.66548425", "0.66032743", "0.6578897", "0.6574773", "0.65643185", "0.65311396", "0.6502732", "0.64950037", "0.64704883", "0.64384574", "0.6438097", "0.639697", "0.63928956", "0.63626254", "0.63612396", "0.6345058", "0.6332281", "0.63308305", "0.6326648", "0.63245916", "0.6304339", "0.6287089", "0.6283131", "0.62448645", "0.62379706", "0.6233652", "0.62293047", "0.62288547", "0.6205559", "0.6162806", "0.61473083", "0.6144518", "0.6126531", "0.61217", "0.61150545", "0.61118007", "0.61098033", "0.6104641", "0.61020434", "0.6081934", "0.60808384", "0.60792017", "0.60761935", "0.6075657", "0.60725456", "0.6070202", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644", "0.60670644" ]
0.6842346
15
Displays a number as a sequence of digits, separating each pair of digits by two spaces
public static void displayDigits(int numberToSplit) { int number = numberToSplit; String numberAsString = ""; int integerPart; int remainderPart; System.out.printf("Number to split: %d%n", numberToSplit); do { integerPart = calculateIntegerPart(number); remainderPart = calculateRemainderPart(number); numberAsString = remainderPart + " " + numberAsString; number = integerPart; } while (number >= 10); if (integerPart != 0) numberAsString = integerPart + " " + numberAsString; System.out.printf("The number after splitting represented as a String: %s", numberAsString); System.out.println(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printNum() {\n\t\tfor(int i = 1; i<= 20; i++) {\n\t\t\tSystem.out.print(\" \" + i);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t}", "private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }", "public static void main(String[] args){\n for(int i = 23; i <= 89; i++){\n System.out.print(i + \" \");\n if(i % 10 == 2)\n System.out.print(\"\\n\"); }\n }", "include <stdio.h>\nint main() {\n int n;\n\tscanf(\"%d\", &n);\n int num=1;\n\tfor(int i = 1; i <= n; i++){\n\t for(int space = 1; space <= n - i; space++){\n\t printf(\" \");\n\t }\n\t for(int j = 1; j <= i; j++){\n\t printf(\"%d \",num);\n num++;\n\t }\n\t printf(\"\\n\");\n\t}\n\treturn 0;\n}", "private static void task44() {\n System.out.print(\"Enter value: \");\n int n = scanInt();\n\n String str = n + \" + \" + n + \"\" + n + \" + \" + n + \"\" + n + \"\" + n;\n System.out.println(\"\\n\" + str);\n System.out.printf(\"%d + %d%d + %d%d%d\", n, n, n, n, n, n);\n }", "public static void m12() {\r\n\tint m =1;\r\n\tfor(int i =1;i<=4;i++) {\r\n\t\tfor(int j =1;j<=(4-i);j++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tchar ch ='A';\r\n\t\tfor(int k =1;k<=m;k++) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tm+=2;\r\n\t\tSystem.out.println();\r\n\t}\r\n}", "public void print()\r\n {\r\n int i = numar.length()/3;\r\n while( i != 0 ){\r\n String n = numar.substring(0,3);\r\n numar = numar.substring(3);\r\n printNo(n);\r\n if( i == 3){\r\n System.out.print(\"million \");\r\n }\r\n else if( i == 2 ){\r\n System.out.print(\"thousand \");\r\n }\r\n i--;\r\n }\r\n }", "public static void printInt1(int number) {\n\t\tchar digit = (char) (number % 10 + '0');\r\n\t\tnumber = number / 10;\r\n\t\tif (number != 0)\r\n\t\t\tprintInt1(number);\r\n\t\tSystem.out.print(\" \" + digit);\r\n\t}", "String format(int val, int width) {\r\n\t\tint len = width - (int)Math.floor(Math.log10(val)) - 1;\r\n\t\tif (len < 1)\r\n\t\t\treturn \"\" + val;\r\n\t\tchar[] c = new char[len];\r\n\t\tfor (int i = 0; i < len; i++) {\r\n\t\t\tc[i] = '0';\r\n\t\t}\r\n\t\treturn new String(c) + val;\r\n\t}", "public static void m13() {\r\n\tfor(int i=1;i<=4;i++) {\r\n\t\tfor(int j =1;j<=(4-i);j++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tchar ch ='A';\r\n\t\tfor(int j=1;j<=i;j++) {\r\n\t\t\tSystem.out.print(ch+\" \");\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n}", "private static String twoDigitString(long number) {\n if (number == 0) {\n return \"00\";\n }\n if (number / 10 == 0) {\n return \"0\" + number;\n }\n return String.valueOf(number);\n }", "protected final String space(int n) {\n StringBuffer buf = new StringBuffer(0);\n for (int i = 0; i < n; i++) {\n buf.append(\" \");\n }\n return buf.toString();\n }", "public static void space(int space) {\r\n\t\tfor(int i=0; i<space; i++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}", "public static String spaces(int n) {\n StringBuffer b = new StringBuffer();\n for (int i = 0; i < n; i++) {\n b.append(' ');\n }\n return b.toString();\n }", "public String printTriangle(int number){\n StringJoiner joiner = new StringJoiner(\"\\n\");\n\n for (int count = 1; count <= number; count++) {\n joiner.add(printAsteriskN(count));\n }\n return joiner.toString();\n }", "public static String rightJustify(int value, int spaces) {\n\t\tString n = \"\" + value;\n\t\tfor (int i = n.length(); i < spaces; i++) {\n\t\t\tn = \" \" + n;\n\n\t\t}\n\t\treturn n;\n\n\t}", "private String createNumberLine(){\n StringBuilder numberLine = new StringBuilder();\n for(int i = 0; i < this.columns; i++){\n numberLine.append(i + 1).append(\" \");\n }\n return numberLine.toString();\n }", "public void printNumberPattern1(int number) {\n\t\t//Outer loop for iterating till number times \n\t\tfor (int counter = 0; counter < number ; counter++ ) {\n\t\t\t//Inner loop for iterating and printing number pattern \n\t\t\tfor(int printNumber = number-counter ; printNumber <= number ; printNumber++ ) {\n\t\t\t\tSystem.out.print(printNumber);\n\t\t\t}\n\t\t\t\n\t\t\t//Moving to next line and incrementing count \n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "@Override\n public void print() {\n for (int i = 1; i <= itertion; i++) {\n if(n <0){\n this.result = String.format(\"%-3d %-3s (%-3d) %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }else {\n this.result = String.format(\"%-3d %-3s %-3d %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }\n }\n }", "public String toString(){\r\n return \"(\" + num + \")\";\r\n }", "private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }", "public String printVerticalLine(int number){\n int count = 0;\n StringJoiner joiner = new StringJoiner(\"\\n\");\n\n while (count < number){\n joiner.add(printAsterisk());\n count = count + 1;\n }\n return joiner.toString();\n }", "public static void printNumbers() {\n\t\tSystem.out.println(56);\n\t\tSystem.out.println(0b11); // 3 binary\n\t\tSystem.out.println(017); // 15 octal\n\t\tSystem.out.println(0x1F); //31 hexadecimal\n\t}", "private String helper(int num) {\n if (num == 0) {\n // return empty string here so that we can append a white\n // space in the next if \n return \"\"; \n }\n \n if (num < 20) {\n return LESS_THAN_20[num] + \" \";\n }\n \n if (num < 100) {\n // use helper on num%10 instead of LESS_THAN_20[num%10] so that\n // white space is handled properly\n return TENS[num / 10] + \" \" + helper(num % 10);\n }\n \n return LESS_THAN_20[num / 100] + \" Hundred \" + helper(num % 100);\n }", "public String getNumbers(){\n StringBuilder htmlNumbers = new StringBuilder(\"<h2>\");\n for (int i = 1; i<=10; i++){\n htmlNumbers.append(String.valueOf(i) + \".<br>\");\n }\n htmlNumbers.append(\"</h2>\");\n return htmlNumbers.toString();\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Vilket heltal ska vi börja med?\");\n int first = sc.nextInt();\n System.out.println(\"Vilket ska vi avsluta med?\");\n int second = sc.nextInt();\n\n int firstMax = first * 10;\n int secondMax = second * 10;\n\n do {\n\n for (int j = first; j <= firstMax; j = j + first) {\n System.out.print(j);\n System.out.print(\" \");\n\n }\n\n System.out.println(\" \");\n first++;\n firstMax = firstMax + 10;\n\n\n\n }while(first != second + 1 && firstMax != secondMax + 10);\n\n\n\n\n\n }", "private String intString(int n){\r\n String s=\"\";\r\n if(n>9){\r\n s+=(char)(Math.min(n/10,9)+'0');\r\n }\r\n s+=(char)(n%10+'0');\r\n return s; \r\n }", "public String addWhiteSpace(String str, int number) {\n\t\tStringBuilder result = new StringBuilder();\n\t\tfor (int i = 0; i < str.length(); i+=2) {\n\t\t if (i > 0) {\n\t\t\t for (int j = 0; j < number; j++)\n\t\t\t\t result.append(\" \");\n\t\t }\n\t\t result.append(str.charAt(i));\n\t\t result.append(str.charAt(i+1));\n\t\t}\n\t\treturn result.toString();\n\t}", "private static void printDigit(int number) {\n\t\tswitch (number) {\n\t\tcase 10:\n\t\t\tSystem.out.println(\"ten\");\n\t\t\tbreak;\n\n\t\tcase 20:\n\t\t\tSystem.out.println(\"twenty\");\n\n\t\t\tbreak;\n\t\tcase 30:\n\t\t\tSystem.out.println(\"thirty\");\n\n\t\t\tbreak;\n\t\t}\n\t}", "public String tri4(int h){\n\t\tString S = \"\";\n\t\tint H = h;\n\t\tint HH = H;\n\t\tint Counter = 0;\n\t\tint UsingCounter = Counter;\n\n\t\twhile (H > 0){\n\t\t\tHH = H;\n\t\t\twhile (UsingCounter > 0){\n\t\t\t\tS = S + \" \";\n\t\t\t\tUsingCounter = UsingCounter - 1;}\n\t\t\twhile (HH > 0) {\n\t\t\t\tS = S + \"*\";\n\t\t\t\tHH = HH - 1;}\n\t\t\tCounter = Counter + 1;\n\t\t\tUsingCounter = Counter;\n\t\t\tS = S + \"\\n\";\n\t\t\tH = H - 1;}\n\n\t\treturn S; }", "public static void pstring(String val, int width)\n {\n\tSystem.out.print(val);\n\tfor (int rem = width - val.length(); rem > 0; --rem) {\n\t System.out.print(\" \");\n\t}\n }", "protected String _align(NumberFormat fmt, int n, int sp) {\n\n StringBuffer buf = new StringBuffer();\n FieldPosition fpos = new FieldPosition(NumberFormat.INTEGER_FIELD);\n fmt.format(n, buf, fpos);\n for (int i = 0; i < sp - fpos.getEndIndex(); ++i) {\n buf.insert(0, ' ');\n }\n return buf.toString();\n\n }", "private static String convertToStars(int num) {\n StringBuilder builder = new StringBuilder();\n for (int j = 0; j < num; j++) {\n builder.append('*');\n }\n return builder.toString();\n}", "private static String drawNumbers(ArrayList<String>[] lcdNumbers,int size){\n\t\tint columnas=size+2; \n\t\tint filas=2*size+3;\n\t\tString ret=\"\";\n\t\tint tamanio=lcdNumbers.length;\n\t\tint k = 0; \n\t\twhile ( k < filas ) {\n\n\t\t\tint i = 0; \n\t\t\tint j=k*(size+2);\n\t\t\twhile ( i < tamanio ) {\n\t\t\t\twhile (j < columnas ) {\n\t\t\t\t\tret+=lcdNumbers[i].get(j)+\"\";\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tret+=\" \";\n\t\t\t\ti++;\n\t\t\t\tj=k*(size+2);\n\t\t\t}\n\t\t\tk++;\n\t\t\tj=k*(size+2);\n\t\t\tcolumnas+=(size+2);\n\t\t\tret+=\"\\n\";\n\t\t}\n\t\treturn ret;\n\t}", "public String fixedNumbersToString(){\n\t\tint numDigits = size / 10 + 1;\n\t\tStringBuilder builder = new StringBuilder();\n\t\t// delimiter between size x size squares\n\t\tString delimiter = \"\";\n\t\tfor (int i = 0; i < (numDigits+1)*size*size+2*(size-1); i++){\n\t\t\tdelimiter += \"-\";\n\t\t}\n\t\tfor (int i = 0; i < size*size; i++){\n\t\t\tif (i != 0 && i % size == 0){\n\t\t\t\tbuilder.append(delimiter);\n\t\t\t\tbuilder.append(\"\\n\");\n\t\t\t}\n\t\t\tfor (int j = 0; j < size*size; j++){\n\t\t\t\tif (j != 0 && j % size == 0){\n\t\t\t\t\tbuilder.append(\"| \");\n\t\t\t\t}\n\t\t\t\tif (fixedNumbers[i][j])\n\t\t\t\t\tbuilder.append(\"x \");\n\t\t\t\telse\n\t\t\t\t\tbuilder.append(\"o \");\n\t\t\t}\n\t\t\tbuilder.append(\"\\n\");\n\t\t}\n\t\treturn builder.toString();\n\t}", "public static void main(String[] args) {\nint t = 101010101;\n// koden begynner her\nString s = \"\";\nwhile ( t % 10 > 0 ) {\ns = t % 10 + s;\nt = t / 10;\n}\ns = \"s = \" + s;\nout.println(s);\n\n }", "public String padSpace(int n) {\n\t\tif (n < 0) { n = 0; }\n\t\tString s = \"\";\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts = s + \" \";\n\t\t}\n\t\treturn s;\n\t}", "public static void main(String[] args) {\n String iSBNumber = \"978013213080\";\n int parni = 0;\n int neparni = 0;\n int suma;\n\n\n for (int i = 0; i < iSBNumber.length(); i++) {\n\n if (i % 2 == 0) {\n neparni += (Integer.parseInt(String.valueOf(iSBNumber.charAt(i))));\n\n } else {\n parni += 3 * (Integer.parseInt(String.valueOf(iSBNumber.charAt(i))));\n\n }\n }\n suma = 10 - (parni + neparni) % 10;\n if (suma == 10) {\n iSBNumber += \"0\";\n System.out.println(iSBNumber);\n } else {\n iSBNumber += suma;\n System.out.println(iSBNumber);\n }\n\n }", "public static String dtrmn(int number) {\n\t\t\n\t\tString letter = \"\";\n\t\t\n\t\tint cl = number / 100;\n\t\tif (cl != 9 && cl != 4) {\n\t\t\t\n\t\t\tif (cl < 4) {\n\t\t\t\t\n\t\t\t\tfor(int i = 1; i <= cl; i++) {\n\t\t\t\t\tletter = letter + \"C\";\n\t\t\t\t}\n\t\t\t} else if (cl < 9 && cl > 4) {\n\t\t\t\t\n\t\t\t\tletter = letter + \"D\";\n\t\t\t\tfor (int i = 1; i <= cl - 5; i++) {\n\t\t\t\t\tletter = letter + \"C\";\n\t\t\t\t}\n\t\t\t} else if(cl == 10) { \n\t\t\t\t\n\t\t\t\tletter = letter + \"M\";\n\t\t\t}\n\t\t} else if (cl == 4) {\n\t\t\t\n\t\t\tletter = letter + \"CD\";\n\t\t\t\n\t\t} else if (cl == 9) {\n\t\t\t\n\t\t\tletter = letter + \"CM\";\n\t\t}\n\t\t\n\t\tint cl1 = (number % 100)/10;\n\t\tif (cl1 != 9 && cl1 != 4) {\n\t\t\t\n\t\t\tif (cl1 < 4) {\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i <= cl1; i++) {\n\t\t\t\t\tletter = letter + \"X\";\n\t\t\t\t}\n\t\t\t} else if (cl1 < 9 && cl1 > 4) {\n\t\t\t\tletter = letter + \"L\";\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i <= cl1 -5; i++) {\n\t\t\t\t\tletter = letter + \"X\";\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else if (cl1 == 4) {\n\t\t\tletter = letter + \"XL\";\n\t\t} else if (cl1 == 9) {\n\t\t\tletter = letter + \"XC\";\n\t\t}\n\t\t\n\t\tint cl2 = (number % 100)%10;\n\t\t\n\t\tif (cl2 != 9 && cl2 != 4) {\n\t\t\t\n\t\t\tif (cl2 < 4) {\n\t\t\t\tfor (int i = 1; i <= cl2; i++) {\n\t\t\t\t\tletter = letter + \"I\";\n\t\t\t\t}\n\t\t\t} else if (cl2 < 9 && cl2 > 4) {\n\t\t\t\t\n\t\t\t\tletter = letter + \"V\";\n\t\t\t\tfor (int i = 1; i <= cl2-5; i++) {\n\t\t\t\t\tletter = letter + \"I\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else if (cl2 == 4) {\n\t\t\tletter = letter +\"IV\";\n\t\t} else if (cl2 == 9) {\n\t\t\tletter = letter + \"IX\";\n\t\t}\n\t\treturn letter;\n\t}", "public static String spaces(int n)\n\t{\n\t\tString str = \"\";\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tstr += \" \";\n\t\t}\n\t\treturn str;\n\t}", "private static void printSquareNumbers() {\r\n\r\n\t\tBigInteger number = new BigInteger(Long.MAX_VALUE + \"\");\r\n\t\tBigInteger finish = number.add(new BigInteger(\"10\"));\r\n\r\n\t\tfor (number = new BigInteger(Long.MAX_VALUE + \"\"); number.compareTo(finish) <= 0; number = number\r\n\t\t\t\t.add(new BigInteger(\"1\"))) {\r\n\t\t\tSystem.out.println(number.multiply(number));\r\n\t\t}\r\n\r\n\t}", "public void toStr()\r\n {\r\n numar = Integer.toString(read());\r\n while(numar.length() % 3 != 0){\r\n numar = \"0\" + numar; //Se completeaza cu zerouri pana numarul de cifre e multiplu de 3.\r\n }\r\n }", "public void print1T0255(){\n StringBuilder out = new StringBuilder();\n for (int i = 1; i <= 255; i++){\n out.append( i + \" \");\n }\n System.out.println( out.toString());\n }", "public static String formatWhole(int x) {\n return String.format(\"%,d\", x);\n }", "private static String digits(long val, int digits) {\n\tlong hi = 1L << (digits * 4);\n\treturn Long.toHexString(hi | (val & (hi - 1))).substring(1);\n }", "public String NumberToString(int number){return \"\"+number;}", "private static String digits(long val, int digits) {\n long hi = 1L << (digits * 4);\n return Long.toHexString(hi | (val & (hi - 1))).substring(1);\n }", "static void print4(int n) {\n\t\tint blank = 0;\n\t\tint star = (n/2) + 1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 0; j < blank; j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j < Math.abs(star); j++) {\n\t\t\t\tSystem.out.print(\"*\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tstar--;\n\t\t\tif(star == 0) {\n\t\t\t\tstar = -2;\n\t\t\t}\n\t\t\tblank++;\n\t\t\tif(blank > n/2)\n\t\t\t\tblank = n >> 1;\n\t\t}\n\t}", "public void daffodilNum(int digit) {\n int count = 0;\n for (int i = (int) Math.pow(10, digit-1); i < (int) Math.pow(10, digit); i++) {\n int sum = 0;\n for (int index = 0; index < digit; index++) {\n int curDigit = (i / ((index == 0) ? 1 : ((int) Math.pow(10, index)))) % 10;\n sum += Math.pow(curDigit, 3);\n }\n if (sum == i) {\n System.out.print(i);\n System.out.print(' ');\n count++;\n if (count == 2) {\n System.out.println();\n count = 0;\n }\n }\n }\n }", "public static void main(String[] args) {\nint i=1;//display from 20 to 10\nSystem.out.println(\"odd even\");\nwhile(i<=10)\n{\n\tif(i%2!=0) {\n\tSystem.out.println(i+\" \"+(i+1));//for space /t is fine\n\t}\ni++;\n}\n\t}", "void addSpaces() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"| \");\n\t\tSystem.out.println(\"|\");\n\t}", "public static void m6() {\r\n\tfor(int i=1;i<=5;i++) {\r\n\t\t\r\n\t\tfor(int j=1;j<=(5-i);j++) {\r\n\t\tSystem.out.print(\" \");\t\r\n\t\t}\r\n\t\tchar ch ='A';\r\n\t\tfor(int k =1;k<=i;k++) {\r\n\t\t\tSystem.out.print(ch);\r\n\t\t\tch++;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}\r\n}", "public String Formatting(){\n\t\t\t return String.format(\"%03d-%02d-%04d\", getFirstSSN(),getSecondSSN(),getThirdSSN());\n\t\t }", "public static void main(String[] args) {\nScanner Sc= new Scanner(System.in);\nSystem.out.printf(\"Nhap vao so N = \");\nint N = Sc.nextInt();\nint S=0,i;\nfor (i=1;i<=N;i++)\n S=S+(10*i+i);\nSystem.out.printf(\"\\n%d\",S);\n\n\t}", "public static String alignNumbers(int first, int second) {\n int sum = first + second;\n float average = ((float)first+(float)second)/2;\n int difference = first-second;\n int distance = Math.abs(second-first);\n int product = first*second;\n int max = Math.max(first, second);\n int min = Math.min(first, second);\n StringBuilder sb = new StringBuilder();\n sb.append(String.format(\"%-15s%15d\\n\",\"Sum:\",sum));\n sb.append(String.format(\"%-29s%3.2f\\n\",\"Average:\",average));\n sb.append(String.format(\"%-15s%15d\\n\",\"Difference:\",difference));\n sb.append(String.format(\"%-15s%15d\\n\",\"Distance:\",distance));\n sb.append(String.format(\"%-15s%15d\\n\",\"Product:\",product));\n sb.append(String.format(\"%-15s%15d\\n\",\"Max:\",max));\n sb.append(String.format(\"%-15s%15d\\n\",\"Min:\",min));\n //String aligned = String.format(\"%-15s%15d%-29s%3.2f%-15s%16d%-15s%16d%-15s%16d%-15s%16d%-15s%16d%s\", \"Sum:\",sum,\"\\nAverage:\", average,\"\\nDifference:\", difference, \"\\nProduct:\", product, \"\\nDistance:\", distance, \"\\nMaximum:\", max, \"\\nMinimum:\", min,\"\\n\");\n\n return sb.toString();//aligned;\n }", "public static void reverse(int number)\n\t{\n\t\tString reversed = \"\";\n\t\twhile(number != 0)\n\t\t{\n\t\t\treversed = reversed + String.valueOf(number % 10);\n\t\t\tnumber /= 10;\n\t\t}\n\t\tSystem.out.print(reversed);\n\t}", "private static String numberToProse(int n) {\n if(n == 0)\n return \"zero\";\n\n if(n < 10)\n return intToWord(n);\n\n StringBuilder sb = new StringBuilder();\n\n // check the tens place\n if(n % 100 < 10)\n sb.insert(0, intToWord(n % 10));\n else if(n % 100 < 20)\n sb.insert(0, teenWord(n % 100));\n else\n sb.insert(0, tensPlaceWord((n % 100) / 10) + \" \" + intToWord(n % 10));\n\n n /= 100;\n\n // add the hundred place\n if(n > 0 && sb.length() != 0)\n sb.insert(0, intToWord(n % 10) + \" hundred and \");\n else if (n > 0)\n sb.insert(0, intToWord(n % 10) + \" hundred \");\n\n if(sb.toString().equals(\" hundred \"))\n sb = new StringBuilder(\"\");\n\n n /= 10;\n\n // the thousand spot\n if(n > 0)\n sb.insert(0, intToWord(n) + \" thousand \");\n\n return sb.toString();\n }", "public static String sp(int numSp) {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tif(numSp <=0) return \"\";\n\t\tfor(int i = 0; i < numSp; ++i) {\n\t\t\tsb.append(\" \");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String printBeutifulNumber(String num){\n String[] s_num = num.split(\"\\\\s+\");// converting given string to string array\n int[] input_num = new int[s_num.length];\n for(int i = 0; i<s_num.length; i++){\n input_num[i] = Integer.parseInt(s_num[i]);\n }//Convert given string to int array\n String result = beutifulMaker(input_num);\n return result;\n }", "private static void printNumber(){\r\n\t\tfor(int i = 1;i <= 10; i++)\r\n\t\t\tSystem.out.println(i);\r\n\t}", "private void formatPhoneNum() {\n\t\tthis.phoneNum = \"(\" + this.phoneNum.substring(0, 3) + \") \" + this.phoneNum.substring(3, 6) + \" \"\n\t\t\t\t+ this.phoneNum.substring(6);\n\t}", "public String covertIng(int num) {\n\t\tchar[] digits = new char[10];\r\n\t\t\r\n\t\tboolean sign = num >= 0 ? true : false;\r\n\t\tint idx = 0;\r\n\t\t\r\n\t\twhile(idx <digits.length){\r\n\t\t\tdigits[idx] = toChar(num % 10);\r\n\t\t\tnum = num /10;\r\n\t\t\tif(num== 0)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tidx++;\r\n\t\t}\r\n\t\t\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tif(!sign)\r\n\t\t\tsb.append('-');\r\n\t\t\r\n\t\twhile(idx>=0){\r\n\t\t\tsb.append(digits[idx--]);\r\n\t\t}\r\n\t\t\r\n\t\treturn sb.toString();\r\n\t\t\r\n\t}", "@Override\n public String toString() {\n String num = \"\";\n\n if (!isPositive) {\n // Add '-' if the number is negative\n num = num.concat(\"-\");\n }\n\n // Add all the digits in reverse order\n for (int i = number.size() - 1; i >= 0; --i) {\n num = num.concat(number.get(i).toString());\n }\n\n return num;\n }", "public static void pattern10(int input){\n\t\tfor(int i= input;i >0;i--){\n\t\t\tfor(int j=i;j<=input;j++){\n\t\t\t\tSystem.out.print(j+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Override\n\tpublic void printLotteryNo() {\n\t\tint[] prefixNums = generateNumber(35, 5);\n\t\tint[] suffixNums = generateNumber(12, 2);\n\t\tSystem.out.println(\"本期大乐透前区号码是:\" + printNums(prefixNums));\n\t\tSystem.out.println(\"本期大乐透后区号码是:\" + printNums(suffixNums));\n\t}", "public String prettyPrint (){\n\t\tString nums = this.getInt() + \"\\n\";\n\t\tif(this.getNext() == null) {\n\t\t\treturn nums;\n\t\t}else {\n\t\t\treturn nums + this.getNext().prettyPrint();\n\t\t}\n\t}", "static String printArray(int[] numbers) {\n\t\tint index = 0;\r\n\t\tString array = \"\";\r\n\t\twhile (index < numbers.length) {\r\n\t\t\tarray = array + numbers[index] + \" \";\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\tprintln(array);\r\n\t\treturn array;\r\n\t}", "public static void main(String[] args) {\n\t\tint n=345;\r\n\t\tint s=0;\r\n\t\twhile(n!=0)\r\n\t\t{\r\n\t\tint last=n%10;\r\n\t\ts =s+last;\r\n\t\tn= n/10;\t\r\n\t\t\t\r\n\t\t\t}\r\n\r\nSystem.out.println(s);\r\n\t}", "public void printSpace(){\n\t\tSystem.out.println(\"Current Space: \"+number);\n\t\tSystem.out.print(\"Type: \"+type);\n\t\tSystem.out.print(\"\\nNext Space(s): \");\n\t\tfor(String n: next){\n\t\t\tSystem.out.print(n +\" \");\t\n\t\t}\n\t\tSystem.out.println(\" \");\n\t}", "public static String FormatNumber(int i) {\n\t\ttry {\n\t\t\tif (i >= 0 && i < 10)\n\t\t\t\treturn \"0\" + i;\n\t\t\telse\n\t\t\t\treturn \"\" + i;\n\t\t} catch (Exception e) {\n\t\t\treturn \"\";\n\t\t}\n\t}", "public static void show() {\r\n\t\t int[] forword=new int[6];\r\n\t\t int[] temp;\r\n\t\t for(int i=1;i<7;i++){\r\n\t\t\t temp=Arrays.copyOf(forword, 6);\r\n\t\t\t for(int j=0;j<i;j++){\r\n\t\t\t\t if(j==0){\r\n\t\t\t\t\t forword[0]=i;\r\n\t\t\t\t\t System.out.print(forword[0]+\" \");\r\n\t\t\t\t }else{\r\n\t\t\t\t\t forword[j]=forword[j-1]+temp[j-1];\r\n\t\t\t\t\t System.out.print(forword[j]+\" \");\t\t \r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t System.out.println();\r\n\t\t }\r\n\t\t //0-9:48-57 ; A-Z:65-90 ; a-z:97-122 \r\n\t\t\r\n\t}", "public static String formatNumberString(String s, int n){\n\t\tString output = s;\n\t\twhile (output.length() < n)\n\t\t\toutput = \"0\"+output;\n\t\treturn output;\n\t}", "private void printLine(int n, int k) {\n System.out.printf(\"%4d- \", n + 1);\n for (int i = 0; i < k; i++) {\n if (i % 10 == 0) System.out.printf(\" \");\n System.out.printf(\"%c\", seq.get(i + n));\n }\n for (int i = k; i < printLength; i++) {\n if (i % 10 == 0) System.out.printf(\" \");\n System.out.printf(\" \");\n }\n System.out.printf(\" -%4d\\n\", n + printLength);\n }", "public static String spaces(int i){\n String spaces = \"\";\n for(int j = 0; j < i; j++)\n {\n spaces = \" \" + spaces;\n }\n return spaces;\n }", "public static String addSpace(int y) {\n\t\tString str = new String();\n\t\tif (y < 10)\n\t\t\tstr = \" \" + y;\n\t\telse if (y < 100)\n\t\t\tstr = \" \" + y;\n\t\telse\n\t\t\tstr = \"\" + y;\n\t\treturn str;\n\t}", "private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(String.format(\"%d\", number));\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n System.out.print(\"Input a number: \");\n int number = scan.nextInt();\n if (number > 0) {\n while (number % 2 == 0) {\n System.out.print(2 + \" \");\n number /= 2;\n }\n\n for (int i = 3; i <= Math.sqrt(number); i += 2) {\n while (number % i == 0) {\n System.out.print(i + \" \");\n number /= i;\n }\n }\n if (number > 2)\n System.out.print(number);\n }\n }", "public static void m9() {\r\n\tfor(int i =1;i<=5;i++) {\r\n\t\t\r\n\t for(int j =1;j<=i;j++) {\r\n\t\t System.out.print(\" \");\r\n\t }\r\n\t char ch ='A';\r\n\t for(int k=0;k<=(5-i);k++) {\r\n\t System.out.print(ch);\r\n\t ch++;\r\n\t }\r\n\t System.out.println();\r\n\t}\r\n}", "public static void tenthProgram() {\n\t\tfor(int i=1;i<=4;i++) {\n\t\t\tfor(int j=1;j<=i-1;j++) {\n\t\t\t\tSystem.out.print(\" \");\t\t\t\n\t\t\t}for(int k=1;k<=4;k++) {\n\t\t\t\tSystem.out.print(\"*\");\t\t\n\t\t\t}System.out.println();\n\t\t}\n\t}", "public static void printSeparator() {\n\t\tfor (int i = 1; i <= 7; i++) {\n\t\t\tSystem.out.print(\"+\");\n\t\t\tfor (int j = 1; j <= 5; j++) {\n\t\t\t\tSystem.out.print(\"-\");\n\n\t\t\t}\n\n\t\t}\n\t\tSystem.out.println(\"+\");\n\n\t}", "public static void printEvenNumbers(int from, int to){\n for(int i=from; i<=to; i++){\n if(i%2==0){\n System.out.print(i + \" \");\n }\n }\n System.out.println();\n }", "public void reverseNumber() {\n\t\tint number = 123456789;\n\t\tint rev = 0;\n\t\twhile (number != 0) {\n\t\t\trev = rev * 10 + number % 10;\n\t\t\tnumber = number / 10;\n\t\t}\n\t\tSystem.out.println(rev);\n\t}", "private String formatNumbers(int[] numbers) {\r\n String formattedResponse = \"\";\r\n for (int number : numbers) {\r\n formattedResponse += number + \" \";\r\n }\r\n return formattedResponse;\r\n }", "private String padded(int i, int length) {\n String current = Integer.toString(i);\n int size = Integer.toString(length).length();\n current = String.format(\"%\" + size + \"s\", current);\n return current;\n }", "public static void bigNumber(int num) {\n\n if (num <= 5) {\n System.out.println(\"\");\n } else {\n int i = 0;\n while (i <= num) {\n if (i != 4) {\n System.out.println(i);\n }\n i++;\n }\n }\n\n }", "public static void spaces() {\r\n // prints 13 spaces\r\n for (int space = 0; space < 15; space++) {\r\n System.out.println(\"\");\r\n }\r\n\r\n }", "public String printNumberInWord(int number) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tString numberWord = null;\n\t\tswitch(number) {\n\t\t\tcase 0:\n\t\t\t\tnumberWord = \"ZERO\";\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tnumberWord = \"ONE\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tnumberWord = \"TWO\";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tnumberWord = \"THREE\";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tnumberWord = \"FOUR\";\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tnumberWord = \"FIVE\";\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tnumberWord = \"SIX\";\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tnumberWord = \"SEVEN\";\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tnumberWord = \"EIGHT\";\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tnumberWord = \"NINE\";\n\t\t\tdefault:\n\t\t\t\tnumberWord = \"OTHER\";\n\t\t\t\t\n\t\t}\n\t\treturn numberWord;\n\t}", "public String zeroPaddingNumber(long j, int i, int i2) {\r\n this.numberFormat.setMinimumIntegerDigits(i);\r\n this.numberFormat.setMaximumIntegerDigits(i2);\r\n return this.numberFormat.format(j);\r\n }", "public void displayBoard() {\n System.out.printf(\"%20s\",\"\"); // to add spacing\n for(int i = 0; i < space[0].length; i++) //Put labels for number axis\n {\n System.out.printf(\"%4d\",i+1);\n }\n System.out.println();\n for(int row = 0; row < this.space.length; row++) { //Put letter labels and appropriate coordinate values\n System.out.print(\" \"+ (char)(row+'A') + \"|\");\n for (String emblem: this.space[row]) //coordinate values\n System.out.print(emblem + \" \");\n System.out.println();\n }\n }", "public String format(int value) {\n\t\t\tmArgs[0] = value;\n\t\t\tmBuilder.delete(0, mBuilder.length());\n\t\t\tmFmt.format(\"%02d\", mArgs);\n\t\t\treturn mFmt.toString();\n\t\t}", "public static int getDigit(int number)\n\t{\n\t\tif(number < 10)\n\t\t{\n\t\t\tSystem.out.println(number);\n\t\t\treturn number;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//ones place\n\t\t\tint firstDigit = number % 10;\n\t\t\t//tens place\n\t\t\tint secondDigit = number / 10;\n\t\t\tSystem.out.println(\"first and second is\" + (firstDigit + secondDigit));\n\t\t\treturn firstDigit + secondDigit;\n\t\t}\n\t}", "public static void concatenateNumbers(List<Integer> numbers){\n\n String ans = numbers\n .stream()\n .map(x -> String.valueOf(x))\n .reduce(\"\", (x, y) -> x + y);\n\n System.out.println(ans);\n }", "public static void binary()\n\t{\n\t\tSystem.out.println(\"enter a decimal number\");\n\t\tint decimal = scanner.nextInt();\n\t\tint length = Integer.valueOf(decimal).toString().length();\n\t\tint number = decimal;\n\t\tint index =0,elementCounter=0,gap=0;\n\t\tint array[] = new int[length*4];\n\t\t\n\t\twhile(number > 0)\n\t\t{\n\t\t\tarray[index++]= number % 2;\n\t\t\tnumber = number / 2; \n\t\t\telementCounter++;\n\t\t\n\t\t}\n\t\tif(elementCounter == length*4)\n\t\t{\n\t\t\tfor(int i=index-1;i>=0;i--)\n\t\t\t{\n\t\t\t\tSystem.out.print(array[i]);\n\t\t\t}\n\t\t}\n\t\n\t\telse\n\t\t{\n\t\t\t\t\n\t\t\tfor (int i = elementCounter+1; i < array.length; i++)\n\t\t\t{\n\t\t\t array[i]=0;\n\t\t\t}\n\t\t\tfor(int i=elementCounter;i < array.length; i++)\n\t\t\t{\n\t\t\t\tSystem.out.print(array[i]);\n\t\t\t\tgap++;\n\t\t\t\tif(gap==4)\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tgap =0;\n\t\t\tfor(int i=index-1;i>=0;i--)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tSystem.out.print(array[i]);\n\t\t\t\tgap++;\n\t\t\t\t\tif(gap==4)\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "static void staircase(int n) {\n\n \t/* Imlementacion para java11 (aqui se creo el repeat)\n \tfor( int i = 1; i <= n; i++ ) {\n \t\tSystem.out.println(\" \".repeat(n - i) + \"#\".repeat(i));\n \t}\n \t */\n\n \tString salida = \"\";\n \tfor( int i = 1; i <= n; i++ ) {\n \t\tfor( int j = 0; j < n - i; j++ ) {\n \t\t\tsalida += \" \"; \n \t\t}\n \t\tfor( int j = 0; j < i; j++ ) {\n \t\t\tsalida += \"#\";\n \t\t}\n \t\tSystem.out.println(salida);\n \t\tsalida = \"\";\n \t}\n }", "private void transNumberToJustDigits(String number) {\n String[] justDigits = number.split(\"-\");\n\n for (String justDigit : justDigits) {\n numberWithoutDashes += justDigit;\n }\n\n }", "private String toImmediate(int val) {\n\t\tString field = \"\";\n\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tfield = (val % 2) + field;\n\t\t\tval /= 2;\n\t\t}\n\t\treturn field;\n\t}", "public static void numberToWords(int number) {\n if(number < 0) {\r\n System.out.println(\"Invalid Value\");\r\n }\r\n int workingNumber = 0;\r\n int reverseNumber = reverse(number);\r\n if(number == 0) {\r\n System.out.println(\"Zero\");\r\n }\r\n while(reverseNumber > 0) {\r\n int switchNumber = reverseNumber % 10;\r\n switch(switchNumber) {\r\n case 0:\r\n System.out.println(\"Zero\");\r\n break;\r\n case 1:\r\n System.out.println(\"One\");\r\n break;\r\n case 2:\r\n System.out.println(\"Two\");\r\n break;\r\n case 3:\r\n System.out.println(\"Three\");\r\n break;\r\n case 4:\r\n System.out.println(\"Four\");\r\n break;\r\n case 5:\r\n System.out.println(\"Five\");\r\n break;\r\n case 6:\r\n System.out.println(\"Six\");\r\n break;\r\n case 7:\r\n System.out.println(\"Seven\");\r\n break;\r\n case 8:\r\n System.out.println(\"Eight\");\r\n break;\r\n case 9:\r\n System.out.println(\"Nine\");\r\n break;\r\n\r\n default:\r\n System.out.println(\"OTHER\");\r\n\r\n }\r\n reverseNumber /= 10;\r\n }\r\n\r\n for(int i = getDigitCount(reverse(number)); i < getDigitCount(number); i++) {\r\n System.out.println(\"Zero\");\r\n }\r\n }", "private void paintNumbers() {\n\n g2d.setColor(_BOARDCOLOR);\n g2d.drawString(\"0\", 100, 150);\n g2d.drawString(\"1\", 200, 150);\n g2d.drawString(\"2\", 300, 150);\n g2d.drawString(\"3\", 400, 150);\n g2d.drawString(\"4\", 100, 250);\n g2d.drawString(\"5\", 200, 250);\n g2d.drawString(\"6\", 300, 250);\n g2d.drawString(\"7\", 400, 250);\n g2d.drawString(\"8\", 100, 350);\n g2d.drawString(\"9\", 200, 350);\n g2d.drawString(\"10\", 300, 350);\n g2d.drawString(\"11\", 400, 350);\n g2d.drawString(\"12\", 100, 450);\n g2d.drawString(\"13\", 200, 450);\n g2d.drawString(\"14\", 300, 450);\n g2d.drawString(\"15\", 400, 450);\n }", "public static void main(String[] args) {\n\t\t\n\t\tint num = 999;\n\t\tString numXXX = \"\";\n\t\t\n\t\tif ((num < 100) & (num >=10) ){\n\t\t\tnumXXX = \"0\" + num;\t\t\n\t\t} else if (num < 10) {\n\t\t\tnumXXX = \"00\" + num; \t\n\t\t} else {\n\t\t\tnumXXX = \"\" + num;\n\t\t}\n\t\t\n\t\tint hundred = Character.digit(numXXX.charAt(0),10);\n\t\tint ten = Character.digit(numXXX.charAt(1),10);\n\t\tint digit = Character.digit(numXXX.charAt(2),10);\n\t\t\n\t\t//System.out.println(numXXX + \":\" + hundred + ten + digit);\n\t\t\n\t\tString hundredStr = \"\";\n\t\tString tenStr = \"\";\n\t\tString digitStr = \"\";\n\t\t\n\t\tswitch (hundred) {\n\t\t\tcase 1: \n\t\t\t\thundredStr = \"one hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 2: \n\t\t\t\thundredStr = \"two hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 3: \n\t\t\t\thundredStr = \"three hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 4: \n\t\t\t\thundredStr = \"four hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 5: \n\t\t\t\thundredStr = \"five hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 6: \n\t\t\t\thundredStr = \"six hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 7: \n\t\t\t\thundredStr = \"seven hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 8: \n\t\t\t\thundredStr = \"eight hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 9: \n\t\t\t\thundredStr = \"nine hundred\";\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\tswitch (ten) {\n\t\t\tcase 1:\n\t\t\t\tif (digit == 0){\n\t\t\t\t\ttenStr = \"ten\";\n\t\t\t\t} else {\n\t\t\t\t\tswitch (digit) {\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\ttenStr = \"eleven\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\ttenStr = \"twelve\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\ttenStr = \"thirteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\ttenStr = \"fourteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\ttenStr = \"fifteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\ttenStr = \"sixteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\ttenStr = \"seventeen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\ttenStr = \"eighteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 9:\n\t\t\t\t\t\t\ttenStr = \"nineteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n \t\t\tcase 2: \n \t\t\t\ttenStr = \"twenty\";\n \t\t\t\tbreak;\n \t\t\tcase 3: \n \t\t\t\ttenStr = \"thirty\";\n \t\t\t\tbreak;\n \t\t\tcase 4: \n \t\t\t\ttenStr = \"fourty\";\n \t\t\t\tbreak;\n \t\t\tcase 5: \n \t\t\t\ttenStr = \"fifty\";\n \t\t\t\tbreak;\n \t\t\tcase 6: \n \t\t\t\ttenStr = \"sixty\";\n \t\t\t\tbreak;\n \t\t\tcase 7: \n \t\t\t\ttenStr = \"seventy\";\n \t\t\t\tbreak;\n \t\t\tcase 8: \n \t\t\t\ttenStr = \"eighty\";\n \t\t\t\tbreak;\n \t\t\tcase 9: \n \t\t\t\ttenStr = \"ninety\";\n \t\t\t\tbreak;\t\n }\n\t\t\n\t\tif ((ten != 1) | (ten == 0)){\n\t\t\tswitch (digit) {\n\t\t\t\tcase 0:\n\t\t\t\t\tif ((ten == 0) & (hundred == 0)){\n\t\t\t\t\t\tdigitStr = \"zero\";\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tdigitStr = \"one\";\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tdigitStr = \"two\";\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tdigitStr = \"three\";\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tdigitStr = \"four\";\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tdigitStr = \"five\";\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tdigitStr = \"six\";\n\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tdigitStr = \"seven\";\n\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tdigitStr = \"eight\";\n\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\t\tdigitStr = \"nine\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (ten == 0){\n\t\t\tSystem.out.println(num + \" => \" + hundredStr + \" \" + digitStr);\n\t\t} else if (ten == 1){\n\t\t\tSystem.out.println(num + \" => \" + hundredStr + \" \" + tenStr);\n\t\t} else if ((ten != 1) & (digit == 0)){\n\t\t\tSystem.out.println(num + \" => \" + hundredStr + \" \" + tenStr);\n\t\t} else {\n\t\t\tSystem.out.println(num + \" => \" + hundredStr + \" \" + tenStr + \"-\" + digitStr);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args){\n\n for(int n = 2; n < 102; n+=2)System.out.printf(\"%d\\n\",n);\n \n \n }" ]
[ "0.6745821", "0.6619905", "0.6501745", "0.64220905", "0.6318742", "0.6268193", "0.62664926", "0.6250016", "0.62085205", "0.6089241", "0.6078837", "0.60788137", "0.60616505", "0.6014219", "0.5998936", "0.599569", "0.59703565", "0.59431285", "0.59264326", "0.5913578", "0.59134716", "0.59068286", "0.5900524", "0.5895458", "0.58923995", "0.58750474", "0.58707935", "0.5867442", "0.58507", "0.5847945", "0.5840003", "0.583395", "0.5814199", "0.5794165", "0.57883656", "0.578775", "0.57871085", "0.5783421", "0.5779242", "0.57760996", "0.576363", "0.57608384", "0.57429606", "0.57258683", "0.57195044", "0.5716131", "0.57152563", "0.5707821", "0.5703762", "0.5703306", "0.56967705", "0.56832385", "0.5679628", "0.5676375", "0.5659936", "0.56565964", "0.56505805", "0.56470317", "0.5643519", "0.5632493", "0.56222796", "0.5613427", "0.5610607", "0.5608442", "0.56070155", "0.5602846", "0.5597662", "0.55940175", "0.55925095", "0.5590635", "0.55883014", "0.55853087", "0.5570202", "0.5561099", "0.5556468", "0.555139", "0.55429465", "0.55405086", "0.55360144", "0.553374", "0.55329955", "0.55230224", "0.5520773", "0.55162555", "0.5510482", "0.5509616", "0.5508501", "0.5500712", "0.5498457", "0.5498325", "0.5493846", "0.54868513", "0.5482692", "0.5480888", "0.5477489", "0.5476485", "0.54731506", "0.546858", "0.54583156", "0.54572064" ]
0.6321504
4
TODO Autogenerated method stub
@Override protected void controlUpdate(float tpf) { }
{ "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 protected void controlRender(RenderManager rm, ViewPort vp) { }
{ "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 PrintWriter getLogWriter() throws SQLException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void setLogWriter(PrintWriter out) throws SQLException { }
{ "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 setLoginTimeout(int seconds) throws SQLException { }
{ "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 int getLoginTimeout() throws SQLException { return 0; }
{ "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 Logger getParentLogger() throws SQLFeatureNotSupportedException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public <T> T unwrap(Class<T> iface) throws SQLException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@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 boolean isWrapperFor(Class<?> iface) throws SQLException { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public Connection getConnection() throws SQLException { if(listConnection.size() > 0){ final Connection conn = listConnection.removeFirst(); return (Connection) Proxy.newProxyInstance(JdbcPool.class.getClassLoader(), conn.getClass().getInterfaces(), new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { // TODO Auto-generated method stub if(!method.getName().equals("close")){ return method.invoke(conn, args); }else{ listConnection.add(conn); return null; } } }); }else{ throw new RuntimeException("对不起,数据库忙"); } }
{ "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 Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if(!method.getName().equals("close")){ return method.invoke(conn, args); }else{ listConnection.add(conn); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public Connection getConnection(String username, String password) throws SQLException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@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
Gets the wrapped model.
IModel getWrappedModel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic T getModel() {\n\t\treturn model;\r\n\t}", "public BaseSlingModel getGenericModel() {\n return model;\n }", "public Model getModel () { return _model; }", "@JsonIgnore\n @Override\n public Model getModel() {\n return this.model;\n }", "public Model getModel() {\n return model;\n }", "public Model getModel() {\n return model;\n }", "public Model getModel() {\n return model;\n }", "public Model getModel() {\n return model;\n }", "protected E getModel ()\n\t{\n\t\treturn model;\n\t}", "public DataModel getModel() {\n return model;\n }", "public Model getModel() {\n\t\treturn model;\n\t}", "public Model getModel() {\n\t\treturn model;\n\t}", "public Model getModel() {\n\t\treturn model;\n\t}", "public AbstractModel getModel() {\n return model;\n }", "public Model getModel(){\r\n return model;\r\n }", "@Override\r\n\tpublic Model getModel() {\n\t\treturn this.model;\r\n\t}", "public ModelSnapshot getModel() {\n return model;\n }", "public ExtFilterLazyDataModel<T> getModel() {\n if (model == null) {\n model = new ExtFilterLazyDataModel<T>(dao);\n String queryBody = generateQuery().toString();\n model.setSelectQuery(queryBody);\n model.setParameters(modelParams);\n }\n return model;\n }", "public Model getModel()\n\t{\n\t\treturn this.model;\n\t}", "public WidgetModel getModel() {\n return model;\n }", "public ContainmentModel getModel()\n {\n return m_model;\n }", "public Object getModel();", "ModelData getModel();", "TypedModel getModel();", "public abstract <T extends BaseSlingModel> T getModel();", "public Object getModel() {\n\t\treturn null;\n\t}", "public Behavior getModel(){\n\t\treturn (this.model);\n\t}", "public Class getModelClass() {\r\n\t\treturn model;\r\n\t}", "public Document getModel(){\n return getDocument();\n }", "@Override\n\tpublic CalEntity getModel() {\n\t\treturn model;\n\t}", "public Model getModel() {\n return petal_model;\n }", "public MediaModel getModel()\n\t{\n\t\treturn model;\n\t}", "public BaseModel getBaseModel() {\n return localBaseModel;\n }", "public Object getModel()\n {\n AttributeDescriptor.ComponentType compType = _attrDef.getComponentType();\n return getModel(compType);\n }", "public String getModel() {\r\n return model;\r\n }", "public String getModel() {\n return model;\n }", "public String getModel() {\n return model;\n }", "Model getModel();", "Model getModel();", "Model getModel();", "public String getModel()\n {\n return model;\n }", "@Override\n\tpublic Classes getModel() {\n\t\treturn model;\n\t}", "public TableModel getModel() {\n return model;\n }", "public ModelElements getModelAccess() {\n\t\treturn pModel;\n\t}", "@Override\n\tpublic String getModel() {\n\t\treturn model;\n\t}", "public EPStatementObjectModel getModel() {\n return model;\n }", "public OntModel getModel()\r\n\t{\r\n\t\treturn this.ONT_MODEL;\r\n\t}", "public String getModel() {\n return this.model;\r\n }", "protected IModel<T> getFormModel() {\n return formModel;\n }", "public DataModel getDataModel() {\r\n\t\treturn this.model;\r\n\t}", "public Model getCurrentModel() {\n return currentModel;\n }", "public String getModel() {\n\t\treturn model; \n\t}", "public abstract M getModel();", "public ModelBean provideModel();", "public User getModel() {\n\t\treturn model;\r\n\t}", "public Class<T> getModelClass() {\n\t\treturn modelClass;\n\t}", "@Override\n\t\t\t\tpublic TableModel getModel() {\n\t\t\t\t\treturn model;\n\t\t\t\t}", "@Override\r\n\tpublic Object getModel() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic TemplateModel wrap(Object object) throws TemplateModelException\r\n {\r\n\t\tif (object == null)\r\n\t\t{\r\n\t\t\treturn super.wrap(object);\r\n\t\t}\r\n\t\t\r\n\t\tif (object instanceof TemplateModel) {\r\n return (TemplateModel) object;\r\n }\r\n\t\t\r\n\t\t//TODO implement caching, see super.wrap\r\n\t\t\r\n \tModelFactory modelFactory = _getModelFactory(object.getClass());\r\n \t\r\n \tif (modelFactory == null)\r\n\t\t{\r\n\t\t\t//we have no model factory, let super handle it\r\n\t\t\treturn super.wrap(object);\r\n\t\t} else\r\n\t\t{\r\n\t\t\t//use the factory to wrap the model\r\n\t\t\treturn modelFactory.create(object, this);\r\n\t\t}\r\n }", "public Object getModel() {\n\t\treturn bm;\r\n\t}", "public String getModel()\n\t{\n\t\treturn model;\n\t}", "public QueryModel getQueryModel()\n {\n return _queryModel;\n }", "DppBaseResourceInner innerModel();", "public FakeAppModel getFakeModel() {\n return mFakeModel;\n }", "public ModelMaker getBaseModelMaker() {\n return maker;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic AEntityMetaModel<?> getEntityMetaModel() {\r\n\t\tif (null == entityMetaModel) {\r\n\t\t\ttry {\r\n\t\t\t\tString entityMMClassName = pluginResources.getClassName(getEntityKeys()[2], getEntityKeys()[1]);\r\n\t\t\t\tGencodePath gencodePath = pluginResources.getGencodePath();\r\n\t\t\t\tentityMetaModel = (AEntityMetaModel<T>) gencodePath.instantiateClass(gencodePath.getClazz(entityMMClassName, true),\r\n\t\t\t\t\t\tnew Class[] { PluginEntity.class }, new Object[] { this });\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn entityMetaModel;\r\n\t}", "static RatAppModel getInstance() {return model;}", "public Object getObject() {\n return getObject(null);\n }", "@Override\n\tpublic Object getModel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object getModel() {\n\t\treturn null;\n\t}", "public Map<String, Object> getModel() {\n\t return getModelMap();\n\t }", "IDataModel getIDataModel();", "@Override\r\n\tpublic Dictionary getModel() {\n\t\treturn dictionary;\r\n\t}", "synchronized public AppsModel getAppsModel() {\n if (mAppsModel == null) {\n mAppsModel = new AppsModel(this);\n }\n return mAppsModel;\n }", "A getModel();", "@Override\r\n\tpublic Object getModel() {\n\t\treturn searchInfo;\r\n\t}", "public LdapFilter getModel()\n {\n return model;\n }", "public static synchronized Model getInstance() {\n if (instance == null) {\n instance = new Model();\n }\n return instance;\n }", "@Override\n\tpublic SellItemModel getModel() {\n\t\treturn itemModel;\n\t}", "public ListModelTable getModel()\n {\n\t\tif (super.getModel() instanceof ListModelTable)\n\t\t{\n\t \treturn (ListModelTable)super.getModel();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"Model must be instance of \" + ListModelTable.class.getName());\n\t\t}\n }", "public InMemoryNodeModel getParentModel()\n {\n return getParentModelSupport().getNodeModel();\n }", "@ApiModelProperty(required = true, value = \"The model used for the voice synthesis. The model could be a basic tts model or a customized tts model\")\n public ModelIdentity getModel() {\n return model;\n }", "public Object getModel() {\n\t\treturn quest;\r\n\t}", "public LazyCommentDataModel getCommentModel() {\r\n return commentModel;\r\n }", "public IServiceModel getActiveModel() {\n return activeModel;\n }", "protected Object resolveModel(Object model) {\n\t\treturn model;\n\t}", "@Override\n\tpublic Product getModel() {\n\t\treturn product;\n\t}", "@Override\n\t//封装数据\n\tpublic Member getModel() {\n\t\treturn member;\n\t}", "public SpinnerModel getModel() {\n return spinner.getModel();\n }", "public UserModel getUserModel() {\n return localUserModel;\n }", "M getModel();", "public final FocusModel<T> getFocusModel() {\n\n return this.getWrappedControl().getFocusModel();\n }", "public String getModel() {\r\n return (String) store.get(Names.model);\r\n }", "@Override\r\n\tpublic Object getModel() {\n\t\treturn this.roomcalander;\r\n\t}", "public CQLModel getCqlModel() {\r\n return cqlModel;\r\n }", "public String getModel();", "protected Model makeModel()\n {\n LayerList layers = new LayerList();\n\n for (Layer layer : this.observered.getModel().getLayers())\n {\n if (layer instanceof TiledImageLayer) // share TiledImageLayers\n layers.add(layer);\n }\n\n Model model = new BasicModel();\n model.setGlobe(this.observered.getModel().getGlobe()); // share the globe\n model.setLayers(layers);\n\n return model;\n }", "@Override\n\tpublic Object getModel() \n\t{\n\t\treturn room;\n\t}", "public ModelDto getModelDto() {\r\n\t\tlog.debug(\" getter modelDto=\"+modelDto);\r\n\t\treturn modelDto;\r\n\t}", "public RegionModel getModel() {\n\t\treturn model;\n\t}" ]
[ "0.7677734", "0.74096006", "0.73432535", "0.72513777", "0.72344565", "0.72344565", "0.72344565", "0.72344565", "0.7146566", "0.7113838", "0.7085995", "0.7085995", "0.7085995", "0.70789975", "0.7045745", "0.70022845", "0.6957492", "0.6931783", "0.68918484", "0.68242025", "0.6759209", "0.6756077", "0.6749055", "0.6744046", "0.6740989", "0.67109144", "0.67011744", "0.6694242", "0.66818744", "0.66724813", "0.6627083", "0.6595803", "0.653903", "0.64973605", "0.64911944", "0.64889205", "0.64889205", "0.64789605", "0.64789605", "0.64789605", "0.64766806", "0.64742655", "0.642594", "0.6397782", "0.6395434", "0.6391381", "0.6387119", "0.6376149", "0.6367239", "0.6367216", "0.6360311", "0.63582975", "0.6335707", "0.6329668", "0.6320489", "0.63190085", "0.6317426", "0.63139147", "0.6312249", "0.6271742", "0.6261744", "0.6246025", "0.62389314", "0.61983615", "0.61871296", "0.6182923", "0.6160809", "0.6157304", "0.6142966", "0.6142966", "0.61345625", "0.6121125", "0.6111371", "0.609728", "0.60918826", "0.6086247", "0.60826653", "0.6043753", "0.59976935", "0.59939843", "0.59935945", "0.5969201", "0.5966193", "0.5958375", "0.5957153", "0.59423804", "0.59012353", "0.5898731", "0.5888222", "0.58831614", "0.58779246", "0.5872873", "0.5863554", "0.58588284", "0.58542293", "0.5841123", "0.58360803", "0.5826512", "0.58250725", "0.5822944" ]
0.83124316
0
private final StatefulRedisConnection connection;
public LettuceCacheManager(CachingProvider cachingProvider, URI uri, ClassLoader classLoader, Properties properties) { super(cachingProvider, uri, classLoader, properties); RedisURI redisURI = RedisURI.create(uri); RedisClient redisClient = RedisClient.create(redisURI); this.redisClient = redisClient; // this.connection = redisClient.connect(new ByteArrayCodec()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RedisConnector() {\n super();\n\n ensureRedisClient();\n }", "private RedisClient() {\n\n }", "public RedisClient() {\n init();\n }", "public interface RedisService {\n\n boolean existsKey(String key);\n\n void removeKey(String key);\n\n void pushMsg(String key, String message);\n\n void setRedis(String key,String value,int second);\n\n String getRedisValue(String key);\n\n boolean acquireLock(String lockKey ,long expired);\n\n void releaseLock(String lockKey);\n}", "@Bean\n RedisTemplate<Object, Object> redisTemplate() {\n RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>();\n redisTemplate.setConnectionFactory(jedisConnectionFactory());\n return redisTemplate;\n }", "private Connection () {}", "public\n Connection getConnection();", "public RedisAdvancedClusterReactiveCommandsImpl(StatefulRedisClusterConnection<K, V> connection, RedisCodec<K, V> codec) {\n super(connection, codec);\n this.codec = codec;\n }", "@Test(groups = { \"Integration\" })\n public void testRedisConnection() throws Exception {\n redis = app.createAndManageChild(EntitySpec.create(RedisStore.class));\n app.start(ImmutableList.of(loc));\n\n EntityAsserts.assertAttributeEqualsEventually(redis, Startable.SERVICE_UP, true);\n\n JedisSupport support = new JedisSupport(redis);\n support.redisTest();\n }", "public interface JedisDataSource {\n Jedis getRedisClient();\n void returnResource(Jedis jedis);\n void returnResource(Jedis jedis, boolean broken);\n}", "public Connection getCachedConnection (CConnection connection);", "public Connection getCachedConnection (CConnection connection);", "public Connection getConnection();", "public Connection getConnection();", "public Connection getConnection();", "public Connection getConnection() {\r\n return connection;\r\n }", "public Connection getConnection() {\r\n return connection;\r\n }", "Connection getConnection() {\n\t\treturn connection;\n\t}", "@Bean\n JedisConnectionFactory jedisConnectionFactory() {\n JedisConnectionFactory factory = new JedisConnectionFactory();\n factory.setHostName(env.getProperty(\"redis.host-name\"));\n factory.setPort(env.getProperty(\"redis.port\", Integer.class));\n factory.setUsePool(true);\n return factory;\n }", "public Connection getConn() {return conn;}", "protected Connection getConnection () {\n \t\treturn connection;\n \t}", "public interface RedisService\n{\n void storeUserInfoVo() throws Exception;\n\n void updateRedis(String openId) throws Exception;\n\n}", "public Connection getConnection(){\r\n\t\treturn connection;\r\n\t}", "public Connection getConnection() {\n return connection;\n }", "@Override\n \tpublic void reconnectionSuccessful() {\n \t}", "public abstract Connection getConnection();", "public Connection getMyConnection(){\n return myConnection;\n }", "ClientConnection connection();", "@Override\n protected String getRedisKey() {\n return REDIS_KEY;\n }", "private void setJedisFromPool() {\n\t\tjedis = jedisPool.getResource();\n\t}", "public interface RedisService {\n// void setKey(String key,String value);\n// void setKeyVsExpireTime(String key, String value, long time); //单位为妙\n// String getValue(String key);\n\n\n\n}", "public interface IRedisService {\n\n /**\n * 保存到缓存\n *\n * @param key\n * @param timeOut 超时时间 秒\n * @param value\n */\n void set(String key, Integer timeOut, String value);\n\n /**\n * 保存到缓存\n *\n * @param key\n * @param value\n */\n void set(String key, String value);\n\n /**\n * 通过key获取\n *\n * @param key\n * @return\n */\n String get(String key);\n\n /**\n * 通过key移除\n *\n * @param key\n */\n void remove(String key);\n\n}", "public IConnection getConnection () { \n\t\treturn connection;\n\t}", "public Connection getConnection()\n\t{\n\t\treturn connection;\n\t}", "@VertxGen\npublic interface Redis extends ReadStream<Response> {\n\n /**\n * Connect to redis, the {@code onConnect} will get the {@link Redis} instance.\n */\n static void createClient(Vertx vertx, SocketAddress address, Handler<AsyncResult<Redis>> onCreate) {\n createClient(vertx, new RedisOptions().setEndpoint(address), onCreate);\n }\n\n /**\n * Connect to redis, the {@code onConnect} will get the {@link Redis} instance.\n */\n static void createClient(Vertx vertx, RedisOptions options, Handler<AsyncResult<Redis>> onCreate) {\n RedisClient.create(vertx, options.getEndpoint(), options, onCreate);\n }\n\n /**\n * Connect to redis, the {@code onConnect} will get the {@link Redis} instance.\n */\n static void createSentinelClient(Vertx vertx, SocketAddress address, Handler<AsyncResult<Redis>> onCreate) {\n createSentinelClient(vertx, new RedisOptions().setEndpoint(address).setRole(RedisRole.MASTER).setMasterName(\"mymaster\"), onCreate);\n }\n\n /**\n * Connect to redis, the {@code onConnect} will get the {@link Redis} instance.\n */\n static void createSentinelClient(Vertx vertx, RedisOptions options, Handler<AsyncResult<Redis>> onCreate) {\n RedisSentinelClient.create(vertx, options, onCreate);\n }\n\n /**\n * Connect to redis, the {@code onConnect} will get the {@link Redis} instance.\n */\n static void createClusterClient(Vertx vertx, SocketAddress address, Handler<AsyncResult<Redis>> onCreate) {\n createClusterClient(vertx, new RedisOptions().setEndpoint(address).setUseSlave(RedisSlaves.NEVER), onCreate);\n }\n\n /**\n * Connect to redis, the {@code onConnect} will get the {@link Redis} instance.\n */\n static void createClusterClient(Vertx vertx, RedisOptions options, Handler<AsyncResult<Redis>> onCreate) {\n RedisClusterClient.create(vertx, options, onCreate);\n }\n\n /**\n * Set an exception handler on the read stream.\n *\n * @param handler the exception handler\n * @return a reference to this, so the API can be used fluently\n */\n Redis exceptionHandler(Handler<Throwable> handler);\n\n /**\n * Set a data handler. As data is read, the handler will be called with the data.\n *\n * @return a reference to this, so the API can be used fluently\n */\n @Fluent\n Redis handler(Handler<Response> handler);\n\n /**\n * Pause the {@code ReadStream}, it sets the buffer in {@code fetch} mode and clears the actual demand.\n * <p>\n * While it's paused, no data will be sent to the data {@code handler}.\n *\n * @return a reference to this, so the API can be used fluently\n */\n @Fluent\n Redis pause();\n\n /**\n * Resume reading, and sets the buffer in {@code flowing} mode.\n * <p/>\n * If the {@code ReadStream} has been paused, reading will recommence on it.\n *\n * @return a reference to this, so the API can be used fluently\n */\n @Fluent\n Redis resume();\n\n /**\n * Fetch the specified {@code amount} of elements. If the {@code ReadStream} has been paused, reading will\n * recommence with the specified {@code amount} of items, otherwise the specified {@code amount} will\n * be added to the current stream demand.\n *\n * @return a reference to this, so the API can be used fluently\n */\n @Fluent\n Redis fetch(long amount);\n\n /**\n * Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.\n *\n * @return a reference to this, so the API can be used fluently\n */\n @Fluent\n Redis endHandler(@Nullable Handler<Void> endHandler);\n\n\n @Fluent\n Redis send(Request command, Handler<AsyncResult<@Nullable Response>> onSend);\n\n @Fluent\n Redis batch(List<Request> commands, Handler<AsyncResult<List<@Nullable Response>>> handler);\n\n /**\n * Returns the address associated with this client.\n * @return the address.\n */\n SocketAddress socketAddress();\n\n void close();\n}", "public void setConn(Connection conn) {this.conn = conn;}", "public Connection getConnection() {\n return conn;\n }", "public Connection getConnection() {\n return conn;\n }", "public interface InboundConnectionCache<C extends Connection> extends ConnectionCache<C> {\n /** Mark a connection as busy because a request is being processed\n * on the connection. The connection may or may not be previously\n * known to the cache when this method is called.\n * Busy connections cannot be reclaimed.\n * This provides an early indication that a Connection is in use,\n * before we know how many responses still need to be sent on\n * the Connection for this request. This reduces the likelyhood\n * of reclaiming a connection on which we are processing a request.\n * <P>\n * Note that this problem is inherent in a distributed system.\n * We could in any case reclaim a connection AFTER a client\n * has sent a request but BEFORE the request is received.\n * Note that AFTER and BEFORE refer to global time which does\n * not really exist in a distributed system (or at least we\n * want to pretend it is not available).\n *\n * XXX Should we age out connections?\n * This would require actual time stamps, rather than just an LRU queue.\n */\n void requestReceived( C conn ) ;\n\n /** Indicate that request processing has been completed for a request\n * received on conn. This indicates that a Connection that received\n * a request as indicated in a previous call to requestReceived has\n * completed request processing for that request. Responses may still\n * need to be sent. Some number of\n * responses (usually 0 or 1) may be expected ON THE SAME CONNECTION\n * even for an idle connection. We maintain a count of the number of\n * outstanding responses we expect for protocols that return the response\n * on the same connection on which the request was received. This is\n * necessary to prevent reclamation of a Connection that is idle, but\n * still needed to send responses to old requests.\n */\n void requestProcessed( C conn, int numResponseExpected ) ;\n\n /** Inform the cache that a response has been sent on a particular\n * connection.\n * <P>\n * When a Connection is idle, and has no pending responses, it is\n * eligible for reclamation.\n */\n void responseSent( C conn ) ;\n}", "public interface RedisCacheService {\n void put(Object key , Object value);\n Object get(Object key);\n}", "@Bean\n public RedisTemplate<String, Object> redisTemplate() {\n RedisTemplate<String,Object> redisTemplate = new RedisTemplate<String, Object>();\n redisTemplate.setConnectionFactory(lettuceConnectionFactory());\n redisTemplate.afterPropertiesSet();\n return redisTemplate;\n }", "public String getConnection()\n {\n return this.connection;\n }", "private SequencerConnection() { }", "private void ensureRedisClient() {\n if (_redisClient != null) {\n return;\n }\n\n synchronized (RedisConnector.class) {\n if (_redisClient != null) {\n return;\n }\n\n ContainerLogger.getInstance().info(\"Creating shared lettuce.io RedisClient\");\n _redisClient = RedisClient.create();\n }\n }", "private Connection() {\n \n }", "@Override\n\tpublic BaseResponse getRedis(String key) {\n\t\treturn null;\n\t}", "@Override\n \tpublic void connectionClosed() {\n \t\t\n \t}", "@Test\n @FixFor(\"DBZ-4509\")\n public void testRedisConnectionRetry() throws Exception {\n Testing.Print.enable();\n\n Jedis jedis = new Jedis(HostAndPort.from(RedisTestResourceLifecycleManager.getRedisContainerAddress()));\n // wait until the offsets are written for the first time\n TestUtils.awaitHashSizeGte(jedis, OFFSETS_HASH_NAME, 1);\n\n // clear the offsets key\n jedis.del(OFFSETS_HASH_NAME);\n\n // pause container\n Testing.print(\"Pausing container\");\n RedisTestResourceLifecycleManager.pause();\n\n final PostgresConnection connection = TestUtils.getPostgresConnection();\n Testing.print(\"Creating new redis_test table and inserting 5 records to it\");\n connection.execute(\n \"CREATE TABLE inventory.redis_test (id INT PRIMARY KEY)\",\n \"INSERT INTO inventory.redis_test VALUES (1)\",\n \"INSERT INTO inventory.redis_test VALUES (2)\",\n \"INSERT INTO inventory.redis_test VALUES (3)\",\n \"INSERT INTO inventory.redis_test VALUES (4)\",\n \"INSERT INTO inventory.redis_test VALUES (5)\");\n connection.close();\n\n Testing.print(\"Sleeping for 2 seconds to flush records\");\n Thread.sleep(2000);\n Testing.print(\"Unpausing container\");\n\n RedisTestResourceLifecycleManager.unpause();\n Testing.print(\"Sleeping for 2 seconds to reconnect to redis and write offset\");\n\n // wait until the offsets are re-written\n TestUtils.awaitHashSizeGte(jedis, OFFSETS_HASH_NAME, 1);\n\n Map<String, String> redisOffsets = jedis.hgetAll(OFFSETS_HASH_NAME);\n jedis.close();\n assertThat(redisOffsets.size() > 0).isTrue();\n }", "public void recycle(SnRpcConnection connection) throws Throwable {\n\t\tif (null != connection) {\n\t\t\tpool.returnObject(connection);\n\t\t}\n\t}", "Object exec(Jedis jedis);", "@Override\n\tpublic void connectionClosed() {\n\t}", "private ConnectionState<C> getConnectionState( C conn ) {\n // This should be the only place a CacheEntry is constructed.\n if (debug())\n dprint( \"->getConnectionState: \" + conn ) ;\n\n try {\n ConnectionState<C> result = connectionMap.get( conn ) ;\n if (result == null) {\n if (debug())\n dprint( \".getConnectionState: \" + conn +\n \" creating new ConnectionState instance\" ) ;\n result = new ConnectionState<>(conn) ;\n connectionMap.put( conn, result ) ;\n totalIdle++ ;\n }\n\n return result ;\n } finally {\n if (debug())\n dprint( \"<-getConnectionState: \" + conn ) ;\n }\n }", "public interface RedisService {\n public void addRedis(RedisAnswerRecord redisAnswerRecord);\n public void updateRedis(RedisAnswerRecord redisAnswerRecord);\n public List<RedisAnswerRecord> queryRedis(List<Integer> userid);\n public RedisAnswerRecord queryRedisByKey(String userid,String key);\n\n\n}", "protected Connection getConnection() {\n return con;\n }", "public interface RedisService {\n\n <K,V> void setObject(K key, V value, Integer timeout);\n\n <K,V> V getObject(K key);\n\n <K> void remove(K key);\n\n <K> void removeAll(K ... keys);\n}", "public RepositoryConnection(Connection conn) {\n this.conn = conn;\n }", "@NonNull\n protected final Connection getConnection() {\n return mConnection;\n }", "public Connection getConn() {\r\n return conn;\r\n }", "InstrumentedConnection getConnection();", "ConnectionState( final C conn ) {\n this.connection = conn ;\n\n busyCount = 0 ;\n expectedResponseCount = 0 ;\n reclaimableHandle = null ;\n }", "void getConnection() {\n }", "public void connect(Vertx vertx, String host, int port, Handler<AsyncResult<Void>> handler) { TODO(feature in future):\n // we can change options to support redis cluster or sentinel.\n //\n RedisOptions options = new RedisOptions();\n options.setEndpoint(SocketAddress.inetSocketAddress(port, host));\n Redis.createClient(vertx, options).connect(onConnect -> {\n if (onConnect.succeeded()) {\n this.client = onConnect.result();\n this.redisAPI = RedisAPI.api(this.client);\n logger.info(\"succeed connect to redis host \" + host + \":\" + port);\n } else {\n logger.warn(\"failed to connect redis server. cause: \", onConnect.cause());\n }\n if (null != handler) {\n handler.handle(new AsyncResult<Void>() {\n @Override\n public Void result() {\n return null;\n }\n\n @Override\n public Throwable cause() {\n return onConnect.cause();\n }\n\n @Override\n public boolean succeeded() {\n return onConnect.succeeded();\n }\n\n @Override\n public boolean failed() {\n return onConnect.failed();\n }\n });\n }\n });\n }", "public int getConnectionStatus()\r\n { return connectionStatus; }", "public void setConnection(Connection connection) {\n this.connection = connection;\n }", "public ConnectionConfig getConnectionConfig()\n {\n return _connectionConfig;\n }", "private Connection(){\n\n }", "@Bean\n public LettuceConnectionFactory lettuceConnectionFactory() {\n return new LettuceConnectionFactory(new RedisStandaloneConfiguration());\n }", "public Connection getConnection() {\n\t\treturn this.connection;\n\t}", "public Connection ObtenirConnexion(){return cn;}", "@Override\n public void connectionLost() {\n }", "public Connection(Channel channel) {\r\n this.channel = channel;\r\n }", "private void getClient(SocketAddress address, RedisOptions options, Handler<AsyncResult<Redis>> onClient) {\n\n Redis cli = connections.get(address);\n\n // already have a connection to this client, return that\n if (cli != null) {\n onClient.handle(Future.succeededFuture(cli));\n return;\n }\n\n RedisClient.create(vertx, address, options, create -> {\n if (create.failed()) {\n onClient.handle(create);\n return;\n }\n\n final Redis conn = create.result();\n\n conn.exceptionHandler(t -> {\n // broken connection so force a new client to be created\n connections.remove(address);\n // propagate the exception\n if (onException != null) {\n onException.handle(t);\n }\n\n // now since the clients are unbalanced, we need to reload the slots\n getSlots(options, ar -> {\n if (ar.failed()) {\n // getting slots failed, so raise the exception\n if (onException != null) {\n onException.handle(ar.cause());\n }\n }\n });\n });\n\n conn.endHandler(v -> {\n // closed connections should be removed\n connections.remove(address);\n // how many connections are still open?\n // when there's more than 0 then we can still operate\n if (connections.size() == 0) {\n // all connections are closed so we must assume this\n // cluster is ended (or we can't recover)\n if (onEnd != null) {\n onEnd.handle(null);\n }\n }\n });\n\n conn.handler(r -> {\n if (onMessage != null) {\n onMessage.handle(r);\n }\n });\n\n connections.put(address, conn);\n onClient.handle(Future.succeededFuture(conn));\n });\n }", "SocketReader newSocketReader(SocketConnection connection);", "public void setConnection(Connection conn);", "@Override\n\tpublic void connectionReady() {\n\t}", "public Socket getConnection() {\n return connection;\n }", "@Override\n \tpublic void reconnectionFailed(Exception arg0) {\n \t}", "public int connectionCount()\n {\n return _connectionCount;\n }", "@Override\r\n\tpublic Connection getConnection() {\n\t\treturn null;\r\n\t}", "@org.junit.Test\r\n public void test() {\n Jedis jedis = new Jedis(\"16.186.75.216\");\r\n System.out.println(\"connected successfully\");\r\n //set redis string value\r\n jedis.set(\"runoobkey\", \"www.runoob.com\");\r\n // get the stored value based on the key\r\n System.out.println(\"redis store strings: \"+ jedis.get(\"runoobkey\"));\r\n }", "public interface ConnectionStateHandler {\n void onConnected();\n void onConnectionFailed(Exception e);\n}", "public Connection getConnectionStatus() {\n\t\treturn this.connection;\n\t}", "private void init() {\n\t\tJedisPoolConfig config = new JedisPoolConfig();\r\n\t\tconfig.setMaxTotal(1024);\r\n\t\tconfig.setMaxIdle(200);\r\n\t\tconfig.setMaxWaitMillis(1000);\r\n\t\tconfig.setTestOnBorrow(false);\r\n\t\tconfig.setTestOnReturn(true);\r\n\t\tString ip = \"sg-redis-new.jo1mjq.0001.apse1.cache.amazonaws.com\";\r\n\t\tint port = 6379;\r\n\t\tjedisPool = new JedisPool(config, ip, port);\r\n\t\tlog.info(\"init redis pool[ip:\" + ip + \",port:\" + port + \"]\");\r\n\t}", "@Override\r\n\t\tpublic void onConnect(Connection connection) {\n\r\n\t\t}", "public Connection getCon() {\r\n return con;\r\n }", "public Connection() {\n\t\t\n\t}", "public interface SessionFactory {\n /**\n * Retrieves a new session. If the session isn't closed, second call from the same thread would\n * result in retrieving the same session\n *\n * @return\n */\n Session getSession();\n\n /**\n * Closes the current session associated with this transaction if present\n */\n void closeSession();\n\n /**\n * Returns true if we have connected the factory to redis\n *\n * @return\n */\n boolean isConnected();\n\n /**\n * Closes the session factory which disposes of the underlying redis pool\n */\n void close();\n}", "protected void connectionClosed() {}", "public Connection getConn()\r\n\t{\r\n\t\treturn this.conn;\r\n\t}", "Connection createConnection();", "public interface ConnectionManager {\n\tConnection getConnection();\n\tvoid releaseConnection(Connection con);\n}", "@Bean()\n Mono<Connection> connectionMono(RabbitProperties rabbitProperties) {\n ConnectionFactory connectionFactory = new ConnectionFactory();\n connectionFactory.setHost(rabbitProperties.getHost());\n connectionFactory.setPort(rabbitProperties.getPort());\n connectionFactory.setUsername(rabbitProperties.getUsername());\n connectionFactory.setPassword(rabbitProperties.getPassword());\n return Mono.fromCallable(() -> connectionFactory.newConnection(\"reactor-rabbit\")).cache();\n }", "boolean userInRedisSession(String token);", "@Fluent\n Redis handler(Handler<Response> handler);", "byte[] makeBindaryData(RedisSession session) throws IOException;", "protected void connectionEstablished() {}", "public ConnectionList() {\n connections = new ConcurrentHashMap<>();\n keyCounter = 0;\n }", "public Connection getConn()\n\t{\n\t\treturn this.conn;\n\t}", "RedisManager authenticate(AzureTokenCredentials credentials, String subscriptionId);", "public ConnectionConfig createConnection()\n {\n return _connectionConfig;\n }", "public interface JedisLockSupport {\r\n\t\r\n\t/**\r\n\t * Acquire the lock on passed key and set its owner\r\n\t * It will try once and will return immediately\r\n\t * @param key the key to set lock against\r\n\t * @param owner lock owner\r\n\t * @return true if lock is acquired\r\n\t */\r\n\tpublic boolean acquire(String key, String owner);\r\n\t\r\n\t\r\n\t/**\r\n\t * Acquire the lock on passed key\r\n\t * It will try to get lock for timeout passed\r\n\t * @param key\r\n\t * @param owner\r\n\t * @param timeout\r\n\t * @param timeUnit\r\n\t * @return true if lock is acquired\r\n\t */\r\n\tpublic boolean tryAcquire(String key, String owner, long timeout, TimeUnit timeUnit);\r\n\t\r\n\t/**\r\n\t * Releases the lock\r\n\t * @param key\r\n\t * @param owner\r\n\t */\r\n\tpublic void release(String key, String owner);\r\n\t\r\n\t/**\r\n\t * Interning the string key. Used internally.\r\n\t * String str1 = new String(\"abc\");\r\n\t * String str2 = new String(\"abc\");\r\n\t * str1 and str2 are two different objects \r\n\t * and we synchronized based on the passed key\r\n\t * \r\n\t * @param key to normalize\r\n\t * @return the normalized key\r\n\t */\r\n\tdefault String normalizeKey(String key) {\r\n\t\treturn key.intern();\r\n\t}\r\n}" ]
[ "0.67420554", "0.6440716", "0.6347008", "0.62908864", "0.62330616", "0.6129965", "0.60235924", "0.59910387", "0.59741956", "0.59455836", "0.5932882", "0.5932882", "0.59299153", "0.59299153", "0.59299153", "0.5929175", "0.5929175", "0.5925198", "0.58753496", "0.5870802", "0.58701116", "0.58684176", "0.5864554", "0.5864231", "0.5848662", "0.5840058", "0.5824144", "0.5812532", "0.58121747", "0.58043635", "0.58041435", "0.57841015", "0.5765182", "0.5760733", "0.57495135", "0.5744481", "0.5725654", "0.5725654", "0.5724807", "0.572154", "0.57187766", "0.5707999", "0.56828994", "0.56808025", "0.56790006", "0.5661824", "0.56607103", "0.5655487", "0.56533843", "0.56521684", "0.5647181", "0.5630964", "0.5622754", "0.5620516", "0.5619903", "0.5613333", "0.5609367", "0.5604065", "0.55950266", "0.5585089", "0.55679697", "0.55623466", "0.5552251", "0.55426174", "0.55396277", "0.5533652", "0.55270797", "0.5519595", "0.5502966", "0.54978275", "0.54937685", "0.54905516", "0.54882056", "0.5477051", "0.54759914", "0.5466702", "0.54585695", "0.5446286", "0.54449487", "0.5427143", "0.5418916", "0.5414559", "0.54123473", "0.5403272", "0.53990036", "0.53800637", "0.5373123", "0.5368528", "0.5368013", "0.536079", "0.5359353", "0.5358011", "0.5349458", "0.5341946", "0.5335966", "0.5327424", "0.5323071", "0.5321619", "0.5319539", "0.5317706", "0.5302873" ]
0.0
-1
a reference to the simulation object ====================================================================== public AgentCanvas() Constructor for the agent canvas. Needs a reference to the simulation manager. ======================================================================
public AgentCanvas(SimulationManager theSimulation, ShelterGrid theShelters) { simulation = theSimulation; shelters = theShelters; legend_visible = true; addMouseListener(this); // to handle mouse clicks // Create shelter grid gridWidth = Parameters.getDefaultGridSize(); gridHeight = gridWidth; // We're square. //shelterGrid = new Shelter[gridWidth][gridHeight]; updateGrid(shelters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected ModelAgent (String agentName)\n {\n trc = new Trace (\"ModelAgent\", agentName);\n\n String jsimprop = System.getProperty (\"jsim.use_xml\", \"false\");\n if (jsimprop.toLowerCase ().equals (\"true\")) {\n use_xml = true;\n } // if\n \n jsimprop = System.getProperty (\"jsim.generate_xml_files\", \"false\");\n if (jsimprop.toLowerCase ().equals (\"true\")) {\n generate_xml_files = true;\n } // if\n\n this.agentName = agentName;\n agentStat = new SampleStat (agentName);\n\n JPanel panel = new JPanel ();\n panel.setLayout (new BorderLayout ());\n panel.add (new JLabel (agentName, JLabel.CENTER),\n BorderLayout.CENTER);\n\n JPanel panel2 = new JPanel ();\n startBtn.addActionListener (this);\n panel2.add (startBtn);\n \n setLayout (new BorderLayout ());\n add (panel, BorderLayout.NORTH);\n add (panel2, BorderLayout.CENTER);\n setBorder (BorderFactory.createEmptyBorder (5, 5, 5, 5));\n setSize (WIDTH, HEIGHT);\n setVisible (true);\n\n }", "public Renderer(final IGameStateModel simulation)\n {\n this.simulation = simulation;\n resource = ResourceManager.getInstance();\n resizeListener = new HashSet<IScreenResizeListener>();\n }", "public LaserCanvas()\r\n\t{\r\n\t\tsuper();\r\n\t\t\r\n\t\tgame = new LaserTutor();\r\n\t\t\r\n\t\tgame.initialize( );\r\n\t}", "public Simulator() {\n\t\t// create event chain\n\t\tec = new SortableQueue();\n\t\tsims = new SimulationStudy(this);\n\t\tstate = new SimulationState(sims);\n\t\t// push the first customer arrival at t = 0\n\t\tpushNewEvent(new CustomerArrivalEvent(state, 0));\n\t\t// push the termination event at the simulationTime (max duration of simulation)\n\t\tpushNewEvent(new SimulationTerminationEvent(sims.simulationTime));\n\t}", "public MenuCanvas() {\n\n //CR 14694\n imageDisplay = new ImageDisplay();\n iCaptureImage = new CaptureImageAudio(this);\n iImageMenu = new CustomMenu(this);\n\n //#if KEYPAD\n //|JG|iKeyHandler = ObjectBuilderFactory.getKeyHandler();\n //|JG|iKeyHandler.setCanvasHandler(this);\n //#endif\n iCustomPopup = new CustomPopup(this);\n iMenu = new CustomMenu(this);\n \n bannerHandler = new CustomBanner(this);\n textboxSize = (short)(8 + CustomCanvas.font.getHeight());\n }", "public Simulation() {\n\t\taddMouseListener(this);\n\t\taddKeyListener(this);\n\n\t\tthis.setSize(MAX_X * DOT_SIZE, MAX_Y * DOT_SIZE);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(false);\n\t\tthis.setTitle(\"Braaiinnnnnsss\");\n\n\t\t/* Create and set the size of the panel */\n\t\tdp = new DotPanel(MAX_X, MAX_Y, DOT_SIZE);\n\n\t\t/* Add the panel to the frame */\n\t\tContainer cPane = this.getContentPane();\n\t\tcPane.add(dp);\n\t\t\n\n\t\t/* Initialize the DotPanel canvas:\n\t\t * You CANNOT draw to the panel BEFORE this code is called.\n\t\t * You CANNOT add new widgets to the frame AFTER this is called.\n\t\t */\n\t\tthis.pack();\n\t\tdp.init();\n\t\tdp.clear();\n\t\tdp.setPenColor(Color.red);\n\t\tthis.setVisible(true);\n\n\t\t/* Create our city */\n\t\tworld = new City(MAX_X, MAX_Y, NUM_BUILDINGS, NUM_HUMANS, NUM_PRIESTS, NUM_VAMPIRES);\n\n\t\t/* This is the Run Loop (aka \"simulation loop\" or \"game loop\")\n\t\t * It will loop forever, first updating the state of the world\n\t\t * (e.g., having humans take a single step) and then it will\n\t\t * draw the newly updated simulation. Since we don't want\n\t\t * the simulation to run too fast for us to see, it will sleep\n\t\t * after repainting the screen. Currently it sleeps for\n\t\t * 33 milliseconds, so the program will update at about 30 frames\n\t\t * per second.\n\t\t */\n\t\twhile(true)\n\t\t{\n\t\t\t// Run update rules for world and everything in it\n\t\t\tworld.update();\n\t\t\t// Draw to screen and then refresh\n\t\t\tworld.draw();\n\t\t\tdp.repaintAndSleep(30);\n\n\t\t}\n\t}", "public SimulationView() {\n initComponents();\n }", "public simulation() {\n\n }", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }", "public SignalCanvas() {\n\t\tsuper();\n\t}", "public void initPanel() {\n\t\tAgentInterface agent = new RandomAgent();\n\t\t\n\t\t/*\n\t\t * Instantiate the environment\n\t\t * \n\t\t * Simply change the name of the environment to one imported above to \n\t\t * view random behavior in another environment (a couple environments\n\t\t * may not visualize because they are experimental/unfinished code \n\t\t * from RL-Library.\n\t\t * \n\t\t * This agent should work with any discrete state and action environment\n\t\t * and at least a few environments with continuous state and discrete\n\t\t * actions (e.g., mountain car, cart pole, and acrobot).\n\t\t */\n\t\tEnvironmentInterface env = new CartArm(); \n\t\t\n\t\t\n\t\t/*\n\t\t * Initialize the JPanel to be used by the applet.\n\t\t */\n\t\trlPanel.init(agent, env);\n\t\tthis.getContentPane().add(rlPanel);\n\t\tthis.rlPanel.runLocal.addObserver(this);\n\t\t\n\t\t/*\n\t\t * Initialize experiment, which initializes both the environment and \n\t\t * the agent.\n\t\t * \n\t\t * RunLocalExperiment (which runLocal below is an instance of) controls\n\t\t * the timing, calling RLGlue.RL_init() (which calls agent_init() and \n\t\t * env_init()) and step() on the TinyGlueExtended instance that calls \n\t\t * agent_start(), env_start(), agent_step(), and so on.\n\t\t */\n\t\trlPanel.runLocal.initExp();\n\t\t\n\t\t/*\n\t\t * Start experiment. In each episode, agent_start() and env_start() are\n\t\t * called first. Then agent_step() and env_step() are called repeatedly\n\t\t * until the end of the episode, at which point agent_end() and env_end()\n\t\t * are called. See TinyGlueExtended for exact ordering between agent and \n\t\t * env.\n\t\t */\n\t\trlPanel.runLocal.startExp();\n\t}", "public Agent(Grid<Agent> grid){\n\t\tthis.grid=grid;\n\t\tthis.alive=true;\n\t}", "public OperatorAgentView(OperatorAgent agent) {\n\t\tthis.agent = agent;\n\t}", "public CanvasAWT(Graphics2D graphic){\r\n\t\ttarget = graphic;\r\n\t}", "public Simulator(){}", "public AnimationPanel() {\n initComponents();\n // create a new game board\n game = new GameOfLife(gridSize);\n }", "public MyAgent(World world)\n {\n w = world; \n }", "public RobotEngine (){\r\n\t\tthis.fuel = 100;\r\n\t\tthis.recycledMaterial = 0;\r\n\t\tthis.container = new ItemContainer ();\r\n\t\tthis.direction = Direction.NORTH;\r\n\t\tthis.navega = new NavigationModule();\r\n\t}", "private VecCanvas(){\n MouseAdapter mouse = new CanvasMouse();\n this.addMouseListener(mouse);\n this.addMouseMotionListener(mouse);\n setupKeyBindings();\n }", "public CanvasPanel( )\n {\n // make this canvas panel listen to mouse\n addMouseListener(new PointListener());\n addMouseMotionListener(new PointListener());\n\n setBackground(Color.BLACK);\n }", "public MyAgent(World world) {\n w = world;\n agent = new QLearningAgent();\n currentPosition = new Position(w.getPlayerX(), w.getPlayerY());\n }", "public VisualView(ReadOnlyAnimatorModel aModel) {\n\n super();\n\n // attrs\n\n int leftMostX = (int) aModel.getBoundingBoxLoc().getX();\n int topMostY = (int) aModel.getBoundingBoxLoc().getY();\n int height = aModel.getBoundingBoxHeight();\n int width = aModel.getBoundingBoxWidth();\n\n List<AnimatedShapeImpl> shapesAtTick = aModel.getShapesAtTick(aModel.getModelStartTime());\n\n this.setTitle(\"Animator Visual View - Bou Lahdou and McNeill\");\n this.setSize(width, height);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setLayout(new BorderLayout());\n\n this.animationPanel = new AnimationPanel(shapesAtTick);\n animationPanel.setPreferredSize(new Dimension(width, (7 * height) / 8));\n this.add(animationPanel, BorderLayout.NORTH);\n\n JScrollPane scroller = new JScrollPane(animationPanel);\n scroller.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n scroller.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n scroller.setBounds(20, 25, 200, 50);\n\n this.add(scroller, BorderLayout.CENTER);\n }", "public Canvas(IFramework framework) {\r\n\t this.framework = framework;\r\n\t this.data = framework.getData();\r\n\t this.maxRatio = framework.getDisplayMenu().getMaxRatioScale();\r\n\t this.minRatio = framework.getDisplayMenu().getMinRatioScale();\r\n\t}", "public CanvasPanel() {\n\t \t\taddMouseListener(this);\n\t \t\taddMouseMotionListener(this);\n\t }", "private void createSimulatorMode() {\n setSize(1000, 750);\n setLocation(new Point(200, 100));\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n Container content = getContentPane();\n content.setLayout(new GridBagLayout());\n \n GridBagConstraints c = new GridBagConstraints();\n \n map = new UAVMap(this, UAVModes.SIMULATION, false);\n smenu = new SimUAVMenu();\n toolBar = new SimUAVToolBar();\n map.addConnections(toolBar, smenu);\n smenu.addConnections(toolBar, map);\n toolBar.addConnections(smenu, map);\n \n c.gridy = 0;\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 1;\n c.weighty = 0;\n content.add(smenu, c);\n \n c.gridy = 1;\n c.fill = GridBagConstraints.BOTH;\n c.weightx = 1;\n c.weighty = 0;\n content.add(toolBar, c);\n \n c.gridy = 2;\n c.fill = GridBagConstraints.BOTH;\n c.weightx = 1;\n c.weighty = 1;\n content.add(map.getCanvas(), c);\n \n setVisible(true);\n map.initializeSimulation();\n map.startTimer();\n }", "public SimulationFrame(String name, double scale) {\n\t\tframe = new JFrame(name);\n\t\t\n\t\t// set the scale\n\t\tthis.scale = scale;\n\t\t\n\t\t// create the world\n\t\tthis.world = new World();\n\t\t\n\t\t// setup the JFrame\n\t\tframe.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n\t\t\n\t\t// add a window listener\n\t\tframe.addWindowListener(new WindowAdapter() {\n\t\t\t/* (non-Javadoc)\n\t\t\t * @see java.awt.event.WindowAdapter#windowClosing(java.awt.event.WindowEvent)\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t// before we stop the JVM stop the simulation\n\t\t\t\t//stop();\n\t\t\t\tsuper.windowClosing(e);\n\t\t\t}\n\t\t});\n\t\t\n\t\t// setup OpenGL capabilities\n\t\tif (!GLProfile.isAvailable(GLProfile.GL2)) {\n\t\t\tthrow new GLException(\"Version!\");\n\t\t}\n\n\t\tGLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2));\n\t\tcaps.setDoubleBuffered(true);\n\t\t// setup the stencil buffer to outline shapes\n\t\tcaps.setStencilBits(1);\n\t\t// setting multisampling allows for better looking body outlines\n\t\tcaps.setSampleBuffers(true);\n\t\tcaps.setNumSamples(2);\n\t\tcaps.setHardwareAccelerated(true);\n\t\t\n\t\t// create a NEWT window\n\t\twindow = GLWindow.create(caps);\n\t\twindow.setUndecorated(true);\n\t\twindow.addGLEventListener(this);\n\t\t\n\t\t// create the size of the window\n\t\tsize = new Dimension(800, 600);\n\t\t\n\t\t// create a canvas to paint to \n\t\tthis.canvas = new NewtCanvasAWT(window);\n\t\tthis.canvas.setPreferredSize(size);\n\t\tthis.canvas.setMinimumSize(size);\n\t\tthis.canvas.setIgnoreRepaint(true);\n\t\t\n\t\t// add the canvas to the JFrame\n\t\tJPanel pnlTest = new JPanel();\n\t\tpnlTest.setLayout(new BorderLayout());\n\t\tpnlTest.add(this.canvas);\n\n\t\tframe.add(pnlTest);\n\t\t\n\t\t// make the JFrame not resizable\n\t\t// (this way I dont have to worry about resize events)\n\t\tframe.setResizable(false);\n\t\t\n\t\t// size everything\n\t\tframe.pack();\n\n\t\tMouse ml = new Mouse();\n\t\tframe.addMouseWheelListener(ml);\n\n\t\twindow.addMouseListener(ml);\n\t\twindow.addKeyListener(new com.jogamp.newt.event.KeyListener() {\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(com.jogamp.newt.event.KeyEvent e) {\n\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_SPACE){\n\n\t\t\t\t\toffset = new Vector2(0f, 0f);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(com.jogamp.newt.event.KeyEvent e) {}\n\n\t\t});\n\n\t\tframe.setLocationRelativeTo(null);\n\n\t\tthis.last = System.nanoTime();\n\t\t\n\t\tthis.animator = new Animator(window);\n\t\tthis.animator.setRunAsFastAsPossible(false);\n\t\tthis.animator.start();\n\t\t\n\t\t// setup the world\n\t\tthis.initializeWorld();\n\t}", "private void initSimulateModeController() {\n simulateMode.setOnMouseClicked(event -> {\n SimulatorMain sm = null;\n try { sm = new SimulatorMain(); }\n catch (Exception e) { e.printStackTrace(); }\n sm.start(SimulatorMain.stage);\n });\n simulateMode.setOnMouseEntered(event -> { simulateMode.setGraphic(new Circle(5)); });\n simulateMode.setOnMouseExited(event -> { simulateMode.setGraphic(null); });\n }", "void setSimulationController(SimulationController simulationController);", "public PhysicsSimulator() {\n\t\tshapes = new ArrayList<PhysicsShape>();\n\t\t\n\t\tground = new PhysicsRectangle(400, 800, 1000000, 1000, 200, new Color(200, 200, 200), new Color(0));\n\t\tshapes.add(ground);\n\t\t\n\t}", "public Canvas(){\r\n\t\tsuper(new FlowLayout());\r\n\t\tthis.setPreferredSize(new Dimension(400, 400));\r\n\t\tthis.setBackground(Color.WHITE);\r\n\t}", "public ControlView (SimulationController sc){\n myProperties = ResourceBundle.getBundle(\"english\");\n myStartBoolean = false;\n mySimulationController = sc;\n myRoot = new HBox();\n myPropertiesList = sc.getMyPropertiesList();\n setView();\n\n }", "public Canvas(MainWindow main){\n super();\n this.setBounds(0, 0, Const.WINDOW_SIZE, Const.WINDOW_SIZE); //Seta o tamanho do canvas\n this.init(); //Chama as threads\n }", "public SpaceSim() {\n TimeZone.setDefault(TimeZone.getTimeZone(\"GMT\"));\n initComponents();\n \n bodies = new CopyOnWriteArrayList<>();\n addBody(\"Sun\", massOfSun, .001, 0, 0, 0, 0, 0, 0);\n sun = bodies.get(0);\n \n for (String c : colors.keySet()) {\n colorComboBoxEdit.addItem(c);\n colorComboBoxAdd.addItem(c);\n }\n colorComboBoxAdd.setSelectedItem(\"Black\");\n \n setEditor(bodies.get(0));\n simDate = new Date(0);\n setupKeyMaps();\n }", "public ClientNaiveAgent() {\n // the default ip is the localhost\n ar = new ClientActionRobotJava(\"127.0.0.1\");\n tp = new TrajectoryPlanner();\n randomGenerator = new Random();\n }", "protected ModelAgent ()\n {\n this (\"ModelAgent\");\n\n }", "public JanelaPrincipal() {\r\n\t\tsuper(\"Musical Memory\");\r\n\r\n\t\tinitialize();\r\n\t\t//this.setLocationByPlatform(true);\r\n\t\tthis.setVisible(true);\r\n\t\tthis.addKeyListener(this);\r\n\r\n\t}", "protected Agent(){\n\t\trand = SeededRandom.getGenerator();\n\t}", "public Agent(Point2D.Double coords, double viewHeading, PApplet p,\n\t\tGeneticObject genObj, boolean Neat, World world) {\n\t\tsuper(coords);\n\t\tthis.parent = p;\n\t\tthis.viewHeading = viewHeading;\n\t\tthis.geneticObject = genObj;\n\t\tthis.neat = Neat;\n\t\tif (this.neat) { \n\t\t\tcreateNeuralNet();\n\t\t} else {\n\t\t\tcreateBrain();\n\t\t}\n\t\tcalculateNetworkPositions(false);\n\t\tthis.world = world;\n\t\tsetupBox2d();\n\t\tthrust(1);\n\t}", "public AgentSimulator(SimpleGraph netGraph, Vector agentsRules,\n\t\t\t VQueue evtVQ, VQueue ackVQ) {\n this(netGraph, new Hashtable(), agentsRules, evtVQ, ackVQ);\n }", "public View(Model m) {\n super(\"Group G: Danmarkskort\");\n model = m;\n iconPanel.addObserverToIcons(this);\n routePanel = new RouteView(this, model);\n optionsPanel = new OptionsPanel(this,model);\n /*Three helper functions to set up the AffineTransform object and\n make the buttons and layout for the frame*/\n setScale();\n makeGUI();\n adjustZoomFactor();\n\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\n //This sets up a listener for when the frame is re-sized.\n createComponentListener();\n\n pack();\n canvas.requestFocusInWindow();\n model.addObserver(this);\n }", "public EpsCanvas(GraphicsConfiguration gc) {\n\t\tsuper(gc);\n\t\tepsGraphics = new EpsGraphics2D();\n\t}", "public Game() {\n\n GameBoard gameBoard = new GameBoard();\n Renderer renderer = new Renderer(gameBoard);\n }", "GUIbrain() {\n addMouseListener(this);\n addMouseMotionListener(this);\n createGUI(this);\n }", "public ClientFrame()\n {\n super(\"Client\");\n\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setLayout(new GridBagLayout());\n setBackground(Color.yellow);\n setSize(450, 300);\n setResizable(false);\n\n setTitle(agent.getHandle());\n agent.setClient(this);\n\n addButtons();\n\n // sets the frame to be visible\n setVisible(true);\n }", "public DrawGUI() {\n\n\t\tthis.setTitle(\"Draw 0.2\");\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(\"img/logo.png\"));\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tdrawingContainer = new DrawingContainer();\n\t\tscrollpane = new JScrollPane(drawingContainer);\n\n\t\tcontroller = new DrawingController(this);\n\t\ttools = new ToolBox(controller);\n\t\tcontroller.newDrawing(new Dimension(500, 380));\n\n\t\t// statusBar = new StatusBar();\n\n\t\tgetContentPane().add(tools, BorderLayout.WEST);\n\t\tgetContentPane().add(scrollpane, BorderLayout.CENTER);\n\t\t// getContentPane().add(statusBar, BorderLayout.SOUTH);\n\n\t\tMenuListener mainMenuListener = new MenuListener(controller);\n\t\tJMenuBar mainMenu = new MainMenu(mainMenuListener);\n\t\tthis.setJMenuBar(mainMenu);\n\n\t\tpack();\n\t\tsetVisible(true);\n\n\t}", "public Canvas() {\n this.addGLEventListener(this);\n valuesB = new ArrayList<>();\n resultadoICPClasico = new ArrayList<>();\n }", "public UbahGolonganGUI(EntityManager em) {\n initComponents();\n this.em = em;\n this.binding();\n }", "public AgentSimulator(SimpleGraph netGraph, \n Hashtable defaultAgentValues,\n\t\t\t Vector agentsRules,\n VQueue evtVQ, VQueue ackVQ) {\n\n\tgraph = (SimpleGraph) netGraph;\n stats = new Bag();\n\n\tthreadGroup = new SimulatorThreadGroup(\"simulator\");\n\tfillAgentsTable(graph, defaultAgentValues, agentsRules);\n this.evtQ = evtVQ;\n this.ackQ = ackVQ;\n\n\n movingMonitor = new MovingMonitor(ackQ);\n movingMonitorThread = new Thread(movingMonitor);\n movingMonitorThread.start();\n }", "public Canvas(GLCapabilities capabilities) {\n super(capabilities);\n this.addGLEventListener(this);\n valuesB = new ArrayList<>();\n resultadoICPClasico = new ArrayList<>();\n }", "public Simulation() {\n ecosystem = new Ecosystem();\n weeksElapsed = 0;\n }", "public AgentImpl(AgentConfigImpl agentConfig) throws AdminException, IllegalArgumentException {\n loggingSession = LoggingSession.create();\n\n shutdownHook = new LoggingThread(\"Shutdown\", false, this::disconnectFromSystem);\n addShutdownHook();\n if (agentConfig == null) {\n throw new IllegalArgumentException(\n \"AgentConfig must not be null\");\n }\n this.agentConfig = agentConfig;\n mbeanName = MBEAN_NAME_PREFIX + MBeanUtils.makeCompliantMBeanNameProperty(\"Agent\");\n\n try {\n objectName = new ObjectName(mbeanName);\n } catch (MalformedObjectNameException ex) {\n String s = String.format(\"While creating ObjectName: %s\",\n mbeanName);\n throw new AdminException(s, ex);\n }\n\n propertyFile = this.agentConfig.getPropertyFile().getAbsolutePath();\n\n // bind address only affects how the Agent VM connects to the system...\n // It should be set only once in the agent lifecycle\n this.agentConfig.setBindAddress(getBindAddress());\n\n // LOG: create LogWriterAppender and LogWriterLogger\n initLogWriter();\n\n mBeanServer = MBeanUtils.start();\n\n MBeanUtils.createMBean(this);\n\n initializeHelperMbean();\n }", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n\n drivetrain.setDefaultCommand(new RunCommand(\n () -> drivetrain.setTank(Math.pow(-joystick1.getY(), 3), Math.pow(joystick2.getY(), 3)), drivetrain));\n\n }", "public Basic2DRenderer(AssetManager assetManager) {\n\n\t\t// sets the class batch to the passed in batch\n\t\tthis.batch = new SpriteBatch();\n\n\t\t// sets the texture manager to the passed in manager\n\t\tthis.assetManager = assetManager;\n\n\t\t// sets the cameras viewport width and height to default values as none are\n\t\t// provided\n\t\tthis.viewPortWidth = DEFAULTVIEWPORTWIDTH;\n\t\tthis.viewPortHeight = DEFAULTVIEWPORTHEIGHT;\n\t\tcreate();\n\t}", "public void startSimulation();", "public Visualiser( Simulator inSim )\r\n {\r\n /* Initialise attributes */\r\n // Inputs\r\n sim = inSim;\r\n \r\n // Visualisation update stuff\r\n updateWait = DEFAULT_UPDATE_WAIT;\r\n pauseFraction = DEFAULT_PAUSE_FRACTION;\r\n simTimeSinceUpdate = 0;\r\n \r\n // Aesthetic stuff (defaults)\r\n showCommunicationRanges = false;\r\n showCommunicationSessions = false;\r\n showMap = true;\r\n \r\n zoomFactor = 1;\r\n \r\n \r\n /* Set up the visualisation */\r\n MobilityMap map = sim.getMap();\r\n \r\n if( map.isEmpty() )\r\n throw new UnsuitableMapException( \"Visualiser needs simulator whose a map has at least one node\" );\r\n \r\n \r\n /* Find the ACTUAL bounds values of the visualisation */\r\n /* (This is the x and y values for the distances in the ACTUAL\r\n * simulation)\r\n * (The view bounds are based on these actual values)\r\n * The following attributes are set:\r\n * minX, maxX, minY, maxY,\r\n * maxCommRange */\r\n // Initial minimum and maximums:\r\n MapNode n = map.getNodeAt(0);\r\n minX = maxX = n.getLocation().getX();\r\n minY = maxY = n.getLocation().getY();\r\n \r\n // Find the most distant: MapNode\r\n for( int i=1; i < map.getNumberOfNodes(); i++ )\r\n {\r\n double x = map.getNodeAt(i).getLocation().getX();\r\n double y = map.getNodeAt(i).getLocation().getY();\r\n \r\n if( x < minX )\r\n minX = x;\r\n \r\n if( x > maxX )\r\n maxX = x;\r\n \r\n if( y < minY )\r\n minY = y;\r\n \r\n if( y > maxY )\r\n maxY = y;\r\n }\r\n \r\n // Find the most distant: Beacon and Info Source\r\n findExtremes( sim.getBeacons() );\r\n findExtremes( sim.getInformationSources() );\r\n \r\n // Find the largest communication range of all the devices\r\n maxCommRange = 0;\r\n \r\n for( AbstractWirelessDevice dev : sim.getMobileObjects() )\r\n maxCommRange = Math.max( maxCommRange, dev.getCommunicationRange() );\r\n \r\n for( AbstractWirelessDevice dev : sim.getBeacons() )\r\n maxCommRange = Math.max( maxCommRange, dev.getCommunicationRange() );\r\n \r\n for( AbstractWirelessDevice dev : sim.getInformationSources() )\r\n maxCommRange = Math.max( maxCommRange, dev.getCommunicationRange() );\r\n \r\n \r\n /* Calculate the view bounds */\r\n updateViewBounds();\r\n }", "public ImageCanvas() {\r\n super();\r\n }", "public ClassTester()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(new NonScrollingBackground(\"Stage - 0.jpg\"),300,131);\n addObject(playerMage,35,170);\n addObject(new AbilityDisplayer(playerMage),125,268);\n }", "public Allocation() {\n initComponents();\n }", "public static VecCanvas getCanvas(){\n if (instance == null)\n instance = new VecCanvas();\n return instance;\n }", "public MazeSolverDrawing() throws InterruptedException {\n initComponents();\n mz = new Maze();\n solver = new MazeSolver(mz);\n new Thread(solver).start();\n timer = new Timer(5, this); \n timer.start();\n timer.addActionListener(this);\n\n }", "public Canvas getCanvas()\n {\n return canvas;\n }", "public MainClass()\r\n\t{\r\n\t\tthis.setPreferredSize(new Dimension(width - 300, height));// This sets the dimensions of the graphic space where cam is drawn\r\n\t\tpanel = new ControlPanel(); // Initialization of various objects incorporated into the main class\r\n\t\twindow = new Window(this, panel);\t\t\t\t//\r\n\t\tdisp = new DispAngleDiagram(stroke);\t\t\t//\r\n\t\trcp = new RenderCamProfile(disp, panel);\t\t//\r\n\t\tinput = new InputHandler(disp);\t\t\t\t\t//\r\n\t\t\r\n\t\tthis.addMouseListener(input);\t\t\t\t\t\r\n\t\tthis.addMouseMotionListener(input);\r\n\t}", "public Visualizador() {\n initComponents();\n inicializar();\n }", "public AMMSMIDlet() {\n\tdisplay = Display.getDisplay(this);\n\tcanvas = new MansionCanvas(display);\n\tcanvas.addCommand(exitCommand);\n\tcanvas.addCommand(toggleCommand);\n\tcanvas.addCommand(helpCommand);\n\tcanvas.addCommand(aboutCommand);\n\tcanvas.setCommandListener(this);\n }", "public TrafficAnimation()\n\t{\n\t\t// Do not initialize larger than 800x600. I won't be able to\n\t\t// grade your project if you do.\n\t\tint initWidth = 600;\n\t\tint initHeight = 400;\n\t\tsetPreferredSize(new Dimension(initWidth, initHeight));\n\t\tthis.setDoubleBuffered(true);\n\n\t\t//Start the animation - DO NOT REMOVE\n\t\tstartAnimation();\n\t}", "public RobotContainer() \n {\n /* Bind commands to joystick buttons. */\n m_OI.configureButtonBindings();\n\n /* Initialize various systems on robotInit. */\n this.initializeStartup();\n\n /* Initialize autonomous command chooser and display on the SmartDashboard. */\n this.initializeAutoChooser();\n\n /* Initialize PID tuning for use on the SmartDashboard. */\n this.initializePIDValues();\n\n // this.testColorSensing();\n }", "public static vtkCanvas createDummyCanvas(vtkActor actor)\n\t{\n\t\tfinal vtkCanvas canvas = new vtkCanvas()\n\t\t{\n\n\t\t\t/** Workaround for http://www.vtk.org/Bug/view.php?id=6268 */\n\t\t\t@Override\n\t\t\tpublic void setSize(int x, int y)\n\t\t\t{\n\t\t\t\tsuper.setSize(x, y);\n\t\t\t\tLock();\n\t\t\t\trw.SetSize(x, y);\n\t\t\t\tiren.SetSize(x, y);\n\t\t\t\tiren.ConfigureEvent();\n\t\t\t\tUnLock();\n\t\t\t}\n\t\t};\n\t\t// a renderer for the data\n\t\tfinal vtkRenderer ren1 = canvas.GetRenderer();\n\n\t\tren1.AddActor(actor);\n\t\t// background color white\n\t\tren1.SetBackground(1, 1, 1);\n\t\t// Make the canvas resizable with a splitter\n\t\t//layout\n\t\tcanvas.setMinimumSize(new Dimension(0, 0));\n\t\tcanvas.setPreferredSize(new Dimension(0, 0));\n\t\tren1.ResetCamera();\n\t\treturn canvas;\n\t}", "public CircleViewer()\n {\n drawing = new CirclePanel();\n\n JFrame frame = new JFrame();\n frame.setTitle(\"Circle\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(WIDTH, HEIGHT);\n frame.add(drawing);\n frame.setVisible(true);\n }", "public GridPane simulationAnalytics() {\r\n\t\t// Create Grid\r\n\t\tGridPane analytics = new GridPane(); \r\n\t\t\t\t\r\n\t\t// Setup Cars Parked\r\n\t\t// Accessed 26/08/2020\r\n\t\t// Adapted from: https://www.tutorialspoint.com/javafx/javafx_text.htm#:~:text=You%20can%20change%20the%20font,scene.\r\n\t\tcarsParked.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 13));\r\n\t\tfuelUsed.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 13));\r\n\t\tco2Produced.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 13));\r\n\t\t\r\n\t\t// Add Components\r\n\t\tanalytics.add(carsParked, 0, 0);\r\n\t\tanalytics.add(fuelUsed, 0, 1);\r\n\t\tanalytics.add(co2Produced, 0, 2);\r\n\t\t\r\n\t\treturn analytics;\r\n\t}", "public GraphicsFactory() {\n\t\tsuper();\n\t}", "public Canvas getCanvas() {\n return canvas;\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 }", "private JPanel createCanvas() {\n return new JPanel() {\n\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n element.drawMe((Graphics2D) g);\n }\n\n };\n }", "public void init() {\n try {\n java.net.URL codeBase = getCodeBase();\n codeBaseString = codeBase.toString();\n } catch (Exception e) {\n // probably running as an application, try the application\n // code base\n codeBaseString = \"file:./\";\n }\n\n if (colorMode == USE_COLOR) {\n objColor = red;\n } else {\n objColor = white;\n }\n\n Container contentPane = getContentPane();\n\n contentPane.setLayout(new BorderLayout());\n\n GraphicsConfiguration config = SimpleUniverse\n .getPreferredConfiguration();\n\n canvas = new Canvas3D(config);\n\n u = new SimpleUniverse(canvas);\n\n if (isApplication) {\n offScreenCanvas = new OffScreenCanvas3D(config, true);\n // set the size of the off-screen canvas based on a scale\n // of the on-screen size\n Screen3D sOn = canvas.getScreen3D();\n Screen3D sOff = offScreenCanvas.getScreen3D();\n Dimension dim = sOn.getSize();\n dim.width *= OFF_SCREEN_SCALE;\n dim.height *= OFF_SCREEN_SCALE;\n sOff.setSize(dim);\n sOff.setPhysicalScreenWidth(sOn.getPhysicalScreenWidth()\n * OFF_SCREEN_SCALE);\n sOff.setPhysicalScreenHeight(sOn.getPhysicalScreenHeight()\n * OFF_SCREEN_SCALE);\n\n // attach the offscreen canvas to the view\n u.getViewer().getView().addCanvas3D(offScreenCanvas);\n\n }\n contentPane.add(\"Center\", canvas);\n\n // setup the env nodes and their GUI elements\n setupLights();\n setupBackgrounds();\n setupFogs();\n setupSounds();\n\n // Create a simple scene and attach it to the virtual universe\n BranchGroup scene = createSceneGraph();\n\n // set up sound\n u.getViewer().createAudioDevice();\n\n // get the view\n view = u.getViewer().getView();\n\n // Get the viewing platform\n ViewingPlatform viewingPlatform = u.getViewingPlatform();\n\n // Move the viewing platform back to enclose the -4 -> 4 range\n double viewRadius = 4.0; // want to be able to see circle\n // of viewRadius size around origin\n // get the field of view\n double fov = u.getViewer().getView().getFieldOfView();\n\n // calc view distance to make circle view in fov\n float viewDistance = (float) (viewRadius / Math.tan(fov / 2.0));\n tmpVector.set(0.0f, 0.0f, viewDistance);// setup offset\n tmpTrans.set(tmpVector); // set trans to translate\n // move the view platform\n viewingPlatform.getViewPlatformTransform().setTransform(tmpTrans);\n\n // add an orbit behavior to move the viewing platform\n OrbitBehavior orbit = new OrbitBehavior(canvas, OrbitBehavior.STOP_ZOOM);\n orbit.setSchedulingBounds(infiniteBounds);\n viewingPlatform.setViewPlatformBehavior(orbit);\n\n u.addBranchGraph(scene);\n\n contentPane.add(\"East\", guiPanel());\n }", "@Override\n public void run() {\n jmeVisualization = new JMEVisualization();\n jmeVisualization.setRotated(false);\n jmeVisualization.setWidth(getVisualizationPanel().getWidth() - 15);\n jmeVisualization.setHeight(getVisualizationPanel().getHeight() - 30);\n jmeVisualization.startApplication();\n\n /*\n Fetch Canvas from JMEVisualization instance\n */\n jmeCanvas = jmeVisualization.getJmeCanvasContext().getCanvas();\n\n getVisualizationPanel().setLayout(new FlowLayout());\n getVisualizationPanel().add(jmeCanvas);\n getVisualizationPanel().revalidate();\n\n }", "public samJGraph()\n {\n super(new GraphPane( new GraphModel(), new samGraphController() ) );\n }", "public Canvas getCanvas()\n\t{\n\t\treturn canvas;\n\t}", "public RobotContainer()\n {\n SmartDashboard.putData(new InstantCommand(\n () -> flywheelSubsystem.hoodEncoder.setPosition(0)\n ));\n // Configure the button bindings\n configureButtonBindings();\n }", "public EmulatorFrame() {\r\n\t\tsuper(\"Troyboy Chip8 Emulator\");\r\n\t\t\r\n\t\tsetNativeLAndF();\r\n\t\tinitComponents();\r\n\t\tinitMenubar();\r\n\t\tsetupLayout();\r\n\t\tinitFrame();\r\n\t\t//frame is now ready to run a game\r\n\t\t//running of any games must be started by loading a ROM\r\n\t}", "public RobotContainer() {\n \n camServer = CameraServer.getInstance();\n driveCam = camServer.startAutomaticCapture(\"Driver View\", 0);\n driveCam.setResolution(160, 120);\n driveCam.setFPS(15);\n driveCam.setBrightness(50);\n // cameraThreader.start();\n\n leftJoy = new Joystick(LEFT_JOY_PORT);\n rightJoy = new Joystick(RIGHT_JOY_PORT);\n xbox = new XboxController(XBOX_PORT);\n\n //Set default drivetrain command to DriveWithJoysticks or xbox\n drivetrain.setDefaultCommand(xboxCommand);\n \n //For testing purposes, this will control simple one- or two-motor subsystems.\n genericSubsystem.setDefaultCommand(genericJoysticksCommand);\n \n //shooter.setDefaultCommand(shootCommand);\n //shooter.setDefaultCommand(turretCommand);\n\n\n // Configure the button bindings\n configureButtonBindings();\n }", "public Node(Subject subject, GUI gui, PublicationManager manager){\n\t\tthis(subject);\n\t\tthis.gui = (GUI) gui;\n\t\tthis.pane.setGUI(gui);\n\t\tRandom random = new Random();\n\t\tsetPosition(150+ random.nextInt(gui.displayWidth-300), 75+random.nextInt(gui.displayHeight -150 ));\n\t\tdouble citationMultiplier = subject.getScore()> 0 ? Math.log(subject.getScore()) : 0;\n\t\tsetDiameter((int) (10 + 5*citationMultiplier*1.5));\n\t\tthis.color2 = gui.color(0,146,211);\n\t\tthis.manager = manager;\n\t}", "public RemoteFactory.Agent<Msg, Ref> _createImplementationOfAgent() {\n RemoteFactory.Agent<Msg, Ref> implem = make_Agent();\n if (implem == null) {\n \tthrow new RuntimeException(\"make_Agent() in fr.irit.smac.may.lib.classic.remote.RemoteFactory should not return null.\");\n }\n assert implem.ecosystemComponent == null: \"This is a bug.\";\n assert this.selfComponent != null: \"This is a bug.\";\n implem.ecosystemComponent = this.selfComponent;\n return implem;\n }", "public SkinnedMeshCanvas(Display d) \r\n {\r\n super(true); // call base class constructor\r\n mDisplay = d; // store display object\r\n }", "public Screen() {\r\n \r\n frame = new JFrame(\"Transmission\");\r\n frame.setSize(screen);\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setResizable(false);\r\n frame.setLocationRelativeTo(null);\r\n frame.setVisible(true);\r\n \r\n panel = new Canvas();\r\n panel.setPreferredSize(screen);\r\n panel.setMaximumSize(screen);\r\n panel.setMinimumSize(screen);\r\n panel.setFocusable(false);\r\n \r\n frame.add(panel);\r\n frame.pack();\r\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 }", "public QLearnAgent() {\n\t\tthis(name);\t\n\t}", "public CarWashSimulation ()\n {\n bay = new Bay(CarWashApplication.BAY_TIME);\n waitingLine = new LLQueue<Car>();\n randGen = new Random();\n reset();\n }", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n // safest to create a copy of the graphics component -- one must\n // ensure that no changes are made to the original\n Graphics2D graphics = (Graphics2D) g.create();\n\n JViewport viewport = null;\n JScrollPane scrollPane = null;\n Insets borders = null;\n\n int viewportWidth = 0;\n int viewportHeight = 0;\n int agentGUISize = Parameters.getAgentGUISize();\n int imageWidth = gridWidth * agentGUISize;\n int imageHeight = gridHeight * agentGUISize;\n\n // make sure that we're grabbing onto the viewport of the scroll pane\n Component ancestor = getParent();\n if (ancestor == null || !(ancestor instanceof JViewport))\n {\n //Exception e = new Exception(\n // \"AgentCanvas instance must be within JScrollPane instance\");\n //e.printStackTrace();\n //return;\n\n viewportWidth = imageWidth;\n viewportHeight = imageHeight;\n\n borders = new Insets(5,5,5,5);\n }\n else\n {\n // presumably we have the viewport of scroll pane containing 'this'\n viewport = (JViewport) ancestor;\n\n viewportWidth = viewport.getWidth();\n viewportHeight = viewport.getHeight();\n\n scrollPane = (JScrollPane) viewport.getParent();\n borders = scrollPane.getInsets();\n }\n\n // Note that drawImage automatically scales the image to fit that \n // rectangle.\n int renderWidth = gridWidth * agentGUISize;\n int renderHeight = gridHeight * agentGUISize;\n\n // determine the starting (x,y) in the viewport where the image\n // will be drawn\n viewportX = 10 + Math.max((viewportWidth - renderWidth) / 2, 0);\n viewportY = 20 + Math.max((viewportHeight - renderHeight) / 2, 0);\n\n // in case there was a previous image, clear things out\n //graphics.clearRect(0, 0, viewportWidth, viewportHeight);\n //graphics.clearRect(viewportX, viewportY, viewportWidth, viewportHeight);\n graphics.clearRect(viewportX, viewportY, renderWidth, renderHeight);\n\n // now draw the shelters\n for (int col = 0; col < gridWidth; col++ )\n {\n for (int row = 0; row < gridHeight; row++ )\n {\n Shelter s = shelters.getShelterAt( col, row ); //shelterGrid[col][row];\n\n // make sure not to draw any agent outside the image boundaries;\n // remember that graphics x corresponds to column and graphics y\n // corresponds to row\n if ((row >= 0) && (col >= 0) &&\n ((row * agentGUISize) + agentGUISize <= renderHeight) &&\n ((col * agentGUISize) + agentGUISize <= renderWidth))\n {\n int guiX = GUI_XPAD + viewportX + (col * agentGUISize);\n int guiY = GUI_YPAD + viewportY + (row * agentGUISize);\n\n int occupants = s.getCurrentOccupancy();\n int capacity = s.getMaxCapacity();\n int infested = s.getInfestedCount();\n int infected = s.getInfectedCount();\n \n if ( DEBUG ){\n if ( infested > occupants || infected > occupants ) {\n System.out.println(\n \"Shelter(\" + col + \", \" + row + \") \" + \n \" occupants = \" + occupants + \n \" infested = \" + infested + \n \" infected = \" + infected );\n }\n }\n \n double proportionInfested = infested / (double) occupants;\n double proportionInfected = infected / (double) occupants;\n if ( occupants == 0 ){\n proportionInfested = 0.0;\n proportionInfected = 0.0;\n }\n double proportionOccupied = occupants / (double) capacity;\n double proportionUnoccupied = 1.0 - proportionOccupied;\n \n // Shelter Occupancy info\n \n graphics.setPaint( Color.white );\n int unoccupiedHeight = \n (int) Math.round(agentGUISize * proportionUnoccupied);\n int occupiedHeight = agentGUISize - unoccupiedHeight;\n \n // Proportion of shelter currently not in use\n graphics.fillRect( guiX, guiY, \n OCCUPANCY_BAR_WIDTH, unoccupiedHeight );\n \n graphics.setPaint( Color.black );\n graphics.fillRect(guiX, guiY + unoccupiedHeight, \n OCCUPANCY_BAR_WIDTH, occupiedHeight );\n \n if (occupants > 0){\n graphics.setPaint( Color.white );\n String str = \"\"+occupants;\n graphics.drawString(str, guiX + 2, guiY + unoccupiedHeight + 15);\n graphics.setPaint( Color.black );\n }\n \n // Infestation info\n \n // Color of upper half of grid square should get more purple\n // as more Hosts are infested\n int red = 255 - (int) Math.round( 255 * proportionInfested);\n int green = 255 - (int) Math.round( 255 * proportionInfested);\n int blue = 255;\n \n Color infestColor = null;\n try{\n infestColor = new Color( red, green, blue );\n } catch (IllegalArgumentException ie ) {\n System.out.println(\"Weird color for infested block: (\" \n + red + \", \" + green + \", \" + blue + \")\");\n System.out.println(\"Shelter at (\" + row + \", \" + col +\")\");\n System.out.println(\"Usually means infested count is off.\");\n infestColor = Color.white;\n }\n\n graphics.setPaint( infestColor );\n\n graphics.fillRect(guiX + OCCUPANCY_BAR_WIDTH, guiY, STATUS_BAR_WIDTH, agentGUISize / 2);\n \n String data = \"\" + occupants + \"/\" + infested;\n graphics.setPaint( Color.black );\n graphics.drawString(data, guiX + OCCUPANCY_BAR_WIDTH + 5, guiY + agentGUISize/2 - 10 );\n \n // Infection info\n \n // Color of lower half of grid square should get redder\n // as more Hosts are infected.\n red = 255;\n green = 255 - (int) Math.round( 255 * proportionInfected);\n blue = 255 - (int) Math.round( 255 * proportionInfected);\n \n Color infectColor = null;\n try {\n infectColor = new Color( red, green, blue );\n } catch (IllegalArgumentException ie) {\n System.out.println(\"Weird color for infected block: (\" \n + red + \", \" + green + \", \" + blue + \")\");\n System.out.println(\"Shelter at (\" + row + \", \" + col +\")\");\n System.out.println(\"Usually means infected count is off.\");\n infestColor = Color.white; \n }\n\n graphics.setPaint( infectColor );\n\n graphics.fillRect(guiX + OCCUPANCY_BAR_WIDTH, \n guiY + agentGUISize/2, \n STATUS_BAR_WIDTH, \n agentGUISize / 2);\n \n data = \"\" + occupants + \"/\" + infected;\n graphics.setPaint( Color.black );\n graphics.drawString(data, guiX + OCCUPANCY_BAR_WIDTH + 5, guiY + agentGUISize - 10 );\n \n // Color of lower half of grid square should get bluer\n // as more Hosts are infected\n\n /*\n if (a.isTreated())\n {\n // if treated with antibiotic, draw a little dot in the\n // middle of the rendered agent\n int dotSize = 2;\n graphics.setPaint(Color.black);\n graphics.fillRect(guiX + ((agentGUISize - dotSize) / 2),\n guiY + ((agentGUISize - dotSize) / 2),\n dotSize, dotSize);\n }\n */\n \n drawShelterFrame(graphics, \n guiX, guiY, agentGUISize, agentGUISize );\n }\n }\n }\n\n // draw the grid last so that it will overlay the agent squares \n //drawGrid(graphics, viewportX, viewportY, renderWidth, renderHeight);\n drawGrid(graphics, viewportX + GUI_XPAD, viewportY + GUI_YPAD, renderWidth, renderHeight);\n\n // show the number of infected/uninfected agents\n drawAgentInfo(graphics, viewportX, viewportY, \n renderWidth, renderHeight, borders);\n\n revalidate();\n\n // get rid of the graphics copy\n graphics.dispose();\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}", "protected GraphicsEnvironment() {}", "public SimulationConfig() {\r\n\t}", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n configureDefaultCommands();\n }", "public Simulation(String simulationName) {\n LOG.info(\"New simulation: \" + simulationName);\n initState(simulationName);\n }", "public GUI() {\n }", "public RobotWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(800, 600, 1); \n prepare();\n }", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n setDefaultCommands();\n }", "public Stage() {\n\n for (int i = 0; i < 20; i++) { // Generate the basic grid array\n ArrayList<Cell> cellList = new ArrayList<Cell>();\n cells.add(cellList);\n for (int j = 0; j < 20; j++) {\n cells.get(i).add(new Cell(10 + 35 * i, 10 + 35 * j));\n }\n }\n\n for (int i = 0; i < cells.size(); i++) { // Generate the list of environment blocks\n ArrayList<Environment> envList = new ArrayList<Environment>();\n environment.add(envList);\n for (int j = 0; j < cells.size(); j++) {\n int cellGenerator = (int) (Math.random() * 100) + 1;\n environment.get(i).add(generateCell(cellGenerator, cells.get(i).get(j)));\n }\n }\n\n grid = new Grid(cells, environment); // Initialise the grid with the generated cells array\n }", "public ViewClass() {\n\t\tcreateGUI();\n\t\taddComponentsToFrame();\n\t\taddActionListeners();\n\t}", "public GameCanvas getCanvas() {\n\t\treturn canvas;\n\t}", "public Canvas getCanvas() {\n\t\treturn canvas;\n\t}" ]
[ "0.60690194", "0.6048552", "0.5798832", "0.5795577", "0.57707596", "0.5747566", "0.5727464", "0.56900567", "0.5629515", "0.5612331", "0.55612534", "0.55434036", "0.5481929", "0.54628164", "0.54417545", "0.5380222", "0.5380207", "0.5351549", "0.5350873", "0.5350672", "0.5334546", "0.53122896", "0.5311334", "0.53061956", "0.5303371", "0.5297516", "0.5268467", "0.5251421", "0.5237359", "0.523329", "0.52082866", "0.5202104", "0.5200104", "0.5184919", "0.5182527", "0.51713216", "0.5168131", "0.5161697", "0.51611376", "0.51585025", "0.51451486", "0.513851", "0.51319265", "0.5129822", "0.51283777", "0.5127268", "0.5125633", "0.512043", "0.51103026", "0.51011807", "0.5099547", "0.5088018", "0.5086301", "0.50857306", "0.50849384", "0.5080499", "0.5078947", "0.50694275", "0.50620604", "0.50615066", "0.5059665", "0.5059068", "0.5051306", "0.50503445", "0.5049374", "0.50441694", "0.5031514", "0.5030704", "0.502901", "0.5020926", "0.50155246", "0.50036746", "0.50020313", "0.50019133", "0.5001777", "0.50015986", "0.49908075", "0.49905276", "0.49904665", "0.49895626", "0.49885628", "0.49827212", "0.49773988", "0.49708718", "0.4970426", "0.49688056", "0.49602076", "0.4959349", "0.49566603", "0.49521622", "0.49506432", "0.49492714", "0.49414292", "0.49377984", "0.4937146", "0.49353394", "0.49344316", "0.49258304", "0.49243927", "0.49232048" ]
0.65287447
0
====================================================================== public int getGridWidth() public int getGridHeight() Simple accessor methods. ======================================================================
public int getGridWidth() { return gridWidth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getGridDimensions() {\n return GRID_DIMENSIONS;\n }", "public GridSize getGridSize()\n {\n return this.gridSize.clone();\n }", "public short getGridSize() {\n\t\treturn gridSize;\n\t}", "public int getWidth(){\r\n\t\treturn grid.length;\r\n\t}", "@Override\r\n\tpublic int getSize() {\n\t\treturn gridSize;\r\n\t}", "public int getSize() {\n\t\treturn grid.length;\n\t}", "public static int GetSize() {\n\t\t\treturn gridSize.getValue();\n\t\t}", "public int getGridColumns() \n { \n return gridColumns; \n }", "public int getGridRows() \n { \n return gridRows; \n }", "protected Integer getGridHeight () {\n\t\treturn null ; \n\t}", "public int[][] getGrid()\n {\n return grid;\n }", "public int getBoardSize(){\n\t\treturn grids.getRows();\n\t}", "public abstract Regionlike getGridBounds();", "public int getHeight(){\r\n\t\treturn grid[0].length;\r\n\t}", "public Box[][] getGrid() {\n return this.grid;\n }", "public Dimension getPreferredSize()\n {\n return new Dimension(gridWidth * GRID_VIEW_SCALING_FACTOR,\n gridHeight * GRID_VIEW_SCALING_FACTOR);\n }", "public Dimension getPreferredSize()\n {\n return new Dimension(gridWidth * GRID_VIEW_SCALING_FACTOR,\n gridHeight * GRID_VIEW_SCALING_FACTOR);\n }", "public Grid grid() { return grid; }", "public Square[][] getGrid() {\n\t\treturn this.grid;\n\t}", "public GridPane getGrid(){\n\t\treturn myGrid;\n\t}", "public Cell[][] getGrid() {\n return grid;\n }", "public Dimension getPreferredSize()\n {\n return new Dimension(m_grid.length,m_grid[0].length);\n }", "public Grid getGrid() {\n \t\treturn grid;\n \t}", "@Override\n\tpublic int size() {\n\t\treturn grid.length;\n\t}", "public GridPane getGrid() {\n return grid;\n }", "public final Paint getGridPaint() {\n return gridPaint;\n }", "public int getGridX() {\r\n\t\treturn gridX;\r\n\t}", "public int getCellSize()\n {\n return cellSize;\n }", "private double getCellSize() {\n double wr = canvas.getWidth() / board.getWidth();\n double hr = canvas.getHeight() / board.getHeight();\n\n return Math.min(wr, hr);\n }", "public Grid getGrid() {\n return myGrid;\n }", "protected BoardGrid getGrid() {\n return GameController.getInstance().getGrid();\n }", "public int getSize() {\n return rows * cols;\n }", "int getBoardSize() {\n return row * column;\n }", "public static int getTileSize(){\n\t\treturn tileDim;\n\t}", "public Dimension getCellSize() {\r\n if (board.getWidth() == 0 || board.getHeight() == 0)\r\n return new Dimension(0,0);\r\n return new Dimension(getWidth()/board.getWidth(), getHeight()/board.getHeight());\r\n }", "public TetrisGrid getGrid()\r\n\t{\r\n\t\treturn grid;\r\n\t}", "public int getCellSize(){\n return cellSize;\n }", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "@Override\n public Tile[][] getGrid() { return grid; }", "com.ctrip.ferriswheel.proto.v1.Grid getGrid();", "public Dimension getSize ( )\r\n\t{\r\n\t\treturn new Dimension ( BORDER_X*2 + SQUARE_SIZE*size, BORDER_Y*2 + SQUARE_SIZE*size );\r\n\t}", "public GameObject[][] getGrid(){\n\t\t\r\n\t\treturn this.grid;\r\n\t}", "public GridDisplay getGrid(){\n\t\treturn this.display.gridDisplay;\n\t\t//return this.grid;\n\t}", "public CellGrid getCellGrid() {\n return cellGrid;\n }", "public int getReuseGrid()\n {\n return this.reuseGrid;\n }", "public Pawn[][] getBoardGrid() {\n\t\treturn boardGrid;\n\t}", "public abstract Grid<?> getGrid();", "public int getCartogramGridSizeInX ()\n\t{\n\t\treturn mCartogramGridSizeX;\n\t}", "public int getxlength(){ \n return numcols*boxsize;\n }", "int getTileSize();", "public int getActualWidthInTiles() {\n return getWidth() / getActualTileWidth();\n }", "public GridAlg getGrid() {\n\t\treturn grid;\n\t}", "public int getCellWidth() {\r\n\t\treturn cellWidth;\r\n\t}", "public int getCols() {\n\t\treturn myGrid.getCols();\n\t}", "public int getWidth() {\n return getTileWidth() * getWidthInTiles();\n }", "protected BattleGrid getGrid() {\n return grid;\n }", "public int getGridY() {\r\n\t\treturn gridY;\r\n\t}", "public int getwDimension()\n {\n return wDimension;\n }", "public Dimension getSize()\n {\n return new Dimension(300, 150);\n }", "public int getDeformationGridSize ()\n\t{\n\t\treturn mDeformationGridSize;\n\t\t\n\t}", "public int getRows() {\n\t\treturn myGrid.getRows();\n\t}", "public double getWidth() {\n\t\treturn mx-nx;\n\t}", "public abstract int getDimension();", "public int[][] getRawGrid()\n\t{\n\t\treturn grid;\n\t}", "Dimension getDimensions();", "public Creature[][] getGrid()\n\t{\n\t\treturn grid;\n\t}", "public int getBoardWidth(){\n return Cols;\n }", "public int getCellSize() {\n return CELLSIZE;\n //throw new UnsupportedOperationException();\n }", "public boolean isGrid() {\n return isGrid;\n }", "public static int getGridPosition(int x, int y, int width){\n\t\treturn (y*width)+x;\n\t}", "public Dimension getSize() { return new Dimension(width,height); }", "public Grid getGrid()\n {\n \treturn puzzle;\n }", "public InventoryRange getGrid() {\n \t\treturn this.grid;\n \t}", "Dimension getCanvasDimension();", "public int getTileWidth() {\n return 8;\n }", "public int getDimX ()\n {\n return m_dim_x;\n }", "public Vector2i getActualSizeInTiles() {\n return new Vector2i(getActualWidthInTiles(), getActualHeightInTiles());\n }", "public double[][] getM_grid() {\n return m_grid;\n }", "protected void computeGridParameters() {\n float padding = 0.02f * overlay.getScalingValue();\n boolean flipX = x2 < x1;\n float xx1 = flipX ? (x1 + padding) : (x1 - padding);\n float xx2 = flipX ? (x2 - padding) : (x2 + padding);\n boolean flipY = y2 < y1;\n float yy1 = flipY ? (y1 + padding) : (y1 - padding);\n float yy2 = flipY ? (y2 - padding) : (y2 + padding);\n \n xGrid1 = xx1; yGrid1 = yy1;\n xGrid2 = xx2; yGrid2 = yy1;\n xGrid3 = xx1; yGrid3 = yy2;\n xGrid4 = xx2; yGrid4 = yy2;\n horizGridCount = 3; vertGridCount = 3;\n }", "public static ArrayList<Grid> getGrids() {\n\n return grids;\n }", "int getBoundsWidth();", "public int getGridColumns(){\n Log.d(LOG_TAG, \"getGridColumns()\");\n /* If the WindowManager is null, then... */\n if (((WindowManager) getSystemService(WINDOW_SERVICE)) == null) {\n Log.e(LOG_TAG, \"Unable to retrieve the WindowManager for accessing the system's window manager.\");\n /* Return the default number of columns. */\n return GRID_COLUMNS_PORTRAIT;\n }\n /* Get the orientation of the device */\n final int rotation = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay().getOrientation();\n /* Return the number of grid columns depending on the orientation of the device */\n switch (rotation) {\n case Surface.ROTATION_0:\n Log.d(LOG_TAG, \"Orientation Portrait\");\n return GRID_COLUMNS_PORTRAIT;\n case Surface.ROTATION_90:\n Log.d(LOG_TAG, \"Orientation Landscape\");\n return GRID_COLUMNS_LANDSCAPE;\n case Surface.ROTATION_180:\n Log.d(LOG_TAG, \"Orientation Reverse Portrait\");\n return GRID_COLUMNS_PORTRAIT;\n default:\n Log.d(LOG_TAG, \"Orientation Reverse Landscape\");\n return GRID_COLUMNS_LANDSCAPE;\n }\n }", "public int grWidth() { return width; }", "public GridGeometry getGridGeometry() {\r\n final String error = checkConsistency(image, gridGeometry.getGridRange());\r\n if (error != null) {\r\n throw new IllegalStateException(error);\r\n }\r\n return gridGeometry;\r\n }", "public void resizeGrid() {\n resizeGrid(getWidth(),getHeight());\n }", "int getBoundsHeight();", "public int getActualTileWidth() {\n return 32;\n }", "public int getActualHeightInTiles() {\n return getHeight() / getActualTileHeight();\n }", "private int squareWidth() {\n return (int) getSize().getWidth() / BOARD_WIDTH;\n }", "public Color getGridColor() {\n return this.gridColor;\n }", "public int getCoordinateDimension() { \n return getPosition().getCoordinateDimension();\n }", "public final int getWidth() {\r\n return (int) size.x();\r\n }", "Dimension getSize();", "Dimension getSize();", "void setWidthHeight() {\n\t\tsetWidthHeight(getNcols() * grid().gridW, getNvisibleRows() * grid().gridH);\n\t}", "public int getRowCount()\r\n {\r\n return height;\r\n }", "public int geomDim();", "public int getSize(){\n\treturn Cells.size();\n }", "public final int getWidth() {\r\n return config.width;\r\n }", "public int getCartogramGridSizeInY ()\n\t{\n\t\treturn mCartogramGridSizeY;\n\t}" ]
[ "0.8420676", "0.80510837", "0.7891259", "0.7877325", "0.7859647", "0.7688263", "0.76152116", "0.7568876", "0.7561044", "0.75288314", "0.73469895", "0.72271734", "0.72183985", "0.7186104", "0.7171941", "0.7157608", "0.7093977", "0.7052561", "0.7046259", "0.70378613", "0.7031517", "0.7026021", "0.7025937", "0.69969356", "0.69966364", "0.6952127", "0.6940733", "0.6935421", "0.68846536", "0.6883624", "0.6873166", "0.68433815", "0.6818307", "0.67748904", "0.67591864", "0.67358416", "0.672316", "0.6711159", "0.6692515", "0.66575354", "0.66560155", "0.6644524", "0.6627635", "0.6607702", "0.6602057", "0.65475774", "0.6544375", "0.6539885", "0.6539205", "0.65315986", "0.65291876", "0.65246296", "0.6518261", "0.6512718", "0.65031165", "0.6494194", "0.6492177", "0.6479396", "0.64784557", "0.64702606", "0.6468842", "0.64615154", "0.6454214", "0.64540344", "0.6417792", "0.6412621", "0.6405915", "0.63970554", "0.63834345", "0.63793147", "0.637858", "0.6377584", "0.63684565", "0.63668096", "0.634227", "0.6316719", "0.63103604", "0.63042265", "0.62906706", "0.62880087", "0.6272841", "0.6264667", "0.62640285", "0.62603515", "0.6257745", "0.62546206", "0.62517065", "0.62500125", "0.6243213", "0.62431437", "0.623877", "0.6238178", "0.62332606", "0.62332606", "0.62260616", "0.6222151", "0.62123007", "0.62121713", "0.6205534", "0.6204982" ]
0.8482644
0
====================================================================== public void changeBackground() I used to allow the user to select an image background. Dropped it, but if we ever back to it, we should take any existing agents and reposition at random b/c the image is likely a different size. ======================================================================
public void updateGrid(ShelterGrid shelters) { this.shelters = shelters; gridWidth = Parameters.getDefaultGridSize(); gridHeight = gridWidth; simulation.reset(); // remove all agents, etc. // call repaint to redisplay the new background, then agents & grid repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeBackground(Bitmap bg){\n Drawable newbackground = new BitmapDrawable(getResources(), bg);\n this.setBackground(newbackground);\n\n }", "public void setSelectionBackground( final Image image ) {\n checkWidget();\n selectionBgImage = image;\n }", "public void setBackgroundToDefault(){\n\t\tcurrentBackgroundImage = defaultBackgroundImage;\n\t\tbackgroundPanel.changeBackground(defaultBackgroundImage);\n\t}", "public void processSetImageBackground() {\n AppYesNoDialogSingleton dialog = AppYesNoDialogSingleton.getSingleton();\n \n // POP UP THE DIALOG\n dialog.show(\"Set Image Background\", \"Would you like to have a background image?\");\n \n // IF USER CHOSE YES\n if (dialog.getSelection()) {\n // WE'LL NEED TO GET CUSTOMIZED STUFF WITH THIS\n PropertiesManager props = PropertiesManager.getPropertiesManager();\n\n // AND NOW ASK THE USER FOR THE FILE TO OPEN\n FileChooser fc = new FileChooser();\n fc.setInitialDirectory(new File(PATH_WORK));\n fc.setTitle(props.getProperty(LOAD_WORK_TITLE));\n File selectedFile = fc.showOpenDialog(app.getGUI().getWindow());\n \n // SET THE BACKGROUND IMAGE\n dataManager.setImageBackground(selectedFile);\n }\n else {\n // REMOVE THE BACKGROUND IMAGE\n dataManager.removeImageBackground();\n } \n }", "public void setBackground(){\r\n Image background = new Image(\"Cards/table.jpg\", 192, 80, false, true);\r\n BackgroundImage backgroundImg = new BackgroundImage(background, BackgroundRepeat.REPEAT, BackgroundRepeat.REPEAT,BackgroundPosition.DEFAULT, null);\r\n mainPane.setBackground(new Background(backgroundImg));\r\n }", "private void setBackground() throws IOException{\n\t\tBufferedImage backgroundBufferedImage = ImageLoader.getBufferedImage(backgroundImagePath);\n\t\tmainWindow.setBackgroundImage(backgroundBufferedImage);\n\t}", "private void randBackground(){\n int index = (int)(Math.random()*FRAME_COUNT);\n TextureRegion newBackground = frames.get(index);\n for (Background background : backgrounds) {\n background.setFrame(newBackground);\n }\n }", "public void setBackgroundImage(BackgroundImage image) {\n this.backgroundImage = image;\n }", "public Texture setBackgroundImage(){\n\t\tList<String> backgroundSelection = new ArrayList<String>();\n\t\t\n//\t\tAdds the universal background images to the List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"Universal\");\n\t\tArray<Element> backgroundArray = selection.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tUse of xml file readers to add strings to the balls List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"artist\");\n\t\tElement artist = selection.getChildByName(formatName(game.getArtist()));\n\t\tArray<Element> backgroundSelectArray = artist.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundSelectArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundSelectArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tRandom number generator to choose a random image as the ball image\n\t\tint randomBackground = (int) Math.random() * backgroundSelection.size();\n\t\tFileHandle backgroundImage = Gdx.files.internal(backgroundSelection.get(randomBackground));\n\t\treturn new Texture(backgroundImage) ;\n\t}", "public void setBackgroundImage(BufferedImage backgroundImage){\n\t\tcurrentBackgroundImage = backgroundImage;\n\t\tbackgroundPanel.changeBackground(backgroundImage);\n\t}", "public void setBackground(Paint background) {\r\n Paint old = getBackground();\r\n this.background = background;\r\n firePropertyChange(\"background\", old, getBackground());\r\n }", "public void setBackgroundChanged(boolean backgroundChanged) {\n this.backgroundChanged = backgroundChanged;\n }", "public void chooseBackgroundColor(){\n currentBackgroundColor = backgroundColorPicker.getValue();\n draw();\n }", "public void cancelSelectionBorder(){\n BackgroundImage bgselected= new BackgroundImage(new Image(\"rugbeats/img/Background_selectedhdpi.png\"),BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,\n new BackgroundSize(1.0, 1.0, true, true, false, false));\n ImgStack.setBackground(new Background(bgselected));\n }", "public void setEnteredBackground(boolean enteredBackground) {\n this.enteredBackground = enteredBackground;\n }", "@Override\n public void background(Background background) {\n if (testedFeature.getBackground() == null) {\n testedFeature.setBackground(new ScenarioDefinition());\n testedFeature.getBackground().setType(ScenarioType.BACKGROUND);\n setDescribedStatementAttributes(testedFeature.getBackground(), background);\n\n backgroundSteps = true;\n }\n\n backGroundStepsRemain = backgroundStepsCount;\n }", "public void scrollBG(){\n\n\t\t//Moves First BG Image\n\t\tif(background1.getX() > -700){\n\t\t\tbackground1.setX(background1.getX() - 1);\n\t\t} else { background1.setX(700);\t}\n\t\t\n\t\t//Moves Second BG Image\n\t\tif(background2.getX() > -700){\n\t\t\tbackground2.setX(background2.getX() -1);\n\t\t} else { background2.setX(700);\t}\n\n\t}", "private void setTheBackground(){\n\t\tString user_choice = prefs.getString(\"pref_background_choice\",\"blue_glass\");\n\t\tLog.d(\"User Background Choice\", user_choice);\n\t\tLinearLayout layout = (LinearLayout) findViewById(R.id.activity_mail_select_layout);\n\t\tif (user_choice.equalsIgnoreCase(\"blue_glass\")){\n\t\t\tlayout.setBackground(getResources().getDrawable(R.drawable.blue_glass));\n\t\t} else if (user_choice.equalsIgnoreCase(\"blue_oil_painting\")){\n\t\t\tlayout.setBackground(getResources().getDrawable(R.drawable.blue_oil_painting));\n\t\t} else if (user_choice.equalsIgnoreCase(\"stained_glass_blue\")){\n\t\t\tlayout.setBackground(getResources().getDrawable(R.drawable.stained_glass_blue));\n\t\t} else if (user_choice.equalsIgnoreCase(\"light_blue_boxes\")){\n\t\t\tlayout.setBackground(getResources().getDrawable(R.drawable.light_blue_boxes));\n\t\t} else if (user_choice.equalsIgnoreCase(\"light_silver_background\")){\n\t\t\tlayout.setBackground(getResources().getDrawable(R.drawable.light_silver_background));\n\t\t} else if (user_choice.equalsIgnoreCase(\"simple_grey\")){\n\t\t\tlayout.setBackground(getResources().getDrawable(R.drawable.simple_grey));\n\t\t} else if (user_choice.equalsIgnoreCase(\"simple_apricot\")){\n\t\t\tlayout.setBackground(getResources().getDrawable(R.drawable.simple_apricot));\n\t\t} else if (user_choice.equalsIgnoreCase(\"simple_teal\")){\n\t\t\tlayout.setBackground(getResources().getDrawable(R.drawable.simple_teal));\n\t\t} else if (user_choice.equalsIgnoreCase(\"xmas\")){\n\t\t\tlayout.setBackground(getResources().getDrawable(R.drawable.xmas));\n\t\t} else if (user_choice.equalsIgnoreCase(\"lacuna_logo\")){\n\t\t\tlayout.setBackground(getResources().getDrawable(R.drawable.lacuna_logo));\n\t\t} else {\n\t\t}\n\t}", "public void setBackground(int index){\r\n\t\tsuper.setBackground(myBackgrounds.get(index));\r\n\t}", "public void enterBackground();", "private void resetBackgroundSprite(Texture newSpriteTexture) {\n backgroundSprite = new Sprite(newSpriteTexture);\n backgroundSprite.setSize(screenWidth, screenHeight);\n backgroundSprite.setPosition(0, 0);\n }", "private void initBackground() throws IOException{\n\t\tBufferedImage backgroundImage = ImageLoader.getBufferedImage(BACKGROUND_IMAGE_PATH);\n\t\tmainWindow.setBackgroundImage(backgroundImage);\n\t}", "private void updateBackgroundID() {\n if ((x + 1) % 2 == (y + 1) % 2) {\n switch (c) {\n case BLACK:\n background = R.drawable.pawngame_black_black;\n break;\n case WHITE:\n background = R.drawable.pawngame_black_white;\n break;\n default:\n background = R.drawable.pawngame_black_empty;\n }\n } else {\n switch (c) {\n case BLACK:\n background = R.drawable.pawngame_white_black;\n break;\n case WHITE:\n background = R.drawable.pawngame_white_white;\n break;\n default:\n background = R.drawable.pawngame_white_empty;\n }\n }\n }", "private void setUpBackGround() {\n try {\n setBackGround(new Image(new FileInputStream(\"images/backgrounds/[email protected]\")));\n } catch (FileNotFoundException ignored) {\n }\n\n\n try {\n ImageView middleGround = new ImageView(new Image(new FileInputStream(\"images/gameIcons/middleGround/battlemap0_middleground.png\")));\n middleGround.setFitHeight(windowHeight);\n middleGround.setFitWidth(windowWidth);\n addComponent(new NodeWrapper(middleGround));\n } catch (FileNotFoundException ignored) {\n }\n\n try {\n ImageView foreGround = new ImageView(new Image(new FileInputStream(\"images/foregrounds/[email protected]\")));\n foreGround.setPreserveRatio(true);\n foreGround.setFitWidth(windowHeight / 3);\n foreGround.relocate(windowWidth - foreGround.getFitWidth(), windowHeight - foreGround.getFitWidth() * foreGround.getImage().getHeight() / foreGround.getImage().getWidth());\n addComponent(new NodeWrapper(foreGround));\n } catch (FileNotFoundException ignored) {\n }\n }", "public void setImageBackground(Image img){\n\t\timage = img;\n\t\tif(image != null)\n\t\t{\n\t\t\tScaleImage();\n\t\t\tDimension size = new Dimension(img.getWidth(null), img.getHeight(null));\n\t\t setPreferredSize(size);\n\t\t setMinimumSize(size);\n\t\t setMaximumSize(size);\n\t\t setSize(size);\n\t\t setLayout(null);\n\t\t repaint();\n\t\t}\n\t}", "public void setBackground(String imagePath) {\n\t\ttry {\n\t\t\timagePath = imagePath.replace(\"\\\\\", \"/\");\n\t\t\tString pathString = new File(imagePath).toURI().toURL().toString();\n\t\t\tbackgroundImagePane.setStyle(\"-fx-background-image:url(\\\"\" + pathString + \"\\\");\");\n\t\t} catch (MalformedURLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void updateBackgroundForAnimator() {\n resetAnimationBackgroundAnimator();\n forAllWindows(this.mUpdateWallpaperForAnimator, true);\n }", "private void reposition(){\n int lastBackgroundIndex = firstBackgroundIndex-1;\n if(firstBackgroundIndex == 0){\n lastBackgroundIndex = backgrounds.length-1;\n }\n backgrounds[firstBackgroundIndex].getPosition().x = backgrounds[lastBackgroundIndex].getPosition().x + drawingWidth;\n firstBackgroundIndex = (firstBackgroundIndex+1) % backgrounds.length;\n }", "public void setDropActiveBackground() {\n setBackgroundDrawable(getDropActiveBgDrawable());\n }", "public void setBackgroundImage(String url) {\n\t\t this.backgroundImage=url;\n\t}", "public void setBackgroundImage(BufferedImage inputImage) {\r\n\t\tif (inputImage == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Background image is null!\");\r\n\t\t} else {\r\n\t\t\tthis.backgroundImage = imageBlur.averageBlur(inputImage, blurRadius);\r\n\t\t}\r\n\t}", "private void loadBackground() {\n RelativeLayout thisRL = (RelativeLayout) findViewById(R.id.relativeLayout);\n\n // randomly chooses a background image for the splash screen\n int r = new Random().nextInt(NUM_BACKGROUNDS);\n switch (r) {\n case 0:\n thisRL.setBackgroundResource(R.drawable.splash_cliff);\n break;\n case 1:\n thisRL.setBackgroundResource(R.drawable.splash_notebook);\n break;\n case 2:\n thisRL.setBackgroundResource(R.drawable.splash_map);\n break;\n default:\n thisRL.setBackgroundResource(R.drawable.splash_notebook);\n }\n }", "public void setSelectedItemBackgroundResourceId(int backgroundResourceId)\n\t{\n\t\t_selectedItemBackgroundResourceId = backgroundResourceId;\n\t}", "protected void drawForegroundToBackground() {\n if (backgroundColor == null) { return; }\n\n final BufferedImage backgroundBufferedImage = new BufferedImage(dimension.width, dimension.height, this.bufferedImage.getType());\n final Graphics graphics = backgroundBufferedImage.getGraphics();\n\n // draw current color\n graphics.setColor(backgroundColor);\n graphics.fillRect(0, 0, dimension.width, dimension.height);\n graphics.drawImage(bufferedImage, 0, 0, null);\n\n // draw back to original\n final Graphics graphics2 = bufferedImage.getGraphics();\n graphics2.drawImage(backgroundBufferedImage, 0, 0, null);\n }", "public void setBg(){\n this.setBackground(color);\n }", "private void clearbackground() {\n\t\tfive_direct_single.setBackgroundResource(0);\r\n\t\tfour_direct_single.setBackgroundResource(0);\r\n\t\ttopthree_group_three_single.setBackgroundResource(0);\r\n\t\ttopthree_group_six_single.setBackgroundResource(0);\r\n\t\ttopthree_direct_single.setBackgroundResource(0);\r\n\t\tbottomthree_direct_single.setBackgroundResource(0);\r\n\t\tbottompthree_group_three_single.setBackgroundResource(0);\r\n\t\tbottompthree_group_six_single.setBackgroundResource(0);\r\n\t\ttwo_direct_toptwo_single.setBackgroundResource(0);\r\n\t\ttwo_group_toptwo_single.setBackgroundResource(0);\r\n\t\ttwo_group_bottomtwo_single.setBackgroundResource(0);\r\n\t\ttwo_direct_bottomtwo_single.setBackgroundResource(0);\r\n\t\ttopthree_mix_group.setBackgroundResource(0);\r\n\t\tbottompthree_mix_group.setBackgroundResource(0);\r\n\t\tfive_direct_double.setBackgroundResource(0);\r\n\t\tfive_group_120.setBackgroundResource(0);\r\n\t\tfive_group_60.setBackgroundResource(0);\r\n\t\tfive_group_30.setBackgroundResource(0);\r\n\t\tfive_group_20.setBackgroundResource(0);\r\n\t\tfive_group_10.setBackgroundResource(0);\r\n\t\tfive_group_5.setBackgroundResource(0);\r\n\t\tfour_direct_double.setBackgroundResource(0);\r\n\t\tfour_group_24.setBackgroundResource(0);\r\n\t\tfour_group_12.setBackgroundResource(0);\r\n\t\ttopthree_direct_double.setBackgroundResource(0);\r\n\t\ttopthree_group_three.setBackgroundResource(0);\r\n\t\ttopthree_group_six.setBackgroundResource(0);\r\n\t\ttopthree_group_sum.setBackgroundResource(0);\r\n\t\ttopthree_group_container.setBackgroundResource(0);\r\n\t\tbottomthree_direct_double.setBackgroundResource(0);\r\n\t\tbottomthree_group_span.setBackgroundResource(0);\r\n\t\tbottomthree_group_three.setBackgroundResource(0);\r\n\t\tbottomthree_group_six.setBackgroundResource(0);\r\n\t\tbottomthree_group_sum.setBackgroundResource(0);\r\n\t\tbottomthree_group_container.setBackgroundResource(0);\r\n\t\ttwo_direct_bottomtwo_double.setBackgroundResource(0);\r\n\t\ttwo_direct_bottomtwo_sum.setBackgroundResource(0);\r\n\t\ttwo_direct_bottomtwo_span.setBackgroundResource(0);\r\n\t\ttwo_direct_toptwo_double.setBackgroundResource(0);\r\n\t\ttwo_direct_toptwo_span.setBackgroundResource(0);\r\n\t\ttwo_group_bottomtwo_double.setBackgroundResource(0);\r\n\t\ttwo_group_toptwo_double.setBackgroundResource(0);\r\n\t\tfixed_position.setBackgroundResource(0);\r\n\t\tthree_bottomthree_one_notposition.setBackgroundResource(0);\r\n\t\tthree_bottomthree_two_notposition.setBackgroundResource(0);\r\n\t\tthree_topthree_one_notposition.setBackgroundResource(0);\r\n\t\tthree_topthree_two_notposition.setBackgroundResource(0);\r\n\t\tfour_bottomfour_two_notposition.setBackgroundResource(0);\r\n\t\tfive_bottomfive_two_notposition.setBackgroundResource(0);\r\n\t\tfive_bottomfive_three_notposition.setBackgroundResource(0);\r\n\t\ttwo_group_toptwo_sum.setBackgroundResource(0);\r\n\t\tfour_group_6.setBackgroundResource(0);\r\n\t\tfour_group_4.setBackgroundResource(0);\r\n\t\tbottomthree_direct_sum.setBackgroundResource(0);\r\n\t\ttopthree_direct_sum.setBackgroundResource(0);\r\n\t\ttopthree_direct_span.setBackgroundResource(0);\r\n\t\ttopthree_sum_end.setBackgroundResource(0);\r\n\t\tbottomthree_sum_end.setBackgroundResource(0);\r\n\t\ttwo_direct_toptwo_sum.setBackgroundResource(0);\r\n\t\ttwo_group_toptwo_container.setBackgroundResource(0);\r\n\t\ttwo_group_bottomtwo_container.setBackgroundResource(0);\r\n\t\ttwo_group_bottomtwo_sum.setBackgroundResource(0);\r\n\t\tfour_bottomfour_one_notposition.setBackgroundResource(0);\r\n\t\tmaxmin_bottomtwo.setBackgroundResource(0);\r\n\t\tmaxmin_bottomthree.setBackgroundResource(0);\r\n\t\tmaxmin_toptwo.setBackgroundResource(0);\r\n\t\tmaxmin_topthree.setBackgroundResource(0);\r\n\t}", "private void loadBackground() {\n\t\ttry {\n\t\t\timgBackground[0] = ImageIO.read(new File(System.getProperty(\"user.dir\")+\"/assets/Background1.jpg\")); // attempts to load the three\n\t\t\timgBackground[1] = ImageIO.read(new File(System.getProperty(\"user.dir\")+\"/assets/Background2.jpg\")); // default backgrounds from the\n\t\t\timgBackground[2] = ImageIO.read(new File(System.getProperty(\"user.dir\")+\"/assets/Background3.jpg\")); // assets folder\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setBgImage (final TextureRegion bgImage, final boolean isDisposeBGImgWhenDone) {\n\t\tif (this.isDisposeBGImgWhenDone && this.bgImage != null) {\n\t\t\tthis.bgImage.getTexture().dispose();\n\t\t}\n\n\t\tif (this.bgColor != null) {\n\t\t\tthis.bgColor.dispose();\n\t\t}\n\n\t\tthis.bgImage = bgImage;\n\t\tthis.bgColor = EasyGL.getPixelTexture(Color.BLACK, 1, 1);\n\n\t\tthis.isDisposeBGImgWhenDone = isDisposeBGImgWhenDone;\n\t}", "@Override\r\n\tpublic void setBackgroundResource(int resid) {\n\t\tsuper.setBackgroundResource(resid);\r\n\t}", "public void preGameMode(){\n\n ImageIcon icon = new ImageIcon(getClass().getResource(\"/title.jpg\"));\n Image image=icon.getImage();\n background = new PBackground(image);\n this.repaint();\n background.setLayout(null);\n this.add(background);\n\n\n // Prepare the body container\n container = new PanelContainer();\n container.setBounds(230,170, 700, 400);\n background.add(container);\n\n this.setVisible(true);\n }", "public void setBackgroundColor(Color background)\n {\n backgroundColor = background;\n paintAllObjects();\n }", "public void setSelectedItemBackgroundResourceIdOnLayout(int backgroundResourceId)\n\t{\n\t\t_selectedItemBackgroundResourceIdOnLayout = backgroundResourceId;\n\t}", "public void setBackground(Image i)\n {\n background=i;\n imageLabel.setIcon(new ImageIcon(i));\n imageLabel.setBounds(0,0,700,600);\n add(imageLabel);\n }", "public void setScreen(Scene scene) {\n\t\tCanvas canvas = (Canvas) scene.lookup(\"#firstCanvas\");\n\t\t//Button testbutt = (Button) scene.lookup(\"#StartButt\");\n\t\t//testbutt.getText();\n\t\tGraphicsContext gc = canvas.getGraphicsContext2D();\n\t\tbackgroundMovingX += backgroundMovingSpeed;\n\t\t//System.out.println(backgroundMovingX);\n\t\tif(backgroundMovingX >= maximumBackgroudPos || backgroundMovingX <= minimumBackgroudPos) {\n\t\t\tbackgroundMovingSpeed=-backgroundMovingSpeed;\n\t\t}\n\t\tWritableImage croppedImage = new WritableImage(BackgroundImageHolder.fisrtSceneBackgroundImage.getPixelReader(),\n\t\t\t\tstartCropX, startCropY, GameConfig.screenWidth, GameConfig.screenHeight);\n\t\tgc.drawImage(croppedImage, backgroundMovingX, startPoint);\n\t}", "@FXML\n public void setUp() {\n players = db.getPlayers();\n creatures = db.getCreatures();\n Random rand = new Random();\n creatureId = rand.nextInt(creatures.size()); \n playerId = rand.nextInt(players.size());\n CreaturePic.setImage(db.getCreaturePic(creatures.get(creatureId).getId()));\n PlayerPic.setImage(db.getPlayerPic(players.get(playerId).getId()));\n try{\n int backgroundNumber = rand.nextInt(10) + 21; //21 - 30\n \n byte[] array = db.getPicture(backgroundNumber);\n ByteArrayInputStream bis = new ByteArrayInputStream(array);\n BufferedImage b = ImageIO.read(bis);\n Image backim = SwingFXUtils.toFXImage(b,null);\n BackgroundPic.setFitHeight(720);\n BackgroundPic.setFitWidth(1280);\n BackgroundPic.setImage(backim);\n setTextFields();\n }\n catch(Exception e) {\n System.out.println(e);\n }\n }", "public void loadBackground() {\n try {\n File file = new File(\"src/resources/fondo.png\");\n this.background = ImageIO.read(file);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void setBGImage(Img i) {\n\t\tif (background == null) {\n\t\t\tthis.background = NullImg.getInstance();\n\t\t} else {\n\t\t\tthis.background = i;\n\t\t}\n\t}", "private void loadImage() {\r\n\t\tthis.background = GraphicsUtil.resize(ImageLoader.getImage(\"resources/img/loginScreen/LoginBackground.jpg\"),\r\n\t\t\t\tFRAME_X, FRAME_Y);\r\n\t}", "private void setBackground() {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n String status = city.getStatus();\n switch (status) {\n case \"Clear\":\n background.setBackgroundResource(R.drawable.sunny_day);\n break;\n case\"Rain\":\n case \"Drizzle\":\n case \"Thunderstorm\":\n background.setBackgroundResource(R.drawable.rainy_day);\n break;\n default:\n background.setBackgroundResource(R.drawable.cloudy_day);\n }\n }\n });\n }", "public InputImageManager(int background)\n {\n this.background = background;\n }", "public void ConfiguracionBackground(int nNormal, int nFocus)\n {\n // Establecemos los valores de los background\n m_nBckNormal = nNormal;\n m_nBckFocus = nFocus;\n }", "public void ChangeImage(Image SymImage){\n\n this.imgBackground = SymImage;\n /**\n imwidth = (double) this.imgBackground.getWidth(null);\n oldwidth = 461;\n oldheight = 361;\n */\n }", "private void resizeImage() {\r\n\t\tloading = new ImageIcon(background);\r\n\t\tImage newing = background.getScaledInstance(FRAME_X, FRAME_Y, java.awt.Image.SCALE_SMOOTH);\r\n\t\tloading = new ImageIcon(newing);\r\n\t}", "public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }", "private void changecoverimage() {\n\n Category c = categoryFactory.getCategory(category);\n int drawableId = getResources().getIdentifier(\"cover_\"+c.getCategory_name().toLowerCase().replace(\" \",\"\"), \"drawable\", getPackageName());\n if(drawableId == 0){\n drawableId = getResources().getIdentifier(\"cover_default\", \"drawable\", getPackageName());\n }\n Glide.with(this).load(drawableId).into((ImageView) findViewById(R.id.backdrop));\n\n\n }", "public void setBackground(Background bgFront, Background bgBack) {\n\t\tthis.bgFront = bgFront;\n\t\tthis.bgBack = bgBack;\n\t}", "public void setActiveImage() {\n\t\tsetGraphic(new ImageView(activePiece));\n\t\tisActiveImageOn = true;\t\t\n\t}", "public void setHasBackground(boolean hasBackground){\n this.hasBackground = hasBackground;\n }", "public void setBgImage (final String path, final boolean isDisposeBGImgWhenDone) {\n\t\tif (this.isDisposeBGImgWhenDone && this.bgImage != null) {\n\t\t\tthis.bgImage.getTexture().dispose();\n\t\t}\n\n\t\tif (this.bgColor != null) {\n\t\t\tthis.bgColor.dispose();\n\t\t}\n\n\t\tthis.bgImage = VictusLudusGame.resources.getTextureAtlasCosmos().findRegion(path);\n\t\tthis.bgColor = EasyGL.getPixelTexture(Color.BLACK, 1, 1);\n\t\tthis.isDisposeBGImgWhenDone = isDisposeBGImgWhenDone;\n\t}", "@Override\n\tprotected void setSelectedBackground(boolean isSelected, View contentView) {\n\t\tif (isSelected) {\n\t\t\tcontentView.setBackgroundResource(R.drawable.left_list_bg_s);\n\t\t} else {\n\t\t\tcontentView.setBackgroundResource(R.drawable.left_list_bg_n);\n\t\t}\n\t}", "public void setBackgroundImage(String imagePath) \n\t{\n\t try\n\t {\n\t\t Context context = this.getContext();\n\t\t if (context != null)\n\t\t {\n\t\t\t FileInputStream wFile = new FileInputStream(imagePath);\n\t\t\t BufferedInputStream wBuffer = new BufferedInputStream(wFile);\n\t\t\t mBackImage = BitmapFactory.decodeStream(wBuffer);\n\t if (wFile != null) \n\t {\n\t \t wFile.close();\n\t }\n\t if (wBuffer != null) \n\t {\n\t \t wBuffer.close();\n\t }\n\t\t }\n\t\t if (mBackImage != null)\n\t\t {\n\t\t\t drawThumbnail();\n\t\t }\n\t }\n\t catch(FileNotFoundException e)\n\t { \n\t\t Log.e(LOG_TAG, \"The file '\" + imagePath + \"' does not exists.\");\n\t }\n\t catch(Exception e)\n\t {\n\t\t Log.e(LOG_TAG, e.toString());\n\t }\n\t}", "private void loadImage() {\n try {\n background = ImageIO.read(new File(\"src/main/resources/background.jpg\"));\n } catch (IOException e) {\n System.out.println(\"Cannot load background image!\");\n }\n }", "private void applyBackgroundColor() {\r\n\t\tthis.control.setBackground(PromptSupport.getBackground(this.control));\r\n\t}", "public void restaura(){ \n super.restauraE();\n setImage(\"FrtEA1.png\"); \n check = false; \n }", "@Override\r\n\tpublic void setFlavor() {\n\t\thasFlavor = false;\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(OBSERVABLE_EVENT_SET_FLAVOR);\r\n\t}", "private void drawBackground(int position) {\n Background bg = backgrounds.get(position);\n\n // define what portion of images to capture and\n // what coordinates of screen to draw them at\n\n // For the regular bitmap\n Rect fromRect1 = new Rect(0, 0, bg.width - bg.xClip, bg.height);\n Rect toRect1 = new Rect(bg.xClip, bg.startY, bg.width, bg.endY);\n\n // For the reversed background\n Rect fromRect2 = new Rect(bg.width - bg.xClip, 0, bg.width, bg.height);\n Rect toRect2 = new Rect(0, bg.startY, bg.xClip, bg.endY);\n\n //draw the two background bitmaps\n if (!bg.reversedFirst) {\n canvas.drawBitmap(bg.bitmap, fromRect1, toRect1, paint);\n canvas.drawBitmap(bg.bitmapReversed, fromRect2, toRect2, paint);\n } else {\n canvas.drawBitmap(bg.bitmap, fromRect2, toRect2, paint);\n canvas.drawBitmap(bg.bitmapReversed, fromRect1, toRect1, paint);\n }\n\n }", "public void requestBackgroundChange()\n\t\t{\n\t\t\tisBackgroundChangeRequested = true;\n\t\t\trequestRender();\n\t\t}", "public void changePhoto() {\r\n\t\tisPictFetche = false;\r\n\t\tlaPhoto = new Photo();\r\n\t\tlaPhotoCandidate = new Photo();\r\n\t}", "@Override\r\n\tpublic void drawBackground(Graphics g, ImageObserver observer) {\n\t\tfor (int i = 0; i < buttons.length; i++) {\r\n\t\t\tbuttons[i].drawBackground(g, observer);\r\n\t\t}\r\n\t\t\r\n\t\t// draw selected screen background\r\n\t\tthis.screens[this.selectedIndex].drawBackground(g, observer);\r\n\t}", "public MainSlot_JPanel(){\n //load background image\n try {\n Image img = ImageIO.read(getClass()\n .getResource(\"./graphics/slot_BackGround.jpg\"));\n backgroundImg = img\n .getScaledInstance(800,580,java.awt.Image.SCALE_SMOOTH );\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "private void setButtonBackground(Button button, String bgImgName) {\n BackgroundImage backgroundImage = new BackgroundImage(\n new Image( getClass().getResource(\"resources/\" + bgImgName).toExternalForm()),\n BackgroundRepeat.NO_REPEAT,\n BackgroundRepeat.NO_REPEAT,\n BackgroundPosition.CENTER,\n BackgroundSize.DEFAULT);\n Background background = new Background(backgroundImage);\n button.setBackground(background);\n }", "public void changeAction()\r\n {\r\n bufferedImage = imageCopy[0];\r\n edited = imageCopy[1];\r\n cropedPart = imageCopy[2];\r\n bufferedImage = imageCopy[3];\r\n\r\n isBlured = statesCopy[0];\r\n isReadyToSave = statesCopy[1];\r\n isChanged = statesCopy[2];\r\n isInverted = statesCopy[3];\r\n isRectangularCrop = statesCopy[4];\r\n isCircularCrop = statesCopy[5];\r\n isImageLoaded = statesCopy[6];\r\n }", "@Override\r\n\t\tpublic void onChange(boolean selfChange) {\n\t\t\tif (mBtnState) {\r\n\t\t\t\tsetUnfocusBg();\r\n\t\t\t} else {\r\n\t\t\t\tsetDefaultBg();\r\n\t\t\t}\r\n\t\t}", "private static void drawUniverse(String background) {\n StdDraw.picture(0.0, 0.0, background);\n }", "public void setBackgroundPainted(boolean backPainted) {\r\n boolean old = isBackgroundPainted();\r\n this.backPainted = backPainted;\r\n firePropertyChange(\"backgroundPainted\", old, isBackgroundPainted());\r\n }", "public void resetImageToFaceState() {\n String iconPath = Global.IMAGE_PATH;\n switch (game.getFinished()) {\n case 0:\n iconPath += \"face-normal.png\";\n break;\n\n case 1:\n iconPath += \"face-win.png\";\n break;\n\n case 2:\n iconPath += \"face-lose.png\";\n break;\n\n default:\n iconPath += \"face-normal.png\";\n break;\n }\n face.setIcon(new ImageIcon(iconPath));\n }", "public GUISignUp() {\n initComponents();\n setLocationRelativeTo(null);\n this.getContentPane().setBackground(new java.awt.Color(72, 72, 72));\n resizeImage();\n }", "public void setBgColor (final Color bgColor) {\n\t\tif (this.isDisposeBGImgWhenDone && this.bgImage != null) {\n\t\t\tthis.bgImage.getTexture().dispose();\n\t\t}\n\n\t\tif (this.bgColor != null) {\n\t\t\tthis.bgColor.dispose();\n\t\t}\n\n\t\tthis.bgColor = EasyGL.getPixelTexture(bgColor, 1, 1);\n\t\tthis.bgImage = null;\n\t}", "@Override\n protected void paintBackground(Graphics2D g) {\n super.paintBackground(g);\n if (Game.level == 0) {\n g.drawImage(bg, 0, 0, this);\n } else if (Game.level == 1) {\n g.drawImage(bg, 0, 0, this);\n } else if (Game.level == 2) {\n g.drawImage(bg2, 0, 0, this);\n } else if (Game.level == 3) {\n g.drawImage(bg3, 0, 0, this);\n }\n\n }", "public void changeImage(){\n if(getImage()==storeItemImg) setImage(selected);\n else setImage(storeItemImg);\n }", "private void setBackgroundColor(int backColor){\n backgroundColor = backColor;\n touchArea.setBackgroundColor(backgroundColor);\n }", "private void setBackgrond(){\t\n this.background = new JLabel();\n this.background.setIcon(backgrondP);\n this.background.setVisible(true);\n this.background.setLocation(0, 0);\n this.background.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.add(background);\n\t}", "public void setDefaultModeBackgroundDrawable(Drawable defaultModeBackgroundDrawable) {\n mDefaultModeBackgroundDrawable = defaultModeBackgroundDrawable;\n\n if (!mIsSelectable) {\n itemView.setBackgroundDrawable(mDefaultModeBackgroundDrawable);\n }\n }", "public void setBackground(String texture)\r\n {\r\n \tFileInputStream inFile = null;\r\n \t try\r\n \t {\r\n \t inFile = new FileInputStream(texture);\r\n \t JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(inFile);\r\n \t BufferedImage bgBuffImg = decoder.decodeAsBufferedImage();\r\n \t ImageComponent2D bgImange = new ImageComponent2D(BufferedImage.TYPE_INT_RGB, bgBuffImg);\r\n \t bg.setImage(bgImange);\r\n \t inFile.close();\r\n \t }\r\n \t catch (Exception e)\r\n\t\t{\r\n \t \tSystem.out.println(e + \"\\n\" + \"Texture Import failed!\");\r\n \t }\r\n }", "public void resetBG() {\n\t\t\tfor(int i = 0; i < colonnes.size(); i++) {\n\t\t\t\tcolonnes.get(i).resetBG();\n\t\t\t}\n\t\t}", "private void setImage() {\n\t\t\n\t\tfor(int i=0; i<user.getIsVisited().length; i++) {\n\t\t\tif(user.getIsVisited()[i])\n\t\t\t\tspots[i].setBackgroundResource(R.drawable.num1_certified + i*2);\n\t\t\telse\n\t\t\t\tspots[i].setBackgroundResource(R.drawable.num1 + i*2);\n\t\t}\n\t}", "@Override\n\t\t\tpublic void paintControl(PaintEvent arg0) {\n\t\t\t\tgc.drawImage(background,0,0);\n\t\t\t}", "private void createBackground()\n {\n GreenfootImage background = getBackground();\n background.setColor(Color.BLACK);\n background.fill();\n }", "static void switchOriginal() {\n\n for (Iterator<Media> Fullsize = DataItem.get(currentAlbum).iterator(); Fullsize.hasNext(); ) {\n final Media Image = Fullsize.next();\n\n if (Image.MediaID.equals(CurrentPictureId)) {\n\n int imageWidth = Window.getClientWidth() - 200;\n\n FULLSIZE.setUrl(base + Image.MediaFullsizePath + \"&size=\" + imageWidth);\n FULLSIZE.setVisible(true);\n showDescription(Image);\n } else {\n DOM.getElementById(Image.MediaID).removeClassName(\"active\");\n }\n\n Action.showOriginal();\n }\n }", "@Override\n public void setBackgroundPattern(Pattern pattern) {\n }", "@NonNull\n public Builder setBackground(@NonNull Background background) {\n mImpl.setBackground(background.toProto());\n mFingerprint.recordPropertyUpdate(\n 5, checkNotNull(background.getFingerprint()).aggregateValueAsInt());\n return this;\n }", "@Override\n \tpublic void onConfigurationChanged(Configuration newConfig) {\n \t\tsuper.onConfigurationChanged(newConfig);\n \t\t\n \t\tif (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n \t\t\tmBrowPage.getFrameBackground().setBackgroundResource(R.drawable.bg_h);\n \t\t} else if (this.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {\n \t\t\tmBrowPage.getFrameBackground().setBackgroundResource(R.drawable.bg);\n \t\t}\n \t}", "@Override\n\tprotected void onResume() {\n\t\tisbackground=0;\n\t\tsuper.onResume();\n\t\t\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n Log.v(TAG, \"Invoked onStart()\");\n\n //checking the background colour returned from the settings screen.\n //invoking this code within the onStart method so that when we finish() the settings activity\n //it will load the new colour on the home activity\n SharedPreferences prefs = this.getSharedPreferences(\"usernamePrefs\", Context.MODE_PRIVATE);\n bgChoice = prefs.getInt(\"bg\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n\n layout = findViewById(R.id.layoutMain);\n\n if(bgChoice == 1) {\n //if the bgChoice int that has been returned is equal to 1 then set the background to\n //homev2\n layout.setBackgroundResource(R.drawable.homev2);\n } else if(bgChoice == 2) {\n //if the bgChoice int that has been returned is equal to 2 then set the background to\n //homev3\n layout.setBackgroundResource(R.drawable.homev3);\n } else if(bgChoice == 3) {\n //if the bgChoice int that has been returned is equal to 3 then set the background to\n //homev4\n layout.setBackgroundResource(R.drawable.homev4);\n }\n\n }", "private Background InitBackground()\r\n {\r\n \tBoundingSphere worldBounds = new BoundingSphere(\r\n \t\t new Point3d( 0.0, 0.0, 0.0 ), // Center\r\n \t\t 1000000000000000000000.0 ); // Extent\r\n \t\t\r\n \t// Set the background color and its application bounds\r\n \tbg = new Background( );\r\n \tbg.setColor( backgroundColor );\r\n \tbg.setCapability( Background.ALLOW_COLOR_WRITE );\r\n \tbg.setCapability( Background.ALLOW_COLOR_READ );\r\n \tbg.setCapability( Background.ALLOW_IMAGE_READ );\r\n \tbg.setCapability( Background.ALLOW_IMAGE_WRITE );\r\n \tbg.setApplicationBounds( worldBounds );\r\n \t\r\n \treturn bg;\r\n }", "public void setBackgroundLevel(final double estimate) {\r\n background = estimate;\r\n }", "public void toggleSelected(){\n if(!selected) {\n this.graphicsGroup.toFront();\n// System.out.println(\"selecting\");\n transparentBoxImages = new Image[(int)this.getWidth()/32][(int) this.getHeight()/32];\n //add the box to the proper position for each row this world addition covers\n for(int x = 0; x< this.getWidth() / game.BLOCK_SIZE; x++){\n for(int y = 0; y<this.getHeight()/game.BLOCK_SIZE;y++){\n Image nextImage = new Image(new TextureRegion(game.atlas.findRegion(\"GreenTransparent\")));\n nextImage.setSize(game.BLOCK_SIZE, game.BLOCK_SIZE);\n nextImage.setPosition(this.getX() + (x * game.BLOCK_SIZE), this.getY() + (y * game.BLOCK_SIZE));\n\n graphicsGroup.addActorBefore(this, nextImage);\n transparentBoxImages[x][y]= nextImage;\n\n }\n }\n\n //pick the item up\n this.setY(this.getY() + 10);\n selected = true;\n }\n else{\n\n //put the item back down\n this.setY(this.getY() - 10);\n\n for(int x = 0; x< this.getWidth() / game.BLOCK_SIZE; x++){\n for(int y = 0; y<this.getHeight()/game.BLOCK_SIZE;y++){\n graphicsGroup.removeActor(transparentBoxImages[x][y]);\n\n }\n }\n\n\n selected = false;\n\n //if we can't place it there, then we will just run everything again\n if(!game.placeable){\n Timer.schedule(new Timer.Task(){\n @Override\n public void run() {\n game.selectEnemy(worldAddition);\n }\n }, 0.1f);\n }\n\n\n }\n }", "void setupBackgrounds() {\n // initialize the background tool\n BackgroundTool bgTool = new BackgroundTool(codeBaseString);\n bgSwitch = bgTool.getSwitch();\n bgChooser = bgTool.getChooser();\n }", "public Background(GameLevel w, int width, int height) {\n super(w, 800, 800);\n this.world = w;\n //this.gameLevel = gameLevel;\n try {\n //All images being read from their respective image files and being assigned to variables.\n bg = ImageIO.read(new File(\"data/bg.png\"));\n bg2 = ImageIO.read(new File(\"data/bg2.png\"));\n bg3 = ImageIO.read(new File(\"data/bg3.png\"));\n fg = ImageIO.read(new File(\"data/clouds.png\"));\n win = ImageIO.read(new File(\"data/win.jpg\"));\n dead = ImageIO.read(new File(\"data/dead.jpg\"));\n scoreBoard = ImageIO.read(new File(\"data/scoreBoard.png\"));\n bulletBillSelect = ImageIO.read(new File(\"data/GUI/billSelect.png\"));\n bulletSelect = ImageIO.read(new File(\"data/GUI/bulletSelect.png\"));\n arrow = ImageIO.read(new File(\"data/GUI/arrow.png\"));\n health = ImageIO.read(new File(\"data/GUI/health.png\"));\n black = ImageIO.read(new File(\"data/GUI/black.jpg\"));\n\n\n } catch (IOException ex) {\n System.out.println(\"System Error\");\n }\n }", "public abstract void setBackgroundPressed(final int rgba);", "@Override\n public void setBackgroundColor(int backgroundColor) {\n }" ]
[ "0.7006117", "0.67746556", "0.67690665", "0.674372", "0.6712174", "0.6704887", "0.6598509", "0.6568213", "0.6504591", "0.6396064", "0.637604", "0.63156074", "0.6311948", "0.62225825", "0.60711217", "0.60414565", "0.60403365", "0.6007439", "0.5937621", "0.5937114", "0.592892", "0.58788335", "0.5868786", "0.58669263", "0.58461493", "0.58458626", "0.58187824", "0.5779833", "0.5777078", "0.577038", "0.5763488", "0.57615644", "0.5745759", "0.57283413", "0.57140195", "0.5701104", "0.56923914", "0.56839126", "0.56746787", "0.56603867", "0.5648965", "0.56480366", "0.56382173", "0.56357956", "0.56351143", "0.5628552", "0.5615209", "0.56071746", "0.5603248", "0.55954236", "0.5580747", "0.55760247", "0.55727255", "0.5554938", "0.55547535", "0.55506635", "0.55355394", "0.55165774", "0.5497445", "0.54882514", "0.5487358", "0.5470652", "0.54680014", "0.54578066", "0.5442537", "0.54241806", "0.54186046", "0.5411149", "0.5404293", "0.53923845", "0.5380905", "0.5380593", "0.53693783", "0.5364892", "0.53093135", "0.5308431", "0.53055525", "0.53052", "0.53029233", "0.52860767", "0.5279258", "0.5277824", "0.52740455", "0.5269309", "0.5263561", "0.5251215", "0.5250247", "0.52483475", "0.5243495", "0.52414507", "0.5240331", "0.52387017", "0.5223601", "0.52140206", "0.5206244", "0.5204076", "0.5202047", "0.51919854", "0.5190886", "0.5189361", "0.5181005" ]
0.0
-1
====================================================================== public void paintComponent(Graphics g) What happens whenever the agent canvas is (re)drawn. ======================================================================
public void paintComponent(Graphics g) { super.paintComponent(g); // safest to create a copy of the graphics component -- one must // ensure that no changes are made to the original Graphics2D graphics = (Graphics2D) g.create(); JViewport viewport = null; JScrollPane scrollPane = null; Insets borders = null; int viewportWidth = 0; int viewportHeight = 0; int agentGUISize = Parameters.getAgentGUISize(); int imageWidth = gridWidth * agentGUISize; int imageHeight = gridHeight * agentGUISize; // make sure that we're grabbing onto the viewport of the scroll pane Component ancestor = getParent(); if (ancestor == null || !(ancestor instanceof JViewport)) { //Exception e = new Exception( // "AgentCanvas instance must be within JScrollPane instance"); //e.printStackTrace(); //return; viewportWidth = imageWidth; viewportHeight = imageHeight; borders = new Insets(5,5,5,5); } else { // presumably we have the viewport of scroll pane containing 'this' viewport = (JViewport) ancestor; viewportWidth = viewport.getWidth(); viewportHeight = viewport.getHeight(); scrollPane = (JScrollPane) viewport.getParent(); borders = scrollPane.getInsets(); } // Note that drawImage automatically scales the image to fit that // rectangle. int renderWidth = gridWidth * agentGUISize; int renderHeight = gridHeight * agentGUISize; // determine the starting (x,y) in the viewport where the image // will be drawn viewportX = 10 + Math.max((viewportWidth - renderWidth) / 2, 0); viewportY = 20 + Math.max((viewportHeight - renderHeight) / 2, 0); // in case there was a previous image, clear things out //graphics.clearRect(0, 0, viewportWidth, viewportHeight); //graphics.clearRect(viewportX, viewportY, viewportWidth, viewportHeight); graphics.clearRect(viewportX, viewportY, renderWidth, renderHeight); // now draw the shelters for (int col = 0; col < gridWidth; col++ ) { for (int row = 0; row < gridHeight; row++ ) { Shelter s = shelters.getShelterAt( col, row ); //shelterGrid[col][row]; // make sure not to draw any agent outside the image boundaries; // remember that graphics x corresponds to column and graphics y // corresponds to row if ((row >= 0) && (col >= 0) && ((row * agentGUISize) + agentGUISize <= renderHeight) && ((col * agentGUISize) + agentGUISize <= renderWidth)) { int guiX = GUI_XPAD + viewportX + (col * agentGUISize); int guiY = GUI_YPAD + viewportY + (row * agentGUISize); int occupants = s.getCurrentOccupancy(); int capacity = s.getMaxCapacity(); int infested = s.getInfestedCount(); int infected = s.getInfectedCount(); if ( DEBUG ){ if ( infested > occupants || infected > occupants ) { System.out.println( "Shelter(" + col + ", " + row + ") " + " occupants = " + occupants + " infested = " + infested + " infected = " + infected ); } } double proportionInfested = infested / (double) occupants; double proportionInfected = infected / (double) occupants; if ( occupants == 0 ){ proportionInfested = 0.0; proportionInfected = 0.0; } double proportionOccupied = occupants / (double) capacity; double proportionUnoccupied = 1.0 - proportionOccupied; // Shelter Occupancy info graphics.setPaint( Color.white ); int unoccupiedHeight = (int) Math.round(agentGUISize * proportionUnoccupied); int occupiedHeight = agentGUISize - unoccupiedHeight; // Proportion of shelter currently not in use graphics.fillRect( guiX, guiY, OCCUPANCY_BAR_WIDTH, unoccupiedHeight ); graphics.setPaint( Color.black ); graphics.fillRect(guiX, guiY + unoccupiedHeight, OCCUPANCY_BAR_WIDTH, occupiedHeight ); if (occupants > 0){ graphics.setPaint( Color.white ); String str = ""+occupants; graphics.drawString(str, guiX + 2, guiY + unoccupiedHeight + 15); graphics.setPaint( Color.black ); } // Infestation info // Color of upper half of grid square should get more purple // as more Hosts are infested int red = 255 - (int) Math.round( 255 * proportionInfested); int green = 255 - (int) Math.round( 255 * proportionInfested); int blue = 255; Color infestColor = null; try{ infestColor = new Color( red, green, blue ); } catch (IllegalArgumentException ie ) { System.out.println("Weird color for infested block: (" + red + ", " + green + ", " + blue + ")"); System.out.println("Shelter at (" + row + ", " + col +")"); System.out.println("Usually means infested count is off."); infestColor = Color.white; } graphics.setPaint( infestColor ); graphics.fillRect(guiX + OCCUPANCY_BAR_WIDTH, guiY, STATUS_BAR_WIDTH, agentGUISize / 2); String data = "" + occupants + "/" + infested; graphics.setPaint( Color.black ); graphics.drawString(data, guiX + OCCUPANCY_BAR_WIDTH + 5, guiY + agentGUISize/2 - 10 ); // Infection info // Color of lower half of grid square should get redder // as more Hosts are infected. red = 255; green = 255 - (int) Math.round( 255 * proportionInfected); blue = 255 - (int) Math.round( 255 * proportionInfected); Color infectColor = null; try { infectColor = new Color( red, green, blue ); } catch (IllegalArgumentException ie) { System.out.println("Weird color for infected block: (" + red + ", " + green + ", " + blue + ")"); System.out.println("Shelter at (" + row + ", " + col +")"); System.out.println("Usually means infected count is off."); infestColor = Color.white; } graphics.setPaint( infectColor ); graphics.fillRect(guiX + OCCUPANCY_BAR_WIDTH, guiY + agentGUISize/2, STATUS_BAR_WIDTH, agentGUISize / 2); data = "" + occupants + "/" + infected; graphics.setPaint( Color.black ); graphics.drawString(data, guiX + OCCUPANCY_BAR_WIDTH + 5, guiY + agentGUISize - 10 ); // Color of lower half of grid square should get bluer // as more Hosts are infected /* if (a.isTreated()) { // if treated with antibiotic, draw a little dot in the // middle of the rendered agent int dotSize = 2; graphics.setPaint(Color.black); graphics.fillRect(guiX + ((agentGUISize - dotSize) / 2), guiY + ((agentGUISize - dotSize) / 2), dotSize, dotSize); } */ drawShelterFrame(graphics, guiX, guiY, agentGUISize, agentGUISize ); } } } // draw the grid last so that it will overlay the agent squares //drawGrid(graphics, viewportX, viewportY, renderWidth, renderHeight); drawGrid(graphics, viewportX + GUI_XPAD, viewportY + GUI_YPAD, renderWidth, renderHeight); // show the number of infected/uninfected agents drawAgentInfo(graphics, viewportX, viewportY, renderWidth, renderHeight, borders); revalidate(); // get rid of the graphics copy graphics.dispose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void paintComponent(Graphics g) \n {\n super.paintComponent(g);\n doDrawing(g);\n }", "@Override\n\tpublic void paint(Graphics g) {\t\t\n\t\t//tracking total time manually with the time variable\n\t\ttime += control.timerValue;\n\t\t\n\t\t//events\n\t\tsuper.paintComponent(g); // a necessary call to the parent paint method, required for proper screen refreshing\n\t\tpaintCommunity(g);\n\n\t\t//event based call back for simulation and updates to sim_objects\n\t\tcontrol.paintCB(g);\n\t\t\n\t\t//shutdown simulation by stopping timer\n\t\tif (!control.keepAlive()) {\n\t\t\ttimer.stop();\n\t\t}\n\t}", "public void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tdisp.notifyAll(g);\n\t}", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n draw(g);\n }", "@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}", "public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}", "public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}", "@Override\n public void paintComponent(Graphics g)\n {\n m_g = g;\n // Not sure what our parent is doing, but this seems safe\n super.paintComponent(g);\n // Setup, then blank out with white, so we always start fresh\n g.setColor(Color.white);\n g.setFont(null);\n g.clearRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.fillRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.setColor(Color.red);\n //g.drawRect(10,10,0,0);\n //drawPoint(20,20);\n \n // Call spiffy functions for the training presentation\n m_app.drawOnTheCanvas(new ExposedDrawingCanvas(this));\n m_app.drawOnTheCanvasAdvanced(g);\n \n // ADVANCED EXERCISE: YOU CAN DRAW IN HERE\n \n // END ADVANCED EXERCISE SPACE\n \n // Clear the special reference we made - don't want to abuse this\n m_g = null;\n \n \n // Schedule the next repaint\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n m_app.repaint();\n try\n {\n Thread.sleep(100);\n }\n catch (Exception e)\n { \n \n }\n }\n }); \n }", "@Override \n\tpublic void update(Graphics g) \n\t{\n\t\tpaint(g); \n\t}", "@Override\n public void update(Graphics g) {\n paint(g);\n }", "public void paint(Graphics g) {\n\t\tclearScreen(g);\n\t\tif (agents.size() == 2) {\n\t\t\tdrawAxes(g);\n\t\t\tdrawAgents(g);\n\t\t}\n\t}", "public void paintComponent(Graphics g)\r\n\t{\n\t}", "public void draw() {\n\t\tsuper.repaint();\n\t}", "public void paint(Graphics g) {\n\tupdate(g);\n }", "protected void paintComponent(Graphics g)\n\t{\n\t}", "public void paint(Graphics g) {\n\t\tupdate(g);\n\t}", "@Override //paint component is overridden to allow super.paintCompnent to be called\r\n public void paintComponent(Graphics g) {\n \tsuper.paintComponent(g); //The super.paintComponent() method calls the method of the parent class, prepare a component for drawing\r\n doDrawing(g); //The drawing is delegated inside the doDrawing() method\r\n }", "public void paint(Graphics g) {\n super.paint(g);\n update(g);\n }", "public void update(Graphics g){\n paint (g);\r\n \r\n }", "public void draw(){\n\t\tcomponent.draw();\r\n\t}", "public void paint(Graphics g)\r\n\t{\r\n\t\t// First call the base class paint method to do a one time\r\n\t\t// Initialization - specific to the JoglCanvas class\r\n\t\tsuper.paint(g);\r\n\t\t//System.out.println(\"Call to paint\");\r\n\t\tdisplay();\r\n\t}", "public void paintComponent(Graphics g);", "public void update(Graphics g) {\n paint(g);\n }", "public void update(Graphics g) {\n paint(g);\n }", "public void update(Graphics g){\n paint(g);\n }", "@Override\r\n\tpublic void update(Graphics g) {\r\n\t\t// S*ystem.out.println(\"Graph.update\");\r\n\t\t// paint(g);\r\n\t\t// super.update(g);\r\n\t}", "public void update(Graphics g) {\r\n paint(g);\r\n }", "public void paint(Graphics g) {\n\t\t\n\t}", "public void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg2 = (Graphics2D) g;\n\t\tdibujar(g);\n\t\tactualizar();\n\t}", "private void draw() {\n gsm.draw(g);\n }", "public void update(Graphics g) {\n // Note: Since the paint method is going to draw an\n // image that covers the complete area of the component we\n // do not fill the component with its background color\n // here. This avoids flickering.\n paint(g);\n }", "public void paint(Graphics g) {\r\n super.paint(g); // call method paint() of super class (JFrame)\r\n if (ge != null) { // if the paint tool exists\r\n System.out.println(\"calling method redrawAll() of PaintTool.\");\r\n ge.redrawAll(g); // call method redrawAll() of class PaintTool\r\n System.out.println(\"method redrawAll() of class PaintTool executed.\");\r\n }\r\n }", "public void paint(Graphics g){\n\t\t\n\t}", "public void paint(Graphics g){\n\t\tg.setColor(getBackground());\n\t\tg.fillRect(0,0, Frame_Size_X, Frame_Size_Y);\n\t\t\n\t\tif (!gameStarted){\n\t\t\tstartNewGame(g);\n\t\t\t\n\t\t} \n\t\tif (gameStarted && !gameOver){\n\t\t\tupdateObjects(g);\n\t\t}\n\t\tif (gameOver){\n\t\t\tdrawGameOverBanner(g);\n\t\t}\n\t}", "public void paint (Graphics g) {\n updateReport();\n super.paint(g);\n }", "public void paint(Graphics g) {\n }", "public void paint(Graphics g) {\n }", "public void draw(Graphics g) {\n\t\t\r\n\t}", "public void paint (Graphics g) {\n updateReport();\n super.paint(g);\n }", "@Override\r\n\tprotected void paintComponent(Graphics g) \r\n\t{\n\t\tsuper.paintComponent(g);\r\n\t\t\r\n\t\t// passes Graphics g into flappy\r\n\t\tflappy.flappybox.repaint(g); /// passes Graphics g into flappy\r\n\t}", "public void draw(Graphics g) {\n \n activeInvincibilityFrames(g); \n\n UIDrawing(g);\n }", "public void update(Graphics g) {\r\n\t\tpaint(g);\r\n\t}", "void paintComponent(Graphics g);", "public void paint (Graphics g)\r\n {\n }", "public void draw(Graphics g) {\r\n\t\t\r\n\t}", "public void paint (Graphics g){\n \r\n }", "public void paint(Graphics g) {\n\t\tsuper.paint(g);\n\t\tcheckCollision(g);\n\t\tif (names_set) {\n\t\t\tdrawStartCountdown(g);\n\t\t\tif (start) {\n\t\t\t\tnames_set = false;\n\t\t\t}\n\t\t}\n\t\tif (gameOver) {\n\t\t\tdrawGameOver(g);\n\t\t} else {\n\t\t\tdrawObjects(g);\n\t\t\tdrawScores(g);\n\t\t\tif (dispTime){\n\t\t\t\t drawCountdown(g);\n\t\t\t}\n\t\t\tif (computer.isPowerup()) {\n\t\t\t\tdrawPowerupAI(g);\n\t\t\t}\n\n\t\t\tif (hero.isPowerup()) {\n\t\t\t\tdrawPowerupHero(g);\n\t\t\t}\n\t\t\tif(explodet1){\n\t\t\t\ttimer3.start();\n\t\t\t\tdrawExplosion(g, posxt1, posyt1);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(explodet2){\n\t\t\t\ttimer3.start();\n\t\t\t\tdrawExplosion(g, posxt2, posyt2);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n render(g);\n }", "@Override\n\tpublic void draw(Graphics canvas) {}", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\r\n\t\trender(g);\r\n\t}", "public void draw(Graphics g) {\n\t\t\n\t}", "public void paint() {\n paintStrategy.paintImmediately();\n }", "@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\trequestFocusInWindow();\n\t\tg.drawImage(mazeImage, 0, 0, null);\n\t\tint difficulty = gui.getModel().getDifficulty();\n\t\tint w = getWidth()/difficulty; int h = getHeight()/difficulty;\n\t\tint[] pos = gui.getModel().getPlayerPos();\n\t\tif (!gui.getModel().isClassicMode()) {\n\t\t\tfor (BaseState s: gui.getModel().getMaze()) {\n\t\t\t\tCollectibleState cState = (CollectibleState) s;\n\t\t\t\tif (!cState.checkCollected())\n\t\t\t\t\tg.drawImage(cState.getCollectedSprite(), cState.getX()*w, cState.getY()*h, w, h, null);\n\t\t\t}\n\t\t\tif (!gui.getModel().allCollected()) g.drawImage(this.end, (difficulty-1)*w, (difficulty-1)*h, w, h, null);\n\t\t}\n\t\tg.drawImage(gui.getModel().getPlayerSprite(), pos[0]*w, pos[1]*h, w, h, null);\n\t}", "public void paint(Graphics g) {\n super.paint(g);\n\n }", "public void paintComponent(Graphics g)\n {\n paintBorder(g);\n paintPlanets(g);\n paintEnemies(g);\n paintEntity(g, player);\n paintCameraBox(g);\n }", "@Override\r\n public void repaint(Object canvas) {\r\n {\r\n }\r\n\t}", "public void draw(){\n super.repaint();\n }", "@Override\r\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\r\n\t\t}", "public void drawOn(Graphics g);", "@Override\r\n\tpublic void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\t//parent.log(\"Height = \" + getHeight());\r\n\t\tpaintGrid((Graphics2D) g);\r\n\t\tpaintMap((Graphics2D) g);\r\n\t\tif (parent.showMesh) paintMesh((Graphics2D) g);\r\n\t\tpaintParticles((Graphics2D) g);\r\n\t\tpaintRobot((Graphics2D) g);\r\n\t\tpaintTarget((Graphics2D) g);\r\n\t\tpaintPath((Graphics2D) g);\r\n\t\tpaintMoves((Graphics2D) g);\r\n\t\tpaintFeatures((Graphics2D) g);\r\n\t\tpaintWaypoints((Graphics2D) g);\r\n\t}", "protected void paintComponent(Graphics g)\n\t\t{\n\t\t\tsuper.paintComponent(g); \n\t\t\t//drawing the background\n\t\t\tg.drawImage(BackGround, 0, 0, null); \n\t\t\n\t\t\t//if(GameOn == true)\n\t\t\t//{\n\t\t\t//calling the paint function of the game characters\n\t\t\tpl.paint(g);\n\t\t\n\t\t\t\n\t\t\tfor(int i = 0 ; i < EnemyList.size(); i++)\n\t\t\t{\n\t\t\t\tEnemyList.get(i).paint(g);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//drawing the explosions\n\t\t\tg.drawImage(Explosion, enExplosionX, enExplosionY, null); \n\t\t\tg.drawImage(Explosion, plExplosionX, plExplosionY, null); \n\t\t\n\t\t\tfont = new Font(\"LCD\", Font.BOLD, 25);\n\t\t\tg.setFont(font);\n\t\t\t\n\t\t\t//g.drawString(\"Time: \" + formatTime(gameTime),\t\t\t0, 615);\n\t\t g.drawString(\"Rockets Remaining: \" + pl.NumRockets, \t0, 635);\n\t\t g.drawString(\"Bullets Remaining: \" + pl.NumBullets, \t0, 655);\n\t\t g.drawString(\"Enemies Destroyed: \" + DestroyedEnemies, 0, 675);\n\t\t g.drawString(\"Runaway Enemies: \" + RunAwayEnemies, 0, 695); \n\t\t//}\n\t\t \n\t\t\tif(BulletFired = true)\n\t\t {\n\t\t \tfor(int i = 0; i < BulletList.size();i++)\n\t\t \t{\n\t\t \t\tBulletList.get(i).paint(g); \n\t\t \t}\n\t\t }\n\t\t \n\t\t \t\t \n\t\t if(RocketFired = true)\n\t\t {\n\t\t \tfor(int i = 0; i < RocketList.size();i++)\n\t\t \t{\n\t\t \t\tRocketList.get(i).paint(g); \n\t\t \t}\n\t\t }\n\t\t\tif(GameOn == false){\n\t\t \tg.drawImage(GameOver, 200, 0, null);\n\t\t \t//g.drawString(\"Enemies Destroyed: \" + DestroyedEnemies, 250, 10);\n\t\t }\n\t\t else if (WinsState == true )\n\t\t {\n\t\t \tg.drawImage(GameWin, 200, 0, null);\n\t\t \n\t\t }\n\t\t \n\t\t \n\t\t \n\t\t \n\t\t}", "@Override\r\n \tpublic void paintComponent(Graphics g) {\r\n \t\tsuper.paintComponent(g);\r\n \t\tdrawSnake(g);\r\n \t}", "public void paint(Graphics g) {\n setViewWindow(myCurrentLeftX, 0, DISP_WIDTH, DISP_HEIGHT);\n paint(g, CANVAS_X, CANVAS_Y);\n }", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n drawImage(g);\n }", "public void draw(Graphics g){\n\t}", "@Override\n public void paint(Graphics g) {\n }", "@Override\n public void paint(Graphics g) {\n g2 = (Graphics2D) g;\n drawBackground();\n drawSquares();\n drawLines();\n gui.hint = new TreeSet<>();\n }", "public void render() {\n this.canvas.repaint();\n }", "public void paintComponent(Graphics g){\n\t\tg.drawImage(bf, 0, 0, this);\n\t}", "public void paintComponent(Graphics g) {\n\t\tdrawMaze(g);\n\t\tif (maze.getPath().size() > 0) {\n\t\t\tdrawPath(g);\n\t\t}\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2d = (Graphics2D) g;\n drawAxis(g2d);\n \n drawCurve(g2d);\n \n drawPoints(g2d);\n \n // drawObject(g2d); **\n // El panel, por defecto no es \"focusable\". \n // Hay que incluir estas líneas para que el panel pueda\n // agregarse como KeyListsener.\n this.setFocusable(true);\n this.requestFocusInWindow();\n }", "protected void paintComponent(Graphics g) {\n \t\n \tif(refreshRate != 0)//if FPS is set to 0, this will simulate a 'frozen' state\n \tt.setDelay(1000 / refreshRate);//creates desired FPS\n \t//if-else statement used for incrementing and resetting repaintCount, and used for calculating the FPS which is displaye dby fpsPanel.java\n \tif (repaintCount++ > 0) {\n long curTime = System.currentTimeMillis();\n long elapseTime = curTime - startTime;\n rate = ((double)(repaintCount - 1)) / (elapseTime / 1000.0);\n } else {\n startTime = System.currentTimeMillis();\n }\n super.paintComponent(g);\n g.setColor(backColor);//backcolor controls the color of the background\n g.fillRect(0, 0, getWidth(), getHeight());\n g.setColor(objectColor);//objectColor controls the color of the shape\n if(oval)\n \tg.drawArc(x, y, width, height, 0, 360);\n if (rect)\n \tg.drawRect(x, y, width, height);\n if (rectround){\n RoundRectangle2D roundedRectangle = new RoundRectangle2D.Float(x, y, width, height,5,5);\n ((Graphics2D) g).draw(roundedRectangle); \n }\n g.setColor(textColor);//textColor controls the color of the text\n g.setFont(f);\n if (small)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x-15,y+13);//positioned properly for all small sizes\n if(medium)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x+1,y+16);//coordinates position properaly for all medium sizes\n if(large)\n \tg.drawString(\"(\"+x+\",\"+y+\")\",x+50,y+25);//coordinates position properly for all large sizes\n \t\n }", "public void completeRedraw()\r\n\t{\r\n\t\tg = (Graphics2D) s.getDrawGraphics();\r\n\t}", "public void paintComponent(Graphics g) { \r\n\t\tsuper.paintComponent(g);\r\n \t//draw text\r\n \tg.setColor(Color.WHITE);\r\n g.drawString(\"Controls: wasd or arrow keys changes snake direction; ENTER = restart game.\", 50, 20);\r\n g.drawString(\"Score: \" + foodCollected, 50, 35);\r\n \t//draw boundary\r\n \tg.setColor(Color.LIGHT_GRAY);\r\n \tg.drawRect(50, 50, 500, 500);\r\n \t\r\n if(gameOver == false) {\r\n\t //draw snake\r\n\t g.setColor(Color.GREEN);\r\n\t for(int i = 0; i < snake.getLength(); i++) {\r\n\t \tSnakeSegment ts = snake.getSegment(i);\r\n\t \tg.fillRect(ts.getxPos(), ts.getyPos(), 10, 10);\r\n\t }\r\n\t //draw food\r\n\t \tg.setColor(Color.RED);\r\n\t for(int i = 0; i < foodList.size(); i++) {\r\n\t \tg.fillOval(foodList.get(i).getxPos(), foodList.get(i).getyPos(), 10, 10);\r\n\t }\r\n\t timer.start();\r\n }\r\n else {\r\n \t//snake turns yellow when it bites itself\r\n \tif(snake.getLength() > 0) {\r\n \t\tg.setColor(Color.YELLOW);\r\n \t for(int i = 0; i < snake.getLength(); i++) {\r\n \t \tSnakeSegment ts = snake.getSegment(i);\r\n \t \tg.fillRect(ts.getxPos(), ts.getyPos(), 10, 10);\r\n \t }\r\n \t}\r\n \t//draw food\r\n \tg.setColor(Color.RED);\r\n\t for(int i = 0; i < foodList.size(); i++) {\r\n\t \tg.fillOval(foodList.get(i).getxPos(), foodList.get(i).getyPos(), 10, 10);\r\n\t }\r\n\t //print game over message\r\n\t g.setColor(Color.WHITE);\r\n \tg.drawString(\"GAME OVER\", 270, 270);\r\n \ttimer.stop();\r\n }\r\n\t}", "public void draw(Graphics g);", "public void draw(Graphics g);", "public void paintComponent(final Graphics g) {\n drawWall(g);\n drawDots(g);\n drawGhosts(g);\n drawPacman(g);\n }", "public void paintComponent(Graphics g) {\n\n\t\t\tif (death==false) {//if we arent dead, the game must be drawn\n\t\t\t\tif (background!=null) {//draw background\n\t\t\t\t\tg.drawImage(background.getImage(), background.getX(), background.getY(), this);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (blocks!=null) {//draw the blocks. from the list\n\t\t\t\t\t//System.out.println(\"Yes\");\n\t\t\t\t\tfor (int x = blocks.size()-1; x>= 0; x--) {\n\t\t\t\t\t\tif (blocks.get(x).getDisable()) {//if the blocks are disabled, destroy\n\t\t\t\t\t\t\tblocks.remove(x);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfor (int t = 0; t<blocks.size(); t++) {//now draw the blocks.\n\t\t\t\t\t\t//System.out.printf(\"%d %d %d %d\\n\",blocks.get(t).getX(), blocks.get(t).getY(), blocks.get(t).getWidth(), blocks.get(t).getHeight());\n\t\t\t\t\t\tg.setColor(blocks.get(t).getColor());\n\t\t\t\t\t\tg.fillRect(blocks.get(t).getX(), blocks.get(t).getY(), blocks.get(t).getWidth(), blocks.get(t).getHeight());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (slider!=null) {//if the slider isnt null, draw it\n\t\t\t\t\t//System.out.printf(\"%d %d\\n\",slider.getX(), slider.getY());\n\t\t\t\t\tg.drawImage(slider.getImage(), slider.getX(), slider.getY(), this);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (ball!=null) {//draw ball.\n\t\t\t\t\tg.drawImage(ball.getImage(), ball.getX(), ball.getY(), this);\n\t\t\t\t}\n\t\t\t\tfor (PowerUp power: powerUps) {//draw all of the powerups\n\t\t\t\t\tg.drawImage(power.getImage(), power.getX(), power.getY(), this);\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//draw bottom frame\n\t\t\t\t\n\t\t\t\tg.setColor(new Color(0,0,0));\n\t\t\t\tg.fillRect(0, GamePlay.getScreenHeight()-h, GamePlay.getScreenWidth(), h);//this is the menu bar\n\t\t\t\t\n\t\t\t\t//draw score\n\t\t\t\tg.setColor(new Color(255,255,255));\n\t\t\t\tg.setFont(new Font(\"Helvetica\", Font.PLAIN, 32));\n\t\t\t\tg.drawString(String.format(\"Score: %d\", score), GamePlay.getScreenWidth() - 5 - g.getFontMetrics().stringWidth(String.format(\"Score: %d\", score)), GamePlay.getScreenHeight() - 5 - 32);\n\t\t\t\t\n\t\t\t\t//paused\n\t\t\t\tif (stopped) {\n\t\t\t\t\tg.drawString(\"Paused\", 10, 42);//upper left corner of the screen. just say paused so user knows\n\t\t\t\t}\n\t\t\t\t//lives\n\t\t\t\tint livesFontSize=15;\n\t\t\t\tg.setFont(new Font(\"Helvetica\", Font.PLAIN, livesFontSize));\n\t\t\t\tg.drawString(String.format(\"Lives: %d\", lives), 20+5+pauseButton.getWidth(), GamePlay.getScreenHeight()-h+(2+livesFontSize));\n\t\t\t\t\n\t\t\t\tfor (int x=0; x<lives; x++) {//draw one ball for every life they have. \n\t\t\t\t\t//System.out.println(\"hey\");\n\t\t\t\t\tg.drawImage(ball.getImage(), 5+pauseButton.getWidth()+20+(5+ball.getWidth())*x, GamePlay.getScreenHeight()-(h/2)-(ball.getHeight())+(livesFontSize/2), this);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//logo\n\t\t\t\tg.drawImage(logo.getImage(), GamePlay.getScreenWidth()/2-logo.getWidth()/2, GamePlay.getScreenHeight() - (h/2) - (logo.getHeight()/2)-10, this);\n\t\t\t\t\n\t\t\t\t//pause button\n\t\t\t\tg.drawImage(pauseButton.getImage(), 5, GamePlay.getScreenHeight() - (h/2) - pauseButton.getHeight()/2 -10 , this);\n\t\t\t\t\n\t\t\t} else {//this means the player died.\n\t\t\t\t\n\t\t\t\t//draw black background \n\t\t\t\t\n\t\t\t\t//draw logo\n\t\t\t\tlogo.resize(400,100);\n\t\t\t\tg.setColor(new Color(0,0,0));\n\t\t\t\tg.fillRect(0, 0, GamePlay.getScreenWidth(), GamePlay.getScreenHeight());\n\t\t\t\tg.drawImage(logo.getImage(), GamePlay.getScreenWidth()/2 - logo.getWidth()/2, 100, this);\n\t\t\t\t\n\t\t\t\tg.setColor(new Color(255,255,255));//draw game over text\n\t\t\t\tg.setFont(new Font(\"Helvetica\", Font.PLAIN, 60));\n\t\t\t\tg.drawString(\"Game Over!\", GamePlay.getScreenWidth()/2 - g.getFontMetrics().stringWidth(\"Game Over!\")/2, GamePlay.getScreenHeight()/2 - 30);\n\t\t\t\t\n\t\t\t\t//draw score. \n\t\t\t\tg.drawString(String.format(\"Your Score: %d\", score), GamePlay.getScreenWidth()/2 - g.getFontMetrics().stringWidth(String.format(\"Your Score: %d\", score))/2, GamePlay.getScreenHeight()/2 + 100);\n\t\t\t}\n\t\t\t\n\t\t}", "public abstract void paint(Graphics g);", "protected void paint(Graphics g) {\n mymidlet.paint(g);\n }", "@Override\r\n\tpublic void paintComponent(Graphics g)\r\n\t{\r\n\t\t// Get the width and height of the component window\r\n\t\twidth = getWidth();\r\n\t\theight = getHeight();\t\t\t\t\r\n\t\t\r\n\t\tGraphics2D g2 = (Graphics2D) g;\r\n\t\tgenerateCircles();\r\n\t\tdrawCircles(g2);\r\n\t}", "public void draw() {\n \n // TODO\n }", "public void draw(Graphics g){\n g.setColor(c);\n if (this.fill){\n g.fillOval(x, y, width, height);\n }else{\n g.drawOval(x, y, width, height);\n }\n }", "public void paintComponent(Graphics myGraphic) \n\t{\n\t\tsuper.paintComponent(myGraphic);\t\n\t}", "public void update(Graphics param1Graphics) {\n/* 252 */ paint(param1Graphics);\n/* */ }", "public void draw() {\n\t\t\r\n\t\tSystem.out.println(\"drawing...\");\r\n\t\t\r\n\t}", "@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}", "public abstract void selfPaint(Graphics g);", "@Override\n\tpublic void paintComponent(Graphics g){\n\t\tsuper.paintComponent(g);\n\t\tanimateFace((int)circle.x, (int)circle.y, (int)circle2.x, (int)circle2.y);\n\t\tdrawFace(g);\n\t}", "@Override\n public void paintComponent(Graphics gg){\n \tGraphics2D g = (Graphics2D) gg;\n \tg.setColor(new Color(0,0,0));\n \tg.fillRect(0, 0, width, height);\n \t/// Draw Functions ///\n \t//menus.drawMenus(g);\n \t/// Rest ///\n \tfor(PhysicsObject obj: objects){\n \t\tobj.drawSelf(g);\n \t}\n \tg.setColor(new Color(255,255,255));\n \tg.fillOval(mx-3, my-3, 5, 5);\n }", "private synchronized void draw(Graphics2D g){\n\t\t\t//System.out.print(SUtils.endl() + \">>GUI::draw start.\");\n\t\t\t//Set rendering hints.\n\t\t\tg.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\n\t\t\tg.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\t\n\t\t\t//Copy the raster from the current job.\n\t\t\tImageDispatch.getInstance().getScreenImage(displayImg);\n\t\t\t\n\t\t\t//Draw the image to the screen.\n\t\t\tg.drawImage(displayImg, 0, 0, width, height, null);\n\t\t\t\n\t\t\t//Dispose graphics.\n\t\t\tg.dispose();\n\t\t\t\n\t\t\t//System.out.print(\">>GUI::draw finish.\" + SUtils.endl());\n\t\t}", "public void paintComponent(Graphics g){\n super.paintComponent(g); \n g.drawImage(barImage,0,0,this);\n \n if(atStartPanel){ //default true, change to false if clicked once\n this.add(new StartPanel());\n }\n else{ //Start the game when the player clicks once in the start panel\n if(!ended){ \n if(delay){ \n drawPlayer(g, player.getImage2()); \n }\n else{\n drawPlayer(g, player.getImage1());\n } \n \n drawFire(g);\n drawHearts(g);\n drawWaters(g);\n }\n \n \n //GameOver when lives reaches 0; \n if(player.getLives() == 0){\n this.add(new GameOver(player.getScore())); \n ended = true; \n }\n } \n }", "@Override\r\n\tpublic void paint(Graphics g, JComponent c) {\n\t\tsuper.paint(g, c);\r\n\t}", "@Override\n public void paintComponent(final Graphics theGraphics) {\n super.paintComponent(theGraphics);\n final Graphics2D g2d = (Graphics2D) theGraphics; \n g2d.setPaint(PowerPaintMenus.getDrawColor());\n g2d.setStroke(new BasicStroke(PowerPaintMenus.getThickness()));\n if (!myFinishedDrawings.isEmpty()) {\n for (final Drawings drawing : myFinishedDrawings) {\n g2d.setColor(drawing.getColor());\n g2d.setStroke(drawing.getStroke());\n if (PowerPaintMenus.isFilled()) {\n g2d.fill(drawing.getShape());\n } else {\n g2d.draw(drawing.getShape()); \n }\n }\n }\n if (myHasShape) {\n g2d.draw(myCurrentShape);\n }\n }", "public void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\t\r\n\t\t// Setting drawings the global color.\r\n\t\tg.setColor( this.model.defaultV.movingColor ); \r\n\r\n\t\t//Painting all of the particles.\r\n\t\tfor(int i = 0; i < this.model.particleArray.size(); i++) {\r\n\t\t\tParticle p = (Particle) this.model.particleArray.get(i);\r\n\t\t\tint x = (int) p.x;\r\n\t\t\tint y = (int) p.y;\r\n\t\t\t\r\n\t\t\t// Changing the color accordingly.\r\n\t\t\tif( p.isMoving ) {\r\n\t\t\t\tg.setColor( p.color );\r\n\t\t\t} else {\r\n\t\t\t\tg.setColor( this.model.defaultV.stuckColor );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Painting each particle.\r\n\t\t\tg.fillRect(x, y, this.model.defaultV.particleSize, this.model.defaultV.particleSize);\r\n\t\t\t\r\n\t\t\tif (p.isTracking && p.trackingPath.size() > 1) {\r\n\t\t\t\tParticle firstPos = p.trackingPath.get(0); // Our very first particle position.\r\n\t\t\t\tfor(int j = 1; j < p.trackingPath.size() - 1; j++) {\r\n\t\t\t\t\tParticle secondPos = p.trackingPath.get(j);\r\n\t\t\t\t\t// draw line from first to second.\r\n\t\t\t\t\tGraphics2D g2 = (Graphics2D) g;\r\n\t\t\t\t\tLine2D lin = new Line2D.Float((int) firstPos.x, (int) firstPos.y, (int) secondPos.x, (int) secondPos.y);\r\n\t\t\t\t\tg.setColor( p.color );\r\n\t\t\t\t\tg2.draw(lin);\r\n\t\t\t\t\t// Set our first to the next.\r\n\t\t\t\t\tfirstPos = secondPos;\r\n\t\t\t\t}\r\n\t\t\t}\r\n }\r\n\t}", "public void update() {\r\n\t\tremoveAll();\r\n\t\tdrawBackGround();\r\n\t\tdrawGraph();\r\n\t}", "public void paint(Graphics g) {\n\n \t\n \tsuper.paint(g);\n \n \tg.drawRect(0, 0, \n \t\t getSize().width - 1,\n \t\t getSize().height - 1); \t\n \t\n\n }", "public void draw()\r\n {\r\n drawn = true;\r\n }", "public void paintComponent( Graphics g )\r\n\t{\r\n Graphics2D g2 = (Graphics2D)g;\r\n \r\n // Draw the map\r\n if( showMap )\r\n drawMap( g2 );\r\n \r\n // Draw mobile objects, beacons, and information sources\r\n drawAWDDevices( g2, sim.getMobileObjects(), MOBILE_OBJECT_COLOUR, MOBILE_OBJECT_RADIUS );\r\n drawAWDDevices( g2, sim.getBeacons(), BEACON_COLOUR, BEACON_RADIUS );\r\n drawAWDDevices( g2, sim.getInformationSources(), INFORMATION_SOURCE_COLOUR, INFORMATION_SOURCE_RADIUS );\r\n \r\n // Draw communication sessions\r\n if( showCommunicationSessions )\r\n {\r\n drawAWDSessions( g2, sim.getMobileObjects() );\r\n drawAWDSessions( g2, sim.getBeacons() );\r\n drawAWDSessions( g2, sim.getInformationSources() );\r\n }\r\n }" ]
[ "0.7896479", "0.77759176", "0.7670598", "0.766405", "0.7635486", "0.7613727", "0.7613727", "0.7595708", "0.75465804", "0.75382686", "0.7499439", "0.7496412", "0.7494212", "0.74770486", "0.7456833", "0.7454095", "0.7438828", "0.74226165", "0.740781", "0.7383641", "0.73720556", "0.7333803", "0.7312068", "0.7312068", "0.72997254", "0.7288601", "0.7282699", "0.72768253", "0.7270316", "0.72615534", "0.72231436", "0.71944624", "0.7192242", "0.7156703", "0.7146988", "0.7111882", "0.7111882", "0.710927", "0.7104186", "0.70955724", "0.70804036", "0.70672584", "0.7053206", "0.70376736", "0.70357317", "0.70224965", "0.70209074", "0.7019199", "0.7010581", "0.6990092", "0.6989798", "0.6989284", "0.69756323", "0.69581175", "0.6951755", "0.6951472", "0.6951127", "0.6947137", "0.6936611", "0.69320977", "0.6929975", "0.6906697", "0.69056535", "0.68922466", "0.6886255", "0.6843365", "0.68391335", "0.68337363", "0.6819324", "0.6814687", "0.68086934", "0.6807782", "0.68060046", "0.68007904", "0.6787581", "0.6787581", "0.6784481", "0.67806494", "0.67778236", "0.6775131", "0.67655486", "0.67638665", "0.67636395", "0.6763217", "0.6761465", "0.67554766", "0.67531127", "0.67531127", "0.675078", "0.6747902", "0.67465734", "0.67461824", "0.67460066", "0.6745112", "0.6742612", "0.6732244", "0.67268515", "0.6725595", "0.6716694", "0.67074645" ]
0.6802511
73
====================================================================== private void drawGrid(Graphics2D graphics) Draw a grid on top of the background and agents. ======================================================================
private void drawGrid(Graphics2D graphics, int x, int y, int width, int height) { graphics.setPaint(Color.black); // the columns graphics.setStroke(new BasicStroke(2)); int agentGUISize = Parameters.getAgentGUISize(); for (int row = 0; row < width / agentGUISize; row++) graphics.drawLine(x + (row * agentGUISize), y, x + (row * agentGUISize), y + height - 1); // the rows for (int col = 0; col < height / agentGUISize; col++){ graphics.drawLine(x, y + (col * agentGUISize), x + width - 1, y + (col * agentGUISize)); } // the border graphics.drawLine(x, y, x, y + height); graphics.drawLine(x, y, x + width, y); graphics.drawLine(x + width, y, x + width, y + height); graphics.drawLine(x, y + height, x + width, y + height); graphics.setStroke(new BasicStroke()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void paintGrid(Graphics2D g);", "private void drawGrid(){\r\n\r\n\t\tdrawHorizontalLines();\r\n\t\tdrawVerticalLines();\r\n\t}", "private void drawGrid(Graphics2D g2) {\r\n Stroke stroke = g2.getStroke();\r\n\r\n if (isGridPainted()) {\r\n drawVerticalGrid(g2);\r\n drawHorizontalGrid(g2);\r\n }\r\n\r\n g2.setStroke(stroke);\r\n }", "private void paintGrid() {\n\n g2d.setColor(_BOARDCOLOR); //Set the color to specific color of the board.\n\n for(int i = 0; i < grids.size(); i++) { //Iterating the 16 grids while drawing each on JComponent.\n\n g2d.draw(grids.get(i));\n }\n }", "public void drawGrid(Graphics g) \n {\n int wide = getWidth();\n int tall = getHeight();\n // go into Graphics2D for all the fine art, more options\n // optional, here I just get variable Stroke sizes\n Graphics2D g2 = (Graphics2D)g;\n g.setColor(Color.GRAY);\n int w = wide / 20;\n int h = tall / 20;\n g2.setColor(Color.BLACK);\n g2.setStroke(new BasicStroke(1));\n // Draw Grid lines\n for (int i = 1; i < 20; i++) {\n // Verticals\n g2.drawLine(i * w, 0, i * w, tall);\n // Horizontals\n g2.drawLine(0, i * h, wide, i * h);\n }\n }", "public void drawGrid(Graphics2D g, int width, int height, double minX,\n double minY, double maxX, double maxY) {\n g.setColor(Color.BLACK);\n Color gridC; //= new Color(Color.white.getRGB() - BackgroundColor.getRGB());\n Color LightGridC;\n double lumin = BackgroundColor.getRed() * 0.2126 + BackgroundColor.getGreen() * 0.7152\n + BackgroundColor.getBlue() * 0.0722;\n if (lumin > 255 / 2d) {\n gridC = Color.black;\n LightGridC = Color.GRAY;\n } else {\n gridC = Color.white;\n LightGridC = Color.lightGray;\n }\n g.setColor(gridC);\n upperX = maxX;\n lowerX = minX;\n\n upperY = maxY;\n lowerY = minY;\n //debug, drawLine bounds\n// g.drawLine(XOffSet, YOffSet, width, YOffSet);\n// g.drawLine(XOffSet, height, width, height); //X\n//\n// g.drawLine(XOffSet, YOffSet, XOffSet, height);\n// g.drawLine(width, YOffSet, width, height); //Y\n // g.drawLine(30, YOffSet, 30, 0);\n //g.drawLine(XOffSet, 30, 0, 30);\n double Xscale = GetXScale(width);\n double Yscale = GetYScale(height);\n int centerX = getCenterX(width);\n int centerY = getCenterY(height);//-lowerY*Yscale);\n\n // drawLine axis\n g.drawLine(XOffSet, centerY, width, centerY); //X axis\n g.drawLine(centerX, YOffSet, centerX, height); //Y axis\n\n\n //draws grid, numbers and increment lines\n int fontSizeX = (width / (increments * 4));\n int fontSizeY = (height / increments);\n if (fontSizeX > 15) {\n fontSizeX = 15;\n }\n if (fontSizeY > 15) {\n fontSizeY = 15;\n }\n //x-axis\n int t = (int) ((width) * 0.01);\n g.setFont(new Font(\"MonoType\", Font.PLAIN, (fontSizeX)));\n FontMetrics font = g.getFontMetrics();\n for (double i = XOffSet; i <= width; i += ((width - XOffSet) / increments)) {\n if (t == 0) {\n t = 1;\n }\n if (showGrid && i != centerX) {\n g.setColor(LightGridC);\n g.drawLine((int) i, YOffSet, (int) i, height);\n g.setColor(gridC);\n }\n if (showScale) {\n g.drawLine((int) i, (centerY + t), (int) i, (centerY - t));\n }\n\n if (showNumbers) {\n double d = Math.round(100 * ((((width - XOffSet) / Xscale) / (upperX - lowerX)\n * (((i - XOffSet) / Xscale))) + lowerX));\n String o = Double.toString(\n d / 100);\n int textWidth = font.stringWidth(o);\n g.drawString(o, (int) i - textWidth / 2, (centerY + t + font.getHeight()));\n }\n }\n //y axis\n t = (int) (height * 0.01);\n g.setFont(new Font(\"MonoType\", Font.PLAIN, (fontSizeY)));\n font = g.getFontMetrics();\n for (double i = YOffSet; i <= height; i += ((height - YOffSet) / increments)) {\n if (t == 0) {\n t = 1;\n }\n if (showGrid && i != centerY) {\n g.setColor(LightGridC);\n g.drawLine(XOffSet, (int) i, width, (int) i);\n g.setColor(gridC);\n }\n if (showScale) {\n g.drawLine(centerX - t, (int) i, centerX + t, (int) i);\n }\n\n if (showNumbers) {\n double d = Math.round(100 * ((((upperY - lowerY) / ((height - YOffSet) / Yscale)\n * (height - (i)) / Yscale) + lowerY)));\n String o = Double.toString(\n d / 100);\n int textWidth = font.stringWidth(o);\n g.drawString(o, centerX - t - textWidth,\n (int) ((i + font.getHeight() / 2)));\n }\n }\n }", "public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }", "public void drawGrid()\n {\n noStroke();\n for(int i = 0; i < xCells; i++)\n {\n for(int j = 0; j < yCells; j++)\n {\n if(pattern[i][j])\n fill(0);\n else\n fill(255);\n rect(firstCellPosition[0]+i*cellSize,firstCellPosition[1]+j*cellSize,cellSize-1,cellSize-1);\n }\n }\n }", "@Override\n protected void drawGrid(Graphics2D g2, int startPos, int rightEdgePos, int bottomEdgePos, int start,\n int nrows1, int ncols1, int gridOffset) {}", "private static void drawGrid(int[][] grid) {\n BufferStrategy buf = canvas.getBufferStrategy();\n Graphics g = buf.getDrawGraphics();\n\n g.clearRect(0, 0, (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n g.setColor(pallette[grid[i][j]]);\n g.fillRect(WINDOW_MARGINS + (CELL_SIZE * i), WINDOW_MARGINS + (CELL_SIZE * j), CELL_SIZE, CELL_SIZE);\n }\n }\n\n if (!buf.contentsLost()) buf.show();\n g.dispose();\n }", "@Override\n public void paintComponent(final Graphics theGraphics) {\n super.paintComponent(theGraphics);\n final Graphics2D g2d = (Graphics2D) theGraphics;\n\n for (int i = 0; i < myDrawingArray.size(); i++) {\n final Drawing drawing = myDrawingArray.get(i);\n g2d.setPaint(drawing.getColor());\n g2d.setStroke(new BasicStroke(drawing.getWidth()));\n g2d.draw(drawing.getShape());\n }\n \n if (myCurrentShape != null) {\n g2d.setPaint(myCurrentShape.getColor());\n g2d.setStroke(new BasicStroke(myCurrentShape.getWidth()));\n g2d.draw(myCurrentShape.getShape());\n }\n \n if (myGrid) { //Paints the grid if myGrid is true.\n g2d.setStroke(new BasicStroke(1));\n g2d.setPaint(Color.GRAY);\n for (int row = 0; row < getHeight() / GRID_SPACING; row++) {\n final Line2D line = new Line2D.Float(0, GRID_SPACING + (row * GRID_SPACING),\n getWidth(), GRID_SPACING + (row * GRID_SPACING));\n g2d.draw(line);\n }\n for (int col = 0; col < getWidth() / GRID_SPACING; col++) {\n final Line2D line = new Line2D.Float(GRID_SPACING \n + (col * GRID_SPACING), 0,\n GRID_SPACING\n + (col * GRID_SPACING), getHeight());\n g2d.draw(line);\n }\n \n }\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n // Clear the board\n g.clearRect(0, 0, getWidth(), getHeight());\n // Draw the grid\n int rectWidth = getWidth() / NUM_COLS;\n int rectHeight = getHeight() / NUM_ROWS;\n\n for (int i = 0; i < NUM_ROWS; i++) {\n for (int j = 0; j < NUM_COLS; j++) {\n // Upper left corner of this terrain rect\n int x = i * rectWidth;\n int y = j * rectHeight;\n Color terrainColor = terrainGrid[i][j];\n g.setColor(terrainColor);\n g.fillRect(x, y, rectWidth, rectHeight);\n }\n }\n }", "public void drawGrid() {\r\n\t\tsetLayout(new GridLayout(getSize_w(), getSize_h()));\r\n\t\tfor (int i = 0; i < getSize_h(); i++) {\r\n\t\t\tfor (int j = 0; j < getSize_w(); j++) {\r\n\t\t\t\tcity_squares[i][j] = new Gridpanel(j, i);\r\n\t\t\t\tadd(city_squares[i][j]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void renderGrid(Graphics g, int width, int height, GridLocation gridPosition){\n g.setColor(Color.GRAY);\n for(int x = 0; x < width; x++){\n for(int y = 0; y < height; y++){\n g.drawRect(gridPosition.getX() + x * CELL_SIZE, gridPosition.getY() + y*CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n }\n }", "public void drawGrid(Graphics g)\n {\n //g.setColor(Color.GREEN);\n \n \n if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0)\n {\n int x = (int)(Math.random()*250);\n int y = (int)(Math.random()*250);\n int z = (int)(Math.random()*250);\n \n Color randomColor = new Color(x,y,z);\n g.setColor(randomColor); \n \n g.drawLine(150,150,1260,150);\n g.drawLine(150,150,150,630);\n g.drawLine(150,630,1260,630);\n g.drawLine(1260,150,1260,630);\n }\n else\n { \n if(lastpowerUp.equals(\"BLUE\") && powerupTimer > 0)\n {\n Color transGray = new Color(55,55,55);\n g.setColor(transGray); \n } \n else if(difficult.equals(\"GHOST\"))\n g.setColor(Color.WHITE);\n else if(color.equals(\"GREEN\"))\n g.setColor(Color.GREEN); //Green outline\n else if(color.equals(\"BLUE\"))\n g.setColor(Color.BLUE); \n else if(color.equals(\"CYAN\"))\n g.setColor(Color.CYAN); \n else if(color.equals(\"WHITE\"))\n g.setColor(Color.WHITE); \n else if(color.equals(\"GRAY\"))\n g.setColor(Color.GRAY);\n else if(color.equals(\"YELLOW\"))\n g.setColor(Color.YELLOW); \n else if(color.equals(\"MAGENTA\"))\n g.setColor(Color.MAGENTA); \n else if(color.equals(\"ORANGE\"))\n g.setColor(Color.ORANGE); \n else if(color.equals(\"PINK\"))\n g.setColor(Color.PINK); \n else if(color.equals(\"RED\"))\n g.setColor(Color.RED); \n \n \n g.drawLine(150,150,1260,150);\n g.drawLine(150,150,150,630);\n g.drawLine(150,630,1260,630);\n g.drawLine(1260,150,1260,630);\n }\n }", "private void drawGrid() {\r\n\t\t// loops through the 2d array of the grid.\r\n\t\tfor (int i = 0; i < TetrisGame.PANEL_WIDTH; i++) {\r\n\t\t\tfor (int j = 0; j < TetrisGame.PANEL_HEIGHT; j++) {\r\n\t\t\t\t// checks to see if the piece isn't empty, and draws the piece at it's position.\r\n\t\t\t\tif (game.grid[i][j] != Piece.PieceShape.E) {\r\n\t\t\t\t\tdrawSquare(i, j, Piece.getColor(game.grid[i][j]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void drawGrid(Graphics2D g, int width, int height) {\n GetMaximas();\n drawGrid(g, width, height, lowerX, lowerY, upperX, upperY);\n }", "private void drawBackgroundGrid(Canvas canvas) {\n Resources resources = getResources();\n Drawable backgroundCell = resources.getDrawable(R.drawable.cell_rectangle);\n // Outputting the game grid\n for (int xx = 0; xx < game.numSquaresX; xx++) {\n for (int yy = 0; yy < game.numSquaresY; yy++) {\n int sX = startingX + gridWidth + (cellSize + gridWidth) * xx;\n int eX = sX + cellSize;\n int sY = startingY + gridWidth + (cellSize + gridWidth) * yy;\n int eY = sY + cellSize;\n\n drawDrawable(canvas, backgroundCell, sX, sY, eX, eY);\n }\n }\n }", "public void draw(Graphics g) {\n g.drawImage(grid, 20, 0, Graphics.LEFT | Graphics.TOP);\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (crashTest[i][j]) {\n g.setColor(255, 96, 0);\n g.fillRect(i * 16 + 20, j * 16, 15, 15);\n g.setColor(255, 255, 255);\n g.drawString(String.valueOf(i - 1), i * 16 + 28, j * 16 + 8, Graphics.HCENTER | Graphics.TOP);\n }\n }\n }\n }", "public void draw(GraphicsContext gc) {\n // draw the base grid\n gc.setFill(Color.LIGHTGREY);\n for (int i = 0; i < board.side(); i++)\n for (int j = (i % 2 == 0) ? 1 : 0; j < board.side(); j += 2)\n gc.fillRect(startX + j * unitLength, startY + i * unitLength,\n unitLength, unitLength);\n\n // draw boundaries\n gc.setStroke(Color.BLACK);\n gc.strokeRect(startX, startY, sideLength, sideLength);\n\n // highlight legal positions\n for (BoardPos pos : legalPos) {\n gc.setFill(Color.ORANGE);\n gc.fillRect(startX + pos.getX() * unitLength,\n startY + pos.getY() * unitLength, unitLength, unitLength);\n gc.setFill(Color.LIGHTYELLOW);\n if (pos.route != null)\n for (BoardPos step : pos.route)\n gc.fillRect(startX + step.getX() * unitLength,\n startY + step.getY() * unitLength, unitLength, unitLength);\n }\n\n // draw pieces\n for (int i = 0; i < board.side(); i++)\n for (int j = 0; j < board.side(); j++)\n board.get(i, j).draw(gc, startX + i * unitLength,\n startY + j * unitLength, pieceMargin, unitLength);\n }", "@Override \r\n public void paintComponent(final Graphics theGraphics) { \r\n super.paintComponent(theGraphics); \r\n final Graphics2D g2d = (Graphics2D) theGraphics; \r\n \r\n final int width = myBoard.getWidth(); \r\n final int height = myBoard.getHeight(); \r\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \r\n RenderingHints.VALUE_ANTIALIAS_ON); \r\n \r\n // draw purple game grid\r\n g2d.setColor(PURPLE); \r\n for (int i = 0; i < Math.max(width, height); i++) { \r\n final int lines = i * GRID_SIZING; \r\n \r\n //draws horizontal lines\r\n g2d.draw(new Line2D.Double(lines, ZERO, lines, height * GRID_SIZING));\r\n \r\n //draws vertical lines\r\n g2d.draw(new Line2D.Double(ZERO, lines, width * GRID_SIZING, lines));\r\n \r\n if (myBoard.isGameOver()) { \r\n myGameOver = true; \r\n myGamePaused = true; \r\n }\r\n } \r\n \r\n //update blocks\r\n drawCurrentPiece(g2d, height, width);\r\n drawFrozenBlocks(g2d, height, width);\r\n handlePausedGame(g2d);\r\n }", "private void drawGrid(Canvas canvas, double cell_width, double cell_height) {\n\t\tGraphicsContext gc = canvas.getGraphicsContext2D();\n\t\tgc.clearRect(0, 0, canvas.getWidth(),canvas.getHeight());\n\t\t// vertical lines\n\t\tgc.setStroke(Color.BLACK);\n\t\tfor(int i = 0 ; i < Params.world_width; i++){\n\t\t\tgc.strokeLine(cell_width*i, 0, cell_width*i, canvas.getHeight());\n\t\t}\n\t\tfor(int i = 0 ; i < Params.world_height; i++){\n\t\t\tgc.strokeLine(0, cell_height*i, canvas.getWidth(), cell_height*i);\n\t\t}\n\t}", "private void draw() {\n GraphicsContext gc = canvas.getGraphicsContext2D();\n\n double size = getCellSize();\n Point2D boardPosition = getBoardPosition();\n\n // Clear the canvas\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the grid\n gc.setStroke(Color.LIGHTGRAY);\n for (int i = 0; i <= board.getWidth(); i++) {\n gc.strokeLine(boardPosition.getX() + i * size, boardPosition.getY(),\n boardPosition.getX() + i * size, boardPosition.getY() + board.getHeight() * size);\n }\n\n for (int i = 0; i <= board.getHeight(); i++) {\n gc.strokeLine(boardPosition.getX(), boardPosition.getY() + i * size,\n boardPosition.getX() + board.getWidth() * size, boardPosition.getY() + i * size);\n }\n\n // Draw cells\n gc.setFill(Color.ORANGE);\n for (int i = 0; i < board.getWidth(); i++) {\n for (int j = 0; j < board.getHeight(); j++) {\n if (board.isAlive(i, j)) {\n gc.fillRect(boardPosition.getX() + i * size, boardPosition.getY() + j * size, size, size);\n }\n }\n }\n }", "void draw(Graphics g)\n {\n int aliveCount = 0, deadCount = 0;\n\n boolean[][] gridArray = grid.getGrid();\n for(int row = 0; row < gridArray.length; row++){\n for(int col = 0; col < gridArray[row].length; col++){\n if(gridArray[row][col]){\n if(grid.isInverted()) {\n g.setColor(Color.white);\n } else {\n g.setColor(Color.black);\n }\n aliveCount++;\n } else {\n if(grid.isInverted()) {\n g.setColor(Color.black);\n } else {\n g.setColor(Color.white);\n }\n deadCount++;\n }\n g.fillRect(col * (grid.getCellSize() + grid.getCellInnerGap()) + grid.getCellOuterGap() , row * (grid.getCellSize() + grid.getCellInnerGap()) + grid.getCellOuterGap(), grid.getCellSize(), grid.getCellSize());\n }\n }\n\n UserInterface.infoLabel.setText(\"<html><center>Generation: \" + grid.getGeneration() + \"</center>Alive: \" + aliveCount + \" ; Dead: \" + deadCount + \"</html>\");\n }", "@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tGraphics2D g2 = (Graphics2D) g;\n\t\tg2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n\t\tfillSquares(g2);\n\t\tdrawGrid(g2);\n\t}", "private void drawVerticalGrid(Graphics2D g2) {\r\n double minorSpacing = majorX / getMinorCountX();\r\n double axisH = yPositionToPixel(originY);\r\n \r\n Stroke gridStroke = new BasicStroke(STROKE_GRID);\r\n Stroke axisStroke = new BasicStroke(STROKE_AXIS);\r\n \r\n Rectangle clip = g2.getClipBounds();\r\n \r\n int position;\r\n if (!isAxisPainted()) {\r\n position = (int) yPositionToPixel(originY);\r\n if (position >= clip.y && position <= clip.y + clip.height) {\r\n g2.setColor(getMajorGridColor());\r\n g2.drawLine(clip.x, position, clip.x + clip.width, position);\r\n }\r\n }\r\n \r\n// double startX = Math.floor((minX - originX) / majorX) * majorX;\r\n double startX = Math.floor(minX / majorX) * majorX;\r\n for (double x = startX; x < maxX + majorX; x += majorX) {\r\n g2.setStroke(gridStroke);\r\n g2.setColor(getMinorGridColor());\r\n for (int i = 0; i < getMinorCountX(); i++) {\r\n position = (int) xPositionToPixel(x - i * minorSpacing);\r\n if (position >= clip.x && position <= clip.x + clip.width) {\r\n g2.drawLine(position, clip.y, position, clip.y + clip.height);\r\n }\r\n }\r\n \r\n position = (int) xPositionToPixel(x);\r\n if (position >= clip.x && position <= clip.x + clip.width) {\r\n g2.setColor(getMajorGridColor());\r\n g2.drawLine(position, clip.y, position, clip.y + clip.height);\r\n\r\n if (isAxisPainted()) {\r\n g2.setStroke(axisStroke);\r\n g2.setColor(getAxisColor());\r\n g2.drawLine(position, (int) axisH - 3, position, (int) axisH + 3);\r\n }\r\n }\r\n }\r\n }", "private void drawAxesGrid(Graphics g, int sizex, int sizey){\r\n\r\n\t\tint maxx = sizex - 1;\r\n\t\tint maxy = sizey - 1;\r\n\r\n\t\tGraphics2D g2d = (Graphics2D) g;\r\n\r\n\t\t//Koordinatengitter zeichnen, wenn gewuenscht\r\n\t\tif(gridColor != null){\r\n\t\t\tg2d.setColor(gridColor);\r\n\t\t\tdouble tickdist = ((double)maxx) / ((double) noofxintv);\r\n\t\t\tfor (int i = 0; i <= noofxintv; i++){\r\n\t\t\t\tg2d.drawLine((int)(i*tickdist), 0, (int)(i*tickdist), (int)(maxy));\r\n\t\t\t}\r\n\t\t\ttickdist = ((double)maxy) / ((double) noofyintv);\r\n\t\t\tfor (int i = 0; i <= noofyintv; i++){\r\n\t\t\t\tg2d.drawLine(0, (int)(i*tickdist), (int)(maxx), (int)(i*tickdist));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\t\tpublic void paintComponent(Graphics g) {\r\n\r\n\t\t\tsuper.paintComponent(g); // Fills the background color.\r\n\r\n\t\t\tg.setColor(Color.DARK_GRAY);\r\n\t\t\tg.fillRect(10, 10, columns * squareSize + 1, rows * squareSize + 1);\r\n\r\n\t\t\tfor (int r = 0; r < rows; r++) {\r\n\t\t\t\tfor (int c = 0; c < columns; c++) {\r\n\t\t\t\t\tif (grid[r][c] == EMPTY) {\r\n\t\t\t\t\t\tg.setColor(Color.WHITE);\r\n\t\t\t\t\t} else if (grid[r][c] == ROBOT) {\r\n\t\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\t} else if (grid[r][c] == TARGET) {\r\n\t\t\t\t\t\tg.setColor(Color.GREEN);\r\n\t\t\t\t\t} else if (grid[r][c] == OBST) {\r\n\t\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\t} else if (grid[r][c] == FRONTIER) {\r\n\t\t\t\t\t\tg.setColor(Color.BLUE);\r\n\t\t\t\t\t} else if (grid[r][c] == CLOSED) {\r\n\t\t\t\t\t\tg.setColor(Color.CYAN);\r\n\t\t\t\t\t} else if (grid[r][c] == ROUTE) {\r\n\t\t\t\t\t\tg.setColor(Color.YELLOW);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tg.fillRect(11 + c * squareSize, 11 + r * squareSize, squareSize - 1, squareSize - 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (drawArrows.isSelected()) {\r\n\t\t\t\t// We draw all arrows from each open or closed state\r\n\t\t\t\t// to its predecessor.\r\n\t\t\t\tfor (int r = 0; r < rows; r++) {\r\n\t\t\t\t\tfor (int c = 0; c < columns; c++) {\r\n\t\t\t\t\t\t// If the current cell is the goal and the solution has\r\n\t\t\t\t\t\t// been found,\r\n\t\t\t\t\t\t// or belongs in the route to the target,\r\n\t\t\t\t\t\t// or is an open state,\r\n\t\t\t\t\t\t// or is a closed state but not the initial position of\r\n\t\t\t\t\t\t// the robot\r\n\t\t\t\t\t\tif ((grid[r][c] == TARGET && found) || grid[r][c] == ROUTE || grid[r][c] == FRONTIER\r\n\t\t\t\t\t\t\t\t|| (grid[r][c] == CLOSED && !(r == robotStart.row && c == robotStart.col))) {\r\n\t\t\t\t\t\t\t// The tail of the arrow is the current cell, while\r\n\t\t\t\t\t\t\t// the arrowhead is the predecessor cell.\r\n\t\t\t\t\t\t\tCell head;\r\n\t\t\t\t\t\t\tif (grid[r][c] == FRONTIER) {\r\n\t\t\t\t\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\t\t\t\t\thead = findPrev(graph, new Cell(r, c));\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\thead = findPrev(openSet, new Cell(r, c));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\thead = findPrev(closedSet, new Cell(r, c));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// The coordinates of the center of the current cell\r\n\t\t\t\t\t\t\tint tailX = 11 + c * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\tint tailY = 11 + r * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\t// The coordinates of the center of the predecessor\r\n\t\t\t\t\t\t\t// cell\r\n\t\t\t\t\t\t\tint headX = 11 + head.col * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\tint headY = 11 + head.row * squareSize + squareSize / 2;\r\n\t\t\t\t\t\t\t// If the current cell is the target\r\n\t\t\t\t\t\t\t// or belongs to the path to the target ...\r\n\t\t\t\t\t\t\tif (grid[r][c] == TARGET || grid[r][c] == ROUTE) {\r\n\t\t\t\t\t\t\t\t// ... draw a red arrow directing to the target.\r\n\t\t\t\t\t\t\t\tg.setColor(Color.RED);\r\n\t\t\t\t\t\t\t\tdrawArrow(g, tailX, tailY, headX, headY);\r\n\t\t\t\t\t\t\t\t// Else ...\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// ... draw a black arrow to the predecessor\r\n\t\t\t\t\t\t\t\t// cell.\r\n\t\t\t\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\t\t\t\tdrawArrow(g, headX, headY, tailX, tailY);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "private void drawHorizontalGrid(Graphics2D g2) {\r\n double minorSpacing = majorY / getMinorCountY();\r\n double axisV = xPositionToPixel(originX);\r\n \r\n Stroke gridStroke = new BasicStroke(STROKE_GRID);\r\n Stroke axisStroke = new BasicStroke(STROKE_AXIS);\r\n \r\n Rectangle clip = g2.getClipBounds();\r\n \r\n int position;\r\n \r\n if (!isAxisPainted()) {\r\n position = (int) xPositionToPixel(originX);\r\n if (position >= clip.x && position <= clip.x + clip.width) {\r\n g2.setColor(getMajorGridColor());\r\n g2.drawLine(position, clip.y, position, clip.y + clip.height);\r\n }\r\n }\r\n\r\n// double startY = Math.floor((minY - originY) / majorY) * majorY;\r\n double startY = Math.floor(minY / majorY) * majorY;\r\n for (double y = startY; y < maxY + majorY; y += majorY) {\r\n g2.setStroke(gridStroke);\r\n g2.setColor(getMinorGridColor());\r\n for (int i = 0; i < getMinorCountY(); i++) {\r\n position = (int) yPositionToPixel(y - i * minorSpacing);\r\n if (position >= clip.y && position <= clip.y + clip.height) {\r\n g2.drawLine(clip.x, position, clip.x + clip.width, position); \r\n }\r\n }\r\n\r\n position = (int) yPositionToPixel(y);\r\n if (position >= clip.y && position <= clip.y + clip.height) {\r\n g2.setColor(getMajorGridColor());\r\n g2.drawLine(clip.x, position, clip.x + clip.width, position);\r\n\r\n if (isAxisPainted()) {\r\n g2.setStroke(axisStroke);\r\n g2.setColor(getAxisColor());\r\n g2.drawLine((int) axisV - 3, position, (int) axisV + 3, position);\r\n }\r\n }\r\n }\r\n }", "public void draw(Graphics g)\n {\n for (int row = 4; row < 24; row++) {\n for (int col = 0; col < 10; col++) {\n if (cells[row][col] != null) {\n cells[row][col].draw(getCellXCoord(col), getCellYCoord(row), g);\n }\n }\n }\n }", "private void createGraphics() {\n\t\toppStatGrid = new GridPane();\n\t\toppStatGrid.setHgap(5);\n\t\tColumnConstraints columnOpp1 = new ColumnConstraints();\n\t\tcolumnOpp1.setMinWidth(gameScene.getWidth()*0.3);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnOpp2 = new ColumnConstraints();\n\t\tcolumnOpp2.setMinWidth(gameScene.getWidth()*0.3);\n\t\toppStatGrid.getColumnConstraints().addAll(columnOpp1,columnOpp2);\n\t\tRowConstraints rowOpp = new RowConstraints();\n\t\trowOpp.setMinHeight(gameScene.getHeight()*0.1);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\n\t\tlocStatGrid = new GridPane();\n\t\tlocStatGrid.setHgap(5);\n\t\tColumnConstraints columnLoc1 = new ColumnConstraints();\n\t\tcolumnLoc1.setMinWidth(gameScene.getWidth()*0.1);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnLoc2 = new ColumnConstraints();\n\t\tcolumnLoc2.setMinWidth(gameScene.getWidth()*0.3);\n\t\tlocStatGrid.getColumnConstraints().addAll(columnLoc1,columnLoc2);\n\t\tRowConstraints rowLoc2 = new RowConstraints();\n\t\trowLoc2.setMinHeight(gameScene.getHeight()*0.1);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\n\t\topponentName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\tlocalName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\topponentLevel.setFont(Font.font(defaultFont, 14));\n\t\tlocalLevel.setFont(Font.font(defaultFont, 14));\n\t\topponentHealth.setFont(Font.font(defaultFont, 14));\n\t\tlocalHealth.setFont(Font.font(defaultFont, 14));\n\n\t\topponentName.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localName, HPos.RIGHT);\n\t\topponentLevel.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalLevel.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localLevel, HPos.RIGHT);\n\t\topponentHealth.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalHealth.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localHealth, HPos.RIGHT);\n\n\t\topponentHealthBar = new Rectangle();\n\t\tlocalHealthBar = new Rectangle();\n\t\topponentHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\tlocalHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\topponentHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\tlocalHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\topponentHealthBar.setArcWidth(5);\n\t\topponentHealthBar.setArcHeight(5);\n\t\tlocalHealthBar.setArcWidth(5);\n\t\tlocalHealthBar.setArcHeight(5);\n\t\t/*NumberBinding oppHealthBind = gameScene.property\n\t\topponentHealthBar.prop*/\n\n\t\topponentHealthBar.setEffect(new Lighting());\n\t\tlocalHealthBar.setEffect(new Lighting());\n\n\t\topponentHealthBar.setFill(Color.DARKRED);\n\t\tlocalHealthBar.setFill(Color.DARKRED);\n\n\t\toppStatGrid.add(opponentName, 0, 0);\n\t\toppStatGrid.add(opponentLevel, 1, 0);\n\t\toppStatGrid.add(opponentHealthBar, 0, 1);\n\t\toppStatGrid.add(opponentHealth, 1, 1);\n\n\t\tlocStatGrid.add(localLevel, 0, 0);\n\t\tlocStatGrid.add(localName, 1, 0);\n\t\tlocStatGrid.add(localHealthBar, 1, 1);\n\t\tlocStatGrid.add(localHealth, 0, 1);\n\n\t\tAnchorPane.setTopAnchor(oppStatGrid, 10.0);\n\t\tAnchorPane.setLeftAnchor(oppStatGrid, 10.0);\n\n\t\tAnchorPane.setBottomAnchor(locStatGrid, 10.0);\n\t\tAnchorPane.setRightAnchor(locStatGrid, 10.0);\n\n\t\tthis.getChildren().addAll(oppStatGrid,locStatGrid);\n\t\t\n\t\toppPane = new Pane();\n\t\toppPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\toppPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tlocPane = new Pane();\n\t\tlocPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\tlocPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tAnchorPane.setBottomAnchor(locPane, 10.0);\n\t\tAnchorPane.setLeftAnchor(locPane, 10.0);\n\t\t\n\t\tAnchorPane.setTopAnchor(oppPane, 10.0);\n\t\tAnchorPane.setRightAnchor(oppPane, 10.0);\n\t\t\n\t\tthis.getChildren().addAll(locPane,oppPane);\n\t\t\n\n\t}", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n\n // safest to create a copy of the graphics component -- one must\n // ensure that no changes are made to the original\n Graphics2D graphics = (Graphics2D) g.create();\n\n JViewport viewport = null;\n JScrollPane scrollPane = null;\n Insets borders = null;\n\n int viewportWidth = 0;\n int viewportHeight = 0;\n int agentGUISize = Parameters.getAgentGUISize();\n int imageWidth = gridWidth * agentGUISize;\n int imageHeight = gridHeight * agentGUISize;\n\n // make sure that we're grabbing onto the viewport of the scroll pane\n Component ancestor = getParent();\n if (ancestor == null || !(ancestor instanceof JViewport))\n {\n //Exception e = new Exception(\n // \"AgentCanvas instance must be within JScrollPane instance\");\n //e.printStackTrace();\n //return;\n\n viewportWidth = imageWidth;\n viewportHeight = imageHeight;\n\n borders = new Insets(5,5,5,5);\n }\n else\n {\n // presumably we have the viewport of scroll pane containing 'this'\n viewport = (JViewport) ancestor;\n\n viewportWidth = viewport.getWidth();\n viewportHeight = viewport.getHeight();\n\n scrollPane = (JScrollPane) viewport.getParent();\n borders = scrollPane.getInsets();\n }\n\n // Note that drawImage automatically scales the image to fit that \n // rectangle.\n int renderWidth = gridWidth * agentGUISize;\n int renderHeight = gridHeight * agentGUISize;\n\n // determine the starting (x,y) in the viewport where the image\n // will be drawn\n viewportX = 10 + Math.max((viewportWidth - renderWidth) / 2, 0);\n viewportY = 20 + Math.max((viewportHeight - renderHeight) / 2, 0);\n\n // in case there was a previous image, clear things out\n //graphics.clearRect(0, 0, viewportWidth, viewportHeight);\n //graphics.clearRect(viewportX, viewportY, viewportWidth, viewportHeight);\n graphics.clearRect(viewportX, viewportY, renderWidth, renderHeight);\n\n // now draw the shelters\n for (int col = 0; col < gridWidth; col++ )\n {\n for (int row = 0; row < gridHeight; row++ )\n {\n Shelter s = shelters.getShelterAt( col, row ); //shelterGrid[col][row];\n\n // make sure not to draw any agent outside the image boundaries;\n // remember that graphics x corresponds to column and graphics y\n // corresponds to row\n if ((row >= 0) && (col >= 0) &&\n ((row * agentGUISize) + agentGUISize <= renderHeight) &&\n ((col * agentGUISize) + agentGUISize <= renderWidth))\n {\n int guiX = GUI_XPAD + viewportX + (col * agentGUISize);\n int guiY = GUI_YPAD + viewportY + (row * agentGUISize);\n\n int occupants = s.getCurrentOccupancy();\n int capacity = s.getMaxCapacity();\n int infested = s.getInfestedCount();\n int infected = s.getInfectedCount();\n \n if ( DEBUG ){\n if ( infested > occupants || infected > occupants ) {\n System.out.println(\n \"Shelter(\" + col + \", \" + row + \") \" + \n \" occupants = \" + occupants + \n \" infested = \" + infested + \n \" infected = \" + infected );\n }\n }\n \n double proportionInfested = infested / (double) occupants;\n double proportionInfected = infected / (double) occupants;\n if ( occupants == 0 ){\n proportionInfested = 0.0;\n proportionInfected = 0.0;\n }\n double proportionOccupied = occupants / (double) capacity;\n double proportionUnoccupied = 1.0 - proportionOccupied;\n \n // Shelter Occupancy info\n \n graphics.setPaint( Color.white );\n int unoccupiedHeight = \n (int) Math.round(agentGUISize * proportionUnoccupied);\n int occupiedHeight = agentGUISize - unoccupiedHeight;\n \n // Proportion of shelter currently not in use\n graphics.fillRect( guiX, guiY, \n OCCUPANCY_BAR_WIDTH, unoccupiedHeight );\n \n graphics.setPaint( Color.black );\n graphics.fillRect(guiX, guiY + unoccupiedHeight, \n OCCUPANCY_BAR_WIDTH, occupiedHeight );\n \n if (occupants > 0){\n graphics.setPaint( Color.white );\n String str = \"\"+occupants;\n graphics.drawString(str, guiX + 2, guiY + unoccupiedHeight + 15);\n graphics.setPaint( Color.black );\n }\n \n // Infestation info\n \n // Color of upper half of grid square should get more purple\n // as more Hosts are infested\n int red = 255 - (int) Math.round( 255 * proportionInfested);\n int green = 255 - (int) Math.round( 255 * proportionInfested);\n int blue = 255;\n \n Color infestColor = null;\n try{\n infestColor = new Color( red, green, blue );\n } catch (IllegalArgumentException ie ) {\n System.out.println(\"Weird color for infested block: (\" \n + red + \", \" + green + \", \" + blue + \")\");\n System.out.println(\"Shelter at (\" + row + \", \" + col +\")\");\n System.out.println(\"Usually means infested count is off.\");\n infestColor = Color.white;\n }\n\n graphics.setPaint( infestColor );\n\n graphics.fillRect(guiX + OCCUPANCY_BAR_WIDTH, guiY, STATUS_BAR_WIDTH, agentGUISize / 2);\n \n String data = \"\" + occupants + \"/\" + infested;\n graphics.setPaint( Color.black );\n graphics.drawString(data, guiX + OCCUPANCY_BAR_WIDTH + 5, guiY + agentGUISize/2 - 10 );\n \n // Infection info\n \n // Color of lower half of grid square should get redder\n // as more Hosts are infected.\n red = 255;\n green = 255 - (int) Math.round( 255 * proportionInfected);\n blue = 255 - (int) Math.round( 255 * proportionInfected);\n \n Color infectColor = null;\n try {\n infectColor = new Color( red, green, blue );\n } catch (IllegalArgumentException ie) {\n System.out.println(\"Weird color for infected block: (\" \n + red + \", \" + green + \", \" + blue + \")\");\n System.out.println(\"Shelter at (\" + row + \", \" + col +\")\");\n System.out.println(\"Usually means infected count is off.\");\n infestColor = Color.white; \n }\n\n graphics.setPaint( infectColor );\n\n graphics.fillRect(guiX + OCCUPANCY_BAR_WIDTH, \n guiY + agentGUISize/2, \n STATUS_BAR_WIDTH, \n agentGUISize / 2);\n \n data = \"\" + occupants + \"/\" + infected;\n graphics.setPaint( Color.black );\n graphics.drawString(data, guiX + OCCUPANCY_BAR_WIDTH + 5, guiY + agentGUISize - 10 );\n \n // Color of lower half of grid square should get bluer\n // as more Hosts are infected\n\n /*\n if (a.isTreated())\n {\n // if treated with antibiotic, draw a little dot in the\n // middle of the rendered agent\n int dotSize = 2;\n graphics.setPaint(Color.black);\n graphics.fillRect(guiX + ((agentGUISize - dotSize) / 2),\n guiY + ((agentGUISize - dotSize) / 2),\n dotSize, dotSize);\n }\n */\n \n drawShelterFrame(graphics, \n guiX, guiY, agentGUISize, agentGUISize );\n }\n }\n }\n\n // draw the grid last so that it will overlay the agent squares \n //drawGrid(graphics, viewportX, viewportY, renderWidth, renderHeight);\n drawGrid(graphics, viewportX + GUI_XPAD, viewportY + GUI_YPAD, renderWidth, renderHeight);\n\n // show the number of infected/uninfected agents\n drawAgentInfo(graphics, viewportX, viewportY, \n renderWidth, renderHeight, borders);\n\n revalidate();\n\n // get rid of the graphics copy\n graphics.dispose();\n }", "private void displayGrid() {\r\n System.out.print(this.grid);\r\n }", "@Override\r\n\tpublic void draw() {\r\n\t\t//Set the background to dark grey\r\n\t\tbackground(50, 50, 50);\t\r\n\t\t//If the current state is processing, display text explaining this\r\n\t\tif (this.currentGameState == DisplayStates.PROCESSING) {\r\n\t\t\ttext(\"Processing, please wait...\", 30, 340); \r\n\t\t} else { //Otherwise, the grid should be drawn in it's current state\r\n\t\t\tthis.zoomer.transform(); //Transform the zoom based on user input\r\n\t\t\t//Get the cells in their current state\r\n\t\t\tthis.gridCells = this.world.getCells(); \r\n\t\t\t//Work out which size images to use.\r\n\t\t\tupdateImageScale();\r\n\t\t\t//Draw the images to the sketch based on the current scale\r\n\t\t\tif (this.currentImageScale == ImageDrawScales.LARGE) {\r\n\t\t\t\tdrawImages(LARGE_IMAGE, this.gridCells);\r\n\t\t\t} else if (this.currentImageScale == ImageDrawScales.MEDIUM) {\r\n\t\t\t\tdrawImages(MEDIUM_IMAGE, this.gridCells);\r\n\t\t\t} else {\r\n\t\t\t\tdrawImages(SMALL_IMAGE, this.gridCells);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void renderRobot(Graphics g, Location robotLocation, Direction robotDirection, GridLocation gridPosition){\n g.setColor(Color.RED);\n g.fillRect(gridPosition.getX() + robotLocation.getX()*CELL_SIZE, gridPosition.getY() + robotLocation.getY()*CELL_SIZE,CELL_SIZE, CELL_SIZE);\n g.setColor(Color.BLUE);\n\n if (robotDirection == Direction.UP || robotDirection == Direction.DOWN){\n g.drawLine(gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getY() + robotLocation.getY()*CELL_SIZE , gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE);\n if(robotDirection == Direction.UP){\n g.drawLine(gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getY() + robotLocation.getY()*CELL_SIZE, gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE / 4, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE / 4);\n g.drawLine(gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getY() + robotLocation.getY()*CELL_SIZE, gridPosition.getX() + robotLocation.getX()*CELL_SIZE + 3 * CELL_SIZE / 4, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE / 4);\n }\n else{\n g.drawLine(gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE, gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE / 4, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + 3 * CELL_SIZE / 4);\n g.drawLine(gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE, gridPosition.getX() + robotLocation.getX()*CELL_SIZE + 3 * CELL_SIZE / 4, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + 3 * CELL_SIZE / 4);\n }\n }\n\n else if (robotDirection == Direction.LEFT || robotDirection == Direction.RIGHT){\n g.drawLine(gridPosition.getX() + robotLocation.getX()*CELL_SIZE , gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE / 2);\n if(robotDirection == Direction.LEFT){\n g.drawLine(gridPosition.getX() + robotLocation.getX()*CELL_SIZE , gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE / 4, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + 1 * CELL_SIZE / 4);\n g.drawLine(gridPosition.getX() + robotLocation.getX()*CELL_SIZE , gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE / 4, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + 3 * CELL_SIZE / 4);\n }\n else{\n g.drawLine(gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getX() + robotLocation.getX()*CELL_SIZE + 3 * CELL_SIZE / 4, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + 1 * CELL_SIZE / 4);\n g.drawLine(gridPosition.getX() + robotLocation.getX()*CELL_SIZE + CELL_SIZE, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + CELL_SIZE / 2, gridPosition.getX() + robotLocation.getX()*CELL_SIZE + 3 * CELL_SIZE / 4, gridPosition.getY() + robotLocation.getY()*CELL_SIZE + 3 * CELL_SIZE / 4);\n }\n }\n }", "@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\t\t\t\t\t\t\t\t\t// If this method is reimplemented, super.paint(g) should be called so that lightweight components are properly rendered.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// If a child component is entirely clipped by the current clipping setting in g, paint() will not be forwarded to that child.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// from http://docs.oracle.com/javase/7/docs/api/java/awt/Container.html#paint(java.awt.Graphics)\n\t\t\n\t\tif (newGame) newGoGame();\t\t\t\t\t\t// if new go game: setup goBoard array, goHistory, black player first\n\t\tif (checkWin) \t\t\t\t\t\t\t\t\t// if checkWin is true - check to see if the last move was a win\n\t\t\tif ((k=gameWin())!=0) {\n\t\t\t\tif (k==1)\n\t\t\t\t\tJOptionPane.showMessageDialog(this, \"White player has won!\", \"Gomoku Winner\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\telse \n\t\t\t\t\tJOptionPane.showMessageDialog(this, \"Black player has won!\", \"Gomoku Winner\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\tnewGoGame();\n\t\t\t}\n\t\t\n\t\t// Draw Background Image, depending on the index of bgNum\n\t\tg.drawImage(imgBackground[bgNum], 0, 54, Color.BLACK, null); // 44\n\t\t\n\t\t// Draw Grid\n\t\tg.setColor(Color.BLACK);\n\t\tfor (i=0; i<525; i+=35) {\t\t\t\t\t\t// 15x15 grid - 35 pixels per side - offset by 75 pixels on x, 75 pixels on y\n\t\t\tg.drawLine(75, 75+i, 565, 75+i);\t\t// draws horizontal lines\n\t\t\tg.drawLine(75+i, 75+0, 75+i, 565); \t// draws vertical lines\n\t\t} // end loop for drawing lines\n\t\t\n\t\t// draw pieces on board\n\t\tfor (i=0; i<15; ++i) {\n\t\t\tfor (j=0; j<15; ++j) {\n\t\t\t\tif ((k=goBoard[i][j])!=0) {\n\t\t\t\t\tif (k==1) { g.setColor(Color.WHITE); g.fillOval(61+(i*35),62+(j*35),30,30); }\n\t\t\t\t\telse { g.setColor(Color.BLACK); g.fillOval(61+(i*35),62+(j*35),30,30); }\n\t\t\t\t} // end if goBoard\n\t\t\t} // end j - inner loop for drawing game pieces\n\t\t} // end i - outer loop for drawing game pieces\n\n\t\t\n\t\t// To Do list\n\t\t// Check move - 5 in a row - (not with stack, but with int Array)\n\n\t\t\n\t}", "public void paint(Graphics g) {\n //paints entire grid with nested loop\n for (int i = 0; i < width; i++) {\n for (int j = 0; j < height; j++) {\n //changes colour based on previous calculations\n g.setColor(cols[i][j]);\n\n //colours the rectangle\n g.fillRect(i, j, 1, 1);\n }\n }\n }", "private void doDrawing(Graphics g) \n { \n //Surface specific G2D is used to paint entire \n // grid regardless of tilemap data to provide \n // background for tiles with transparent areas\n Graphics2D surfaceG2D = (Graphics2D) g.create();\n surfaceG2D.setPaint(texturePaints.get(0));\n for(int i = 0; i < MAX_ROWS; i++)\n {\n for(int j = 0; j < MAX_COLUMNS; j++)\n {\n surfaceG2D.fillRect(i*TILE_SIZE, j*TILE_SIZE, TILE_SIZE, TILE_SIZE);\n }\n }\n \n //Singular generic G2D is used for tilemap data\n Graphics2D G2D = (Graphics2D) g.create();\n \n //Paint relevant to tilemap\n for(int y = 0; y < MAX_ROWS; y++)\n {\n for(int x = 0; x < MAX_COLUMNS; x++)\n {\n //Select paint type\n G2D.setPaint(texturePaints.get(tilemap[x][y]));\n //If tile is rover, record position\n if(tilemap[x][y] == 1)\n {\n roverX = x;\n roverY = y;\n }\n //Apply paint to current tile\n G2D.fillRect(x*TILE_SIZE, y*TILE_SIZE, //Coordinates\n TILE_SIZE, TILE_SIZE); //Dimensions\n }\n } \n }", "private void drawBoard(final Graphics g) {\n Graphics2D g2 = (Graphics2D) g;\n g2.setColor(Color.black);\n g2.fill(new Rectangle2D.Double(0, 0, DRAWING_AREA_SIZE_IN_PIXELS, DRAWING_AREA_SIZE_IN_PIXELS));\n // Render the board, each gadget renders onto the canvas\n board.render(g2); \n }", "private void drawWalls(Graphics g) {\n\t\tfor(int i=0; i<grid.length; i++){\n\t\t\tfor(int j=0; j<grid[0].length; j++){\n\t\t\t\tif(grid[i][j].getNorth()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine(j*widthBlock+padding+doorX, i*heightBlock+padding, j*widthBlock+padding+doorWidth, i*heightBlock+padding);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, i*heightBlock+padding, j*widthBlock+padding+widthBlock, i*heightBlock+padding);\n\t\t\t\t}\n\t\t\t\tif(grid[i][j].getEast()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine((j+1)*widthBlock+padding, i*heightBlock+padding+doorX, (j+1)*widthBlock+padding, i*heightBlock+padding+doorWidth);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine((j+1)*widthBlock+padding, i*heightBlock+padding, (j+1)*widthBlock+padding, (i+1)*heightBlock+padding);\n\t\t\t\t}\n\t\t\t\tif(grid[i][j].getSouth()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine(j*widthBlock+padding+doorX, (i+1)*heightBlock+padding, j*widthBlock+padding+doorWidth, (i+1)*heightBlock+padding);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, (i+1)*heightBlock+padding, (j+1)*widthBlock+padding, (i+1)*heightBlock+padding);\n\t\t\t\t}\n\t\t\t\tif(grid[i][j].getWest()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, i*heightBlock+padding+doorX, j*widthBlock+padding, i*heightBlock+padding+doorWidth);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, i*heightBlock+padding, j*widthBlock+padding, (i+1)*heightBlock+padding);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void draw() {\r\n\t\tthis.sprite.draw(this.col * MainApp.getGridSize(), this.row * MainApp.getGridSize());\r\n\t}", "public void paintComponent(Graphics g){\n updateCoordinateToScreenPosition();\n\n //Paint the tileColumns\n\n paintTileColumn(g);\n }", "@Override\n \tpublic void draw() {\n \n \t\tGL11.glPushMatrix();\n \t\t\n \t\tGL11.glTranslatef(super.getX(), super.getY(), 0);\n \t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\tMain.BLANK_TEXTURE.bind();\n \t\tGL11.glBegin(GL11.GL_QUADS);\n \t\t{\n \t\t\t\n \t\t\tGL11.glColor3f(1.0f, 0.0f, 0.0f);\n \t\t\tGL11.glVertex2f(0, 0); // top left\n \t\t\tGL11.glVertex2f(0, Main.gridSize); // bottom left\n \t\t\tGL11.glVertex2f(Main.gridSize, Main.gridSize); // bottom right\n \t\t\tGL11.glVertex2f(Main.gridSize, 0); // top right\n \t\t\t\n \t\t\t\n \t\t\tif (isRight()) {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 3);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 3);\n \t\t\t\t\n \t\t\t} else {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(0, 0);\n \t\t\t\tGL11.glVertex2f(0, 12);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(0, 3);\n \t\t\t\tGL11.glVertex2f(0, 9);\n \t\t\t\tGL11.glVertex2f(4, 9);\n \t\t\t\tGL11.glVertex2f(4, 3);\n \t\t\t}\n \t\t\t\n \t\t}\n \t\tGL11.glEnd();\n \n \t\tGL11.glPopMatrix();\n \t\t\n \t}", "private void drawStuff() {\n //Toolkit.getDefaultToolkit().sync();\n g = bf.getDrawGraphics();\n bf.show();\n Image background = window.getBackg();\n try {\n g.drawImage(background, 4, 24, this);\n\n for(i=12; i<264; i++) {\n cellKind = matrix[i];\n\n if(cellKind > 0)\n g.drawImage(tile[cellKind], (i%12)*23-3, (i/12)*23+17, this);\n }\n\n drawPiece(piece);\n drawNextPiece(pieceKind2);\n\n g.setColor(Color.WHITE);\n g.drawString(\"\" + (level+1), 303, 259);\n g.drawString(\"\" + score, 303, 339);\n g.drawString(\"\" + lines, 303, 429);\n\n } finally {bf.show(); g.dispose();}\n }", "private void drawGame() {\r\n //For each each cell of the grid if there is a snake draw green,\r\n //an apple draw red or nothing draw white.\r\n for (int x = 0; x < gridWidth; x++) {\r\n for (int y = 0; y < gridHeight; y++) {\r\n if (isSnakeAt(new Coordinates(x, y))) {\r\n drawCell(x, y, Color.GREEN);\r\n } else if (apple.equals(new Coordinates(x, y))) {\r\n drawCell(x, y, Color.RED);\r\n } else {\r\n drawCell(x, y, Color.WHITE);\r\n }\r\n }\r\n }\r\n //Draw a grid around the game grid\r\n gc.strokeRect(0, 0, gridWidth * cellSize, gridHeight * cellSize); \r\n }", "private void draw(){\n GraphicsContext gc = canvasArea.getGraphicsContext2D();\n canvasDrawer.drawBoard(canvasArea, board, gc, currentCellColor, currentBackgroundColor, gridToggle);\n }", "public void displayGrid ()\n {\n for (int i = 0; i < getDimX(); i++) {\n System.out.print(\"[ \");\n for (int y = 0; y < getDimY(); y++) {\n System.out.print(m_grid[i][y]);\n System.out.print(\" \");\n }\n System.out.println(\"]\");\n }\n }", "public void paint(Graphics g) {\n\t\tclearScreen(g);\n\t\tif (agents.size() == 2) {\n\t\t\tdrawAxes(g);\n\t\t\tdrawAgents(g);\n\t\t}\n\t}", "public void paint(Graphics g){\n super.paint(g);\n Graphics2D g2d = (Graphics2D) g;\n g.setColor(Color.WHITE);\n for(int i = 0; i < ROWS; i++){\n g.drawLine(0, i * HEIGHT / ROWS - 1, \n WIDTH, i * HEIGHT / ROWS - 1);\n g.drawLine(0, i * HEIGHT / ROWS - 2, \n WIDTH, i * HEIGHT / ROWS - 2);\n }\n for (int i = 0; i <= COLS; i++) {\n g.drawLine(i * Game.getWindowWidth() / Game.getCols(), 0,\n i * Game.getWindowWidth() / Game.getCols(), HEIGHT);\n g.drawLine(i * Game.getWindowWidth() / Game.getCols() - 1, 0,\n i * Game.getWindowWidth() / Game.getCols() - 1, HEIGHT);\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paintShadow(g2d);\n }\n }\n for (int i = 0; i < ROWS; i++) {\n for (int j = 0; j < COLS; j++) {\n grid[i][j].paint(g2d);\n }\n }\n \n for(Ball b : balls) {\n b.paint(g2d);\n }\n g2d.setColor(Color.BLACK);\n //segment at the top\n g2d.drawLine(0, 0, WIDTH, 0);\n g2d.drawLine(0, 1, WIDTH, 1);\n g2d.drawLine(0, 2, WIDTH, 2);\n //segment at the bottom\n g2d.drawLine(0, HEIGHT, WIDTH, HEIGHT);\n g2d.drawLine(0, HEIGHT + 1, WIDTH, HEIGHT + 1);\n g2d.drawLine(0, HEIGHT + 2, WIDTH, HEIGHT + 2);\n \n for(Point p : corners){\n g2d.drawOval(p.x, p.y, 3, 3);\n }\n\n if(aimStage){\n //draw the firing line\n g2d.setColor(lineColor);\n drawFatPath(g2d, startX, startY, endX, endY);\n g2d.setColor(arrowColor);\n drawArrow(g2d);\n }\n if(mouseHeld){\n// drawFatPath(g, Ball.restPositionX, HEIGHT - Ball.diameter, \n// getEndPoint().x, getEndPoint().y);\n }\n }", "public void printGrid()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}", "public void createGrid() {\r\n generator.generate();\r\n }", "public void printGridAsChild()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tSystem.out.print( \"\\t\" );\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.scale(2, 2);\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setColor(Color.WHITE);\n\n Application.grid.draw(g2);\n ui.draw(g2);\n }", "void printGrid() {\n GridHelper.printGrid(hiddenGrid);\n }", "@Override\r\n protected void paintComponent(Graphics g) {\n paintWater(g);\r\n \r\n g.setColor(new Color(255, 255, 255, 70));\r\n g.fillRect(0, 0, 500, 500);\r\n \r\n \r\n // Paint the Grid ------------------------------------------\r\n g.setColor(Color.BLACK);\r\n \r\n for (int i = -1; i < 500; i += 50) {\r\n \r\n g.fillRect(i, 0, 2, 500);\r\n g.fillRect(0, i, 500, 2);\r\n \r\n }\r\n \r\n paintShips(g);\r\n paintHits(g);\r\n \r\n \r\n if (isPainted && shortBoard == ATTACK_BOARD && newGD.isMyTurn() && !missile.isPlaced()) {\r\n g.drawImage(Assets.imgMissile, mouseX, mouseY, null);\r\n }\r\n \r\n if (shortBoard == ATTACK_BOARD && newGD.isMyTurn() && missile.isPlaced()) {\r\n g.drawImage(Assets.imgMissile, missile.getPosition().x, missile.getPosition().y, null);\r\n }\r\n \r\n // Paint square under mouse pointer (also for testing)\r\n /*if (isPainted) {\r\n \r\n g.setColor(colorSquare);\r\n g.fillRect(mouseX, mouseY, 50, 50);\r\n \r\n }*/\r\n \r\n }", "public void paintComponent(Graphics g){\n \t\tsuper.paintComponent(g);\r\n \r\n \t\tint numOfRows = (int)blockShape.getResolution().x;\r\n \t\tint numOfCols = (int)blockShape.getResolution().y;\r\n \t\tint gridSize = (int)(SHAPE_WIN_SIZE/numOfRows);\r\n \t\t\r\n \t\t//1st: paint each element in the BlockShape -> shape(Color[][])\r\n \t\tfor(int i=0; i< numOfRows;i++){\r\n \t\t\tfor(int j=0; j< numOfCols; j++){\r\n \t\t\t\tg.setColor(blockShape.getShapeElement(i, j));\r\n \r\n \t\t\t\tif(i == numOfRows-1 || j == numOfCols-1){\r\n \t\t\t\t\t//the last row and last column is a bit wider because of the type casting =_=\r\n \t\t\t\t\tg.fillRect(j*gridSize, i*gridSize, gridSize+10, gridSize+10);\r\n \t\t\t\t}else{\r\n \t\t\t\t\tg.fillRect(j*gridSize, i*gridSize, gridSize, gridSize);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t//2nd: paint the grid corresponding to the resolution of blockShape\r\n \t\tg.setColor(Color.orange);\r\n \t\tfor (int row = 0; row < numOfRows; row++) {\r\n \t\t\tg.drawLine(0,row*gridSize ,SHAPE_WIN_SIZE, row*gridSize);\r\n \t\t}\r\n \t\tg.drawLine(0,SHAPE_WIN_SIZE, SHAPE_WIN_SIZE, SHAPE_WIN_SIZE);\r\n \r\n \t\tfor (int col = 0; col < numOfCols; col++) {\r\n \t\t\tg.drawLine(col*gridSize, 0 , col*gridSize , SHAPE_WIN_SIZE);\r\n \t\t}\r\n \t\tg.drawLine(SHAPE_WIN_SIZE-1, 0, SHAPE_WIN_SIZE-1, SHAPE_WIN_SIZE);\r\n \t}", "public void fillGamePanel() {\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n gridPanel.add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n }", "private void draw() {\n\n // Current generation (y-position on canvas)\n int generation = 0;\n\n // Looping while still on canvas\n while (generation < canvasHeight / CELL_SIZE) {\n\n // Next generation\n cells = generate(cells);\n\n // Drawing\n for (int i = 0; i < cells.length; i++) {\n gc.setFill(colors[cells[i]]);\n gc.fillRect(i * CELL_SIZE, generation * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n }\n\n // Next line..\n generation++;\n }\n }", "@Override\r\n\tpublic void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\t//parent.log(\"Height = \" + getHeight());\r\n\t\tpaintGrid((Graphics2D) g);\r\n\t\tpaintMap((Graphics2D) g);\r\n\t\tif (parent.showMesh) paintMesh((Graphics2D) g);\r\n\t\tpaintParticles((Graphics2D) g);\r\n\t\tpaintRobot((Graphics2D) g);\r\n\t\tpaintTarget((Graphics2D) g);\r\n\t\tpaintPath((Graphics2D) g);\r\n\t\tpaintMoves((Graphics2D) g);\r\n\t\tpaintFeatures((Graphics2D) g);\r\n\t\tpaintWaypoints((Graphics2D) g);\r\n\t}", "public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}", "@Override\n\tpublic void paintComponent(Graphics g)\n\t{\n\t\tsuper.paintComponent(g);\n\t\t//Draw the board and the table\n\t\tif (isTableVisible) {\n\t\t\tdrawBackground(this, g, gameInstance);\n\t\t}\n\n\t\tGraphics2D g2 = (Graphics2D)g;\n\t\tRenderingHints rh = new RenderingHints(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);\n\t\tg2.setRenderingHints(rh);\n\t\tg2.setTransform(boardToScreenTransformation);\n\t\tdrawPlayerIcons(this, g, gameInstance);\n\t\t//Draw all player related information\n\t\tdrawPlayerPositions(this, g, gameInstance, player, infoText);\n\n\t\t//Draw all objects not in some private area\n\t\tObjectFunctions.getDrawOrder(gameInstance, ial);\n\t\toiList.clear();\n\t\tgameInstance.getObjects(oiList);\n\t\tArrayList<ObjectInstance> drawableObjects = new ArrayList<>();\n\t\tCheckFunctions.drawableObjectsOnTable(oiList, drawableObjects);\n\t\tdrawableObjects.sort(ObjectFunctions.objectInstanceDrawValueComparator);\n\t\tial.clear();\n\t\tObjectFunctions.addObjectListToIdList(drawableObjects, ial);\n\t\tdrawObjectsFromList(this,g,gameInstance,player, ial);\n\n\t\t//Draw selection rectangle\n\t\tdrawSelection(this, g, player);\n\n\t\t//Draw Private Area\n\t\tif (!player.visitor) {\n\t\t\tdrawPrivateArea(this, g);\n\t\t}\n\n\n\t\tAffineTransform tmp = g2.getTransform();\n\t\tg2.setTransform(boardToScreenTransformation);\n\n\t\t//Redraw selected objects not in some private area\n\t\tial.clear();\n\t\tIntegerArrayList selectedObjects = new IntegerArrayList();\n\t\tObjectFunctions.getSelectedObjects(gameInstance, selectedObjects);\n\t\tfor (int id : selectedObjects){\n\t\t ial.addUnique(id);\n\t\t\tObjectFunctions.getAllAboveLyingObjects(gameInstance, player, gameInstance.getObjectInstanceById(id), ial2);\n ial.addUnique(ial2);\n\t\t}\n\t\tObjectFunctions.sortByDrawValue(gameInstance, ial);\n\t\t//ArrayUtil.unifySorted(ial);\n\t\tdrawObjectsFromList(this, g, gameInstance, player, ial, ial2);\n\n\n\t\t//Draw objects in private area\n\t\tif (!player.visitor && privateArea.zooming != 0) {\n\t\t\tdrawTokensInPrivateArea(this, g, gameInstance, player, hoveredObject);\n\t\t}\n\n\n\t\tg2.setTransform(tmp);\n\n\t\t//Draw debug informations\n\t\tif (isDebug) {\n\t\t\tDrawFunctions.drawDebugInfo(this, g2, gameInstance, player);\n\t\t}\n\t\tif (show_ping) {\n\t\t\tg2.drawString(\"Last Signal\", getWidth() - 100, 80);\n\t\t\tfor (int i = 0; i < gameInstance.getPlayerCount(); ++i)\n\t\t\t{\n\t\t\t\tPlayer pl = gameInstance.getPlayerByIndex(i);\n\t\t\t\tg2.drawString(pl.getName() + \" \" + ((System.nanoTime() - pl.lastReceivedSignal) / 100000000) / 10f, getWidth() - 100, 100 + 20 * i);\n\t\t\t}\n\t\t}\n\t}", "private void drawMap(final Graphics2D theGraphics) {\n for (int y = 0; y < myGrid.length; y++) {\n final int topy = y * SQUARE_SIZE;\n\n for (int x = 0; x < myGrid[y].length; x++) {\n final int leftx = x * SQUARE_SIZE;\n\n switch (myGrid[y][x]) {\n case STREET:\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n drawStreetLines(theGraphics, x, y);\n break;\n\n case WALL:\n theGraphics.setPaint(Color.BLACK);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n\n case TRAIL:\n theGraphics.setPaint(Color.YELLOW.darker().darker());\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n\n case LIGHT:\n // draw a circle of appropriate color\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n theGraphics.setPaint(myLightColor);\n theGraphics.fillOval(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n break;\n \n case CROSSWALK:\n theGraphics.setPaint(Color.LIGHT_GRAY);\n theGraphics.fillRect(leftx, topy, SQUARE_SIZE, SQUARE_SIZE);\n \n drawCrossWalkLines(theGraphics, x, y);\n \n // draw a small circle of appropriate color centered in the square\n theGraphics.setPaint(myLightColor);\n theGraphics.fillOval(leftx + (int) (SQUARE_SIZE * CROSSWALK_SCALE),\n topy + (int) (SQUARE_SIZE * CROSSWALK_SCALE),\n SQUARE_SIZE / 2, SQUARE_SIZE / 2);\n break;\n\n default:\n }\n\n drawDebugInfo(theGraphics, x, y);\n }\n }\n }", "@Override\n\tpublic void paintComponent(Graphics g) {\n\n\t\ttry {\n\t\t\tGraphics2D g2d = (Graphics2D) g;\n\n\t\t\tfloat w = this.getWidth();\n\t\t\tfloat h = this.getHeight();\n\n\t\t\tRenderingContext batch = new RenderingContext(g2d, w, h);\n\n\t\t\tif (!didInitCam) {\n\t\t\t\tcam = new OrthographicCamera(w, h);\n\n\t\t\t\tcam.zoomFor(world.getSize());\n\n\t\t\t\tdidInitCam = true;\n\t\t\t}\n\n\t\t\tcam.setViewportSize(w, h);\n\n\t\t\t// cam.update(); //Nothing in this function call.\n\t\t\tbatch.setProjectionMatrix(cam);\n\n\t\t\tif (world != null) {\n\t\t\t\tworld.render(batch);\n\t\t\t}\n\n\t\t\t// Render the grid.\n\t\t\tif (showGrid) {\n\t\t\t\tg2d.setStroke(new BasicStroke(1));\n\t\t\t\tg.setColor(new Color(1.0f, 1.0f, 1.0f, 0.5f));\n\t\t\t\tPoint2D.Float size = world.getSize();\n\t\t\t\t// draw Y lines\n\t\t\t\tfor (int i = 0; i <= size.y + .5f; i++) {\n\t\t\t\t\tbatch.drawLine(0, i, size.x, i);\n\t\t\t\t}\n\t\t\t\t// draw X lines\n\t\t\t\tfor (int j = 0; j <= size.x + .5f; j++) {\n\t\t\t\t\tbatch.drawLine(j, 0, j, size.y);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Render selection stuff.\n\t\t\trenderSelectedTiles(g2d, batch);\n\t\t\trenderSelectedEntities(g2d, batch);\n\t\t\tif (renderingTool != null)\n\t\t\t\trenderingTool.render(g2d, batch);\n\n\t\t} catch (ClassCastException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void draw(Graphics g)\r\n\t\t{\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t//Background\r\n\t\t\t\tg.setColor(Color.DARK_GRAY);\r\n\t\t\t\tg.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n\t\t\t\t\r\n\t\t\t\t// Get info\r\n\t\t\t\tGameBoard game = cantStop.getGameBoard();\r\n\t\t\t\tif ( game == null ) {\r\n\t\t\t\t\tSystem.err.println(\"There was an error in your code! Check \" +\r\n\t\t\t\t\t\t\t\"that your CantStop.getGameBoard() returns a valid \" +\r\n\t\t\t\t\t\t\t\"GameGrid instance that is not null. \" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\tTrack[] tracks = game.getTracks();\r\n\t\t\t\tif ( tracks == null ) {\r\n\t\t\t\t\tSystem.err.println(\"There was an error in your code! Check \" +\r\n\t\t\t\t\t\t\t\"that your GameBoard.getTracks() is not null.\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPlayer[] players = game.getPlayers();\r\n\t\t\t\tif ( players == null) {\r\n\t\t\t\t\tSystem.err.println(\"There was an error in your code! Check \" +\r\n\t\t\t\t\t\t\t\"that your GameBoard.getPlayers() is not null.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Column number headers\r\n\t\t\t\tFont f = new Font(\"Arial Bold\", Font.BOLD, 24);\r\n\t\t\t\tg.setFont(f);\r\n\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\tint x = BORDER - 1;\r\n\t\t\t\tfor(int ci=0; ci < tracks.length; ci++ ){\r\n\t\t\t\t\tTrack t = tracks[ci];\r\n\t\t\t\t\tif ( t == null ) {\r\n\t\t\t\t\t\tSystem.err.println(\"There was an error in your code! Check \" +\r\n\t\t\t\t\t\t\t\t\"that none of your Tracks are null.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint y = 5*BORDER/2 + Math.abs(12 - t.getLength()) * SLOT_WIDTH/2;\r\n\t\t\t\t\t\r\n\t\t\t\t\tg.drawString(String.format(\"%2d\", ci+2), x, y);\r\n\t\t\t\t\tx += SLOT_WIDTH;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//TRACKS\r\n\t\t\t\tx = BORDER + DISK_DIAMETER/2;\r\n\t\t\t\tfor (int ci=0; ci < tracks.length; ci++ )\r\n\t\t\t\t{\t\t\t\t\r\n\t\t\t\t\tTrack t = tracks[ci];\r\n\t\t\t\t\tif ( t == null ) {\r\n\t\t\t\t\t\tSystem.err.println(\"There was an error in your code! Check \" +\r\n\t\t\t\t\t\t\t\t\"that none of your Tracks are null.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint y = BORDER + SLOT_WIDTH + Math.abs(12 - t.getLength()) * SLOT_WIDTH/2;\r\n\t\t\t\t\t//Owner spot\r\n\t\t\t\t\tdrawCrown(g, x, y, t.getOwner());\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Other spots\r\n\t\t\t\t\ty += SLOT_WIDTH;\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int ri = t.getLength() - 1; ri >=0 ; ri--)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tchar c = t.getIdAt(ri);\r\n\t\t\t\t\t\tswitch(c)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tcase Util.EMPTY_SLOT:\r\n\t\t\t\t\t\t\tg.setColor(Color.lightGray);\r\n\t\t\t\t\t\t\tg.fillOval(x - DOT_DIAMETER/2, y - DOT_DIAMETER/2, DOT_DIAMETER, DOT_DIAMETER);\r\n\t\t\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\t\t\tg.drawOval(x - DOT_DIAMETER/2, y - DOT_DIAMETER/2, DOT_DIAMETER, DOT_DIAMETER);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase Util.NEUTRAL_ID:\r\n\t\t\t\t\t\t\tg.setColor(Color.WHITE);\r\n\t\t\t\t\t\t\tg.fillOval(x - DISK_DIAMETER/2, y - DISK_DIAMETER/2, DISK_DIAMETER, DISK_DIAMETER);\r\n\t\t\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\t\t\tg.drawOval(x - DISK_DIAMETER/2, y - DISK_DIAMETER/2, DISK_DIAMETER, DISK_DIAMETER);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\tboolean valid = false;\r\n\t\t\t\t\t\t\tfor(int i = 0; i < 4; i++) valid |= c == Util.PLAYER_IDS[i];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(!valid){\r\n\t\t\t\t\t\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\t\t\t\t\t\"Unknown disk character '\"+c+\"' found at row \"+ri+\" of column \"+ci+\".\");\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\t//Get correct player\r\n\t\t\t\t\t\t\t//Dont assume students store them in order\r\n\t\t\t\t\t\t\tColor color = Color.BLACK;\r\n\t\t\t\t\t\t\tfor(Player p: players){\r\n\t\t\t\t\t\t\t\tif(p.getId() == c){\r\n\t\t\t\t\t\t\t\t\tcolor = p.getColor();\r\n\t\t\t\t\t\t\t\t\tbreak;\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\tg.setColor(color);\r\n\t\t\t\t\t\t\tg.fillOval(x - DISK_DIAMETER/2, y +- DISK_DIAMETER/2, DISK_DIAMETER, DISK_DIAMETER);\r\n\t\t\t\t\t\t\tg.setColor(Color.BLACK);\r\n\t\t\t\t\t\t\tg.drawOval(x - DISK_DIAMETER/2, y +- DISK_DIAMETER/2, DISK_DIAMETER, DISK_DIAMETER);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ty += SLOT_WIDTH;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tx += SLOT_WIDTH;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(NullPointerException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcatch(ArrayIndexOutOfBoundsException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"The GUI tried to access a cone within\" +\r\n\t\t\t\t\t\t\" your GameBoard's tracks, but this \" +\r\n\t\t\t\t\t\t\"resulted in an ArrayIdexOutOfBounds \" +\r\n\t\t\t\t\t\t\"Exception.\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}", "private void renderWalls(Graphics g, ArrayList<GridLocation> walls, Location gridPosition){\n g.setColor(Color.BLACK);\n for(GridLocation wall : walls){\n g.fillRect(gridPosition.getX() + wall.getX()*CELL_SIZE, gridPosition.getY() + wall.getY()*CELL_SIZE,CELL_SIZE, CELL_SIZE);\n }\n }", "private void doDrawing(Graphics g) {\r\n\t\tGraphics2D g2d = (Graphics2D) g;// converts Graphics g to Graphics2D\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops through x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops through y-coords\r\n\t\t\t\tg2d.drawImage(nodes[i * WIDTH_TILES + j].getImage(), nodes[i * WIDTH_TILES + j].getTile().x, nodes[i * HEIGHT_TILES + j].getTile().y, this);// draws each tile with its current information\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t\t\r\n\t\tif (running) {// checks whether the simulation is running\r\n\t\t\tif (start++ % 10 == 0) {// staggers the movement of the ants, slows things down\r\n\t\t\t\tmoveAnts();// calls the method that governs the movement of the ants\r\n\t\t\t}// if (start)\r\n\t\t}// if (running)\r\n\t}", "@Override\n\tpublic void draw(RoomBlocks grid) {\n\t\trenderer.setProjectionMatrix(CameraHolder.instance().getOrtho().combined);\n//\t\tCont tot = new Cont();\n\t\tColor color = new Color();\n\n\t\t\n\t\tDimensions dim = grid.getDimensions().toRoomWorldDimmensions();\n\t\tgrid.forEach(bl -> {\n//\t\t\t\n\t\t\tint x = (GeneratorConstants.ROOM_BLOCK_SIZE * bl.getX()) + GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\n\t\t\tx = (dim.getW() - x) + dim.getX();\n\t\t\t\n\t\t\tint pseudWorldRoomY = grid.getDimensions().getY() * Configuration.getLevelGridElementContentSize();\n\t\t\tint y = (bl.getY() + pseudWorldRoomY) * (GeneratorConstants.ROOM_BLOCK_SIZE);\n\t\t\t\n\t\t\tShapeType shType = ShapeType.Filled;\n\t\t\tboolean render = false;\n\t\t\t\n\t\t\tif(bl.isDoor()) {\n\t\t\t\trender = true;\n\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t} else if(bl.isWall()) {\n//\t\t\t\trender = true;\n//\t\t\t\tcolor.set(1, 1, 1, 1);\n//\t\t\t\tshType = ShapeType.Line;\n\t\t\t} else if(bl.getMetaInfo() != null) {//TODO\n\t\t\t\t\n\t\t\t\tif(bl.getMetaInfo().getType().equals(\".\")) {\n\t\t\t\t\trender = true;\n\t\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t\t} else if(!bl.getMetaInfo().getType().equals(\"x\")) {\n\t\t\t\t\t\n\t\t\t\t\tBrush brush = Configuration.brushesPerTile.get(bl.getMetaInfo().getType().charAt(0));\n\t\t\t\t\tif(brush != null) {// && bl.getOwner() != null\n\t\t\t\t\t\t\n//\t\t\t\t\t\tif(bl.getOwner() != null) {\n//\t\t\t\t\t\t\tSystem.out.println(\"owner: \" + brush.tile);\n//\t\t\t\t\t\t}\t\t\t\t\t\t\n//\t\t\t\t\t\t\n\t\t\t\t\t\trender = true;\n\t\t\t\t\t\tcolor.set(brush.color[0], brush.color[1], brush.color[2], 1);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(render) {\n\t\t\t\t\n\t\t\t\tint size = GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\t\n\t\t\t\trenderer.begin(shType);\n\t\t\t\trenderer.setColor(color);\n\t\t\t\trenderer.rect(x, y, size, size);\n\t\t\t\trenderer.end();\n\t\t\t}\n\t\t\t\n//\t\t\tif(bl.getOwner() != null ) {\n//\t\t\t\tfinal int fx = x;\n//\t\t\t\tfinal int fy = y;\n//\t\t\t\t\n//\t\t\t\tbl.getOwner().forEachItems(itm -> {//desenhando os items\n//\t\t\t\t\trenderer.begin(ShapeType.Filled);\n//\t\t\t\t\trenderer.setColor(itm.color[0], itm.color[1], itm.color[2], 1);\n//\t\t\t\t\trenderer.rect(fx + itm.dx, fy + itm.dy, itm.width, itm.height);\n//\t\t\t\t\trenderer.end();\t\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t}\t\t\t\n\t\t});\n\t}", "private void bufferWorld() {\r\n\t\t//Draws to a PGraphics object must be surrounded with this...\r\n\t\tthis.backgroundBuffer.beginDraw();\r\n\t\t//Set a dark grey background\r\n\t\tthis.backgroundBuffer.background(50, 50, 50);\r\n\t\t//Iterate for each hexgon in the grid\r\n\t\tfor (int row = 0; row < this.numHexRow; row++) {\r\n\t\t\tfor (int col = 0; col < this.numHexCol; col++) {\r\n\t\t\tif (this.gridCells[row][col].getAnthill() == 1) {\r\n\t\t\t\t//If it is black anthill\r\n\t\t\t\tdrawImage(this.blackAnthillTile, row, col, 1);\r\n\t\t\t} else if (this.gridCells[row][col].getAnthill() == 2) { \r\n\t\t\t\t\t//If the cell is a red ant hill\r\n\t\t\t\t\tdrawImage(this.redAnthillTile, row, col, 1);\r\n\t\t\t\t} else if (this.gridCells[row][col].isRocky()) {\r\n\t\t\t\t\t//If it's rocky, randomly pick shade of grey\r\n\t\t\t\t\tint shade = this.random.nextInt(2);\r\n\t\t\t\t\tswitch (shade) {\r\n\t\t\t\t\t\tcase 0: this.backgroundBuffer.tint(LIGHT_ROCK_TINT);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 1: this.backgroundBuffer.tint(NEUTRAL_ROCK_TINT);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 2: this.backgroundBuffer.tint (DARK_ROCK_TINT);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdrawImage(this.rockTile, row, col, 1);\r\n\t\t\t\t\tthis.backgroundBuffer.tint(255); //Restore default no tint\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Otherwise it is a grass tile\r\n\t\t\t\t\tdrawImage(this.grassTile, row, col, 1); \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.backgroundBuffer.endDraw();\r\n\t}", "public static void drawMap(Graphics g, int[][] grid){\n for(int i = 0; i < 480; i++)\n {\n for(int j = 0; j < 840; j++)\n {\n Color gray = new Color(grid[i][j] / 17, grid[i][j] / 17, grid[i][j] / 17);\n g.setColor(gray);\n \n g.drawRect(j, i, 1, 1);\n }\n }\n }", "private void draw(Graphics2D g)\r\n\t{\t\t\r\n\t\tColor[] cols = new Color[] {Color.red,Color.green,Color.blue};\r\n\t\t\r\n\t\t// clear the background\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,0,640,510);\r\n\t\t\r\n\t\tg.translate(0,30);\t\r\n\r\n\t\tif (zp < 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t} \r\n\r\n\t\tColor[] colMap = new Color[16];\r\n\t\tcolMap[3] = Color.white;\r\n\t\tcolMap[12] = cols[(timers[0] / 100) % 3];\r\n\t\tcolMap[13] = Color.black;\r\n\t\tcolMap[14] = Color.gray;\r\n\t\tcolMap[15] = Color.yellow;\r\n\t\t\r\n\t\tfor (int x=0;x<30;x++) {\r\n\t\t\tfor (int y=0;y<30;y++) {\r\n\t\t\t\tint tile = getTile(x,y);\r\n\t\t\t\tif (tile != 0) {\r\n\t\t\t\t\tPolygon p = new Polygon();\r\n\r\n\t\t\t\t\tint total = addPoint(x,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y,p);\r\n\t\t\t\t\ttotal += addPoint(x+1,y+1,p);\r\n\t\t\t\t\ttotal += addPoint(x,y+1,p);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (total == 4) {\r\n\t\t\t\t\t\tif ((tile == 11) && (!controls[19])) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((tile == 13) && (toggles > 0)) {\r\n\t\t\t\t\t\t\ttile = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tColor col = cols[l % 3];\r\n\t\t\t\t\t\tif ((x+y) % 2 == 0) {\r\n\t\t\t\t\t\t\tcol = cols[l % 3].darker();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (colMap[tile] != null) {\r\n\t\t\t\t\t\t\tcol = colMap[tile];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (tile > 10) {\r\n\t\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t\tif (tile == 11) {\r\n\t\t\t\t\t\t\t\tg.setColor(col.darker());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg.fillPolygon(p);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tPolygon p2 = new Polygon();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.1,p2);\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.1,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.9,y+0.9,p2);\t\t\t\t\r\n\t\t\t\t\t\t\taddPoint(x+0.1,y+0.9,p2);\r\n\t\r\n\t\t\t\t\t\t\tg.setColor(col);\r\n\t\t\t\t\t\t\tg.fillPolygon(p2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (zp >= 0) {\r\n\t\t\tdrawBall(g);\r\n\t\t}\r\n\t\t\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(0,-20,640,45);\r\n\t\tg.setColor(Color.darkGray);\r\n\t\tg.drawLine(0,25,640,25);\r\n\t\tg.setFont(g.getFont().deriveFont(Font.BOLD, 20.0f));\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.green,0,0,Color.white));\r\n\t\t\r\n\t\tg.drawString(\"Time: \"+(timers[0]/1000),530,20);\r\n\t\tg.drawString(\"Ball\",20,20);\r\n\t\t\r\n\t\tg.setPaint(new GradientPaint(0,20,Color.yellow,0,0,Color.white));\r\n\t\tg.drawString(msg,(640-g.getFontMetrics().stringWidth(msg))/2,20);\r\n\t\t\r\n\t\tif (!started) {\r\n\t\t\tang += 0.01f;\r\n\t\t\tg.drawString(\"Cursors - Move PgUp/PgDown - View Space - Jump\",60,470);\r\n\t\t}\r\n\t}", "public void draw(Graphics g) {\n\t\tif (isRoom()) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t}\n\t\telse if (isDoorway()) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t\tif (direction == DoorDirection.UP) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, SMALL_RECT);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.RIGHT) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH + CELL_WIDTH - SMALL_RECT, row * CELL_HEIGHT, SMALL_RECT, CELL_HEIGHT);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.DOWN) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT + CELL_HEIGHT - SMALL_RECT, CELL_WIDTH, 5);\n\t\t\t}\n\t\t\telse if (direction == DoorDirection.LEFT) {\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(column * CELL_WIDTH, row * CELL_HEIGHT, SMALL_RECT, CELL_HEIGHT);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tg.setFont(new Font(\"SansSerif\", Font.BOLD, 12));\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.drawString(roomName, column * CELL_WIDTH, row * CELL_HEIGHT);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawRect(column * CELL_WIDTH, row * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);\n\t\t}\n\t}", "@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }", "private void draw() {\n gsm.draw(g);\n }", "void drawStuff (Graphics g) {\n if (g instanceof PrintGraphics) \n g.setColor (parent.parent.parent.printImgBColor);\n else \n g.setColor (parent.parent.parent.normImgBColor);\n \n g.fillRect (0, 0, _xPix, _yPix - 3 * parent.lineSize);\n \n //draw the stuff\n drawBins (g);\n \n //Draw the Time Line\n drawTimeLine (g);\n }", "public void displayGrid(){\n \tint max = currentOcean.getMaxGrid(); // modified by Ludo\n \tint line = max*2 +1; \t\t\t\t// modified by Ludo\n \tfor(int i=0; i<max+1;i++){\t\t\t// modified by Ludo\n \t int lineStart = 0 + line*i;\t\t// modified by Ludo\n \t int lineEnd = line + line*i;\t\t// modified by Ludo\n \t System.out.println(currentOcean.toString().substring(lineStart, lineEnd)); // modified by Ludo\n }\n }", "private void paintGridSquare(final Graphics2D theGraphics, final int theX, final int theY,\n final int theIdx) {\n theGraphics.setPaint(COLOR_MAP.get(myBoardString.charAt(theIdx)));\n theGraphics.fill(new Rectangle2D.Double(theX, theY, BLOCK_SIZE, BLOCK_SIZE));\n\n // paint outline on tetris blocks only\n if (myBoardString.charAt(theIdx) != ' ') {\n theGraphics.setStroke(new BasicStroke(STROKE_WIDTH));\n theGraphics.setPaint(Color.WHITE);\n // make height and width of outline one pixel smaller so the outline\n // sits inside the bounds of the already filled shape\n theGraphics.draw(new Rectangle2D.Double(theX, theY, BLOCK_SIZE, BLOCK_SIZE));\n }\n\n }", "@Override\n\tpublic void debugDraw(Graphics g) {\n\t\tfor(int i = 0; i < CELL_SIDE_COUNT; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < CELL_SIDE_COUNT; j++)\n\t\t\t{\n\t\t\t\t//Place code for debug drawing here\n\t\t\t}\n\t\t}\n\t}", "public void draw(Graphics g) {\r\n\t\tthis.update();\r\n\t\tint drawLength = (int) (dim.getWidth()/tSize) + (int) (x/tSize);\r\n\t\tif (drawLength >= tileMap[0].length-2) {\r\n\t\t\tdrawLength = tileMap[0].length-2;\r\n\t\t}\r\n\t\tint drawHeight = (int) (dim.getHeight()/tSize)+ (int) (y/tSize);\r\n\t\tif (drawHeight>= tileMap.length-2) {\r\n\t\t\tdrawHeight = tileMap.length-2;\r\n\t\t}\r\n\t\tfor (int i = (int) (x/tSize); i < drawLength+2; i++) {\r\n\t\t\tfor (int j = (int) (y/tSize); j < drawHeight+2; j++) {\r\n\t\t\t\ttileMap[i][j].draw(g, i*tSize - (int)x, j*tSize - (int)y, tSize);\r\n\t\t\t} // End for loop\r\n\t\t} // End for loop\r\n\t\tif (bestTrap) {\r\n\t\t\tg.drawImage(hideri, (int)(dim.getWidth()/2) - 332, (int)(dim.getHeight()/2) - 250, 663, 500, null);\r\n\t\t} // End if\r\n\t}", "@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tfor (int i = 0; i < MyFrame.ROW; i++)\n\t\t\tfor (int j = 0; j < MyFrame.COLUMN; j++)\n\t\t\t\tMyFrame.cells[i][j].paint(g);\n\t}", "@Override\n public void paintComponent(Graphics gg){\n \tGraphics2D g = (Graphics2D) gg;\n \tg.setColor(new Color(0,0,0));\n \tg.fillRect(0, 0, width, height);\n \t/// Draw Functions ///\n \t//menus.drawMenus(g);\n \t/// Rest ///\n \tfor(PhysicsObject obj: objects){\n \t\tobj.drawSelf(g);\n \t}\n \tg.setColor(new Color(255,255,255));\n \tg.fillOval(mx-3, my-3, 5, 5);\n }", "@Override\n public void paint(Graphics g) {\n\n g2d = (Graphics2D) g; //Casting the Grahpics object to an Graphics2D object.\n\n /**\n * Setting RenderingHints.\n */\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);\n g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_DEFAULT);\n\n /**\n * Initializing of board.\n * Call to method drawGrid().\n * Drawing all Grids from 0 to 15 in a for()-loop.\n */\n paintGrid();\n\n /**\n * Call to method drawNumbers().\n * Writing numbers in field for easier recognition.\n */\n paintNumbers();\n\n /**\n * Checks if a game is initialized.\n * If it is, it will paint the tokens, if not, it won't paint the tokens.\n */\n if(game != null) {\n\n game.paint(g2d);\n }\n }", "@Override\n\t protected void paintComponent(Graphics g) {\n\t super.paintComponent(g);\n\t for (int y = 0; y < MAX_Y; y++) {\n\t for (int x = 0; x < MAX_X; x++) { \n\t if(seed[x][y].isAlive) {\n\t g.setColor(FILL_COLOR);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }\n\t else{\n\t g.setColor(defaultBackground);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end if..\n\t g.setColor(Color.GRAY);\n\t g.drawRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end for x\n\t }//end for y\n\t }", "private void drawImages(int imageScale, Cell[][] gridCells) {\r\n\t\t//If the background buffer isn't null, draw it to the screen\r\n\t\tif (this.backgroundBuffer != null) {\r\n\t\t\timage(this.backgroundBuffer, 0, 0);\r\n\t\t}\r\n\t\tif (this.currentGameState == DisplayStates.RUNNING) {\r\n\t\t\t//Loop through each hexagon, and draw the markers, then food, then\r\n\t\t\t//ants in that order\r\n\t\t\tfor (int row = 0; row < this.numHexRow; row++) {\r\n\t\t\t\tfor (int col = 0; col < this.numHexCol; col++) {\r\n\t\t\t\t\tif (this.isMarkers) {\r\n\t\t\t\t\t\tdrawMarker(row, col, gridCells);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdrawFood(imageScale, row, col);\r\n\t\t\t\t\tdrawAnt(imageScale, row, col);\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void printGrid(){\n System.out.println(\"printing the grid\");\n for(int i=0;i<row_size;i++){\n for(int j = 0;j<col_size;j++){\n System.out.println(grid[i][j]);\n }\n }\n }", "public void paintComponent(Graphics g)\r\n\t{\r\n\t\t// Set a base background color\r\n\t\tg.setColor(new Color(0,0, 150));\r\n\t\tg.fillRect(0,0, this.getWidth(), this.getHeight());\r\n\t\t\r\n\t\t// Load the background image if its not already \r\n\t\tif(background == null){\r\n\t\t\tbackground = loadImage(\"HaloBackground.jpg\");\r\n\t\t}\r\n\t\t\r\n\t\t// Draw the background image to the screen at a third of the scroll rate\r\n\t\tg.drawImage(background,(int)(0 - model.mario.x)/3, -400, null);\r\n\t\tg.drawImage(background, (int)(0 - model.mario.x)/3, -400, -background.getWidth(), background.getHeight(), null);\r\n\r\n\t\t\r\n\t\t// Load the ground image if its not already\r\n\t\tif(ground == null){\r\n\t\t\tground = loadImage(\"Metal_Ground.png\");\r\n\t\t}\r\n\t\t\r\n\t\t// Count variable to indicate how many bricks are printed to the screen\r\n\t\tint count = 0;\r\n\t\tg.drawImage(ground, 0 - model.mario.x, this.getHeight() - 50, 50, 50, null);\r\n\t\t\r\n\t\t// Draw the middle set of bricks\r\n\t\tfor(int i = 0; i < (model.mario.x + this.getWidth())/50; i++){\r\n\t\t\tcount++;\r\n\t\t\t// Adjust the printing position to scroll with the characters\r\n\t\t\tg.drawImage(ground, 50 * i - model.mario.x, this.getHeight() - 50, 50, 50, null);\r\n\t\t}\r\n\t\t\r\n\t\t// Draw the last brick adjusted to the scroll position\r\n\t\t//int remainingSpace = (model.mario.x + this.getWidth()) % 100;\r\n\t\tg.drawImage(ground, count * 50 - model.mario.x, this.getHeight() - 50, 50, 50, null);\r\n\t\t\r\n\t\t// Draw all the sprites\r\n\t\tfor(int i = 0; i < model.sprites.size(); i++){\r\n\t\t\tmodel.sprites.get(i).draw(g);\r\n\t\t}\r\n\t\t\r\n\t}", "public void paintComponent(Graphics g)\n\t{\n\t\tsuper.paintComponent(g);\n\n\t\t\n\t\tint width = getWidth();\n\t\tint height = getHeight();\n\t\t\n\t\t\n\t\t// use the Graphics parameter g to draw grid lines and\n\t\t// to write the decades across the bottom of the graph (Part 3)\n\n\t\n\t\t\n\t\t// loop to graph each name in the graphArray (Part 4)\n\t\t// HINT: write the code to graph one name, then add a loop to graph\n\t\t// all the names in graphArray\n\t\t\n\t\t\n\t}", "private void drawBackground() {\n g2.setColor(SquareRenderer.BLANK_CELL_COLOR);\n g2.fillRect(BORDER_SIZE, BORDER_SIZE, BOARD_SIZE, BOARD_SIZE);\n }", "@Override\n public void resetGrids() {\n view.clearGrid(false);\n\n // then remove non-given numbers\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n if (!grid.isGiven(row, col)) {\n grid.unsetNumber(row, col);\n }\n }\n }\n\n // finally, display the givens on the view\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (grid.isGiven(i, j)) {\n view.setGiven(i, j, grid.getNumber(i, j));\n }\n }\n }\n }", "public void drawCell(Graphics g) {\n if (isVisited()) { // visited cells are white\n setCellColor(g, Color.WHITE);\n }\n if (isSolution()) { // cells that are part of the most optimal solution are yellow\n setCellColor(g, Color.YELLOW);\n }\n\n // draw the walls if there are any\n int col2 = col * CELL_DIMS;\n int row2 = row * CELL_DIMS;\n\n g.setColor(Color.BLACK); // walls are black\n if (walls[0]) // north wall\n g.drawLine(col2, row2, col2 + CELL_DIMS, row2);\n if (walls[1]) // east wall\n g.drawLine(col2 + CELL_DIMS, row2, col2 + CELL_DIMS, row2 + CELL_DIMS);\n if (walls[2]) // south wall\n g.drawLine(col2 + CELL_DIMS, row2 + CELL_DIMS, col2, row2 + CELL_DIMS);\n if (walls[3]) // west wall\n g.drawLine(col2, row2 + CELL_DIMS, col2, row2);\n }", "public void printGrid() {\n // Creation of depth Z\n for (int d = 0; d < grid[0][0].length; d++) {\n System.out.println(\"\");\n int layer = d + 1;\n System.out.println(\"\");\n System.out.println(\"Grid layer: \" + layer);\n // Creation of height Y\n for (int h = 1; h < grid.length; h++) {\n System.out.println(\"\");\n // Creation of width X\n for (int w = 1; w < grid[0].length; w++) {\n if (grid[h][w][d] == null) {\n System.out.print(\" . \");\n } else {\n String gridContent = grid[h][w][d];\n char identifier = gridContent.charAt(0);\n\n int n = 0;\n if(grid[h][w][d].length() == 3) {\n n = grid[h][w][d].charAt(2) % 5;\n } else if (grid[h][w][d].length() == 2) {\n n = grid[h][w][d].charAt(1)%5;\n }\n if(n == 0) n = 6;\n\n // Labelling\n if (identifier == 'G' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'G') {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n } else if (identifier == 'L' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'L') {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n }\n }\n }\n }\n }\n System.out.println(\"\");\n }", "@Override\n\tpublic void render(GameContainer gc, Graphics g) {\n\t\tfloat x = getX(), y = getY(), width = getWidth(), height = getHeight();\n\t\tg.setColor(new Color(0.5f, 0.5f, 0.5f, 0.8f));\n\t\tg.fillRoundRect(x, y, width, height, 5);\n\t\t\n\t\tg.setColor(Color.black);\n\t\tg.drawString(\"Map needs to be drawn below\", x + (width - g.getFont().getWidth(\"Map needs to be drawn below\")) * 0.5f , y + 20);\n\t\tg.drawString(\"Orange - current cell\", x + 20, y + 50);\n\t\tg.drawString(\"Green - explored cell\", x + 20, y + 70);\n\t\tg.drawString(\"White - unexplored cell\", x + 20, y + 90);\n\t\tg.drawString(\"Line - connection\", x + 20, y + 110);\n\t\tg.drawString(\"Dot - contains item\", x + 20, y + 130);\n\t\t\n\t\tg.setColor(Color.orange);\n\t\tg.fillRoundRect(x + width/2 - 3, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.green);\n\t\tg.fillRoundRect(x + width/2 - 3 + 50, y + height/2 - 3, 46, 46, 5);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.white);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3 + 50, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.darkGray);\n\t\tg.fillRoundRect(x + width/2, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 50, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2 + 50, 40, 40, 5);\n\t\t\n\t\tg.drawLine(x + width/2 + 40, y + height/2 + 20, x + width/2 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 40 + 50, y + height/2 + 20, x + width/2 + 50 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 120, y + height/2 + 40, x + width/2 +\t120, y + height/2 + 50);\n\t\t\n\n g.setColor(Color.cyan);\n g.fillOval(x + width/2 - 3 + 120, y + height/2 + 17, 6, 6);\n\t\t\n\t}", "private void redraw() {\r\n for (int row = 0; row < maxRows; row++) {\r\n for (int column = 0; column < maxColumns; column++) {\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n }\r\n }\r\n grid[snake[HEAD].row][snake[HEAD].column].setBackground(\r\n SNAKE_HEAD_COLOR);\r\n for (int i = 1; i < length; i++) {\r\n grid[snake[i].row][snake[i].column].setBackground(SNAKE_BODY_COLOR);\r\n }\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }", "@Override\n public void printGrid(){\n for(int row = 0; row < rows; row++){\n System.out.print(\"\\n\");\n if(row==0){\n char row_char='A';\n System.out.print(\" |\");\n for(int i=0; i<rows; i++){\n System.out.print(\"[\" + row_char + \"]\");\n row_char++;\n }\n System.out.print(\"\\n\");\n System.out.print(\"---|\");\n for(int i=0; i<rows;i++){\n System.out.print(\"---\");\n }\n System.out.print(\"\\n\");\n }\n\n for(int column = 0; column < columns; column++){\n if (column==0){System.out.print(\"[\"+row+\"]|\");}\n System.out.print(grid[row][column]);\n }\n }\n }", "public void draw() {\r\n background(255);\r\n\r\n float mouseXFactor = map(mouseX, 0, width, 0.05f, 1);\r\n float mouseYFactor = map(mouseY, 0, height, 0.05f, 1);\r\n\r\n for (int gridX = 0; gridX < img.width; gridX++) {\r\n for (int gridY = 0; gridY < img.height; gridY++) {\r\n // grid position + tile size\r\n float tileWidth = width / (float) img.width;\r\n float tileHeight = height / (float) img.height;\r\n float posX = tileWidth * gridX;\r\n float posY = tileHeight * gridY;\r\n\r\n // get current color\r\n int c = pixelArray[gridX][gridY];\r\n\r\n // greyscale conversion\r\n int greyscale = round(red(c) * 0.222f + green(c) * 0.707f + blue(c) * 0.071f);\r\n\r\n if (drawMode == 1) {\r\n // greyscale to ellipse area\r\n fill(0);\r\n noStroke();\r\n float r2 = 1.1284f * sqrt(tileWidth * tileWidth * (1 - greyscale / 255.0f));\r\n r2 = r2 * mouseXFactor * 3;\r\n ellipse(posX, posY, r2, r2);\r\n } else if (drawMode == 2) {\r\n // greyscale to rotation, line length and stroke weight\r\n stroke(0);\r\n float w4 = map(greyscale, 0, 255, 10, 0);\r\n strokeWeight(w4 * mouseXFactor + 0.1f);\r\n float l4 = map(greyscale, 0, 255, 35, 0);\r\n l4 = l4 * mouseYFactor;\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI);\r\n line(0, 0, 0 + l4, 0 + l4);\r\n popMatrix();\r\n } else if (drawMode == 3) {\r\n // greyscale to line relief\r\n float w5 = map(greyscale, 0, 255, 5, 0.2f);\r\n strokeWeight(w5 * mouseYFactor + 0.1f);\r\n // get neighbour pixel, limit it to image width\r\n int /* color */ c2 = img.get(min(gridX + 1, img.width - 1), gridY);\r\n stroke(c2);\r\n int greyscale2 = (int) (red(c2) * 0.222f + green(c2) * 0.707f + blue(c2) * 0.071f);\r\n float h5 = 50 * mouseXFactor;\r\n float d1 = map(greyscale, 0, 255, h5, 0);\r\n float d2 = map(greyscale2, 0, 255, h5, 0);\r\n line(posX - d1, posY + d1, posX + tileWidth - d2, posY + d2);\r\n } else if (drawMode == 4) {\r\n // pixel color to fill, greyscale to ellipse size\r\n float w6 = map(greyscale, 0, 255, 25, 0);\r\n noStroke();\r\n fill(c);\r\n ellipse(posX, posY, w6 * mouseXFactor, w6 * mouseXFactor);\r\n // TODO 2: Add the following: if(Math.random()<0.1) {pixelArray[gridX][gridY] = lerpColor(c,0xff0000, 0.1f);}\r\n } else if (drawMode == 5) {\r\n stroke(c);\r\n float w7 = map(greyscale, 0, 255, 5, 0.1f);\r\n strokeWeight(w7);\r\n fill(255, 255 * mouseXFactor);\r\n pushMatrix();\r\n translate(posX, posY);\r\n rotate(greyscale / 255.0f * PI * mouseYFactor);\r\n rect(0, 0, 15, 15);\r\n popMatrix();\r\n }\r\n /*\r\n * TODO 3: Add a drawMode == 6 case. \r\n * Try modifying the pixelArray \r\n * Try drawing shapes or colors depending on c and grayscale variables \r\n * Try adding other forms of animation\r\n */\r\n }\r\n }\r\n }", "public void paintComponent(Graphics g) {\n if (board == null)\n return; // refuse to paint a null board\n \n Graphics2D g2 = (Graphics2D) g;\n g2.setPaint(Color.WHITE);\n int bw = cellDistance(board.getWidth());\n int bh = cellDistance(board.getHeight());\n for (int x = 0; x < bw; x += CELL_SIZE + GUTTER_SIZE) {\n g2.fillRect(x, 0, GUTTER_SIZE, bh);\n }\n for (int y = 0; y < bh; y += CELL_SIZE + GUTTER_SIZE) {\n g2.fillRect(0, y, bw, GUTTER_SIZE);\n }\n \n g2.setPaint(Color.BLUE);\n \n for (int x = 0; x < board.getWidth(); x++) {\n int xpos = cellDistance(x);\n \n for (int y = 0; y < board.getHeight(); y++) {\n int ypos = cellDistance(y);\n if (board.getCell(x, y)) {\n g2.fillRect(xpos, ypos, CELL_SIZE, CELL_SIZE);\n }\n }\n }\n }", "public BoardCell draw(Graphics g, boolean specialColor) { \n\t\tx = (width * column);\n\t\ty = (height * row);\n\n\t\tif(specialColor) {\n\t\t\tsuper.repaint();\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.cyan);\n\t\t\tg.fillRect(x, y, width, height);\n\t\t}\n\n\t\t//if is not doorway\n\t\tif(this.isWalkway) {\n\t\t\tsuper.repaint();\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(handleColor(Color.YELLOW, specialColor));\n\t\t\t//x, y, width, height\n\t\t\tg.fillRect(x, y, width, height);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawRect(x, y, width, height);\n\t\t}\n\t\t\n\t\t//if is doorway\n\t\telse if (this.isDoorway && this.isRoom){\n\t\t\t//display doorway direction\n\t\t\tswitch (this.doorDirection) {\n\t\t\t//display each cell's direction image\n\t\t\tcase LEFT:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width + 10, height );\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x , y, doorWidth, height);\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x + 20, y, doorWidth, height);\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x, y, width, doorHeight);\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x, y + 20, width, doorHeight);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//if the cell is a room\n\t\tif(this.isRoom && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.gray);\n\t\t\tg.fillRect(x, y, width, height );\n\t\t}\n\t\t//if is closet\n\t\tif(this.isCloset && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.RED);\n\t\t\tg.fillRect(x, y, width, height);\n\t\t}\n\t\t//draw the players and the player colors\n\t\tif(this.isPlayer) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(this.playerColor);\n\t\t\tg.fillOval(x, y, width, height);\n\t\t}\n\t\t\n\t\t//this displays the room name\n\t\tif(isNameDrawer && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.BLUE);\n\t\t\tg.drawString(board.getLegend().get(initial), x, y);\n\t\t\treturn this;\n\t\t} \n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public void printGrid() {\n\t\tfor (int row = 0; row < ROWS; row++) {\n\t\t\tif (row % 3 == 0 && row != 0)\n\t\t\t\tSystem.out.println(\" |\\n ------------------------\");\n\t\t\telse if (row % 3 == 0)\n\t\t\t\tSystem.out.println(\" -------------------------\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\" | \");\n\t\t\tfor (int col = 0; col < COLUMNS; col++) {\n\t\t\t\tif (col % 3 == 0)\n\t\t\t\t\tSystem.out.print(\" | \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tSystem.out.print(grid[row][col]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\" |\\n -------------------------\");\n\t}", "public void render() {\n int pixel = getPixelSize();\n for (int xx = x; xx<x+w; xx += pixel) {\n for (int yy = y; yy<y+h; yy += pixel) {\n Location next = getLocation(xx, yy);\n if (next != null) { // This way if a wall is spawned at the edge it's ok\n next.setColor(color(255,255,255));\n next.setType(LocationType.WALL);\n getGridCache().add(next);\n }\n }\n }\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawRect(pixelTopX, pixelTopY, pixelWidth, pixelHeight);\n for (int i = 0; i < mineLocation.length; i++) {\n int mineColumn = i % boardWidth;\n int mineRow = i / boardWidth;\n\n if (mineLocation[i]) {\n if (minefield[mineRow][mineColumn] == null) {\n minefield[mineRow][mineColumn] = new MineGrid(pixelTopX, pixelTopY, \n mineRow, mineColumn);\n }\n minefield[mineRow][mineColumn].draw(g);\n } else {\n if (minefield[mineRow][mineColumn] == null) {\n minefield[mineRow][mineColumn] = new SafeGrid(pixelTopX, pixelTopY, \n mineRow, mineColumn, surroundingMines[i]);\n }\n minefield[mineRow][mineColumn].draw(g);\n }\n }\n mineLabel.setText(Integer.toString(minesRemaining));\n mineLabel.setBounds(pixelTopX, pixelTopY, 100, 50);\n mineLabel.setFont(new Font(\"arial\", Font.PLAIN, 36));\n\n timeLabel.setText(Integer.toString(timeElapsed));\n timeLabel.setBounds(pixelTopX + pixelWidth - 50, pixelTopY, 100, 50);\n timeLabel.setFont(new Font(\"arial\", Font.PLAIN, 36));\n }", "private void drawPlayers(Graphics g){\n\t\tg.setColor(Color.BLACK);\n\t\tfor(int i=0; i<grid.length; i++){\n\t\t\tfor(int j=0; j<grid[0].length; j++){\n\t\t\t\tfor(GameMatter itm: grid[i][j].getItems()){\n\t\t\t\t\tif(itm instanceof Bandit){\n\t\t\t\t\t\tif(itm.equals(player))\n\t\t\t\t\t\t\tg.setColor(Color.MAGENTA);\n\t\t\t\t\t\tg.fillRect(j*widthBlock+padding, i*heightBlock+padding, bandit, bandit);\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}" ]
[ "0.8052906", "0.78850037", "0.78434396", "0.7762213", "0.7730531", "0.76628274", "0.7598508", "0.75933105", "0.74623036", "0.7196589", "0.71163046", "0.7092033", "0.7043261", "0.70410246", "0.696755", "0.693947", "0.69068706", "0.6836763", "0.67724293", "0.6752771", "0.67491025", "0.67250025", "0.6685074", "0.6658926", "0.6657607", "0.6623692", "0.6570221", "0.6539018", "0.6535925", "0.65350693", "0.65177166", "0.6478694", "0.64583296", "0.6433031", "0.64288706", "0.64203197", "0.6402912", "0.63907045", "0.6347834", "0.63331336", "0.63321894", "0.63140297", "0.6308331", "0.6305158", "0.62957567", "0.62930757", "0.628004", "0.6262359", "0.62562627", "0.6237345", "0.62236583", "0.62102115", "0.6205942", "0.62049276", "0.62044626", "0.62024856", "0.619819", "0.617089", "0.61590725", "0.6153289", "0.61403924", "0.6132788", "0.6123411", "0.6095537", "0.6088823", "0.60875213", "0.60645294", "0.60570455", "0.6030355", "0.60209167", "0.601084", "0.6009129", "0.6007736", "0.5996919", "0.5994664", "0.5990015", "0.59851193", "0.5982691", "0.5980159", "0.5973456", "0.597002", "0.59605235", "0.59475106", "0.5940667", "0.5925081", "0.59209406", "0.59142977", "0.590039", "0.5891357", "0.58896744", "0.58896625", "0.58875626", "0.58848107", "0.5881718", "0.58779603", "0.5876426", "0.58744705", "0.5873038", "0.5872537", "0.58723027" ]
0.8100425
0
Draw the "caption" for the ShelterGrid
private void drawAgentInfo(Graphics2D graphics, int x, int y, int width, int height, Insets borders) { final int verticalSpaceBeforeText = 20; // Find the size of string in the font being used by the current // Graphics2D context. FontMetrics font = graphics.getFontMetrics(); String agentInfo = null; int textWidth = 0; int textHeight = 0; int totalTextHeight = 0; int maxTextWidth = 0; if (GRID_LEGEND_HORIZONTAL) { agentInfo = "Infected: " + simulation.getNumInfectedHumans() + " " + "Uninfected: " + simulation.getNumUninfectedAgents() + " " + "Infested: " + simulation.getNumInfestedHosts() + " " + "Uninfested: " + simulation.getNumUninfestedHosts() + " " + "Treated: " + simulation.getNumTreatedAgents(); Rectangle2D rect = font.getStringBounds(agentInfo, graphics); textWidth = (int)(rect.getWidth()); textHeight = (int)(rect.getHeight()); totalTextHeight = textHeight; maxTextWidth = textWidth; int startStringAt = (width - textWidth) / 2; // center text horizontally (max sure left side at least draws w/in // the viewport window -- i.e., x at least 0) graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), y + height + verticalSpaceBeforeText); } else { agentInfo = "Infected: " + simulation.getNumInfectedHumans(); Rectangle2D rect = font.getStringBounds(agentInfo, graphics); textWidth = (int)(rect.getWidth()); textHeight = (int)(rect.getHeight()); totalTextHeight = textHeight; maxTextWidth = textWidth; int startStringAt = (width - textWidth) / 2; graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), y + height + totalTextHeight + verticalSpaceBeforeText); agentInfo = "Uninfected: " + simulation.getNumUninfectedAgents(); rect = font.getStringBounds(agentInfo, graphics); textWidth = (int)(rect.getWidth()); textHeight = (int)(rect.getHeight()); totalTextHeight += textHeight; if (textWidth > maxTextWidth){ maxTextWidth = textWidth; } //startStringAt = (width - textWidth) / 2; graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), y + height + totalTextHeight + verticalSpaceBeforeText); agentInfo = "Infested: " + simulation.getNumInfestedHosts(); rect = font.getStringBounds(agentInfo, graphics); textWidth = (int)(rect.getWidth()); textHeight = (int)(rect.getHeight()); totalTextHeight += textHeight; if (textWidth > maxTextWidth){ maxTextWidth = textWidth; } //startStringAt = (width - textWidth) / 2; graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), y + height + totalTextHeight + verticalSpaceBeforeText); agentInfo = "Uninfested: " + simulation.getNumUninfestedHosts(); rect = font.getStringBounds(agentInfo, graphics); textWidth = (int)(rect.getWidth()); textHeight = (int)(rect.getHeight()); totalTextHeight += textHeight; if (textWidth > maxTextWidth){ maxTextWidth = textWidth; } //startStringAt = (width - textWidth) / 2; graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), y + height + totalTextHeight + verticalSpaceBeforeText); agentInfo = "Treated: " + simulation.getNumTreatedAgents(); rect = font.getStringBounds(agentInfo, graphics); textWidth = (int)(rect.getWidth()); textHeight = (int)(rect.getHeight()); totalTextHeight += textHeight; if (textWidth > maxTextWidth){ maxTextWidth = textWidth; } //startStringAt = (width - textWidth) / 2; graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), y + height + totalTextHeight + verticalSpaceBeforeText); } // Make sure the image plus text (which may be a new one loaded in) is // visible in the scroll pane. If this isn't somewhere, scrollbars // won't work in the main screen's encompassing JScrollPane. setPreferredSize( new Dimension( Math.max(width + borders.left + borders.right, maxTextWidth + 10), height + borders.top + borders.bottom + verticalSpaceBeforeText + totalTextHeight + 10)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void drawTitle(Graphics2D g2) {\n //int xloc = leftDisplay + (rightDisplay - leftDisplay)*xCenter/getWidth();\n FontRenderContext frc = g2.getFontRenderContext();\n Font font = new Font(\"Arial\", Font.BOLD, 9);\n String str = dataSet.getGeneRange().getName() + \" Chr\" + dataSet.getChromosome();\n g2.setColor(Singleton.getUserPreferences().getThumbnailTextColor());\n TextLayout tl = new TextLayout(str, font, frc);\n int x = 2;\n int y = 10;\n tl.draw(g2, x, y);\n \n /*for (Model model : viewData.getModels()) {\n System.out.println(\"Rendering with model \" + model.toString() + \"\\thaving #snps: \" + snps.size());*/\n String modelStr = viewData.getModels().get(0).toString();\n //String modelStr = dataSet.getModels().get(0).toString();\n TextLayout modelTl = new TextLayout(modelStr, font, frc);\n int INTER_TITLE_BREAK = 20;\n int modelX = x;\n int modelY = 20;\n if(tl.getBounds().getWidth() + modelTl.getBounds().getWidth() + INTER_TITLE_BREAK < getWidth()) {\n modelY = y;\n modelX = x + (int) Math.round(tl.getBounds().getWidth()) + INTER_TITLE_BREAK;\n }\n modelTl.draw(g2, modelX, modelY);\n }", "protected void drawTitle(){\n titleBox = new Rectangle(155,380, 490, 200);\n titleBorder = new Rectangle(150, 375, 500, 210);\n titleBorder.setFillColor(pink);\n titleBorder.setFilled(true);\n titleBox.setFillColor(Color.BLACK);\n titleBox.setFilled(true);\n title = new Image(206, 400, \"124-hw4/BreakoutText/breakoutText.png\");\n\n canvas.add(titleBorder);\n canvas.add(titleBox);\n canvas.add(title);\n }", "@Override\n public void figureCaption_()\n {\n }", "public void titleImage(){\r\n\t\tint x = 75;\r\n\t\tint y = 100;\r\n\t\t//Title is displayed\r\n\t\tString title = \"Ticket Master\";\r\n\t\ttitleImage = new GLabel(title,x,y);\r\n\t\ttitleImage.setColor(Color.green);\r\n\t\ttitleImage.setFont(\"Arial-100\");\r\n\t\tcanvas.add(titleImage);\r\n\t}", "public void drawCaption(String caption)\r\n\t{\r\n\t\tFont previousFont = g.getFont();\r\n\t\tColor previousColor = g.getColor();\r\n\t\tg.setFont(NumerateGame.CAPTION_FONT);\r\n\t\tg.setColor(NumerateGame.CAPTION_COLOR);\r\n\t\tg.drawString(caption,NumerateGame.CAPTION_PADDING_X,NumerateGame.WINDOW_Y-g.getFont().getSize()/2-NumerateGame.CAPTION_PADDING_Y);\r\n\t\tg.setFont(previousFont); // revert the font\r\n\t\tg.setColor(previousColor); // revert the color\r\n\t}", "protected String getGridCaption () {\n\t\treturn null ; \n\t}", "private void setupTitle(){\n\t\tJLabel title = new JLabel(quiz_type.toString()+\": \"+parent_frame.getDataHandler().getLevelNames().get(parent_frame.getDataHandler().getCurrentLevel())); \n\t\ttitle.setFont(new Font(\"Arial Rounded MT Bold\", Font.BOLD, 65));\n\t\ttitle.setForeground(new Color(254, 157, 79));\n\t\ttitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tadd(title);\n\t\ttitle.setBounds(32, 24, 1136, 119);\n\t\ttitle.setOpaque(false);\n\t}", "public void Title ()\n {\n\tTitle = new Panel ();\n\tTitle.setBackground (Color.white);\n\tchessboard (Title);\n\tp_screen.add (\"1\", Title);\n }", "private void addCaption(WritableSheet sheet, int column, int row, String s,\n\t\t\t\tint width) throws RowsExceededException, WriteException {\n\t\t\tLabel headingLabel;\n\t\t\theadingLabel = new Label(column, row, s, timesBoldUnderline);\n\t\t\tsheet.setColumnView(column, width);\n\t\t\tsheet.addCell(headingLabel);\n\t\t}", "@Override\n\tprotected void drawGuiContainerForegroundLayer(int par1, int par2)\n\t{\n\t\tfontRendererObj.drawString(invTitle, xSize / 2 - fontRendererObj.getStringWidth(invTitle) / 2, 6, 4210752);\n\t}", "public void title(){\n textFont(select,30);\n fill(150);\n text(\"PLANE SELECT\",482,72);\n fill(0);\n text(\"PLANE SELECT\",480,70);\n}", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "@Override\n public void paint(Graphics g) {\n \t Graphics2D g2 = (Graphics2D) g;\n Dimension size = getSize();\n Font font = new Font(\"Arial\", Font.PLAIN, 14);\n \n g.setFont(font);\n \n String tempString = histTitle;\n FontRenderContext frc = ((Graphics2D)g).getFontRenderContext();\n Rectangle2D boundsTemp = font.getStringBounds(tempString, frc);\n Rectangle2D boundsCond = font.getStringBounds(\"\", frc);\n int wText = Math.max((int)boundsTemp.getWidth(), (int)boundsCond.getWidth());\n int hText = (int)boundsTemp.getHeight() + (int)boundsCond.getHeight();\n int rX = (size.width-wText)/2;\n int rY = (size.height-hText)/2;\n \n g.setColor(Color.WHITE);\n g2.fillRect(0, 0, size.width, size.height);\n \n g.setColor(Color.BLACK);\n int xTextTemp = rX-(int)boundsTemp.getX(); // centres the text\n int yTextTemp = rY-(int)boundsTemp.getY();\n g.drawString(tempString, xTextTemp, 20);\n \n int maxX = size.width;\n int maxY = size.height;\n int yAxis_startX = 20; int yAxis_startY=maxY-20; int yAxis_endX=20; int yAxis_endY=20;\n int xAxis_startX = 20; int xAxis_startY=maxY-20; int xAxis_endX=maxX-20; int xAxis_endY=maxY-20;\n \n drawArrow(g, yAxis_startX, yAxis_startY, yAxis_endX, yAxis_endY, ArrowDirection.UPWARD);\n drawArrow(g, xAxis_startX, xAxis_startY, xAxis_startX+513, xAxis_endY, ArrowDirection.LEFTWARD); // what the hell. Let's fix hist width to 512 + 1 pixels (two pixels for each grayscale value)\n \n if (pierwszy==null) { // Clear the histogram view\n \t g.setColor(Color.WHITE);\n \t g.fillRect(yAxis_endX+1, yAxis_endY-1, 512, yAxis_startY-yAxis_endY-1);\n \t System.out.println(\"Cleared hist\");\n }\n else\n {\n \t BufferedImage grayScaled = new BufferedImage(pierwszy.getWidth(), pierwszy.getHeight(), BufferedImage.TYPE_BYTE_GRAY);\n \t Graphics gg = grayScaled.getGraphics();\n \t System.out.println(\"W=\"+grayScaled.getWidth()+\", H=\"+grayScaled.getHeight());\n \t gg.drawImage(pierwszy, 0, 0, null);\n \t lut = getGrayscaleHist(grayScaled);\n \t int maxBarHeight = yAxis_endY-yAxis_startY-1;\n \t paintBars(g, lut, xAxis_startX+1, xAxis_startY-1, maxBarHeight);\n }\n }", "public void drawNoticeText(int h){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,15); \r\n g.setColor(Color.red);\r\n g.setFont(font);\r\n String t=\"NOTE: All players cannot be on the same team.\";\r\n g.drawString(t,50,265);\r\n t=\"Use WASD to move.\";\r\n g.drawString(t,50,48); \r\n t=\"Press SPACE on the Start Button to Begin!\";\r\n g.drawString(t,120,h-5); \r\n \r\n font=new Font(\"SanSerif\",Font.BOLD,40); \r\n g.setColor(Color.black);\r\n g.setFont(font); \r\n t=\"Settings\";\r\n g.drawString(t,330,40); \r\n }", "private void renderTitle() {\n this.row = sheet.createRow(INT_ROW_START);\n //se crea titulos de la tabla\n this.addCell(column_++, \"CODIGO DE BARRAS\", this.cellStyleTitle());\n this.addCell(column_++, \"FECHA\", this.cellStyleTitle());\n this.addCell(column_++, \"HORA\", this.cellStyleTitle());\n this.addCell(column_++, \"MARBETE\", this.cellStyleTitle());\n this.addCell(column_++, \"PRODUCTO\", this.cellStyleTitle());\n this.addCell(column_++, \"DESCRIPCIÓN\", this.cellStyleTitle());\n this.addCell(column_++, \"LOTE\", this.cellStyleTitle());\n this.addCell(column_++, \"PESO\", this.cellStyleTitle());\n this.addCell(column_++, \"RESPONSABLE\", this.cellStyleTitle());\n }", "private void drawLeftColoumnText(SettingsClass s){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,40);\r\n g.setColor(Color.black);\r\n g.setFont(font);\r\n\r\n g.drawString(\"Players\",50,40+50*1);\r\n g.drawString(\"Match Point\",50,40+50*2);\r\n g.drawString(\"Time Limit\",50,40+50*3);\r\n g.drawString(\"Sudden Death\",50,40+50*4);\r\n \r\n // draws player numbers\r\n font=new Font(\"SanSerif\",Font.BOLD,30);\r\n g.setColor(Color.black);\r\n g.setFont(font);\r\n for(int i=0;i<s.getNumPlayers();i++){\r\n String text=\"Player \"+(char)(i+1+'0');\r\n g.drawString(text,50,300+40*i); \r\n }\r\n }", "private void drawTitleScreen(Graphics g) {\n \t\tg.setColor(new Color(0, 0x66, 0xcc, 150));\n \t\tg.fillRect(0, 60, getWidth(), getHeight() - 120);\n \t\tg.setColor(Color.WHITE);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 30));\n \t\tg.drawString(\"POP UP QUIZ!\", 50, 100);\n \t\tg.setFont(new Font(\"Courier New\", Font.BOLD, 18));\n \t\tg.drawString(\"Where you answer questions whilst cleaning your desktop!\",\n \t\t\t\t50, 120);\n \t\tg.drawString(\"Q LAM, V TONG, A VIJAYARAGAVAN\", 50, 140);\n \n \t\tg.drawString(\"Use the arrow keys to move the recycle bin.\", 50, 180);\n \t\tg.drawString(\"<Space> pauses, and <Esc> quits.\", 50, 200);\n \n \t\tg.drawImage(sprites.get(\"junk\"), 4, 200, null);\n \t\tg.drawString(\"Polish your computer by trashing junk falling \"\n \t\t\t\t+ \"from the sky!\", 50, 220);\n \n \t\tg.drawImage(sprites.get(\"sysfileLarge\"), 4, 330, null);\n \t\tg.drawImage(sprites.get(\"sysfileMedium\"), 8, 390, null);\n \t\tg.drawImage(sprites.get(\"sysfileSmall\"), 16, 440, null);\n \t\tg.drawString(\"You'll mess up your computer if you collect system files.\",\n \t\t\t\t50, 360);\n \t\tg.drawString(\"Note that they fall from the sky at different speeds.\",\n \t\t\t\t50, 390);\n \n \t\tg.drawString(\"The CPU gauge will tell you how well you're doing!\",\n \t\t\t\t50, 420);\n \t\tg.drawString(\"If your CPU usage goes over 100%, your computer goes kaput\"\n \t\t\t\t+ \" and you lose! How long can you clean?\", 50, 450);\n \n \t\tg.drawString(\"By the way, you'll have to answer questions from a barrage\"\n \t\t\t\t+ \" of pop-up as you do this.\", 50, 500);\n \t\tg.drawString(\"Serves you right for not being clean!!!\", 50, 530);\n \n \t\tg.drawString(\"PUSH START TO BEGIN_\", 50, 600);\n \t}", "public void makeTitle(JPanel upperPanel) {\n JLabel mainTitleLabel = new JLabel(\" Courses\");\n mainTitleLabel.setIcon(createImageIcon(\"./images/coursesIconWhite.png\"));\n mainTitleLabel.setFont(new Font(\"Proxima Nova\", Font.BOLD, 30));\n mainTitleLabel.setForeground(Color.white);\n mainTitleLabel.setBorder(new EmptyBorder(70, 70, 70, 0));\n upperPanel.add(mainTitleLabel, BorderLayout.CENTER);\n }", "private void showCaptionTest() {\n\t\tmCaptionTestView.setTextColor(mColor);\n\t\tmCaptionTestView.setTextSize(mCaptionSize);\n\t\tif(mStroke)\n\t\t\tmCaptionTestView.setShadowLayer(5, 0, 0, mStrokeColor);\n\t\telse\n\t\t\tmCaptionTestView.setShadowLayer(0, 0, 0, 0);\n\t}", "private void createYourMusicTitle() {\n\t\tjpYourMusic = new JPanel(new GridLayout(1,1));\n\t\tjpYourMusic.setOpaque(false);\n\t\tJLabel jlYourMusic = new JLabel(\"YOUR MUSIC\");\t\t\n\t\tjlYourMusic.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourMusic.setForeground(new Color(250,250,250));\n\t\tjpYourMusic.add(jlYourMusic);\n\t}", "String getCaption();", "@Override\n\tpublic void draw(Graphics2D g) {\n\t\tdrawWhiteField(g);\t\n\t\tgetTitlebar().draw(g, getTitle());\n\t\tdrawBlackBorder(g);\n\t\tdrawControls(g);\n\t}", "private void drawHorizontalTitle(GC gc) {\n\t\tboolean useStyleRanges = styleRanges != null;\n\n\t\tint width = getSize().x;\n\t\tint textWidth;\n\t\tif (useStyleRanges) {\n\t\t\ttextWidth = textLayout.getBounds().width;\n\t\t} else {\n\t\t\ttextWidth = gc.textExtent(text).x;\n\t\t}\n\n\t\tint x = (int) (width / 2d - textWidth / 2d);\n\t\tif (x < 0) {\n\t\t\t// this happens when window size is too small\n\t\t\tx = 0;\n\t\t}\n\n\t\tif (useStyleRanges) {\n\t\t\ttextLayout.draw(gc, x, 0);\n\t\t} else {\n\t\t\tgc.drawText(text, x, 0, true);\n\t\t}\n\t}", "private void renderCaption() {\n StringBuilder html = new StringBuilder();\n String textOrHtml;\n if (calendar.isEventCaptionAsHtml()) {\n textOrHtml = caption;\n } else {\n textOrHtml = Util.escapeHTML(caption);\n }\n\n if (caption != null && time != null) {\n html.append(\"<span class=\\\"\" + STYLENAME + \"-time\\\">\");\n html.append(calendar.getTimeFormat().format(time));\n html.append(\"</span> \");\n html.append(textOrHtml);\n } else if (caption != null) {\n html.append(textOrHtml);\n } else if (time != null) {\n html.append(\"<span class=\\\"\" + STYLENAME + \"-time\\\">\");\n html.append(calendar.getTimeFormat().format(time));\n html.append(\"</span>\");\n }\n super.setHTML(html.toString());\n }", "@Override\n protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)\n {\n this.fontRenderer.drawString(this.toolboxInv.getDisplayName().getUnformattedText(), 8, 6, 4210752);\n this.fontRenderer.drawString(this.playerInv.getDisplayName().getUnformattedText(), 8, this.ySize - 96 + 2, 4210752);\n }", "@Override\n public void draw(WinPlotterFX plotter) {\n super.draw(plotter);\n plotter.printAt(x + (base / 3.2), y + (height / 3), name);\n }", "public void showTitle(PGraphics pg, float x, float y){\r\n\t\tString title = getTitle();\r\n\t\tpg.pushStyle();\r\n\t\t\r\n\t\tpg.rectMode(PConstants.CORNER);\r\n\t\t\r\n\t\tpg.stroke(110);\r\n\t\tpg.fill(255,255,255);\r\n\t\tpg.rect(x, y + 15, pg.textWidth(title) +6, 18, 5);\r\n\t\t\r\n\t\tpg.textAlign(PConstants.LEFT, PConstants.TOP);\r\n\t\tpg.fill(0);\r\n\t\tpg.text(title, x + 3 , y +18);\r\n\t\t\r\n\t\t\r\n\t\tpg.popStyle();\r\n\t}", "public void title()\n {\n //adds the major title of the class\n JLabel title = new JLabel(\"Chemistry Class\"); \n title.setFont(new Font(\"Serif\", Font.BOLD, 40));\n title.setForeground(Color.white); \n title.setBounds(315,5,500,100); \n \n //directions and instructions\n JLabel descrip = new JLabel(\"Today in Chemistry class you will be combining various solutions\");\n descrip.setFont(new Font(\"Serif\", Font.BOLD, 20));\n descrip.setForeground(Color.white); \n descrip.setBounds(315,70,1000,100);\n \n //new line of directions and instructions\n JLabel descrip1 = new JLabel(\"to create one powerful chemical. Have fun, but also be careful.\");\n descrip1.setFont(new Font(\"Serif\", Font.BOLD, 20));\n descrip1.setForeground(Color.white); \n descrip1.setBounds(315,100,1000,100);\n \n //new line of directions and instructions\n JLabel descrip2 = new JLabel(\"You are only allowed to mix two chemicals together to get the\");\n descrip2.setFont(new Font(\"Serif\", Font.BOLD, 20));\n descrip2.setForeground(Color.white); \n descrip2.setBounds(315,130,1000,100);\n \n //new line of directions and instructions\n JLabel descrip3 = new JLabel(\"desired result. No more and no less.\");\n descrip3.setFont(new Font(\"Serif\", Font.BOLD, 20));\n descrip3.setForeground(Color.white); \n descrip3.setBounds(315,160,1000,100);\n \n //displays gif in the left corner of panel - a gif\n Icon ico = new ImageIcon(\"medMoving.gif\"); \n JLabel lab = new JLabel(ico); \n lab.setBounds(-100,80,500,200);\n \n //displays the different color as varying liquids in containers - an image\n Icon ic1 = new ImageIcon(\"colors2.png\"); \n JLabel lab1 = new JLabel(ic1); \n lab1.setBounds(25,550,400,285);\n \n //displays the beaker which will hold the liquids - an image\n Icon ic2 = new ImageIcon(\"beaker.png\"); \n JLabel lab2 = new JLabel(ic2); \n lab2.setBounds(500,400,250,300);\n \n //adds objects above to panel \n panel.add(lab); \n panel.add(lab1);\n panel.add(lab2);\n panel.add(title);\n panel.add(descrip); \n panel.add(descrip1);\n panel.add(descrip2);\n panel.add(descrip3);\n }", "public void displayTitle() {\n\t\tthis.theScreen.setFont(Preferences.TITLE_FONT);\n\t\tthis.theScreen.setColor(Preferences.TITLE_COLOR);\n\t\tthis.theScreen.drawString(Preferences.TITLE,\n\t\t\t\tPreferences.TITLE_X, Preferences.TITLE_Y);\n\t}", "@Override\r\n\tpublic void render(GameContainer gc, Renderer r) {\n\t\tr.drawTextInBox(posX, posY, width, height, color1, text);\r\n\t\t//r.noiseGen();\r\n\t}", "@Override\r\n\tpublic void BuildHead() {\n g.drawRoundRect(0, 0, 50, 20, 30, 30);\r\n\t}", "protected void drawGuiContainerForegroundLayer(int par1, int par2)\n {\n super.fontRenderer.drawString(this.name, (super.xSize - super.fontRenderer.getStringWidth(this.name)) / 2, 6, 4210752);\n super.fontRenderer.drawString(this.inv, 8, super.ySize - 96 + 2, 4210752);\n }", "@Override\n\tprotected void drawGuiContainerForegroundLayer(int par1, int par2) {\n \n\t\tif(getStyle() == Style.MODERN) {\n\t\t\tint xOffset = 0;\n\t\t\tint yOffset = 0;\n\t\t\tint xInvOffset = 0;\n\t\t\tint yInvOffset = 0;\n\t\t\t\n\t\t\tif(header == 0) {\n\t\t\t\txOffset = -15;\n\t\t\t\tyOffset = -3;\n\t\t\t}\n\t\t\tif(header == 4) {\n\t\t\t\txOffset = 30;\n\t\t\t\tyOffset = -3;\n\t\t\t}\n\t\t\tif(header_type == 3) {\n\t\t\t\txInvOffset = -8;\n\t\t\t\tyInvOffset = 3;\n\t\t\t}\n\t\t\tif(header_type == 4) {\n\t\t\t\txInvOffset = -5;\n\t\t\t\tyInvOffset = 2;\n\t\t\t}\n\t\t\t\n\t\t\tthis.fontRenderer.drawString(TextFormatting.WHITE + this.getName(), 176 / 2 - fontRenderer.getStringWidth(this.getName()) / 2 + xOffset, 5 + yOffset, 4210752);\n\t\t\tthis.fontRenderer.drawString(TextFormatting.WHITE + GCCoreUtil.translate(\"container.inventory\"), 15 + xInvOffset, this.ySize - 24*3 - 13 + yInvOffset, 4210752);\n\t\t\n\t\t} else {\n\t\t\tthis.fontRenderer.drawString(TextFormatting.DARK_GRAY + this.getName(), 176 / 2 - fontRenderer.getStringWidth(this.getName()) / 2, 5, 4210752);\n\t\t\tthis.fontRenderer.drawString(TextFormatting.DARK_GRAY + GCCoreUtil.translate(\"container.inventory\"), 8, this.ySize - 24*3 - 8, 4210752);\n\t\t}\n\t\t\n\n\t}", "private void constructTitlePanel() {\n titlePanel = new JPanel();\n titlePanel.setPreferredSize(relativeSize(0.8f, 0.03f));\n \n JLabel titleLabel = new JLabel(\"JMarkets Server Interface\");\n titleLabel.setFont(new Font(\"Arial\", Font.BOLD, 18));\n titleLabel.setForeground(new Color(102, 51, 0));\n \n titlePanel.add(titleLabel);\n }", "public void setTitle(String s){\n\t\tJLabel title = new JLabel(s);\r\n\t\tsetLayout(new BorderLayout());\r\n\t\tadd(title, BorderLayout.PAGE_START);\r\n\t}", "private JPanel getTitlePanel() {\n JPanel main = ProgramPresets.createPanel();\n main.setLayout(new FlowLayout());\n JLabel tron1 = new JLabel(ProgramPresets.TRON);\n JLabel tron2 = new JLabel(ProgramPresets.TRON);\n mainTitle = ProgramPresets.createCenteredTitle(TITLE);\n subTitle = ProgramPresets.createCenteredTitle(SUB_TITLE);\n JPanel mainSub = ProgramPresets.createPanel();\n mainSub.setLayout(new GridLayout(2, 1));\n mainSub.add(mainTitle);\n mainSub.add(subTitle);\n main.add(tron1);\n main.add(Box.createRigidArea(new Dimension(50, 0)));\n main.add(mainSub);\n main.add(Box.createRigidArea(new Dimension(50, 0)));\n main.add(tron2);\n return main;\n }", "public void display(Grid grid) {\n super.display(grid, \"C\");\n// super.displayPath(grid);\n }", "public void paint(Graphics g) {\r\n\r\n\t\t// Get the size of the container\r\n\t\tint cwidth = getSize().width;\r\n\t\tint cheight = getSize().height;\r\n\t\tint xCenter = cwidth / 2;\r\n\t\t\r\n\t\tint basinWidth = width + (2 * BORDERWIDTH);\r\n\t\tint basinHeight= height + (2 * BORDERWIDTH);\r\n\r\n\t\tint xOffset = (cwidth - basinWidth) / 2;\r\n\t\tint yOffset = YPAD;\r\n\r\n\t\t// Paint the panel\r\n\t g.setColor(panelColor);\r\n\t\tg.fillRect(0, 0, cwidth, cheight);\r\n\r\n\t\t// Paint the caption\r\n\t\tg.setFont(font);\r\n\t\tFontMetrics fm = g.getFontMetrics();\r\n\t\tint charHeight = fm.getAscent();\r\n\t\tint xText = xCenter - labelDist;\r\n\t\tint chars = caption.length();\r\n\t\tint textTotal = chars * charHeight;\r\n\t\tint yText = (cheight - textTotal) / 2;\r\n\r\n\t\tg.setColor(textColor);\r\n\t\tfor (int index=0; index < chars; index++) {\r\n\t\t\tg.drawString(caption.substring(index, index+1), xText, yText);\r\n\t\t\tyText += charHeight;\r\n\t\t}\r\n\r\n\t\t// Paint the labels, if any\r\n\t\tint yOrg = YPAD + yBarOffset + (fm.getAscent() / 2);\r\n\t\tif (hasLabels) {\r\n\t\t\txText = xCenter + labelDist;\r\n\t\t\tfor (int index=0; index < numberOfSections; index++) {\r\n\t\t\t\tString s = (String) labels.elementAt(index);\r\n\t\t\t\tint textXOffset = fm.stringWidth(s) / 2;\r\n\t\t\t\tRectangle r = bars[index];\r\n\t\t\t\tint barCenter = r.y + r.height / 2;\r\n\t\t\t\tint textYOffset = yOrg + barCenter;\r\n\t\t\t\tg.drawString(s, xText - textXOffset, textYOffset);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Paint the basin\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(xOffset, yOffset, basinWidth, basinHeight);\r\n\r\n\t\t// Paint the highlights within the basin\r\n\t\tif (hasHighlight) {\r\n\t\t\tg.setColor(highlightDarkerColor);\r\n\t\t\tg.drawLine(xOffset, yOffset, xOffset + basinWidth, yOffset);\r\n\t\t\tg.drawLine(xOffset+1, yOffset+1, xOffset + basinWidth-1, yOffset+1);\r\n\t\t\tg.drawLine(xOffset, yOffset, xOffset, yOffset+basinHeight);\r\n\t\t\tg.drawLine(xOffset+1, yOffset+1, xOffset+1, yOffset+basinHeight-1);\r\n\r\n\t\t\tg.setColor(Color.white);\r\n\t\t\tg.drawLine(xOffset+basinWidth-1, yOffset+1, xOffset+basinWidth-1, yOffset+basinHeight-1);\r\n\t\t\tg.drawLine(xOffset+basinWidth, yOffset, xOffset+basinWidth, yOffset+basinHeight);\r\n\t\t\tg.drawLine(xOffset+1, yOffset+basinHeight-1,xOffset+basinWidth-1, yOffset+basinHeight-1);\r\n\t\t\tg.drawLine(xOffset, yOffset+basinHeight, xOffset+basinWidth, yOffset+basinHeight);\r\n\t\t}\r\n\t\t// Draw the white separators\r\n\t\tint x0 = xOffset + BORDERWIDTH;\r\n\t\tint x1 = x0 + width;\r\n\t\tyOrg = YPAD + yBarOffset;\r\n\r\n\t\tg.setColor(Color.white);\r\n\t\tfor (int line=0; line < numberOfSections + 1; line++) {\r\n\t\t\tint y = lines[line] + yOrg;\r\n\t\t\tg.drawLine(x0, y , x1 , y);\r\n\t\t}\r\n\r\n\t\t// Paint the level\r\n\t\tif (value != 0) {\r\n\t\t\t// Calculate bars to light\r\n\t\t\tint barIndex = round(meterGranularity * value);\r\n\r\n\t\t\tfor (int bar=0; bar < barIndex; bar++) {\r\n\t\t\t\tint barOffset = (numberOfSections - 1) - bar;\r\n\t\t\t\tRectangle r = bars[barOffset];\r\n\t\t\t\tColor c = barColors[barOffset];\r\n\t\t\t\tg.setColor(c);\r\n\t\t\t\tg.fillRect(r.x + x0, r.y + yOrg + 1, r.width, r.height);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void drawTitle(int bookRotation, String bookString, Shape book, double bookX, double bookY, int indexBook,\r\n\t\t\tdouble bookHeight, String bColor, double bookWidth) {\r\n\r\n\t\t// select the black color for the title\r\n\t\tif (bColor.equals(\"Dark\")) {\r\n\t\t\tgraphics.setPaint(Color.white);\r\n\t\t} else {\r\n\t\t\tgraphics.setPaint(Color.black);\r\n\t\t}\r\n\r\n\t\t// draw the title with the same rotation as the book\r\n\r\n\t\tgraphics.rotate(Math.toRadians(+90 + bookRotation), bookX, bookY);\r\n\t\tint fontSize = 30;\r\n\t\tgraphics.setFont(new Font(\"TimesRoman\", Font.PLAIN, fontSize));\r\n\r\n\t\t// change the size of the title if it is too long\r\n\t\tif (graphics.getFontMetrics().stringWidth(bookString) > 6 * bookHeight / 10) {\r\n\t\t\twhile (graphics.getFontMetrics().stringWidth(bookString) > 6 * bookHeight / 10) {\r\n\t\t\t\tfontSize = fontSize - 3;\r\n\t\t\t\tgraphics.setFont(new Font(\"TimesRoman\", Font.PLAIN, fontSize));\r\n\t\t\t}\r\n\t\t}\r\n\t\tgraphics.drawString(bookString,\r\n\t\t\t\t(float) (bookX + (bookHeight - graphics.getFontMetrics().stringWidth(bookString)) / 2),\r\n\t\t\t\t(float) (bookY - bookWidth / 4));\r\n\r\n\t\tgraphics.rotate(Math.toRadians(-90 - bookRotation), bookX, bookY);\r\n\t}", "private void redrawTitles(int i, int k, double y) {\n\t\tdouble x = getWidth() / NDECADES * k;\r\n\t\tGLabel titles;\r\n\t\tif (entries.get(i).getRank(k) > 0) {\r\n\t\t\ttitles = new GLabel(entries.get(i).getName() + \" \" + entries.get(i).getRank(k), x, y);\r\n\t\t} else {\r\n\t\t\ttitles = new GLabel(entries.get(i).getName() + \" \" + \"*\", x, y);\r\n\t\t}\r\n\t\tchangeTheColor(titles, i);\r\n\t\tadd(titles);\r\n\t}", "public AgentCanvas(SimulationManager theSimulation, ShelterGrid theShelters)\n {\n simulation = theSimulation;\n shelters = theShelters;\n legend_visible = true;\n\n addMouseListener(this); // to handle mouse clicks\n \n // Create shelter grid\n gridWidth = Parameters.getDefaultGridSize();\n gridHeight = gridWidth; // We're square.\n //shelterGrid = new Shelter[gridWidth][gridHeight];\n \n updateGrid(shelters);\n }", "@Override\n protected void drawGuiContainerForegroundLayer(int par1, int par2) {\n super.drawGuiContainerForegroundLayer(par1, par2);\n this.fontRendererObj.drawString(StatCollector.translateToLocal(\"gui.Extracter.name\"), 65, 6, 4210752);\n this.fontRendererObj.drawString(StatCollector.translateToLocal(\"container.inventory\"), 8, this.ySize - 96 + 2, 4210752);\n }", "public void paintComponent(Graphics g) {\n \n super.paintComponent(g); // call superclass's paint method\n\n //this.setBackground(Color.GRAY); \n \n // Iterators & misc. variables\n int i;\n int j;\n char tempchar;\n String tempstring = null;\n \n // Length of the lines\n int rowlinelength = numcols*boxsize;\n int collinelength = numrows*boxsize;\n \n // Draw the row lines\n int yloc;\n for(i = 0;i<numrows+1;i++){\n yloc = i*boxsize;\n g.drawLine(0, yloc, rowlinelength, yloc); \n }\n \n // Draw the column lines\n int xloc;\n for(i = 0;i<numcols+1;i++){\n xloc = i*boxsize;\n g.drawLine(xloc, 0, xloc, collinelength);\n }\n \n // Set the font\n g.setFont(new Font(\"SansSerif\", Font.PLAIN, 24));\n \n // Draw the text\n for(i = 0;i<numrows;i++){\n yloc = (boxsize*i) + (int)Math.floor(boxsize/2); \n for(j = 0;j<numcols;j++){\n xloc = (boxsize*j) + (int)Math.floor(boxsize/2);\n tempchar = chargrid[i][j];\n tempstring = Character.toString(tempchar);\n g.drawString(tempstring, xloc, yloc);\n }\n }\n \n \n }", "public CloseCaption() {\r\n title = new Label();\r\n btnClose = new InfoButton();\r\n btnClose.setText(\"关闭\");\r\n this.setWidth(\"100%\");\r\n this.add(title);\r\n this.add(btnClose);\r\n btnClose.addClickHandler(closeHandler);\r\n setStyleName(\"Caption\");\r\n title.setStyleName(\"caption-title\");\r\n this.setCellHorizontalAlignment(btnClose, HasHorizontalAlignment.ALIGN_RIGHT);\r\n }", "@Override\n public String getSubtitle() {\n return \"row: \" + (getRowStart() + 1) + \" col: \" + (getColStart() + 1);\n }", "@Override\r\n\tpublic String getGridText()\r\n\t{\r\n\t\t// TODO Auto-generated method stub\\\r\n\t\tString sheet = \"\";\r\n\t\tfor(int i = 0; i <= 20; i++) { //20 rows\r\n\t\t\tfor(char j = 'A'; j <= 'L';j++) { //A through L\r\n\t\t\t\tif(i == 0) { //Creates row headers\r\n\t\t\t\t\tif(j == 'A') { // Creates letter headers\r\n\t\t\t\t\t\tsheet += \" |\"; //pads for headers\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tsheet += String.format(\"%-10c|\",j);\r\n\t\t\t\t} else{\r\n\t\t\t\t\tif(j == 'A') {\r\n\t\t\t\t\t\tsheet += String.format(\"%-3d|\", i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsheet += cells[i-1][j-'A'].abbreviatedCellText() + \"|\"; \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//enters new row\r\n\t\t\tsheet += \"\\n\";\r\n\t\t}\r\n\t\t//prints sheet\r\n\t\treturn sheet;\r\n\t}", "public void createLabels()\n {\n title = new JLabel(\"Game Over\");\n title.setForeground(Color.RED);\n title.setFont(new Font(title.getFont().getName(), Font.PLAIN, 42));\n title.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n roundLabel = new JLabel(\"CPU was infected on round \"+roundLost);\n roundLabel.setForeground(Color.RED);\n roundLabel.setFont(new Font(title.getFont().getName(), Font.PLAIN, 18));\n roundLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n }", "String getTitle(int row, int column);", "@Override\n public String getSubtitle() {\n return \"row: \" + (rowStart + 1) + \" col: \" + (colStart + 1);\n }", "private void drawStrings(Graphics g, int wid, int hei) {\n Font f = new Font(\"Font.PLAIN\", Font.BOLD, hei / 20);\n g.setFont(f);\n g.setColor(Color.white);\n g.drawString(\"LEVEL\", wid / 2 - 3 * wid / 20 - 2, hei / 10 - 2);\n g.drawString(\"TIME\", wid / 2 - 3 * wid / 20 + 5, hei / 10 * 3 - 2);\n g.drawString(\"CHIPS\", wid / 2 - 3 * wid / 20 - 2, hei / 2 - 2);\n g.drawString(\"LEFT\", wid / 2 - 3 * wid / 20 + hei / 63 - 2, hei / 2 + hei / 20 + 3);\n g.setColor(Color.black);\n g.drawString(\"LEVEL\", wid / 2 - 3 * wid / 20 + 2, hei / 10 + 2);\n g.drawString(\"TIME\", wid / 2 - 3 * wid / 20 + 9, hei / 10 * 3 + 2);\n g.drawString(\"CHIPS\", wid / 2 - 3 * wid / 20 + 2, hei / 2 + 2);\n g.drawString(\"LEFT\", wid / 2 - 3 * wid / 20 + hei / 63 + 2, hei / 2 + hei / 20 + 7);\n g.setColor(Color.red);\n g.drawString(\"LEVEL\", wid / 2 - 3 * wid / 20, hei / 10);\n g.drawString(\"TIME\", wid / 2 - 3 * wid / 20 + 7, hei / 10 * 3);\n g.drawString(\"CHIPS\", wid / 2 - 3 * wid / 20, hei / 2);\n g.drawString(\"LEFT\", wid / 2 - 3 * wid / 20 + hei / 63, hei / 2 + hei / 20 + 5);\n }", "private void createLabel(String title, int row, int col, int fontsize) {\n \tLabel label1 = new Label(title);\n \tlabel1.setFont(Font.font(myResources.getString(\"font\"), \n \t\t\tFontWeight.EXTRA_BOLD, FontPosture.ITALIC, fontsize));\n \tlabel1.setTextFill(Color.RED);\n \tstartScreen.add(label1, row, col);\n }", "void paintHeader(Graphics g);", "@Override\n public void figureCaption(SinkEventAttributes attributes)\n {\n }", "public void updateCaption(Paintable component, UIDL uidl) {\n }", "private void addTitle() {\n\t\tJXPanel titlePanel = new JXPanel();\n\t\ttitlePanel.setLayout(null);\n\t\ttitlePanel.setSize(180, 60);\n\t\ttitlePanel.setLocation(60, 10);\n\t\ttitlePanel.setToolTipText(\"www.i.hsr.ch\");\n\t\ttitlePanel.setBorder(new DropShadowBorder(new Color(0, 0, 0), 7, 0.5f, 12, true, true, true, true));\n\t\t\n\t\tJLabel title = GUIComponents.createLabel(YAETMMainView.PROGRAM, new Point(45, 12));\n\t\ttitle.setFont(new Font(\"Tahoma\", Font.BOLD, 25));\n\t\t\n\t\tJLabel titleExtend = GUIComponents.createLabel(YAETMMainView.PROGRAMEXT, new Point(10, 33));\n\t\ttitleExtend.setSize(200, 20);\n\t\ttitleExtend.setFont(new Font(\"Arial\", Font.PLAIN, 11));\n\t\t\n\t\ttitlePanel.add(titleExtend);\n\t\ttitlePanel.add(title);\n\t\tpanel.add(titlePanel);\n\t}", "public void paint(Graphics g) {\n \t\tdetailPanel.setText(getBookDetailPanelText());\n \t\tsuper.paint(g);\n \t}", "@Override\r\n public void paint (Graphics g)\r\n {\r\n super.repaint();\r\n g.setFont(new java.awt.Font(\"Brush Script MT\", Font.BOLD, 80));\r\n g.drawImage (hauntedHouse.getImage(), 0, 0, 1024, 590, null);\r\n g.setColor(Color.white);\r\n g.drawString(\"EduGames\", 360, 550 - count*2);\r\n g.drawString(\"Created and designed by\", 130, 640 - count*2);\r\n g.drawString(\"Jessica and Hannah\", 220, 730- count*2);\r\n g.drawString(\"Instructions - Hannah\", -1140+count*2, 150);\r\n g.drawString(\"Levels Menu - Jessica\", -1140+count*2, 250);\r\n g.drawString(\"High Scores - Hannah\", -1140+count*2, 350);\r\n g.drawString(\"Goodbye Screen - Hannah\", -1190+count*2, 450);\r\n g.drawString(\"Level 1 - Jessica\", 250, -1980 + count*2);\r\n g.drawString(\"Level 2 - Jessica\", 250, -1890 + count*2);\r\n g.drawString(\"Level 3 - Hannah\", 230, -1800 + count*2);\r\n g.drawString(\"Splashscreen - Jessica\", 3300 - count*2,90 );\r\n g.drawString(\"Character Graphics - Jessica and Hannah\", 3300 - count*2, 190);\r\n g.drawString(\"Background Graphics - Hannah and Jessica\", 3300- count*2, 290 );\r\n g.drawString(\"Introduction Animation - Jessica\", 3300- count *2, 390);\r\n g.drawString(\"Ending Animation - Hannah\", 3300 - count*2, 490);\r\n }", "@Override\n public void display() {\n EasyViewer.beginOverlay();\n \n glColor4d( 0,1,0,alpha.getValue() );\n glLineWidth(2); \n glBegin( GL_LINE_STRIP );\n for ( int i = 0; i < 10; i++) {\n glVertex2d( 200 + i*10, 100 +i*i );\n }\n glEnd();\n \n glColor4d( 1,0,0,alpha.getValue() );\n glPointSize(5);\n glBegin( GL_POINTS );\n for ( int i = 0; i < 10; i++) {\n glVertex2d( 200 + i*10, 100+i*i );\n } \n glEnd();\n \n \n // lets draw some 2D text\n// glColor4d( 1,1,1,1 ); \n// EasyViewer.printTextLines( \"(100,100)\", 100, 100, 12, GLUT.BITMAP_HELVETICA_10 );\n// glRasterPos2d( 200, 200 );\n// EasyViewer.printTextLines( \"(200,200)\\ncan have a second line of text\", 200, 200, 12, GLUT.BITMAP_HELVETICA_10 );\n \n EasyViewer.endOverlay();\n \n }", "private Widget getTitle(DatabaseObject databaseObject) {\n HorizontalPanel titlePanel = new HorizontalPanel();\n titlePanel.setStyleName(\"elv-Details-Title\");\n try{\n ImageResource img = InstanceTypeIconProvider.getItemIcon(databaseObject.getSchemaClass());\n String helpTitle = databaseObject.getSchemaClass().name;\n HTMLPanel helpContent = new HTMLPanel(InstanceTypeExplanation.getExplanation(databaseObject.getSchemaClass()));\n titlePanel.add(new HelpPopupImage(img, helpTitle, helpContent));\n }catch (Exception e){\n// e.printStackTrace();\n Console.error(getClass() + \": \" + e.getMessage());\n //ToDo: Enough?\n }\n HTMLPanel title = new HTMLPanel(databaseObject.getDisplayName());\n title.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);\n titlePanel.add(title);\n\n return titlePanel;\n }", "@Override\r\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\r\n\r\n // draw the notes, black and green\r\n for (INote n : no.getNotes()) {\r\n int x = (n.getStartBeat() + 2) * beatWidth;\r\n int y = ((no.highestNote().getNoteNumber() - n.getNoteNumber()) * lineHeight)\r\n + (lineHeight * 2);\r\n\r\n g.setColor(Color.BLACK);\r\n g.fillRect(x, y, beatWidth, lineHeight);\r\n\r\n for (int ii = 1; ii < n.getDuration(); ii++) {\r\n g.setColor(Color.GREEN);\r\n g.fillRect(x + (ii * beatWidth), y, beatWidth, lineHeight);\r\n }\r\n }\r\n\r\n g.setColor(Color.BLACK);\r\n\r\n //draw the row labels and lines\r\n int y1 = (lineHeight * 3) / 2;\r\n int y2 = lineHeight;\r\n\r\n g.drawLine((beatWidth * 2) - 1, (lineHeight * 2) - 1,\r\n (totalBeats + 2) * beatWidth, (lineHeight * 2) - 1);\r\n\r\n for (String row : this.rows()) {\r\n g.drawString(row, 0, y1 + g.getFontMetrics().getHeight());\r\n y1 += lineHeight;\r\n g.drawLine(beatWidth * 2, y2 + lineHeight, (totalBeats + 2) * beatWidth, y2 + lineHeight);\r\n y2 += lineHeight;\r\n g.drawLine(beatWidth * 2, y2 + lineHeight - 1,\r\n (totalBeats + 2) * beatWidth, y2 + lineHeight - 1);\r\n }\r\n g.drawLine((beatWidth * 2) - 1, y2 + lineHeight,\r\n (totalBeats + 2) * beatWidth, y2 + lineHeight);\r\n\r\n //draw the column labels and lines\r\n int x1 = -(beatWidth * 2);\r\n int x2 = -(beatWidth * 2);\r\n\r\n g.drawLine((beatWidth * 2) - 1, lineHeight * 2, (beatWidth * 2) - 1, y2 + lineHeight - 1);\r\n\r\n for (int value : this.columns()) {\r\n g.drawString(Integer.toString(value), x1 + (beatWidth * 4), g.getFontMetrics().getHeight());\r\n x1 += (beatWidth * 4);\r\n g.drawLine(x2 + (beatWidth * 4), lineHeight * 2, x2 + (beatWidth * 4), y2 + lineHeight - 1);\r\n x2 += (beatWidth * 4);\r\n g.drawLine(x2 + (beatWidth * 4) - 1, lineHeight * 2,\r\n x2 + (beatWidth * 4) - 1, y2 + lineHeight - 1);\r\n }\r\n g.drawLine(x2 + (beatWidth * 4), lineHeight, x2 + (beatWidth * 4), y2 + lineHeight - 1);\r\n\r\n // useful numbers or drawing the piano\r\n int leftMargin = (beatWidth * 4) / 5;\r\n int keyWidth = leftMargin / 2;\r\n int pianoY = y2 + lineHeight;\r\n\r\n //draw the gray piano background\r\n g.setColor(Color.LIGHT_GRAY);\r\n g.fillRect(0, pianoY,\r\n (totalBeats + 2) * beatWidth, pianoY + (lineHeight * 15) + leftMargin);\r\n\r\n //draw white piano base\r\n g.setColor(Color.WHITE);\r\n g.fillRect(leftMargin, pianoY, keyWidth * 80, lineHeight * 15);\r\n\r\n //draw white piano keys\r\n g.setColor(Color.BLACK);\r\n for (int ii = leftMargin; ii < leftMargin + (keyWidth * 80); ii += keyWidth) {\r\n g.drawRect(ii, pianoY, keyWidth, lineHeight * 15);\r\n }\r\n\r\n // draw black piano keys\r\n for (int ii = leftMargin; ii < leftMargin + (keyWidth * 80); ii += keyWidth * 8) {\r\n g.fillRect(ii + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + keyWidth + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + (keyWidth * 3) + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + (keyWidth * 4) + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n g.fillRect(ii + (keyWidth * 5) + (keyWidth / 2) + 1, pianoY, keyWidth / 2, lineHeight * 7);\r\n }\r\n\r\n // draw line at beat\r\n g.setColor(Color.RED);\r\n g.drawLine((beatWidth * 2) - 1 + (beatWidth * currentBeat), lineHeight * 2,\r\n (beatWidth * 2) - 1 + (beatWidth * currentBeat), y2 + lineHeight - 1);\r\n\r\n }", "public void drawHelpBox()\r\n\t{\r\n\t\tif (helpLines.size() > 0)\r\n\t\t{\r\n\t\t\tint x = NumerateGame.WINDOW_X-NumerateGame.HELP_BOX_PADDING_X-NumerateGame.HELP_BOX_INNER_PADDING_X*2-helpLineWidth-2;\r\n\t\t\tint y = NumerateGame.WINDOW_Y-NumerateGame.HELP_BOX_PADDING_Y-NumerateGame.HELP_BOX_INNER_PADDING_Y*2-helpLineHeight-2;\r\n\t\t\t\r\n\t\t\tsaveColorAndFont();\r\n\t\t\tg.setColor(NumerateGame.CAPTION_COLOR);\r\n\t\t\tg.setFont(NumerateGame.CAPTION_FONT);\r\n\t\t\t\r\n\t\t\t// first, draw border...\r\n\t\t\tdrawBorder(x,y,x+2+helpLineWidth+NumerateGame.HELP_BOX_INNER_PADDING_X*2,y+2+helpLineHeight+NumerateGame.HELP_BOX_INNER_PADDING_Y*2);\r\n\t\t\t\r\n\t\t\tx += 1+NumerateGame.HELP_BOX_INNER_PADDING_X;\r\n\t\t\ty += 1+NumerateGame.HELP_BOX_INNER_PADDING_Y*7/4;\r\n\t\t\t\r\n\t\t\tIterator it = helpLines.iterator();\r\n\t\t\twhile (it.hasNext())\r\n\t\t\t{\r\n\t\t\t\tString currentLine = (String)it.next();\r\n\t\t\t\tg.drawString(currentLine,x,y);\r\n\t\t\t\t//System.out.println(\"old y: \"+y);\r\n\t\t\t\ty += g.getFontMetrics().getMaxDescent()+NumerateGame.HELP_BOX_INNER_TEXT_PADDING;\r\n\t\t\t\t//System.out.println(\"new y: \"+y);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void paint(Graphics g) {\n g.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 200));\n\n g.setColor(Color.cyan);\n String GameName = \"BALLAND BAR\";\n int x_pos = 150;\n int y_pos = 300;\n int alpha = 8;\n for (int i = 0; i < GameName.length(); i++) {\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n\n g.setColor(Color.orange);\n GameName = \"GAME\";\n x_pos = 700;\n y_pos = 550;\n for (int i = 0; i < GameName.length(); i++) {\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n /*\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"G\", 650, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"A\", 800, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"M\", 950, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"E\", 1150, 300);\n\n g.setColor(Color.cyan);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"N\", 650, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"A\", 800, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"M\", 950, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"E\", 1150, 500);\n */\n }", "public void roundTitle() {\n lineDivider();\n System.out.println(\"\\n--------------------- R O U N D ---------------------\");\n System.out.println(\"\\t \" + currentRound++ + \" \\n\");\n }", "@Override\n public String toString() {\n return this.caption;\n }", "private JPanel getTitlePanel(String title)\n {\n JLabel label = new JLabel(title);\n label.setBorder(new EmptyBorder(0, 0, 0, 10));\n label.setFont(UIManager.getFont(\"TitledBorder.font\"));\n label.setForeground(UIManager\n .getColor(\"TitledBorder.titleColor\"));\n\n JPanel pnlSectionName = new TransparentPanel();\n pnlSectionName.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n c.gridx = c.gridy = 0;\n c.anchor = GridBagConstraints.LINE_START;\n c.gridwidth = 2;\n pnlSectionName.add(label, c);\n c.gridx = 2;\n c.weightx = 1;\n c.fill = GridBagConstraints.HORIZONTAL;\n pnlSectionName.add(new JSeparator(), c);\n\n JPanel pnlSection = new TransparentPanel()\n {\n @Override\n public Component add(Component comp)\n {\n if(comp instanceof JComponent)\n ((JComponent)comp).setAlignmentX(LEFT_ALIGNMENT);\n return super.add(comp);\n }\n };\n pnlSection.setLayout(new BoxLayout(pnlSection, BoxLayout.Y_AXIS));\n pnlSection.add(pnlSectionName);\n\n return pnlSection;\n }", "@Override\n\tpublic void paint(Graphics e) {\n\t\tsuper.paint(e);\n\t\te.drawString(text, 20, 20);\n\t}", "public void drawPlayerNames(Graphics g) {\n\t}", "@Override\r\n\tpublic void paint(Object g) {\n\t\tGraphics2D graphics = (Graphics2D) g;\r\n\t\t\r\n\t\t\r\n\t\tlargeFontMetrics = graphics.getFontMetrics(largeFont);\r\n\t\tmediumFontMetrics = graphics.getFontMetrics(mediumFont);\r\n\t\tsmallFontMetrics = graphics.getFontMetrics(smallFont);\t\r\n\t\tlargeHeight = largeFontMetrics.getHeight();\r\n\t\tmediumHeight = mediumFontMetrics.getHeight();\r\n\t\tsmallHeight = smallFontMetrics.getHeight();\t\r\n\t\tint firstLineYBase = largeHeight + FIRST_LINE_Y_OFFSET;\r\n\t\tint secondLineYBase = firstLineYBase + mediumHeight;\r\n\t\tint thirdLineYBase = secondLineYBase + smallHeight;\r\n\t\tint fourthLineYBase = thirdLineYBase + smallHeight;\t\t\r\n\t\tgraphics.setColor(ABOUT_BACKGROUND);\r\n\t\tgraphics.fillRect(BORDER_OFFSET,BORDER_OFFSET, drawComponent.getWidth() -BORDER_OFFSET*2, OBJECT_EDITOR_HEIGHT);\r\n\t\tgraphics.setColor(ABOUT_FOREGROUND);\r\n\t\tgraphics.setFont(largeFont);\r\n\t\tgraphics.drawString(OBJECT_EDITOR_NAME, LINE_X_OFFSET, OBJECT_EDITOR_Y + firstLineYBase);\t\r\n\t\tgraphics.setFont(mediumFont);\r\n//\t\tgraphics.drawString(\"(\" + objectEditorVersion + \": \" + objectEditorBuildTime + \")\", 90, 20);\r\n\t\tgraphics.drawString(versionDetails, LINE_X_OFFSET, OBJECT_EDITOR_Y + secondLineYBase );\t\r\n\t\tgraphics.setFont(smallFont);\r\n\t\tgraphics.drawString(AboutManager.getObjectEditorDescription().getCopyRight(), LINE_X_OFFSET, OBJECT_EDITOR_Y + thirdLineYBase);\r\n\t\tgraphics.drawString(AboutManager.getObjectEditorDescription().getPatent(), LINE_X_OFFSET, OBJECT_EDITOR_Y + fourthLineYBase);\r\n\t\tgraphics.setColor(STATUS_BACKGROUND);\r\n\t\tgraphics.fillRect(BORDER_OFFSET, STATUS_Y, drawComponent.getWidth() -BORDER_OFFSET*2, STATUS_HEIGHT);\r\n//\t\tgraphics.setColor(Color.DARK_GRAY);\r\n\t\tgraphics.setColor(STATUS_FOREGROUND);\r\n//\t\tgraphics.drawLine(0, 32, drawComponent.getWidth(), 33);\r\n\t\tgraphics.setFont(largeFont);\r\n//\t\tSystem.out.println(\"Drawstring edited object:\" + editedObject);\r\n//\r\n//\t\tSystem.out.println(\"Drawstring edited object toSTring:\" + editedObject.toString());\r\n//\t\tSystem.out.println(\"Drawstring firstLine Base:\" + firstLineYBase);\r\n\r\n//\t\tif (mainHeader != null)\r\n//\t\tgraphics.drawString( mainHeader.toString(), LINE_X_OFFSET, STATUS_Y + firstLineYBase);\r\n//\t\tSystem.out.println(\" Painting main header to string \");\r\n\r\n\t\tif (mainHeaderToString != null)\r\n\t\t\tgraphics.drawString( mainHeaderToString, LINE_X_OFFSET, STATUS_Y + firstLineYBase); // this will deadlock\r\n//\t\t\tgraphics.drawString( mainHeader.toString(), LINE_X_OFFSET, STATUS_Y + firstLineYBase);\r\n\r\n\r\n//\t\tgraphics.drawString( \"\" + editedObject + \"(\" + editorGenerationMessage + \")\", 5, 80);\r\n\t\tgraphics.setFont(mediumFont);\r\n\t\tgraphics.drawString( majorStepMessage, LINE_X_OFFSET, STATUS_Y + secondLineYBase);\r\n\t\tgraphics.setFont(smallFont);\t\t\r\n\t\tgraphics.drawString(statusMessage, LINE_X_OFFSET, STATUS_Y + thirdLineYBase);\r\n\t\tString timeString = \"(\" + numSeconds +\"s)\";\r\n\t\tgraphics.drawString( timeString, LINE_X_OFFSET, STATUS_Y + fourthLineYBase);\r\n\t\tint timeStringLength = smallFontMetrics.stringWidth(timeString);\r\n\t\tgraphics.setColor(PROGRESS_COLOR);\r\n\t\tgraphics.fillRect(LINE_X_OFFSET + timeStringLength + 3, STATUS_Y + fourthLineYBase -10, numSeconds*5, 12);\r\n\t\tgraphics.setColor(DEFINITION_BACKGROUND);\r\n\t\tgraphics.fillRect(BORDER_OFFSET, DEFINITION_Y, drawComponent.getWidth()-BORDER_OFFSET*2, drawComponent.getHeight()- DEFINITION_Y - BORDER_OFFSET);\t\r\n\t\tgraphics.setFont(largeFont);\r\n\t\tgraphics.setColor(DEFINITION_FOREGROUND);\r\n\t\tif (computerDefinition != null) {\r\n\t\tgraphics.drawString(computerDefinition.getWord(), LINE_X_OFFSET, DEFINITION_Y + firstLineYBase);\r\n\t\tgraphics.setFont(mediumFont);\r\n\t\tgraphics.drawString(computerDefinition.getMeaning(), LINE_X_OFFSET, DEFINITION_Y + secondLineYBase);\r\n\t\tgraphics.setFont(smallFont);\r\n\t\tgraphics.drawString(DEFINITIONS_BEHAVIOR_MESSAGE, LINE_X_OFFSET, DEFINITION_Y + thirdLineYBase);\r\n\t\t} else {\r\n\t\t\tgraphics.drawString(\"Missing definition file:\" + ComputerDefinitionsGenerator.DICTIONARY_FILE, LINE_X_OFFSET, DEFINITION_Y + firstLineYBase);\r\n\r\n\t\t}\r\n\t\t\r\n\t\tif (logoImage != null) {\r\n\t\t\tgraphics.drawImage(logoImage, LOGO_X, LOGO_Y, LOGO_WIDTH, LOGO_HEIGHT, drawComponent);\r\n//\t\t\tgraphics.drawImage(logoImage, LOGO_X, LOGO_Y, drawComponent);\r\n\r\n\t\t}\r\n//\t\tSystem.out.println(\"End Paint start view\");\r\n\r\n\r\n\r\n//\t\tgraphics.drawString(ComputerDefinitions.definitions[0], LINE_X_OFFSET, DEFINITION_Y + firstLineYBase);\r\n\r\n\r\n//\t\tgraphics.drawString(editorGenerationMessage, 10, 40);\r\n//\t\tgraphics.drawString(\"\" + numSeconds +\"s\", 50, 80);\r\n//\t\tgraphics.drawString(lastTraceable, 100, 100);\r\n\t}", "@Override\n protected void drawGuiContainerForegroundLayer(int par1, int par2) {\n super.drawGuiContainerForegroundLayer(par1, par2);\n drawCenteredString(fontRendererObj, StatCollector.translateToLocal(\"tile.SpawnEggCopyingMachine.name\"), this.xSize / 2, 6, 4210752);\n this.fontRendererObj.drawString(StatCollector.translateToLocal(\"container.inventory\"), 8, this.ySize - 96 + 2, 4210752);\n /*drawCenteredString(fontRendererObj, String.valueOf(tile.hadCopyedTime), 15, 0, 4210752);\n drawCenteredString(fontRendererObj, String.valueOf(tile.maxCopyTime), 15, 25, 4210752);\n drawCenteredString(fontRendererObj, String.valueOf(tile.tableBurnTime), 15, 50, 4210752);\n drawCenteredString(fontRendererObj, String.valueOf(tile.maxBurnTime), 15, 75, 4210752);*/\n\t }", "private void drawVerticalTitle(GC gc) {\n\t\tboolean useStyleRanges = styleRanges != null;\n\n\t\tint textWidth;\n\t\tint textHeight;\n\t\tif (useStyleRanges) {\n\t\t\ttextWidth = textLayout.getBounds().width;\n\t\t\ttextHeight = textLayout.getBounds().height;\n\t\t} else {\n\t\t\ttextWidth = gc.textExtent(text).x;\n\t\t\ttextHeight = gc.textExtent(text).y;\n\t\t}\n\n\t\t// create image to draw text\n\t\tImage image = new Image(Display.getCurrent(), textWidth, textHeight);\n\t\tGC tmpGc = new GC(image);\n\n\t\tif (useStyleRanges) {\n\t\t\ttextLayout.draw(tmpGc, 0, 0);\n\t\t} else {\n\t\t\ttmpGc.setForeground(getForeground());\n\t\t\ttmpGc.setBackground(getBackground());\n\t\t\ttmpGc.setFont(getFont());\n\t\t\ttmpGc.drawText(text, 0, 0);\n\t\t}\n\n\t\t// set transform to rotate\n\t\tTransform transform = new Transform(gc.getDevice());\n\t\ttransform.translate(0, textWidth);\n\t\ttransform.rotate(270);\n\t\tgc.setTransform(transform);\n\n\t\t// draw the image on the rotated graphics context\n\t\tint height = getSize().y;\n\t\tint y = (int) (height / 2d - textWidth / 2d);\n\t\tif (y < 0) {\n\t\t\ty = 0;\n\t\t}\n\t\tgc.drawImage(image, -y, 0);\n\n\t\t// dispose resources\n\t\ttmpGc.dispose();\n\t\ttransform.dispose();\n\t\timage.dispose();\n\t}", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawString(\"(\" + p.x + \", \" + p.y + \")\", p.x, p.y);\n }", "private void drawDescription(){\n image.clear();\n \n String[] words = desc.split(\" \");\n int lineCounter = 1;\n int length = 0;\n int index = 0;\n String line1 = \"\";\n String line2 = \"\";\n String line3 = \"\";\n String line4 = \"\";\n String line5 = \"\";\n \n image.setColor(DESCRIPTION_BG_COLOR);\n image.fill();\n image.setColor(DESCRIPTION_COLOR);\n \n // Determines how many words to put on each line so it fits in the image\n while(index != words.length){\n if((length += words[index].length() + 1) * DESCRIPTION_FONT.getSize() * 0.6 < image.getWidth()){\n length += words[index].length() + 1;\n if(lineCounter == 1) line1 += words[index] + \" \";\n else if(lineCounter == 2) line2 += words[index] + \" \";\n else if(lineCounter == 3) line3 += words[index] + \" \";\n else if(lineCounter == 4) line4 += words[index] + \" \";\n else if(lineCounter == 5) line5 += words[index] + \" \";\n index++;\n }\n else{\n lineCounter++;\n length = 0;\n }\n }\n \n // Determines where to draw each string so that it always stays centered\n if(lineCounter == 1) image.drawString(line1, (image.getWidth() - (int)(line1.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() / 2) + DESCRIPTION_FONT.getSize() / 4);\n else if(lineCounter == 2){\n image.drawString(line1, (image.getWidth() - (int)(line1.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 2 / 5) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line2, (image.getWidth() - (int)(line2.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 3 / 5) + DESCRIPTION_FONT.getSize() / 4);\n }\n else if(lineCounter == 3){\n image.drawString(line1, (image.getWidth() - (int)(line1.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 3 / 10) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line2, (image.getWidth() - (int)(line2.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() / 2) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line3, (image.getWidth() - (int)(line3.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 7 / 10) + DESCRIPTION_FONT.getSize() / 4);\n }\n else if(lineCounter == 4){\n image.drawString(line1, (image.getWidth() - (int)(line1.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() / 5) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line2, (image.getWidth() - (int)(line2.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 2 / 5) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line3, (image.getWidth() - (int)(line3.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 3 / 5) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line4, (image.getWidth() - (int)(line4.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 4 / 5) + DESCRIPTION_FONT.getSize() / 4);\n }\n else if(lineCounter == 5){\n image.drawString(line1, (image.getWidth() - (int)(line1.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() / 10) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line2, (image.getWidth() - (int)(line2.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 3 / 10) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line3, (image.getWidth() - (int)(line3.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() / 2) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line4, (image.getWidth() - (int)(line4.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 7 / 10) + DESCRIPTION_FONT.getSize() / 4);\n image.drawString(line5, (image.getWidth() - (int)(line5.length() * DESCRIPTION_FONT.getSize() * 0.6)) / 2, (image.getHeight() * 9 / 10) + DESCRIPTION_FONT.getSize() / 4);\n }\n setImage(image);\n }", "private static void drawTableCompenents() {\n\t\ttopColumn = new JLabel(\"location\");\r\n\t\ttopColumn.setLocation(200, 0);\r\n\t\tExtension.instance.add(topColumn);\r\n\t}", "private void createYourListsTitle() {\n\t\tjlYourLists = new JLabel(\"PLAYLISTS\");\t\t\n\t\tjlYourLists.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourLists.setForeground(new Color(250,250,250));\n\t}", "@Override\n protected final void setGraphics() {\n super.setGraphics();\n Graphics g = toDraw.getGraphics();\n g.setColor(Color.BLACK); \n \n for (int i = 0; i < choices.size(); i++) { \n g.drawString(choices.get(i).getValue(), wGap, (i + 1) * hItemBox);\n }\n }", "@Override\r\n\tpublic void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException {\n\t\tg.setColor(Color.white);\r\n\t\tg.drawString(\"Play the Game\", 450, 170);\r\n\t\tg.drawString(\"Playground\", 450, 220);\r\n\t\tg.drawString(\"License: MIT\", 780, 450);\r\n\t\tg.drawString(\"Back\", 30, 430);\r\n\t}", "@Override\n public void renderLabels(final PoseStack mat, final int mouseX, final int mouseY)\n {\n int x = 83;\n int y = 20;\n parent.font.draw(mat, I18n.get(\"pokemob.gui.berry\"), x, y, 4210752);\n parent.font.draw(mat, I18n.get(\"pokemob.gui.store\"), x, y + 10, 4210752);\n parent.font.draw(mat, I18n.get(\"pokemob.gui.face\"), x, y + 20, 4210752);\n parent.font.draw(mat, I18n.get(\"pokemob.gui.empty\"), x, y + 30, 4210752);\n parent.font.draw(mat, I18n.get(\"pokemob.gui.face\"), x, y + 40, 4210752);\n y -= 5;\n\n if (this.berry.isMouseOver(mouseX, mouseY))\n {\n this.parent.renderTooltip(mat, TComponent.translatable(\"pokemob.gui.storage.berry\"), x, y);\n }\n if (this.storage.isMouseOver(mouseX, mouseY))\n {\n this.parent.renderTooltip(mat, TComponent.translatable(\"pokemob.gui.storage.storage\"), x, y);\n }\n if (this.storageFace.isMouseOver(mouseX, mouseY))\n {\n this.parent.renderTooltip(mat, TComponent.translatable(\"pokemob.gui.storage.storageFace\"), x, y);\n }\n if (this.empty.isMouseOver(mouseX, mouseY))\n {\n this.parent.renderTooltip(mat, TComponent.translatable(\"pokemob.gui.storage.empty\"), x, y);\n }\n if (this.emptyFace.isMouseOver(mouseX, mouseY))\n {\n this.parent.renderTooltip(mat, TComponent.translatable(\"pokemob.gui.storage.emptyFace\"), x, y);\n }\n\n super.renderLabels(mat, mouseX, mouseY);\n }", "public void setCaption(String caption) {\n this.caption = caption;\n }", "public void displayText() {\n\n // Draws the border on the slideshow aswell as the text\n image(border, slideshowPosX - borderDisplace, textPosY - textMargin - borderDisplace);\n\n // color of text background\n fill(textBackground);\n\n //background for text\n rect(textPosX - textMargin, textPosY - textMargin, textSizeWidth + textMargin * 2, textSizeHeight + textMargin * 2);\n\n //draw text\n image(texts[scene], textPosX, textPosY, textSizeWidth, textSizeHeight, 0, 0 + scrolled, texts[scene].width, textSizeHeight + scrolled);\n }", "@Transient\n\tpublic String getCaption(){\n\t return \"[\" + getCode() + \"] \" + getName();\n\t}", "@Override\r\n protected void paintChildren(Graphics g) {\n ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, \r\n RenderingHints.VALUE_TEXT_ANTIALIAS_ON);\r\n super.paintChildren(g);\r\n }", "private Text createTitle() {\n\t\tText title = new Text(\"S p a c e Y\");\n\t\ttitle.setFont(new Font(\"Minecraftia\", 80));\n\t\ttitle.setStroke(Color.YELLOW);\n\t\ttitle.setStrokeWidth(2);\n\t\ttitle.setStrokeType(StrokeType.OUTSIDE);\n\t\ttitle.getTransforms().add(new Rotate(-50, 300, 200, 20, Rotate.X_AXIS));\n\t\ttitle.setX(canvas.getWidth() / 2);\n\t\ttitle.setY(canvas.getHeight() / 2);\n\t\treturn title;\n\t}", "public void paintComponent( Graphics g )\n\t\t{\n\t\t\tsuper.paintComponent( g );\n\t\t\t\n\t\t\tg.drawRect(0, 0, 29, 29); // draw square\n\t\t\tg.drawString( mark, 11, 20); // draw mark\n\t\t}", "@Override\n\tpublic void render() {\n\t\tif (this.hidden) {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper.render();\n\n\t\tthis.font.draw(Graphics.batch, this.label, this.getX(),\n\t\t\tthis.getY() + (this.getHeight() - this.font.getLineHeight()) / 2);\n\t}", "@Override\n\tprotected void paintComponent(Graphics g) {\n\t\t\n\t\tGraphics2D graphics2d = (Graphics2D) g;\n\t\tgraphics2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\tgraphics2d.setColor(new Color(255, 255, 255, 230));\n\t\tgraphics2d.fillRoundRect(1, 1, getWidth() - 2, getHeight() - 2, 20, 20);\n\t\t\n\t\tgraphics2d.setColor(Color.WHITE);\n\t\tgraphics2d.setClip(0, 0, getWidth(), 30);\n\t\tgraphics2d.fillRoundRect(1, 3, getWidth() - 2, getHeight() - 1, 20, 20);\n\t\tgraphics2d.setClip(null);\n\t\t\n\t\tgraphics2d.setStroke(new BasicStroke(2));\n\t\tgraphics2d.setColor(Color.GRAY);\n\t\tgraphics2d.drawRoundRect(1, 1, getWidth() - 2, getHeight() - 2, 20, 20);\n\t\t\n\t\tgraphics2d.setFont(new Font(\"Arial\", Font.BOLD, 16));\n\t\tgraphics2d.setColor(Color.DARK_GRAY);\n\t\tgraphics2d.drawString(title, 15, 23);\n\n\t}", "public void paintComponent(Graphics g) {\n // Setup\n Graphics2D g2d = (Graphics2D) g; int txt_h = Utils.txtH(g2d, \"0\");\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n // Paint the super\n super.paintComponent(g2d); \n\n // Get the render context and draw if it's valid\n RenderContext myrc = (RenderContext) rc;\n if (myrc != null) {\n // Draw the interactions\n drawInteractions(g2d, myrc);\n\n // Draw the edge lens\n if (mode() == UI_MODE.EDGELENS) drawEdgeLens(g2d, myrc);\n else if (mode() == UI_MODE.TIMELINE) drawTimeLine(g2d, myrc);\n\n // Draw the selection\n Set<String> sel = getRTParent().getSelectedEntities(); if (sel == null) sel = new HashSet<String>();\n if (sel.size() > 0 || sticky_labels.size() > 0) { drawSelectedEntities(g2d, myrc, sel, sticky_labels, txt_h);\n } else { String str = \"\" + mode(); modeColor(g2d); g2d.drawString(\"\" + str, 5, txt_h); }\n\n // Draw the dynamic labels -- under the mouse for context\n String dyn_labeler_copy = dyn_labeler;\n if (dyn_label_cbmi.isSelected() && \n dyn_labeler_copy != null && \n myrc.node_coord_set.containsKey(dyn_labeler_copy)) drawDynamicLabels(g2d, myrc, dyn_labeler_copy);\n\n // If graph info mode, provide additional information\n if (myrc.provideGraphInfo()) { drawGraphInfo(g2d, myrc, sel); }\n\n // Draw the vertex placement heatmap (experimental)\n if (vertex_placement_heatmap_cbmi.isSelected()) {\n\t// Make sure it's a single selection (and that it's also a vertex);\n if (sel != null && sel.size() == 1) {\n\t String sel_str = sel.iterator().next(); if (entity_to_wxy.containsKey(sel_str)) {\n\t int hm_w = myrc.getRCWidth()/4, hm_h = myrc.getRCHeight()/4;\n\t // Determine if the heatmap will be large enough to provide value\n\t if (hm_w >= 50 && hm_h >= 50) {\n\t // Determine if the heatmap needs to be recalculated (doesn't consider if the size is still correct... or if the node shifted...\n\t if (hm_sel == null || hm_sel.equals(sel_str) == false || hm_bi == null) {\n\t hm_bi = GraphUtils.vertexPlacementHeatmap(new UniGraph(graph), sel_str, entity_to_wxy, hm_w, hm_h);\n\t\thm_sel = sel_str;\n }\n Composite orig_comp = g2d.getComposite(); g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.7f)); // Partially transparent\n\t g2d.drawImage(hm_bi, myrc.getRCWidth() - hm_bi.getWidth(null), myrc.getRCHeight() - hm_bi.getHeight(null), null);\n\t g2d.setComposite(orig_comp);\n\t }\n\t }\n\t}\n }\n\n // Draw the highlighted entities\n highlightEntities(g2d, myrc);\n\n // Draw the excerpts\n drawExcerpts(g2d, myrc);\n }\n\n // Draw the help chart\n if (draw_help) drawHelp(g2d);\n }", "public static void drawContainerNames(MatrixStack matrices, ContainerScreen<?> screen, FontRenderer font, PlayerInventory inv) {\n String name = screen.getTitle().getString();\n font.drawString(matrices, name, (screen.xSize / 2f - font.getStringWidth(name) / 2f), 6.0F, 0x404040);\n font.drawString(matrices, inv.getDisplayName().getString(), 8.0F, (screen.ySize - 96 + 2), 0x404040);\n }", "public void drawInfo(Graphics g) {\n if (db == null) return;\n int zVal = zSliceSel == null ? 1 : zSliceSel.getValue();\n int tVal = tSliceSel == null ? 1 : tSliceSel.getValue();\n \n int textGap = 0;\n \n int nSlices = imp.getStackSize();\n \n // ImageStack stack = imp.getStack();\n int currentSlice = imp.getCurrentSlice();\n \n StringBuffer sb = new StringBuffer();\n sb.append(currentSlice);\n sb.append(\"/\");\n sb.append(nSlices);\n sb.append(\"; \");\n if (db.hasZ) {\n sb.append(zString);\n sb.append(\": \");\n sb.append(zVal);\n sb.append(\"/\");\n sb.append(db.numZ);\n sb.append(\"; \");\n }\n if (db.hasT) {\n sb.append(tString);\n sb.append(\": \");\n sb.append(tVal);\n sb.append(\"/\");\n sb.append(db.numT);\n sb.append(\"; \");\n }\n if (db.names != null) {\n String name = db.names[currentSlice - 1];\n if (name != null) {\n sb.append(name);\n sb.append(\"; \");\n }\n }\n \n int width = imp.getWidth(), height = imp.getHeight();\n Calibration cal = imp.getCalibration();\n if (cal.pixelWidth != 1.0 || cal.pixelHeight != 1.0) {\n sb.append(IJ.d2s(width * cal.pixelWidth, 2));\n sb.append(\"x\");\n sb.append(IJ.d2s(height * cal.pixelHeight, 2));\n sb.append(\" \");\n sb.append(cal.getUnits());\n sb.append(\" (\");\n sb.append(width);\n sb.append(\"x\");\n sb.append(height);\n sb.append(\"); \");\n }\n else {\n sb.append(width);\n sb.append(\"x\");\n sb.append(height);\n sb.append(\" pixels; \");\n }\n int type = imp.getType();\n int stackSize = imp.getStackSize();\n int size = (width * height * stackSize) / 1048576;\n switch (type) {\n case ImagePlus.GRAY8:\n sb.append(\"8-bit grayscale\");\n break;\n case ImagePlus.GRAY16:\n sb.append(\"16-bit grayscale\");\n size *= 2;\n break;\n case ImagePlus.GRAY32:\n sb.append(\"32-bit grayscale\");\n size *= 4;\n break;\n case ImagePlus.COLOR_256:\n sb.append(\"8-bit color\");\n break;\n case ImagePlus.COLOR_RGB:\n sb.append(\"RGB\");\n size *= 4;\n break;\n }\n sb.append(\"; \");\n sb.append(size);\n sb.append(\"M\");\n \n Insets insets = super.getInsets();\n g.drawString(sb.toString(), 5, insets.top + textGap);\n }", "@Override\n\tpublic void render(Canvas canvas) {\n\t\tPaint paint = new Paint();\n\t\tpaint.setColor(Color.parseColor(\"#D95B43\"));\n\t\tpaint.setTextSize(50 * Globals.scaleY);\n\t\tint width = (int)paint.measureText(this.toString(), 0, this.toString().length());\n\t\t\n\t\tthis.x = (int) ((gamePanel.width - width) / 2.0f);\n\t\t\n\t\tcanvas.drawText(this.toString(), x, y, paint);\n\t}", "public TitleLabel(String title) {\n\t\tsuper(title);\n\t\tthis.setOpaque(false);\n\t\tthis.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tthis.setVerticalAlignment(SwingConstants.CENTER);\n\t\tthis.setMinimumSize(new Dimension(IConfigGUI.TITLE_WIDTH, IConfigGUI.TITLE_HEIGHT));\n\t\tthis.setMaximumSize(new Dimension(IConfigGUI.TITLE_WIDTH, IConfigGUI.TITLE_HEIGHT));\n\t\tthis.setPreferredSize(new Dimension(IConfigGUI.TITLE_WIDTH, IConfigGUI.TITLE_HEIGHT));\n\t\tthis.setBackground(IConfigGUI.TITLE_BACKGROUND_COLOR);\n\t\tthis.setBorder(new MatteBorder(0, 0, 3, 0, IConfigGUI.BLACK_BORDER_COLOR));\n\t\tthis.setFont(new Font(IConfigGUI.FONT_LOBSTER, 1, IConfigGUI.HUGE_FONT_SIZE * 2));\n\t\t\n\t\tint nbPictures = 16;\n\t\tint wp = (int) (Math.random() * nbPictures) + 1;\n\t\t\n\t\tthis.setForeground(IConfigGUI.TITLE_COLORS[wp - 1]);\n\t\tthis.setIcon(new ImageIcon(\"resources/wallpaper/wp\" + wp + \"_cropped_resized.jpg\"));\n\t\tthis.setIconTextGap(- IConfigGUI.TITLE_WIDTH * 5 / 6);\n\t}", "void drawLabel() {\n\t\tfloat gavityValue = (int) (radius * 100);\n\t\tgavityValue /= 100;\n\t\tString label = \"gravityField \" + id + \"\\n gravity: \" + gavityValue;\n\t\tfloat labelWidth = gg.textWidth(label);\n\t\tfloat textHeight = 8;\n\n\t\tgg.pushMatrix();\n\t\tgg.translate(x, y, radius + textHeight * 3);\n\t\t// rotateZ(-rotZ/2);\n\t\tgg.pushMatrix();\n\t\tgg.rotateX(-HALF_PI);\n\t\tgg.fill(0);\n\t\tgg.rect(-labelWidth / 2 - 2, -textHeight - 1.5f, labelWidth + 4,\n\t\t\t\ttextHeight * 2 + 6);\n\t\tgg.translate(0, 0, .1f);\n\t\tgg.fill(255);\n\t\tgg.textSize(textHeight);\n\t\tgg.textAlign(CENTER);\n\t\tgg.text(label, 0, 0, 0);\n\t\tgg.popMatrix();\n\n\t\tgg.rotateZ(PI);\n\t\tgg.pushMatrix();\n\t\tgg.rotateX(-HALF_PI);\n\t\tgg.translate(0, 0, .1f);\n\t\tgg.fill(255);\n\t\tgg.textSize(textHeight);\n\t\tgg.textAlign(CENTER);\n\t\tgg.text(label, 0, 0, 0);\n\t\tgg.popMatrix();\n\t\tgg.popMatrix();\n\n\t}", "public void display() {\n\t\tdisplayColumnHeaders();\n\t\taddHyphens();\n\t\tfor (int row = 0; row < 3; row++) {\n\t\t\taddSpaces();\n\t\t\tSystem.out.print(\" row \" + row + ' ');\n\t\t\tfor (int col = 0; col < 3; col++)\n\t\t\t\tSystem.out.print(\"| \" + getMark(row, col) + \" \");\n\t\t\tSystem.out.println(\"|\");\n\t\t\taddSpaces();\n\t\t\taddHyphens();\n\t\t}\n\t}", "public void infoDisplay()\n{\n image(logo, 710, 100);\n textSize(40);\n fill(0);\n text(\"Beijing Residents Trajectory\", 600, 50);\n textSize(30);\n fill(0, 102, 153);\n text(\"Movement Analysis\", 80, 30);\n textSize(18);\n// text(\"Mode Switch\", 150, 70);\n fill(0);\n textSize(30);\n text(\"Weekday\", 340, 90);\n text(\"Weekend\", 1180, 90);\n textSize(13);\n fill(0, 102, 153); \n text(\"Read Me\", tx, ty);\n text(\"SPACE - start & pause\", tx, ty+bl);\n text(\" TAB - change basemap\", tx, ty+2*bl);\n text(\" < - backwards\", tx, ty+3*bl);\n text(\" > - forwards\", tx, ty+4*bl);\n text(\" z - zoom to layer\", tx, ty+5*bl);\n text(\"Click legend button to select transport mode\", tx, ty+6*bl);\n textSize(15);\n fill(255, 0, 0);\n text(\"CURRENT TIME \" + timeh + \":\" + timem, 740, 650);\n}", "public void display(Point where, String title)\n {\n DisplayImage(image, where, title ); \n }", "void drawBuilding() {\r\n\t\tgc.setFill(Color.BEIGE);\r\n\t\tgc.fillRect(0, 0, theBuilding.getXSize(), theBuilding.getYSize()); // clear the canvas\r\n\t\ttheBuilding.showBuilding(this); // draw all items\r\n\r\n\t\tString s = theBuilding.toString();\r\n\t\trtPane.getChildren().clear(); // clear rtpane\r\n\t\tLabel l = new Label(s); // turn string to label\r\n\t\trtPane.getChildren().add(l); // add label\r\n\r\n\t}", "private HorizontalLayout buildGridTitle() {\n\t\tgridTitle = new HorizontalLayout();\r\n\t\tgridTitle.setImmediate(false);\r\n\t\tgridTitle.setWidth(\"-1px\");\r\n\t\tgridTitle.setHeight(\"100.0%\");\r\n\t\tgridTitle.setMargin(false);\r\n\t\tgridTitle.setSpacing(true);\r\n\t\t\r\n\t\t// labelTitle\r\n\t\tlabelTitle = new Label();\r\n\t\tlabelTitle.setImmediate(false);\r\n\t\tlabelTitle.setWidth(\"-1px\");\r\n\t\tlabelTitle.setHeight(\"-1px\");\r\n\t\tlabelTitle.setValue(\"<h3>Título del libro</h3>\");\r\n\t\tlabelTitle.setContentMode(3);\r\n\t\tgridTitle.addComponent(labelTitle);\r\n\t\tgridTitle.setComponentAlignment(labelTitle, new Alignment(48));\r\n\t\t\r\n\t\t// labelEdition\r\n\t\tlabelEdition = new Label();\r\n\t\tlabelEdition.setImmediate(false);\r\n\t\tlabelEdition.setWidth(\"-1px\");\r\n\t\tlabelEdition.setHeight(\"-1px\");\r\n\t\tlabelEdition.setValue(\"Label\");\r\n\t\tgridTitle.addComponent(labelEdition);\r\n\t\tgridTitle.setComponentAlignment(labelEdition, new Alignment(33));\r\n\t\t\r\n\t\treturn gridTitle;\r\n\t}", "@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.red);\n\t\t\tg.fillRoundRect(30, 30, 240, 140, 30, 30);\n\t\t\tg.setColor(Color.gray);\n\t\t\tg.setFont(new Font(\"Monospaced\", Font.BOLD, 48));\n\t\t\tg.drawString(\"Hallo! Was wenn ich mehr Text habe?\", 65, 110);\n\t\t}", "public void displayTitleScreen() {\n System.out.println(\n \" @@@: @@@@ \\n\" +\n \" %@@: @@%@ \\n\" +\n \" @@@: @@@@ \\n\" +\n \" @@@: @@@@ \\n\" +\n \" @@@: @%%% \\n\" +\n \" @@@: %@@@ \\n\" +\n \" *@@%@@# @@@% @@@%%@ @@@@@@ @@@@ #%@%@@+ @@@@@ =@%@@@% \\n\" +\n \" @@@@@@@%@@@ @@@@@@@@@@@%@ +%@%@@@@@@@ %%@@ @@@@@@@@@%@ @@@@%@@%% %%%@@@@%%@@ \\n\" +\n \" @@@% %@@@ @@@@@* %@@@% @@@@+ %@@@* @@@@ @@@@ @@@@ @@@@ %@@@ @@@@ @@%@ \\n\" +\n \" @%@@ #@%@* @@@@ %%@ %@@@ @@%@ @@@@ %@@% @@@@ +%@% @@@@ @@@@ +%@%@ \\n\" +\n \" @@% @%@@ @@@% @@%@ @%%- @@@@ @@%@ .@%@ @@@ @@%@ %@%% @@@ @@%@@ \\n\" +\n \"+@@@ @@@@ @@%- @@%@ %%% %@%% @%@% %@@% @@@ @@%@ %%@@ @%@ @@+ \\n\" +\n \" @@@ @@@@ %@@: %@%@ %@@@ =%%@# %@%% @@@ @%@ @%%@ @@@@ @@%. \\n\" +\n \" #%@% %* #%@%# @@@: @@@@ @@@# @@ @@@@ @%%% @%%% %@@% @%@% @@@@ -@@% \\n\" +\n \" #@%@@@@@%%@%% @%@@@%%: @%%@%@%@ %@%@%@@@@@%@ @@@@@%@@ %@@%@@%%@@@@% %@@@ %@@@ -@@@%@@@@@@%# \\n\" +\n \" %@%@@%@@% @@%@@@: @@@%%% #%@@%@@%@ @@%@@@@ @@%@@@@@@ @@@@ %%%@ %@%@@%@@@ \\n\" +\n \"―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― \\n\" +\n \" Nouvelle partie \"\n );\n }", "protected void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\r\n\t\t\r\n\t\tInsets ins = this.getInsets();\r\n\t\tint varX = ins.left+5;\r\n\t\tint varY = ins.top+5;\r\n\r\n\t\tif ( pozicijaIgraca.equals(\"gore\")){\t\t\t\r\n\t\t\tfor(Card karta : karte){\r\n\t\t\t\tkarta.moveTo(varX, varY);\r\n\t\t\t\tkarta.draw(g, this);\r\n\t\t\t\tvarX = varX + karta.getWidth()+5;\r\n\t\t\t}\r\n\t\t\tg.setColor(Color.RED);\r\n\t\t\tg.drawString(imeIgraca, varX - 120, varY + 100);\r\n\t\t} else {\r\n\t\t\tfor(Card karta : karte){\r\n\t\t\t\tkarta.moveTo(varX, varY);\r\n\t\t\t\tkarta.draw(g, this);\r\n\t\t\t\tvarX = varX + karta.getWidth()/2;\r\n\t\t\t\tvarY = varY + karta.getHeight()/10;\r\n\t\t\t}\r\n\t\t\tg.setColor(Color.RED);\r\n\t\t\tg.drawString(imeIgraca, varX - 100 , varY + 90);\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public String printGrid() {\n String s = \"KEY: \\n- (sea) = no boat not shot\"\n + \"\\nM (miss) = no boat SHOT \"\n +\" \\nB (boat) = boat not shot\"\n + \"\\nH (hit) = boat SHOT\"\n + \"\\n***********************************************************\\n\";\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n s += decideLetter(grid[i][j]) + \"\\t\";\n }\n s += \"\\n\";\n }\n return s;\n }", "void drawPitShape(Graphics g, int x, int y, int width, int height, int stoneNum, String pitLabel);" ]
[ "0.6783985", "0.6643075", "0.64510036", "0.6433429", "0.6429618", "0.6420342", "0.63419217", "0.62891555", "0.6242553", "0.62325954", "0.61531633", "0.6139452", "0.6012642", "0.59761095", "0.59659475", "0.5924667", "0.58697623", "0.58303183", "0.5816367", "0.5809684", "0.57838774", "0.5780144", "0.5774436", "0.5753852", "0.57412213", "0.57390666", "0.5700623", "0.569315", "0.5676282", "0.56743675", "0.5660936", "0.5607054", "0.5589332", "0.5588317", "0.55761933", "0.5575367", "0.5571563", "0.55689025", "0.55644614", "0.5551679", "0.5550835", "0.55473137", "0.5545515", "0.5539753", "0.5538708", "0.553839", "0.5523487", "0.5520795", "0.5516146", "0.550946", "0.5493325", "0.5492022", "0.5491482", "0.54842466", "0.54834574", "0.54767144", "0.54746366", "0.5468688", "0.5466548", "0.54574317", "0.54532766", "0.54498774", "0.5426119", "0.5425554", "0.54170305", "0.5393335", "0.53920907", "0.53914523", "0.5390975", "0.5382178", "0.5380608", "0.537869", "0.5369382", "0.53679717", "0.53678775", "0.5359052", "0.53554845", "0.53529346", "0.534607", "0.5344236", "0.532404", "0.53216165", "0.5320582", "0.5316943", "0.531095", "0.53060967", "0.53016", "0.52834815", "0.52813894", "0.52773494", "0.5276761", "0.52749217", "0.5273691", "0.52707195", "0.5270545", "0.52627224", "0.5257264", "0.52569264", "0.52559745", "0.5240727", "0.5238525" ]
0.0
-1
====================================================================== private Point convertToLogical(int x, int y) This takes physical (x,y) and converts it to logical (x,y) in the context of the agent/grid size. ======================================================================
private Point convertToLogical(int x, int y) { // convert to next lowest multiple of agentGUISize using int division int agentGUISize = Parameters.getAgentGUISize(); int newX = (x - viewportX) / agentGUISize; int newY = (y - viewportY) / agentGUISize; return new Point(newX, newY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Point2D.Float toGridPoint(int x, int y) {\n return new Point2D.Float((float)((x - centreX)*scale), (float)((centreY - y)*scale));\n }", "public Point NormalizePoint(int _x, int _y){\n _x = _x - x;\n _y = _y - (y - height);\n\n _y = Math.abs(_y - height);\n\n return new Point(_x, _y);\n }", "static Boolean pointInPgm(int x, int y) {\n return (x >= 0 ) && (y >= 0) && (x <= pgmInf.width) && (y <= pgmInf.height);\n }", "private int convert2d(int x, int y) {\n return x + y * width;\n }", "private void computeXY(int x, int y){\n\n for (int x1 = x-1; x1 <= x+1; x1++) {\n for (int y1 = y-1; y1 <= y+1; y1++) {\n switch ((int)generator.cellHashes.get(ccells.cell2Hash(x1,y1))){\n case 3:\n ncells.set(x1,y1,false);\n break;\n case 1:\n ncells.set(x1,y1,true);\n break;\n case 0:\n ncells.set(x1,y1,ccells.get(x1,y1));\n break;\n }\n }\n }\n }", "public boolean onScreen(double x, double y) {\n // get the in game coordinates and real coordinates on screen\n int scaledWidth = (int) (TileDataRegister.TILE_WIDTH * scale);\n int scaledHeight = (int) (TileDataRegister.TILE_HEIGHT * scale);\n double basex = (map.getWidth() * scaledWidth) / 2.0\n + scaledWidth / 4.0;\n double basey = scaledHeight / 4.0;\n\n //reverse the math logic from the GameRenderer\n double realX = ((y - x) / 2.0) * scaledWidth + currentXOffset + xOffset + basex;\n double realY = ((y + x) / 2.0) * scaledHeight + currentYOffset + yOffset + basey;\n\n return !(realX < -0.1 * viewPortWidth - basex || realX > 1.1 * viewPortWidth + basex ||\n realY < -0.1 * viewPortHeight - basex || realY > 1.1 * viewPortHeight + basey);\n }", "public Point getTileCoordinates(int x, int y) {\n int tileWidth = this.board.getTileSet().getTileWidth() + 1;\n int tileHeight = this.board.getTileSet().getTileHeight() + 1;\n\n int tileX = Math.max(0, Math.min(x / tileWidth, this.board.getWidth() - 1));\n int tileY = Math.max(0, Math.min(y / tileHeight, this.board.getHeight() - 1));\n\n return new Point(tileX, tileY);\n }", "private Point getIso(int x, int y) {\n\t\treturn new Point(getIsoX(x, y), getIsoY(x, y)); //Could be more efficient...\n\t}", "private Point getTileCoordinates(int x, int y)\n {\n int tileWidth = this.tileset.getTileWidth() + 1;\n int tileHeight = this.tileset.getTileHeight() + 1;\n int tileCount = this.tileset.getTileCount();\n int rows = tileCount / TILES_PER_ROW + \n (tileCount % TILES_PER_ROW > 0 ? 1 : 0);\n \n int tileX = Math.max(0, Math.min(x / tileWidth, TILES_PER_ROW - 1));\n int tileY = Math.max(0, Math.min(y / tileHeight, rows - 1));\n \n return new Point(tileX, tileY);\n }", "public Coord getCoordAtPosition(int x, int y) {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n return internalLightweightCmp.getCoordFromPosition(x, y);\n }\n // TODO: Browser component\n return new Coord(0, 0);\n }\n internalNative.calcLatLongPosition(x, y);\n return new Coord(internalNative.getScreenLat(), internalNative.getScreenLon());\n }", "public Wall getWallOn(int x, int y) {\n\t\tfor (Entity e : entities) {\n\t\t\tif ((e.getX() == x) && (e.getY() == y) && e instanceof Wall) {\n\t\t\t\treturn (Wall) e;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private static Vector2f toScreenCoords(float x, float y) {\r\n\t\treturn(new Vector2f((x + 0.5f) * DisplayManager.getWidth(), y * DisplayManager.getHeight()));\r\n\t}", "public Position getPositionFromPixelCoords(int y, int x){\n if (disp.rotated){\n return new Position(y / 64 + 1, (x - 640) / -64);\n } else {\n return new Position((y - 576) / -64, x / 64);\n }\n }", "public void convert( int x, int y, Vector2f store ) {\n if ( lastXin == x && lastYin == y ) {\n store.x = lastXout;\n store.y = lastYout;\n }\n else {\n lastXin = x;\n lastYin = y;\n if ( getRenderQueueMode() == Renderer.QUEUE_ORTHO ) {\n //TODO: occlusion by other quads (JMEFrames)\n x = (int) ( x - getWorldTranslation().x + desktopWidth / 2 );\n y = (int) ( desktopHeight / 2 - ( y - getWorldTranslation().y ) );\n }\n else {\n store.set( x, y );\n DisplaySystem.getDisplaySystem().getWorldCoordinates( store, 0, pickRay.origin );\n DisplaySystem.getDisplaySystem().getWorldCoordinates( store, 0.3f, pickRay.direction ).subtractLocal( pickRay.origin ).normalizeLocal();\n\n applyWorld( bottomLeft.set( -width * 0.5f, -height * 0.5f, 0 ) );\n applyWorld( topLeft.set( -width * 0.5f, height * 0.5f, 0 ) );\n applyWorld( topRight.set( width * 0.5f, height * 0.5f, 0 ) );\n applyWorld( bottomRight.set( width * 0.5f, -height * 0.5f, 0 ) );\n\n if ( pickRay.intersectWherePlanarQuad( topLeft, topRight, bottomLeft, tuv ) ) {\n x = (int) ( ( tuv.y - 0.5f ) * width ) + desktopWidth / 2;\n y = (int) ( ( tuv.z - 0.5f ) * height ) + desktopHeight / 2;\n }\n else {\n x = -1;\n y = -1;\n }\n }\n lastYout = y;\n lastXout = x;\n\n store.set( x, y );\n }\n }", "private int getIsoX(int x, int y) {\n\t\tint rshift = (DEFAULT_VIEW_SIZE/2) - (TILE_WIDTH/2) + (x - y); //Pan camera to the right\n\t\treturn (x - y) * (TILE_WIDTH/2) + rshift;\n\t}", "public void ipLogicalOctetLayout() {\n // Choose the appropriate set\n Set<String> sel = getRTParent().getSelectedEntities(); Iterator<String> it;\n if (sel != null && sel.size() > 0) it = sel.iterator(); else it = entity_to_wxy.keySet().iterator();\n\n // Go through the set and layout the IP addresses\n double base_x = -32.0, base_y = -32.0;\n while (it.hasNext()) {\n String entity = it.next();\n if (Utils.isIPv4(entity)) {\n StringTokenizer st = new StringTokenizer(entity,\".\"); \n\tint ip0 = Integer.parseInt(st.nextToken()), mx0 = ip0/16, my0 = ip0%16,\n\t ip1 = Integer.parseInt(st.nextToken()), mx1 = ip1/16, my1 = ip1%16,\n\t ip2 = Integer.parseInt(st.nextToken()), mx2 = ip2/16, my2 = ip2%16,\n\t ip3 = Integer.parseInt(st.nextToken()), mx3 = ip3/16, my3 = ip3%16;\n entity_to_wxy.put(entity, new Point2D.Double(base_x + mx0 + mx1/16.0 + mx2/256.0 + mx3/8192.0,\n\t base_y + my0 + my1/16.0 + my2/256.0 + my3/8192.0));\n transform(entity);\n }\n }\n zoomToFit(); repaint();\n }", "private int xyTo1D(int row, int col)\n {\n validate(row, col);\n return (row-1) * gridSize + col-1;\n }", "private static Vector2f toGuiCoords(float x, float y) {\r\n\t\treturn(new Vector2f((x/DisplayManager.getWidth()) - 0.5f, y/DisplayManager.getHeight()));\r\n\t}", "private boolean onBoard(int x, int y){\n if((x<WIDTH&&y<HEIGHT)){\n if(0<=x&&0<=y){\n return true;\n }\n return false;\n }else{\n return false;\n }\n\t}", "void to_screen_2D_x_y_i (double horiz, double vert) {\n double rp = Math.toRadians(craft_pitch); \n double space_x = scalex*(offx+horiz);\n double space_y = scaley*(offy+vert);\n space_x = space_x*Math.cos(rp) - space_y*Math.sin(rp); \n space_y = space_x*Math.sin(rp) + space_y*Math.cos(rp); \n\n x[xy_i] = screen_off_x + toInt(space_x);\n y[xy_i++] = screen_off_y + toInt(space_y);\n }", "public Coordinate screenToGameCoords(final int x, final int y){\n //identify clicked camera\n Camera camera;\n int i = 0;\n do { \n camera = cameras.get(i);\n i++;\n } while (\n i < cameras.size()\n && !(x > camera.getScreenPosX() && x < camera.getScreenPosX()+camera.getScreenWidth()\n && y > camera.getScreenPosY() && y < camera.getScreenPosY()+camera.getScreenHeight())\n );\n \n //find coordinate\n return Point.toCoord(\n new Point(\n screenXtoGame(x, camera),\n screenYtoGame(y, camera),\n Chunk.getGameHeight()-1,\n true\n ),\n true,\n true\n );\n }", "public Point transform(int x, int y) {\n\t\tdouble pixelWidth = this.plainWidth / this.resolutionX;\n\n\t\tdouble rightFactor = pixelWidth * (x - (this.resolutionX / 2.0));\n\t\tdouble upFactor = pixelWidth * ((this.resolutionY / 2.0) - y);\n\n\t\treturn plainCenterPoint\n\t\t\t\t.add(upVec.mult(upFactor))\n\t\t\t\t.add(rightVec.mult(rightFactor));\n\t}", "private PointF s2c(float x, float y) {\n return new PointF(- (originX - x), originY - y);\n }", "public static Point convertPoint(Component source, int x, int y,\n\t\t\tObject object) {\n\t\tSystem.out.println(\"ERROR!\");new Exception().printStackTrace();throw new UnsupportedOperationException(\"Broken!\");\n\t}", "public Coordinate pixelToWorld(int x, int y, Envelope map) {\n if (graphics == null) {\n LOGGER.info(\"no graphics yet deffined\");\n \n return null;\n }\n \n //set up the affine transform and calculate scale values\n AffineTransform at = setUpTransform(map, screenSize);\n \n /* If we are rendering to a component which has already set up some form\n * of transformation then we can concatenate our transformation to it.\n * An example of this is the ZoomPane component of the swinggui module.*/\n if (concatTransforms) {\n graphics.getTransform().concatenate(at);\n } else {\n graphics.setTransform(at);\n }\n \n try {\n Point2D result = at.inverseTransform(new java.awt.geom.Point2D.Double(x, y),\n new java.awt.geom.Point2D.Double());\n Coordinate c = new Coordinate(result.getX(), result.getY());\n \n return c;\n } catch (Exception e) {\n LOGGER.warning(e.toString());\n }\n \n return null;\n }", "public static Vector2 LevelCoordinatesToScreen(int x, int y){\n\t\tVector2 screenPos = new Vector2();\n\t\tfloat screenX = (X_OFFSET + x)*TILE_SIZE;\n\t\tfloat screenY = (Y_OFFSET + y)*TILE_SIZE;\n\t\tscreenPos.x = screenX;\n\t\tscreenPos.y = screenY;\n\t\treturn screenPos;\n\t}", "private boolean isValidCoordinate(int x, int y) {\n return x >= 0 && x < gameState.mapSize\n && y >= 0 && y < gameState.mapSize;\n }", "public boolean inBound(int x, int y) {\n\n if (x < 0 || x >= boardSize.x || y < 0 || y >= boardSize.y) {\n return false;\n } else {\n return true;\n }\n }", "private int visible2ScreenX(float x){\n float tmp, m, b;\n m = gamePanel.getWidth() / gameControl.visibleWidth;\n b = gamePanel.getWidth() / 2;\n tmp = m*(x - gameControl.visibleX) + b;\n return (int)tmp;\n }", "public Boolean physinteractor(int x, int y) {\n \tNextMoveY = y;\n \tNextMoveX =x;\n \tList<Entity> entities = new ArrayList<Entity>();\n \tentities = dungeon.checkEntity(x, y);\n \tEntity entity = null;\n \tfor(Entity z:entities) {\n \t\tif(!z.transparency()) {\n \t\t\tentity = z;\n \t\t\tbreak;\n \t\t}\n \t}\n \tif(!(entity instanceof Wall)) {\n\t \tif(entity instanceof Door) {\n\t \t\t//System.out.println(\"BAHAHAHAHA\");\n\t \t\tif(this.getkey() !=null) {\n\t \t\t\tthis.getkey().interaction(this);\n\t \t\t}\n\t \t}else {\n\t\t \tPhysicalEntities phye = (PhysicalEntities) entity;\n\t\t \t\n\t \t\tif(phye.playeradjacent(this)) {\n\t \t\t\treturn true;\n\t \t\t}\n\t\t \n\t \t}\n \t}\n \treturn false;\n }", "public static Point worldToMap(double x, double y) {\n\t\tfinal Client client = Context.client();\n\t\tfinal Multipliers multipliers = Context.multipliers();\n\t\tfinal Player local = Players.getLocal();\n\t\tx -= Game.getBaseX();\n\t\ty -= Game.getBaseY();\n\n\t\tfinal RegionOffset localTile = local.getRegionOffset();\n\t\tfinal int calculatedX = (int) (x * 4 + 2) - (localTile.getX() << 9) / 0x80;\n\t\tfinal int calculatedY = (int) (y * 4 + 2) - (localTile.getY() << 9) / 0x80;\n\n\t\tfinal WidgetChild mm2 = WidgetComposite.getMap();\n\t\tif (mm2 == null) {\n\t\t\treturn new Point(-1, -1);\n\t\t}\n\t\tfinal int actDistSq = calculatedX * calculatedX + calculatedY * calculatedY;\n\t\tfinal int mmDist = Math.max(mm2.getWidth() / 2, mm2.getHeight() / 2) - 6;\n\n\t\tif (mmDist * mmDist >= actDistSq) {\n\t\t\tint angle = 0x3fff & (int) client.getMinimapAngle();\n\t\t\tfinal boolean setting4 = client.getMinimapSetting() * multipliers.GLOBAL_MINIMAPSETTING == 4;\n\n\t\t\tif (!setting4) {\n\t\t\t\tangle = 0x3fff & (client.getMinimapOffset() * multipliers.GLOBAL_MINIMAPOFFSET) + (int) client.getMinimapAngle();\n\t\t\t}\n\n\t\t\tint cs = Calculations.SIN_TABLE[angle];\n\t\t\tint cc = Calculations.COS_TABLE[angle];\n\n\t\t\tif (!setting4) {\n\t\t\t\tfinal int fact = 0x100 + (client.getMinimapScale() * multipliers.GLOBAL_MINIMAPSCALE);\n\t\t\t\tcs = 0x100 * cs / fact;\n\t\t\t\tcc = 0x100 * cc / fact;\n\t\t\t}\n\n\t\t\tfinal int calcCenterX = cc * calculatedX + cs * calculatedY >> 0xf;\n\t\t\tfinal int calcCenterY = cc * calculatedY - cs * calculatedX >> 0xf;\n\t\t\tfinal int screen_x = calcCenterX + mm2.getAbsoluteX() + mm2.getWidth() / 2;\n\t\t\tfinal int screen_y = -calcCenterY + mm2.getAbsoluteY() + mm2.getHeight() / 2;\n\t\t\treturn new Point(screen_x, screen_y);\n\t\t}\n\n\t\treturn new Point(-1, -1);\n\t}", "private Point getPoint(int x, int y) {\n return new Point((int) (x / lineHeight), (int) (y / lineHeight));\n }", "public Short2DPoint(int x, int y) {\n this((short) x,(short) y);\n }", "public void makePoint(String x, String y) {\n List<String> decX = putDecimal(x);\n List<String> decY = putDecimal(y);\n\n //for every string value x check if its valid, if it is, find a valid y coordinate\n for (String dx : decX) {\n if (isValid(dx)) {\n for (String dy : decY) {\n if (isValid(dy)) {\n coordinates.add(\"(\" + dx + \", \" + dy + \")\");\n }\n }\n }\n }\n }", "public void go2position(int x, int y) {\n\t\tif (getX() < x && dungeon.enemyCanGoThere(getX()+1, getY()) && ! (dungeon.findEntity(getX()+1, getY()) instanceof Enemy)) {\n\t\t\tx().set(getX()+1);\n\t\t\tsetLast(getX(), getY());\n\t\t\treturn;\n\t\t}\n\t\tif (getX() > x && dungeon.enemyCanGoThere(getX()-1, getY()) && ! (dungeon.findEntity(getX()-1, getY()) instanceof Enemy)) {\n\t\t\tx().set(getX()-1);\n\t\t\tsetLast(getX(), getY());\n\t\t\treturn;\n\t\t}\n\t\tif (getY() < y && dungeon.enemyCanGoThere(getX(), getY()+1) && ! (dungeon.findEntity(getX(), getY()+1) instanceof Enemy)) {\n\t\t\ty().set(getY()+1);\n\t\t\tsetLast(getX(), getY());\n\t\t\treturn;\n\t\t}\n\t\tif (getY() > y && dungeon.enemyCanGoThere(getX(), getY()-1) && ! (dungeon.findEntity(getX(), getY()-1) instanceof Enemy)) {\n\t\t\ty().set(getY()-1);\n\t\t\tsetLast(getX(), getY());\n\t\t\treturn;\n\t\t}\n\t}", "public Point scaleToGraphCanvasCoords(int x, int y);", "public Point scaleToGraphCanvasCoords(double x, double y);", "boolean handleInput(float x, float y){\n return r1_.x_ <= x && r2_.x_ >= x && r1_.y_ >= y && r2_.y_ <= y;\n }", "private int getIsoY(int x, int y) {\n\t\treturn (x + y) * (TILE_HEIGHT/2);\n\t}", "public PERMEABILITY getMapElementXY(final int x, final int y) {\r\n\t\t Point point = new Point(x, y);\r\n\t\t for(IMobile mEntity : this.getmEntity()) {\r\n\t\t if (mEntity.getPosition().equals(point))\r\n\t\t return mEntity.getPermeability();\r\n\t\t }\r\n\t\t \r\n\t\t if(this.getCharacter().getPosition().equals(point))\r\n\t\t \treturn this.getCharacter().getPermeability();\r\n\t\t \r\n\t\t return this.getOnTheMapXY(x, y).getPermeability();\r\n\t\t }", "public void pointToXY(int x, int y) {\n PVector targetVector;\n targetVector = new PVector(x, y);\n direction = (p.degrees(p.atan2(pos.x - (targetVector.x), pos.y - (targetVector.y))))+90;\n if (direction < 0) direction += 360;\n }", "public Point convertPointCoordinate(Point point)\n\t{\n\t\tpoint.y = this.getHeight() - point.y;\n\t\treturn point;\n\t}", "public boolean translateSpace( int x, int y )\n\t{\n\t\tboolean success = false;\n\t\t\n\t\t// If translation is horizontal\n\t\tif ( x != 0 )\n\t\t{\n\t\t\tif ( x > 0 && x0 < 2) // Translate right, can't if x0 > 1\n\t\t\t{\n\t\t\t\tgrid[x0][y0] = grid[x0+1][y0];\n\t\t\t\tgrid[x0+1][y0] = 0;\n\t\t\t\t\n\t\t\t\tx0 = x0+1;\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t\telse if ( x < 0 && x0 > 0 ) // Translate left, can't if x0 < 1\n\t\t\t{\n\t\t\t\tgrid[x0][y0] = grid[x0-1][y0];\n\t\t\t\tgrid[x0-1][y0] = 0;\n\t\t\t\t\n\t\t\t\tx0 = x0-1;\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t} // If translation is vertical\n\t\telse if ( y != 0 ) // Can't translate diagonal, so if x != 0, then y wont be translated no matter\n\t\t{\t\t\t\t // what it is, and visa versa\n\t\t\tif ( y > 0 && y0 < 2) // Translate down, can't if y0 > 1\n\t\t\t{\n\t\t\t\tgrid[x0][y0] = grid[x0][y0+1];\n\t\t\t\tgrid[x0][y0+1] = 0;\n\t\t\t\t\n\t\t\t\ty0 = y0+1;\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t\telse if ( y < 0 && y0 > 0 ) // Translate up, cant if y0 < 1\n\t\t\t{\n\t\t\t\tgrid[x0][y0] = grid[x0][y0-1];\n\t\t\t\tgrid[x0][y0-1] = 0;\n\t\t\t\t\n\t\t\t\ty0 = y0-1;\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn success;\n\t}", "public boolean inGrid(int y, int x) {\n\n if (y > 0 && x > 0 && y < height - 1 && x < width - 1) {\n return true;\n }\n\n return false;\n }", "DeviceCoordinate transformWorldToScreen(final double x, final double y);", "public Point(int x, int y) {\r\n /* DO NOT MODIFY */\r\n this.x = x;\r\n this.y = y;\r\n\t\tSLOPE_ORDER = new SlopeOrderComparator(this);\r\n }", "private boolean isInsideBoard(int x, int y){\n if(x < 0 || x > getWidth() - 1 || y < 0 || y > getHeight() - 1)\n return false;\n\n return true;\n }", "public boolean legalOrNot(int x,int y) {\n\t\tif((x == 14 && y ==2) || (x== 2 && y == 14)) {\n\t\t\treturn true;\n\t\t}else if((x-y) == 1 || (x-y) == -1 ) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isPointInside(int x, int y) {\r\n if (Integer.compare(x, _xLeft) <= 0) {\r\n return false;\r\n }\r\n \r\n if (Integer.compare(x, _xRight) >= 0) {\r\n return false;\r\n }\r\n \r\n if (Integer.compare(y, _yTop) <= 0) {\r\n return false;\r\n }\r\n \r\n if (Integer.compare(y, _yBottom) >= 0) {\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "public boolean getWall(String direction, int x, int y) {\n\t\tif (x < size && x >= 0 && y < size && y >= 0) {\n \t\t\tif (direction.equalsIgnoreCase(\"north\")) {\n \t\t\t\treturn north[x][y];\n \t\t\t}\n \t\t\tif (direction.equalsIgnoreCase(\"south\")) {\n \t\t\t\treturn south[x][y];\n \t\t\t}\n \t\t\tif (direction.equalsIgnoreCase(\"east\")) {\n \t\t\t\treturn east[x][y];\n \t\t\t}\n \t\t\tif (direction.equalsIgnoreCase(\"west\")) {\n \t\t\t\treturn west[x][y];\n \t\t\t}\n \t\t\tSystem.out.println(\"Error with getWall - invalid direction!\");\n \t\t}\n \t\telse {\n \t\t\tSystem.out.println(\"Error with getWall - index out of bounds!\");\n \t\t}\n \t\treturn false;\n \t}", "private boolean isValid(int x,int y){\n\t\treturn x > -1 && y > -1 && x < width && y<height;\n\t }", "public Point(int x, int y) {\n /* DO NOT MODIFY */\n this.x = x;\n this.y = y;\n SLOPE_ORDER = new SlopeOrder();\n }", "public boolean withinWorld(int x, int y) {\n\t\treturn x >= 0 && x < MAX_WIDTH && y >= 0 && y < MAX_HEIGHT;\n\t}", "protected double xPixelToPosition(double pixel) {\r\n// double axisV = xPositionToPixel(originX);\r\n// return (pixel - axisV) * (maxX - minX) / (double) getWidth();\r\n return minX + pixel * (maxX - minX) / getWidth();\r\n }", "private int convert(int x, int y) {\n\treturn (150 * y) + x;\n }", "@Override\r\n\tpublic boolean possibleMove(int x, int y) {\n\t\tif (this.sameColor(Board.getPiece(x, y)) == true) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (Math.abs(this.getY() - y) == 2 && Math.abs(this.getX() - x) == 1\r\n\t\t\t\t|| Math.abs(this.getY() - y) == 1 && Math.abs(this.getX() - x) == 2) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "void from_screen_x_y_norot (Point3D p, int x, int y, double offx, double scalex, double offy, double scaley, int screen_off_x, int screen_off_y) { \n // screen_off_x + toInt(scalex*(offx+p.x)) = x ==>\n // scalex*p.x = x - screen_off_x - scalex*offx;\n p.x = (x - screen_off_x - scalex*offx)/scalex;\n p.y = (y - screen_off_y - scaley*offy)/scaley;\n }", "public IEntity getOnTheMapXY(int x, int y) {\r\n\t\t// we check if we are not at the edge of the map\r\n\t\t if(x >= 0 && x < Map.getWidth() && y >= 0 && y < Map.getHeight())\r\n\t\t \treturn this.map[x][y];\r\n\t\t else\r\n\t\t \treturn this.map[0][0];\r\n\t\t \r\n\t}", "public Point2d(double x, double y) {\r\n\t\t this.xCoord = x;\r\n\t\t this.yCoord = y;\r\n\t }", "public double pointOnLineT(int x, int y)\r\n {\r\n if (x == c0.x && y == c0.y)\r\n {\r\n return 0;\r\n }\r\n if (x == c1.x && y == c1.y)\r\n {\r\n return 1;\r\n }\r\n \r\n int dx = c1.x - c0.x;\r\n int dy = c1.y - c0.y;\r\n \r\n if (Math.abs(dx) > Math.abs(dy))\r\n {\r\n return (x - c0.x) / (double)dx;\r\n }\r\n else\r\n {\r\n return (y - c0.y) / (double)dy;\r\n }\r\n }", "public ArrayList<Entity> checkGrid(int x, int y) {\n \tArrayList<Entity> entitiesOnGrid = new ArrayList<Entity>();\n \tfor (Entity e: entities) {\n \t\tif (e != null) {\n \t\tif (e.getX() == x && e.getY() == y) {\n \t\t\tentitiesOnGrid.add(e);\n \t\t} \t\t\t\n \t\t}\n \t}\n \treturn entitiesOnGrid;\n }", "private void findGrid(int x, int y) {\n\tgx = (int) Math.floor(x / gs);\n\tgy = (int) Math.floor(y / gs);\n\n\tif (debug){\n\tSystem.out.print(\"Actual: (\" + x + \",\" + y + \")\");\n\tSystem.out.println(\" Grid square: (\" + gx + \",\" + gy + \")\");\n\t}\n }", "public static Rectangle getScreenBoundsForPoint(int x, int y) {\n GraphicsEnvironment env = GraphicsEnvironment.\n getLocalGraphicsEnvironment();\n GraphicsDevice[] devices = env.getScreenDevices();\n for (int i = 0; i < devices.length; i++) {\n GraphicsConfiguration[] configs = devices[i].getConfigurations();\n for (int j = 0; j < configs.length; j++) {\n Rectangle gcBounds = configs[j].getBounds();\n if (gcBounds.contains(x, y)) {\n return gcBounds;\n }\n }\n }\n // If point is outside all monitors, default to default monitor (?)\n return env.getMaximumWindowBounds();\n }", "public PrecisePoint(double x, double y) {\n this.x = x;\n this.y = y;\n }", "private boolean closeToBorder( int x , int y , int tolerance , Homography2D_F32 currToWorld) {\n\n\t\tPoint2D_F32 pt = new Point2D_F32(x,y);\n\t\tHomographyPointOps_F32.transform(currToWorld, pt, pt);\n\n\t\t\n\t\tif( pt.x < tolerance || pt.y < tolerance )\n\t\t\treturn true;\n\t\treturn( pt.x >= outputWidth-tolerance || pt.y >= outputHeight-tolerance );\n\t}", "public abstract boolean getCell(int x, int y);", "public Point getGridCoordinates(){\n try {\n return (new Point(x / MapManager.getMapTileWidth(), y / MapManager.getMapTileHeight()));\n } catch (Exception e){\n System.out.print(\"Error while getting grid coordinates.\");\n throw e;\n }\n }", "public static com.topcoder.diagraminterchange.Point createDiagramInterchangePoint(int x, int y) {\n com.topcoder.diagraminterchange.Point pt = new com.topcoder.diagraminterchange.Point();\n pt.setX(x);\n pt.setY(y);\n return pt;\n }", "public boolean checkCoordinatesInRange(int x1, int y1) {\n\n if (x1 < minRow || y1 < minCol || x1 > maxRow || y1 > maxCol) {\n return false;\n }\n\n return true;\n }", "@Override\n\tprotected void moveto(World world, double x, double y)\n\t{\n\t\t// If the destination is not blocked by terrain, move there\n\t\tif (!world.terrainBlocks(x + halfPlayerWidth(), y - halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x - halfPlayerWidth(), y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x + halfPlayerWidth(), y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x - halfPlayerWidth(), y - halfPlayerHeight()))\n\t\t{\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}\n\t\t// Else: Check vertically collision\n\t\telse if (!world.terrainBlocks(this.x + halfPlayerWidth(), y - halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(this.x - halfPlayerWidth(), y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(this.x + halfPlayerWidth(), y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(this.x - halfPlayerWidth(), y - halfPlayerHeight()))\n\t\t{\n\t\t\tthis.y = y;\n\n\t\t\tthis.drawMissile = false;\n\t\t}\n\t\t// Else: Check horizontally collision\n\t\telse if (!world.terrainBlocks(x + halfPlayerWidth(), this.y - halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x - halfPlayerWidth(), this.y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x + halfPlayerWidth(), this.y + halfPlayerHeight()) &&\n\t\t\t\t!world.terrainBlocks(x - halfPlayerWidth(), this.y - halfPlayerHeight()))\n\t\t{\n\t\t\tthis.x = x;\n\n\t\t\tthis.drawMissile = false;\n\t\t}\n\t}", "private int inRange(int x, int y) {\n\t\tif (x > 3 && y > 3 && x < max_x - 3 && y < max_y - 3) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "protected IPoint scalePointIntoCoordinates(IPoint point) {\n\t\t\n\t\tdouble newX = point.getX() / getPixelsPerX();\n\t\tdouble newY = point.getY() / getPixelsPerY();\n\t\treturn new Point(newX, newY, point.getTime());\n\t}", "default int gridToSlot(int x, int y) {\n return y * 9 + x;\n }", "public Point getPosition(int x, int y) {\r\n return new Point(getWidth()/board.getWidth() * x, getHeight()/board.getHeight() * y);\r\n }", "public Point2D(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public Coords bound(final Coords point)\r\n {\r\n int xx = point.getX();\r\n int yy = point.getY();\r\n if(xx < x)\r\n {\r\n xx = x;\r\n }\r\n if(xx > x + width)\r\n {\r\n xx = x + width;\r\n }\r\n if(yy < y)\r\n {\r\n yy = y;\r\n }\r\n if(yy > y + height)\r\n {\r\n yy = y + height;\r\n }\r\n return new Coords(xx, yy);\r\n }", "public DecimalPosition getNearestPoint(DecimalPosition point) {\n // Fist check end point\n int endXCorrection = width() > 0 ? 1 : 0;\n int endYCorrection = height() > 0 ? 1 : 0;\n\n if (point.getX() <= start.getX() && point.getY() <= start.getY()) {\n return new DecimalPosition(start.copy());\n } else if (point.getX() >= end.getX() && point.getY() >= end.getY()) {\n return new DecimalPosition(end.sub(endXCorrection, endYCorrection));\n } else if (point.getX() <= start.getX() && point.getY() >= end.getY()) {\n return new DecimalPosition(start.getX(), end.getY() - endYCorrection);\n } else if (point.getX() >= end.getX() && point.getY() <= start.getY()) {\n return new DecimalPosition(end.getX() - endXCorrection, start.getY());\n }\n\n // Do projection\n if (point.getX() <= start.getX()) {\n return new DecimalPosition(start.getX(), point.getY());\n } else if (point.getX() >= end.getX()) {\n return new DecimalPosition(end.getX() - endXCorrection, point.getY());\n } else if (point.getY() <= start.getY()) {\n return new DecimalPosition(point.getX(), start.getY());\n } else if (point.getY() >= end.getY()) {\n return new DecimalPosition(point.getX(), end.getY() - endYCorrection);\n }\n\n throw new IllegalArgumentException(\"The point is inside the rectangle. Point: \" + point + \" rectangel: \" + this);\n }", "public boolean process( int x , int y ) {\n\t\tvisualToDepth.compute(x, y);\n\n\t\tint depthX = (int)visualToDepth.distX;\n\t\tint depthY = (int)visualToDepth.distY;\n\n\t\tif( depthImage.isInBounds(depthX,depthY) ) {\n\t\t\t// get the depth at the specified location\n\t\t\tdouble value = lookupDepth(depthX, depthY);\n\n\t\t\t// see if its an invalid value\n\t\t\tif( value == 0 )\n\t\t\t\treturn false;\n\n\t\t\t// convert visual pixel into normalized image coordinate\n\t\t\tp2n.compute(x,y,norm);\n\n\t\t\t// project into 3D space\n\t\t\tworldPt.z = value*depthScale;\n\t\t\tworldPt.x = worldPt.z*norm.x;\n\t\t\tworldPt.y = worldPt.z*norm.y;\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private Tetrominoe shapeAt(int x, int y) {\n return board[(y * BOARD_WIDTH) + x];\n }", "private int xyTo1D(final int row, final int col) {\n return (row - 1) * size + (col - 1);\n }", "public Point2D_2_9(int x, int y) {\n\t this.x = x;\n\t this.y = y;\n\t }", "private Building convertCardToBuildingByCoordinates(int cardNodeX, int cardNodeY, int buildingNodeX,\n int buildingNodeY) {\n return world.convertCardToBuildingByCoordinates(cardNodeX, cardNodeY, buildingNodeX, buildingNodeY);\n }", "public java.awt.geom.Point2D.Double transformedPoint(double x, double y)\n {\n double[] position = {x,y}; \n getGraphicsState().getCurrentTransformationMatrix().createAffineTransform().transform(position, 0, position, 0, 1);\n position[1] = fixY(position[1]);\n\n\t_pageAffineTransform.transform(position,0, position, 0, 1);\n return new Point2D.Double(position[0],position[1]);\n }", "public boolean getSwitch(int x, int y) {\n\t\tif (x < size && x >= 0 && y < size && y >= 0) {\n \t\t\tif (switches[0].x == x && switches[0].y == y) return true;\n \t\t\tif (switches[1].x == x && switches[1].y == y) return true;\n \t\t\tif (switches[2].x == x && switches[2].y == y) return true;\n \t\t\tif (switches[3].x == x && switches[3].y == y) return true;\n \t\t\treturn false;\n \t\t}\n \t\telse {\n \t\t\tSystem.out.println(\"Error with getSwitch - index out of bounds!\");\n \t\t}\n \t\treturn false;\n \t}", "public void wrap(int xLow, int xHigh, int yLow, int yHigh)\n\t{\n\t\tif(x >= xHigh)\n\t\t{\n\t\t\tx = x - xHigh;\n\t\t}\n\t\telse if(x <= xLow)\n\t\t{\n\t\t\tx = x + xHigh;\n\t\t}\n\t\telse if(y >= yHigh)\n\t\t{\n\t\t\ty = y - yHigh;\n\t\t}\n\t\telse if(y <= yLow)\n\t\t{\n\t\t\ty = y + yHigh;\n\t\t}\n\t}", "public Short2DPoint(short x, short y) {\n this.x = x;\n this.y = y;\n }", "@Override\n\tpublic Pixel getPixel(int x, int y) {\n\t\tif(x<0 || y<0 || x >= width || y>=height) {\n\t\t\tthrow new IllegalArgumentException(\"in valid input\");\n\t\t}else {\n\t\t\treturn this.value;\n\t\t}\n\t}", "public Point2D(double x, double y){\n this.x = x;\n this.y = y;\n }", "public boolean apply(int x0, int y0, int x, int y);", "@Override\n public boolean isPointInPath(double x, double y) {\n return graphicsEnvironmentImpl.isPointInPath(canvas, x, y);\n }", "@Override\n public boolean canMoveTo(int x, int y, Board board) {\n \n if (x > this.x && y > this.y){ //move up to the right\n if(lowCh(\"uright\",xt+1,yt+1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else if (x > this.x && y < this.y){ //move down to the right\n if(lowCh(\"dright\",xt+1,yt-1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else if (x < this.x && y > this.y){ //move up to the left\n if (lowCh(\"uleft\",xt-1,yt+1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else if (x < this.x && y < this.y){ //move down to the left\n if (lowCh(\"dleft\",xt-1,yt-1,x,y,board) == true)\n {\n return canTake(x,y,board) == true;\n }else{\n return false;\n }\n } else {\n return false;\n }\n }", "public PortView getInPortViewAt(int x, int y) {\r\n \t\treturn (PortView) graph.getGraphLayoutCache().getMapping(graph.getInPortAt(x, y), false);\r\n \t}", "public abstract boolean containsPoint(int x, int y);", "public Coordinates shiftCoordinates(int x, int y) throws OutOfBoardException{\n if(this.x + x < 0 || this.y + y < 0){\n throw new OutOfBoardException();\n }\n return new Coordinates(this.x + x, this.y + y);\n }", "public int getXY(int x, int y);", "public boolean validMove(int x, int y){\n if(!super.validMove(x, y)){\n return false;\n }\n if(((Math.abs(x - this.x()) == 2) && (Math.abs(y - this.y()) == 1))\n || ((Math.abs(x - this.x()) == 1) && (Math.abs(y - this.y()) == 2))){\n return true;\n }else{\n return false;\n }\n }", "public boolean situatedInside(double x, double y) {\n if(y>this.bottomleft.x && y<this.topright.x && x <this.topright.y && x > this.bottomleft.y)\n return true;\n else\n return false;\n }", "public boolean canMoveTo(int x, int y) {\n if (x < 0 || x >= dungeon.getWidth() || y < 0 || y >= dungeon.getHeight() || characterStatus.equals(CharacterStatus.DEAD))\n return false;\n boolean canMove = true;\n for (Entity entity : dungeon.getEntities(x, y)) {\n if (entity instanceof FieldObject)\n ((FieldObject) entity).interact(this);\n if (entity instanceof FieldObject && ((FieldObject) entity).isObstacle()) {\n canMove = false;\n break;\n }\n }\n return canMove;\n }", "public boolean isWalkAbleTile(int x, int y) {\n\t\tfor (Entity e : entities) {\n\t\t\tif (e.getX() >> 4 == x && e.getY() >> 4 == y)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean getGrid(int x, int y) {\n\t\tif ((x < 0) || (x > width)) {\n\t\t\treturn true;\n\t\t} else if ((y < 0) || (y > height)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn grid[x][y]; // YOUR CODE HERE\n\t\t}\n\t}" ]
[ "0.6018169", "0.57733667", "0.57000154", "0.56828517", "0.56770146", "0.5590838", "0.554546", "0.5510138", "0.54110825", "0.54046685", "0.5381974", "0.53755164", "0.5360269", "0.53579956", "0.53448606", "0.5325862", "0.53222674", "0.5312264", "0.53071856", "0.52952254", "0.5270183", "0.52568966", "0.52509683", "0.52472097", "0.523483", "0.5227737", "0.5220609", "0.5216193", "0.52020454", "0.51933056", "0.518246", "0.518043", "0.5175703", "0.51730937", "0.516279", "0.5156175", "0.5144273", "0.5102379", "0.51014733", "0.5095925", "0.5091866", "0.50910985", "0.50902116", "0.50853044", "0.5080474", "0.50780547", "0.5075289", "0.50581485", "0.50541514", "0.50447875", "0.50420004", "0.5039632", "0.5034997", "0.5030575", "0.5028482", "0.50221646", "0.50168395", "0.5011554", "0.50076616", "0.50074583", "0.49995843", "0.49895105", "0.498365", "0.49797326", "0.49715114", "0.49659106", "0.49429533", "0.4938324", "0.4923717", "0.49200463", "0.49070334", "0.49067056", "0.4898223", "0.48977765", "0.48966488", "0.4894264", "0.48924088", "0.48815814", "0.48771173", "0.48750228", "0.48744753", "0.48687443", "0.48583844", "0.48558486", "0.48557368", "0.48471913", "0.4846484", "0.48438898", "0.48427302", "0.48420793", "0.48388946", "0.48365045", "0.48360857", "0.4834883", "0.4831449", "0.48211443", "0.48210958", "0.48177645", "0.4816673", "0.4814359" ]
0.8615459
0
====================================================================== private void inspectShelterAt(Point p) ======================================================================
private void inspectShelterAt(Point p) { // Ignore clicks outside the actual grid of shelters int col = (int) p.getX(); if ( col < 0 ) return; if ( col >= shelters.getGridWidth() ) return; int row = (int) p.getY(); if ( row < 0 ) return; if ( row >= shelters.getGridHeight() ) return; Shelter s = shelters.getShelterAt( col, row );//shelterGrid[col][row]; if (s != null) { // use hash map to see if the window is already created, and if so, // just focus; otherwise, create a new inspector window double time = simulation.getTime(); String id = s.getRow() + "," + s.getCol() + " " + time; ShelterInspector window = ShelterInspector.windowList.get(id); if (window == null) { window = new ShelterInspector(s, time, id); ShelterInspector.windowList.put(id, window); } window.setVisible(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseClicked(MouseEvent e)\n {\n Point p = convertToLogical(e.getX(), e.getY());\n inspectShelterAt(p);\n }", "public ShelterList() {\n shelters = new HashMap<>();\n }", "public MapLocation senseLocationOf(GameObject o) throws GameActionException;", "@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tint[] position = new int[2];\n\t\tposition = db.MovableHumanPiecePosition(p);\n\t\t\n\t\t// show possible moves of the selected piece in the board\n\t\tif(position[0] < 6){\n\t\t\ttry{\n\t\t\t\tif(db.isPlayed() == false){\n\t\t\t\t\tdb.displayPossibleMoveSquare(position);\n\t\t\t}\n\t\t\t}catch(Exception e1){\n\t\t\t\te1.toString();\n\t\t\t}\n\t\t}\t\n\t\t\n\t}", "void fireShellAtPlayer(int playerNr, int x, int y);", "public TakStack getStack(Point p){\n return stacks[p.x][p.y];\n }", "public static HashMap<String, Shelter> getMap() {\n return shelters;\n }", "private String describeLocation() {\n\t\tSWLocation location = this.world.getEntityManager().whereIs(this);\n\t\treturn this.getShortDescription() + \" [\" + this.getHitpoints() + \"] is at \" + location.getShortDescription();\n\t}", "public static void checkForPeopleInShelters() {\n\t\tfor(int i=0; i<vertexMatrix.length; i++){\n\t\t\tif (shelters[i])\n\t\t\t\tpeopleToSave[i]=0;\t\t\n\t\t}\n\t}", "private static void showMap() {\n\t\tSet<Point> pointSet = map.keySet();\n\t\tfor (Point p : pointSet) {\n\t\t\tSystem.out.println(map.get(p));\n\t\t}\n\t}", "private void hover(GridPoint pt){\n\t\t// if too far away, move back to point\n\t\tif(grid.getDistance(grid.getLocation(this), pt) > 10) {\n\t\t\tmoveTowards(pt, 2);\n\t\t}\n\t\t// otherwise hover randomly\n\t\telse{\n\t\t\tmoveAmount(RandomHelper.nextIntFromTo(-1, 1),\n\t\t\t\t\t RandomHelper.nextIntFromTo(-1,1));\n\t\t}\n\t}", "public void showOPanel(Point p) {\r\n \r\n \t}", "final void put(Piece p, Square s) {\r\n if (p == KING) {\r\n map.put(kingPosition(), EMPTY);\r\n king = s;\r\n }\r\n board[s.col()][s.row()] = p;\r\n }", "public void actualShowWorldChest(){\n\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"WorldChest\");\n\t\tel.show();\n\t\tfor(Item it : screenManager.getInventoryManager().getOpenWorldChest()){\n\t\t\tif(it.getInventoryPosition() != null){\n\t\t\t\tElement toHide = nifty.getScreen(\"hud\").findElementByName(\"hoverstats-\"+it.getId());\n\t\t\t\tif(toHide!=null){\n\t\t\t\t\ttoHide.setVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void printSHSV(FqImage imh){\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"s\"+imh.points[i][j].getSHSV() );\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}", "public void setLocation(Point p) {\n // Not supported for MenuComponents\n }", "public ShelterInfo(ShelterInfo info) {\n this(info.getName(), info.getAddress(), info.getSpecialNotes(),\n info.getPhoneNumber(), info.getRestrictions());\n }", "public Shelter findShelterByID(String ID) {\n if (ID != null) {\n return shelters.get(ID);\n }\n return null;\n }", "public SuitPile(int x, int y, int s)\r\n {\r\n pile = new Stack<>();\r\n suit = s;\r\n xLoc = x;\r\n yLoc = y;\r\n }", "void printPlayersActionInfo(Player p) {\n }", "public TakPiece getTop(Point p){\n return stacks[p.x][p.y].top();\n }", "public abstract void Dasher2Screen(MutablePoint coords);", "PasswordActions getActionUnder(@NotNull final Point p) {\n final int off = JBUI.scale(8);\n final Point point = new Point(p.x - off, p.y - off);\n if (point.distance(getPreviewIconCoordinates()) <= off) {\n return PasswordActions.PREVIEW;\n }\n return null;\n }", "public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }", "@Override\n public void mouseMoved(final MouseEvent me)\n {\n \tif(!om.equals(\"hotspot_interaction\") && !om.equals(\"figure_placement_interaction\"))\n \t{\n\t \tfor(int i=hotspots.size()-1; i > -1; --i)\n\t \t\tif(hotspots.elementAt(i).inside(me.getPoint()))\n\t \t\t\thotspots.elementAt(i).setHighlighted(true);\n\t \t\telse\n\t \t\t\thotspots.elementAt(i).setHighlighted(false);\n \t}\n\n \tdrawHSLabel = null;\n \tif (!om.equals(\"figure_placement_interaction\")) {\n \tfor(int i=hotspots.size()-1; i > -1; --i)\n \t\tif(hotspots.elementAt(i).inside(me.getPoint()))\n \t\t\tthis.drawHSLabel = hotspots.elementAt(i);\n \t}\n \tmpos = me.getPoint();\n \trepaint();\n }", "public void change_sword_pos() {\n\t\tif (!heroi.isArmado())\n\t\t\tlabirinto.setLabCell(espada.getX_coord(), espada.getY_coord(), 'E');\n\t}", "public void onMouseClicked(Posn p) {\n Posn temp = this.getGamePiece(p);\n int tempx = temp.x;\n int tempy = temp.y;\n for (int i = 0; i < this.width; i++) {\n for (int j = 0; j < height; j++) {\n if (tempx == i && tempy == j) {\n this.board.get(i).get(j).rotatePiece();\n }\n }\n }\n }", "@Test\n public void testPawnPosition() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n // compare the position of the pawn on the table to the correct position\n for (int i = 0; i < 8; ++i) {\n assertEquals(1, chessBoard.getPiece(1, i).getRow());\n assertEquals(i, chessBoard.getPiece(1, i).getColumn());\n\n assertEquals(6, chessBoard.getPiece(6, i).getRow());\n assertEquals(i, chessBoard.getPiece(6, i).getColumn());\n }\n }", "void showpos(pieces chesspiece)\n {if(chesspiece.alive == true)\n {\n int position = chesspiece.position;\n chesspiece.select = true;\n \n int x;int y;\n if((position+1)%8 == 0) {x = 8; y = (position+8)/8;}\n else{ x = (position+1)%8;\n y = (position+9)/8;}\n chesspiece.move(new moves(x,y));\n for( int a : chesspiece.movnum )\n {\n if ( chesspiece.color == 0)\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n else\n {\n if (Checkerboard.allWhitePositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.RED);\n else if (Checkerboard.allBlackPositions.contains(a-1)== true)\n panel[a-1].setBackground(Color.GRAY);\n else\n panel[a-1].setBackground(Color.GREEN);\n }\n \n }\n }//if(chesspiece.alive==true) ends\n }", "private void printSquareAroundPoint(int x, int y)\n {\n // System.out.println();\n }", "public void printMiniMap() { }", "public void playerDetailedInfo(Player p){\n System.out.println(\"Indicator: \" + indicator + \"\\nJoker: \"+joker);\n System.out.println(\"Winner: Player\" + p.getPlayerNo());\n System.out.println(\"Tile size: \" + p.getTiles().size());\n System.out.println(\"Joker count: \" + p.getJokerCount());\n System.out.println(\"Double score: \" + p.getDoubleCount()*2);\n System.out.println(\"All tiles in ascending order:\\t\" + p.getTiles());\n System.out.println(\"Clustered according to number: \\t\" + p.getNoClus());\n System.out.println(\"Total number clustering score: \" + p.totalNoClustering());\n System.out.println(\"Clustered according to color: \\t\" + p.getColClus());\n System.out.println(\"Total color clustering score: \" + p.totalColCluster());\n System.out.println(\"Final score of Player\"+p.getPlayerNo()+\": \" + p.getPlayerScore());\n }", "@Test\n\tpublic void pieceMovesToSandwichPosition()\n\t{\n\t\tData d=new Data();\n\t\td.set(9,93);\n\t\td.set(32,103);\n\t\td.set(9,104);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(104);\n\t\tassertEquals(test_arr.size(),0);\n\t}", "private Ship findWhichShip(Point p) {\n int row, col;\n for (Ship s : ships) {\n for (int i = 0; i < s.getShipSize(); i++) {\n row = s.getBodyLocationPoints()[i].x;\n col = s.getBodyLocationPoints()[i].y;\n if (row == p.x && col == p.y) {\n //Point head = s.getHeadCoordinatePoint();\n //touchingView = ivCell[head.x][head.y];\n Log.i(\"VIEW FOUND: \", \"!!!!!!!!!!!!!!!!\");\n return s;\n }\n }\n }\n return null;\n }", "public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }", "@Override\n public void steppedOn(Player p) {\n standingHere++;\n Game.log.format(\"# SnowyHole>steppedOn : Stepped on SnowyHole(%d, %d)\\n\", x, y);\n p.fallInWater();\n }", "public void mousePressed(MouseEvent me, int x_p, int y_p, double mag) {\n \t\tint x_pd = x_p;\n \t\tint y_pd = y_p;\n \t\tif (!this.at.isIdentity()) {\n \t\t\tfinal Point2D.Double po = inverseTransformPoint(x_p, y_p);\n \t\t\tx_p = (int)po.x;\n \t\t\ty_p = (int)po.y;\n \t\t}\n \n \t\tfinal int tool = ProjectToolbar.getToolId();\n \n \t\tfinal Display display = ((DisplayCanvas)me.getSource()).getDisplay();\n \t\tfinal long layer_id = display.getLayer().getId();\n \n \t\tindex = findPoint(x_p, y_p, layer_id, mag);\n \n \t\tif (ProjectToolbar.PENCIL == tool && n_points > 0 && -1 == index && !me.isShiftDown() && !Utils.isControlDown(me)) {\n \t\t\t// Use Mark Longair's tracing: from the clicked point to the last one\n \t\t\tfinal double scale = layer_set.getVirtualizationScale();\n \t\t\t// Ok now with all found images, create a virtual stack that provides access to them all, with caching.\n \t\t\tfinal Worker[] worker = new Worker[2];\n \n \t\t\tTraceParameters tr_ = tr_map.get(layer_set);\n \t\t\tfinal TraceParameters tr = null == tr_ ? new TraceParameters() : tr_;\n \t\t\tif (null == tr_) {\n \t\t\t\tsynchronized (tr_map) {\n \t\t\t\t\ttr_map.put(layer_set, tr);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif (tr.update) {\n \t\t\t\tworker[0] = new Worker(\"Preparing Hessian...\") { public void run() {\n \t\t\t\t\tstartedWorking();\n \t\t\t\t\ttry {\n \t\t\t\tUtils.log(\"Push ESCAPE key to cancel autotrace anytime.\");\n \t\t\t\tImagePlus virtual = new LayerStack(layer_set, scale, ImagePlus.GRAY8, Patch.class, display.getDisplayChannelAlphas()).getImagePlus();\n \t\t\t\t//virtual.show();\n \t\t\t\tCalibration cal = virtual.getCalibration();\n \t\t\t\tdouble minimumSeparation = 1;\n \t\t\t\tif (cal != null) minimumSeparation = Math.min(cal.pixelWidth,\n \t\t\t\t\t\t\t\t\t Math.min(cal.pixelHeight,\n \t\t\t\t\t\t\t\t\t\t cal.pixelDepth));\n \t\t\t\tComputeCurvatures hessian = new ComputeCurvatures(virtual, minimumSeparation, null, cal != null);\n \t\t\t\thessian.run();\n \n \t\t\t\ttr.virtual = virtual;\n \t\t\t\ttr.scale = scale;\n \t\t\t\ttr.hessian = hessian;\n \t\t\t\ttr.update = false;\n \n \t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\tIJError.print(e);\n \t\t\t\t\t}\n \t\t\t\t\tfinishedWorking();\n \t\t\t\t}};\n \t\t\t\tBureaucrat.createAndStart(worker[0], project);\n \t\t\t}\n \n \t\t\tPoint2D.Double po = transformPoint(p[0][n_points-1], p[1][n_points-1]);\n \t\t\tfinal int start_x = (int)po.x;\n \t\t\tfinal int start_y = (int)po.y;\n \t\t\tfinal int start_z = layer_set.indexOf(layer_set.getLayer(p_layer[n_points-1])); // 0-based\n \t\t\tfinal int goal_x = (int)(x_pd * scale); // must transform into virtual space\n \t\t\tfinal int goal_y = (int)(y_pd * scale);\n \t\t\tfinal int goal_z = layer_set.indexOf(display.getLayer());\n \n \t\t\t/*\n \t\t\tUtils.log2(\"x_pd, y_pd : \" + x_pd + \", \" + y_pd);\n \t\t\tUtils.log2(\"scale: \" + scale);\n \t\t\tUtils.log2(\"start: \" + start_x + \",\" + start_y + \", \" + start_z);\n \t\t\tUtils.log2(\"goal: \" + goal_x + \",\" + goal_y + \", \" + goal_z);\n \t\t\tUtils.log2(\"virtual: \" + tr.virtual);\n \t\t\t*/\n \n \n \t\t\tfinal boolean simplify = me.isAltDown();\n \n \t\t\tworker[1] = new Worker(\"Tracer - waiting on hessian\") { public void run() {\n \t\t\t\tstartedWorking();\n \t\t\t\ttry {\n \t\t\t\tif (null != worker[0]) {\n \t\t\t\t\t// Wait until hessian is ready\n \t\t\t\t\tworker[0].join();\n \t\t\t\t}\n \t\t\t\tsetTaskName(\"Tracing path\");\n \t\t\t\tfinal int reportEveryMilliseconds = 2000;\n \t\t\t\ttr.tracer = new TracerThread(tr.virtual, 0, 255,\n \t\t\t\t\t\t 120, // timeout seconds\n \t\t\t\t\t\t\t\t reportEveryMilliseconds,\n \t\t\t\t\t\t\t\t start_x, start_y, start_z,\n \t\t\t\t\t\t\t\t goal_x, goal_y, goal_z,\n \t\t\t\t\t\t\t\t true, // reciproal pix values at start and goal\n \t\t\t\t\t\t\t\t tr.virtual.getStackSize() == 1,\n \t\t\t\t\t\t\t\t tr.hessian,\n \t\t\t\t\t\t\t\t null == tr.hessian ? 1 : 4,\n \t\t\t\t\t\t\t\t null,\n \t\t\t\t\t\t\t\t null != tr.hessian);\n \t\t\t\ttr.tracer.addProgressListener(new SearchProgressCallback() {\n \t\t\t\t\tpublic void pointsInSearch(SearchThread source, int inOpen, int inClosed) {\n \t\t\t\t\t\tworker[1].setTaskName(\"Tracing path: open=\" + inOpen + \" closed=\" + inClosed);\n \t\t\t\t\t}\n \t\t\t\t\tpublic void finished(SearchThread source, boolean success) {\n \t\t\t\t\t\tif (!success) {\n \t\t\t\t\t\t\tUtils.logAll(\"Could NOT trace a path\");\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tpublic void threadStatus(SearchThread source, int currentStatus) {\n \t\t\t\t\t\t// This method gets called every reportEveryMilliseconds\n \t\t\t\t\t\tif (worker[1].hasQuitted()) {\n \t\t\t\t\t\t\tsource.requestStop();\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t\ttr.tracer.run();\n \n \t\t\t\tfinal Path result = tr.tracer.getResult();\n \n \t\t\t\ttr.tracer = null;\n \n \t\t\t\tif (null == result) {\n \t\t\t\t\tUtils.log(\"Finding a path failed\"); //: \"+ \n \t\t\t\t\t\t// not public //SearchThread.exitReasonStrings[tracer.getExitReason()]);\n \t\t\t\t\treturn;\n \t\t\t\t}\n \n \t\t\t\t// TODO: precise_x_positions etc are likely to be broken (calibrated or something)\n \n \n \t\t\t\t// Remove bogus points: those at the end with 0,0 coords\n \t\t\t\tint len = result.points;\n \t\t\t\tfinal double[][] pos = result.getXYZUnscaled();\n \t\t\t\tfor (int i=len-1; i>-1; i--) {\n \t\t\t\t\tif (0 == pos[0][i] && 0 == pos[1][i]) {\n \t\t\t\t\t\tlen--;\n \t\t\t\t\t} else break;\n \t\t\t\t}\n \t\t\t\t// Transform points: undo scale, and bring to this Polyline AffineTransform:\n \t\t\t\tfinal AffineTransform aff = new AffineTransform();\n \t\t\t\t/* Inverse order: */\n \t\t\t\t/* 2 */ aff.concatenate(Polyline.this.at.createInverse());\n \t\t\t\t/* 1 */ aff.scale(1/scale, 1/scale);\n \t\t\t\tfinal double[] po = new double[len * 2];\n \t\t\t\tfor (int i=0, j=0; i<len; i++, j+=2) {\n \t\t\t\t\tpo[j] = pos[0][i];\n \t\t\t\t\tpo[j+1] = pos[1][i];\n \t\t\t\t}\n \t\t\t\tfinal double[] po2 = new double[len * 2];\n \t\t\t\taff.transform(po, 0, po2, 0, len); // what a stupid format: consecutive x,y pairs\n \n \t\t\t\tlong[] p_layer_ids = new long[len];\n \t\t\t\tdouble[] pox = new double[len];\n \t\t\t\tdouble[] poy = new double[len];\n \t\t\t\tfor (int i=0, j=0; i<len; i++, j+=2) {\n \t\t\t\t\tp_layer_ids[i] = layer_set.getNearestLayer(pos[2][i]).getId(); // z_positions in 0-(N-1), not in 0-N like slices!\n \t\t\t\t\tpox[i] = po2[j];\n \t\t\t\t\tpoy[i] = po2[j+1];\n \t\t\t\t}\n \n \t\t\t\t// Simplify path: to steps of 5 calibration units, or 5 pixels when not calibrated.\n \t\t\t\tif (simplify) {\n \t\t\t\t\tObject[] ob = Polyline.simplify(pox, poy, p_layer_ids, 10000, layer_set);\n \t\t\t\t\tpox = (double[])ob[0];\n \t\t\t\t\tpoy = (double[])ob[1];\n \t\t\t\t\tp_layer_ids = (long[])ob[2];\n \t\t\t\t\tlen = pox.length;\n \t\t\t\t}\n \n \t\t\t\t// Record the first newly-added autotraced point index:\n \t\t\t\tlast_autotrace_start = Polyline.this.n_points;\n \t\t\t\tPolyline.this.appendPoints(pox, poy, p_layer_ids, len);\n \n \t\t\t\tPolyline.this.repaint(true);\n \t\t\t\tUtils.logAll(\"Added \" + len + \" new points.\");\n \n \t\t\t\t} catch (Exception e) { IJError.print(e); }\n \t\t\t\tfinishedWorking();\n \t\t\t}};\n \t\t\tBureaucrat.createAndStart(worker[1], project);\n \n \t\t\tindex = -1;\n \t\t\treturn;\n \n \t\t}\n \n \t\tif (ProjectToolbar.PEN == tool || ProjectToolbar.PENCIL == tool) {\n \n \t\t\tif (Utils.isControlDown(me) && me.isShiftDown()) {\n \t\t\t\tfinal long lid = Display.getFrontLayer(this.project).getId();\n \t\t\t\tif (-1 == index || lid != p_layer[index]) {\n \t\t\t\t\tindex = findNearestPoint(x_p, y_p, layer_id);\n \t\t\t\t}\n \t\t\t\tif (-1 != index) {\n \t\t\t\t\t//delete point\n \t\t\t\t\tremovePoint(index);\n \t\t\t\t\tindex = -1;\n \t\t\t\t\trepaint(false);\n \t\t\t\t}\n \n \t\t\t\t// In any case, terminate\n \t\t\t\treturn;\n \t\t\t}\n \n \t\t\tif (-1 != index && layer_id != p_layer[index]) index = -1; // disable!\n \n \t\t\t//if no conditions are met, attempt to add point\n \t\t\telse if (-1 == index && !me.isShiftDown() && !me.isAltDown()) {\n \t\t\t\t//add a new point\n \t\t\t\tindex = addPoint(x_p, y_p, layer_id, mag);\n \t\t\t\tis_new_point = true;\n \t\t\t\trepaint(false);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t}", "public void showShelter(View view) throws IOException{\n Intent goShelter = new Intent(this,ShelterInfoActivity.class);\n goShelter.putExtra(\"shelterId\",shelterId);\n startActivity(goShelter);\n }", "private void smell() {\n try {\n this.console.println(MapControl.checkSmell(FireSwamp.getPlayer().getPlayerPosition(),\n FireSwamp.getCurrentGame().getGameMap()));\n } catch (MapControlException ex) {\n Logger.getLogger(GameMenuView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void displayHighScorePosition(String name, int position){\n System.out.println(name + \" managed to get into position \" + position + \" on the high score table\");\n }", "public PrimSpec specAt(Position key) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9691:OrglRoot methodsFor: 'accessing'!\n{PrimSpec} specAt: key {Position}\n\t\"Return the owner for the given position in the receiver.\"\n\t\n\tself subclassResponsibility!\n*/\n}", "@Override\n\t\t\tpublic void onLocatorChanged(LocatorData locatorData) {\n\t\t\t\tsphero_x = locatorData.getPositionX();\n\t\t\t\tsphero_y = locatorData.getPositionY();\n\t\t\t}", "private void eraseAt(PointF p) {\n lastEraseTrace.add(sheet.toSheet(p));\n }", "@Override\n\tpublic void move(Herbivore h, Plant p) {\n\t\tif(Flatland.distance(myX, myY, h.getX(), h.getY()) < 50){\n\t\t\tisHidden = false;\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmoveTowards(h.getX(), h.getY());\n\t\t\tmyColor = StdDraw.RED;\n\t\t}\n\t\telse{\n\t\t\tisHidden = true;\n\t\t\tmyX = myX;\n\t\t\tmyY = myY;\n\t\t\tmyColor = StdDraw.GREEN;\n\t\t}\n\t\t//if moved off screen, predator shows up on other side\n\t\tif(myX < 0){\n\t\t\tmyX = 1000;\n\t\t}\n\t\tif(myX > 1000){\n\t\t\tmyX = 0;\n\t\t}\n\t\tif(myY < 0){\n\t\t\tmyY = 1000;\n\t\t}\n\t\tif(myY > 1000){\n\t\t\tmyY = 0;\n\t\t}\n\t}", "@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tpvo3 = getPosition(e.getPoint());\n\t\t// System.out.println(pvo1.getX()+\",\"+pvo1.getY());\n\t}", "public String seenPokemonMenu() {\n String rv = \"\";\n Iterator<PokemonSpecies> it = this.pokedex.iterator();\n while (it.hasNext()) {\n PokemonSpecies currentSpecies = it.next();\n rv += String.format(\"%s\\n\", currentSpecies.getSpeciesName());\n }\n return rv;\n }", "public void showHeuristics() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n System.out.printf(\"%3d\", getSquareAccessibility(row, col));\n if (col == BOARD_SIZE - 1) {\n System.out.println();\n }\n }\n }\n }", "public void printMaze(Position p){\r\n for (int i = 0; i < mazeData[i].length; i++) {\r\n for (int j = 0; j < mazeData.length; j++) {\r\n if(p.getX()==j&&p.getY()==i)\r\n System.out.print(\"X\");\r\n else\r\n System.out.print(mazeData[j][i]);\r\n }\r\n System.out.print(\"\\n\");\r\n }\r\n }", "@Override\n\t\t\tpublic void shotHere(boolean wasHit, int shipMod, Coordinate c) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void shotHere(boolean wasHit, int shipMod, Coordinate c) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void shotHere(boolean wasHit, int shipMod, Coordinate c) {\n\t\t\t\t\n\t\t\t}", "public boolean hit(Shell s) {\n\t\tif (s.getFlag() == flag) {\n\t\t\treturn false;\n\t\t}\n\t\tif (getFillRect().intersect(s.getFillRect())) {\n\t\t\tmodifyMapStatus(0);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic void drawPoint(MouseEvent e, int state) {\n\n\t}", "int getHungerPoints(ItemStack stack);", "public void printCurrentState() {\n\t\t//getX() and getY() are methods from the Point class\n\t\tSystem.out.println(\"Avatar location: \" + avatar.getLocation().getX() + \",\" + avatar.getLocation().getY());\n\t\tSystem.out.println(\"Points: \" + avatar.getScore());\n\t}", "public abstract void mousePressed(Point p);", "public void findShipPiece() {\r\n\t\tshipPiecesFound += 1;\r\n\t}", "private void paintHorse(PositionInBoard position){\n Image image = new ImageIcon(this.getClass().getResource(\"/main/chessMovement/images/10_Silueta_Caballo_Rojo_by_DG-RA.png\")).getImage();\n ImageIcon icon = new ImageIcon(image);\n board[position.row()][position.column()].setIcon(icon);\n }", "@Override\n\tpublic void mouseMoved(MouseEvent arg0) {\n\t\t//Get mouse screen positions\n\t\tmouseScreenX = arg0.getX();\n\t\tmouseScreenY = arg0.getY();\n\t\t//Convert screen to board position\n\t\tscreenToBoardPos(mouseScreenX, mouseScreenY, mouseBoardPos);\n\t\t//Check if mouse is in the private area\n\t\tmouseInPrivateArea = ObjectFunctions.isInPrivateArea(privateArea, mouseBoardPos.getXI(), mouseBoardPos.getYI());\n\t\tmouseInStacker = ObjectFunctions.isOnShape(id, gameInstance, table.stackerShape, boardToScreenTransformation, mouseBoardPos.getXI(), mouseBoardPos.getYI());\n\n\t\t//Check if some key is pressed\n\t\tif (player != null) {\n\t\t\t//set the mouse position of the player to send to other players\n\t\t\tgameInstance.update(new PlayerMousePositionUpdate(id, player, player, mouseBoardPos.getXI(), mouseBoardPos.getYI()));\n\n\t\t\tif (!player.visitor) {\n\t\t\t\t//Disable action string if mouse moves and no key is pressed\n\t\t\t\tif (downKeys.size() == 0) {\n\t\t\t\t\tplayer.actionString = \"\";\n\t\t\t\t}\n\t\t\t\t//get nearest object concerning the mouse position\n\t\t\t\tObjectInstance nearestObject = ObjectFunctions.getNearestObjectByPosition(this, gameInstance, player, mouseBoardPos.getXI(), mouseBoardPos.getYI(), 1, null);\n\t\t\t\t//do actions if mouse is in the private area or not and there is some nearest object\n\t\t\t\tif (mouseInPrivateArea && nearestObject != null && !arg0.isControlDown() && !arg0.isShiftDown() && !arg0.isAltDown()) {\n\t\t\t\t\tif (hoveredObject != null)\n\t\t\t\t\t{\n\t\t\t\t\t\thoveredObject.state.isActive = false;\n\t\t\t\t\t}\n\t\t\t\t\tnearestObject.state.isActive = false;\n\t\t\t\t\tsetHoveredObject(gameInstance, player, nearestObject);\n\t\t\t\t} else if (!mouseInPrivateArea) {\n\t\t\t\t\tif (nearestObject != null && !nearestObject.state.inPrivateArea) {\n\t\t\t\t\t\tif (hoveredObject == null) {\n\t\t\t\t\t\t\tsetHoveredObject(gameInstance, player, nearestObject);\n\t\t\t\t\t\t} else if (nearestObject.id != hoveredObject.id) {\n\t\t\t\t\t\t\tsetHoveredObject(gameInstance, player, nearestObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isDebug && hoveredObject != null) {\n\t\t\t\t\t\t\toutText = \"Hover Object: \" + hoveredObject.id;\n\t\t\t\t\t\t\toutText += \"\\n Select: \" + hoveredObject.state.isSelected;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tunhoverObject(gameInstance, player);\n\t\t\t\t\t\tif (isDebug) {\n\t\t\t\t\t\t\toutText = \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//TODO do repaint if something happens and not if mouse moved?\n\t\trepaint();\n\t}", "public abstract void clickHelp(FloodItWorld w, ACell topLeft);", "private void updateSafeSpots()\n\t{\n\t\tif (client.getLocalPlayer().getInteracting() != null)\n\t\t{\n\t\t\tActor enemy = client.getLocalPlayer().getInteracting();\n\t\t\tWorldArea worldArea = new WorldArea(enemy.getWorldLocation().getX() - 12,\n\t\t\t\tenemy.getWorldLocation().getY() - 12, 24, 24, client.getPlane());\n\t\t\tList<WorldPoint> worldPoints = worldArea.toWorldPointList();\n\t\t\tsafeSpotList = getSafeSpotList(enemy, worldPoints);\n\t\t}\n\t}", "private void Stingboard(Point2 position) {\r\n GameBoard Stingboard = new GameBoard(position, BoardColor, BoardType.Sting);\r\n boards.add(Stingboard);\r\n }", "private void findChest() {\n\t\tchar[][] location = game.getPlayingmap().getLocation();\n//\t\tFighter fighter = (Fighter)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter].getContent();\n\n\t\tif(character.xOfFighter-1>=0&&location[character.xOfFighter-1][character.yOfFighter]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter-1][character.yOfFighter].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter-1, character.yOfFighter, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.xOfFighter+1<game.getPlayingmap().getRow()&&location[character.xOfFighter+1][character.yOfFighter]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter+1][character.yOfFighter].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter+1, character.yOfFighter, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.yOfFighter-1>=0&&location[character.xOfFighter][character.yOfFighter-1]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter-1].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter, character.yOfFighter-1, 'e');\n\t\t\t}\n\t\t}\n\t\telse if(character.yOfFighter+1<game.getPlayingmap().getColumn()&&location[character.xOfFighter][character.yOfFighter+1]=='c'){\n\t\t\tChest chest = (Chest)game.getPlayingmap().getCellsinthemap()[character.xOfFighter][character.yOfFighter+1].getContent();\n\t\t\tcharacter.openChest(chest);\n\t\t\tif(chest.isEmpty()){\n\t\t\t\tgame.getPlayingmap().changeLocation(character.xOfFighter, character.yOfFighter+1, 'e');\n\t\t\t}\n\t\t}\n\t}", "Tile getPosition();", "public void print()\r\n\t{\r\n\r\n\t\t for(int i = 0; i < 20; i++)\r\n\t\t {\r\n\t\t\t for(int j = 0; j < 20; j++)\r\n\t\t\t {\r\n\t\t\t\t if(sTalker.getY() == randomer.getY() && sTalker.getX() == randomer.getX() && sTalker.getY() == i && sTalker.getX() == j)\r\n\t\t\t\t \tSystem.out.print(\"x\");\r\n\r\n\t\t\t\t else if (i == randomer.getY() && j == randomer.getX())\r\n\t\t\t\t \tSystem.out.print(\"o\");\r\n\r\n\t\t\t\t else if (i == sTalker.getY() && j == sTalker.getX())\r\n\t\t\t\t \tSystem.out.print(\"*\");\r\n\r\n\t\t\t\t else\r\n\t\t\t\t \tSystem.out.print(\"-\");\r\n\t\t\t }\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t\tif(sTalker.getY() == randomer.getY() && sTalker.getX() == randomer.getX())\r\n\t\t{\r\n\t\t \tSystem.out.println(\"The stalker has caught the walker!\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\r\n\t\trandomer.move();\r\n\t\tsTalker.move(randomer);\r\n\t}", "@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\n\t\tif (e.getSource() instanceof ChessBoardBlock) {\r\n//\t\t\tSystem.out.println(\"mouseMoved\");\r\n\t\t}\r\n\t}", "@Test\n\t\tpublic void canGiveTheseusLocation() {\n\t\t\tPoint whereTheseus = new Pointer(3,3);\n\t\t\tgameLoader.addTheseus(whereTheseus);\n\t\t\tPoint expected = whereTheseus;\n\t\t\tPoint actual = gameSaver.wheresTheseus();\n\t\t\t\n\t\t\tassertEquals(expected.across(), actual.across());\n\t\t\tassertEquals(expected.down(), actual.down());\n\t\t}", "public static void main(String[] args) {\n \n PointSET pset = new PointSET();\n System.out.println(\"Empty: \" + pset.isEmpty());\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.6));\n pset.insert(new Point2D(0.5, 0.7));\n pset.insert(new Point2D(0.5, 0.8));\n pset.insert(new Point2D(0.1, 0.5));\n pset.insert(new Point2D(0.8, 0.5));\n pset.insert(new Point2D(0.1, 0.1));\n System.out.println(\"Empty: \" + pset.isEmpty());\n System.out.println(\"Size: \" + pset.size());\n System.out.println(\"Nearest to start: \" + pset.nearest(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #1: \" + pset.contains(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #2: \" + pset.contains(new Point2D(0.5, 0.5)));\n System.out.print(\"Range #1: \");\n for (Point2D p : pset.range(new RectHV(0.001, 0.001, 0.002, 0.002)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #2: \");\n for (Point2D p : pset.range(new RectHV(0.05, 0.05, 0.15, 0.15)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #3: \");\n for (Point2D p : pset.range(new RectHV(0.25, 0.35, 0.65, 0.75)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n \n }", "public static void displayHighScorePosition(String playersName, int position){\n System.out.println(playersName + \" managed to get into position \" + position + \" on the high score table\");\n }", "void moveHandleToPointInTraceHorizontally(int where);", "private void print(RShape p, String msg) {\n RPoint p1 = p.getTopLeft();\n RPoint p2 = p.getBottomRight();\n System.out.println(msg + \" (\" + p1.x + \", \" + p1.y + \"), (\" + p2.x\n + \", \" + p2.y + \")\");\n }", "public void mousePressed() {\n sharkSwarm.addShark(new Shark(mouseX, mouseY, 1));\n}", "public XYPoint getSnakeHeadStartLocation();", "private int spacesContains(Point p) {\n\t\tfor (int i = 0; i < spaces.size(); i++) {\n\t\t\tif (spaces.get(i).equals(p))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}", "@Override\r\n\tpublic void seeEvent(Player spkr,String s) {\n\t\tplayerMappingService.sendString(this,s);\r\n\t}", "public boolean imHovered(Point location) {\n\t\treturn false;\n\t}", "@Override\r\n public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {\r\n if (state.getBlock() != newState.getBlock()) {\r\n BlockEntity blockEntity = world.getBlockEntity(pos);\r\n if (blockEntity instanceof PresentTileEntity) {\r\n ItemScatterer.spawn(world, pos, (PresentTileEntity)blockEntity);\r\n // update comparators\r\n world.updateComparators(pos,this);\r\n }\r\n super.onStateReplaced(state, world, pos, newState, moved);\r\n }\r\n }", "public Object getObjectAtLocation(Point p);", "public void setLocation( Point p ) {\r\n this.x = p.x;\r\n this.y = p.y;\r\n }", "public void setPosition(ScreenPoint p) {\n setX(p.x);\n setY(p.y);\n }", "public void skystonePos2() {\n }", "public void skystonePos5() {\n }", "public void onTrackedHand(SimpleOpenNI curKinect, int handId, PVector pos){\n kinect.convertRealWorldToProjective(pos,pos);\n\n if( gesture.getHands().containsKey(handId) ){\n //insert point\n gesture.getHand(handId).savePoint(pos);\n\n }\n}", "protected abstract void walkOn(IToolStackView tool, int level, LivingEntity living, Level world, BlockPos target, MutableBlockPos mutable);", "private void look() {\n try {\n Location playerPosition = FireSwamp.getPlayer().getPlayerPosition();\n Map gameMap = FireSwamp.getCurrentGame().getGameMap();\n this.console.println(MapControl.checkLook(playerPosition, gameMap));\n } catch (MapControlException ex) {\n Logger.getLogger(GameMenuView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void setPiece(Piece p, Location loc)\n {\n squares[loc.getRow()][loc.getCol()].setPiece(p);\n }", "public static void move (Species map[][], int plantHealth, int sheepHealth, int wolfHealth) {\n \n // Check map\n for (int y = 0; y < map[0].length; y++) {\n for (int x = 0; x < map.length; x++) {\n \n // Chooses an action to do (anything else does nothing)\n boolean [] actionChoice = action (map, x, y, plantHealth);\n \n // Avoid null pointers\n if (map[y][x] != null) {\n \n // Sheep\n // Check if sheep wants to move\n if ((map[y][x] instanceof Sheep) && (((Sheep)map[y][x]).getMoved() == false)) {\n ((Sheep)map[y][x]).loseHealthPerTurn();\n \n // If sheep run out of health, they die\n if ((map[y][x]).getHealth() < 1) {\n map[y][x] = null; \n \n // If sheep have sufficient health, they move, stay still, eat, or breed\n } else {\n \n // Choose direction using specific preferences (anything else stays still)\n int [] direction = moveDecision(map, x, y, plantHealth);\n \n // Chose to move up\n if (direction[0] == 1) {\n \n // Check in bounds\n if (y > 0) {\n \n // Wants to eat a plant\n if (actionChoice[0]) {\n \n // Depending on plant consumed, the effects vary\n if (map[y-1][x] instanceof EnergizingPlant) {\n ((Sheep)map[y][x]).energized(plantHealth);\n } else if (map[y-1][x] instanceof PoisonousPlant) {\n ((Sheep)map[y][x]).poisoned(plantHealth);\n } else {\n ((Sheep)map[y][x]).healed(plantHealth);\n }\n \n // Update sheep position\n ((Sheep)map[y][x]).setEnergy(((Sheep)map[y][x]).getEnergy()-1);\n ((Sheep)map[y][x]).up();\n ((Sheep)map[y][x]).setMoved(true);\n map[y-1][x] = map[y][x];\n map[y][x] = null;\n \n // Move to empty space\n } else if ((y > 0) && (map[y-1][x] == null)) {\n ((Sheep)map[y][x]).setEnergy(((Sheep)map[y][x]).getEnergy()-1);\n ((Sheep)map[y][x]).up();\n ((Sheep)map[y][x]).setMoved(true);\n map[y-1][x] = map[y][x];\n map[y][x] = null;\n }\n }\n \n // Chose to move down\n } else if (direction[0] == 2) {\n \n //Check in bounds\n if (y < map[0].length - 2) {\n \n // Wants to eat a plant\n if (actionChoice[0]) {\n \n // Depending on plant consumed, the effects vary\n if (map[y+1][x] instanceof EnergizingPlant) {\n ((Sheep)map[y][x]).energized(plantHealth);\n } else if (map[y+1][x] instanceof PoisonousPlant) {\n ((Sheep)map[y][x]).poisoned(plantHealth);\n } else {\n ((Sheep)map[y][x]).healed(plantHealth);\n }\n \n // Update sheep position\n ((Sheep)map[y][x]).setEnergy(((Sheep)map[y][x]).getEnergy()-1);\n ((Sheep)map[y][x]).down();\n ((Sheep)map[y][x]).setMoved(true);\n map[y+1][x] = map[y][x];\n map[y][x] = null;\n \n // Move to empty space\n } else if ((y < (map.length - 2)) && (map[y+1][x] == null)) {\n ((Sheep)map[y][x]).setEnergy(((Sheep)map[y][x]).getEnergy()-1);\n ((Sheep)map[y][x]).down();\n ((Sheep)map[y][x]).setMoved(true);\n map[y+1][x] = map[y][x];\n map[y][x] = null;\n }\n }\n \n // Chose to move left\n } else if (direction[0] == 3) {\n \n // Check in bounds\n if (x > 0) {\n \n // Wants to eat a plant\n if (actionChoice[0]) {\n \n // Depending on plant consumed, the effects vary\n if (map[y][x-1] instanceof EnergizingPlant) {\n ((Sheep)map[y][x]).energized(plantHealth);\n } else if (map[y][x-1] instanceof PoisonousPlant) {\n ((Sheep)map[y][x]).poisoned(plantHealth);\n } else {\n ((Sheep)map[y][x]).healed(plantHealth);\n } \n \n // Update sheep position\n ((Sheep)map[y][x]).setEnergy(((Sheep)map[y][x]).getEnergy()-1);\n ((Sheep)map[y][x]).left();\n ((Sheep)map[y][x]).setMoved(true);\n map[y][x-1] = map[y][x];\n map[y][x] = null;\n \n // Move to empty space\n } else if ((x > 0) && (map[y][x-1] == null)) {\n ((Sheep)map[y][x]).setEnergy(((Sheep)map[y][x]).getEnergy()-1);\n ((Sheep)map[y][x]).left();\n ((Sheep)map[y][x]).setMoved(true);\n map[y][x-1] = map[y][x];\n map[y][x] = null;\n }\n }\n \n // Chose to move right\n } else if (direction[0] == 4) {\n \n // Checks in bounds\n if (x < map.length - 2) {\n \n // Wants to eat a plant\n if (actionChoice[0]) {\n \n // Depending on plant consumed, the effects vary\n if (map[y][x+1] instanceof EnergizingPlant) {\n ((Sheep)map[y][x]).energized(plantHealth);\n } else if (map[y][x+1] instanceof PoisonousPlant) {\n ((Sheep)map[y][x]).poisoned(plantHealth);\n } else {\n ((Sheep)map[y][x]).healed(plantHealth);\n }\n \n // Update sheep position\n ((Sheep)map[y][x]).setEnergy(((Sheep)map[y][x]).getEnergy()-1);\n ((Sheep)map[y][x]).right();\n ((Sheep)map[y][x]).setMoved(true);\n map[y][x+1] = map[y][x];\n map[y][x] = null;\n \n // Move to empty space\n } else if ((x < (map.length - 2)) && (map[y][x+1] == null)) {\n ((Sheep)map[y][x]).setEnergy(((Sheep)map[y][x]).getEnergy()-1);\n ((Sheep)map[y][x]).right();\n ((Sheep)map[y][x]).setMoved(true);\n map[y][x+1] = map[y][x];\n map[y][x] = null;\n }\n \n }\n }\n \n }\n }\n \n // WOLF\n // Check if wolves wants to move \n if ((map[y][x] instanceof Wolf) && (((Wolf)map[y][x]).getMoved() == false)) { \n int run = 0;\n ((Wolf)map[y][x]).loseHealthPerTurn();\n \n // If wolves run out of health, they die\n if (map[y][x].getHealth() < 1) {\n map[y][x] = null;\n \n // If wolves have sufficient health, they move, stay still, eat, breed, or fight\n } else {\n \n // Choose direction using specific preferences (anything else stays still)\n int [] direction = moveDecision (map, x, y, plantHealth);\n \n // Chose to move up\n if (direction[1] == 1) {\n \n // Checks in bounds\n if (y > 0) {\n \n // Wants to eat a sheep\n if ((actionChoice[1]) && (map[y-1][x] instanceof Sheep)) {\n \n // Update healths\n ((Wolf)map[y][x]).healed(((Sheep)map[y-1][x]).getHealth());\n \n // Update wolf position\n ((Wolf)map[y][x]).setEnergy(((Wolf)map[y][x]).getEnergy()-1);\n ((Wolf)map[y][x]).up();\n ((Wolf)map[y][x]).setMoved(true);\n map[y-1][x] = map[y][x];\n map[y][x] = null;\n\n // Wants to fight\n } else if ((actionChoice[2]) && (map[y-1][x] instanceof Wolf)) {\n \n // Weaker wolf loses health; otherwise, nothing happens\n if (((Wolf)map[y][x]).compareTo((Wolf)map[y-1][x]) > 0) {\n ((Wolf)map[y-1][x]).damage(10);\n } else if (((Wolf)map[y][x]).compareTo((Wolf)map[y-1][x]) < 0) {\n ((Wolf)map[y][x]).damage(10);\n }\n \n // Move to empty space\n } else if ((x < (map.length - 2)) && (map[y-1][x] == null)) {\n ((Wolf)map[y][x]).setEnergy(((Wolf)map[y][x]).getEnergy()-1);\n ((Wolf)map[y][x]).right();\n ((Wolf)map[y][x]).setMoved(true);\n map[y-1][x] = map[y][x];\n map[y][x] = null;\n }\n }\n \n // Chose to move down\n } else if (direction[1] == 2) {\n \n // Checks in bounds\n if (y < map[0].length - 2) {\n \n // Wants to eat a sheep\n if ((actionChoice[1]) && (map[y+1][x] instanceof Sheep)) {\n \n // Update healths\n ((Wolf)map[y][x]).healed(((Sheep)map[y+1][x]).getHealth());\n \n // Update wolf position\n ((Wolf)map[y][x]).setEnergy(((Wolf)map[y][x]).getEnergy()-1);\n ((Wolf)map[y][x]).up();\n ((Wolf)map[y][x]).setMoved(true);\n map[y+1][x] = map[y][x];\n map[y][x] = null;\n \n // Wants to fight (does not move)\n } else if ((actionChoice[2]) && (map[y+1][x] instanceof Wolf)) {\n \n // Weaker wolf loses health; otherwise, nothing happens\n if (((Wolf)map[y][x]).compareTo((Wolf)map[y+1][x]) > 0) {\n ((Wolf)map[y+1][x]).damage(10);\n } else if (((Wolf)map[y][x]).compareTo((Wolf)map[y+1][x]) < 0) {\n ((Wolf)map[y][x]).damage(10);\n }\n \n // Move to empty space\n } else if ((x < (map.length - 2)) && (map[y+1][x] == null)) {\n ((Wolf)map[y][x]).setEnergy(((Wolf)map[y][x]).getEnergy()-1);\n ((Wolf)map[y][x]).right();\n ((Wolf)map[y][x]).setMoved(true);\n map[y+1][x] = map[y][x];\n map[y][x] = null;\n }\n }\n \n // Chose to move left\n } else if (direction[1] == 3) {\n \n // Checks in bounds\n if (x > 0) {\n \n // Wants to eat a sheep\n if ((actionChoice[1]) && (map[y][x-1] instanceof Sheep)) {\n \n // Update healths\n ((Wolf)map[y][x]).healed(((Sheep)map[y][x-1]).getHealth());\n \n // Update wolf position\n ((Wolf)map[y][x]).setEnergy(((Wolf)map[y][x]).getEnergy()-1);\n ((Wolf)map[y][x]).up();\n ((Wolf)map[y][x]).setMoved(true);\n map[y][x-1] = map[y][x];\n map[y][x] = null;\n \n // Wants to fight (does not move)\n } else if ((actionChoice[2]) && (map[y][x-1] instanceof Wolf)) {\n \n // Weaker wolf loses health; otherwise, nothing happens\n if (((Wolf)map[y][x]).compareTo((Wolf)map[y][x-1]) > 0) {\n ((Wolf)map[y][x-1]).damage(10);\n } else if (((Wolf)map[y][x]).compareTo((Wolf)map[y][x-1]) < 0) {\n ((Wolf)map[y][x]).damage(10);\n }\n \n // Move to empty space\n } else if ((x < (map.length - 2)) && (map[y][x-1] == null)) {\n ((Wolf)map[y][x]).setEnergy(((Wolf)map[y][x]).getEnergy()-1);\n ((Wolf)map[y][x]).right();\n ((Wolf)map[y][x]).setMoved(true);\n map[y][x-1] = map[y][x];\n map[y][x] = null;\n }\n }\n \n // Chose to move right \n } else if (direction[1] == 4) {\n \n // Checks in bounds\n if (x < map.length - 2) {\n \n // Wants to eat a sheep\n if ((actionChoice[1]) && (map[y][x+1] instanceof Sheep)) {\n \n // Update healths\n ((Wolf)map[y][x]).healed(((Sheep)map[y][x+1]).getHealth());\n \n // Update wolf position\n ((Wolf)map[y][x]).setEnergy(((Wolf)map[y][x]).getEnergy()-1);\n ((Wolf)map[y][x]).up();\n ((Wolf)map[y][x]).setMoved(true);\n map[y][x+1] = map[y][x];\n map[y][x] = null;\n \n // Wants to fight (does not move)\n } else if ((actionChoice[2]) && (map[y][x+1] instanceof Wolf)) {\n \n // Weaker wolf loses health; otherwise, nothing happens\n if (((Wolf)map[y][x]).compareTo((Wolf)map[y][x+1]) > 0) {\n ((Wolf)map[y][x+1]).damage(10);\n } else if (((Wolf)map[y][x]).compareTo((Wolf)map[y][x+1]) < 0) {\n ((Wolf)map[y][x]).damage(10);\n }\n \n // Move to empty space\n } else if ((x < (map.length - 2)) && (map[y][x+1] == null)) {\n ((Wolf)map[y][x]).setEnergy(((Wolf)map[y][x]).getEnergy()-1);\n ((Wolf)map[y][x]).right();\n ((Wolf)map[y][x]).setMoved(true);\n map[y][x+1] = map[y][x];\n map[y][x] = null;\n }\n }\n \n }\n }\n }\n \n }\n \n }\n }\n \n }", "public void move() {\n\t\t\tint mx = getMouseX();\r\n\t\t\tint my = getMouseY();\r\n\t\t\tif (mx!=oldmousex) x=mx;\r\n\t\t\tif (my!=oldmousey) y=my;\r\n\t\t\toldmousex=mx;\r\n\t\t\toldmousey=my;\r\n\t\t\tif (getKey(key_left)||getKey(key_right)) {\r\n\t\t\t\tint inc = getKey(key_left) ? -1 : 1;\r\n\t\t\t\tclearKey(key_left);\r\n\t\t\t\tclearKey(key_right);\r\n\t\t\t\t// find next spider \r\n\t\t\t\tJGPoint cen = getCenterTile();\r\n\t\t\t\tfor (int tx=1; tx<pfTilesX(); tx++) {\r\n\t\t\t\t\tcen.x += inc;\r\n\t\t\t\t\tif (cen.x<0) cen.x = pfTilesX()-1;\r\n\t\t\t\t\tif (cen.x>=pfTilesX()) cen.x = 0;\r\n\t\t\t\t\tif (and(getTileCid(cen.x,1),2)) {\r\n\t\t\t\t\t\tx = cen.x*tileWidth() + 3;\r\n\t\t\t\t\t\ty = 20;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (getMouseButton(1)||getKey(key_fire)) {\r\n\t\t\t\tsetGraphic(\"scissors_c\");\r\n\t\t\t\tif (!scissors_c) playAudio(\"scissors\");\r\n\t\t\t\tscissors_c=true;\r\n\t\t\t} else {\r\n\t\t\t\tsetGraphic(\"scissors_o\");\r\n\t\t\t\tscissors_c=false;\r\n\t\t\t}\r\n\t\t}", "public GamesWindow(Point p)\n {\n initComponents();\n pack();\n this.setTitle(\"Space Attack\");\n this.setLocation(p);\n error.setVisible(false);\n this.setVisible(true);\n }", "public static void inspectRoom(Player player) {\n System.out.print(\"You see: \");\n player.getCurrentRoom().inspect();\n }", "public static void shoInfo() {\n\t\tSystem.out.println(description);\n\t \n\t}", "public boolean onPosition(Point p)\n {\n for(Point pellet : pellets) // iterate over all the pellets\n {\n if (pellet.equals(p))\n return true;\n }\n return false;\n }", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "public void calculateShooterInfo(double distance) {\n }", "public void printContents(){\n System.out.println(this);\n System.out.println(\"Occupied by: \" + pieceAtVertex + \"\\n Neighbors:\" + neighbors);\n }", "private static native String getGlyphForActionOrigin(long pointer, int origin);", "public Tile getTileAt(Position p);", "public static void convertPointFromScreen(Point p, JComponent c) {\n\t\tSystem.out.println(\"ERROR!\");new Exception().printStackTrace();throw new UnsupportedOperationException(\"Broken!\");\n\t}" ]
[ "0.65686893", "0.5532881", "0.5231675", "0.5190685", "0.51739025", "0.513951", "0.50465924", "0.500692", "0.4974387", "0.49457332", "0.49313203", "0.49292377", "0.49270558", "0.4917206", "0.4917196", "0.49074358", "0.48910487", "0.48822662", "0.48763117", "0.48652697", "0.48309907", "0.48249695", "0.48245707", "0.48089945", "0.47982258", "0.47974393", "0.47801182", "0.4778487", "0.47695702", "0.47669208", "0.47644776", "0.47569135", "0.47476736", "0.47442883", "0.47391576", "0.4734757", "0.47321042", "0.47311914", "0.47301507", "0.47199798", "0.4715645", "0.47120833", "0.4705093", "0.4703279", "0.46952707", "0.46908247", "0.4674634", "0.4671725", "0.46541572", "0.46541572", "0.46541572", "0.46362317", "0.46318528", "0.46251872", "0.46224466", "0.46213984", "0.46200207", "0.46075505", "0.46037948", "0.46007064", "0.46006298", "0.4600196", "0.45995185", "0.4597413", "0.45963466", "0.45930287", "0.45857844", "0.45834994", "0.4582708", "0.45824808", "0.4580487", "0.45793608", "0.4577418", "0.45649332", "0.45633745", "0.45560992", "0.45559525", "0.45552677", "0.4554576", "0.45531797", "0.45529482", "0.45503804", "0.4545487", "0.45347115", "0.45333913", "0.4526527", "0.45215887", "0.4518151", "0.45174897", "0.45161137", "0.4515088", "0.45115787", "0.45077676", "0.45077676", "0.45077676", "0.45059577", "0.45010194", "0.44931683", "0.44916356", "0.44882414" ]
0.8408973
0
The following methods are for implementing MouseListener. We're really only interested in mouseClicked().
public void mouseClicked(MouseEvent e) { Point p = convertToLogical(e.getX(), e.getY()); inspectShelterAt(p); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseClicked(int mouseX, int mouseY, int mouse) {}", "public abstract void mouseClicked(MouseEvent e);", "public abstract void mouseClicked(MouseClickedEvent event);", "@Override\n public void mouseClicked(MouseEvent arg0) {\n \n }", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "@Override\r\n public void mouseClicked(MouseEvent e) { }", "void onMouseClicked(MouseEventContext mouseEvent);", "@Override\r\n public void mouseClicked(MouseEvent e) {}", "void mouseClicked(double x, double y, MouseEvent e );", "public void mouseClicked(MouseEvent arg0) {\n }", "@Override\r\n public void mouseClicked(MouseEvent e) {\n }", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e)\n {}", "void mouseClicked(MouseEvent mouseEvent);", "@Override\n\tpublic void mouseClicked(int arg0, int arg1, int arg2, int arg3) {\n\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\r\n\t\t}", "public void mouseClicked(MouseEvent e) {\n\n }", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent event){}", "@Override\r\n public void mouseClicked(MouseEvent e) {\n }", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public void mouseClicked( MouseEvent event ){}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "public void mouseClicked(MouseEvent e) { \r\n }", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n \n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n clicked = true;\n }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\r\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\n\t}" ]
[ "0.8035695", "0.80240685", "0.7998674", "0.7887444", "0.7868886", "0.7868886", "0.7868886", "0.7868886", "0.7816289", "0.77992946", "0.7793725", "0.77844393", "0.77830124", "0.7779291", "0.77646595", "0.77646595", "0.77646595", "0.77646595", "0.77646595", "0.77646595", "0.77646595", "0.77646595", "0.77646595", "0.77646595", "0.77646595", "0.77646595", "0.77574277", "0.7751178", "0.77496296", "0.7746138", "0.77333814", "0.77276313", "0.77276313", "0.7726909", "0.77200294", "0.7701739", "0.76996434", "0.76996434", "0.76935554", "0.7691512", "0.768639", "0.76841676", "0.76824063", "0.76809865", "0.76809865", "0.76757747", "0.76757747", "0.76757747", "0.76757747", "0.76757747", "0.76757747", "0.76757747", "0.76757747", "0.76757747", "0.7668022", "0.7668022", "0.7668022", "0.7666616", "0.76622856", "0.76622856", "0.76622856", "0.76622856", "0.76622856", "0.76622856", "0.7648562", "0.763611", "0.763611", "0.763611", "0.763611", "0.763611", "0.763611", "0.763611", "0.763611", "0.763611", "0.763611", "0.763611", "0.763611", "0.763611", "0.763611", "0.7632373", "0.7627635", "0.762236", "0.762236", "0.76187545", "0.76165044", "0.7615045", "0.7610394", "0.758321", "0.75777704", "0.75620854", "0.75620854", "0.75620854", "0.75620854", "0.75620854", "0.75620854", "0.75620854", "0.7560792", "0.7558122", "0.7558122", "0.7556424", "0.7556424" ]
0.0
-1
used when run from a junit3 suite
public static junit.framework.Test suite() { return new JUnit4TestAdapter(TypeEmbedded.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testDumbJUnit() {\n }", "public void junitClassesStarted() { }", "public void junitClassesStarted() { }", "@Test\n\tpublic void testMain() {\n\t}", "@Override\n public void runTest() {\n }", "public void junitStarted() { }", "public void junitStarted() { }", "protected TeststepRunner() {}", "@Override\n public void setUp() {\n }", "protected void runBeforeTest() {}", "@Test\n\tpublic void test4() {\n\t}", "@Test\r\n\tpublic void testSanity() {\n\t}", "@Override\r\n\tpublic void setUp() {\n\r\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\n public void setUp() throws Exception {}", "@Test\n public void doTest3() {\n }", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}", "protected void setUp() {\n\n }", "@Test\n public void doTest4() {\n }", "@Before public void setUp() { }", "protected void setUp()\n {\n }", "protected void setUp()\n {\n }", "@Test\n public void test3(){\n }", "protected void setUp() throws Exception {\n }", "public void testMain() throws Throwable {\n\r\n\t}", "@Override\r\n protected void setUp() {\r\n // nothing yet\r\n }", "@Test\n public void simpleUse(){\n }", "protected void setUp() throws Exception {\n \n }", "@org.junit.Test\r\n\tpublic void test() {\n\t\t\t\t\r\n\t}", "@Test\n\tvoid test() {\n\t\t\n\t}", "@Before\n public void setUp () {\n }", "@Before\n\t public void setUp() {\n\t }", "public void testGetBasedata() {\n }", "@BeforeClass\n public static void setUpClass() {\n }", "@BeforeClass\n public static void setUpClass() {\n }", "@Before\n\tpublic void setUp() {\n\t}", "@BeforeClass\n public static void setUp() {\n }", "public void setUp() {\n\n\t}", "protected void setUp() {\n\t}", "@Before\r\n\tpublic void setUp() {\n\t}", "@Test\r\n\tpublic void test() {\r\n\t}", "public void setUp()\r\n {\r\n //empty on purpose\r\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@BeforeClass\n public static void oneTimeSetUp() {\n\n }", "abstract void setUp() throws Exception;", "@Override\n\tpublic void testEngine() {\n\t\t\n\t}", "public abstract void initializeTestSuite();", "@BeforeClass\n public void setUp() {\n }", "@BeforeClass\n\tpublic static void setup() {\n\n\t}", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@BeforeClass // runs before all test cases; runs only once\n public static void setUpSuite() {\n\n }", "@Before\n public void setUp() {\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\t\n\t}", "@Before\n public void setUp() throws Exception {\n\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}", "public void run(TestCase testCase) {\n }", "@Override\n @Before\n public void setUp() throws IOException {\n }", "@BeforeClass\n\tpublic void TestSetup() {\n\t}", "@Override\n\tpublic void runTest() throws Throwable {}", "@Test\npublic void TC11(){\n\n}", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Override\n\t@Ignore\n\t@Test\n\tpublic void testLaunch() throws Throwable {\n\t}", "@Before\n public void setUp() throws Exception {\n\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Test\n\tpublic void test() {\n\t}", "@Test\n\tpublic void test() {\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "@Test\n public void init() {\n }", "@Test\n\tpublic void test(){\n\t}", "@Before\n public void setUp()\n {\n summary = \"\";\n allPassed = true;\n firstFailExpected = null;\n firstFailRun = null;\n captureSummary = \"\";\n captureRun = null;\n }", "@BeforeClass\n\t public void setUp() {\n\t }", "private test5() {\r\n\t\r\n\t}", "public static Test suite()\n {\n return new TestSuite(BugFixesTest.class);\n }" ]
[ "0.6985362", "0.6891196", "0.6891196", "0.68496287", "0.6810069", "0.6755462", "0.6755462", "0.67438906", "0.6723217", "0.671851", "0.6710353", "0.6706134", "0.66740507", "0.6668179", "0.6657032", "0.66350025", "0.66182417", "0.6613468", "0.65998214", "0.65834624", "0.6583064", "0.6583064", "0.65777075", "0.65707004", "0.6569101", "0.6558485", "0.65549314", "0.65398943", "0.6524736", "0.6522244", "0.6511843", "0.6498612", "0.64977145", "0.6497028", "0.6497028", "0.6486647", "0.6483257", "0.6482946", "0.646762", "0.64670587", "0.64661694", "0.64650476", "0.6461725", "0.6461725", "0.6461725", "0.6461725", "0.6461725", "0.64609", "0.64609", "0.64609", "0.64609", "0.64549196", "0.6449514", "0.64373285", "0.6435176", "0.6430367", "0.6428071", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424987", "0.6424295", "0.6420984", "0.64148897", "0.64104456", "0.6402838", "0.64013976", "0.63971055", "0.6394102", "0.63923883", "0.63918823", "0.6391164", "0.6391164", "0.63909984", "0.6389917", "0.6389295", "0.6389295", "0.6380517", "0.6380517", "0.63536", "0.63536", "0.6352023", "0.6350976", "0.63459986", "0.63429224", "0.63414985", "0.63406837" ]
0.0
-1
Called just before this Command runs the first time
protected void initialize() { Robot.pneumatics.pneuOpen(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void preRun() {\n super.preRun();\n }", "protected void preRun() {\r\n\t\tthis.preparePairs();\r\n\t}", "@Override\n public void beforeFirstLogic() {\n }", "public void prePerform() {\n // nothing to do by default\n }", "protected void onFirstUse() {}", "@Override\n\t\t\tprotected void onPreExecute()\n\t\t\t{\n\n\t\t\t}", "@Override\n public void beforeStart() {\n \n }", "protected void initialize() {\n\t\tRobot.firstAutonomousCommandDone = true;\n\t}", "@Override\n\t\t\t\tprotected void onPreExecute()\n\t\t\t\t{\n\t\t\t\t\tsuper.onPreExecute();\n\t\t\t\t}", "public void preExecution() throws CommandListenerException;", "public void initDefaultCommand() {\n\t\t// Don't do anything\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\t\t\t}", "@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "protected void runBeforeStep() {}", "@Override\n protected void onPreExecute() {\n\n }", "@Override\n protected void onPreExecute() {\n\n }", "@Override\n protected void onPreExecute() {\n\n }", "@Override\n protected void onPreExecute() {\n\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t}", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\r\n\t\t}", "@Override\n protected void onStart() {\n checkUserStatus();\n\n super.onStart();\n }", "void PrepareRun() {\n }", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t}", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}", "@Override\r\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\r\n\t\t\t}", "public void autonomousInit() {\n if (autonomousCommand != null) autonomousCommand.start();\n }", "protected void onPreExecute() {\n\t\t}", "@Override\n protected void onStart() {\n checkUserStatus();\n super.onStart();\n }", "protected void initDefaultCommand() {\n \t\t\n \t}", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n protected void onPreExecute() {\n }", "@Override\n\t protected void onPreExecute() {\n\t }", "public void initDefaultCommand() {\n \n }", "@Override\n\t\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\t\tsuper.onPreExecute();\n\t\t\t\t\t}", "public void autonomousInit() {\n\t\tautonomousCommand.start();\r\n\t}", "@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}", "@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onPreExecute() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tprotected void initDefaultCommand() {\n\t\t\r\n\t}", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "protected abstract void preRun();", "@Override\n public void initDefaultCommand() {\n\n }", "private Command() {\n initFields();\n }", "public void initDefaultCommand() {\n \n }", "@RequiresApi(api = Build.VERSION_CODES.N)\n public void StartInitial() {\n model.StartInitial();\n\n // Add any code required\n\n }", "public void onStart() {\n /* do nothing - stub */\n }", "@Override\n protected void startUp() {\n }", "@Override\r\n\tprotected void onPreExecute() {\n\t}", "@Override\n public void initDefaultCommand() \n {\n }", "@Override\n protected void onPreExecute()\n {\n super.onPreExecute();\n }", "@Override\n protected void onPreExecute() {\n\n super.onPreExecute();\n\n }", "@Override\r\n protected void onPreExecute() {\n super.onPreExecute();\r\n }", "@Override\r\n\tpublic void preCheck(CheckCommand checkCommand) throws Exception {\n\r\n\t}", "public void preInstallHook() {\n }", "public void startup() {\n neutral();\n }", "public void initDefaultCommand() {\n\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\n\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\n\t}", "public void onStart() {\n super.onStart();\n getStockVerification();\n }", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n public void onStart() {\n \n }", "@Override\n public void onStart() {\n \n }", "@Override\n public void preStart() {\n Reaper.watchWithDefaultReaper(this);\n }" ]
[ "0.7113986", "0.6542487", "0.64347786", "0.6433418", "0.64082474", "0.6353506", "0.6309701", "0.62537354", "0.62473047", "0.62407833", "0.6167777", "0.6163407", "0.6129232", "0.6129232", "0.6129232", "0.6129232", "0.6129232", "0.61080366", "0.608483", "0.608483", "0.60805327", "0.60805327", "0.6068528", "0.60680324", "0.60680324", "0.60680324", "0.60680324", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.6061779", "0.60580724", "0.6044969", "0.6041834", "0.603989", "0.6035691", "0.60305667", "0.60298306", "0.6012218", "0.60053056", "0.6002687", "0.59965384", "0.59901303", "0.5988611", "0.5988611", "0.5988611", "0.5988611", "0.5988611", "0.5977599", "0.59622574", "0.5961238", "0.59496737", "0.59461665", "0.59449667", "0.5909627", "0.5907129", "0.59067136", "0.59067136", "0.59067136", "0.59067136", "0.59067136", "0.59067136", "0.59067136", "0.59065974", "0.5906112", "0.5902859", "0.5901146", "0.5892453", "0.58864474", "0.5884274", "0.58823276", "0.58756584", "0.5870505", "0.5860054", "0.5857494", "0.58513945", "0.5844433", "0.58421814", "0.5840623", "0.5837147", "0.5837147", "0.5837147", "0.58352405", "0.58352405", "0.5834613", "0.58340293", "0.58340293", "0.58284307", "0.58284307", "0.58276254" ]
0.0
-1
Called repeatedly when this Command is scheduled to run
protected void execute() { Robot.drive.driveForward(DRIVE_SPEED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}", "@Override\n public void run() {\n schedule();\n }", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "public void run() {\n\t\texecuteCommand( client, false );\n\t}", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "@Override\n\tpublic void execute() {\n\t\tsuper.execute();\n\n\t\t// TBD Needs rewrite for multi tenant\n\t\ttry {\t\n\t\t\tif (async == null || !async)\n\t\t\t\tupdated = Crosstalk.getInstance().refresh(customer);\n\t\t\telse {\n\t\t\t\tfinal Long id = random.nextLong();\n\t\t\t\tfinal ApiCommand theCommand = this;\n\t\t\t\tThread thread = new Thread(new Runnable() {\n\t\t\t\t @Override\n\t\t\t\t public void run(){\n\t\t\t\t \ttry {\n\t\t\t\t\t\t\tupdated = Crosstalk.getInstance().refresh(customer);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\terror = true;\n\t\t\t\t\t\t\tmessage = e.toString();\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t});\n\t\t\t\tthread.start();\n\t\t\t\tasyncid = \"\" + id;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "protected void runEachMinute() {\n \n }", "@Override\n public void execute() {\n Time.sleep(3000);\n Starting.execute();\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 }", "@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 {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }", "private void scheduleJob() {\n\n }", "@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "protected void run() throws IOException {\n\t\tif (lastTime + interval > Time.now())\n\t\t\treturn;\n\t\texitCode = 0; // reset for next run\n\t\trunCommand();\n\t}", "protected void execute() {\n \tclimber.setCLimberSpeed(0);\n }", "@Override\n public void teleopPeriodic()\n {\n Scheduler.getInstance().run();\n }", "private void doCommand() {\n try {\n TimeUnit.SECONDS.sleep(2L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "protected void waitUntilCommandFinished() {\n }", "public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n \n }", "private void schedule() {\n service.scheduleDelayed(task, schedulingInterval);\n isScheduled = true;\n }", "public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\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 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\tprotected void run() {\n\t\tUtils.executeAndWaitForCommand(this.getHMetisExec());\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}", "@Override\n public void autonomousPeriodic() {\n \n }", "public void intialRun() {\n }", "@Override\n public void periodic() {\n UpdateDashboard();\n }", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "@Override\n\tprotected void postRun() {\n\n\t}", "protected void execute() {\n \t\n \tcurrent_time = System.currentTimeMillis();\n \t\n \tlift.liftDown(LIFT_SPEED);\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}", "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 }", "public void run() {\n\t\t\t\tIMSScheduleManager.super.startCron();\r\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "@Override\n public void autonomousPeriodic() {\n\n }", "@Override\n public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n log();\n }", "@Override\n\tpublic void postRun() {\n\t}", "public void autonomousPeriodic() {\n // RobotMap.helmsman.trackPosition();\n Scheduler.getInstance().run();\n }", "private void beginSchedule(){\n\t\tDivaApp.getInstance().submitScheduledTask(new RandomUpdater(this), RandomUpdater.DELAY, RandomUpdater.PERIOD);\n\t}", "protected void runEachSecond() {\n \n }", "@Override\n protected void execute() {\n Robot.toteLifterSubsystem.setEjectorState(EjectorState.EXTENDING, ramper.process(1.0));\n }", "protected void execute() {\n\t\t_xboxControllerToRumble.setRumble(_rumbleType, _rumbleValue);\n\t\t_timesRumbled++;\n\t\tSystem.out.println(\"Rumbling \" + _timesRumbled);\n\t}", "private void runPeriodic() {\n boolean ok = ScheduledFutureTask.super.runAndReset();\n boolean down = isShutdown();\n // Reschedule if not cancelled and not shutdown or policy allows\n if (ok && !down) {\n updateNextExecutionTime();\n MeasurableScheduler.super.getQueue().add(this);\n }\n // This might have been the final executed delayed\n // task. Wake up threads to check.\n else if (down)\n interruptIdleWorkers();\n }", "public void execute() {\n\t\tlaunch();\n\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\n\tpublic void run() {\n\t\tif (this.isRunning == true) {\n\t\t\treturn;\n\t\t}\n\t\tthis.isRunning = true;\n\t\t// 写入一条日志\n\t\t\n\t\t// 详细运行参数\n\t\ttry {\n\t\t\tthis.taskRun();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.isRunning = false;\n\t\tthis.addHistory(new Date());\n\t\tif(this.once) {\n\t\t\tthis.cancel();\n\t\t}\n\t}", "@Override\n public void run() {\n systemTurn();\n }", "@Override\n public void run() {\n systemTurn();\n }", "@Override\n public void run() {\n systemTurn();\n }", "@Override\n public void run() {\n systemTurn();\n }", "@Override\n public void run() {\n systemTurn();\n }", "@Override\n public void run() {\n systemTurn();\n }", "@Override\n public void run() {\n systemTurn();\n }", "@Override\n public void run() {\n systemTurn();\n }", "@Override\n public void run() {\n systemTurn();\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void taskStarting() {\n\n }", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n log();\n }", "@PostConstruct\n public void postConstruct() {\n execService = Executors.newScheduledThreadPool(1);\n scheduledFuture = execService.scheduleAtFixedRate(this, 0, PUSH_REPEAT_DELAY, TimeUnit.MILLISECONDS);\n }", "protected void run() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void run() {\n\t\tautomatischDurchAlleRouten();\n\n\t\t\n\t}", "public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n public void execute() {\n if (System.currentTimeMillis() - currentMs >= timeMs) {\n // Delay has passed so initialize object11\n super.initialize();\n }\n }", "@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}", "protected void execute() {\n \tRobot.chassisSubsystem.shootHighM.set(0.75);\n \tif(timeSinceInitialized() >= 1.25){\n \t\tRobot.chassisSubsystem.liftM.set(1.0);\n \t}\n }", "protected void execute() {\n command.start();\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n\t// updateDiagnostics();9\n\tScheduler.getInstance().run();\n }", "@Override\n public void run()\n {\n //Log.d(TAG ,\"==========>Task Run In!\");\n updateDroneLocation();\n }", "public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "public void execute() {\n setExecuted(true);\n }", "@Override\n public void teleopPeriodic() {\n\tupdateDiagnostics();\n\tScheduler.getInstance().run();\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\t\tshooter.runShooter(power);\n\t}", "@Override\r\n public void run() {}", "@SuppressLint(\"InlinedApi\")\n @Override\n public void run() {\n }", "protected void execute() {\n \tshooterWheel.shooterWheelSpeedControllerAft.Pause();\n \tshooterWheel.shooterWheelSpeedControllerFwd.Pause();\n \t\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "public void run() {\n ui.printStartingMessage();\n boolean isExit = false;\n\n while (!isExit) {\n isExit = parser.determineCommand();\n }\n\n storage.saveToFile(taskList);\n }" ]
[ "0.6689458", "0.6631115", "0.6566414", "0.65512514", "0.6530515", "0.6488629", "0.64019585", "0.6380878", "0.637645", "0.6363615", "0.63557744", "0.6330997", "0.6295938", "0.6275704", "0.6268897", "0.62656784", "0.62656784", "0.62656784", "0.62656784", "0.62656784", "0.62656784", "0.6255461", "0.624429", "0.6241397", "0.62090397", "0.6183934", "0.6178626", "0.61670285", "0.614122", "0.6137012", "0.6132416", "0.6132416", "0.6132416", "0.6132416", "0.61313075", "0.61313075", "0.61313075", "0.6120398", "0.61091226", "0.61073244", "0.610631", "0.610404", "0.6101818", "0.61014", "0.6099132", "0.6093559", "0.6092883", "0.6092883", "0.6092883", "0.6092883", "0.60926527", "0.60926485", "0.6077805", "0.6074907", "0.606528", "0.6062541", "0.60580474", "0.6056443", "0.60554063", "0.6054432", "0.60539037", "0.60538137", "0.60505164", "0.60505164", "0.604125", "0.6029588", "0.6029588", "0.6029588", "0.6029588", "0.6029588", "0.6029588", "0.6029588", "0.6029588", "0.6029588", "0.6027496", "0.6027496", "0.6027496", "0.60272455", "0.6009362", "0.6006723", "0.59990466", "0.59985226", "0.59967", "0.5994757", "0.5985855", "0.59771705", "0.5973198", "0.5970597", "0.59701514", "0.5965313", "0.5964212", "0.596267", "0.59585357", "0.5954102", "0.595137", "0.5949223", "0.5946874", "0.5942587", "0.59406763", "0.59406763", "0.59366745" ]
0.0
-1
Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() { return isTimedOut(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean execute() {\n return false;\n }", "@Override\n public boolean execute() {\n return false;\n }", "public boolean execute(){\n return false;\n }", "@Override\n\tpublic boolean Unexecute() \n\t{\n\t\treturn false;\n\t}", "protected boolean onExecute(String command)\n {\n return false;\n }", "@Override\n\tpublic boolean execute() {\n\t\treturn false;\n\t}", "@Override\n\t\tpublic boolean shouldContinueExecuting() {\n\t\t\treturn false;\n\t\t}", "public boolean shouldExecute() {\n\t\treturn true;\n\t}", "protected void execute() {\n \t// literally still do nothing\n }", "@Override\n public boolean canExecute() {\n return true;\n }", "protected void execute() {\n finished = true;\n }", "@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}", "public Command() {\n this.executed = false;\n }", "@Override\n public void stopExecute() {\n\n }", "public boolean shouldExecute()\n {\n if (this.runDelay <= 0)\n {\n if (!this.theRaider.world.getGameRules().getBoolean(\"mobGriefing\"))\n {\n return false;\n }\n\n this.currentTask = -1;\n this.wantsToReapStuff = true;\n }\n\n return super.shouldExecute();\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n public void execute() {\n if(!manipulatorController.getRawButton(button)){\n shooter.shooterMotorsOff();\n hopper.hopperMotorOff();\n isDone = true;\n end(false);\n }\n\n }", "public void unExecute()\n\t{\n\t}", "@Override\r\n protected boolean isFinished() {\n return false;\r\n }", "@Override\r\n public void executeCommand() {\r\n shell.stopRunning();\r\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished()\n {\n return false;\n }", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\t\t\n\t}", "@Override\n protected boolean isFinished() \n {\n return false;\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n boolean isFinished() {\n return false;\n }", "public boolean shouldContinueExecuting() {\n return (this.shouldExecute() || !this.entity.getNavigator().noPath()) && this.isBowInMainhand();\n }", "protected boolean isFinished() {\r\n return false;\r\n }", "protected boolean isFinished() {\r\n return false;\r\n }", "public boolean shouldExecute() {\n return this.goalOwner.getTeam() == null ? false : super.shouldExecute();\n }", "public void prepareExecuteNoSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteNoSelect();\n }", "protected void waitUntilCommandFinished() {\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "@Override\n\tprotected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "protected void executionSuccess() {\n this.isUndoable = true;\n }", "protected boolean isFinished() {\n return false;\n \n }", "boolean redoLastCommand() throws Exception;", "@Override\n public boolean isFinished() {\n return false;\n }", "public boolean shouldContinueExecuting() {\n return this.currentTask >= 0 && super.shouldContinueExecuting();\n }", "@Override\r\n public void execute()\r\n {\r\n printInvalidCommandMessage();\r\n }" ]
[ "0.77345294", "0.77345294", "0.7678753", "0.76457655", "0.75966", "0.7554271", "0.6877811", "0.6748956", "0.6728847", "0.66855806", "0.65891784", "0.65624696", "0.64980483", "0.63857424", "0.63736373", "0.6356819", "0.6356819", "0.63498974", "0.63401324", "0.63290936", "0.63238996", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.6319047", "0.63158405", "0.63097465", "0.63097465", "0.62977403", "0.62754494", "0.62744504", "0.62744504", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.62499565", "0.6211897", "0.62113553", "0.62087166", "0.62087166", "0.62084436", "0.6203807", "0.619581", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.6184869", "0.61709535", "0.61614436", "0.61614436", "0.61614436", "0.61614436", "0.61614436", "0.6158993", "0.61529076", "0.61481965", "0.6146213", "0.6145282", "0.6143307" ]
0.0
-1
Called once after isFinished returns true
protected void end() { Robot.drive.stop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected boolean isFinished() {\n return true;\n }", "@Override\n protected boolean isFinished() {\n return true;\n }", "@Override\n public boolean isFinished() {\n return true;\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "@Override\n protected boolean isFinished()\n {\n return false;\n }", "@Override\n protected boolean isFinished() \n {\n return false;\n }", "@Override\n public boolean isFinished() {\n return true;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n boolean isFinished() {\n return false;\n }", "@Override\r\n protected boolean isFinished() {\n return false;\r\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished(){\r\n return true;\r\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n protected boolean isFinished() {\n return isFinished;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\n public boolean isFinished() {\n return false;\n }", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn false;\r\n\t}", "@Override\n\tprotected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "@Override\r\n protected boolean isFinished() {\n if (super.isFinished()) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "@Override\n protected boolean isFinished() {\n return finished;\n }", "protected boolean isFinished()\n\t{\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean isFinished() {\n\t\treturn false;\n\t}", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }" ]
[ "0.8585856", "0.85401976", "0.8334428", "0.83323556", "0.83323556", "0.8307301", "0.8305363", "0.82994324", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82779974", "0.82768977", "0.82696104", "0.8238244", "0.8238244", "0.82302517", "0.8207274", "0.8207274", "0.8207274", "0.8207274", "0.8207274", "0.8207274", "0.8163367", "0.81599504", "0.81599504", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.8152263", "0.81464106", "0.813853", "0.813853", "0.813853", "0.813853", "0.813853", "0.81261516", "0.81261516", "0.8113842", "0.81128186", "0.80896306", "0.8084495", "0.80417717", "0.80417717", "0.80417717", "0.80337167", "0.80337167", "0.80337167", "0.80337167", "0.80337167", "0.80337167", "0.80337167", "0.80337167", "0.80337167", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887", "0.8027887" ]
0.0
-1
Called when another command which requires one or more of the same subsystems is scheduled to run
protected void interrupted() { end(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 /**\n * Set the default command for a subsystem here\n */\n public void initDefaultCommand() \n {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "private void registerCommands() {\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecurtick\")\n\t\t\t\t\t\t.then(argument(\"Number of Ticks Between Sends\", integer())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.timeBetween = getInteger(c, \"Number of Ticks Between Sends\");\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message will be sent every \" + getInteger(c, \"Number of Ticks Between Sends\") + \" ticks.\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//arrecurphrase [Recurring Phrase]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecurphrase\")\n\t\t\t\t\t\t.then(argument(\"Recurring Phrase\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.persistentPhrase = getString(c, \"Recurring Phrase\");\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message set to \\\"\" + getString(c, \"Recurring Phrase\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//arrecurtoggle\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecurtoggle\")\n\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\tconfig.persistentChat = !config.persistentChat;\n\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message has been turned \" + (config.persistentChat ? \"on\" : \"off\") + \".\"), false);\n\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t})\n\t\t));\n\t\t//arrecur [Enabled?]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arrecur\")\n\t\t\t\t\t\t.then(argument(\"Enabled?\", bool())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.persistentChat = getBool(c, \"Enabled?\");\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Recurring message set to \\\"\" + (config.persistentChat ? \"on\" : \"off\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//aradditem [Item Name] [Trigger Term]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddterm\")\n\t\t\t\t\t\t.then(argument(\"Item Name\", string())\n\t\t\t\t\t\t\t\t.then(argument(\"Trigger Term\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.terms.add(getString(c, \"Trigger Term\") + \"|\" + getString(c, \"Item Name\"));\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tHelper.setupChatMessages();\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added term \\\"\" + getString(c, \"Trigger Term\") + \"\\\" to item \\\"\" + getString(c, \"Item Name\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t})))\n\t\t));\n\t\t//araddin [In Phrase]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddin\")\n\t\t\t\t\t\t.then(argument(\"In Phrase\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.ins.add(getString(c, \"In Phrase\"));\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added in-phrase \\\"\" + getString(c, \"In Phrase\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//araddout [Out Phrase]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddout\")\n\t\t\t\t\t\t.then(argument(\"Out Phrase\", string())\n\t\t\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\t\t\tconfig.outs.add(getString(c, \"Out Phrase\"));\n\t\t\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added out-phrase \\\"\" + getString(c, \"Out Phrase\") + \"\\\".\"), false);\n\t\t\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t\t\t}))\n\t\t));\n\t\t//arreload\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"arreload\")\n\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\tarreload();\n\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"AutoReply config reloaded.\"), false);\n\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t})\n\t\t));\n\t\t//araddshopitem [Item Name] [Quantity] [Price]\n\t\tCommandRegistry.INSTANCE.register(false, (dispatcher) -> dispatcher.register(\n\t\t\t\tCommandManager.literal(\"araddshopitem\")\n\t\t\t\t\t\t.then(argument(\"Item Name\", string()).then(argument(\"Quantity\", string()).then(argument(\"Price\", string())\n\t\t\t\t\t\t.executes(c -> {\n\t\t\t\t\t\t\tconfig.shopItems.add(getString(c, \"Item Name\") + \"|\" + getString(c, \"Quantity\") + \"|$\" + getString(c, \"Price\"));\n\t\t\t\t\t\t\tConfigManager.saveConfig(config, \"AutoReplyConfigFile\");\n\t\t\t\t\t\t\tc.getSource().sendFeedback(new StringTextComponent(\"Added \" + getString(c, \"Item Name\") + \" to shop stock.\"), false);\n\t\t\t\t\t\t\treturn Command.SINGLE_SUCCESS;\n\t\t\t\t\t\t}))))\n\t\t));\n\t}", "@Override\n\t\tpublic void subTask(String arg0) {\n\n\t\t}", "public InstantCommand(Runnable toRun, Subsystem... requirements) {\n\t\trequireNonNull(toRun);\n\t\tm_toRun = toRun;\n\t\taddRequirements(requirements);\n\t}", "private void registerCommands() {\n }", "protected void runSubCommand(int num) {\n subCommands[num].execute();\n }", "public static void twoClientSetupProcesses() {\n\n\tList<String> aClientTags=TagsFactory.getAssignmentTags().getTwoClientClientTags();\n\tList<String> aServerTags=TagsFactory.getAssignmentTags().getTwoClientServerTags();\n\n\ttwoClientSetupProcesses(aClientTags, aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcessTeams(Arrays.asList(\"RegistryBasedDistributedProgram\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setTerminatingProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Registry\", \"Server\", \"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Registry\", Arrays.asList(\"Registry\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Server\", aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_0\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_1\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Registry\", FlexibleStaticArgumentsTestCase.TEST_REGISTRY_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Server\", FlexibleStaticArgumentsTestCase.TEST_SERVER_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_0\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_0_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_1\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_1_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Registry\", 500);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Server\", 2000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_0\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_1\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().getProcessTeams().forEach(team -> System.out.println(\"### \" + team));\n}", "@Override\r\n\tpublic void subTask(String name) {\n\t}", "@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}", "void beginPeriodic() {\n\t\t// if some subsystems need to get called in all modes at the beginning\n\t\t// of periodic, do it here\n\n\t\t// don't need to do anything\n\t}", "@Override\n public void configureTasks( ScheduledTaskRegistrar registrar ) {\n registrar.setScheduler( rhizomeScheduler() );\n }", "private void isCommandInstance() throws SystemException {\r\n\t\tif (commandInstance != null) return;\r\n\t\tif (commandResponder != null) SystemException.softwareProblem(\"This was not a command instance. There is a bug. Either the super for the command is not well formed or it called a method it shouldn't.\");\r\n\t\tinstantiateCommand();\r\n\t}", "public PnuematicSubsystem() {\n\n }", "public void TurnCommand() {\n\n requires(Robot.driveSubsystem);\n\n }", "public void performOtherTasks() {\n\t\t\tSystem.out.println(\"performing tasks other than servicing\");\n\t\t\t// do whatever you want to do in the servicing package\n\t\t}", "public void act() {\n\t\tfor (Manager manager : managers.values())\n\t\t\tmanager.act();\n\t\t\n\t\tif (hasPriority == Priority.ARMY && armyQueue.size() > 0) {\n\t\t\t//Tell ArmyManager to build top unit in queue\n\t\t}\n\t\telse if (hasPriority == Priority.BUILDINGS && buildingQueue.size() > 0) {\n\t\t\t//Tell BuildManager to build top building in queue\n\t\t}\n\t\telse if (hasPriority == Priority.WORKERS) {\n\t\t\t//ResourceManager has requested more workers\n\t\t}\n\t}", "@SystemAPI\npublic interface ScheduleEvent extends IOperation {\n\t/**\n\t * \n\t * @return\tDe duur van de planbare actie (in Millis)\n\t */\n\tpublic TimeDuration getDuration();\n\t\n\t/**\n\t * \n\t * @return\tDe periode waarop de actie gescheduled is\n\t * \t\t\tDit wordt ingesteld door de Scheduler\n\t */\n\t@SystemAPI\n\tpublic TimePeriod getScheduledPeriod(); \n\t\n\t/**\n\t * Als de schedulable specifieke resources nodig heeft, bv. een bepaalde \n\t * dokter of verpleegster, dan komen deze in de onderstaande List.\n\t * @return\t\tDe lijst met specifieke resources die nodig zijn.\n\t */\n\tpublic List<ScheduleResource> neededSpecificResources();\n\t\n\t/**\n\t * \n\t * @return\tEen lijst met de nodige resources.\n\t */\n\tpublic List<ResourceType> neededResources();\n\t\n\t/**\n\t * Zet de periode wanneer de actie gescheduled is.\n\t * @param scheduledPeriod\tDe nieuwe geplande periode\n\t * @param usesResources\tDe resources die gebruikt worden bij het plannen\n\t * @param campus De campus die gebruikt wordt bij het plannen\n\t * @throws SchedulingException Als er niet gepland kan worden\n\t */\n\tpublic void schedule(TimePeriod scheduledPeriod, List<ScheduleResource> usesResources, Campus campus) throws SchedulingException;\n\t\t\n\t/**\n\t * Een methode om te controleren of de events behorende bij een warenhuis gepland kunnen worden.\n\t * @param warehouse\n\t * \t\t Het warenhuis waar gepland moet worden\n\t * @return true\n\t * \t\t Als er gepland kan worden\n\t * @return false\n\t * \t\t Als er niet gepland kan worden\n\t */\n\tpublic boolean canBeScheduled(Warehouse warehouse) ;\n\t\n\t/**\n\t * Een methode om een warehuis te updaten. Met de booleanse waarde\n\t * kan de actie ongedaan gemaakt worden.\n\t * \n\t * @param warehouse\n\t * \t\t Het warenhuis geupdate moet worden\n\t * @param inverse\n\t * \t\t De soort update\n\t */\n\tpublic void updateWarehouse(Warehouse warehouse, boolean inverse) ;\n\t\n\t/**\n\t * Een methode om de prioriteit op te vragen.\n\t * @return\n\t */\n\tpublic Priority getPriority() ;\t\n\t\n\t/**\n\t * Methode die de campus waarop deze actie wordt uitgevoerd opslaat, zodat\n\t * ze later kan gereproduceerd worden wanneer er geannuleerd werd.\n\t * @param \tcampus\n\t * \t\t\tDe CampusId van de campus die moet opgeslagen worden\n\t */\n\tpublic void setHandlingCampus(CampusId campus) ;\n\t\n\t/**\n\t * Methode die de opgeslagen campus terug opvraagt.\n\t * @return\tDe opgeslagen campus\n\t */\n\tpublic CampusId getHandlingCampus();\n\t\n\t/**\n\t * \n\t * @return event type\n\t */\n\t@SystemAPI\n\tpublic EventType getEventType();\n\t\n\t/**\n\t * @return start event\n\t */\n\tpublic Event getStart();\n\t\n\t/**\n\t * \n\t * @return stop event\n\t */\n\tpublic Event getStop();\n}", "@Override\n protected int run() throws Exception {\n if (User.current() == null) {\n stderr.println(\"Must be logged in before executing...\");\n return 1;\n }\n\n // First check to see if they exist\n Jenkins instance = Jenkins.getInstance();\n AbstractProject project1 = instance.getItemByFullName(first, AbstractProject.class);\n if (project1 == null) {\n throw new CmdLineException(null, \"Project: \" + first + \" does not exist\");\n }\n AbstractProject project2 = instance.getItemByFullName(second, AbstractProject.class);\n if (project2 == null) {\n throw new CmdLineException(null, \"Project: \" + second + \" does not exist\");\n }\n\n // Make sure user has permission to build.\n if (!project1.hasPermission(Item.BUILD) &&\n !project2.hasPermission(Item.BUILD)) {\n throw new CmdLineException(null, \"You do not have permission to execute these jobs.\");\n }\n\n // Let's build both projects.\n project1.scheduleBuild2(0);\n project2.scheduleBuild2(0);\n return 0;\n }", "@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n setDefaultCommand(new tankDrive());\n }", "@Scheduled(cron = \"${toil1.schedule2}\")\n\tpublic void toiL1Schedule2() {\n\t\tlog.info(\"Running toiL1Schedule2\");\n\t\trunToiL1Schedule();\n\t\trunToiBlogsL1Schedule();\n\t}", "private void commandCheck() {\n\t\t//add user command\n\t\tif(cmd.getText().toLowerCase().equals(\"adduser\")) {\n\t\t\t/*\n\t\t\t * permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\t * There will be more user level commands added in version 2, like changing rename to allow a\n\t\t\t * user to rename themselves, but not any other user. Admins can still rename all users.\n\t\t\t */\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\taddUser();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//delete user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"deluser\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tdelUser();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t};\n\t\t}\n\t\t//rename user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"rename\")) {\n\t\t\t//permissions check: if user is an admin, allow the user o chose a user to rename.\n\t\t\t//If not, allow the user to rename themselves only.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\trename(ALL);\n\t\t\t}\n\t\t\telse {\n\t\t\t\trename(SELF);\n\t\t\t}\n\t\t}\n\t\t//promote user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"promote\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tpromote();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//demote user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"demote\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tdemote();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//the rest of the commands are user level, no permission checking\n\t\telse if(cmd.getText().toLowerCase().equals(\"ccprocess\")) {\n\t\t\tccprocess();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"cprocess\")) {\n\t\t\tcprocess();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"opentill\")) {\n\t\t\topenTill();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"closetill\")) {\n\t\t\tcloseTill();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"opendrawer\")) {\n\t\t\topenDrawer();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"sale\")) {\n\t\t\tsale();\n\t\t}\n\t\t//if the command that was entered does not match any command, return an error.\n\t\telse {\n\t\t\terror(CMD_NOT_FOUND);\n\t\t}\n\t}", "public void verifyAndRegister() {\n // All top level commands are supposed to be registered in the command manager\n this.internalTree.children.stream().map(Node::getValue).forEach(commandArgument -> {\n if (!(commandArgument instanceof StaticArgument)) {\n throw new IllegalStateException(\"Top level command argument cannot be a variable\");\n }\n });\n\n this.checkAmbiguity(this.internalTree);\n\n // Verify that all leaf nodes have command registered\n this.getLeaves(this.internalTree).forEach(leaf -> {\n if (leaf.getOwningCommand() == null) {\n throw new NoCommandInLeafException(leaf);\n } else {\n final Command<C> owningCommand = leaf.getOwningCommand();\n this.commandManager.getCommandRegistrationHandler().registerCommand(owningCommand);\n }\n });\n\n // Register command permissions\n this.getLeavesRaw(this.internalTree).forEach(node -> {\n // noinspection all\n final CommandPermission commandPermission = node.getValue().getOwningCommand().getCommandPermission();\n /* All leaves must necessarily have an owning command */\n node.nodeMeta.put(\"permission\", commandPermission);\n // Get chain and order it tail->head then skip the tail (leaf node)\n List<Node<CommandArgument<C, ?>>> chain = this.getChain(node);\n Collections.reverse(chain);\n chain = chain.subList(1, chain.size());\n // Go through all nodes from the tail upwards until a collision occurs\n for (final Node<CommandArgument<C, ?>> commandArgumentNode : chain) {\n final CommandPermission existingPermission = (CommandPermission) commandArgumentNode.nodeMeta\n .get(\"permission\");\n\n CommandPermission permission;\n if (existingPermission != null) {\n permission = OrPermission.of(Arrays.asList(commandPermission, existingPermission));\n } else {\n permission = commandPermission;\n }\n\n /* Now also check if there's a command handler attached to an upper level node */\n if (commandArgumentNode.getValue() != null && commandArgumentNode\n .getValue()\n .getOwningCommand() != null) {\n final Command<C> command = commandArgumentNode.getValue().getOwningCommand();\n if (this\n .getCommandManager()\n .getSetting(CommandManager.ManagerSettings.ENFORCE_INTERMEDIARY_PERMISSIONS)) {\n permission = command.getCommandPermission();\n } else {\n permission = OrPermission.of(Arrays.asList(permission, command.getCommandPermission()));\n }\n }\n\n commandArgumentNode.nodeMeta.put(\"permission\", permission);\n }\n });\n }", "void legalCommand();", "@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 registerCommand(BaseCommand baseCommand) throws Exception {\n baseCommand.setShard(shard);\n Command botCommand = baseCommand.botCommand;\n for (BaseCommand cmd : baseCommands) {\n if (StringUtils.stripAccents(cmd.getCommandIdentifier()).equalsIgnoreCase(StringUtils.stripAccents\n (botCommand.getCommandIdentifier())))\n {\n System.out.println(\"Multiple baseCommands cannot be registered under the same name. Ignoring new \" +\n \"instance\" +\n \".\\n\" +\n \"Name: \" + baseCommand.toString());\n return;\n }\n }\n botCommand.setupSubcommands();\n baseCommands.add(baseCommand);\n commandUsages.put(baseCommand.commandIdentifier, (long) 0);\n System.out.println(\"Successfully registered \" + baseCommand.toString());\n }", "public abstract void checkingCommand(String nameOfCommand, ArrayList<Unit> units);", "@Override\n public void adjustStartEventSubscriptions(ProcessDefinitionEntity newLatestProcessDefinition, ProcessDefinitionEntity oldLatestProcessDefinition) {\n super.adjustStartEventSubscriptions(newLatestProcessDefinition, oldLatestProcessDefinition);\n\n LOG.debug(\"Adding start event simulation timers.\");\n removeObsoleteStartEventSimulationJobs(newLatestProcessDefinition);\n addStartEventSimulationJobs(newLatestProcessDefinition);\n }", "@Test\n public void testSubsystem1_1() throws Exception {\n KernelServices servicesA = super.createKernelServicesBuilder(createAdditionalInitialization())\n .setSubsystemXml(readResource(\"keycloak-1.1.xml\")).build();\n Assert.assertTrue(\"Subsystem boot failed!\", servicesA.isSuccessfulBoot());\n ModelNode modelA = servicesA.readWholeModel();\n super.validateModel(modelA);\n }", "private static void performRoomManagement() {\n\t\t\r\n\t\t\r\n\r\n\t}", "public void testRunnableWithOtherRule() {\n \t\tISchedulingRule rule = new ISchedulingRule() {\n \t\t\tpublic boolean contains(ISchedulingRule rule) {\n \t\t\t\treturn rule == this;\n \t\t\t}\n \t\t\tpublic boolean isConflicting(ISchedulingRule rule) {\n \t\t\t\treturn rule == this;\n \t\t\t}\n \t\t};\n \t\ttry {\n \t\t\tgetWorkspace().run(new IWorkspaceRunnable() {\n \t\t\t\tpublic void run(IProgressMonitor monitor) {\n \t\t\t\t\t//noop\n \t\t\t\t}\n \t\t\t}, rule, IResource.NONE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t}", "private void loadRegistredCommands() {\n ServiceLoader<Command> loader = ServiceLoader.load(Command.class);\n for (Command command : loader) {\n addCommand(command);\n }\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 }", "private void scheduleOrExecuteJob() {\n try {\n for (TaskScheduler entry : this.schedulers.values()) {\n StandardTaskScheduler scheduler = (StandardTaskScheduler) entry;\n // Maybe other thread close&remove scheduler at the same time\n synchronized (scheduler) {\n this.scheduleOrExecuteJobForGraph(scheduler);\n }\n }\n } catch (Throwable e) {\n LOG.error(\"Exception occurred when schedule job\", e);\n }\n }", "private void registerCommands() {\n CommandSpec showBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.show\")\r\n .description(Text.of(\"Show how many Banpoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsShow.class)).build();\r\n\r\n CommandSpec addBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.add\")\r\n .description(Text.of(\"Add a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsAdd.class)).build();\r\n\r\n CommandSpec removeBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.remove\")\r\n .description(Text.of(\"Remove a specified amount of Banpoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandBanpointsRemove.class)).build();\r\n\r\n CommandSpec banpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints\")\r\n .description(Text.of(\"Show the Banpoints help menu\")).arguments(GenericArguments.none())\r\n .child(showBanpoints, \"show\").child(addBanpoints, \"add\").child(removeBanpoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, banpoints, \"banpoints\", \"bp\");\r\n\r\n CommandSpec showMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.show\")\r\n .description(Text.of(\"Show how many Mutepoints the specified player has \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsShow.class)).build();\r\n\r\n CommandSpec addMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsAdd.class)).build();\r\n\r\n CommandSpec removeMutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Add a specified amount of Mutepoints to a player \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))),\r\n GenericArguments.onlyOne(GenericArguments.integer(Text.of(\"amount\"))))\r\n .executor(childInjector.getInstance(CommandMutepointsRemove.class)).build();\r\n\r\n CommandSpec mutepoints = CommandSpec.builder().permission(\"dtpunishment.mutepoints\")\r\n .description(Text.of(\"Show the Mutepoints help menu\")).arguments(GenericArguments.none())\r\n .child(showMutepoints, \"show\").child(addMutepoints, \"add\").child(removeMutepoints, \"remove\").build();\r\n\r\n Sponge.getCommandManager().register(this, mutepoints, \"mutepoints\", \"mp\");\r\n\r\n CommandSpec playerInfo = CommandSpec.builder().permission(\"dtpunishment.playerinfo\")\r\n .description(Text.of(\"Show your info \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.optionalWeak(GenericArguments.requiringPermission(\r\n GenericArguments.user(Text.of(\"player\")), \"dtpunishment.playerinfo.others\"))))\r\n .executor(childInjector.getInstance(CommandPlayerInfo.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, playerInfo, \"pinfo\", \"playerinfo\");\r\n\r\n CommandSpec addWord = CommandSpec.builder().permission(\"dtpunishment.word.add\")\r\n .description(Text.of(\"Add a word to the list of banned ones \"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.string(Text.of(\"word\"))))\r\n .executor(childInjector.getInstance(CommandWordAdd.class)).build();\r\n\r\n Sponge.getCommandManager().register(this, addWord, \"addword\");\r\n\r\n CommandSpec unmute = CommandSpec.builder().permission(\"dtpunishment.mutepoints.add\")\r\n .description(Text.of(\"Unmute a player immediately (removing all mutepoints)\"))\r\n .arguments(GenericArguments.onlyOne(GenericArguments.user(Text.of(\"player\"))))\r\n .executor(childInjector.getInstance(CommandUnmute.class)).build();\r\n\r\n CommandSpec reloadConfig = CommandSpec.builder().permission(\"dtpunishment.admin.reload\")\r\n .description(Text.of(\"Reload configuration from disk\"))\r\n .executor(childInjector.getInstance(CommandReloadConfig.class)).build();\r\n\r\n CommandSpec adminCmd = CommandSpec.builder().permission(\"dtpunishment.admin\")\r\n .description(Text.of(\"Admin commands for DTPunishment\")).child(reloadConfig, \"reload\")\r\n .child(unmute, \"unmute\").build();\r\n\r\n Sponge.getCommandManager().register(this, adminCmd, \"dtp\", \"dtpunish\");\r\n }", "@Command\n\tpublic void buscar() {\n\t}", "private void doCommand() {\n try {\n TimeUnit.SECONDS.sleep(2L);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "private void registerCommands(){\n getCommand(\"mineregion\").setExecutor(new MineRegionCommand());\n getCommand(\"cellblock\").setExecutor(new CellBlockCommand());\n getCommand(\"cell\").setExecutor(new CellCommand());\n getCommand(\"prisonblock\").setExecutor(new PrisonBlockCommand());\n getCommand(\"rankup\").setExecutor(new RankUpCommand());\n getCommand(\"portal\").setExecutor(new PortalCommand());\n }", "private static void executeTask02() {\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 }", "public void subTask(String name) {\n\r\n\t}", "void cronScheduledProcesses();", "public DefaultAutonomous(DriveSubsystem ds,\n ShooterSubSystem ss,\n LEDSubSystem ls,\n XboxController manipulator,\n double distanceInFeet) {\n // Add your commands in the super() call, e.g.\n // super(new FooCommand(), new BarCommand());\n super(new ShooterCommand(ss, ls, manipulator, true, Constants.kShooterSpeedSlow).withTimeout(5),\n new DriveADistanceInFeet(ds, distanceInFeet, true).withTimeout(5));\n }", "private static void setSubsystems()\n {\n //Components\n //Talons\n frontLeftTalon.setName(\"DrivetrainSubsystem\", \"FrontLeftDriveTalon\");\n frontRightTalon.setName(\"DrivetrainSubsystem\", \"FrontRightDriveTalon\");\n rearLeftTalon.setName(\"DrivetrainSubsystem\", \"RearLeftDriveTalon\");\n rearRightTalon.setName(\"DrivetrainSubsystem\", \"RearRightDriveTalon\");\n //Sensors\n //navX.setName(\"SensorSubsystem\", \"NavX\");\n System.out.print(pigeon.getAbsoluteCompassHeading());\n \n //Subsystems\n drivetrainSubsystem.setName(\"DrivetrainSubsystem\", \"DrivetrainSubsystem\");\n sensorSubsystem.setName(\"SensorSubsystem\", \"SensorSubsystem\");\n }", "@Override\n public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n setDefaultCommand(new HatchExtend());\n setDefaultCommand(new HatchRetract());\n }", "private void scheduleJob() {\n\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 }", "@Test\n\tpublic void testAddCommand1() {\n\t\tString task1 = \"normal task\";\n\t\tString task2 = \"priority task\";\n\t\tString label = testData.getCurrLabel();\n\t\t\n\t\tAddCommand comd = new AddCommand(task1, new TDTDateAndTime(), false);\n\t\tassertEquals(String.format(AddCommand.MESSAGE_ADD_FEEDBACK, label), comd.execute(testData));\n\t\t\n\t\tcomd = new AddCommand(task2, new TDTDateAndTime(), true);\n\t\tassertEquals(String.format(AddCommand.MESSAGE_ADD_FEEDBACK, label), comd.execute(testData));\n\t\t\n\t\tArrayList<Task> taskList = testData.getTaskListFromLabel(label);\n\t\tassertEquals(2, taskList.size());\n\t\tassertTrue(task2.equals(taskList.get(0).getDetails()));\n\t\tassertTrue(taskList.get(0).isHighPriority());\n\t\tassertTrue(task1.equals(taskList.get(1).getDetails()));\n\t\tassertFalse(taskList.get(1).isHighPriority());\n\t}", "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\tpublic void autonomousInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.start();\n\t}", "public void subTask(String tr) {\n\t\t\n\t}", "public void initDefaultCommand() {\r\n // Set the default command for a subsystem here.\r\n //setDefaultCommand\r\n }", "private void processWTBy(WasTriggeredBy dep) {\n\n\t}", "@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 run() {\n CuratorLocker locker = new CuratorLocker(schedulerBuilder.getServiceSpec());\n\n Runtime.getRuntime().addShutdownHook(new Thread(() -> {\n LOGGER.info(\"Shutdown initiated, releasing curator lock\");\n locker.unlock();\n }));\n locker.lock();\n\n SchedulerConfig schedulerConfig = SchedulerConfig.fromEnv();\n Metrics.configureStatsd(schedulerConfig);\n AbstractScheduler scheduler = schedulerBuilder.build();\n scheduler.start();\n Optional<Scheduler> mesosScheduler = scheduler.getMesosScheduler();\n if (mesosScheduler.isPresent()) {\n SchedulerApiServer apiServer = new SchedulerApiServer(schedulerConfig, scheduler.getResources());\n apiServer.start(new AbstractLifeCycle.AbstractLifeCycleListener() {\n @Override\n public void lifeCycleStarted(LifeCycle event) {\n scheduler.markApiServerStarted();\n }\n });\n\n runScheduler(\n scheduler.frameworkInfo,\n mesosScheduler.get(),\n schedulerBuilder.getServiceSpec(),\n schedulerBuilder.getSchedulerConfig(),\n schedulerBuilder.getStateStore());\n } else {\n /**\n * If no MesosScheduler is provided this scheduler has been deregistered and should report itself healthy\n * and provide an empty COMPLETE deploy plan so it may complete its UNINSTALL.\n *\n * See {@link UninstallScheduler#getMesosScheduler()}.\n */\n Plan emptyDeployPlan = new Plan() {\n @Override\n public List<Phase> getChildren() {\n return Collections.emptyList();\n }\n\n @Override\n public Strategy<Phase> getStrategy() {\n return new SerialStrategy<>();\n }\n\n @Override\n public UUID getId() {\n return UUID.randomUUID();\n }\n\n @Override\n public String getName() {\n return Constants.DEPLOY_PLAN_NAME;\n }\n\n @Override\n public List<String> getErrors() {\n return Collections.emptyList();\n }\n };\n\n PlanManager emptyPlanManager = DefaultPlanManager.createProceeding(emptyDeployPlan);\n PlansResource emptyPlanResource = new PlansResource();\n emptyPlanResource.setPlanManagers(Arrays.asList(emptyPlanManager));\n\n schedulerBuilder.getStateStore().clearAllData();\n\n SchedulerApiServer apiServer = new SchedulerApiServer(\n schedulerConfig,\n Arrays.asList(\n emptyPlanResource,\n new HealthResource()));\n apiServer.start(new AbstractLifeCycle.AbstractLifeCycleListener() {\n @Override\n public void lifeCycleStarted(LifeCycle event) {\n LOGGER.info(\"Started trivially healthy API server.\");\n }\n });\n }\n }", "protected abstract void scheduler_init();", "@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 }", "private void processCommand(String command) {\n if (command.equals(\"a\")) {\n doAddTask();\n } else if (command.equals(\"r\")) {\n doRemoveTask();\n } else if (command.equals(\"c\")) {\n doMarkTaskAsCompleted();\n } else if (command.equals(\"m\")) {\n doModifyTask();\n } else if (command.equals(\"v\")) {\n doViewAllTasks();\n } else if (command.equals(\"ct\")) {\n doViewAllCompletedTasks();\n } else if (command.equals(\"s\")) {\n saveTasks();\n } else {\n System.out.println(\"Invalid selection, kindly select from the options available.\");\n }\n }", "@Override\n\tprotected ArrayList<String> getCommandsToExecute() {\n\t\treturn null;\n\t}", "public void noSuchCommand() {\n }", "public void registerCommands() {\n\t CommandSpec cmdCreate = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdCreate.getInstance())\n\t .permission(\"blockyarena.create\")\n\t .build();\n\n\t CommandSpec cmdRemove = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdRemove.getInstance())\n\t .permission(\"blockyarena.remove\")\n\t .build();\n\n\t CommandSpec cmdJoin = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"mode\")))\n\t )\n\t .executor(CmdJoin.getInstance())\n\t .build();\n\n\t CommandSpec cmdQuit = CommandSpec.builder()\n\t .executor(CmdQuit.getInstance())\n\t .build();\n\n\t CommandSpec cmdEdit = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t GenericArguments.optional(onlyOne(GenericArguments.string(Text.of(\"param\"))))\n\t )\n\t .executor(CmdEdit.getInstance())\n\t .permission(\"blockyarena.edit\")\n\t .build();\n\n\t CommandSpec cmdKit = CommandSpec.builder()\n\t .arguments(onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdKit.getInstance())\n\t .build();\n\n\t CommandSpec arenaCommandSpec = CommandSpec.builder()\n\t .child(cmdEdit, \"edit\")\n\t .child(cmdCreate, \"create\")\n\t .child(cmdRemove, \"remove\")\n\t .child(cmdJoin, \"join\")\n\t .child(cmdQuit, \"quit\")\n\t .child(cmdKit, \"kit\")\n\t .build();\n\n\t Sponge.getCommandManager()\n\t .register(BlockyArena.getInstance(), arenaCommandSpec, \"blockyarena\", \"arena\", \"ba\");\n\t }", "@Override\n public void run() {\n\n\n\n System.out.println(\"run scheduled jobs.\");\n\n\n checkBlackOutPeriod();\n\n\n\n checkOfficeActionPeriod1();\n\n checkAcceptedFilings();\n\n checkNOAPeriod();\n checkFilingExtensions();\n\n\n\n }", "public void mainCommands() {\n\t\tint inputId = taskController.getInt(\"Please input the number of your option: \", \"You must input an integer!\");\n\t\tswitch (inputId) {\n\t\tcase 1:\n\t\t\tthis.taskController.showTaskByTime();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tthis.taskController.filterAProject();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tthis.taskController.addTask();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tthis.taskController.EditTask();\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tthis.taskController.removeTask();\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tthis.taskController.saveTaskList();\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"Thank you for coming, Bye!\");\n\t\t\tthis.exit = true;\n\t\t\t// save the task list before exit all the time.\n\t\t\tthis.taskController.saveTaskList();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"This is not a valid option, please input 1 ~ 7.\");\n\t\t\tbreak;\n\t\t}\n\n\t}", "@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}", "@Override\r\n\tpublic void doInitialSchedules() {\n\t}", "@Override\n protected void execute() {\n Robot.toteLifterSubsystem.setEjectorState(EjectorState.EXTENDING, ramper.process(1.0));\n }", "@Override\n public void autonomousPeriodic() {\n\t// updateDiagnostics();9\n\tScheduler.getInstance().run();\n }", "private static void CLIapplication() {\n\n\t\tboolean done = false;\n\t\tdo {\n\t\t\tint choice = HQmenu();\n\t\t\tSite newSite;\n\n\t\t\tswitch(choice) {\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"Register exchange office\");\n\t\t\t\tnewSite = createNewSite();\n\t\t\t\tif(sites.containsKey(newSite.getSiteName())) {\n\t\t\t\t\tSystem.out.println(\"Site already registred!1\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsites.putIfAbsent(newSite.getSiteName(), newSite);\t\t\t\t\t\n\t\t\t\t\twriteNewSiteToConfigFile(newSite.getSiteName());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif(sites.isEmpty()) {\n\t\t\t\t\tSystem.out.println(\"You need to register site(s) first.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tCLIHelper.menuInput();\n\t\t\t\tbreak;\n\t\t\tcase 0:\n\t\t\t\tdone = true;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Not a valid menu choice!\");\n\t\t\t}\n\t\t\tlogger.info(\"-------Task_Done-------\\n\");\n\t\t}while(!done);\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}", "private void updateDiagnostics() {\n\t// driveSubsystem.updateDiagnostics();\n\t// elevatorSubsystem.updateDiagnostics();\n\t// cubeSubsystem.updateDiagnostics();\n\t// cubeVision.updateDiagnostics();\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n \tsetDefaultCommand(new DriveWithJoyStickCommand()); // TBD for Commandbased programming\n }", "abstract boolean shouldTaskActivate();", "public void doInitialSchedules() {\n ravenna.schedule();\n milan.schedule();\n venice.schedule();\n\n //Scheduling the public transportaton\n ravenna_milan.activate();\n milan_venice.activate();\n venice_ravenna.activate();\n }", "private void submitCollectSysTrafficTask() {\n\t\tL.i(this.getClass(), \"CollectSysTrafficTask()...\");\n\t\taddTask(new CollectSysTrafficTask());\n\t}", "@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 }", "private synchronized void syncTypeChefAnalyzes() {\r\n\t\tif (threadInExecId.isEmpty()) {\r\n\t\t\tProjectConfigurationErrorLogger.getInstance().clearLogList();\r\n\t\t\trunTypeChefAnalyzes(featureProject.getSourceFolder());\r\n\t\t}\r\n\t\tthreadInExecId.add(Thread.currentThread().getId());\r\n\t}", "void execute() throws Exception {\n\n\t\tif (getSystemState(db) != SYSTEM_STATE_CREATED_COULD_BE_EXACTLY_ONE) {\n\t\t\tInteger ss = getSystemState(db);\n\t\t\tshutDown();\n\t\t\tthrow new Exception(\"System in wrong state for this task: \" + ss);\n\t\t}\n\n\t\tloadExecutionEngine(db);\n\t\tperformUpdate();\n\t\tshutDown();\n\t}", "@Override\n\tpublic boolean combine(EHICommand anotherCommand) {\n\t\treturn false;\n\t}", "public void execute() {\n if (valid()) {\n // behavior of the concrete command\n this.target_territory numArmies += to_deploy;\n }\n }", "@Override\n public void initDefaultCommand() {\n Robot.driveTrain.setDefaultCommand(new xboxDrive());\n // Set the default command for a subsystem here.\n // setDefaultCommand(new MySpecialCommand());\n }", "@Override\r\n\tprotected void beforeSendCommands(String cmds) {\n\r\n\t}", "@Override\r\n\tpublic void execute() \r\n\t\t{\n\t\tsourceArcs = parent.getSourceArcsFromID(child.getServerName());\r\n\t\ttargetArcs = parent.getTargetArcsFromID(child.getServerName());\r\n\t\tredo();\r\n\t\t}", "private void registToWX() {\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n setDefaultCommand(new GearPickupClampIn());\n }", "public synchronized void initializeCommands() {\n/* 101 */ Set<String> ignoredPlugins = new HashSet<String>(this.yaml.getIgnoredPlugins());\n/* */ \n/* */ \n/* 104 */ if (ignoredPlugins.contains(\"All\")) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 109 */ label61: for (Command command : this.server.getCommandMap().getCommands()) {\n/* 110 */ if (commandInIgnoredPlugin(command, ignoredPlugins)) {\n/* */ continue;\n/* */ }\n/* */ \n/* */ \n/* 115 */ for (Class c : this.topicFactoryMap.keySet()) {\n/* 116 */ if (c.isAssignableFrom(command.getClass())) {\n/* 117 */ HelpTopic t = ((HelpTopicFactory)this.topicFactoryMap.get(c)).createTopic(command);\n/* 118 */ if (t != null) { addTopic(t); continue label61; }\n/* */ continue label61;\n/* */ } \n/* 121 */ if (command instanceof PluginCommand && c.isAssignableFrom(((PluginCommand)command).getExecutor().getClass())) {\n/* 122 */ HelpTopic t = ((HelpTopicFactory)this.topicFactoryMap.get(c)).createTopic(command);\n/* 123 */ if (t != null) addTopic(t);\n/* */ \n/* */ } \n/* */ } \n/* 127 */ addTopic((HelpTopic)new GenericCommandHelpTopic(command));\n/* */ } \n/* */ \n/* */ \n/* 131 */ for (Command command : this.server.getCommandMap().getCommands()) {\n/* 132 */ if (commandInIgnoredPlugin(command, ignoredPlugins)) {\n/* */ continue;\n/* */ }\n/* 135 */ for (String alias : command.getAliases()) {\n/* */ \n/* 137 */ if (this.server.getCommandMap().getCommand(alias) == command) {\n/* 138 */ addTopic(new CommandAliasHelpTopic(\"/\" + alias, \"/\" + command.getLabel(), this));\n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 144 */ Collection<HelpTopic> filteredTopics = Collections2.filter(this.helpTopics.values(), Predicates.instanceOf(CommandAliasHelpTopic.class));\n/* 145 */ if (!filteredTopics.isEmpty()) {\n/* 146 */ addTopic((HelpTopic)new IndexHelpTopic(\"Aliases\", \"Lists command aliases\", null, filteredTopics));\n/* */ }\n/* */ \n/* */ \n/* 150 */ Map<String, Set<HelpTopic>> pluginIndexes = new HashMap<String, Set<HelpTopic>>();\n/* 151 */ fillPluginIndexes(pluginIndexes, this.server.getCommandMap().getCommands());\n/* */ \n/* 153 */ for (Map.Entry<String, Set<HelpTopic>> entry : pluginIndexes.entrySet()) {\n/* 154 */ addTopic((HelpTopic)new IndexHelpTopic(entry.getKey(), \"All commands for \" + (String)entry.getKey(), null, entry.getValue(), \"Below is a list of all \" + (String)entry.getKey() + \" commands:\"));\n/* */ }\n/* */ \n/* */ \n/* 158 */ for (HelpTopicAmendment amendment : this.yaml.getTopicAmendments()) {\n/* 159 */ if (this.helpTopics.containsKey(amendment.getTopicName())) {\n/* 160 */ ((HelpTopic)this.helpTopics.get(amendment.getTopicName())).amendTopic(amendment.getShortText(), amendment.getFullText());\n/* 161 */ if (amendment.getPermission() != null) {\n/* 162 */ ((HelpTopic)this.helpTopics.get(amendment.getTopicName())).amendCanSee(amendment.getPermission());\n/* */ }\n/* */ } \n/* */ } \n/* */ }", "public void autonomousInit() {\n autonomousCommand = (Command) autoChooser.getSelected();\n autonomousCommand.start();\n// \n }", "private static void incrementLaunchOrder()\r\n\t{\r\n\t\tlaunchOrder++;\r\n\t}", "@Override\n public void autonomousPeriodic()\n {\n commonPeriodic();\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n \tsetDefaultCommand(new DriveWithJoystick());\n }", "public void initDefaultCommand() {\n // Set the default command for a subsystem here.\n //setDefaultCommand(new MySpecialCommand());\n \tsetDefaultCommand(new VelocityDriveCommand());\n }", "void\t\tregisterCommandDependentWidget(MiPart widget, String command);", "@StartStep(localName=\"command-engineering\", after={\"config\"})\n public static void startCommandEngineering(LifecycleContext context) \n {\n // for each class that is a Catalog or Command, create an entry for those in the context.\n ClassScanner classScanner = new ClassScanner(context);\n classScanner.scan();\n }", "public interface SuperCommand {\n\n /**\n * Setups anything that is needed for this command.\n * <br/><br/>\n * It is recommended you do the following in this method:\n * <ul>\n * <li>Register any of the sub-commands of this command;</li>\n * <li>Define the permission required to use this command using {@link CompositeCommand#setPermission(String)};</li>\n * <li>Define whether this command can only be run by players or not using {@link CompositeCommand#setOnlyPlayer(boolean)};</li>\n * </ul>\n */\n void setup();\n\n /**\n * Returns whether the command can be executed by this user or not.\n * It is recommended to send messages to let this user know why they could not execute the command.\n * Note that this is run previous to {@link #execute(User, String, List)}.\n * @param user the {@link User} who is executing this command.\n * @param label the label which has been used to execute this command.\n * It can be {@link CompositeCommand#getLabel()} or an alias.\n * @param args the command arguments.\n * @return {@code true} if this command can be executed, {@code false} otherwise.\n * @since 1.3.0\n */\n default boolean canExecute(User user, String label, List<String> args) {\n return true;\n }\n\n /**\n * Defines what will be executed when this command is run.\n * @param user the {@link User} who is executing this command.\n * @param label the label which has been used to execute this command.\n * It can be {@link CompositeCommand#getLabel()} or an alias.\n * @param args the command arguments.\n * @return {@code true} if the command executed successfully, {@code false} otherwise.\n */\n boolean execute(User user, String label, List<String> args);\n\n /**\n * Tab Completer for CompositeCommands.\n * Note that any registered sub-commands will be automatically added to the list.\n * Use this to add tab-complete for things like names.\n * @param user the {@link User} who is executing this command.\n * @param alias alias for command\n * @param args command arguments\n * @return List of strings that could be used to complete this command.\n */\n default Optional<List<String>> tabComplete(User user, String alias, List<String> args) {\n return Optional.empty();\n }\n\n}", "private void customCommands(MessageEvent message) {\r\n String command = message.getMessage();\r\n \r\n if (!reservedCommands.contains(command)) {\r\n String[]info;\r\n info = manager.getCommandFromDatabase(command, message.getChannel().getName());\r\n\r\n //checks if the command is in custom mod commands\r\n if (info[1].matches(\"-m\")) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n message.getChannel().send().message(info[0]);\r\n } \r\n else {\r\n message.respond(\"You're not allowed to use this command.\");\r\n }\r\n }\r\n //checks if the command is in the custom commands available to everyone\r\n else if (info[1].matches(\"-e\")) {\r\n message.getChannel().send().message(info[0]);\r\n } \r\n else {\r\n message.respond(\"No such command exists\");\r\n }\r\n }\r\n }", "public static void twoClientSetupProcesses(List<String> aClientTags, List<String> aServerTags ) {\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcessTeams(Arrays.asList(\"RegistryBasedDistributedProgram\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setTerminatingProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Client_0\", \"Client_1\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Registry\", \"Server\", \"Client_1\", \"Client_0\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Registry\", Arrays.asList(\"Registry\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Server\", aServerTags);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_0\", aClientTags);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_1\", aClientTags);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Registry\", FlexibleStaticArgumentsTestCase.TEST_REGISTRY_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Server\", FlexibleStaticArgumentsTestCase.TEST_SERVER_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_0\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_0_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_1\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_1_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Registry\", 500);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Server\", 2000);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Client_0\", 5000);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Client_1\", 5000);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().getProcessTeams().forEach(team -> System.out.println(\"### \" + team));\n}", "@Override\r\n\tpublic void processWorkload() {\n this.spawnUser(periods.get(0).getPeriodStartTimePoint());\t\r\n\t}", "public void registerCommands() {\n commands = new LinkedHashMap<String,Command>();\n \n /*\n * admin commands\n */\n //file util cmds\n register(ReloadCommand.class);\n register(SaveCommand.class);\n \n //shrine cmds\n register(KarmaGetCommand.class);\n register(KarmaSetCommand.class); \n }", "@Override\n\tpublic void launchTasks() throws Exception {\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).switchFridgeOn();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\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\t1000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).setOndulatorPolicy(\"default\");\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t1000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getFridgeTemperature();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t2000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getBatteryEnergy();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t3000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTaskWithFixedDelay(\t\t\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).controllFridge();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 4000, 1000 // délai entre la fin d'une exécution et la suivante, à modifier \n\t\t\t\t\t\t,TimeUnit.MILLISECONDS) ;\n\t\t\t\t\n\t\t\t\tthis.scheduleTaskWithFixedDelay(\t\t\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getEPConsommation();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 1000, 4000 // délai entre la fin d'une exécution et la suivante, à modifier \n\t\t\t\t\t\t,TimeUnit.MILLISECONDS) ;\n\t}", "private void fireEvents() {\n\n if (clockTickCount % clockTicksTillWorkloadChange == 0) {\n clockEventPublisher.fireTriggerWorkloadHandlerEvent(clockTickCount, intervalDurationInMilliSeconds);\n }\n\n // if (clockTickCount % clockTicksTillScalingDecision == 0) {\n // clockEventPublisher.fireTriggerAutoScalerEvent(clockTickCount,\n // intervalDurationInMilliSeconds);\n // }\n\n clockEventPublisher.fireClockEvent(clockTickCount, intervalDurationInMilliSeconds);\n\n // INfrastruktur\n if (clockTickCount % clockTicksTillPublishInfrastructureState == 0) {\n clockEventPublisher.fireTriggerPublishInfrastructureStateEvent(clockTickCount,\n intervalDurationInMilliSeconds);\n\n }\n\n // Queue\n if (clockTickCount % clockTicksTillPublishQueueState == 0) {\n\n clockEventPublisher.fireTriggerPublishQueueStateEvent(clockTickCount, intervalDurationInMilliSeconds);\n }\n\n }" ]
[ "0.57643956", "0.55974686", "0.55269176", "0.54348546", "0.5383537", "0.5364402", "0.53499067", "0.53434175", "0.53294504", "0.53284", "0.5300598", "0.5263391", "0.5255799", "0.52325845", "0.5224349", "0.520375", "0.5192927", "0.51795447", "0.5162683", "0.5153918", "0.51434666", "0.5134509", "0.5129144", "0.510115", "0.51008606", "0.5065819", "0.5059606", "0.5054532", "0.50541395", "0.5050852", "0.5049597", "0.50406003", "0.50282574", "0.5013347", "0.50083745", "0.5003288", "0.49993834", "0.49963355", "0.49963355", "0.4993999", "0.49790418", "0.49743935", "0.49718204", "0.49596357", "0.49578172", "0.49528074", "0.49497777", "0.49470857", "0.4938639", "0.49348605", "0.49311554", "0.49241057", "0.49199486", "0.4917191", "0.49150634", "0.4914322", "0.49140206", "0.49118552", "0.4903022", "0.49008355", "0.48993957", "0.48913902", "0.4885744", "0.48793027", "0.48761743", "0.48715305", "0.48670533", "0.48665512", "0.48655206", "0.48613596", "0.4856071", "0.48540086", "0.48484182", "0.48377773", "0.48370922", "0.48330078", "0.4831647", "0.48154548", "0.48134452", "0.4806127", "0.48033708", "0.4801051", "0.4794893", "0.47927928", "0.4790355", "0.4787274", "0.4787139", "0.47856092", "0.47849664", "0.4784459", "0.47834548", "0.47806397", "0.47804856", "0.4780177", "0.4779246", "0.47754458", "0.47707003", "0.4767734", "0.47599164", "0.47594944", "0.47558802" ]
0.0
-1
Test serialize Date to Timestamp (number of milliseconds since January 1st, 1970, UTC).
@Test public void shouldSerializeToTimestampWhenSerializingDateWithJackson() throws ParseException, JsonProcessingException { SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy hh:mm"); df.setTimeZone(TimeZone.getTimeZone("UTC")); Date date = df.parse("01-01-1970 01:00"); Event event = new Event("party", date); ObjectMapper objectMapper = new ObjectMapper(); String result = objectMapper.writeValueAsString(event); assertThat(result, containsString("party")); assertThat(result, containsString("3600000")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Timestamp toTimestamp( Date date )\n {\n return date != null ? new Timestamp( date.getTime() ) : null;\n }", "Date getTimestamp();", "@Test\n public void testOdtToTs() {\n Instant now = Instant.now();\n OffsetDateTime timestamp = OffsetDateTime.ofInstant(now, ZoneOffset.UTC);\n Timestamp expResult = Timestamps.fromMillis(now.toEpochMilli());\n\n Timestamp result = ProtoUtils.odtToTs(timestamp);\n assertThat(result).isEqualTo(expResult);\n }", "protected static java.sql.Timestamp getConvertedTimestamp(java.util.Date date) {\n\t\tif (date == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn new java.sql.Timestamp(date.getTime());\n\t\t}\n\t}", "Date getTimeStamp();", "public static java.sql.Timestamp convertToTimestamp(java.util.Date uDate) {\n\t\tif (uDate == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tjava.sql.Timestamp timeStamp = new Timestamp(uDate.getTime());\n\t\t\treturn timeStamp;\n\t\t}\n\n\t}", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "com.google.protobuf.Timestamp getTimestamp();", "@Override\n\tpublic Timestamp convert(Date source) {\n\t\treturn new Timestamp(source.getTime());\n\t}", "int getTimestamp();", "public long getTimestamp();", "public long getTimestamp();", "private java.sql.Timestamp convert(java.util.Date date){\r\n \tjava.sql.Timestamp result = null;\r\n \tif(date!=null){\r\n \t\tresult = new java.sql.Timestamp(date.getTime()); \t\t\r\n \t}\r\n \treturn result;\r\n }", "Long timestamp();", "@Override\n public byte[] serialize(Date value) {\n return LONG_SERIALIZER.serialize(value.getTime());\n }", "public abstract Timestamp getDate();", "@Test\n public void testTsToOdt() {\n Instant now = Instant.now();\n now = now.with(ChronoField.NANO_OF_SECOND, 0);\n Timestamp timestamp = Timestamps.fromMillis(now.toEpochMilli());\n OffsetDateTime expResult = OffsetDateTime.ofInstant(now, ZoneOffset.UTC);\n\n OffsetDateTime result = ProtoUtils.tsToOdt(timestamp);\n assertThat(result).isEqualTo(expResult);\n }", "@TypeConverter\n public static String toTimestamp(Date date) {\n if (date != null) {\n return df.format(date);\n }\n return null;\n }", "@SuppressWarnings({\"JdkObsolete\", \"JavaUtilDate\"})\n public @NotNull Date getTimestamp() {\n return (Date) timestamp.clone();\n }", "long getTimestamp();", "public Date getTimestamp() {\r\n return mTimestamp;\r\n }", "@NonNull\n public Date getTimestamp() {\n return timestamp;\n }", "public abstract long getTimestampMillis();", "private long makeTimestamp() {\n return new Date().getTime();\n }", "public static Timestamp toTimestamp(LocalDate date) {\n\t\treturn Timestamp.valueOf(LocalDateTime.of(date, LocalTime.now()));\n\t}", "public Date getTimestamp() {\n return new Date(timestamp.getTime()); // clone\n }", "public abstract void setDate(Timestamp uneDate);", "public void setTimestamp(Date timestamp) {\r\n this.timestamp = timestamp;\r\n }", "public Timestamp getDate(){\n return date;\n }", "public Timestamp() {}", "Date getTimestamp()\n{\n return time_stamp;\n}", "@JsProperty(name = \"timestamp\")\n public native Number getTimestamp();", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public void setTimestamp(Date timestamp) {\n this.timestamp = timestamp;\n }", "String getTimestamp();", "String getTimestamp();", "@JsonProperty(\"timestamp\")\n public Date getTimestamp() {\n return timestamp;\n }", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "static TS valueOf(final Date date) {\n\t\treturn valueOf(date.getTime(), 0); // Does not preserve the Date's zimezone\n\t}", "public Date getDBTimeStamp() throws Exception;", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public Date getTimestamp() {\r\n return this.timestamp;\r\n }", "public void setTimestamp(@NonNull Date timestamp) {\n this.timestamp = timestamp;\n }", "@JsProperty(name = \"timestamp\")\n public native void setTimestamp(@DoNotAutobox Number value);", "public DateTime timestamp() {\n\n\t\tif (timestamp == null) {\n\n\t\t\tfinal DateTimeValue dt = ProtoDateUtil.fromDecimalDateTime(message.getBaseTimeStamp());\n\n\t\t\ttimestamp = new DateTime(dt.getYear(), dt.getMonth(), dt.getDay(), dt.getHour(), dt.getMinute(),\n\t\t\t\t\tdt.getSecond(), dt.getMillis(), ISOChronology.getInstanceUTC());\n\n\t\t}\n\n\t\treturn timestamp;\n\n\t}", "public static org.opencds.vmr.v1_0.schema.TS dateInternal2TS(java.util.Date pDate) {\n\n\t\tString _METHODNAME = \"tSInternal2TS(): \";\n\n\t\tif (pDate == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString errStr = null;\n\t\tjava.util.Date javaTime = pDate;\n\t\tString formatTemplate = \"yyyyMMddHHmmss.SSSZZZZZ\";\n\n\t\t// Format java.util.Date and return schema TS if successful\n\t\torg.opencds.vmr.v1_0.schema.TS lTS = new org.opencds.vmr.v1_0.schema.TS();\n\t\ttry {\n\t\t\t// format and set schema TS object\n\t\t\tlTS.setValue(DateUtility.getInstance().getDateAsString(javaTime, formatTemplate));\n\t\t\treturn lTS;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\terrStr = _METHODNAME + \"java.util.Date \\\"\" + javaTime + \"\\\" threw exception trying to format as: \" + formatTemplate;\n\t\t\tthrow new RuntimeException(errStr + \": \" + e.getMessage() );\n\t\t}\n\t}", "public static String timestampOf(Date date) {\n if (date == null) {\n return null;\n }\n\n return formatDate(date, TIMESTAMP_FORMAT);\n }", "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "public final void testGetTimeStamp() {\n assertEquals(hello.timeStamp, n.getTimeStamp());\n }", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "private static Timestamp toTimestamp(Instant instant) {\n return createTimestamp(instant.getEpochSecond(), instant.getNano());\n }", "public static double dateToMilliseconds(Date value) {\r\n return value.getTime();\r\n }", "@Test\n public void shouldSerializeToTextWhenSerializingDateToISO8601() throws Exception {\n SimpleDateFormat df = new SimpleDateFormat(\"dd-MM-yyyy hh:mm\");\n df.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n\n String toParse = \"01-01-1970 02:30\";\n Date date = df.parse(toParse);\n Event event = new Event(\"party\", date);\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n mapper.setDateFormat(new ISO8601DateFormat());\n String result = mapper.writeValueAsString(event);\n\n assertThat(result, containsString(\"1970-01-01T02:30:00Z\"));\n }", "public Timestamp getDateTrx() \n{\nreturn (Timestamp)get_Value(\"DateTrx\");\n}", "public Timestamp getTimestamp() {\n\n\t\treturn new Timestamp(new Date().getTime());\n\n\t}", "long getTimeStamp();", "UtcT time_stamp () throws BaseException;", "private TimestampUtils(){}", "public void setTimestamp(final Date timestamp) {\r\n mTimestamp = timestamp;\r\n }", "@JsonProperty(\"timestamp\")\n public Double getTimestamp() {\n return timestamp;\n }", "@JsonProperty(\"timestamp\")\n public void setTimestamp(Double timestamp) {\n this.timestamp = timestamp;\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public static Timestamp getSQLTimesTemp(Date data) {\r\n\r\n\t\tTimestamp dt = new Timestamp(data.getTime());\r\n\r\n\t\treturn dt;\r\n\t}", "public Timestamp convertZDT(ZonedDateTime zdt){\n return Timestamp.valueOf(zdt.withZoneSameInstant(ZoneOffset.UTC).toLocalDateTime());\n }", "static long toMilliseconds(Timestamp timestamp) {\n return timestamp.getTime();\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public Long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "@Test\n public void timestampInvalidString() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.TIMESTAMP, new TextNode(\"1234567890\"));\n assertNull(retVal);\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public static Timestamp toTimestamp(Object obj) {\n return toTimestamp(obj, (String) null, (TimeZone) null);\n }", "public static Date formaterStampTilDato(Timestamp timestamp) {\r\n\t\tDate date = new Date(timestamp.getTime());\r\n\t\treturn date;\r\n\t}", "public static long getDateMillisecond(Date date)\n\t{\n\t\treturn date.getTime() - getTimeMillisecond(date);\n\t}", "public Integer getTimestamp() {\n return timestamp;\n }" ]
[ "0.6870104", "0.6784922", "0.65747494", "0.62942004", "0.62612766", "0.62579286", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172504", "0.6172478", "0.61651945", "0.6153877", "0.61246943", "0.61246943", "0.61209506", "0.61014724", "0.609018", "0.6090142", "0.60757864", "0.6049406", "0.6049335", "0.6016386", "0.595717", "0.59545386", "0.59294033", "0.5917945", "0.5896472", "0.58857113", "0.58649045", "0.5857233", "0.58541083", "0.5853856", "0.58482", "0.58465236", "0.5842087", "0.5842087", "0.5842087", "0.5827322", "0.58102584", "0.58102584", "0.5785305", "0.5740649", "0.5740649", "0.5740649", "0.5740649", "0.5740649", "0.5740649", "0.5740649", "0.5739881", "0.5735987", "0.57227534", "0.57082963", "0.57053053", "0.5704851", "0.56625366", "0.5637379", "0.5628794", "0.55907875", "0.55463564", "0.5543463", "0.5543463", "0.55421364", "0.5535671", "0.5534264", "0.55261135", "0.5519375", "0.5518294", "0.55093336", "0.5508141", "0.55001795", "0.5488528", "0.54851973", "0.54739046", "0.5455158", "0.5450408", "0.54492456", "0.5435373", "0.5435349", "0.54353106", "0.5433203", "0.5433203", "0.54319704", "0.5431398", "0.54312724", "0.5430328", "0.5427541", "0.54263955" ]
0.7090471
0
Serialize Date to ISO8601
@Test public void shouldSerializeToTextWhenSerializingDateToISO8601() throws Exception { SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy hh:mm"); df.setTimeZone(TimeZone.getTimeZone("UTC")); String toParse = "01-01-1970 02:30"; Date date = df.parse(toParse); Event event = new Event("party", date); ObjectMapper mapper = new ObjectMapper(); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.setDateFormat(new ISO8601DateFormat()); String result = mapper.writeValueAsString(event); assertThat(result, containsString("1970-01-01T02:30:00Z")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String dateToISO8601(Date date)\n {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SXXX\");\n TimeZone tz = TimeZone.getDefault();\n df.setTimeZone(tz);\n return df.format(date);\n }", "public static String getISO8601StringForDate(Date date){\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\", Locale.ENGLISH);\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"IST\"));\n return dateFormat.format(date);\n }", "public static String toISO8601UTC(Date date) {\n TimeZone tz = TimeZone.getTimeZone(\"UTC\");\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'\");\n df.setTimeZone(tz);\n Log.d(\"DateUtils\", String.format(\"toISO8601UTC: %s\", df.format(date)));\n return df.format(date);\n }", "@Override\n public byte[] serialize(Date value) {\n return LONG_SERIALIZER.serialize(value.getTime());\n }", "@Override\n\tpublic String marshal(Date v) throws Exception {\n\t\tfmt.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n\t\treturn fmt.format(v);\n\t}", "private String getISO8601Timestamp(long date) {\n SimpleDateFormat format = new SimpleDateFormat(TIMESTAMP_FORMAT);\n // Convert the date into YYYY-MM-DDThh:mm:ss.sss\n String result = format.format(date);\n // Get default time zone in +/-hhmm format\n TimeZone tz = TimeZone.getDefault();\n int offset = tz.getRawOffset();\n // Convert the timezone format from +/-hhmm to +/-hh:mm\n String formatTimeZone = String.format(TIMEZONE_FORMAT, offset >= 0 ? \"+\" : \"-\", offset / 3600000, (offset / 60000) % 60);\n return result + formatTimeZone;\n }", "@Test\n public void shouldSerializeToTimestampWhenSerializingDateWithJackson() throws ParseException, JsonProcessingException {\n SimpleDateFormat df = new SimpleDateFormat(\"dd-MM-yyyy hh:mm\");\n df.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n\n Date date = df.parse(\"01-01-1970 01:00\");\n Event event = new Event(\"party\", date);\n\n ObjectMapper objectMapper = new ObjectMapper();\n String result = objectMapper.writeValueAsString(event);\n\n assertThat(result, containsString(\"party\"));\n assertThat(result, containsString(\"3600000\"));\n }", "public static String marshalDate(LocalDateTime date) {\n \treturn date.format(DateTimeFormatter.ISO_LOCAL_DATE);\n }", "public static String getDateInISO8601(final Long dateInMilliseconds) {\n\n Calendar calendar = getCalendar(dateInMilliseconds, TimeZone.getTimeZone(DEFAULT_TIMEZONE));\n return DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format(calendar);\n }", "public static String dateToIsoString(Date d) {\n\t\treturn XML_DATE_TIME_FORMAT.print(d.getTime());\n\t}", "public static String GetIsoDateTime(Date dateToFormat) {\n\t\t// GPX specs say that time given should be in UTC, no local time.\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\tsdf.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n\n\t\treturn sdf.format(dateToFormat);\n\t}", "@Override\n public void serialize(DateTime value, JsonGenerator gen, SerializerProvider arg2)\n throws IOException, JsonProcessingException {\n \t\n \tif ( value != null ){\n \t\tgen.writeNumber( value.toDate().getTime() );\n \t}else {\n \t\tgen.writeNumber( 0L );\t\n \t}\n }", "@Override\n\tpublic String asString(Object object) {\n\t\t// at this point object is a Date\n\n\t\tCalendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\t\tcalendar.setTime((Date) object);\n\n\t\tStringBuilder builder = new StringBuilder();\n\n\t\tint year = calendar.get(Calendar.YEAR);\n\t\tif (calendar.get(Calendar.ERA) == 0) {\n\t\t\t// https://en.wikipedia.org/wiki/ISO_8601\n\t\t\t// by convention 1 BC is labeled +0000, 2 BC is labeled −0001, ...\n\n\t\t\tif (year > 1) {\n\t\t\t\tbuilder.append('-');\n\t\t\t}\n\t\t\t--year;\n\t\t}\n\n\t\tbuilder.append(String.format(\"%04d\", year));\n\t\tbuilder.append('-');\n\t\tbuilder.append(String.format(\"%02d\", calendar.get(Calendar.MONTH) + 1));\n\t\tbuilder.append('-');\n\t\tbuilder.append(String.format(\"%02d\", calendar.get(Calendar.DATE)));\n\t\tbuilder.append('T');\n\t\tbuilder.append(String.format(\"%02d\", calendar.get(Calendar.HOUR_OF_DAY)));\n\t\tbuilder.append(':');\n\t\tbuilder.append(String.format(\"%02d\", calendar.get(Calendar.MINUTE)));\n\t\tbuilder.append(':');\n\t\tbuilder.append(String.format(\"%02d\", calendar.get(Calendar.SECOND)));\n\t\tbuilder.append('Z');\n\n\t\treturn builder.toString();\n\t}", "public static String getDateInISO(final Long dateInMilliseconds) {\n\n Calendar calendar = getCalendar(dateInMilliseconds, TimeZone.getTimeZone(DEFAULT_TIMEZONE));\n return DateFormatUtils.ISO_DATE_FORMAT.format(calendar);\n }", "public static String getISOFormattedTime( Date date ) {\n return sdf.format( date ).replace( ' ', 'T' );\n }", "public CustomDateSerializer() {\n this(null);\n }", "private String stringifyDate(Date date){\n\t\tDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\treturn dateFormatter.format(date);\n\t}", "String toJSON();", "public static String marshalDateTime(LocalDateTime dateTime) {\n \treturn dateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME);\n }", "private static String asJsonString(final Object obj) {\n try {\n ObjectMapper objectToJsonMapper = new ObjectMapper();\n objectToJsonMapper.registerModule(new JavaTimeModule());\n objectToJsonMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n return objectToJsonMapper.writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public String marshal( Date value )\n {\n String val = \"\";\n \tif (value != null) {\n \tCalendar cal = new GregorianCalendar();\n \tcal.setTime( value );\n \treturn DatatypeConverter.printDateTime( cal );\n }\n\t\t\n\t\tSystem.out.println(\"Date value: \" + value);\n return val;\n }", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper()\n .registerModule(new JavaTimeModule())\n .configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)\n .writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "private static String valueToJSONString(Object value) throws Exception \n {\n\t\t JSONObject json = new JSONObject(); \n\t if (value instanceof IdScriptableObject && \n\t ((IdScriptableObject)value).getClassName().equals(\"Date\") == true) \n\t { \n\t // Get the UTC values of the date \n\t Object year = NativeObject.callMethod((IdScriptableObject)value, \"getUTCFullYear\", null); \n\t Object month = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMonth\", null); \n\t Object date = NativeObject.callMethod((IdScriptableObject)value, \"getUTCDate\", null); \n\t Object hours = NativeObject.callMethod((IdScriptableObject)value, \"getUTCHours\", null); \n\t Object minutes = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMinutes\", null); \n\t Object seconds = NativeObject.callMethod((IdScriptableObject)value, \"getUTCSeconds\", null); \n\t Object milliSeconds = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMilliseconds\", null); \n\t \n\t // Build the JSON object to represent the UTC date \n\t \n\t json.put(\"zone\",\"UTC\"); \n\t json.put(\"year\",year); \n\t json.put(\"month\",month); \n\t json.put(\"date\",date); \n\t json.put(\"hours\",hours); \n\t json.put(\"minutes\",minutes); \n\t json.put(\"seconds\",seconds); \n\t json.put(\"milliseconds\",milliSeconds); \n\t return json.toString(); \n\t } \n\t else if (value instanceof NativeJavaObject) \n\t { \n\t Object javaValue = Context.jsToJava(value, Object.class); \n\t return javaValue.toString(); \n\t } \n\t else if (value instanceof NativeArray) \n\t { \n\t // Output the native array \n\t return nativeArrayToJSONString((NativeArray)value); \n\t } \n\t else if (value instanceof NativeObject) \n\t { \n\t // Output the native object \n\t return nativeObjectToJSONString((NativeObject)value); \n\t } \n\t else if( value instanceof Function){\n\t \treturn Context.toString(value);\n\t }\n\t else \n\t { \n\t return value.toString(); \n\t } \n }", "com.google.protobuf.ByteString\n getOrderDateBytes();", "public String getDateString(){\n return Utilities.dateToString(date);\n }", "@Override\n public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {\n String value = ISO8601Utils.format(date, true);\n toAppendTo.append(value);\n return toAppendTo;\n }", "public static String getLog14Date(){\r\n return TIMESTAMP14ISO8601Z.get().format(new Date());\r\n }", "public static String toJson(Object o) throws JsonProcessingException {\n var mapper = new ObjectMapper();\n mapper.setDateFormat(new SimpleDateFormat(\"yyyy-MM-dd\"));\n mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);\n var ow = mapper.writer();\n return ow.writeValueAsString(o);\n }", "public Date parseAsISO8601(String str, ParsePosition parsePosition) {\n DateFormat dateFormat;\n int length = str.length();\n int i = length - 1;\n char charAt = str.charAt(i);\n if (length <= 10 && Character.isDigit(charAt)) {\n dateFormat = this._formatPlain;\n if (dateFormat == null) {\n dateFormat = _cloneFormat(DATE_FORMAT_PLAIN);\n this._formatPlain = dateFormat;\n }\n } else if (charAt == 'Z') {\n DateFormat dateFormat2 = this._formatISO8601_z;\n if (dateFormat2 == null) {\n dateFormat2 = _cloneFormat(DATE_FORMAT_ISO8601_Z);\n this._formatISO8601_z = dateFormat2;\n }\n if (str.charAt(length - 4) == ':') {\n StringBuilder sb = new StringBuilder(str);\n sb.insert(i, \".000\");\n str = sb.toString();\n dateFormat = dateFormat2;\n } else {\n dateFormat = dateFormat2;\n }\n } else if (hasTimeZone(str)) {\n int i2 = length - 3;\n char charAt2 = str.charAt(i2);\n if (charAt2 == ':') {\n StringBuilder sb2 = new StringBuilder(str);\n sb2.delete(i2, length - 2);\n str = sb2.toString();\n } else if (charAt2 == '+' || charAt2 == '-') {\n str = str + \"00\";\n }\n int length2 = str.length();\n if (Character.isDigit(str.charAt(length2 - 9))) {\n StringBuilder sb3 = new StringBuilder(str);\n sb3.insert(length2 - 5, \".000\");\n str = sb3.toString();\n }\n dateFormat = this._formatISO8601;\n if (dateFormat == null) {\n dateFormat = _cloneFormat(DATE_FORMAT_ISO8601);\n this._formatISO8601 = dateFormat;\n }\n } else {\n StringBuilder sb4 = new StringBuilder(str);\n if ((length - str.lastIndexOf(84)) - 1 <= 8) {\n sb4.append(\".000\");\n }\n sb4.append('Z');\n str = sb4.toString();\n dateFormat = this._formatISO8601_z;\n if (dateFormat == null) {\n dateFormat = _cloneFormat(DATE_FORMAT_ISO8601_Z);\n this._formatISO8601_z = dateFormat;\n }\n }\n return dateFormat.parse(str, parsePosition);\n }", "public void serialize(final javax.xml.namespace.QName parentQName,\n javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)\n throws javax.xml.stream.XMLStreamException,\n org.apache.axis2.databinding.ADBException {\n java.lang.String namespace = \"http://schemas.microsoft.com/2003/10/Serialization/\";\n java.lang.String _localName = \"dateTime\";\n\n writeStartElement(null, namespace, _localName, xmlWriter);\n\n // add the type details if this is used in a simple type\n if (serializeType) {\n java.lang.String namespacePrefix = registerPrefix(xmlWriter,\n \"http://schemas.microsoft.com/2003/10/Serialization/\");\n\n if ((namespacePrefix != null) &&\n (namespacePrefix.trim().length() > 0)) {\n writeAttribute(\"xsi\",\n \"http://www.w3.org/2001/XMLSchema-instance\", \"type\",\n namespacePrefix + \":dateTime\", xmlWriter);\n } else {\n writeAttribute(\"xsi\",\n \"http://www.w3.org/2001/XMLSchema-instance\", \"type\",\n \"dateTime\", xmlWriter);\n }\n }\n\n if (localDateTime == null) {\n // write the nil attribute\n writeAttribute(\"xsi\",\n \"http://www.w3.org/2001/XMLSchema-instance\", \"nil\", \"1\",\n xmlWriter);\n } else {\n xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\n localDateTime));\n }\n\n xmlWriter.writeEndElement();\n }", "public static Date ISO8601_toDate(String dateString) throws java.text.ParseException {\n SimpleDateFormat df = new SimpleDateFormat( \"yyyy-MM-dd'T'HH:mm:ssz\" );\n\n //this is zero time so we need to add that TZ indicator for\n if ( dateString.endsWith( \"Z\" ) ) {\n dateString = dateString.substring( 0, dateString.length() - 1) + \"GMT-00:00\";\n } else {\n int inset = 6;\n\n String s0 = dateString.substring( 0, dateString.length() - inset );\n String s1 = dateString.substring( dateString.length() - inset, dateString.length() );\n\n dateString = s0 + \"GMT\" + s1;\n }\n\n return df.parse(dateString);\n\n }", "public java.lang.String getEnvelopeDateTime() {\r\n return envelopeDateTime;\r\n }", "public static void main(String[] args) {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssX\"); // Quoted \"Z\" to indicate UTC, no timezone offset\n// df.setTimeZone(tz);\n// String nowAsISO = df.format(\"2017-04-21T21:25:35+05:00\");\n try {\n Date date = df.parse(\"2017-04-21T21:25:35+05:00\");\n System.out.println(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }", "public static String GetStringObjectFromDate(Date date) {\n\t\tString lv_dateFormateInUTC = null;\n\n\t\ttry {\n\t\t\tSimpleDateFormat lv_formatter = new SimpleDateFormat(\n\t\t\t\t\t\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\t\tlv_formatter.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\n\t\t\tlv_dateFormateInUTC = lv_formatter.format(date);\n\n\t\t} catch (Exception e) {\n\t\t\t// do some error reporting here\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn lv_dateFormateInUTC;\n\t}", "@Override\n\tpublic void writeTo(Date t, //in this simple example, we only pay attention to this arg, which is an instance of Date\n\t\t\tClass<?> type, \n\t\t\tType genericType, \n\t\t\tAnnotation[] annotations, \n\t\t\tMediaType mediaType,\n\t\t\tMultivaluedMap<String, Object> httpHeaders, \n\t\t\tOutputStream entityStream) //this is the output stream to write the conversion of Date to String to.\n\t\t\t\t\tthrows IOException, WebApplicationException {\n\t\t\n\t\tentityStream.write(t.toString().getBytes());\n\t}", "public CustomDateSerializer(Class<Date> T) {\n super(T);\n }", "com.google.protobuf.ByteString\n getToDateBytes();", "public void write(JsonWriter jsonWriter, Date object) {\n synchronized (this) {\n String string2;\n if (string2 == null) {\n jsonWriter.nullValue();\n return;\n }\n Object object2 = this.dateFormats;\n object2 = object2.get(0);\n object2 = (DateFormat)object2;\n string2 = ((DateFormat)object2).format((Date)((Object)string2));\n jsonWriter.value(string2);\n return;\n }\n }", "public final native String toDateString() /*-{\n return this.toDateString();\n }-*/;", "public boolean looksLikeISO8601(String str) {\n if (str.length() < 5 || !Character.isDigit(str.charAt(0)) || !Character.isDigit(str.charAt(3)) || str.charAt(4) != '-') {\n return false;\n }\n return true;\n }", "public static String getXMLDate(Date date) {\n\t\t Calendar calendar = Calendar.getInstance();\n\t\t calendar.setTime(date);\n\t\t return DatatypeConverter.printDateTime(calendar);\n\t }", "public abstract Object toJson();", "public static <T> String serizalize(T entity) {\n\t\t\n\t\tif (entity != null) {\n\t\t\tGson gson = new GsonBuilder()\n\t\t\t\t\t// .setPrettyPrinting() // uncomment this line to turn on debugging\n\t\t\t\t\t.registerTypeAdapterFactory(new EnumAdapterFactory())\n\t\t\t\t\t.registerTypeAdapter(Date.class, new JSONDateTypeAdapter())\n\t\t\t\t\t.create();\n\n\t\t\treturn gson.toJson(entity);\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n public JSONObject toJson() {\n JSONObject json = new JSONObject();\n json.put(\"frontInfo\", frontInfo);\n json.put(\"backInfo\", backInfo);\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = dateFormat.format(startTime);\n\n json.put(\"startTime\", formattedDate);\n json.put(\"cardID\", cardID);\n return json;\n }", "static public String dateToUtc(Date date){\n\t\treturn writeTimeStamp(UTC_FORMAT, date);\n\t}", "@ApiModelProperty(value = \"The event creation date in the site timezone\")\n public String getDate() {\n return date;\n }", "public String getDate(){\n\t\treturn toString();\n\t}", "public Date getSentAt() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n Date d = null;\n try {\n d = sdf.parse(creationDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return d;\n }", "@Override\n\tpublic String getDateLiteral(String isoDate) {\n\t\tString normalLiteral = super.getDateLiteral(isoDate);\n\n\t\tif (isDateOnly(isoDate)) {\n\t\t\tStringBuffer val = new StringBuffer();\n\t\t\tval.append(\"DATE(\");\n\t\t\tval.append(normalLiteral);\n\t\t\tval.append(')');\n\t\t\treturn val.toString();\n\t\t} else if (isTimeOnly(isoDate)) {\n\t\t\tStringBuffer val = new StringBuffer();\n\t\t\tval.append(\"TIME(\");\n\t\t\tval.append(normalLiteral);\n\t\t\tval.append(')');\n\t\t\treturn val.toString();\n\t\t} else if (isDateTime(isoDate)) {\n\t\t\tStringBuffer val = new StringBuffer();\n\t\t\tval.append(\"TIMESTAMP(\");\n\t\t\tval.append(normalLiteral);\n\t\t\tval.append(')');\n\t\t\treturn val.toString();\n\t\t} else {\n\t\t\treturn \"UNSUPPORTED:\" + isoDate;\n\t\t}\n\t}", "@Override\n public String toString() {\n return (\"[E]\" + super.toString() + String.format(\"(at:%s)\", this.date));\n }", "private static Date ISO_8601toDate(String dateTime) throws ParseException {\n\n //already in UTC\n if (dateTime.endsWith(\"Z\")) {\n return dateTimeFormatZ.parse(dateTime);\n }\n\n int positionT = dateTime.indexOf('T');\n\n int positionZ = dateTime.indexOf('+', positionT);\n if (positionZ == -1) {\n positionZ = dateTime.indexOf('-', positionT);\n }\n\n //no timezone specified, defaults to UTC\n if (positionZ == -1) {\n return dateTimeFormatZ.parse(dateTime + 'Z');\n }\n\n //convert to General time zone to preserve the timezone provided\n return dateTimeFormatGtz.parse(dateTime.substring(0, positionZ)\n + \"GMT\"\n + dateTime.substring(positionZ));\n }", "private static String convertDate(String date) {\n\t\tlong dateL = Long.valueOf(date);\n\t\tDate dateTo = new Date(dateL);\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\n\t\tString formatted = format.format(dateTo);\n\t\tSystem.out.println(\"Date formatted: \" + formatted);\n\t\treturn formatted;\n\t}", "public final native String toUTCString() /*-{\n return this.toUTCString();\n }-*/;", "com.google.protobuf.ByteString\n getFromDateBytes();", "@JsonFormat(pattern=\"yyyyMMddHHmmss\",timezone = \"GMT+8\")\n\tpublic Date getPayTs() {\n\t\treturn payTs;\n\t}", "@Override\n protected String ReplaceBoundaryISO8601DateValueByCondition(String pConditionString, String pOriginalValue) throws ParseException\n {\n Boolean IsOnlyISODate = false;\n /**\n * ตัวอย่าง PT10M = 10 นาที\n */\n \n //ตรวจสอบก่อนว่าเป็น ISO8601 กลุ่ม Duration หรือไม่\n if (!IsISO8601DateTime(pOriginalValue))\n {\n int startpos = pOriginalValue.indexOf(\"{\");\n int endpos = pOriginalValue.indexOf(\"}\");\n \n if ((startpos != -1) && (endpos != -1))\n {\n String raw = pOriginalValue.substring(startpos + 1, endpos);\n return \"${\" + raw + \" - 1 }\";\n }\n return pOriginalValue;\n }\n\n //ปรับวันที่ของ <timerDate> ภายใต้ <timerEventDefinition> ด้วยวันในอดีต\n //1.Convert ISO8601 to Java Data\n\n //ถ้าไม่มี Date ต้องไม่แก้ไขค่า\n // DateFormat originalDateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n // Date originalDate = LocalDateTime.parse(pOriginalValue);\n \n Pattern DATE_PATTERN = Pattern.compile(\"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\");\n if (DATE_PATTERN.matcher(pOriginalValue).matches())\n {\n IsOnlyISODate = true;\n pOriginalValue = pOriginalValue + \"T00:00:00.000\";\n }\n\n LocalDateTime originalDate = LocalDateTime.parse(pOriginalValue);\n\n\n //Save ค่าใหม่กลับไป\n originalDate = originalDate.minusDays(1);\n // TimeZone tz = TimeZone.getTimeZone(\"UTC\");\n // DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm'Z'\"); // Quoted \"Z\" to indicate UTC, no timezone offset\n // df.setTimeZone(tz);\n // String nowAsISO = df.format(new Date());\n DateTimeFormatter dateformat = null;\n if (IsOnlyISODate)\n {\n dateformat = DateTimeFormatter.ISO_LOCAL_DATE;\n }\n else\n {\n dateformat= DateTimeFormatter.ISO_LOCAL_DATE_TIME;\n }\n\n\n return dateformat.format(originalDate);\n }", "public Date getDataNascimentoToSQL() {\r\n\t\treturn new Date(dataNascimento.getTimeInMillis());\r\n\t}", "public abstract String toJson();", "public String getIso() {\r\n return iso;\r\n }", "@JsonProperty(\"datetime\")\n public Date getDatetime() {\n return datetime;\n }", "String serialize();", "public String getDate(){\n return date;\n }", "public abstract JsonElement serialize();", "public String getDate() {\n return date;\n }", "public final String httpDate(Object d) {\n\t\treturn DF.format(d);\n\t}", "@JsonSetter(\"dateAdded\")\r\n public void setDateAdded (String value) { \r\n this.dateAdded = value;\r\n }", "@JSProperty\n String getDateTime();", "public abstract String toJsonString();", "public String getDate(){\n return date;\n }", "String toJSONString(Object data);", "com.google.protobuf.ByteString\n getStartDateBytes();", "public java.sql.Date toSQLDate() {\r\n String isoStr = this.toSQLString();\r\n return java.sql.Date.valueOf(isoStr);\r\n //return new GregorianCalendar(this.year, this.month, this.day).getTime();\r\n }", "public String getEventDate() {\n return eventDate.format(INPUT_FORMATTER);\n }", "public void testAttributeWithFormatAndConverterType() {\n AttributeWithFormatAndConverterTypeTestDTO obj = new AttributeWithFormatAndConverterTypeTestDTO();\n obj.attribute = getDateForFormatAndConverter(\"28.02.2007:15:21:27\");\n assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf(\"2007-02-28T14:21:27.000-01:00\") >= 0);\n }", "public String getEventDate() {\n\t\treturn date;\n\t}", "private String formatTimeToICS(LocalDateTime date) {\n return DateTimeFormatter.ofPattern(\"YYYYMMddTHHmmss\").format(date);\n }", "java.lang.String getDate();", "@JsonFormat(pattern=\"yyyyMMddHHmmss\",timezone = \"GMT+8\")\n\tpublic Date getCreateTs() {\n\t\treturn createTs;\n\t}", "public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }", "com.google.protobuf.ByteString\n getStartDateYYYYMMDDBytes();", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String toJSON(){\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String getDate(){\n\n return this.date;\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "String getDate();", "String getDate();", "public Date getDateResponsed();", "@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}", "public JodaBeanJsonWriter jsonWriter() {\n return new JodaBeanJsonWriter(this);\n }", "@JsonProperty(\"EventDateTime\")\r\n\tpublic String getEventDateTime() {\r\n\t\treturn eventDateTime;\r\n\t}", "public String toString() {\n if(getPersistedAttribute().getDatevalue() == null) {\n return \"null\";\n }\n return DateUtil.formatRfc3339Calendar(getValue());\n }", "public String getDate() {\r\n return date;\r\n }", "public String dateToString() {\n\t\treturn new String(year + \"/\"\n\t\t\t\t+ month + \"/\"\n\t\t\t\t+ day);\n }", "@JsonProperty(\"surveyDate\")\r\n public Date getSurveyDate() {\r\n return surveyDate;\r\n }", "private String convertDate2String(Date date) {\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\");\n return dateFormat.format(date);\n }" ]
[ "0.75572115", "0.7103539", "0.68747944", "0.62792987", "0.6205325", "0.61455274", "0.60330945", "0.60316646", "0.6019272", "0.5999398", "0.5923476", "0.57911754", "0.56645644", "0.55888605", "0.55627644", "0.5555881", "0.55093396", "0.5501967", "0.54673946", "0.546576", "0.5396505", "0.5280183", "0.52767164", "0.5257698", "0.52360636", "0.52247906", "0.51595074", "0.51545674", "0.51431984", "0.5103598", "0.5077866", "0.5077849", "0.5058254", "0.50295115", "0.5028804", "0.50190854", "0.49958482", "0.4987892", "0.4980763", "0.4964759", "0.4954742", "0.49484012", "0.49474892", "0.49453947", "0.49425173", "0.49268767", "0.49208546", "0.49200982", "0.4911581", "0.4909146", "0.49091217", "0.49056533", "0.49037978", "0.48965138", "0.48790714", "0.48632818", "0.48552454", "0.48475254", "0.48422155", "0.48395845", "0.48327655", "0.48280457", "0.48243093", "0.4797808", "0.47916025", "0.47901085", "0.47886905", "0.4787406", "0.4783699", "0.47753978", "0.47456577", "0.47455418", "0.473878", "0.47275198", "0.47171566", "0.47076854", "0.47059613", "0.47048524", "0.47016603", "0.46925917", "0.46859697", "0.46859697", "0.46859697", "0.46859697", "0.46859697", "0.46762973", "0.46690062", "0.4666107", "0.4666107", "0.4649783", "0.4649783", "0.4643659", "0.46417168", "0.46413302", "0.4636025", "0.46347165", "0.4634571", "0.46341112", "0.46328408", "0.46165383" ]
0.70045054
2
Set our formats for representing dates
@Test public void shouldCorrectWhenSettingObjectMapperDateFormat() throws Exception { SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy hh:mm"); String toParse = "20-12-2014 02:30"; Date date = df.parse(toParse ); Event event = new Event("party", date); ObjectMapper mapper = new ObjectMapper(); mapper.setDateFormat(df); String result = mapper.writeValueAsString(event); assertThat(result, containsString(toParse)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDateFormats(String dateFormats)\n {\n this.dateFormats = dateFormats;\n }", "@Override\n\tpublic String[] getFormats() {\n\t\treturn new String[] {\"yyyy-MM-dd'T'HH:mm:ss\",\"yyyy-MM-dd HH:mm:ss\",\"yyyy-MM-dd HH:mm\",\"yyyy-MM-dd'T'HH:mm\",\"yyyy-MM-dd HH\", \"yyyy-MM-dd\" };\n\t}", "public String getDateFormats()\n {\n return dateFormats;\n }", "public void setUnmarshalDateFormats (String [] formats) {\n\t\tthis.dateFormatStrings = formats;\n\t}", "protected DateFormat[] getDateFormats() {\r\n\t\tString[] formatStrings = getFormatStrings();\r\n\t\tSimpleDateFormat[] dateFormats = new SimpleDateFormat[formatStrings.length];\r\n\r\n\t\tfor (int i = 0; i < formatStrings.length; i++) {\r\n\t\t\tdateFormats[i] = new SimpleDateFormat(formatStrings[i], locale);\r\n\t\t\tdateFormats[i].setLenient(false);\r\n\t\t}\r\n\r\n\t\treturn dateFormats;\r\n\t}", "public static void dateFormat() {\n }", "@Override\n protected SimpleDateFormat getDateFormat() {\n return dateFormat;\n }", "public void setDateFormat(String format) {\n dateFormat = format;\n constructVssDateTimeFormat();\n }", "protected abstract DateFormat getDateFormat();", "public void setDateFormat(String format) {\n this.mDateFormat = format;\n }", "public void setDateFormatString(String value) {\n this.dateFormatString = value;\n }", "private static List<String> listDateFormats(){\r\n List<String> result = new ArrayList<String>();\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ss'Z'\");\r\n result.add(\"yyyy-MM-ddZZ\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ssz\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\r\n result.add(\"EEE MMM d hh:mm:ss z yyyy\");\r\n result.add(\"EEE MMM dd HH:mm:ss yyyy\");\r\n result.add(\"EEEE, dd-MMM-yy HH:mm:ss zzz\");\r\n result.add(\"EEE, dd MMM yyyy HH:mm:ss zzz\");\r\n result.add(\"EEE, dd MMM yy HH:mm:ss z\");\r\n result.add(\"EEE, dd MMM yy HH:mm z\");\r\n result.add(\"EEE, dd MMM yyyy HH:mm:ss z\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ss\");\r\n result.add(\"EEE, dd MMM yyyy HH:mm:ss Z\");\r\n result.add(\"dd MMM yy HH:mm:ss z\");\r\n result.add(\"dd MMM yy HH:mm z\");\r\n result.add(\"'T'HH:mm:ss\");\r\n result.add(\"'T'HH:mm:ssZZ\");\r\n result.add(\"HH:mm:ss\");\r\n result.add(\"HH:mm:ssZZ\");\r\n result.add(\"yyyy-MM-dd\");\r\n result.add(\"yyyy-MM-dd hh:mm:ss\");\r\n result.add(\"yyyy-MM-dd HH:mm:ss\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ssz\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ss\");\r\n result.add(\"yyyy-MM-dd'T'HH:mm:ssZZ\");\r\n result.add(\"dd.MM.yyyy\");\r\n result.add(\"dd.MM.yyyy hh:mm:ss\");\r\n result.add(\"dd.MM.yyyy HH:mm:ss\");\r\n result.add(\"dd.MM.yyyy'T'HH:mm:ssz\");\r\n result.add(\"dd.MM.yyyy'T'HH:mm:ss\");\r\n result.add(\"dd.MM.yyyy'T'HH:mm:ssZZ\");\r\n result.add(\"dd.MM.yyyy hh:mm\");\r\n result.add(\"dd.MM.yyyy HH:mm\");\r\n result.add(\"dd/MM/yyyy\");\r\n result.add(\"dd/MM/yy\");\r\n result.add(\"MM/dd/yyyy\");\r\n result.add(\"MM/dd/yy\");\r\n result.add(\"MM/dd/yyyy hh:mm:ss\");\r\n result.add(\"MM/dd/yy hh:mm:ss\");\r\n return result;\r\n }", "public void populateFormats(Model model) {\n model.addAttribute(\"application_locale\", LocaleContextHolder.getLocale().getLanguage());\n model.addAttribute(\"rel_date_date_format\", DateTimeFormat.patternForStyle(\"M-\", LocaleContextHolder.getLocale()));\n }", "protected static SimpleDateFormat dateFormat() {\n return dateFormat(true, false);\n }", "public String format (Date date , String dateFormat) ;", "public void setDateFormatOverride(DateFormat formatter) {\n/* 563 */ this.dateFormatOverride = formatter;\n/* 564 */ fireChangeEvent();\n/* */ }", "public void formatDateTime() {\n // Check if type of parsing is for display or not. \n // If it is for display, no need to check if date has already passed.\n if (parseType != 2) {\n startDate = dtFormat.formatDate(startDate,0);\n endDate = dtFormat.formatDate(endDate,0);\n } else {\n startDate = dtFormat.formatDate(startDate,1);\n endDate = dtFormat.formatDate(endDate,1);\n }\n \n startTime = dtFormat.formatTime(startTime);\n endTime = dtFormat.formatTime(endTime);\n }", "public void setFormats(Vector<String> formats) {\n\t\tthis.formats = formats;\n\t}", "private DateFormatsConfig getDateFormats()\r\n {\r\n ClasspathPreferencesPersistenceManager manager = new ClasspathPreferencesPersistenceManager();\r\n InternalPreferencesIF preferences = manager.load(MantleConstants.USER_DATE_FORMAT_CONFIG_FILE_TOPIC, null, false);\r\n\r\n DateFormatsConfig config = preferences.getJAXBObject(DateFormatsConfig.class, \"DateFormatConfig\", null);\r\n\r\n return config;\r\n }", "DateFormat getDisplayDateFormat();", "private String getDefaultDateFormat() {\n return getString(DATE_FORMAT_KEY, DEFAULT_DATE_FORMAT);\n }", "public ValidatorFactory setDateFormat(int dateStyle, int timeStyle) {\n if (timeStyle < 0) {\n DateFormat.getDateInstance(dateStyle);\n } else if (dateStyle < 0) {\n DateFormat.getTimeInstance(timeStyle);\n } else {\n DateFormat.getDateTimeInstance(dateStyle, timeStyle);\n }\n this.dateStyle = dateStyle;\n this.timeStyle = timeStyle;\n this.datePattern = null;\n return this;\n }", "public DateGraphFormat(DateFormat dateFormatIn){\n\tif(dateFormatIn != null){\n\t dateFormat = dateFormatIn;\n\t} \n }", "DateFormat getSourceDateFormat();", "@Override\n protected void addDefaultConverters() {\n super.addDefaultConverters();\n\n /* Add the \"shortDate\" conversion. */\n StringToDate dateAndTimeToDate = new StringToDate();\n dateAndTimeToDate.setPattern(DATE_AND_TIME_FORMAT);\n addConverter(\"date\", dateAndTimeToDate);\n }", "public void setDateFormat(String dateFormatString) {\n dateFormat = new SimpleDateFormat(dateFormatString);\n }", "private static void formatDate (XmlDoc.Element date) throws Throwable {\n\t\tString in = date.value();\n\t\tString out = DateUtil.convertDateString(in, \"dd-MMM-yyyy\", \"yyyy-MM-dd\");\n\t\tdate.setValue(out);\n\t}", "public String getFormatDate()\n {\n return formatDate;\n }", "private static java.text.SimpleDateFormat getFormatter() {\r\n\r\n\t\treturn getDBLayer().getDateFormatter();\r\n\t}", "public void setDateFormat(ProjectDateFormat dateFormat)\r\n {\r\n m_dateFormat = dateFormat;\r\n }", "private void findXMLDateFormatters() {\n\n\t\tString formatDef;\n\t\tformatDef = \"formatdef\";\n\n\t\tIExtensionRegistry extensionRegistry;\n\t\textensionRegistry = Platform.getExtensionRegistry();\n\n\t\tIExtensionPoint extensionPoint;\n\t\textensionPoint =\n\t\t\t\textensionRegistry.getExtensionPoint(DATEFORMATTER_EXTENSION_POINT_ID);\n\n\t\tif (extensionPoint == null) {\n\t\t\tSystem.out.println(\"Cannot find extension point \"\n\t\t\t\t\t+ DATEFORMATTER_EXTENSION_POINT_ID);\n\t\t}\n\t\t// no else.\n\n\t\tIExtension[] extensions;\n\t\textensions = extensionPoint.getExtensions();\n\n\t\tif (extensions == null) {\n\t\t\tSystem.out.println(\"No extensions found for \"\n\t\t\t\t\t+ DATEFORMATTER_EXTENSION_POINT_ID);\n\t\t}\n\t\t// no else.\n\n\t\tfor (IExtension extension : extensions) {\n\n\t\t\tIConfigurationElement[] attributes;\n\t\t\tattributes = extension.getConfigurationElements();\n\n\t\t\tfor (int index = 0; index < attributes.length; index++) {\n\n\t\t\t\tIConfigurationElement attribute;\n\t\t\t\tattribute = attributes[index];\n\n\t\t\t\tString format;\n\t\t\t\tformat = attribute.getAttribute(formatDef);\n\n\t\t\t\tif (format != null) {\n\n\t\t\t\t\tString owner;\n\t\t\t\t\towner = extension.getContributor().getName();\n\n\t\t\t\t\tBundle bundle;\n\t\t\t\t\tbundle = Platform.getBundle(owner);\n\n\t\t\t\t\tURL url;\n\t\t\t\t\turl = bundle.getResource(format);\n\n\t\t\t\t\tif (url != null) {\n\t\t\t\t\t\tDateFormatProvider provider;\n\t\t\t\t\t\tprovider = new DateFormatProvider();\n\n\t\t\t\t\t\tprovider.name = url.getPath();\n\t\t\t\t\t\tprovider.type = \"XML-defined date format\";\n\t\t\t\t\t\tprovider.provider = extension;\n\t\t\t\t\t\tprovider.resource = url.getPath();\n\n\t\t\t\t\t\tDateFormatter formatter;\n\t\t\t\t\t\tformatter = loadXMLDateFormatter(url);\n\n\t\t\t\t\t\tif (formatter != null) {\n\t\t\t\t\t\t\tprovider.dateFormatter = formatter;\n\t\t\t\t\t\t\tdateFormatProviders.add(provider);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// no else.\n\t\t\t\t\t}\n\t\t\t\t\t// no else (url is null).\n\t\t\t\t}\n\t\t\t\t// no else (format is null).\n\t\t\t}\n\t\t\t// end for (configuration elements).\n\t\t}\n\t\t// end for (extensions).\n\t}", "@Bean(name = \"dateFormatter\")\n public SimpleDateFormat dateFormatter() {\n return new SimpleDateFormat(\"dd/MM/yyyy\");\n }", "public interface DatePropertySchema {\n /**\n * Returns source date format\n * @return Source date format\n */\n DateFormat getSourceDateFormat();\n\n /**\n * Returns display date format\n * @return Display date format\n */\n DateFormat getDisplayDateFormat();\n\n /**\n * Converts a string into a date with the source date format\n * @param date A string representing a date\n * @return Date\n */\n default Date fromSource(String date) {\n try {\n return getSourceDateFormat().parse(date);\n } catch (ParseException e) {\n throw new RuntimeException(String.format(\"couldn't parse date:{0} using:{1}\", date, getSourceDateFormat()));\n }\n }\n\n /**\n * Converts a string into a date with the display date format\n * @param date A string representing a date\n * @return Date\n */\n default Date fromDisplay(String date) {\n try {\n return getDisplayDateFormat().parse(date);\n } catch (ParseException e) {\n throw new RuntimeException(String.format(\"couldn't parse date:{0} using:{1}\", date, getDisplayDateFormat()));\n }\n }\n\n /**\n * Converts a date into a string with the display date format\n * @param date A date\n * @return A string representing a date\n */\n default String toDisplay(Date date) {\n return getDisplayDateFormat().format(date);\n }\n\n /**\n * Converts a date into a string with the source date format\n * @param date A date\n * @return A string representing a date\n */\n default String toSource(Date date) {\n return getSourceDateFormat().format(date);\n }\n}", "public void setDateFormat(DateFormat dateFormat){\n\tif(dateFormat != null){\n\t this.dateFormat = dateFormat;\n\t}\n }", "private void setDateSetting(String dateFormat)\n\t{\n\n\t\tif (dateFormat.equals(\"dd/mm/yyyy\"))\n\t\t{\n\t\t\tthis.dateSetting = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.dateSetting = 1;\n\t\t}\n\t}", "@Override\n public void postConfig() {\n Locale locale = new Locale(localeLanguage, localeCountry);\n try {\n formatter = DateTimeFormatter.ofPattern(dateFormat, locale);\n } catch (IllegalArgumentException e) {\n throw new PropertyException(e,\"\",\"dateFormat\",\"dateFormat could not be parsed by DateTimeFormatter\");\n }\n }", "@InitBinder\n protected void initBinder(WebDataBinder binder) {\n binder.addCustomFormatter(new DateFormatter(\"yyyy-MM-dd\"));\n }", "public void setMarshalDateFormat (String format) {\n\t\tthis.outFormat = format;\n }", "public void setDateFormat(DateFormat dateFormat) {\n\t\tthis.dateFormat = dateFormat;\n\t}", "public interface Format {\n public static final String PATTERN_DATE = \"yyyy-MM-dd\";\n public static final String PATTERN_DATE_YEAR = \"yyyy\";\n}", "public String getDateFormatString() {\n return this.dateFormatString;\n }", "DateFormatPanel() {\r\n\t\tfDateFormat = DateFormat.getTimeInstance(DateFormat.DEFAULT);\r\n\t}", "public static DateFormat urlDateFormatter() {\n return Iso8601Formatter.dateTimeMillisFormatter();\n }", "private String changeDateFormat (String oldDate) throws ParseException {\n // Source: https://stackoverflow.com/questions/3469507/how-can-i-change-the-date-format-in-java\n final String OLD_FORMAT = \"MM/dd/yyyy\";\n final String NEW_FORMAT = \"yyyyMMdd\";\n String newDateString;\n SimpleDateFormat sdf = new SimpleDateFormat(OLD_FORMAT);\n Date d = sdf.parse(oldDate);\n sdf.applyPattern(NEW_FORMAT);\n newDateString = sdf.format(d);\n return newDateString;\n }", "public DateFormat getDateFormatOverride() { return this.dateFormatOverride; }", "public DateGraphFormat(){\n }", "private void initDates() throws RIFCSException {\n NodeList nl = super.getElements(Constants.ELEMENT_DATE);\n\n for (int i = 0; i < nl.getLength(); i++) {\n dates.add(new DateWithTypeDateFormat(nl.item(i)));\n }\n }", "public DateFormat getDateFormat(){\n\treturn dateFormat;\n }", "public DateTextFieldConfig withFormat(final String value) {\n put(Key.Format, Dates.toJavaScriptDateFormat(value));\n return this;\n }", "private static String _dateFormat(final Language lang) {\r\n \treturn lang == Language.SPANISH || lang == null ? Dates.ES_DEFAULT_FORMAT \r\n \t\t\t\t\t\t\t \t\t\t\t \t : Dates.EU_DEFAULT_FORMAT;\r\n }", "public static DateFormat defaultFormat() {\n return convertFormat(Locale.getDefault(), \"dd/MM/yyyy hh:mma\");\n }", "private String getTimeFormat() {\r\n return mData.getConfiguration(\"x-labels-time-format\", \"yyyy-MM-dd\");\r\n }", "private ARXDate(final String formatString) {\r\n if (formatString == null || formatString.equals(\"Default\")) {\r\n this.string = \"dd.MM.yyyy\";\r\n this.format = new SimpleDateFormat(string);\r\n this.locale = null;\r\n } else {\r\n this.format = new SimpleDateFormat(formatString);\r\n this.string = formatString;\r\n this.locale = null;\r\n }\r\n }", "@JSProperty(\"dateTimeLabelFormats\")\n void setDateTimeLabelFormats(ZAxisDateTimeLabelFormatsOptions value);", "private String formatDate(String dateStr) {\n try {\n SimpleDateFormat fmt = new SimpleDateFormat(Properties.DATE_FORMAT_ALL);\n Date date = fmt.parse(dateStr);\n SimpleDateFormat fmtOut = new SimpleDateFormat(Properties.DATE_FORMAT);\n return fmtOut.format(date);\n } catch (ParseException e) {\n System.out.println( Properties.K_WARNING + \" \" + e.getMessage());\n }\n return \"\";\n }", "public static void main(String[] args) {\n\t double d=123456.789;\r\n\t\tNumberFormat nf=NumberFormat.getInstance(Locale.ITALY);\r\n\t\tNumberFormat nf1=NumberFormat.getInstance(Locale.US);\r\n\t\tNumberFormat nf2=NumberFormat.getInstance(Locale.ENGLISH);\r\n\t\tSystem.out.println(\"Italy representation of \" + d + \" : \"+nf.format(d));\r\n\t\tSystem.out.println(\"US representation of \" + d + \" : \" +nf1.format(d));\r\n\t\tSystem.out.println(\"Japan representation of \" + d + \" : \" +nf2.format(d));\r\n\t\t\r\n\t //DateTimeFormat in short,long and medium with getDateTimeInstance\r\n\t\tDateFormat df=DateFormat.getDateTimeInstance(DateFormat.SHORT,DateFormat.SHORT);\r\n\t System.out.println(\"Short format of date: \"+df.format(new Date()));\r\n\t DateFormat df1=DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG);\r\n\t System.out.println(\"Long format of date: \"+df1.format(new Date()));\r\n\t DateFormat df2=DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM);\r\n\t System.out.println(\"Medium format of date: \"+df2.format(new Date()));\r\n\t \r\n\t //Locale date format giving countries starting letters to get time but using only getDateInstance(de-denmark)\r\n\t DateFormat df3=DateFormat.getDateInstance(DateFormat.SHORT,new Locale(\"de\",\"DE\"));\r\n\t System.out.println(\"Short format of date: \"+df3.format(new Date()));\r\n\t DateFormat df4=DateFormat.getDateInstance(DateFormat.LONG,new Locale(\"de\",\"DE\"));\r\n\t System.out.println(\"Long format of date: \"+df4.format(new Date()));\r\n\t DateFormat df5=DateFormat.getDateInstance(DateFormat.MEDIUM,new Locale(\"de\",\"DE\"));\r\n\t System.out.println(\"Medium format of date: \"+df5.format(new Date()));\r\n\t \r\n\r\n}", "public void setCustomDateFormat(SimpleDateFormat customDateFormat) {\n this.customDateFormat = customDateFormat;\n }", "public void setFormat(String fmt)\n {\n format = fmt;\n }", "public ValidatorFactory setDateFormat(String pattern) {\n this.datePattern = pattern == null ? null : new SimpleDateFormat(pattern).toPattern();\n return this;\n }", "public void setDateFormat(int dateStyle, Locale locale) {\n this.setText(DateFormat.getDateInstance(dateStyle, locale).format(new Date()));\n }", "public void setFormat(String value) {\n/* 198 */ setValue(\"format\", value);\n/* */ }", "public SimpleDateFormat() {\n\t\tthis(getDefaultPattern(), null, null, null, null, true, null);\n\t}", "private ARXDate(String formatString, Locale locale) {\r\n if (formatString == null || formatString.equals(\"Default\")) {\r\n this.string = \"dd.MM.yyyy\";\r\n this.format = new SimpleDateFormat(string, locale);\r\n this.locale = locale;\r\n } else {\r\n this.format = new SimpleDateFormat(formatString, locale);\r\n this.string = formatString;\r\n this.locale = locale;\r\n }\r\n }", "public Date formatForDate(String data) throws ParseException{\n //definindo a forma da Data Recebida\n DateFormat formatUS = new SimpleDateFormat(\"dd-MM-yyyy\");\n return formatUS.parse(data);\n }", "public DateGraphFormat(String pattern){\n\t((SimpleDateFormat) dateFormat).applyPattern(pattern);\n }", "public synchronized static DateFormat getDateFormat()\n\t{\n\t\treturn DATE_FORMAT;\n\t}", "public void replaceFormats(List<Format> formats);", "protected static SimpleDateFormat xsdDateFormat() {\n return new SimpleDateFormat(\"yyyy-MM-dd\");\n }", "public static void main(String[] args) {\n\t\t LocalDate ldt = LocalDate.of(2016,12,21);\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"yyyy-MMM-dd\");\n DateTimeFormatter format1 = DateTimeFormatter.ofPattern(\"YYYY-mmm-dd\");\n System.out.println(ldt.format(format));\n System.out.println(ldt.format(format1));\n\t}", "private static DateFormat[] convertFormats(final Locale locale, final String... formats) {\n DateFormat[] dateFormats = null;\n if (formats != null) {\n Contract.asNotNull(formats, \"the array of format strings must not \" + \"must not contain null elements\");\n dateFormats = new DateFormat[formats.length];\n for (int counter = formats.length - 1; counter >= 0; counter--) {\n dateFormats[counter] = new SimpleDateFormat(formats[counter], locale);\n }\n }\n return dateFormats;\n }", "@Override\n public DateFormat getDateFormat(Integer optionalDateStyle, Integer optionalTimeStyle, Locale locale, boolean currentUserTimezone) {\n return null;\n }", "@Override\n public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {\n String value = ISO8601Utils.format(date, true);\n toAppendTo.append(value);\n return toAppendTo;\n }", "public void setDateFormatSymbols(DateFormatSymbols dateFormatSymbols) {\r\n calendarTable.setDateFormatSymbols(dateFormatSymbols);\r\n // update the month control\r\n updateMonthMenu();\r\n }", "@Test\n public void generatedFormatIsParsable()\n {\n Date originalDate = new Date();\n String dateAsString = DateTimeAdapter.printDate( originalDate );\n Date parsedDate = DateTimeAdapter.parseDate( dateAsString );\n \n assertThat( parsedDate, equalTo( originalDate ) );\n }", "@Override\n\tprotected void setDate() {\n\n\t}", "public DateFormat getDateFormat() {\r\n return this.dateFormat;\r\n }", "public String changeDateTimeFormat(String dateStr) {\n String inputPattern = \"MMM-dd-yyyy hh:mm a\";\n String outputPattern = \"MMMM dd, yyyy hh:mm a\";\n SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);\n SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);\n\n Date date = null;\n String str = null;\n\n try {\n date = inputFormat.parse(dateStr);\n str = outputFormat.format(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return str;\n\n }", "public void setFormatOptions(FormatOptions formatOptions) {\n this.formatOptions = formatOptions;\n }", "public Collection<DateTimeFormatter> getFormattedExdates() {\n return formattedExdates;\n }", "public DefaultImpl() {\n this(DEFAULT_DATE_FORMAT);\n }", "private static void formatDate(Date i) {\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n\t\tformatter.setLenient(false);\n\t\tAnswer = formatter.format(i);\n\t}", "public String getFormatDate() {\n String formatDate = servletRequest.getHeader(ConstantsCustomers.CUSTOMER_FORMAT_DATE);\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = jwtTokenUtil.getFormatDateFromToken();\n }\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = ConstantsCustomers.APP_DATE_FORMAT_ES;\n }\n return formatDate;\n }", "private String convertToDateFormat(String inputDateString) throws DateTimeParseException {\n\t\treturn inputDateString;\n\t}", "public SimpleDateFormat getDateFormat(HttpServletRequest req) {\n\t\treturn new SimpleDateFormat(DateUtil.getDatePattern(getResourceBundle(req)), Constants.DEF_LOCALE_NUMBER);\n\t}", "public DateTimeFormatRenderer(DateTimeFormat format) {\n this(format, null);\n }", "public String changeDateFormat(String dateStr) {\n String inputPattern = \"MMM-dd-yyyy\";\n String outputPattern = \"MMMM dd, yyyy\";\n SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern);\n SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern);\n\n Date date = null;\n String str = null;\n\n try {\n date = inputFormat.parse(dateStr);\n str = outputFormat.format(date);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return str;\n\n }", "private static SimpleDateFormat getDateFormat() {\r\n\t\tif(dateFormat == null)\r\n\t\t\tdateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\treturn dateFormat;\r\n\t}", "public String getSQLDateFormat();", "public void setDateFormatSymbols(final DateFormatSymbols newFormatSymbols) {\n\t\tthis.formatData = (DateFormatSymbols) newFormatSymbols.clone();\n\t}", "@Method(selector = \"stringFromDate:toDate:\")\n public native String format(NSDate fromDate, NSDate toDate);", "public static void main(String[] args) {\n\t\tLocalDate today=LocalDate.now();\n\t\t\n\t\tDateTimeFormatter dtf=DateTimeFormatter.ofPattern(\"YYYY/MM/DD\");\n\t\tDateTimeFormatter dtf1=DateTimeFormatter.ofPattern(\"YYYY MM DD\");\n\t\t\n\t\tDateTimeFormatter dtfull=DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL);\n\t\tDateTimeFormatter dtm=DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM);\n\t\tDateTimeFormatter dts=DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT);\n\t\t\n\t\t\n\t\tString afterformat=today.format(dtf);\n\t\tSystem.out.println(afterformat);\n\t\tString afterformat1=today.format(dtf1);\n\t\tSystem.out.println(afterformat1);\n\t\tString fd=today.format(dtfull);\n\t\tSystem.out.println(fd);\n\t\tString md=today.format(dtm);\n\t\tSystem.out.println(md);\n\t\tString sd=today.format(dts);\n\t\tSystem.out.println(sd);\n\t\t\n\t\t\n\n\t}", "private Formats() {\n }", "public java.sql.Date format(String date) {\n int i = 0;\n int dateAttr[];\n dateAttr = new int[3];\n for(String v : date.split(\"/\")) {\n dateAttr[i] = Integer.parseInt(v);\n i++;\n }\n\n GregorianCalendar gcalendar = new GregorianCalendar();\n gcalendar.set(dateAttr[2], dateAttr[0]-1, dateAttr[1]); // Year,Month,Day Of Month\n java.sql.Date sdate = new java.sql.Date(gcalendar.getTimeInMillis());\n return sdate;\n }", "public Date date(String name, Collection<String> formats) {\n return getDate(name, formats);\n }", "public void defDate(String fieldname, String dateFormat) {\r\n calls.put(fieldname, new SimpleDateFormat(dateFormat));\r\n }", "@JSProperty(\"dateTimeLabelFormats\")\n @Nullable\n ZAxisDateTimeLabelFormatsOptions getDateTimeLabelFormats();", "@InitBinder\r\n public void initBinder(WebDataBinder webDataBinder) {\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n dateFormat.setLenient(false);\r\n webDataBinder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));\r\n }", "public Date formatDate( String date, String format )\n throws ParseException {\n SimpleDateFormat dateFormat = new SimpleDateFormat(format);\n dateFormat.setLenient(false);\n return dateFormat.parse(date);\n }", "private FormatUtilities() {}", "@Override\r\n\t\t\t\tpublic String valueToString(Object value) throws ParseException {\n\t\t\t\t\tif(value != null) {\r\n\t\t\t\t\tCalendar cal=(Calendar) value;\r\n\t\t\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n\t\t\t\t\tString strDate=format.format(cal.getTime());\r\n\t\t\t\t\treturn strDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}", "private LocalDate parse(String format) {\r\n\t\tString lista[] = format.split(\"/\"); // DD - MM - YYYY\r\n\t\tint dia = Integer.parseInt(lista[0]);\r\n\t\tint mes = Integer.parseInt(lista[1]);\r\n\t\tint ano = Integer.parseInt(lista[2]);\r\n\t\tLocalDate date = LocalDate.of(ano, mes, dia);\r\n\t\treturn date;\r\n\t}" ]
[ "0.7430208", "0.723146", "0.7096941", "0.69550604", "0.6537015", "0.6522173", "0.6408864", "0.637521", "0.6298304", "0.6296831", "0.6252199", "0.6224974", "0.6223266", "0.6134283", "0.61331576", "0.6125832", "0.6123656", "0.6112075", "0.60824585", "0.60601115", "0.604809", "0.6047123", "0.60331494", "0.60213315", "0.5998474", "0.5969026", "0.59575385", "0.5955039", "0.5934681", "0.5930985", "0.5930415", "0.5907321", "0.5884791", "0.5840606", "0.5828058", "0.58192855", "0.5788954", "0.57860816", "0.5785921", "0.57720965", "0.57624143", "0.57558113", "0.5731783", "0.5710833", "0.5701522", "0.56953126", "0.56926954", "0.5676599", "0.56658906", "0.5663387", "0.56551725", "0.56390226", "0.5628823", "0.5626139", "0.5625325", "0.5615699", "0.557658", "0.5568084", "0.5566797", "0.55663246", "0.5558288", "0.55432314", "0.5541859", "0.5530438", "0.55282265", "0.5499366", "0.5498128", "0.5492656", "0.5446958", "0.54322064", "0.54205394", "0.5411385", "0.5407583", "0.5407153", "0.5405416", "0.53876907", "0.5375166", "0.53719693", "0.5358949", "0.53565556", "0.5354723", "0.53447306", "0.53379613", "0.5325826", "0.5324258", "0.5323697", "0.5312036", "0.5311871", "0.53115594", "0.5301343", "0.5300577", "0.52862114", "0.5285509", "0.5264733", "0.5260072", "0.5257995", "0.5253638", "0.52446276", "0.5244043", "0.52386296", "0.52361184" ]
0.0
-1
Checks if memory is full
boolean isFull() {return pointer==size;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isFull()\n {\n return heapSize == heap.length;\n }", "public boolean isFull() {\n return size == cnt;\n }", "public boolean isFull() {\n\t\treturn(this.size == this.capacity);\n\t}", "public boolean isFull(){\n \treturn count==capacity;\n }", "default boolean hasEnoughMemory(long memory){\n return getUnusedMemory() >= memory;\n }", "@Override\n public boolean isFull() {\n return heapSize == heap.length;\n }", "public boolean isFull(){\r\n return currentSize == maxSize;\r\n }", "private boolean isFull() {\n\t\treturn (size == bq.length);\n\t}", "public boolean isFull()\r\n\t{\r\n\t\treturn numItems > MAXSIZE;\r\n\t}", "public boolean isFull()\r\n\t{\r\n\t\treturn (count == capacity);\r\n\t}", "private boolean hasEnoughHeapMemoryForScreenshot() {\n final Runtime runtime = Runtime.getRuntime();\n\n // Auto casting to floats necessary for division\n float free = runtime.freeMemory();\n float total = runtime.totalMemory();\n float remaining = free / total;\n\n TurbolinksLog.d(\"Memory remaining percentage: \" + remaining);\n\n return remaining > .10;\n }", "public boolean isFull() {\n return (this.count == this.capacity);\n }", "public boolean isFull() {\n return count == capacity;\n }", "@Override\n public boolean isFull(){\n return (count == size);\n \n }", "@Override\r\n\tpublic boolean isfull() {\n\t\t\r\n\t\treturn count == size ;\r\n\t}", "public boolean isFull();", "public boolean isFull();", "public boolean isFull();", "public boolean isFull();", "public boolean isFull();", "public boolean isFull();", "public boolean isOutOfMemory() {\n if (isEnabled())\n return ((getMax() - getCurrent()) < (getInitial() + 200000));\n else\n return false;\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\r\n\t\treturn data.size() >= maxQueue;\r\n\t}", "private static boolean FullRAM(String jobId){\n if(pcb.getProcessSize(jobId) <= RAMSpace()){\n return false;\n }\n else{\n return true;\n }\n }", "boolean hasTotalSize();", "boolean hasCapacity();", "private boolean isMemorySpaceAvailable() {\n File storagePath;\n if (getStorageDirectories(currentActivity).length > 0) {\n try {\n storagePath = new File(getStorageDirectories(currentActivity)[0]);\n } catch (Exception e) {\n //Log.e(TAG, \"Failed to set appropriate storage path: \" +\n// e.getMessage());\n setUserDownloadLocationPref(false);\n storagePath = Environment.getExternalStorageDirectory();\n }\n } else {\n setUserDownloadLocationPref(false);\n storagePath = Environment.getExternalStorageDirectory();\n }\n return getMegabytesAvailable(storagePath) > getRemainingDownloadSize();\n }", "private boolean isFull() {\n\t\treturn nbmsg==getSize();\n\t}", "public boolean isFull(){\n return size == arrayQueue.length;\n }", "public boolean isFull(){\n\t\treturn false;\n\t}", "public boolean isFull() {\r\n\t\treturn false;\r\n\t}", "public boolean isFull() { return false; }", "public boolean isFull() {\n\t\t\n\t\tif (currentOccup < maxOccup)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public boolean isFull() {\n return false;\n }", "private boolean ifFull() {\n return items.length == size;\n }", "boolean hasMaxSize();", "public boolean isFull() {\r\n\t\treturn cur_index == size;\r\n\t}", "public boolean goodMemorySize(){\n\t\t\n\t\tif (memorySize < 128) {\n\t\t\tgoodMemorySize = false;\n\t\t}\n\t\t\n\t\telse {\n\t\t\tgoodMemorySize = true;\n\t\t}\n\t\t\n\t\treturn goodMemorySize;\n\t}", "public boolean isFull() {\n\t\treturn false;\n\t}", "public boolean isFull() {\n return (front == 0 && last == capacitySize) ? true : false;\n }", "public boolean isCacheFull() {\n return this.cacheSize >= this.maximumCacheSize;\n }", "public boolean isFull() {\n return (e+1)%buf.length == b;\n }", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "boolean isFull();", "public boolean is_full()\n\t {\n\t if (num_elements == capacity)\n\t return true;\n\t return false;\n\t }", "public boolean isFull() {\n\t\treturn numElements==data.length;\n\t}", "public Boolean checkifItHasExternalMemory() {\n\t\tString state = Environment.getExternalStorageState();\n\t\tif (Environment.MEDIA_MOUNTED.equals(state)) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private void checkCapacity() {\n\t\tif (size.get() >= region.getCapacity()) {\n\t\t\tsynchronized (cleanUpThread) {\n\t\t\t\tcleanUpThread.notify();\n\t\t\t}\n\t\t}\n\t}", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "private boolean isFull(){\n return cellSize == Max;\n }", "public boolean isFull() {\n int size = 0;\n for (int i = 0; i < items.length; i++) {\n if (items[i] != null) {\n size++;\n }\n }\n return size == items.length;\n }", "@Override\n\tpublic boolean isFull() {\n\t\tif(nodeCount == this.MAX_SIZE) return true; \n\t\telse return false;\n\t}", "public final boolean hasAllocationSize() {\n return m_allocSize > 0 ? true : false;\n }", "public boolean isFull() {\n return size == k;\n}", "@Override\n public boolean isFull() {\n return false;\n }", "private boolean hasCapacity() {\n int used = 0 + evaluations.size() * 2;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return used < available;\n }", "public boolean isFull() {\n\t\treturn count == st.length? true : false;\r\n\t}", "public void onMemoryExceed();", "boolean isFull()\n\t{\n\t\treturn rear==size-1;\n\t}", "public boolean isFull() {\n return numOfGoods == cargoSpace;\n }", "public boolean checkSpace(int size) {\n if (canGrow) return true;\n\n Block b = findFreeBlock(size);\n return b != null;\n }", "public Boolean isFull() {\n\t\tif (this.mVehicles.size() == this.mCapacity)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean isFull() {\r\n\t\treturn (rear+1)%maxSize==front;\r\n\t}", "public boolean isFull() {\n\t\treturn end != null;\n\t}", "public boolean isFull() {\n\t\treturn super.size() == CAPACITY;\n\t}", "public boolean isFull() {\n if(this.top==(size - 1)) {\n return true;\n }\n return false;\n }", "public boolean isFull()\r\n\t\t{\r\n\t\t\tint count = 0;\r\n\t\t\tData currentData = head;\r\n\t\t\twhile (currentData != null)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\t\t\treturn (count > 2); //if the count is > 2 then it is full\r\n\t\t}", "public boolean isFull()\n { \n return count == elements.length; \n }", "public boolean isFull() {\n return this.chromosomes.size() >= Defines.popSize;\n }", "private boolean ifTooEmpty() {\n if (items.length <= 8) {\n return false;\n }\n float efficiency = (float) size / (float) items.length;\n return efficiency < 0.25;\n }", "public double isFull(double size){;\n\t\tif (unitSpaceAvailable > 0 && unitSpaceAvailable <= MAX_QUEUE){\n\t\t\tif(size < unitSpaceAvailable){\n\t\t\treturn unitSpaceAvailable - size;\n\t\t\t}\n\t\t}\n\t\treturn 0.0;\n\t}", "private boolean needToGrow() {\n if(QUEUE[WRITE_PTR] != null) {\n return true;\n }\n else {\n return false;\n }\n }", "boolean isRAM();", "private boolean hasEnoughSpace(long fileSize) throws IOException\n {\n return (getFolderSize(WRITEDIR) + fileSize) <= WRITE_FOLDER_SIZE_LIMIT;\n }", "@FXML\n public void checkMemory()\n {\n long heapSize = Runtime.getRuntime().totalMemory(); \n System.out.println(\"Current: \" +heapSize);\n // Get maximum size of heap in bytes. The heap cannot grow beyond this size.// Any attempt will result in an OutOfMemoryException.\n long heapMaxSize = Runtime.getRuntime().maxMemory();\n System.out.println(\"Max: \" + heapMaxSize);\n }", "public boolean isFull() {\n return (head == tail) && size == capacity;//size==capacity时,为满的\n }", "protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }", "public boolean hasSize() {\n return sizeBuilder_ != null || size_ != null;\n }", "public boolean hasSize() {\n return sizeBuilder_ != null || size_ != null;\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}", "private boolean boardIsFull() {\n int numberOfFieldsOnBoard = boardSize * boardSize;\n return (numberOfFieldsOnBoard == this.numberOfOccupiedFields);\n }", "private void detectLowMemory() throws Exception {\r\n\t\tif (Runtime.getRuntime().freeMemory() < 10000000) {\r\n\t\t\tthrow new Exception(\"Low on memory, please choose a report with less memory usage\");\r\n\t\t}\r\n\t}", "public boolean is_full(){\n return this.habitant.size() >= Constantes.HOUSE_FULL;\n }", "public boolean checkIfFull() {\n this.isFull = true;\n for(int i=0; i<this.size; i++) {\n for(int j=0; j<this.size; j++) if(this.state[i][j].isEmpty) this.isFull = false;\n }\n }", "public boolean hasEnoughSpaceForExecution() {\r\n\t\tlong maxSpaceInHotfolder = Long.parseLong(props.getProperty(\"maxServerSpace\"));\r\n\t\tboolean enoughSpace = false;\r\n\t\ttry {\r\n\t\t\tenoughSpace = hotfolderManager.enoughSpaceAvailable(maxSpaceInHotfolder, inputDavUri, outputDavUri, errorDavUri);\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(\"Could not determine free space in hotfolder (\" + getName() + \")\", e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn enoughSpace;\t\r\n\t}", "public boolean isInNativeHeap();", "@java.lang.Override\n public boolean hasSize() {\n return size_ != null;\n }", "@java.lang.Override\n public boolean hasSize() {\n return size_ != null;\n }", "public boolean isFull() {\n\t\treturn (rear+1)%total_size == front;\r\n\t}", "public boolean needsAllocArrays() {\n return this.table == null;\n }" ]
[ "0.762144", "0.75072604", "0.74916553", "0.74864525", "0.7475717", "0.746743", "0.7460521", "0.7329058", "0.7284156", "0.72624636", "0.7250208", "0.7237939", "0.71754086", "0.71661246", "0.7153573", "0.7140905", "0.7140905", "0.7140905", "0.7140905", "0.7140905", "0.7140905", "0.7078449", "0.7006084", "0.6992815", "0.6987678", "0.6979645", "0.6945175", "0.69394356", "0.6915222", "0.690201", "0.68448067", "0.6843944", "0.68128985", "0.67969745", "0.6795077", "0.67889446", "0.6788745", "0.6773076", "0.6764862", "0.6759762", "0.6745676", "0.673548", "0.6732972", "0.6732972", "0.6732972", "0.6732972", "0.6732972", "0.6732972", "0.6732972", "0.6732972", "0.6732972", "0.67308027", "0.6727168", "0.67104095", "0.66872567", "0.66649383", "0.66649383", "0.66649383", "0.66649383", "0.66617095", "0.6645545", "0.659675", "0.659565", "0.65769726", "0.65531373", "0.6536637", "0.65103215", "0.6509929", "0.64688015", "0.6463027", "0.64574057", "0.6448577", "0.6448252", "0.64288", "0.6422047", "0.6414149", "0.64119107", "0.64091283", "0.6404642", "0.6399457", "0.63691956", "0.636268", "0.63617736", "0.63484824", "0.6341669", "0.6329001", "0.6307596", "0.6306909", "0.6306909", "0.62849927", "0.6282377", "0.6265312", "0.6259026", "0.6251643", "0.6225399", "0.6223288", "0.62227035", "0.62227035", "0.62154484", "0.62041366" ]
0.75447845
1
Adds new frame to memory
int add(int pgNum, int clock, char act) { int old; //If memory is not full if(pointer!=size) { pm[pointer][0] = pgNum; pm[pointer][1] = clock; pm[pointer][2] = act=='W' ? 1 : 0; pointer++; return pointer; } //If memory is full, replace LRU frame int lruID = 0; for(int i = 1; i<size; i++) if(pm[i][2]<pm[lruID][2]) lruID = i; old = pm[lruID][0]; pm[lruID][0] = pgNum; pm[lruID][1] = clock; pm[lruID][2] = act=='W' ? 1 : 0; return old; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addFrame(Point newFrame)\n {\n frames.add(newFrame);\n }", "public void addFrame(AnimationFrame frame) {\n\t\tthis.frames.add(frame);\n\t}", "private void addFrame() {\n String name = selectString(\"What is the name of this frame?\");\n ReferenceFrame frame = selectFrame(\"What frame are you defining this frame relative to?\");\n double v = selectDouble(\"How fast is this frame moving (as a fraction of c)?\", -1, 1);\n try {\n frame.boost(name, v);\n System.out.println(\"Frame added!\");\n } catch (NameInUseException e) {\n System.out.println(\"A frame with that name already exists!\");\n } catch (FasterThanLightException e) {\n System.out.println(\"Nothing can move as quickly as light!\");\n }\n }", "public void newFrameAt(int offset) {\n framePointers.push(runStack.size()-offset);\n }", "public void addFrame(Frame frame) throws BowlingException\r\n\t{\r\n\t\tif(frames.size()==10)\r\n\t\t\tthrow new BowlingException();\r\n\t\telse\r\n\t\t\tframes.add(frame);\r\n\t\t\t\r\n\t\t//to be implemented\r\n\t\t\r\n\t\t\r\n\t}", "public void newFrameAt(int offset){\n runStack.newFrameAt(offset);\n }", "public MemoryFrame replaceMemoryFrame(int pid, int pageRef)\n {\n MemoryFrame oldFrame = frames.remove(frames.firstKey());\n MemoryFrame newFrame = new MemoryFrame(oldFrame.getFrameNumber());\n newFrame.setOwnerID(pid);\n newFrame.setPageReference(pageRef);\n long time = System.nanoTime();\n newFrame.setLastAccessed(time);\n frames.put((Long) time, newFrame);\n \n return oldFrame;\n }", "public void putFrame()\n {\n if (currImage != null)\n {\n super.putFrame(currImage, faceRects, new Scalar(0, 255, 0), 0);\n }\n }", "private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "private void setFrame(Pool p)\n\t{\n\t\tthis.frame = new Frame(p);\n\t}", "public void addFrame(final Image image) {\n\t\tframes.add(new AnimFrame(image));\n\t}", "void newframe() {\n\t\ti = oldind;\r\n\t\toldind = newind;\r\n\t\tnewind = i;\r\n\r\n\t\ti = 0;\r\n\t\tmapind = oldind;\r\n\t\tfor (int y = 0; y < height; y++) {\r\n\t\t\tfor (int x = 0; x < width; x++) {\r\n\t\t\t\tshort data = (short) ((ripplemap[mapind - width] + ripplemap[mapind + width] + ripplemap[mapind - 1] + ripplemap[mapind + 1]) >> 1);\r\n\t\t\t\tdata -= ripplemap[newind + i];\r\n\t\t\t\tdata -= data >> 5;\r\n\t\t\t\tripplemap[newind + i] = data;\r\n\r\n\t\t\t\t// where data=0 then still, where data>0 then wave\r\n\t\t\t\tdata = (short) (1024 - data);\r\n\r\n\t\t\t\t// offsets\r\n\t\t\t\ta = ((x - hwidth) * data / 1024) + hwidth;\r\n\t\t\t\tb = ((y - hheight) * data / 1024) + hheight;\r\n\r\n\t\t\t\t// bounds check\r\n\t\t\t\tif (a >= width)\r\n\t\t\t\t\ta = width - 1;\r\n\t\t\t\tif (a < 0)\r\n\t\t\t\t\ta = 0;\r\n\t\t\t\tif (b >= height)\r\n\t\t\t\t\tb = height - 1;\r\n\t\t\t\tif (b < 0)\r\n\t\t\t\t\tb = 0;\r\n\r\n\t\t\t\tripple[i] = texture[a + (b * width)];\r\n\t\t\t\tmapind++;\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void open()\n\t{\n\t\tbuffer = new LinkedList<>();\n\t\tbuffer.add(decoratee.getCurrentFrameMessage());\n\t\tbufferZeroFrame = 0;\n\t\tcurrentFrame = 0;\n\t}", "public void createFrame() {\r\n System.out.println(\"Framing: Adding the log walls.\");\r\n }", "public void buildFrame();", "public void addCard(Card cardToAdd) {\n storageCards.add(cardToAdd);\n }", "FRAME createFRAME();", "public void addFreezeFrame()\n{\n int index = Collections.binarySearch(_freezeFrames, getTime());\n if(index<0)\n _freezeFrames.add(-index - 1, getTime());\n}", "public MemoryFrame referenceMemoryFrame(Integer num)\n {\n Collection<MemoryFrame> frameCollection = frames.values();\n MemoryFrame frame = null;\n \n for (MemoryFrame f : frameCollection) {\n if (f.getFrameNumber() == (int) num) {\n frame = frames.remove((Long) f.getLastAccessed());\n break;\n }\n }\n \n long time = System.nanoTime();\n frame.setLastAccessed(time);\n \n frames.put((Long) time, frame);\n \n return frame;\n }", "public void newPage(FrameDesc fdesc) {\n // no need to update frame state\n }", "public void setFrame(int newFrame) {\r\n if (newFrame < maxFrames) {\r\n frame = newFrame;\r\n }\r\n }", "public Frame3.Builder addFrame(Frame3 frame, FramePosition position) {\n\t\t\tif (managedInstance.frame3s == null) {\n\t\t\t\tmanagedInstance.frame3s = new ArrayList<Frame3>();\n\t\t\t}\n\t\t\tConsumer<Frame3> f = obj -> {\n\t\t\t\tmanagedInstance.frame3s.add(obj);\n\t\t\t};\n\t\t\treturn new Frame3.Builder(this, f, frame, position);\n\t\t}", "private void update(int frameNo)\n {\n //This function is to be used for LRU and MRU\n }", "public void nextFrame() {\r\n if (frame < maxFrames - 1) {\r\n frame++;\r\n } else {\r\n frame = 0;\r\n }\r\n }", "public void addKeyFrame() throws IOException{\n\t\tkeyFrameList.add(captureCurrentFrame());\n\t\n\t\tif(keyFrameList.size() > 1 && timer != null){ \n\t\t\tupdateTimer();\n\t\t}else{\n\t\t\tmakeTimer(); \n\t\t}\n\t}", "public void addUserDefinedFrame(UserDefinedFrame value) {\r\n\t\tBase.add(this.model, this.getResource(), USERDEFINEDFRAME, value);\r\n\t}", "public boolean add(BufferSlot bs);", "Frame createFrame();", "public void incrementFrameNumber()\n {\n\tframeNumber++;\n }", "private void checkAndAddReferenceFrame(ReferenceFrame referenceFrame)\n {\n checkAndAddReferenceFrame(referenceFrame, referenceFrame.getNameBasedHashCode());\n }", "public void addFrame(GInternalFrame internalFrame) {\r\n\t\tinternalFrame.setDesktopPane(this);\r\n\t\tint spos = (frames.size() + 1) * 12;\r\n\t\tint left = getFrame().getAbsoluteLeft() + spos;\r\n\t\tint top = getFrame().getAbsoluteTop() + spos;\r\n\r\n\t\t// System.out.println(\"HippoDesktopPane.add frame gf.absleft \" +\r\n\t\t// getFrame().getAbsoluteLeft() + \" gf.abstop \"\r\n\t\t// + getFrame().getAbsoluteTop() + \" \" + spos);\r\n\r\n\t\tSelectBoxManagerImpl selectBoxManager = ((DefaultGFrame) internalFrame)\r\n\t\t\t\t.getSelectBoxManager();\r\n\t\tif (selectBoxManager instanceof SelectBoxManagerImplIE6) {\r\n\t\t\tgetFrame().add(selectBoxManager.getBlockerWidget(), left, top);\r\n\t\t}\r\n\t\tgetFrame().add((Widget) internalFrame);\r\n\t\tinternalFrame.setLocation(left, top);\r\n\r\n\t\t// NOTE needed to add this to get the windwos to pop ontop of the ocean\r\n\t\tDOM.setStyleAttribute(((DefaultGInternalFrame) internalFrame).getElement(), \"position\",\r\n\t\t\t\t\"absolute\");\r\n\r\n\t\tframes.add(internalFrame);\r\n\r\n\t\t// internalFrame.setTheme(theme);\r\n\t}", "void insertView(ViewFrame view);", "public Frame3.Builder addFrame(Frame3 frame) {\n\t\t\treturn addFrame(frame, FramePosition.CENTRE);\n\t\t}", "@Override public void visitFrame(\n int type,\n int nLocal,\n Object[] local,\n int nStack,\n Object[] stack) {}", "public void addUserDefinedFrame( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), USERDEFINEDFRAME, value);\r\n\t}", "public void addChildFrame(JFrame frame);", "private static native void runFrame(long pointer);", "public Frame3.Builder addFrame(String frameCode, GennyToken serviceToken) throws Exception {\n\n\t\t\treturn addFrame(frameCode, FramePosition.CENTRE, serviceToken);\n\t\t}", "public void push(Card newCard)\n\t{\n\t\tcard.add(newCard);\n\t}", "void accessFrame(Buffer frame) {\r\n\r\n\t\t\t// For demo, we'll just print out the frame #, time &\r\n\t\t\t// data length.\r\n\r\n\t\t\tlong t = (long)(frame.getTimeStamp()/10000000f);\r\n\r\n\t\t\tStdout.log(\"Pre: frame #: \" + frame.getSequenceNumber() + \r\n\t\t\t\t\t\", time: \" + ((float)t)/100f + \r\n\t\t\t\t\t\", len: \" + frame.getLength());\r\n\t\t}", "public void add(IFrame instance, CIdentity identity) {\n\n\t\tcoreMatcher.add(instance, identity);\n\t}", "public frame() {\r\n\t\tframeOwner = 0;\r\n\t\tassignedProcess = 0;\r\n\t\tpageNumber = 0;\r\n\t}", "private int addBuffer( FloatBuffer directBuffer, FloatBuffer newBuffer ) {\n int oldPosition = directBuffer.position();\n if ( ( directBuffer.capacity() - oldPosition ) >= newBuffer.capacity() ) {\n directBuffer.put( newBuffer );\n } else {\n oldPosition = -1;\n }\n return oldPosition;\n }", "@Override\n\tpublic void onNewFrame(HeadTransform headTransform) {\n\t}", "public synchronized void addFrame(float duration, File image)\n\t\t\tthrows IOException {\n\t\tif (closed)\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"this writer has already been closed\");\n\n\t\tint relativeTime = (int) (duration * DEFAULT_TIME_SCALE + .5);\n\t\tvideoTrack.addFrame(relativeTime, image);\n\t}", "@Override\n\tpublic void visitFrame(int type, int nLocal, Object[] local, int nStack,\n\t\t\tObject[] stack) {\n\t}", "void setCurrentFrame(int frameNum) {\n this.currFrame = frameNum;\n }", "public void run() {\n gf = addGameFrame(\"Pacman\", displayW, displayH);\n }", "FRAMESET createFRAMESET();", "private static void addBlockToPixa(Pixa pixa, int x, int y, int width, int height, int depth) {\n final Pix pix = new Pix(width, height, depth);\n final Box box = new Box(x, y, width, height);\n\n pixa.add(pix, box, Constants.L_COPY);\n\n pix.recycle();\n box.recycle();\n }", "public void onFrameRefresh(ym iba) {}", "public void xsetFrame(com.walgreens.rxit.ch.cda.StrucDocTable.Frame frame)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocTable.Frame target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Frame)get_store().find_attribute_user(FRAME$24);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Frame)get_store().add_attribute_user(FRAME$24);\n }\n target.set(frame);\n }\n }", "@Test\n public void testMemoryVarSizeFrameNoDiskNoDiscard() {\n try {\n Random random = new Random();\n IHyracksTaskContext ctx = TestUtils.create(DEFAULT_FRAME_SIZE);\n // No spill, No discard\n FeedPolicyAccessor fpa = createFeedPolicyAccessor(false, false, 0L, DISCARD_ALLOWANCE);\n // Non-Active Writer\n TestControlledFrameWriter writer = FrameWriterTestUtils.create(DEFAULT_FRAME_SIZE, false);\n writer.freeze();\n // FramePool\n ConcurrentFramePool framePool = new ConcurrentFramePool(NODE_ID, FEED_MEM_BUDGET, DEFAULT_FRAME_SIZE);\n FeedRuntimeInputHandler handler = createInputHandler(ctx, writer, fpa, framePool);\n handler.open();\n ByteBuffer buffer = ByteBuffer.allocate(DEFAULT_FRAME_SIZE);\n int multiplier = 1;\n // add NUM_FRAMES times\n while ((multiplier <= framePool.remaining())) {\n handler.nextFrame(buffer);\n multiplier = random.nextInt(10) + 1;\n buffer = ByteBuffer.allocate(DEFAULT_FRAME_SIZE * multiplier);\n }\n // we can't satisfy the next request\n // Next call should block we will do it in a different thread\n Future<?> result = EXECUTOR.submit(new Pusher(buffer, handler));\n // Check that the nextFrame didn't return\n if (result.isDone()) {\n Assert.fail();\n }\n // Check that no records were discarded\n Assert.assertEquals(handler.getNumDiscarded(), 0);\n // Check that no records were spilled\n Assert.assertEquals(handler.getNumSpilled(), 0);\n // Check that number of stalled is not greater than 1\n Assert.assertTrue(handler.getNumStalled() <= 1);\n writer.unfreeze();\n handler.close();\n result.get();\n } catch (Throwable th) {\n th.printStackTrace();\n Assert.fail();\n }\n Assert.assertNull(cause);\n }", "public final void unreadFrame() throws IOException {\n if (wordpointer == -1 && bitindex == -1 && (framesize > 0)) {\n source.unread(frame_bytes,0,framesize);\n }\n }", "private final void buffer_push_back(byte d)\n\t{\n\t\tif (buffer_size_ >= buffer_.length) {\n int newsize = buffer_size_ * 2 + 10;\n byte[] newbuffer = new byte[newsize];\n\n for (int i = 0; i < buffer_size_; ++i)\n {\n newbuffer[i] = buffer_[i];\n }\n buffer_ = newbuffer;\n\t\t}\n\t\tbuffer_[buffer_size_] = d;\n\t\tbuffer_size_ = buffer_size_ + 1;\n\t}", "protected void showBackBuffer(final FrameContainer frame, final String filename) {\n if (frame == null) {\n eventBus.publishAsync(new UserErrorEvent(ErrorLevel.LOW, null, \"Given a null frame\", \"\"));\n return;\n }\n \n final Path testFile = Paths.get(filename);\n if (Files.exists(testFile)) {\n try {\n final ReverseFileReader file = new ReverseFileReader(testFile);\n // Because the file includes a newline char at the end, an empty line\n // is returned by getLines. To counter this, we call getLines(1) and do\n // nothing with the output.\n file.getLines(1);\n final Stack<String> lines = file.getLines(backbufferLines);\n while (!lines.empty()) {\n frame.addLine(getColouredString(colour, lines.pop()), backbufferTimestamp);\n }\n file.close();\n frame.addLine(getColouredString(colour, \"--- End of backbuffer\\n\"),\n backbufferTimestamp);\n } catch (IOException | SecurityException e) {\n eventBus.publishAsync(new UserErrorEvent(ErrorLevel.LOW, e,\n \"Unable to show backbuffer (Filename: \" + filename + \"): \" + e.getMessage(),\n \"\"));\n }\n }\n }", "public static void addUserDefinedFrame( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, USERDEFINEDFRAME, value);\r\n\t}", "void matchFrame();", "void update() {\n rectToBeDrawn = new Rect((frameNumber * frameSize.x)-1, 0,(frameNumber * frameSize.x + frameSize.x) - 1, frameSize.x);\n\n //now the next frame\n frameNumber++;\n\n //don't try and draw frames that don't exist\n if(frameNumber == numFrames){\n frameNumber = 0;//back to the first frame\n }\n }", "public void start() {\n\t\tcurrentFrameIndex = 0;\n\t}", "public void add() {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->add() unimplemented!\\n\");\n }", "public synchronized void addFrame(float duration, BufferedImage bi,\n\t\t\tMap<String, Object> settings) throws IOException {\n\t\tif (closed)\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"this writer has already been closed\");\n\t\tint relativeDuration = (int) (duration * DEFAULT_TIME_SCALE + .5);\n\n\t\tvideoTrack.validateSize(bi.getWidth(), bi.getHeight());\n\t\tlong startPosition = out.getBytesWritten();\n\t\twriteFrame(out, bi, settings);\n\t\tlong byteSize = out.getBytesWritten() - startPosition;\n\t\tVideoSample sample = new VideoSample(relativeDuration,\n\t\t\t\tout.getBytesWritten() - byteSize, byteSize);\n\t\tvideoTrack.addSample(sample);\n\t}", "private KeyFrame addNewKeyFrame(){\n return new KeyFrame(Duration.millis(1000), e -> {\n\n //Performs a check on the width of the board to see if it should run concurrently or not\n if (board.getWidth() < 600) {\n gOL.nextGeneration();\n } else {\n\n //Does a check to see if threadWorkers executorService has been shut down for any reason.\n //Runs nextGenerationConcurrent if it is still active, or normally if not.\n if (!threadWorker.getShutDownStatus()) {\n gOL.nextGenerationConcurrent();\n } else {\n gOL.nextGeneration();\n }\n }\n\n draw();\n gOL.incrementGenCounter();\n generationLabel.setText(Integer.toString(gOL.getGenCounter()));\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n });\n }", "public void setContent (ZFrame frame)\n {\n if (content != null)\n content.destroy ();\n content = frame;\n }", "public void setContent (ZFrame frame)\n {\n if (content != null)\n content.destroy ();\n content = frame;\n }", "private ByteBuf nextBufferForFrame(int bytesToRead) {\n ByteBuf buf = buffers.getFirst();\n ByteBuf frame;\n\n if (buf.readableBytes() > bytesToRead) {\n frame = buf.retain().readSlice(bytesToRead);\n totalSize -= bytesToRead;\n } else {\n frame = buf;\n buffers.removeFirst();\n totalSize -= frame.readableBytes();\n }\n\n return frame;\n }", "public native void renderFrame();", "public native void renderFrame();", "public void addBuff(int duration) {\r\n buffs.add(duration);\r\n }", "public Frame(Heap h,Word cref,int mx,boolean debug) {\r\n\t\tlog(\"new frame running class \"+cref+\" method index \"+mx);\r\n\t\tthis.heap=h;\r\n\t\tthis.cref=cref;\r\n\t\t//get the method ref from the class pool\r\n\t\tint imref = h.arrayLoad(cref,mx);\r\n\t\tlog(\"cref=\"+cref.toString()+\";mx=\"+mx+\";imref=\"+Integer.toString(imref,8));\r\n\t\tmref = new Word(imref);\r\n\t\tnumParams = h.params(mref);\r\n\t\tbase=mref.index()+2;\r\n\t\tthis.debug=debug;\r\n\t}", "@Override\n\tpublic void addFrom(Frame f) {\n\t\tint arr[][];\n\n\t\tif (f instanceof GrayImage) {\n\t\t\tarr = ((GrayImage)f).getFrame();\n\t\t}\n\n\t\telse {\n\t\t\treturn;\n\t\t}\n\n\t\tint x[] = new int[1];\n\n\t\tif (arr.length == this.frame.length && arr[0].length == this.frame[0].length) {\n\t\t\tfor (int i = 0; i<this.frame.length;i++) {\n\t\t\t\tfor (int j = 0; j<this.frame[0].length;j++) {\n\t\t\t\t\tx = f.getPixel(i, j);\n\t\t\t\t\tif ( this.frame[i][j] + x[0] > 255*255) {\n\t\t\t\t\t\tthis.frame[i][j] = 255*255;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.frame[i][j] = this.frame[i][j] + x[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "private ByteBuf nextBufferForFrame(int bytesToRead) {\n ByteBuf buf = buffers.getFirst();\n ByteBuf frame;\n\n if (buf.readableBytes() > bytesToRead) {\n frame = buf.retain().readSlice(bytesToRead);\n totalSize -= bytesToRead;\n } else {\n frame = buf;\n buffers.removeFirst();\n totalSize -= frame.readableBytes();\n }\n\n return frame;\n }", "private void addSubframes(org.chromium.components.paint_preview.common.proto.PaintPreview.PaintPreviewFrameProto value) {\n value.getClass();\n ensureSubframesIsMutable();\n subframes_.add(value);\n }", "@Override\n\tpublic Frame getNextFrame() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Frame getNextFrame() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Frame getNextFrame() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void addToBuffer(byte[] buff, int len) {\r\n\t\tbios.write(buff, 0, len);\r\n\t}", "void open(VirtualFrame frame);", "void doFrame() throws PlayerDebugException\n\t{\n\t\tint num = 0; // frame 0 by default \n\t\ttry\n\t\t{\n\t\t\tif (hasMoreTokens())\n\t\t\t\tnum = nextIntToken();\n\n\t\t\tpropertyPut(DISPLAY_FRAME_NUMBER, num);\n\n\t\t\tdumpFrame(num);\n\t\t\tsetListingToFrame(num);\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"notANumber\", args)); //$NON-NLS-1$\n\t\t}\n catch(ArrayIndexOutOfBoundsException aie)\n {\n \tMap<String, Object> args = new HashMap<String, Object>();\n \targs.put(\"frameNumber\", Integer.toString(num)); //$NON-NLS-1$\n err(getLocalizationManager().getLocalizedTextString(\"frameDoesNotExist\", args)); //$NON-NLS-1$\n }\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noActiveSession\")); //$NON-NLS-1$\n\t\t}\n\t}", "public Frame3.Builder addFrame(String frameCode, FramePosition position, GennyToken serviceToken) throws Exception {\n\t\t\tif (managedInstance.frame3s == null) {\n\t\t\t\tmanagedInstance.frame3s = new ArrayList<Frame3>();\n\t\t\t}\n\t\t\tFrame3 frame = null;\n\t\t\t/*frame = VertxUtils.getObject(serviceToken.getRealm(), \"\", frameCode, Frame3.class, serviceToken.getToken());*/\n\t\t\tframe = VertxUtils.readFromDDT(serviceToken.getRealm(), frameCode, true, serviceToken.getToken(), Frame3.class);\n\t\t\tif (frame != null) {\n\n\t\t\t} else {\n\t\t\t\tthrow new Exception(\"Could not load Frame \" + frameCode + \" - Does it exist yet?\");\n\t\t\t}\n\n\t\t\tConsumer<Frame3> f = obj -> {\n\t\t\t\tmanagedInstance.frame3s.add(obj);\n\t\t\t};\n\n\t\t\treturn new Frame3.Builder(this, f, frame, position);\n\t\t}", "@Test\n public void testMemoryFixedSizeFrameWithSpillNoDiscard() {\n try {\n IHyracksTaskContext ctx = TestUtils.create(DEFAULT_FRAME_SIZE);\n // Spill budget = Memory budget, No discard\n FeedPolicyAccessor fpa =\n createFeedPolicyAccessor(true, false, DEFAULT_FRAME_SIZE * NUM_FRAMES, DISCARD_ALLOWANCE);\n // Non-Active Writer\n TestControlledFrameWriter writer = FrameWriterTestUtils.create(DEFAULT_FRAME_SIZE, false);\n writer.freeze();\n // FramePool\n ConcurrentFramePool framePool = new ConcurrentFramePool(NODE_ID, FEED_MEM_BUDGET, DEFAULT_FRAME_SIZE);\n FeedRuntimeInputHandler handler = createInputHandler(ctx, writer, fpa, framePool);\n handler.open();\n VSizeFrame frame = new VSizeFrame(ctx);\n // add NUM_FRAMES times\n for (int i = 0; i < NUM_FRAMES; i++) {\n handler.nextFrame(frame.getBuffer());\n }\n // Next call should NOT block. we will do it in a different thread\n Future<?> result = EXECUTOR.submit(new Pusher(frame.getBuffer(), handler));\n result.get();\n // Check that no records were discarded\n Assert.assertEquals(handler.getNumDiscarded(), 0);\n // Check that one frame is spilled\n Assert.assertEquals(handler.getNumSpilled(), 1);\n // consume memory frames\n writer.unfreeze();\n handler.close();\n Assert.assertEquals(handler.framesOnDisk(), 0);\n // exit\n } catch (Throwable th) {\n th.printStackTrace();\n Assert.fail();\n }\n Assert.assertNull(cause);\n }", "public void processFrame(float deltaTime);", "public void onAdd2Scene() {\n\t\tAnimation src = getSourceAnimation();\n\t\tif( src != null ) {\n\t\t\tadd2Scene(src, getSourceAnimation().actFrame);\n\t\t\tlog.info(\" adding frame from {}\", vm.cutInfo);\n\t\t}\n\t\t\n\t}", "public void addFrame(List<Shape> shapeList) throws IllegalArgumentException {\n if (shapeList == null) {\n throw new IllegalArgumentException(\"shapeList cannot be null\");\n }\n this.shapeList = shapeList;\n }", "private void agregarAlPanel(JInternalFrame frame)\n\t{\n\t\tframe.setBounds(10 * (contentPane.getAllFrames().length + 1), 50 + (10 * (contentPane.getAllFrames().length + 1)), (int)frame.getBounds().getWidth(), (int)frame.getBounds().getHeight());\n\t\tcontentPane.add(frame);\n\t\tframe.moveToFront();\n\t}", "public synchronized void addBytes(ByteBuffer bytes) {\n\t _buffers.add(bytes);\n \n }", "public void setFrame(double anX, double aY, double aWidth, double aHeight)\n{\n setFrameXY(anX, aY);\n setFrameSize(aWidth, aHeight);\n}", "public void addToBottom(Card card){\r\n cards.add(card);\r\n deckSize++;\r\n }", "public interface alloc_frame_callback extends Callback {\n\t\tint apply(AVCodecContext avctx, AVFrame frame);\n\t}", "public void addCard(Card card){\n\t\tthis.pile.add(0, card);\n\t}", "public void setFrame(String frame){\r\n\t\taddAttribute(new PointingElement(\"frame\",frame));\r\n\t}", "@Test\n public void testMemoryFixedSizeFrameNoDiskNoDiscard() {\n try {\n IHyracksTaskContext ctx = TestUtils.create(DEFAULT_FRAME_SIZE);\n // No spill, No discard\n FeedPolicyAccessor fpa = createFeedPolicyAccessor(false, false, 0L, DISCARD_ALLOWANCE);\n // Non-Active Writer\n TestControlledFrameWriter writer = FrameWriterTestUtils.create(DEFAULT_FRAME_SIZE, false);\n writer.freeze();\n // FramePool\n ConcurrentFramePool framePool = new ConcurrentFramePool(NODE_ID, FEED_MEM_BUDGET, DEFAULT_FRAME_SIZE);\n\n FeedRuntimeInputHandler handler = createInputHandler(ctx, writer, fpa, framePool);\n handler.open();\n VSizeFrame frame = new VSizeFrame(ctx);\n // add NUM_FRAMES times\n for (int i = 0; i < NUM_FRAMES; i++) {\n handler.nextFrame(frame.getBuffer());\n }\n // Next call should block we will do it in a different thread\n Future<?> result = EXECUTOR.submit(new Pusher(frame.getBuffer(), handler));\n // Check that the nextFrame didn't return\n if (result.isDone()) {\n Assert.fail();\n } else {\n // Check that no records were discarded\n Assert.assertEquals(handler.getNumDiscarded(), 0);\n // Check that no records were spilled\n Assert.assertEquals(handler.getNumSpilled(), 0);\n // Check that no records were discarded\n // Check that the inputHandler subscribed to the framePool\n // Check that number of stalled is not greater than 1\n Assert.assertTrue(handler.getNumStalled() <= 1);\n writer.kick();\n }\n result.get();\n writer.unfreeze();\n handler.close();\n } catch (Throwable th) {\n th.printStackTrace();\n Assert.fail();\n }\n Assert.assertNull(cause);\n }", "public void addSpaceObject(Image i, Point spaceP, int frameCount, Dimension dim){\n\t\tspaceObjectImages.add(i);\n\t\t//System.out.println(i + \" added in view\");\n\t\tspaceObjectLocations.add(spaceP);\n\t\tspaceObjectFrameCt.add(frameCount);\n\t\tspaceObjectDimension.add(dim);\n\t}", "public addStFrame() {\n initComponents();\n }", "public void addRotation(int frame, Quaternion rotation) {\r\n // copy the quaternion, avoid sharing quaternion rotations.\r\n\r\n Quaternion copy = new Quaternion(rotation);\r\n if (frame + 1 > rotationFrames.size()) {\r\n int numElements = frame + 1 - rotationFrames.size();\r\n rotationFrames.ensureCapacity(frame + 1);\r\n for (int i = 0; i < numElements; ++i) {\r\n rotationFrames.add(null);\r\n }\r\n }\r\n\r\n rotationFrames.set(frame, copy);\r\n }", "public abstract void newWindow(ReFrame newFrame);", "protected void addMove(Move move) {\n moveHistory.add(move);\n pointer++;\n }", "public void addToCollected(PlayingCard card){\n\t\tcollected.add(card);\t\t\n\t}", "public void nextFrame() {\r\n frame++;\r\n if( frame > lastEditFrame + frameDelay ) {\r\n // The last transaction is 'done'\r\n transaction = null;\r\n }\r\n }" ]
[ "0.7381156", "0.6868156", "0.68113863", "0.679418", "0.6462767", "0.6427904", "0.6222543", "0.6066099", "0.59277856", "0.5918492", "0.5910148", "0.58654946", "0.5854103", "0.5852167", "0.57785463", "0.57062143", "0.56536025", "0.5636853", "0.55996084", "0.55947113", "0.55762184", "0.5568958", "0.55432165", "0.55223453", "0.55102193", "0.54881877", "0.5472375", "0.5421697", "0.54140836", "0.53970444", "0.5388206", "0.5369845", "0.5349191", "0.53413826", "0.53004277", "0.5298649", "0.52953726", "0.5280306", "0.526823", "0.5267282", "0.5261225", "0.5222569", "0.52178687", "0.52022433", "0.51834416", "0.5168259", "0.51670605", "0.51646805", "0.51582634", "0.51581866", "0.51581526", "0.5154963", "0.5153908", "0.51399386", "0.5134211", "0.51268613", "0.51225364", "0.5119005", "0.5106798", "0.51056796", "0.51006204", "0.50957274", "0.50890684", "0.50887936", "0.5078484", "0.5078484", "0.50618356", "0.50571126", "0.50571126", "0.5053096", "0.5052632", "0.50516754", "0.50481653", "0.5047857", "0.50476295", "0.50476295", "0.50476295", "0.5034753", "0.5034345", "0.50297064", "0.5023011", "0.50079006", "0.50044274", "0.49967036", "0.49944416", "0.49824154", "0.497727", "0.4967196", "0.4963964", "0.49577728", "0.49543697", "0.49478236", "0.49423373", "0.4925594", "0.49238607", "0.4919375", "0.49157557", "0.4912344", "0.49092317", "0.49074516" ]
0.5090294
62
Checks if memory contains given frame.
int contains(int pgNum, int clock, char act) { for(int i = 0; i <size; i++) if(pm[i][0]==pgNum) { pm[i][1] = clock; pm[i][2] = act=='W' ? 1 : 0; return i; } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasFrame();", "public boolean hasFrame() {\n return frame_ != null;\n }", "public boolean hasFrame() {\n return frameBuilder_ != null || frame_ != null;\n }", "public boolean isSetFrame()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(FRAME$24) != null;\n }\n }", "public boolean checkFrame(IDdfDataFrame frameSoFar)\n {\n // TODO: The given 'frameSoFar' is the same 'frameSoFar' that\n // your 'isCompleteFrame' method would have just returned 'true'\n // for. Please review this frame further and verify that it\n // passes any data integrity checks such as a check sum, CRC,\n // or LRC that your driver's protocol may require.\n return true; \n }", "public static boolean isFrameContentValid(FrameModel frame) {\n return computeReminder(frame.getFrameContent()).equals(padding);\n }", "public boolean canFreezeFrame()\n{\n // Get current time\n int time = getTime();\n \n // If frame zero or last frame, return false\n if(time==0 || time==getMaxTime())\n return false;\n \n // If frame already in freeze frames, return false\n if(Collections.binarySearch(_freezeFrames, time)>=0)\n return false;\n \n // If frame is already in key frames, return false\n if(Collections.binarySearch(getKeyFrameTimes(null, false), time)>=0)\n return false;\n \n // Return true\n return true;\n}", "public native boolean hasFrames() throws MagickException;", "boolean hasFirstFrame();", "private boolean hasFrame(Long2ObjectMap<ChunkAccess> chunkMap, Object2BooleanMap<BlockPos> cachedIsFrame, Direction direction, boolean rotated) {\n int alternatingX = 0;\n int alternatingY = 0;\n int alternatingZ = 0;\n if (rotated) {\n if (direction.getAxis() == Axis.Z) {\n alternatingX = 1;\n } else {\n alternatingZ = 1;\n }\n } else if (direction.getAxis() == Axis.Y) {\n alternatingX = 1;\n } else {\n alternatingY = 1;\n }\n int xComponent = direction.getStepX();\n int yComponent = direction.getStepY();\n int zComponent = direction.getStepZ();\n\n //Start by checking the two spots right next to the teleporter, and then checking the opposite corner, as those are the most likely to overlap\n return isFramePair(chunkMap, cachedIsFrame, 0, alternatingX, 0, alternatingY, 0, alternatingZ) &&\n isFrame(chunkMap, cachedIsFrame, 3 * xComponent, 3 * yComponent, 3 * zComponent) &&\n isFramePair(chunkMap, cachedIsFrame, xComponent, alternatingX, yComponent, alternatingY, zComponent, alternatingZ) &&\n isFramePair(chunkMap, cachedIsFrame, 2 * xComponent, alternatingX, 2 * yComponent, alternatingY, 2 * zComponent, alternatingZ) &&\n isFramePair(chunkMap, cachedIsFrame, 3 * xComponent, alternatingX, 3 * yComponent, alternatingY, 3 * zComponent, alternatingZ);\n }", "static int findframesize(Memory mem, int addr) {\r\n\t\t// 27bdffc0 addiu sp = sp * -64\r\n\t\tfor (int n = 0; n < 8; n++) {\r\n\t\t\tint isn = mem.load_word(addr + (n * 4));\r\n\t\t\tif ((isn & 0xffff0000) == 0x27bd0000) {\r\n\t\t\t\tshort imm = (short) -isn;\r\n\t\t\t\treturn imm;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// happens for hlt\r\n\t\t//opt.println(\"address but no frame for %s\", f);\r\n\t\treturn -1;\r\n\t}", "private boolean isEmpty(int frameNo){\n int bit = frameNo/32;\n int mask = frameNo%32;\n int test = bitMap[bit] & MASK[mask];\n return test==0;\n }", "public boolean hasMemoryAddress()\r\n/* 138: */ {\r\n/* 139:167 */ return false;\r\n/* 140: */ }", "@Override\r\n public void checkIfInFrame(Hero hero) {\r\n\r\n }", "public boolean checkFrameValid() {\n return explosionFrame < explosions.length;\n }", "public boolean acceptFrame(EvDecimal frame);", "private boolean isFrame() {\n\t\treturn Frame==60;\n\t}", "default boolean hasEnoughMemory(long memory){\n return getUnusedMemory() >= memory;\n }", "public synchronized void verifyModified(PybaseDebugStackFrame frame, PybaseDebugVariable[] newFrameVariables)\n{\n synchronized(lock) {\n Map<String, PybaseDebugStackFrame> threadIdCache = cache.get(frame.getThreadRemoteId());\n if(threadIdCache == null){\n\t threadIdCache = new HashMap<String, PybaseDebugStackFrame>();\n\t cache.put(frame.getThreadRemoteId(), threadIdCache);\n }\n\n PybaseDebugStackFrame cacheFrame = threadIdCache.get(frame.getId());\n if(cacheFrame == null){\n\t threadIdCache.put(frame.getId(), frame);\n\t return;\n }\n //not null\n if(cacheFrame == frame){ //if is same, it has already been checked.\n\t return;\n }\n\n //if it is not the same, we have to check it and mark it as the new frame.\n verifyVariablesModified(newFrameVariables, cacheFrame);\n threadIdCache.put(frame.getId(), frame);\n }\n}", "public boolean supply(Frame frame)\n {\n if (frame instanceof IntactFrame)\n onIntactFrame((IntactFrame) frame);\n else\n onCorruptFrame();\n\n received += frame.frameSize;\n if (size == received)\n onComplete();\n return size == received;\n }", "public static boolean isFrameContentValid(String frameContent) {\n return computeReminder(frameContent).equals(padding);\n }", "public boolean isFinalFrame(final Frame frame) {\n\t\treturn frames.indexOf(frame) == frames.size() - 1? true : false;\n\t}", "public boolean hasFirstFrame() {\n return firstFrame_ != null;\n }", "boolean containsKeyLocalOffHeap(Object key);", "boolean containsKeyLocalOnHeap(Object key);", "private boolean processFrameOfContainedMessages(ShareableBytes bytes, Limit endpointReserve, Limit globalReserve) throws IOException\n {\n while (bytes.hasRemaining())\n if (!processOneContainedMessage(bytes, endpointReserve, globalReserve))\n return false;\n return true;\n }", "private void checkAndAddReferenceFrame(ReferenceFrame referenceFrame)\n {\n checkAndAddReferenceFrame(referenceFrame, referenceFrame.getNameBasedHashCode());\n }", "public boolean hasFirstFrame() {\n return firstFrameBuilder_ != null || firstFrame_ != null;\n }", "public boolean isInNativeHeap();", "public boolean isInitialFrame(final Frame frame) {\n\t\treturn frames.indexOf(frame) == 0? true : false;\n\t}", "protected static boolean outOfFrame(@NotNull Shape shape) {\n\t\tif (shape.position.x + shape.size.x / 2 < Camera.getPosition().x)\n\t\t\treturn (true);\n\t\tif (shape.position.x - shape.size.x / 2 > Display.getWidth() + Camera.getPosition().x)\n\t\t\treturn (true);\n\t\tif (shape.position.y - shape.size.y / 2 > Display.getHeight() + Camera.getPosition().y)\n\t\t\treturn (true);\n\t\treturn shape.position.y + shape.size.y / 2 < Camera.getPosition().y;\n\t}", "public JJITInstruction run(KFrame frame) throws Exception {\n return ((c_memman.getArraySize(((KReference)frame.getLocal(0))) <= frame.getLocal(8).intValue())?(c_label):(c_next));\n }", "private final boolean m80073a(View view, MotionEvent motionEvent) {\n if (view.getVisibility() != 0) {\n return false;\n }\n Rect rect = (Rect) f64281K.acquire();\n if (rect == null) {\n rect = new Rect();\n }\n C43134fm.m136821a((ViewGroup) this, view, rect);\n try {\n boolean contains = rect.contains((int) motionEvent.getX(), (int) motionEvent.getY());\n return contains;\n } finally {\n rect.setEmpty();\n f64281K.release(rect);\n }\n }", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "boolean hasSize();", "boolean hasRect();", "@java.lang.Override\n public boolean hasFramesCount() {\n return framesCount_ != null;\n }", "public static int getFreeFrame(){\n\t\tint frameNo = -1;\n\t\tfor(int i=0;i<memory_fmbv.length;i++){\n\t\t\tif(memory_fmbv[i] == 0){\n\t\t\t\tframeNo = i;\n\t\t\t\tmemory_fmbv[i] = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn frameNo;\n\t}", "void matchFrame();", "private boolean matches(Opcode opcode) {\n List<Integer> opcodeResult = opcode.perform(instruction.getA(), instruction.getB(), instruction.getC(), registersBefore);\n return registersAfter.equals(opcodeResult);\n }", "public boolean hasFramesCount() {\n return framesCountBuilder_ != null || framesCount_ != null;\n }", "public boolean isFull() {\n return (this.top == this.stack.length);\n }", "public boolean isCompleteFrame(IDdfDataFrame frameSoFar)\n {\n\t return frameSoFar.getFrameSize() > 2 && frameSoFar.getFrameBytes()[ frameSoFar.getFrameSize() - 1 ] == IPacket.EOT;\n }", "private boolean contains(DOPEPacket packet){\n\t\tfor (Iterator<DOPEPacket> it = window.iterator(); it.hasNext();){\n\t\t\tif (packet.compareTo(it.next()) == 0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private int findFrame(int startFrame){\n boolean flag=true;\n int startBitmap = startFrame/32;\n int startMask = startFrame%32;\n for(int i=startBitmap; i<bitMap.length; i++){\n for(int j=0; j<32;j++){\n if(flag && i==startBitmap){\n flag = false;\n j=startMask;\n }\n if(isEmpty(i,j)){\n return (i*32)+j;\n }\n }\n }\n return -1;\n }", "public boolean hasInstInQueue() {\n\t\treturn CurrentInstTomasulo <= lstInstructionsTomasulo.size();\n\t}", "boolean hasRootFrame();", "@NativeType(\"bool\")\n public static boolean bgfx_is_frame_buffer_valid(@NativeType(\"uint8_t\") int _num, @NativeType(\"bgfx_attachment_t const *\") BGFXAttachment _attachment) {\n return nbgfx_is_frame_buffer_valid((byte)_num, _attachment.address());\n }", "private boolean hasEnoughHeapMemoryForScreenshot() {\n final Runtime runtime = Runtime.getRuntime();\n\n // Auto casting to floats necessary for division\n float free = runtime.freeMemory();\n float total = runtime.totalMemory();\n float remaining = free / total;\n\n TurbolinksLog.d(\"Memory remaining percentage: \" + remaining);\n\n return remaining > .10;\n }", "private void checkFrames() {\n\t\tif(tradeDetail == null){\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public boolean has(byte[] key) throws IOException {\n assert (RAMIndex == true);\r\n return index.geti(key) >= 0;\r\n }", "public boolean isWithinTimeFrame(Timestamp eventStartTime)\n\t{\n\t\treturn (startTime.before(eventStartTime) && endTime.after(eventStartTime));\n\t}", "@java.lang.Override\n public boolean hasRegionFramesCount() {\n return regionFramesCount_ != null;\n }", "boolean hasByteCode();", "public boolean contains(int total) {\n \t \n \tint sum=0;\n \tfor (int j=(stack.size()-3);j<stack.size();j++){\n \t\tsum=sum+stack.peek();\n \t}\n \tif(total==sum){\n \t\treturn true;\n \t}\n\t\treturn false;\n \n }", "public boolean hasRegionFramesCount() {\n return regionFramesCountBuilder_ != null || regionFramesCount_ != null;\n }", "public boolean hasStackFrameChanged() {\n\t\treturn lineNumber != oldLineNumber;\n\t}", "private boolean hasPinnedStack() {\n return this.mTaskStackContainers.getPinnedStack() != null;\n }", "public static void hasMemAllocation(String filePath) {\n\t\tString row = firstRow(filePath);\n\t\tArrayList<String> splits = splits(row);\n\t\tString memAllocation = splits.get(2); // 22966436\n\t\t\n\t\tif (memAllocation.matches(\"\\\\d*\")) {\n\t\t\tMain.debug.LOG(\"omni-epsilon.log contains memory allocation\");\n\t\t} else {\n\t\t\tMain.debug.LOGError(\"omni-epsilon.log does not contain memory allocation\");\n\t\t}\n\t}", "@java.lang.Override\n public boolean hasFrameInputsCount() {\n return frameInputsCount_ != null;\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}", "private void scanForFrameOpen() {\n\n // scan until we find a frame or run out of bytes to scan...\n boolean done = !buffer.hasRemaining();\n while( !done ) {\n\n // scan until we find a valid beginning-of-frame (\"[[[\"\n // done is set true if there are no more bytes to scan\n // otherwise the position is at the byte following the \"[[[\" we found\n done = scanFrameOpen();\n\n // if we scanned all our bytes, get outta here...\n if( done ) continue;\n\n // scan the frame length characters (\"xxx]\", where \"xxx\" is 2..4 base 64 characters...\n // frameOpenDetected is set true, and frameLength is set, if a complete open frame sequence is detected\n // done is set true if there are no more bytes to scan\n done = scanFrameLength();\n\n // if we get here without detecting a frame, it's possible that we need to rescan after adding more bytes, so reset our position...\n if( done && !frameOpenDetected ) buffer.reset();\n }\n }", "private boolean isWithinBounds(int y) {\n Rectangle displayBounds = getBoundsFramingCalls(0, mCallCount);\n if (y < displayBounds.y) {\n return false;\n }\n\n if (y > (displayBounds.y + displayBounds.height)) {\n return false;\n }\n\n return true;\n }", "public boolean isFrameActive()\n {\n return isActive();\n }", "private boolean scanFrameOpen() {\n\n // scan until we find the three sequential opens...\n int openCount = 0;\n boolean done = false;\n while( !done & (openCount < 3) ) {\n if( OPEN == buffer.get() ) {\n openCount++;\n if( openCount == 1 ) buffer.mark(); // remember where this started, in case we have to rewind to here...\n }\n else openCount = 0;\n done = !buffer.hasRemaining();\n }\n\n // if we ran out of characters, go back to our marked position (if we have one) so we can rescan it after bytes are added...\n if( done ) if( openCount > 0 ) buffer.reset();\n\n return done;\n }", "public boolean hasFrameInputsCount() {\n return frameInputsCountBuilder_ != null || frameInputsCount_ != null;\n }", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "public boolean checkCanDoRefresh(final PtrFrameLayout frame, final View content, final View header);", "private boolean contains(Ball ball) {\n checkRep();\n boolean contains =\n ball.getPosition().x() > this.boundingBoxPosition.x()\n && ball.getPosition().x() < this.boundingBoxPosition.x() + this.width\n && ball.getPosition().y() > this.boundingBoxPosition.y() \n && ball.getPosition().y() < this.boundingBoxPosition.y() + this.height;\n return contains;\n }", "boolean hasBlockInfo();", "boolean hasBlockInfo();", "public boolean contains(int rX, int rY) {\n return x <= rX && y <= rY && x + size.width >= rX\n && y + size.height >= rY;\n }", "public boolean hasPositionCall() {\n if (_left.hasPositionCall()) return true;\n if (_right.hasPositionCall()) return true;\n return false;\n }", "public int isStartOfFrame(IDdfDataFrame frameSoFar)\n {\n\t if ( frameSoFar.getFrameBytes()[0] == IPacket.SOH ) {\n\t\t return BDdfReceiver.YES;\n\t }\n\t \n\t return BDdfReceiver.NO;\n }", "public boolean test() {\r\n\t\treturn (hit() == size);\r\n\t}", "public boolean hitCheck(float x, float y) {\r\n if (boxX <= x && x <= boxX + boxSize &&\r\n boxY <= y && y <= frameHeight) {\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean contains (Object id) {\n\t\topen();\n\t\ttry {\n\t\t\tlong offset = ((Number)id).longValue();\n\n\t\t\tif (offset+blockSize>container.length())\n\t\t\t\treturn false;\n\n\t\t\tupdatedBitMap.seek(offset/blockSize/8);\n\t\t\treturn (updatedBitMap.read()&(1<<(offset/blockSize%8)))!=0;\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}", "public MemoryFrame referenceMemoryFrame(Integer num)\n {\n Collection<MemoryFrame> frameCollection = frames.values();\n MemoryFrame frame = null;\n \n for (MemoryFrame f : frameCollection) {\n if (f.getFrameNumber() == (int) num) {\n frame = frames.remove((Long) f.getLastAccessed());\n break;\n }\n }\n \n long time = System.nanoTime();\n frame.setLastAccessed(time);\n \n frames.put((Long) time, frame);\n \n return frame;\n }", "public boolean contained(int x, int y) {\n\t\treturn false;\n\t}", "@java.lang.Override\n public boolean hasRootFrame() {\n return instance.hasRootFrame();\n }", "public static boolean isMethodInStack(String methodName) {\n\t\tStackTraceElement stackTraceElements[] = (new Throwable()).getStackTrace();\n\t\tfor (int i = 0; i < stackTraceElements.length; i++) {\n\t\t\tif (stackTraceElements[i].toString().contains(methodName)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean containsKey(K key)\r\n\t{\r\n\t\tint slot = findSlot(key, false);\r\n\t\treturn slot >= 0;\r\n\t}", "private boolean scanFrameLength() {\n\n // scan the 2, 3, or 4 characters of the base 64 encoded frame length, terminated by a close...\n StringBuilder frameLengthChars = new StringBuilder( 4 );\n boolean lengthDone = false;\n boolean done = false;\n while( !done & !lengthDone ) {\n\n byte thisByte = buffer.get();\n done = !buffer.hasRemaining();\n\n // if we just scanned a close character, then we need to test for validity of the length...\n if( thisByte == CLOSE ) {\n\n // if we have at least enough characters, we have a possible winner here...\n if( frameLengthChars.length() >= 2 ) {\n frameLength = (int) Base64.decodeLong( frameLengthChars.toString() );\n\n // if the frame is longer than the maximum, reject it...\n if( frameLength > maxMessageSize ) lengthDone = true;\n\n // otherwise, we DID get a winner...\n else {\n frameOpenDetected = true;\n done = true;\n }\n }\n\n // it's not a properly formed frame start, so time to keep scanning if we have any characters left...\n else lengthDone = true;\n }\n\n // if we just scanned a base 64 character, it's potentially part of the length...\n else if( Base64.isValidBase64Char( (char) thisByte ) ){\n\n // if we still could use more base 64 characters, just add it and get out of here...\n if( frameLengthChars.length() < 4 ) {\n frameLengthChars.append( (char) thisByte );\n }\n\n // if this would be the fifth base 64 character, then it's not a properly formed frame...\n else lengthDone = true;\n }\n\n // if we got some other character, then it's not a properly formed frame...\n else {\n buffer.position( buffer.position() - 1 ); // it's possible we just got another open, so back up just in case...\n lengthDone = true;\n }\n }\n return done;\n }", "@Override\n public boolean contains(Object o) {\n for (int i = 0; i < currentSize; i++) {\n if (container[i] == o) {\n return true;\n }\n }\n return false;\n }", "public boolean containsBlock(int block){\n for(int i=0;i<localCache.length;i++){\n if(localCache[i].isOccupied && localCache[i].blockID==block)// checks if the block is not occupied and chesks if the block is present in the local cache of the processor\n return true;\n }\n \n return false;\n }", "public boolean contains( AnyType x )\n {\n int currentPos = findPos( x );\n if (array[currentPos] != null && array[currentPos].key.equals(x))\n \treturn true;\t\t//TODO : Test this method\n else\n \treturn false;\n \n }", "private boolean isLastFrame() {\n\t\treturn false;\r\n\t}", "private int checkMemLocation(int location) {\n if (location < memory.length && location >= 0) {\n return location;\n }\n throw new MemoryOutOfBounds(memory.length, location);\n }", "protected final void _verifyAlloc(Object buffer)\n/* */ {\n/* 269 */ if (buffer != null) throw new IllegalStateException(\"Trying to call same allocXxx() method second time\");\n/* */ }", "boolean contains(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\treturn nodes[index].contains(element.hashCode(), (byte) 1);\n\t\t}", "public static void hasMemUsage(String filePath) {\n\t\tString row = firstRow(filePath);\n\t\tArrayList<String> splits = splits(row);\n\t\tString memUsage = splits.get(1); // 083\n\t\t\n\t\tif (memUsage.matches(\"\\\\d*\")) {\n\t\t\tMain.debug.LOG(\"omni-epsilon.log contains memory usage\");\n\t\t} else {\n\t\t\tMain.debug.LOGError(\"omni-epsilon.log does not contain memory usage\");\n\t\t}\n\t}", "public boolean isFull(){\n return (top == employeeStack.length);\n }", "public synchronized boolean has(byte[] key) throws IOException {\n if ((kelondroAbstractRecords.debugmode) && (RAMIndex != true)) serverLog.logWarning(\"kelondroFlexTable\", \"RAM index warning in file \" + super.tablename);\r\n assert this.size() == index.size() : \"content.size() = \" + this.size() + \", index.size() = \" + index.size();\r\n return index.geti(key) >= 0;\r\n }", "public synchronized boolean recordExists(String key) {\n return getMemIndex().containsKey(key);\n }", "private boolean existsSymbol(String symbol) {\r\n\t\treturn ts.containsKey(symbol.hashCode());\r\n\t}", "public boolean isLastFrame(){\r\n\t\t//to be implemented\r\n\t\treturn false;\r\n\t}" ]
[ "0.6816662", "0.66614693", "0.64006054", "0.6304841", "0.6268729", "0.6078698", "0.5994547", "0.59619", "0.5951278", "0.59192824", "0.5802452", "0.5790199", "0.57274824", "0.5691204", "0.5669274", "0.56163126", "0.5573115", "0.5565597", "0.55612427", "0.5533701", "0.5532423", "0.5510014", "0.55073535", "0.5496468", "0.54586726", "0.5430813", "0.54103565", "0.537507", "0.5370813", "0.5344613", "0.5313476", "0.53104645", "0.5309304", "0.5304642", "0.5304642", "0.5304642", "0.5304642", "0.53008837", "0.5291354", "0.52885926", "0.5270719", "0.5270237", "0.52581024", "0.52540755", "0.5247338", "0.5216479", "0.52113587", "0.52082103", "0.5205449", "0.5184276", "0.5169541", "0.51493293", "0.5136049", "0.5134093", "0.5127521", "0.5124765", "0.51183975", "0.5110989", "0.5102937", "0.50968665", "0.5087273", "0.50864875", "0.5085244", "0.5084637", "0.507686", "0.5064194", "0.5045279", "0.5037355", "0.500894", "0.500894", "0.500894", "0.500894", "0.49937516", "0.49871257", "0.49870217", "0.49870217", "0.49829152", "0.49769586", "0.49730104", "0.49692652", "0.49665532", "0.49621588", "0.49610686", "0.4960209", "0.4951006", "0.4944504", "0.49439174", "0.49344566", "0.49148464", "0.49120295", "0.49098745", "0.4907765", "0.4905548", "0.4899519", "0.48993298", "0.4899048", "0.4895223", "0.48951668", "0.48925972", "0.4889889", "0.48763567" ]
0.0
-1
Used to indicate when a packet must be transformed into ship space to work properly (Digging packets for example). Also comes with functionality to store and retrieve a player data backup to prevent the player from getting teleported somewhere else, but this is not necessarily required.
public interface ITransformablePacket { default boolean isPacketOnMainThread(INetHandlerPlayServer server, boolean callingFromSponge) { if (!MixinLoadManager.isSpongeEnabled() || callingFromSponge) { NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server; EntityPlayerMP player = serverHandler.player; return player.getServerWorld().isCallingFromMinecraftThread(); } else { return false; } } /** * Puts the player into local coordinates and makes a record of where they used to be. */ default void doPreProcessing(INetHandlerPlayServer server, boolean callingFromSponge) { if (isPacketOnMainThread(server, callingFromSponge)) { // System.out.println("Pre packet process"); NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server; EntityPlayerMP player = serverHandler.player; PhysicsWrapperEntity wrapper = getPacketParent(serverHandler); if (wrapper != null && wrapper.getPhysicsObject().getShipTransformationManager() != null) { ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld(); ISubspace worldSubspace = worldProvider.getSubspace(); worldSubspace.snapshotSubspacedEntity((ISubspacedEntity) player); wrapper.getPhysicsObject().getShipTransformationManager() .getCurrentTickTransform().transform(player, TransformType.GLOBAL_TO_SUBSPACE); } } } /** * Restores the player from local coordinates to where they used to be. */ default void doPostProcessing(INetHandlerPlayServer server, boolean callingFromSponge) { if (isPacketOnMainThread(server, callingFromSponge)) { NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server; EntityPlayerMP player = serverHandler.player; PhysicsWrapperEntity wrapper = getPacketParent(serverHandler); // I don't care what happened to that ship in the time between, we must restore // the player to their proper coordinates. ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld(); ISubspace worldSubspace = worldProvider.getSubspace(); ISubspacedEntity subspacedEntity = (ISubspacedEntity) player; ISubspacedEntityRecord record = worldSubspace .getRecordForSubspacedEntity(subspacedEntity); // System.out.println(player.getPosition()); if (subspacedEntity.currentSubspaceType() == CoordinateSpaceType.SUBSPACE_COORDINATES) { subspacedEntity.restoreSubspacedEntityStateToRecord(record); player.setPosition(player.posX, player.posY, player.posZ); } // System.out.println(player.getPosition()); // We need this because Sponge Mixins prevent this from properly working. This // won't be necessary on client however. } } PhysicsWrapperEntity getPacketParent(NetHandlerPlayServer server); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processPacket(String packet) {\n try {\n Log.e(\"info\", packet);\n JSONObject obj = new JSONObject(packet);\n JSONObject toSend = new JSONObject();\n String id = obj.getString(\"packet\");\n\n\n\n if (id.equals(\"acknowledge\")) {\n LocalPlayer ply = new LocalPlayer(activity);\n ply.identifier = socket.toString();\n ply.socket = socket;\n activity.playerMap.put(ply.identifier, ply);\n ply.latitude = 0;\n ply.longitude = 0;\n ply.bomb = false;\n ply.name = obj.getString(\"name\");\n ply.update();\n\n JSONObject playerObj = new JSONObject();\n\n playerObj.put(\"identifier\", ply.identifier);\n playerObj.put(\"latitude\", ply.latitude);\n playerObj.put(\"longitude\", ply.longitude);\n playerObj.put(\"name\", ply.name);\n playerObj.put(\"bomb\", ply.bomb);\n toSend.put(\"player\", playerObj);\n\n server.sendPacket(socket, \"initialize\", toSend);\n }\n else if (id.equals(\"bomb\")) {\n for (HashMap.Entry<String, LocalPlayer> entry : activity.playerMap.entrySet()) {\n entry.getValue().bomb = false;\n }\n LocalPlayer ply = activity.playerMap.get(obj.getString(\"identifier\"));\n if (ply.identifier.equals(activity.selfPlayer))\n Toast.makeText(activity, \"You got the bomb\", Toast.LENGTH_LONG).show();\n\n if (ply != null) {\n ply.bomb = true;\n }\n }\n else if (id.equals(\"location\")) {\n LocalPlayer ply = activity.playerMap.get(socket.toString());\n if (ply != null) {\n ply.longitude = obj.getDouble(\"longitude\");\n ply.latitude = obj.getDouble(\"latitude\");\n ply.update();\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public boolean savePlayer(P player){\n String uuid = player.getUniqueId().toString();\n\n if(playerMap.containsKey(player)){\n //Player is safe to save\n List<String> playerAttributes = new ArrayList<String>(getPlayer(player).getPlayerAttributes());\n\n System.out.println(player.getName() + \" has \" + playerAttributes.size() + \" attributes to save.\");\n\n for(int i = 0; playerAttributes.size() > i; i++){\n data.getConfig().set(uuid + \".\" + playerAttributes.get(i), playerMap.get(player).getPlayerAttribute(playerAttributes.get(i)));\n }\n\n data.saveData();\n\n for(int i = 0; playerAttributes.size() > i; i++){\n System.out.println(\"Saved \" + uuid + \".\" + playerAttributes.get(i) + \" as \" + playerMap.get(player).getPlayerAttribute(playerAttributes.get(i)));\n }\n\n return true;\n } else {\n //Player isn't safe to save\n System.out.println(\"Tried to save player \" + player.getName() + \"'s data, but it's not available\");\n return false;\n }\n }", "@Override\n\tpublic void onPacketData(NetworkManager network, Packet250CustomPayload packet, Player player)\n\t{\n\n\t}", "public abstract boolean isAdminPacket();", "public boolean mayPickup(Player debug1) {\n/* 112 */ return true;\n/* */ }", "protected boolean processGameInfo(GameInfoStruct data){return false;}", "protected void onSwapCraft(int debug1) {}", "@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Listen\r\n public void onPacket(PacketEvent e) {\r\n\r\n if (e.getType().equalsIgnoreCase(Packet.Client.POSITION)) {\r\n if ((System.currentTimeMillis() - e.getUser().getCombatData().getLastUseEntityPacket()) < 1000L\r\n && Math.abs(e.getTo().getPitch() - e.getFrom().getPitch()) > 0.01) {\r\n double yaw = e.getUser().getMovementData().getTo().getYaw();\r\n double sensitivity = e.getUser().getMiscData().getClientSensitivity();\r\n\r\n float f = (float) (sensitivity * 0.6F + 0.2F);\r\n float gcd = f * f * f * 1.2F;\r\n\r\n yaw = -yaw % gcd;\r\n\r\n double real = Math.abs(e.getUser().getMovementData().getTo().getYaw());\r\n\r\n if (real == e.getUser().getCheckData().lastAimMDiff && yaw == e.getUser().getCheckData().lastAimMDiff2) {\r\n\r\n if ((System.currentTimeMillis() - e.getUser().getCheckData().lastAimMPossibleLag) < 1500L) {\r\n e.getUser().getCheckData().aimMVerbose++;\r\n } else {\r\n if (e.getUser().getCheckData().aimMVerbose > 0 && (System.currentTimeMillis() - e.getUser().getCheckData().lastAimMPossibleLag) > 1000l)\r\n e.getUser().getCheckData().aimMVerbose--;\r\n }\r\n\r\n e.getUser().getCheckData().lastAimMPossibleLag = System.currentTimeMillis();\r\n\r\n if (e.getUser().getCheckData().aimMVerbose > 2) {\r\n flag(e.getUser(), \"verbose=\"+e.getUser().getCheckData().aimMVerbose, \"spoof=\"+yaw, \"real=\"+real);\r\n }\r\n } else {\r\n if (e.getUser().getCheckData().aimMVerbose > 0 && TimeUtils.secondsFromLong(e.getUser().getCheckData().lastAimMPossibleLag) > 2L) {\r\n e.getUser().getCheckData().aimMVerbose--;\r\n }\r\n }\r\n\r\n e.getUser().getCheckData().lastAimMDiff = real;\r\n e.getUser().getCheckData().lastAimMDiff2 = yaw;\r\n\r\n }\r\n }\r\n }", "public boolean unloadPlayer(P player){\n if(playerMap.containsKey(player)){\n //Player is safe to unload\n playerMap.remove(player);\n return true;\n } else {\n //Player isn't safe to save\n System.out.println(\"Tried to unload player \" + player.getName() + \"'s data, but it's not available\");\n return false;\n }\n }", "@Inject(method = \"onPlayerRespawn\", at = @At(value = \"INVOKE\", target = \"Lnet/minecraft/client/network/ClientPlayerInteractionManager;createPlayer(Lnet/minecraft/client/world/ClientWorld;Lnet/minecraft/stat/StatHandler;Lnet/minecraft/client/recipebook/ClientRecipeBook;ZZ)Lnet/minecraft/client/network/ClientPlayerEntity;\"))\n private void beforePlayerReset(PlayerRespawnS2CPacket packet, CallbackInfo ci) {\n dataCache = ((PlayerDataProvider) client.player);\n }", "protected void manageMovement(boolean localUpdate, Player player, PacketBuilder packet) {\n int movementUpdateId = (localUpdate && (player.basicSettings().isTeleporting() || player.basicSettings().isMapRegionUpdate())) ? 3\n : (player.getDirections().getSecondDirection() != null ? 2\n : (player.getDirections().getDirection() != null ? 1\n : (player.getMasks().requiresUpdate() ? 0\n : -1)));\n /*\n * put basic movement header in\n */\n packet.putBits(1, movementUpdateId == -1 ? 0 : 1);\n\n if (movementUpdateId != -1) {\n /*\n * tell the client that our player teleported/changeregion, has movement, or is standing still.\n */\n packet.putBits(2, movementUpdateId);\n if (movementUpdateId == 3) {\n /**\n * Apply custom/scrambled bits for Teleport/region change\n */\n handleRegionChange(player, packet);\n } else if (movementUpdateId > 0) {\n /*\n * Write the primary sprite (i.e. walk direction).\n */\n packet.putBits(3, player.getDirections().getDirection().intValue());\n if (movementUpdateId == 2) {\n /*\n * Write the secondary sprite (i.e. run direction).\n */\n packet.putBits(3, player.getDirections().getSecondDirection().intValue());\n }\n /*\n * Write a flag indicating if a block update happened.\n */\n packet.putBits(1, player.getMasks().requiresUpdate() ? 1 : 0);\n }\n }\n }", "private void checkFlags(Packet packet) { \n if (checkAvailableFilesListCorrectFlags(packet)) {\n //System.out.println(\" AFL packet\");\n this.availableFilesListPacketDealer(packet);\n } else if (checkDownloadingCorrectFlags(packet)) {\n //System.out.println(\" DOWN packet\");\n this.downloadingPacketDealer(packet);\n } else if (checkStatisticsCorrectFlags(packet)) {\n //System.out.println(\" STAT packet\");\n this.statisticsPacketDealer(packet);\n } else if (checkPauseCorrectFlags(packet)) {\n //System.out.println(\" PAU packet\");\n this.pausePacketDealer(packet);\n } else if (checkResumeCorrectFlags(packet)) {\n //System.out.println(\" RES packet\");\n this.resumePacketDealer(packet);\n } else if (checkDownloadingFilesListCorrectFlags(packet)) {\n //System.out.println(\" DFL packet\");\n this.downloadingFilesListPacketDealer(packet);\n } else if (checkPausedFilesListCorrectFlags(packet)) {\n //System.out.println(\" PFL packet\");\n this.pausedFilesListPacketDealer(packet);\n } else if (checkUploadingCorrectFlags(packet)) {\n //System.out.println(\" UP packet\");\n this.uploadingPacketDealer(packet);\n } else if (checkExitCorrectFlags(packet)) {\n //System.out.println(\" EXIT packet\");\n this.exitPacketDealer(packet);\n } else {\n this.packetIncorrect(packet);\n \n } \n }", "@Override\n public void processPacket(UUID playerUUID, PacketBase packet) {\n System.out.println();\n System.out.println(\"Processing packet @ \" + packet);\n System.out.println();\n if(packet instanceof ClientSendInputPacket) {\n Direction direction = ((ClientSendInputPacket) packet).getClientInputType().getDirection();\n Player movingPlayer = currentPlayers.get(playerUUID);\n movingPlayer.getPlayerEntity().move(movingPlayer.getPlayerEntity().getLocation().getOffsetDirectionLocation(direction), EntityMovementType.WALKING);\n }\n }", "public void registerShotFired(Coordinate target) {\r\n boolean hit = false;\r\n boolean shipSunk = false;\r\n boolean fleetSunk = false;\r\n if (data.gameState == 3) { //Player One fired \r\n hit = database.getShipPresent(2, target);\r\n if (hit) { //if hit, check to see if the Ship is sunk\r\n target.setCoordState(State.Status.HIT);\r\n database.updateShipStatus(1, target);\r\n game.getPlayerTwo().getPlayerFleet().updateFleetCoordStatus(target);\r\n data.hit = (target.getxCoord()-65) + ((target.getyCoord()-1)*12);\r\n data.hitFlag = true;\r\n try {\r\n shipSunk = game.getPlayerTwo().getPlayerFleet().checkIfSunk(target);\r\n data.shipsRemaining = game.getPlayerTwo().getPlayerFleet().getCurrentFleetSize();\r\n } catch (Exception ex) {\r\n Logger.getLogger(Model.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n else { //Missed\r\n target.setCoordState(State.Status.MISS);\r\n database.updateShipStatus(1, target);\r\n }\r\n if (shipSunk)\r\n fleetSunk = game.getPlayerTwo().getPlayerFleet().checkFleetSunk();\r\n } \r\n else if (data.gameState == 4) { //Player Two fired \r\n hit = database.getShipPresent(1, target);\r\n if (hit) {\r\n target.setCoordState(State.Status.HIT);\r\n database.updateShipStatus(1, target);\r\n game.getPlayerOne().getPlayerFleet().updateFleetCoordStatus(target);\r\n data.hit = (target.getxCoord()-65) + ((target.getyCoord()-1)*12);\r\n data.hitFlag = true;\r\n try {\r\n shipSunk = game.getPlayerOne().getPlayerFleet().checkIfSunk(target);\r\n data.shipsRemaining = game.getPlayerOne().getPlayerFleet().getCurrentFleetSize();\r\n } catch (Exception ex) {\r\n Logger.getLogger(Model.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n else { //Missed\r\n target.setCoordState(State.Status.MISS);\r\n database.updateShipStatus(1, target);\r\n }\r\n if (shipSunk)\r\n fleetSunk = game.getPlayerOne().getPlayerFleet().checkFleetSunk();\r\n }\r\n \r\n if (shipSunk) //A Ship has been sunk\r\n data.shipSunkFlag = true;\r\n if (fleetSunk) //A Fleet has been sunk, so the game is over\r\n winGame();\r\n \r\n setChanged();\r\n notifyObservers(data);\r\n \r\n if (data.gameState == 3) //Switch to Player 2 turn for next register\r\n data.gameState = 4;\r\n else if (data.gameState == 4) //Switch to Player 1 turn for next register\r\n data.gameState = 3;\r\n data.hitFlag = false;\r\n data.shipSunkFlag = false;\r\n }", "default void doPreProcessing(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (isPacketOnMainThread(server, callingFromSponge)) {\n // System.out.println(\"Pre packet process\");\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n PhysicsWrapperEntity wrapper = getPacketParent(serverHandler);\n if (wrapper != null\n && wrapper.getPhysicsObject().getShipTransformationManager() != null) {\n ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld();\n ISubspace worldSubspace = worldProvider.getSubspace();\n worldSubspace.snapshotSubspacedEntity((ISubspacedEntity) player);\n wrapper.getPhysicsObject().getShipTransformationManager()\n .getCurrentTickTransform().transform(player,\n TransformType.GLOBAL_TO_SUBSPACE);\n }\n\n }\n }", "@Override\n\tpublic void savePlayerData(OutputStream os) {\n\t\t\n\t}", "public boolean isSafeForMovePacket(Vector offset) {\n return offset.getX() < 8.0 && offset.getY() < 8.0 && offset.getZ() < 8.0;\n }", "public boolean placeShip(int player, int x, int y) {\n\n Ship ship = null;\n\n for (int i = 0; i < 5; i++) {\n if (playerShips[i].selected) {\n ship = playerShips[i];\n }\n }\n if (ship == null) {\n return false;\n }\n\n if (orientation == 1) {\n if (ship.length + y > 10) {\n return false;\n }\n }\n if (orientation == 0) {\n if (ship.length + x > 10) {\n return false;\n }\n }\n for (int i = 0; i < ship.length; i++) {\n if(orientation == 0) {\n if (humanPlayerBoard[y][x+i] != board.water.ordinal()) {\n return false;\n }\n }\n else{\n if(humanPlayerBoard[y+i][x] != board.water.ordinal()){\n return false;\n }\n }\n }\n for (int i = 0; i < ship.length; i++) {\n if(orientation == 0) {\n humanPlayerBoard[y][x+i] = board.ship.ordinal();\n }\n else{\n humanPlayerBoard[y+i][x] = board.ship.ordinal();\n }\n }\n if(ship.placed){\n if(ship.orientation == 1){\n for(int i = 0; i < ship.length; i++){\n humanPlayerBoard[ship.y+i][ship.x] = board.water.ordinal();\n }\n }\n else{\n for(int j = 0; j < ship.length; j++){\n humanPlayerBoard[ship.y][ship.x+j] = board.water.ordinal();\n }\n }\n }\n ship.setShip(x, y, orientation);\n ship.placed = true;\n\n return true;\n }", "public void playerHasInvincibility() {\n\t\tthis.state = canBeKilled;\n\t}", "@Override\n\t\tpublic void gotPacket(Packet packet) {\n\t\t\tif(packet.contains(IpV4Packet.class)){\t\n\t\n\t\t\t\tbyte[] rec = obtainPackets4Source(packet);\n\t\t\t\t\n\t\t\t\t//if(!useBatch4Pcap){\n\t\t\t\t//\tpublishEntry(topic,rec);\n\t\t\t\t//}else{\n\t\t\t\t if(rec!=null){\n\t\t\t\t\tcacheUpdate(topic,rec);\n\t\t\t\t }else{\n\t\t\t\t\t log.warn(\"packet is null!\");\n\t\t\t\t }\n\t\t\t\t//}\n\t\t\t}\n\t\t\t\n\t\t}", "public boolean isDroppedOnMap() { return dropped; }", "@Override\n\tpublic void savePlayerData(OutputStream os) {\n\n\t}", "public abstract void isUsedBy(Player player);", "@Override\r\n\tboolean isSunk() {\r\n\t\treturn false;\r\n\t}", "@Override\r\n protected final void checkNotPrepared ()\r\n {\r\n if (isPrepared ())\r\n throw new IllegalStateException (\"This object was already prepared and can therefore not be modified: \" +\r\n toString ());\r\n }", "void sendPacketToPlayer(Player player, Object packet);", "private boolean processPaket(Packet packet) throws JimmException {\n SnacPacket snacPacket;\n if (packet instanceof SnacPacket) {\n snacPacket = (SnacPacket) packet;\n } else {\n return false;\n }\n\n if (SnacPacket.SSI_FAMILY != snacPacket.getFamily()) {\n return false;\n }\n if (SnacPacket.CLI_ROSTERDELETE_COMMAND == snacPacket.getCommand()) {\n ArrayReader buf = snacPacket.getReader();\n int length = buf.getWordBE();\n String uin = StringUtils.byteArrayToAsciiString(\n buf.getArray(length), 0, length);\n return (null != contact) && uin.equals(contact.getUserId());\n }\n if (SnacPacket.SRV_UPDATEACK_COMMAND != snacPacket.getCommand()) {\n return false;\n }\n\n // Check error code, see ICQv8 specification\n int retCode = snacPacket.getReader().getWordBE();\n switch (retCode) {\n case 0x002: errorCode = 154; break;\n case 0x003: errorCode = 155; break;\n case 0x00A: errorCode = 156; break;\n case 0x00C: errorCode = 157; break;\n case 0x00D: errorCode = 158; break;\n }\n if ((0x00A == retCode) && (ACTION_MOVE_FROM_NIL == action)) {\n errorCode = 0;\n state = STATE_COMPLETED;\n contact.setGroup(newGItem);\n contact.setTempFlag(false);\n getIcq().addContact(contact);\n return true;\n }\n if ((0x00A == retCode) && (ACTION_DEL == action)) {\n errorCode = 0;\n state = STATE_COMPLETED;\n return true;\n }\n if (0 != errorCode) {\n // #sijapp cond.if modules_DEBUGLOG is \"true\" #\n DebugLog.println(\"update action = \" + action\n + \" state = \" + state\n + \" ret code = \" + retCode);\n // #sijapp cond.end #\n // non critical\n getIcq().showException(new JimmException(errorCode, 0));\n state = STATE_ERROR;\n return true;\n }\n\n switch (state) {\n case STATE_ADD_GROUP:\n if (0 < getIcq().getGroupItems().size()) {\n sendGroupsList();\n this.state = STATE_COMMIT;\n } else {\n transactionCommit();\n this.state = STATE_COMPLETED;\n }\n break;\n\n case STATE_ADD:\n if (0 == retCode) {\n sendGroup(gItem);\n ((IcqContact)contact).setContactId(contactToId);\n contact.setBooleanValue(IcqContact.CONTACT_NO_AUTH, action == ACTION_ADD_REQ_AUTH);\n this.state = STATE_COMPLETED;\n }\n transactionCommit();\n if ((0 != retCode) && (action == ACTION_ADD)) {\n action = ACTION_ADD_REQ_AUTH;\n transactionStart();\n addItem();\n }\n break;\n\n case STATE_RENAME:\n this.state = STATE_COMPLETED;\n break;\n\n /* STATE_MOVE */\n case STATE_MOVE1:\n sendSsiPacket(SnacPacket.CLI_ROSTERDELETE_COMMAND,\n packContact(contact, contactFromId, gItem.getId(), false));\n\n this.state = STATE_MOVE2;\n break;\n\n case STATE_MOVE2:\n contactToId = getIcq().createRandomId();\n sendSsiPacket(SnacPacket.CLI_ROSTERADD_COMMAND,\n packContact(contact, contactToId, newGItem.getId(), action == ACTION_MOVE_REQ_AUTH));\n this.state = STATE_MOVE3;\n break;\n\n case STATE_MOVE3:\n ((IcqContact)contact).setContactId(contactToId);\n sendGroup(newGItem);\n this.state = STATE_COMMIT;\n break;\n\n case STATE_DELETE_CONTACT:\n sendGroup(gItem);\n this.state = STATE_COMMIT;\n break;\n\n case STATE_DELETE_GROUP:\n sendGroupsList();\n this.state = STATE_COMMIT;\n break;\n\n\n case STATE_COMMIT:\n transactionCommit();\n this.state = STATE_COMPLETED;\n break;\n }\n\n active();\n return true;\n }", "@Override\n\tpublic void savePlayerData(OutputStream arg0) {\n\n\t}", "private void startFreeze(Player player) {\r\n\t\tfrozenPlayers.put(player.getUniqueId(), new FrozenPlayerInfo(player.getAllowFlight(), player.isFlying()));\r\n\r\n\t\t// Tell Bukkit that this player is flying and shouldn't be effected by gravity.\r\n\t\t// The packet that is actually sent is modified in onPacketSending, and\r\n\t\t// the client won't receive these exact values.\r\n\t\t// However, changing the values also does cause the abilities packet to\r\n\t\t// be sent, meaning that it can be edited to have the info we want.\r\n\t\t// Sadly, we need to call two methods which means two packets when only\r\n\t\t// one packet really is needed, since Bukkit doesn't let one set\r\n\t\t// isFlying to true without allowing flight.\r\n\t\tplayer.setAllowFlight(true);\r\n\t\tplayer.setFlying(true);\r\n\r\n\t\tresendPosition(player);\r\n\t}", "private void processPacket(Packet msg, int sourceClientID)\n\t{\n\t\tif (msg.getPacketID() == 1)\n\t\t{\n\t\t\t// Position updates, broadcast to everyone else\n\t\t\tPCSPosRotUpdate posUpdate = (PCSPosRotUpdate)msg;\n\t\t\t\n\t\t\t// CSPosRotUpdate\n\t\t\t// Get the specific entity to update\n\t\t\tEntityPlayer player = (EntityPlayer) entityMap.getEntity(posUpdate.clientID, EntityPlayer.class);\n\t\t\t\n\t\t\t// If non-existant, move on (probably a stale id)\n\t\t\tif (player == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tSystem.out.printf(\"\\t Ply%d-Pos: (%f, %f, %f) - (%f, %f)\\n\", posUpdate.clientID, posUpdate.xPos, posUpdate.yPos, posUpdate.zPos, posUpdate.pitch, posUpdate.yaw);\n\t\t\tplayer.setPos(posUpdate.xPos, posUpdate.yPos, posUpdate.zPos);\n\t\t\tplayer.setVelocity(posUpdate.xVel, posUpdate.yVel, posUpdate.zVel);\n\t\t\tplayer.setOrientation(posUpdate.pitch, posUpdate.yaw);\n\t\t\tplayer.xAccel = posUpdate.xAccel;\n\t\t\tplayer.zAccel = posUpdate.zAccel;\n\t\t\t\n\t\t\tplayer.isFlying = posUpdate.isFlying;\n\t\t\tplayer.isSneaking = posUpdate.isSneaking;\n\t\t\tplayer.isSprinting = posUpdate.isSprinting;\n\t\t\t\n\t\t\tclientChannels.write(posUpdate);\n\t\t}\n\t\telse if (msg.getPacketID() == 5)\n\t\t{\n\t\t\t// Block place, handle that\n\t\t\tPCSPlaceBlock blockPlace = (PCSPlaceBlock)msg;\n\t\t\tRaycastResult lastHit = blockPlace.hitResult;\n\t\t\tBlock block = blockPlace.placingBlock;\n\t\t\t\n\t\t\t// If the block can't be placed, don't place it\n\t\t\tif(!block.canPlaceBlock(\n\t\t\t\t\tinstance.world,\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ()))\n\t\t\t\treturn;\n\t\t\t\n\t\t\tinstance.world.setBlock(\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ(),\n\t\t\t\t\tblock);\n\t\t\tblock.onBlockPlaced(\n\t\t\t\t\tinstance.world,\n\t\t\t\t\tlastHit.blockX + lastHit.face.getOffsetX(),\n\t\t\t\t\tlastHit.blockY + lastHit.face.getOffsetY(),\n\t\t\t\t\tlastHit.blockZ + lastHit.face.getOffsetZ());\n\t\t\t\n\t\t\t// Broadcast to the other players\n\t\t\t// TODO: Correct for misplaces\n\t\t\tclientChannels.write(blockPlace);\n\t\t}\n\t\telse if (msg.getPacketID() == 6)\n\t\t{\n\t\t\t// Block break, handle that\n\t\t\tPCSBreakBlock blockBreak = (PCSBreakBlock)msg;\n\t\t\tRaycastResult lastHit = blockBreak.hitResult;\n\t\t\t\n\t\t\t// Break the block, with the appropriate block callbacks being called\n\t\t\tBlock block = instance.world.getBlock(lastHit.blockX, lastHit.blockY, lastHit.blockZ);\n\t\t\tblock.onBlockBroken(instance.world, lastHit.blockX, lastHit.blockY, lastHit.blockZ);\n\t\t\tinstance.world.setBlock(lastHit.blockX, lastHit.blockY, lastHit.blockZ, Blocks.AIR);\n\t\t\t\n\t\t\t// Broadcast to the other players\n\t\t\t// TODO: Correct for mis-breaks\n\t\t\tclientChannels.write(blockBreak);\n\t\t}\n\t\telse if (msg.getPacketID() == 7)\n\t\t{\n\t\t\t// Load the requested chunk column\n\t\t\tPCLoadChunkColumn loadRequest = (PCLoadChunkColumn)msg;\n\t\t\t// Get the channel id\n\t\t\tChannelId channelId = clientToChannelId.get(sourceClientID);\n\t\t\t\n\t\t\t// No id found means stale id\n\t\t\tif (channelId == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tChannel clientChannel = clientChannels.find(channelId);\n\t\t\t\n\t\t\t// Null channel means stale id\n\t\t\tif (clientChannel == null)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t// Send back the chunk column\n\t\t\tif (sendChunkColumnTo(loadRequest.columnX, loadRequest.columnZ, clientChannel))\n\t\t\t{\n\t\t\t\t// TODO: Queue up requests\n\t\t\t\tSystem.out.println(\"Fulfilled rq for \" + loadRequest.columnX + \", \" + loadRequest.columnZ + \" to Ply\" + sourceClientID);\n\t\t\t\t// Flush pending requests\n\t\t\t\tclientChannel.flush();\n\t\t\t}\n\t\t}\n\t}", "boolean prepareToMove();", "void sendPacket(Player player, Object packet);", "@Override\n\tpublic void savePlayerData(OutputStream arg0)\n\t{\n\n\t}", "@Override\n public void landedOn(Player player) {}", "public void playerHasSword() {\n\t\tthis.state = canBeKilled;\n\t}", "private void saveMove(){\n\t\tpreviousTile=monster.currentTile;\r\n\t}", "default void doPostProcessing(INetHandlerPlayServer server, boolean callingFromSponge) {\n if (isPacketOnMainThread(server, callingFromSponge)) {\n NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server;\n EntityPlayerMP player = serverHandler.player;\n PhysicsWrapperEntity wrapper = getPacketParent(serverHandler);\n // I don't care what happened to that ship in the time between, we must restore\n // the player to their proper coordinates.\n ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld();\n ISubspace worldSubspace = worldProvider.getSubspace();\n ISubspacedEntity subspacedEntity = (ISubspacedEntity) player;\n ISubspacedEntityRecord record = worldSubspace\n .getRecordForSubspacedEntity(subspacedEntity);\n // System.out.println(player.getPosition());\n if (subspacedEntity.currentSubspaceType() == CoordinateSpaceType.SUBSPACE_COORDINATES) {\n subspacedEntity.restoreSubspacedEntityStateToRecord(record);\n player.setPosition(player.posX, player.posY, player.posZ);\n }\n // System.out.println(player.getPosition());\n // We need this because Sponge Mixins prevent this from properly working. This\n // won't be necessary on client however.\n }\n }", "void sendSignChangeToPlayer(Player player, Location location, byte data);", "public void playerHasNoSword() {\n\t\tthis.state = cannotBeKilled;\n\t}", "PlayerShip(PlayerShip toCopy) {\n\t\tsuper(toCopy);\n\t\tsetHSpeed(toCopy.getHSpeed());\n\t}", "private void managePacket(MeetingPacket packet) {\n switch (packet.getState()) {\n\n /*\n * The request was accepted. We can now\n * contact the other user in the correct\n * port.\n */\n case ACCEPTED: this.manageAcceptedPacket(packet) ; break ;\n\n /*\n * The request was refused. We need to remove\n * the packet from the temporary list.\n */\n case DENIED: this.manageDeniedPacket(packet) ; break ;\n }\n }", "@Override\n public void onPacket(PacketEvent event) {\n User user = event.getUser();\n\n switch (event.getType()) {\n\n case Packet.Client.USE_ENTITY: {\n WrappedInUseEntityPacket useEntityPacket = new WrappedInUseEntityPacket(event.getPacket(), user.getPlayer());\n\n if (useEntityPacket.getAction() == WrappedInUseEntityPacket.EnumEntityUseAction.ATTACK) {\n\n float yawDifference = MathUtil.wrapAngleTo180_float(Math.abs(user.getCurrentLocation().getYaw()\n - user.getLastLocation().getYaw()));\n\n if (yawDifference > 99.99 && user.getMovementProcessor().getDeltaXZ() > 0.005) {\n if (yawDifference != 360) {\n flag(user, \"Head Snapping\", \"\"+yawDifference);\n }\n }\n }\n break;\n }\n\n case Packet.Client.FLYING:\n case Packet.Client.LOOK:\n case Packet.Client.POSITION_LOOK:\n case Packet.Client.POSITION: {\n\n /* float yawDifference = Math.abs(user.getCurrentLocation().getYaw()\n - user.getLastLocation().getYaw());\n\n yawGCD = MathUtil.gcd((long) (yawDifference * offset), (long) (lastDeltaYaw * offset));\n double yawGcd = yawGCD / offset;\n mouseX = (int) (Math.abs((yawDifference)) / yawGcd);\n\n lastDeltaYaw = yawDifference; */\n\n break;\n }\n\n }\n }", "public interface PaySuccessMode {\n\n //IS_HAVE_PACKET\n void isHavePacket(String type, BaseNetActivity baseNetActivity);\n}", "private CheckToDrawBattleDestinyEffect(Action action, String playerId) {\n super(action);\n _playerId = playerId;\n }", "public PlayerSnap snapshot(Player player) {\n\t\tif (!this.caching.contains(player) || this.cached.get(player).getPackets().size() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn new PlayerSnap(this.cached.get(player));\n\t\t}\n\t}", "@Override\n protected void sendUpdatedStateTo(GamePlayer p) {\n PigGameState copy = new PigGameState(pgs);\n p.sendInfo(copy);\n }", "public void battleOver()\r\n {\r\n isBattleOver = true;\r\n }", "public boolean placementDone() {return placedShips == 4;}", "@Override\r\n public void checkWarGameOver(){\r\n if(this.checkOnePlayerDecksEmpty(0)){\r\n // Set gameOver flag to true\r\n this.isGameOver = true; \r\n \r\n }\r\n \r\n }", "boolean hasReplacePlayerResponse();", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "public void requestAccepted(String username)\n\t{\n\t\t// Player otherPlayer = TcpProtocolHandler.getPlayer(username);\n\t\tPlayer otherPlayer = ActiveConnections.getPlayer(username);\n\t\tif(otherPlayer != null)\n\t\t{\n\t\t\tif(m_requests.containsKey(username))\n\t\t\t\tswitch(m_requests.get(username))\n\t\t\t\t{\n\t\t\t\t\tcase BATTLE:\n\t\t\t\t\t\t/* First, ensure both players are on the same map */\n\t\t\t\t\t\tif(otherPlayer.getMap() != getMap())\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t/* Based on the map's pvp type, check this battle is possible If pvp is enforced, it will be started when the offer is made */\n\t\t\t\t\t\tif(getMap().getPvPType() != null)\n\t\t\t\t\t\t\tswitch(getMap().getPvPType())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase DISABLED:\n\t\t\t\t\t\t\t\t\t/* Some maps have pvp disabled */\n\t\t\t\t\t\t\t\t\tServerMessage sendNotOther = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\t\t\tsendNotOther.addInt(2);\n\t\t\t\t\t\t\t\t\totherPlayer.getSession().Send(sendNotOther);\n\t\t\t\t\t\t\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\t\t\tsendNot.addInt(2);\n\t\t\t\t\t\t\t\t\tgetSession().Send(sendNot);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\tcase ENABLED:\n\t\t\t\t\t\t\t\t\t/* This is a valid battle, start it */\n\t\t\t\t\t\t\t\t\tensureHealthyPokemon();\n\t\t\t\t\t\t\t\t\totherPlayer.ensureHealthyPokemon();\n\t\t\t\t\t\t\t\t\tm_battleField = new PvPBattleField(DataService.getBattleMechanics(), this, otherPlayer);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\tcase ENFORCED:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tm_battleField = new PvPBattleField(DataService.getBattleMechanics(), this, otherPlayer);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TRADE:\n\t\t\t\t\t\tif(canTrade() && otherPlayer.canTrade())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* Set the player as talking so they can't move */\n\t\t\t\t\t\t\tm_isTalking = true;\n\t\t\t\t\t\t\t/* Create the trade */\n\t\t\t\t\t\t\tm_trade = new Trade(this, otherPlayer);\n\t\t\t\t\t\t\totherPlayer.setTrade(m_trade);\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\tServerMessage sendNotOther = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\tsendNotOther.addInt(4);\n\t\t\t\t\t\t\totherPlayer.getSession().Send(sendNotOther);\n\t\t\t\t\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\t\t\t\t\tsendNot.addInt(4);\n\t\t\t\t\t\t\tgetSession().Send(sendNot);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tServerMessage sendNot = new ServerMessage(ClientPacket.PVP_PACKETS);\n\t\t\tsendNot.addInt(0);\n\t\t\tgetSession().Send(sendNot);\n\t\t}\n\t}", "@Test\n\tpublic void invalidEnterShip_4(){\n\t\tShip ship = new Ship(new ShipPart(0,0),new ShipPart(1,1),new ShipPart(2,2));\n\t\tPlayer p = new Player(0, \"Test\", null, null, null);\n\t\tp.giveItem(new ShipPart(0,0));\n\t\tp.giveItem(new ShipPart(1,1));\n\t\tp.giveItem(new Key(3,3));\n\t\tassertFalse(ship.canEnter(p, Direction.EAST));\n\t}", "@Override\r\n public void onPacket(JPackectX packet) {\r\n System.out.println(\"Packet Received:\\n\\t\" + packet.toString());\r\n if (packet.getType() == JPacketTypeX.UPDATE) {\r\n try {\r\n //null for now\r\n }\r\n catch (Exception e) {\r\n }\r\n }\r\n }", "protected void updatePlayer(Player player, PacketBuilder packet) {\n\n /*\n * The update block packet holds update blocks and is send after the\n * master packet.\n */\n PacketBuilder updateBlock = new PacketBuilder();\n\n /*\n * Updates this player.\n */\n manageMovement(true, player, packet);\n masks(player, updateBlock, false);\n\n /*\n * Write the current size of the player list.\n */\n packet.putBits(8, player.getLocalPlayers().size());\n\n /*\n * Iterate through the local player list.\n */\n for (Iterator<Player> it$ = player.getLocalPlayers().iterator(); it$.hasNext(); ) {\n /*\n * Get the next player.\n */\n Player otherPlayer = it$.next();\n\n /*\n * If the player should still be in our list.\n */\n if (WorldModule.getLogic().getPlayers().contains(otherPlayer)\n && !otherPlayer.basicSettings().isTeleporting()\n && otherPlayer.getLocation().withinRange(\n player.getLocation())) {\n /*\n * Update the movement.\n */\n manageMovement(false, otherPlayer, packet);\n\n /*\n * Check if an update is required, and if so, send the update.\n */\n if (otherPlayer.getMasks().requiresUpdate()) {\n masks(otherPlayer, updateBlock, false);\n }\n } else {\n /*\n * Otherwise, remove the player from the list.\n */\n it$.remove();\n\n /*\n * Tell the client to remove the player from the list.\n */\n packet.putBits(1, 1);\n packet.putBits(2, 3);\n }\n }\n\n /*\n * Loop through every player.\n */\n for (Player otherPlayer : WorldModule.getLogic().getLocalPlayers(player.getLocation())) {\n /*\n * Check if there is room left in the local list.\n */\n if (player.getLocalPlayers().size() >= 255) {\n /*\n * There is no more room left in the local list. We cannot\n * add more players, so we just ignore the extra ones. They\n * will be added as other players get removed.\n */\n break;\n }\n\n /*\n * If they should not be added ignore them.\n */\n if (otherPlayer == null || otherPlayer == player\n || player.getLocalPlayers().contains(otherPlayer) || otherPlayer.isReleased()) {\n continue;\n }\n\n /*\n * Add the player to the local list if it is within distance.\n */\n player.getLocalPlayers().add(otherPlayer);\n\n /*\n * Add the player in the packet.\n */\n addPlayer(packet, player, otherPlayer);\n\n /*\n * Update the player, forcing the appearance flag.\n */\n masks(otherPlayer, updateBlock, true);\n }\n\n /*\n * Check if the update block is not empty.\n */\n if (updateBlock.getPosition() != 0) {\n /*\n * Write a magic id indicating an update block follows.\n */\n packet.putBits(11, 2047);\n packet.recalculateBitPosition();\n\n /*\n * Add the update block at the end of this packet.\n */\n packet.put(updateBlock.toPacket().getBytes());\n } else {\n /*\n * Terminate the packet normally.\n */\n packet.recalculateBitPosition();\n }\n /*\n * Write the packet.\n */\n player.write(packet.toPacket());\n }", "public Player() {\n fleetMap = new Map();\n battleMap = new Map();\n sunkShipNum = 0;\n }", "public void handleEvent(PlayerPosition event)\r\n {\r\n if(m_active)\r\n {\r\n String name = m_botAction.getPlayerName(event.getPlayerID());\r\n\r\n if(event.isInSafe())\r\n {\r\n int ship = m_botAction.getPlayer(event.getPlayerID()).getShipType();\r\n int freq = m_botAction.getPlayer(event.getPlayerID()).getFrequency();\r\n boolean delayExceeded = true;\r\n\r\n if(delaySeconds > 0)\r\n {\r\n long currentTime = System.currentTimeMillis();\r\n\r\n if(m_entryTimes.containsKey(name))\r\n {\r\n long entryTime = m_entryTimes.get(name);\r\n int delta = (int)(currentTime - entryTime);\r\n\r\n if(!enableMS) {\r\n // Do the delay in seconds.\r\n delta /= Tools.TimeInMillis.SECOND;\r\n }\r\n\r\n if(delta < delaySeconds)\r\n {\r\n delayExceeded = false;\r\n }\r\n else\r\n {\r\n m_entryTimes.remove(name);\r\n }\r\n }\r\n else\r\n {\r\n m_entryTimes.put(name, currentTime);\r\n delayExceeded = false;\r\n }\r\n }\r\n\r\n if(delayExceeded)\r\n {\r\n if(specPlayer)\r\n {\r\n m_botAction.spec(event.getPlayerID());\r\n m_botAction.spec(event.getPlayerID());\r\n\r\n if(!speccedMsg.equalsIgnoreCase(\"none\")) {\r\n if(speccedSound != 0)\r\n m_botAction.sendArenaMessage(name + \" \" + speccedMsg, speccedSound);\r\n else\r\n m_botAction.sendArenaMessage(name + \" \" + speccedMsg);\r\n }\r\n }\r\n\r\n if(changeShip && ship != targetShip)\r\n {\r\n m_botAction.setShip(event.getPlayerID(), targetShip);\r\n\r\n if(!shipChgMsg.equalsIgnoreCase(\"none\")) {\r\n if(shipSound != 0)\r\n m_botAction.sendArenaMessage(name + \" \" + shipChgMsg, shipSound);\r\n else\r\n m_botAction.sendArenaMessage(name + \" \" + shipChgMsg);\r\n }\r\n\r\n }\r\n\r\n if(changeFreq && freq != targetFreq)\r\n {\r\n m_botAction.setFreq(event.getPlayerID(), targetFreq);\r\n\r\n if(!freqChgMsg.equalsIgnoreCase(\"none\")) {\r\n if(freqSound != 0)\r\n m_botAction.sendArenaMessage(name + \" \" + freqChgMsg, freqSound);\r\n else\r\n m_botAction.sendArenaMessage(name + \" \" + freqChgMsg);\r\n }\r\n }\r\n }\r\n }\r\n else if(delaySeconds > 0)\r\n {\r\n m_entryTimes.remove(name);\r\n }\r\n }\r\n }", "static boolean savePlayerState(PlayerState playerState) {\n if (playerState.getId() == null) {\n return insertPlayerState(playerState);\n } else {\n return updatePlayerState(playerState);\n }\n }", "protected abstract boolean isPlayerActivatable(PlayerSimple player);", "private static void sendSpecialPacket(ProfilingPacketType packet){\r\n\r\n try{\r\n clientObjectOutputStream.writeObject(packet);\r\n clientObjectOutputStream.flush();\r\n }catch (IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - log and stuff\r\n }\r\n }", "private KarelPacket saveForFurtherUse(KarelPacket receivedKarelPacket) {\n KarelPacket ackKarelPacket;\n windowPackets.put(receivedKarelPacket.getSq().toInteger(), receivedKarelPacket);\n receivedKeys.add(receivedKarelPacket.getSq().toInteger());\n ackKarelPacket = KarelPacket.createAcknowledgePacket(connectionId, pointer, receivedKarelPacket.getFlag());\n return ackKarelPacket;\n }", "public void addPlayer(PacketBuilder packet, Player player, Player otherPlayer) {\n int xPos = otherPlayer.getLocation().getX()\n - player.getLocation().getX();\n int yPos = otherPlayer.getLocation().getY()\n - player.getLocation().getY();\n /*\n * Abstraction is used here for clientsided rearrangement\n * To keep errors from loading multiple revisions at one time.\n */\n addPlayer(otherPlayer, packet, xPos, yPos);\n }", "public PixArtPlayerData(Player p) {\r\n \t\t\tpPlayer = p;\r\n \t\t\tthis.scaleXPercent= PixArtPlugin.pluginsettings.XScale;\r\n \t\t\tthis.scaleXPercent= PixArtPlugin.pluginsettings.YScale;\r\n \t\t\tFlipX=false;\r\n \t\t\tFlipY=false;\r\n \t\t\tthis.canuseURL= PixArtPlugin.hasPermex(pPlayer,\"canuseURL\");\r\n \t\t\tthis.canusePath = PixArtPlugin.hasPermex(pPlayer, \"canusePath\");\r\n \t\t\t\r\n \t\t}", "public void updateInformation() {\r\n onFirstCycle = false;\r\n lastLocation = player.getLocation();\r\n preparedAppearance = false;\r\n }", "public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}", "private void manageDeniedPacket(MeetingPacket packet) {\n Console.comment(\"=> Denied packet from \" + packet.getSourceAddress()) ;\n\n if(this.callbackOnDenied != null) {\n this.callbackOnDenied.denied() ;\n }\n }", "public boolean passPlayer() {\n if (this.state == 2) {\n if (this.playerBet != this.serverBet && this.money_server != 0 && this.money_player !=0) {\n return false;\n }\n // player moves and is dealer\n if (this.dealer == 1) {\n this.betRound += 1;\n if(this.betRound == 1){\n this.state = 3;\n }\n else{\n this.state = 4;\n }\n return true;\n } else {\n this.state = 1;\n return true;\n }\n } else {\n // server moves and is dealer\n if (this.dealer == 0) {\n this.betRound += 1;\n if(this.betRound == 1){\n this.state = 3;\n }\n else{\n this.state = 4;\n }\n return true;\n } else {\n this.state = 2;\n return true;\n }\n }\n }", "private void moveShipDown()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit down\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n int temp1 = mapWidth * mapHeight - mapWidth;\r\n int temp2 = mapWidth * mapHeight;\r\n if(currentPos >= temp1 && currentPos < temp2)\r\n {\r\n int newPos = currentPos % mapHeight;\r\n int mapTemp = mapPieces[0][newPos];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(newPos);\r\n }//end if\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos + mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos + mapWidth);\r\n }//end else\r\n }//end if\r\n\r\n //if secondPlayer move unit down\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n int temp1 = mapWidth * mapHeight - mapWidth;\r\n int temp2 = mapWidth * mapHeight;\r\n if(currentPos >= temp1 && currentPos < temp2)\r\n {\r\n int newPos = currentPos % mapHeight;\r\n int mapTemp = mapPieces[0][newPos];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(newPos);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos + mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos + mapWidth);\r\n }//end if\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "public boolean movePlayer(Player p, Direction d) {\n\n\t\tLocation playerLoc = p.getLocation();\n\t\tTile playerTil = p.getTile();\n\t\tPosition playerPos = playerTil.getPos();\n\n\t\tTile newTile = null;\n\n\t\tswitch (d) {\n\n\t\tcase NORTH:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.NORTH);\n\t\t\tp.setFacing(Direction.NORTH);\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.EAST);\n\t\t\tp.setFacing(Direction.EAST);\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.WEST);\n\t\t\tp.setFacing(Direction.WEST);\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tnewTile = playerLoc.getTileInDirection(playerPos, Direction.SOUTH);\n\t\t\tp.setFacing(Direction.SOUTH);\n\t\t\tbreak;\n\t\t}\n\n\t\tif (newTile != null) {\n\t\t\tif (newTile.getGameObject() == null) {\n\t\t\t\tif (newTile instanceof WaterTile) {\n\t\t\t\t\tif (!p.getHasFloatingDevice()) {\n\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\"It's deep blue and cold as ice, perhaps you require something to float on\", p);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (newTile instanceof DoorOutTile) {\n\t\t\t\t\tDoorOutTile dot = (DoorOutTile) newTile;\n\n\t\t\t\t\tif (board.getLocationById(dot.getOutLocationID()).getTileAtPosition(dot.getDoorPos())\n\t\t\t\t\t\t\t.getGameObject() != null) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tplayerTil.setGameObject(null);\n\n\t\t\t\t\tp.setLocation(dot.getOutLocationID());\n\t\t\t\t\tp.setTile(board.getLocationById(dot.getOutLocationID()).getTileAtPosition(dot.getDoorPos()));\n\n\t\t\t\t\tboard.getLocationById(dot.getOutLocationID()).getTileAtPosition(dot.getDoorPos()).setGameObject(p);\n\t\t\t\t\tp.setFacing(Direction.SOUTH);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tplayerTil.setGameObject(null);\n\t\t\t\tnewTile.setGameObject(p);\n\t\t\t\tp.setTile(newTile);\n\t\t\t\tp.setLocation(board.getLocationById(newTile.getLocationID()));\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\ttriggerInteraction(p, newTile);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "private void uploadingPacketDealer(Packet packet) {\n short filenumber = packet.getFileNumber();\n boolean downloading = false;\n \n if (packet.hasSynchronizeFlag()) { \n receiver = new ReliableReceiver(sendQueue, filenumber, downloading, FOLDERPATHSERVER);\n this.receivingMap.put(filenumber, receiver);\n receiver.start();\n receiver.addToReadingQueue(packet.getContent(), packet.getSeqNumber(), packet.hasFinalFlag());\n } else if (packet.hasAcknowledgementFlag()) {\n sender = sendingMap.get(filenumber);\n sender.changeLastAcknowledgeReceived(packet.getAckNumber());\n sendQueue.stopTimeout(packet.getAckNumber()-1);\n } else {\n receiver = receivingMap.get(filenumber);\n receiver.addToReadingQueue(packet.getContent(), packet.getSeqNumber(), packet.hasFinalFlag());\n }\n \n }", "@Override\r\n public void dataPacketReceived(RtpSession session, RtpParticipantInfo participant, DataPacket packet) {\n \tgetPackByte(packet);\r\n \t\r\n // \tSystem.err.println(\"Ssn 1 packet seqn: typ: datasz \" +packet.getSequenceNumber() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // \tSystem.err.println(\"Ssn 1 packet sessn: typ: datasz \" + session.getId() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // latch.countDown();\r\n }", "@Override\n\tpublic void writeEntityToNBT(NBTTagCompound p_70014_1_)\n\t{\n\t\tp_70014_1_.setShort(\"xTile\", (short) this.xTile);\n\t\tp_70014_1_.setShort(\"yTile\", (short) this.yTile);\n\t\tp_70014_1_.setShort(\"zTile\", (short) this.zTile);\n\t\tp_70014_1_.setByte(\"inTile\", (byte) Block.getIdFromBlock(this.inTile));\n\t\tp_70014_1_.setByte(\"shake\", (byte) this.throwableShake);\n\t\tp_70014_1_.setByte(\"inGround\", (byte) (this.inGround ? 1 : 0));\n\n\t\tif (((this.throwerName == null) || (this.throwerName.length() == 0)) && (this.thrower != null) && (this.thrower instanceof EntityPlayer))\n\t\t{\n\t\t\tthis.throwerName = this.thrower.getCommandSenderEntity().getName();\n\t\t}\n\n\t\tp_70014_1_.setString(\"ownerName\", this.throwerName == null ? \"\" : this.throwerName);\n\t}", "public void placeShip(Coordinate selected, int orientation) {\r\n HashSet<Coordinate> location = new HashSet<>();\r\n if (orientation == -1) { //user Xed the orientation window\r\n location.add(selected);\r\n data.orientationXedFlag = true;\r\n } \r\n else { //user didnt X the orientation window\r\n Boolean spaceIsFree = false;\r\n if (data.gameState == 1) {\r\n location = game.getPlayerOne().constructLocation(selected, orientation, data.shipToPlace);\r\n spaceIsFree = game.getPlayerOne().checkLegalPlacement(location, orientation);\r\n }\r\n else if (data.gameState == 2) {\r\n location = game.getPlayerTwo().constructLocation(selected, orientation, data.shipToPlace);\r\n spaceIsFree = game.getPlayerTwo().checkLegalPlacement(location, orientation);\r\n }\r\n\r\n if (spaceIsFree) {\r\n if (data.gameState == 1)\r\n game.getPlayerOne().placeShip(location, data.shipToPlace);\r\n else if (data.gameState == 2)\r\n game.getPlayerTwo().placeShip(location, data.shipToPlace);\r\n data.placementSuccessful = true;\r\n data.shipToPlace++;\r\n }\r\n else {\r\n data.placementSuccessful = false; \r\n location.clear();\r\n location.add(selected);\r\n } \r\n }\r\n data.placement = convertPlacementData(location);\r\n setChanged();\r\n notifyObservers(data);\r\n data.orientationXedFlag = false;\r\n data.placementSuccessful = false; //reset flags to false to avoid errornous updates \r\n }", "public PlayerFunctionality getPlayerData()\r\n\t{ return data; }", "private void setInformationToDraw(Player player)\n {\n playerPieceList = player.getPieces();\n\n if (player == antagonistPlayer) {\n x = antagonistLocation[0];\n y = antagonistLocation[1];\n damageToAnnounce = antagonistDamage;\n healthBenefitToAnnounce = antagonistHealthBenefit;\n } else if (player == heroPlayer) {\n x = heroLocation[0];\n y = heroLocation[1];\n damageToAnnounce = heroDamage;\n healthBenefitToAnnounce = heroHealthBenefit;\n } else {\n x = 0;\n y = 0;\n }\n }", "@Override\n\t\t\t\t\t public void visit(Player player) {\n\t\t\t\t\t\t\tPacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_MSG_HF_ShugoCaravanAppear);\n\t\t\t\t\t }", "private boolean canPickUpPackage(Drone drone, WorldDelivery delivery){\n\t\t//check if the drone ID and the delivery drone ID match\n\t\tString droneID = drone.getDroneID();\n\t\tString deliveryDroneID = delivery.getDeliveryDroneID();\n\t\t//if not return false\n\t\tif(!droneID.equals(deliveryDroneID)){\n\n\t\t\treturn false;\n\t\t}\n\t\t//get the package source airport and position\n\t\tint sourceAirportID = delivery.getSourceAirport();\n//\t\tint sourceGateNumber = delivery.getSourceAirportGate();\n\t\t//get the position of the gate\n\t\tMap<Integer, WorldAirport> airports = this.getAirportMap();\n\t\tWorldAirport airport = airports.get(sourceAirportID);\n//\t\tVector dronePos = drone.getPosition();\n//\t\tfloat distanceToGate = airport.distanceToGate(sourceGateNumber, dronePos);\n//\n//\t\treturn distanceToGate <= MAX_TRANSFER_DISTANCE\n//\t\tif(drone.getDroneID().equals(\"0\")){\n//\t\t\tSystem.out.println(\"drone is at gate zone: \" + airport.isAtGateZone(drone.getPosition(), drone.getDroneID()));\n//\t\t}\n\t\treturn airport.isAtGateZone(drone.getPosition());\n\t}", "@Override\n \tpublic boolean imprisonPlayer(String playerName) {\n \t\treturn false;\n \t}", "public abstract void onLand(Player player);", "public PlayerEntered( ByteArray array ) {\n\n m_shipType = array.readByte( 1 );\n m_acceptsAudio = array.readByte( 2 ) == 1;\n m_playerName = array.readString( 3, 20 );\n m_squadName = array.readString( 23, 20 );\n m_killPoints = array.readLittleEndianInt( 43 );\n m_flagPoints = array.readLittleEndianInt( 47 );\n m_playerID = array.readLittleEndianShort( 51 );\n m_team = array.readLittleEndianShort( 53 );\n m_wins = array.readLittleEndianShort( 55 );\n m_losses = array.readLittleEndianShort( 57 );\n m_identTurretee = array.readLittleEndianShort( 59 );\n m_flagsCarried = array.readLittleEndianShort( 61 );\n m_hasKOTH = array.readByte( 63 ) == 1;\n }", "public boolean needPlayer() {\n\t\treturn false;\n\t}", "@Test\n\tpublic void invalidEnterShip_2(){\n\t\tShip ship = new Ship(new ShipPart(0,0),new ShipPart(1,1));\n\t\tPlayer p = new Player(0, \"Test\", null, null, null);\n\t\tp.giveItem(new ShipPart(0,0));\n\t\tp.giveItem(new ShipPart(1,1));\n\t\tassertFalse(ship.canEnter(p, null));\n\t}", "@Override\n \tpublic void onPlayerRespawn(EntityPlayer player) {\n \t\t\n \t\tNBTTagCompound compound = player.getEntityData();\n \t\tif (!compound.hasKey(EntityPlayer.PERSISTED_NBT_TAG)) return;\n \t\tNBTTagCompound persistent = compound.getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG);\n \t\tif (!persistent.hasKey(\"Backpack\")) return;\n \t\tNBTTagCompound backpack = persistent.getCompoundTag(\"Backpack\");\n \t\t\n \t\tint size = backpack.getInteger(\"count\");\n \t\tItemStack[] contents = new ItemStack[size];\n \t\tNbtUtils.readItems(contents, backpack.getTagList(\"Items\"));\n \t\t\n \t\tItemBackpack.getBackpackData(player).contents = contents;\n \t\t\n \t\tpersistent.removeTag(\"Backpack\");\n \t\tif (persistent.hasNoTags())\n \t\t\tcompound.removeTag(EntityPlayer.PERSISTED_NBT_TAG);\n \t\t\n \t}", "@Override\n\tpublic boolean move(Direction d)\n\t{\n\t\tif(!m_isBattling && !m_isTalking && !m_isShopping && !m_isBoxing)\n\t\t{\n\t\t\tif(super.move(d))\n\t\t\t{\n\t\t\t\t// If the player moved\n\t\t\t\tif(getMap() != null && (getX() % 32 == 0 || (getY() + 8) % 32 == 0))\n\t\t\t\t{\n\t\t\t\t\tif(m_repel > 0)\n\t\t\t\t\t\tm_repel--;\n\t\t\t\t\tif(m_repel <= 0 && getMap().isWildBattle(m_x, m_y, this))\n\t\t\t\t\t{\n\t\t\t\t\t\tServerMessage message = new ServerMessage(ClientPacket.UPDATE_COORDS);\n\t\t\t\t\t\tmessage.addInt(getX());\n\t\t\t\t\t\tmessage.addInt(getY());\n\t\t\t\t\t\tgetSession().Send(message);\n\t\t\t\t\t\tensureHealthyPokemon();\n\t\t\t\t\t\tm_battleField = new WildBattleField(DataService.getBattleMechanics(), this, getMap().getWildPokemon(this));\n\t\t\t\t\t\tm_movementQueue.clear();\n\t\t\t\t\t}\n\t\t\t\t\telse if(m_map.isNpcBattle(this))\n\t\t\t\t\t\tm_movementQueue.clear();\n\t\t\t\t\t/* If it wasn't a battle see should we increase happiness.\n\t\t\t\t\t * Pokemon only have their happiness increased by walking if it is below 120 */\n\t\t\t\t\tif(getX() % 32 == 0 || (getY() + 8) % 32 == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(Pokemon poke : m_pokemon)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(poke != null && poke.getHappiness() < 120)\n\t\t\t\t\t\t\t\tpoke.setHappiness(poke.getHappiness() + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse if(getPriority() > 0)\n\t\t{\n\t\t\t/* Someone has been trying to move in-battle! RE-SYNC */\n\t\t\tm_movementQueue.clear();\n\t\t\tServerMessage message = new ServerMessage(ClientPacket.UPDATE_COORDS);\n\t\t\tmessage.addInt(getX());\n\t\t\tmessage.addInt(getY());\n\t\t\tgetSession().Send(message);\n\t\t}\n\t\treturn false;\n\t}", "protected boolean processPlayerDeclined(int gameNum, String playerName, String offer){\n return false;\n }", "public boolean isFrozen(Player player) {\r\n\t\treturn frozenPlayers.containsKey(player.getUniqueId());\r\n\t}", "public void enterPlayerView(){\n\t\tplayerSeen=true;\r\n\t\tplayerMapped=true;\r\n\t}", "private StructureModifier<Set<PlayerTeleportFlag>> getFlagsModifier(PacketContainer packet) {\r\n\t\treturn packet.getModifier().withType(Set.class,\r\n\t\t\t\tBukkitConverters.getSetConverter(FLAGS_CLASS, EnumWrappers\r\n\t\t\t\t\t\t.getGenericConverter(PlayerTeleportFlag.class)));\r\n\t}", "@Override\n public void receiveInfo(GameInfo info) {\n\n //only update the state if info is a game state\n if (info instanceof ShogiState) {\n\n // update our state, then display\n this.state = (ShogiState) info;\n this.myPieces = state.getBoard();\n\n if (usingRulesScreen) return;\n if (usingDropsScreen) return;\n if (usingHistoryScreen) return;\n\n\n gui = myActivity.findViewById(R.id.shogiBoard);\n gui.myPieces = this.myPieces;\n\n //finds the player's king\n int kingRow = 0;\n int kingCol = 0;\n for(int i = 0; i < 9; i++){\n for(int j = 0; j < 9; j++){\n if (myPieces[i][j] != null){\n Piece possKing = myPieces[i][j];\n if(possKing.getPlayer() == 0 &&\n possKing.getType() == Piece.PieceType.KING){\n kingRow = i;\n kingCol = j;\n }\n }\n }\n }\n\n //if the king is in check, notify the player\n if(state.determinePlayerInCheck(0, this.myPieces, kingRow, kingCol)){\n new AlertDialog.Builder(getTopView().getContext())\n .setTitle(\"You are in check!\")\n .setMessage(\"Your king is in danger. You should move it.\")\n\n // A null listener allows the button to dismiss the dialog and take no further action.\n .setNegativeButton(\"Ok\", null)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }\n\n\n if (info instanceof IllegalMoveInfo) {\n\n Log.d(\"ShogiHP\", \"illegal move\");\n\n\n\n if (super.getflash()) {\n\n try {\n flashButton();\n } catch (InterruptedException ignored) {\n\n\n }\n }\n\n gui.invalidate();\n }\n\n gui.invalidate();\n\n }\n }", "@Override\n\t\t\tpublic void shotHere(boolean wasHit, int shipMod, Coordinate c) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void shotHere(boolean wasHit, int shipMod, Coordinate c) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void shotHere(boolean wasHit, int shipMod, Coordinate c) {\n\t\t\t\t\n\t\t\t}", "private boolean isVanished(Entity entity) {\n // Only players can be vanished\n if(!(entity instanceof Player)) {return false;}\n\n for(MetadataValue value : entity.getMetadata(\"vanished\")) {\n if(value.asBoolean()) {return true;}\n }\n return false;\n }", "public interface Player {\n\n\n /**\n * Represents the attack result of random strategy.\n *\n * @return an attack result\n */\n AttackResult randomAttack();\n\n /**\n * Represents the attack result of user strategy.\n *\n * @return an attack result\n */\n AttackResult userAttack();\n\n /**\n * Represents the attack result of smart strategy.\n *\n * @return an attack result\n */\n AttackResult smartAttack();\n\n /**\n * Tells if one of the players has win the game.\n *\n * @return true if wins the game and false otherwise\n */\n boolean winGame();\n\n /**\n * Prints the fleet map.\n *\n * @param printer the printer to print the map\n */\n void printFleet(ConsolePrinter printer);\n\n /**\n * Prints the battle map.\n *\n * @param printer the printer to print the map\n */\n void printBattle(ConsolePrinter printer);\n\n /**\n * Creates a user player.\n *\n * @param randPlace true if place the ship randomly and false to place the ship by the player\n * @param fleetMap the fleet map of the player\n * @param battleMap the battle map of the player\n * @return a new user player\n */\n static Player createUserPlayer(boolean randPlace, FleetMap fleetMap, BattleMap battleMap) {\n return new AbstractPlayer(fleetMap, battleMap, randPlace);\n }\n\n /**\n * Creates a robot player.\n *\n * @param fleetMap the fleet map of the player\n * @param battleMap the battle map of the player\n * @return a new robot player\n */\n static Player createRobotPlayer(FleetMap fleetMap, BattleMap battleMap) {\n return new AbstractPlayer(fleetMap, battleMap, true);\n }\n}", "@Override\r\n public void warGameComparison(int playerOne, int playerTwo, \r\n int plDeckPosition) {\r\n \r\n // Checks to see if main playing deck is empty\r\n // if it is, it fills main playing deck with cards from discard pile\r\n if(this.checkPlayerPlayingDeck(plDeckPosition, playerOne)){\r\n this.transferFromDiscard(plDeckPosition, playerOne);\r\n }\r\n if(this.checkPlayerPlayingDeck(plDeckPosition, playerTwo)){\r\n this.transferFromDiscard(plDeckPosition, playerTwo);\r\n }\r\n \r\n //Get player one and player twos card and compares to see which one is larger\r\n PlayingCard plOneCard = (PlayingCard) this.getPlayerCard(playerOne,\r\n plDeckPosition);\r\n PlayingCard plTwoCard = (PlayingCard) this.getPlayerCard(playerTwo, \r\n plDeckPosition);\r\n PlayingCard higherCard = (PlayingCard) this.comparePlayingCards(plOneCard,\r\n plTwoCard);\r\n \r\n // See who owned that card and distribute cards accordingly or initialize\r\n // the war flag\r\n if (higherCard == plOneCard) {\r\n this.giveCardToPlayer(plTwoCard, playerOne, plDeckPosition+1);\r\n this.giveCardToPlayer(plOneCard, playerOne, plDeckPosition+1);\r\n // Add return values to current game action\r\n this.currentAction.addActionReturnValue(plOneCard, \r\n plTwoCard);\r\n }\r\n else if (higherCard == plTwoCard) {\r\n this.giveCardToPlayer(plTwoCard, playerTwo, plDeckPosition+1);\r\n this.giveCardToPlayer(plOneCard, playerTwo, plDeckPosition+1); \r\n // Add return values to current game action\r\n this.currentAction.addActionReturnValue(plOneCard, \r\n plTwoCard);\r\n }\r\n else{\r\n this.war(playerOne, playerTwo, plDeckPosition, plOneCard, plTwoCard);\r\n }\r\n \r\n\r\n \r\n }", "public void forceOnPrepared() {\n onPrepared(player);\n }", "public boolean gameIsOver() {return revealedShips >= 4;}", "public void isPurchased(Player player) {\n\t}", "public void play() {\n Player playerOne = preparePlayer(getUserName(scanner, validator, shipsGameText.getMessage(\"show.player.one\"), null));\n Player currentPlayer = playerOne;\n ShipsGameBoard playerOneGameBoard = new ShipsGameBoard(playerOne, playerOneFleet);\n ShipsGameBoard playerOneCheckBoard = new ShipsGameBoard(playerOne, playerOneFleetToCheck);\n playerOneCheckBoard.setup();\n\n TreeMap<Character, Integer> lettersAndDigits = lettersAndDigits(playerOneGameBoard.getLength());\n ShipCreator threeMastShipCreatorPlayerOne = new ShipCreator(THREE_MASTS_SHIP,\n null,\n playerOne,\n ShipGameBoardMark.THREE_MASTS,\n playerOneGameBoard,\n playerOneShipsGameLogic);\n\n playerOneGameBoard.print();\n shipsDeployment(playerOneGameBoard,\n lettersAndDigits,\n threeMastShipCreatorPlayerOne,\n playerOneShipsGameLogic,\n playerOneFleet,\n NUMBER_OF_SHIPS);\n\n// playerOneShipsGameLogic.clearConsole();\n\n Player playerTwo = preparePlayer(getUserName(scanner, validator, shipsGameText.getMessage(\"show.player.two\"), playerOne.getName()));\n ShipsGameBoard playerTwoGameBoard = new ShipsGameBoard(playerTwo, playerTwoFleet);\n ShipsGameBoard playerTwoCheckBoard = new ShipsGameBoard(playerTwo, playerTwoFleetToCheck);\n playerTwoCheckBoard.setup();\n\n ShipCreator threeMastShipCreatorPlayerTwo = new ShipCreator(THREE_MASTS_SHIP,\n null,\n playerTwo,\n ShipGameBoardMark.THREE_MASTS,\n playerTwoGameBoard,\n playerTwoShipsGameLogic);\n\n playerTwoGameBoard.print();\n shipsDeployment(playerTwoGameBoard,\n lettersAndDigits,\n threeMastShipCreatorPlayerTwo,\n playerTwoShipsGameLogic,\n playerTwoFleet,\n NUMBER_OF_SHIPS);\n\n\n boolean isAWinner = false;\n do {\n int userRow;\n int userCol;\n// playerOneGameBoard.clearConsole();\n showCurrentPlayerBoards(playerOne, currentPlayer, playerOneGameBoard, playerTwoGameBoard, playerOneCheckBoard,\n playerTwoCheckBoard, shipsGameText);\n System.out.println(shipsGameText.getMessage(\"show.witch.player.move\", currentPlayer.getName()));\n\n System.out.println(shipsGameText.getMessage(\"show.input.row\", Integer.toString(playerOneGameBoard.getLength())));\n userRow = getPlayerRowChoice(scanner, validator, playerOneGameBoard.getLength());\n\n System.out.println(shipsGameText.getMessage(\"show.input.col\",\n Character.toString(playerOneGameBoard.generateLastLetterOfColumn('A', playerOneGameBoard.getLength()))));\n userCol = convertLetterToDigit(lettersAndDigits, getPlayerColChoice(scanner, validator,\n lettersAndDigits));\n\n if (currentPlayer.equals(playerOne)) {\n if (playerTwoShipsGameLogic.checkForHit(userRow, userCol)) {\n playerOneShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n playerTwoShipsGameLogic.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n if (playerTwoShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n playerTwoShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerTwo);\n playerOneShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerTwoFleet, playerOne);\n System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n playerOneCheckBoard.print();\n System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerTwo.getName()));\n playerTwoGameBoard.print();\n } else {\n System.out.println(shipsGameText.getMessage(\"show.player.hit.ship\", playerOne.getName()));\n }\n } else {\n System.out.println(shipsGameText.getMessage(\"show.player.miss\"));\n playerOneShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.MISS);\n playerTwoShipsGameLogic.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.MISS);\n }\n\n// if (playerTwoShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n// playerTwoShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerTwo);\n// playerOneShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerTwoFleet, playerOne);\n// System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n// System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n// playerOneCheckBoard.print();\n// System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerTwo.getName()));\n// playerTwoGameBoard.print();\n// }\n\n\n if (playerTwoShipsGameLogic.isPlayerLoose()) {\n System.out.println(shipsGameText.getMessage(\"show.player.win\", playerOne.getName()));\n isAWinner = true;\n }\n\n } else {\n if (playerOneShipsGameLogic.checkForHit(userRow, userCol)) {\n playerTwoShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerTwo, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n playerOneShipsGameLogic.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.HIT_BUT_NOT_SUNK);\n if (playerOneShipsGameLogic.checkShipForStatusChange(userRow, userCol)) {\n playerOneShipsGameLogic.changeShipStatusToSunk(userRow, userCol, playerOne);\n playerTwoShipsGameLogicToCheck.changeShipStatusToSinkOnCheckBoard(playerOneFleet, playerTwo);\n System.out.println(shipsGameText.getMessage(\"show.player.sunk.ship\"));\n System.out.println(shipsGameText.getMessage(\"show.player.checkboard\", currentPlayer.getName()));\n playerTwoCheckBoard.print();\n System.out.println(shipsGameText.getMessage(\"show.player.gameboard\", playerOne.getName()));\n playerOneGameBoard.print();\n }\n else {\n System.out.println(shipsGameText.getMessage(\"show.player.hit.ship\", playerOne.getName()));\n }\n } else {\n playerTwoShipsGameLogicToCheck.changeMastStatus(userRow, userCol, playerOne,\n ShipGameBoardMark.MISS);\n playerOneShipsGameLogic.changeMastStatus(userRow, userCol, playerOne, ShipGameBoardMark.MISS);\n System.out.println(shipsGameText.getMessage(\"show.player.miss\"));\n }\n if (playerOneShipsGameLogic.isPlayerLoose()) {\n System.out.println(shipsGameText.getMessage(\"show.player.win\", playerTwo.getName()));\n isAWinner = true;\n }\n }\n\n currentPlayer = swapPlayers(playerOne, currentPlayer, playerTwo);\n }\n while (!isAWinner);\n }" ]
[ "0.5896425", "0.5476989", "0.54241264", "0.5394337", "0.52773887", "0.5213934", "0.5180342", "0.51515675", "0.5148726", "0.51158834", "0.5111865", "0.50923645", "0.5062856", "0.5017316", "0.5004213", "0.49530038", "0.49465725", "0.49454027", "0.49317718", "0.49275103", "0.4927047", "0.49245408", "0.49140692", "0.49096137", "0.49048787", "0.49011615", "0.49007368", "0.48974353", "0.48952308", "0.4890509", "0.48885602", "0.48831677", "0.48798293", "0.48715848", "0.48673108", "0.48649055", "0.4861498", "0.48431033", "0.4835913", "0.48348102", "0.48278505", "0.48224884", "0.48101923", "0.48053697", "0.4803959", "0.48030126", "0.48016667", "0.48002484", "0.47914225", "0.4787126", "0.47833392", "0.47824022", "0.47822422", "0.47816616", "0.47774684", "0.47695196", "0.4768607", "0.47537738", "0.47515288", "0.47407195", "0.47389114", "0.47335857", "0.4731529", "0.47270036", "0.4721706", "0.47215727", "0.47116312", "0.4709896", "0.47093993", "0.4697986", "0.46963745", "0.46927747", "0.46858135", "0.4678308", "0.4674044", "0.46670255", "0.46659514", "0.4663445", "0.46633548", "0.46631745", "0.4658899", "0.46556994", "0.46461987", "0.4643126", "0.46424758", "0.46419767", "0.46406534", "0.46395865", "0.46374363", "0.46340555", "0.46326095", "0.46326095", "0.46326095", "0.4628373", "0.46220925", "0.46212873", "0.4616753", "0.46148717", "0.46139568", "0.46138486" ]
0.58599323
1
Puts the player into local coordinates and makes a record of where they used to be.
default void doPreProcessing(INetHandlerPlayServer server, boolean callingFromSponge) { if (isPacketOnMainThread(server, callingFromSponge)) { // System.out.println("Pre packet process"); NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server; EntityPlayerMP player = serverHandler.player; PhysicsWrapperEntity wrapper = getPacketParent(serverHandler); if (wrapper != null && wrapper.getPhysicsObject().getShipTransformationManager() != null) { ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld(); ISubspace worldSubspace = worldProvider.getSubspace(); worldSubspace.snapshotSubspacedEntity((ISubspacedEntity) player); wrapper.getPhysicsObject().getShipTransformationManager() .getCurrentTickTransform().transform(player, TransformType.GLOBAL_TO_SUBSPACE); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupPlayerPosition() {\n\t\tHashMap<Suspect, Coordinates> startPositions = new HashMap<Suspect, Coordinates>();\r\n\t\tstartPositions.put(Suspect.KasandraScarlet, new Coordinates(18, 28));\r\n\t\tstartPositions.put(Suspect.JackMustard, new Coordinates(7, 28));\r\n\t\tstartPositions.put(Suspect.DianeWhite, new Coordinates(0, 19));\r\n\t\tstartPositions.put(Suspect.JacobGreen, new Coordinates(0, 9));\r\n\t\tstartPositions.put(Suspect.EleanorPeacock, new Coordinates(6, 0));\r\n\t\tstartPositions.put(Suspect.VictorPlum, new Coordinates(20, 0));\r\n\r\n\t\tfor (int i = 0; i < this.listOfPlayer.size(); i++) {\r\n\t\t\tPlayer p = this.listOfPlayer.get(i);\r\n\t\t\tSuspect sus = p.getSuspect().getData();\r\n\t\t\tboolean b = p.setCoord(startPositions.get(sus), this.grid);\r\n\t\t\t// should always be able to put character on starting position\r\n\t\t}\r\n\t\tSystem.out.println(\"Initial player starting positions set\");\r\n\t}", "public void adjLocation(double l){this.PlayerLocation;}", "Location getPlayerLocation();", "private void setMapPos()\r\n {\r\n try\r\n {\r\n Thread.sleep(1000);//so that you can see players move\r\n }\r\n catch(Exception e){}\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int unitPos = 0;\r\n int firstX = 0;\r\n int firstY = 0;\r\n if (currentPlayer == 1)\r\n {\r\n unitPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n }\r\n if (currentPlayer == 2)\r\n {\r\n unitPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n }\r\n int tempX = unitPos % mapWidth;\r\n int tempY = unitPos - tempX;\r\n if (tempY == 0) {}\r\n else\r\n tempY = tempY / mapHeight;\r\n tempX = tempX - 11;\r\n tempY = tempY - 7;\r\n if (tempX >= 0)\r\n firstX = tempX;\r\n else\r\n firstX = tempX + mapWidth;\r\n if (tempY >= 0)\r\n firstY = tempY;\r\n else\r\n firstY = tempY + mapWidth;\r\n\r\n int drawWidth = worldPanel.getDrawWidth();\r\n int drawHeight = worldPanel.getDrawHeight();\r\n worldPanel.setNewXYPos(firstX, firstY);\r\n miniMap.setNewXY(firstX, firstY, drawWidth, drawHeight);\r\n }", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "void playerPositionChanged(Player player);", "void setPlayerLocation(Player p, int bp) {\n\t\t\tplayerLocationRepo.put(p, bp);\n\t\t}", "public void enterPlayerView(){\n\t\tplayerSeen=true;\r\n\t\tplayerMapped=true;\r\n\t}", "public void setPlayerPosition(Player player) {\n if (player.getPositionX() < 0 && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //left exit to right entry\n player.position.x = screenWidth - wallSize - player.getRadius();\n player.position.y = player.getPositionY();\n } else if ((player.getPositionX() > screenWidth / 2 - doorSize && player.getPositionX() < screenWidth / 2 + doorSize) && player.getPositionY() < 0) {\n //top exit to bottom entry\n player.position.x = player.getPositionX();\n player.position.y = screenHeight - wallSize - player.getRadius();\n } else if (player.getPositionX() > screenWidth && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //right exit to left entry\n player.position.x = wallSize + player.getRadius();\n player.position.y = player.getPositionY();\n } else {\n //bottom exit to top entry\n player.position.x = player.getPositionX();\n player.position.y = wallSize + player.getRadius();\n }\n }", "MazePoint getActivePlayerCoordinates();", "private void setUpStartPosition()\n {\n \tthis.xPos = startTile.xPos;\n this.yPos = startTile.yPos - startTile.tileHeight;\n yPos--;\n \n System.out.println(\"Player is on level \" + level + \n \" at position x: \" + xPos + \", y: \" + yPos); \n }", "@Override\r\n public void updateMixer() {\n playerPosition = mixer.getGlobalCoordinates();\r\n }", "public void setPlayerPosition() throws IOException\r\n\t{\r\n\t\tboolean flag = false;\r\n\t\t\r\n\t\tint X = 0;\r\n\t\tint Y = 0;\r\n\t\t\r\n\t\twhile(flag == false)\r\n\t\t{\r\n\t\t\toStream.writeInt(X);\r\n\t\t\toStream.writeInt(Y);\r\n\t\t\tflag = iStream.readBoolean();\r\n\t\t\tX++;\r\n\t\t\tY++;\r\n\t\t}\r\n\t\tboard.makePlayer(X-1, Y-1);\r\n\t}", "public void updatePlayerLocation() {requires new property on gamestate object\n //\n }", "public void changePlayerPixels() {\n //change the player point2pixels\n if (!playerFlag) {\n game.getPlayer().setPixels(convertor.gps2Pixels(game.getPlayer().getPoint()));\n Point3D point = new Point3D(game.getPlayer().getPixels()[0] , game.getPlayer().getPixels()[1]);\n GraphNode playerNode = new GraphNode(point);\n vertices.add(playerNode);\n\n }\n\n else {\n Point3D point = new Point3D(game.getPlayer().getPixels()[0] , game.getPlayer().getPixels()[1]);\n GraphNode playerNode = new GraphNode(point);\n vertices.add(playerNode);\n }\n\n playerFlag = true;\n\n }", "public void resetPlayerPosition() {\n\t\tthis.tilePositionX = this.STARTING_X;\n\t\tthis.tilePositionY = this.STARTING_Y;\n\t}", "public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\n }", "public void setStartingPosition(GameTile [][] visibleMap) {\r\n\t\t//method to set the starting position of our player.\r\n\t\tfor(int i=0; i<visibleMap.length; i++) {\r\n\t\t\tfor(int j=0; j<visibleMap[i].length; j++) {\r\n\t\t\t\tif(visibleMap[i][j] != null && visibleMap[i][j].hasPlayer()) {\r\n\t\t\t\t\tplayerX = i;\r\n\t\t\t\t\tplayerY = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void returnPlayerHome(Player player_to_be_eaten)\n {\n player_to_be_eaten.setX_cordinate(player_to_be_eaten.getInitial_x());\n player_to_be_eaten.setY_cordinate(player_to_be_eaten.getInitial_y());\n player_to_be_eaten.setSteps_moved(0);\n }", "public void pathFinding(GridCoordinate playerCoordinates)\r\n\t{\n\t\tplayerCoordinates = getCoordinates();\r\n\t\t\r\n\t\t//float playerX = PlayerCharacter.getOffsetX();\r\n\t\t\r\n\t}", "public static void movePlayerToStartingLocation(Map map) {\n movePlayer(map, 2, 2); // or instead of 0,0 you can select a different starting location\r\n }", "public abstract void changePlayerAt(ShortPoint2D pos, Player player);", "public void setPlayerPosition(Player player) {\n\n if (player.getPosition().equals(\"Left Wing\")) {\n\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][0] == null) {\n forwardLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Center\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][1] == null) {\n forwardLines[i][1] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Wing\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][2] == null) {\n forwardLines[i][2] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Left Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][0] == null) {\n defenceLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][1] == null) {\n defenceLines[i][1] = player;\n break;\n }\n }\n }\n }", "public void setPlayerPosition(CellView playerPosition) {\n this.playerPosition = playerPosition;\n }", "private void setSpawnLocation(Object packet, Vector location, String xName, String yName, String zName) {\n ReflectUtils.setField(packet, xName, location.getX());\n ReflectUtils.setField(packet, yName, location.getY());\n ReflectUtils.setField(packet, zName, location.getZ());\n }", "public int getCurrentPlayerRealPosition();", "public void teleportPlayer(int x, int y){\n hero.setX(x);\n hero.setY(y);\n }", "private void move() {\n\t\t\tangle += Math.PI/24;\n\t\n\t\t\tcow.locX = Math.sin(angle) * 2.5 + player.getLocation().getX();\n\t\t\tcow.locZ = Math.cos(angle) * 2.5 + player.getLocation().getZ();\n\t\t\t\n\t\t\tLocation loc = new Location(player.getWorld(), cow.locX, player.getLocation().getY() + 1.5, cow.locZ);\n\t\t\tloc.setDirection(player.getLocation().subtract(loc).toVector()); //Look at the player\n\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, cow.getId(), loc);\n\t\t}", "private void setInformationToDraw(Player player)\n {\n playerPieceList = player.getPieces();\n\n if (player == antagonistPlayer) {\n x = antagonistLocation[0];\n y = antagonistLocation[1];\n damageToAnnounce = antagonistDamage;\n healthBenefitToAnnounce = antagonistHealthBenefit;\n } else if (player == heroPlayer) {\n x = heroLocation[0];\n y = heroLocation[1];\n damageToAnnounce = heroDamage;\n healthBenefitToAnnounce = heroHealthBenefit;\n } else {\n x = 0;\n y = 0;\n }\n }", "@Test\n\tpublic void getNewPlayerLocation() {\n\t\tmap = new Map(10, 0, 0, 0);\n\t\tCavern cavernOne = new Cavern(0, 0);\n\t\tCavern cavernTwo = new Cavern(1, 0);\n\t\tCavern cavernThree = new Cavern(2, 0);\n\t\tCavern cavernFour = new Cavern(0, 1);\n\t\tcaverns.put(cavernOne, \"\");\n\t\tcaverns.put(cavernTwo, \"\");\n\t\tcaverns.put(cavernThree, \"\");\n\t\tcaverns.put(cavernFour, \"\");\n\t\tthis.bat = new Bat(this.player, caverns);\n\n\t\tplayer.setPlayerLocation(cavernOne);\n\n\t\tCavern newLocation = this.bat.getNewLocation();\n\t\tCavern playerLocation = this.bat.getOriginalLocation();\n\t\tassertNotNull(newLocation);\n\t\tassertTrue(playerLocation != newLocation);\n\t}", "private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }", "PositionedObject(){\n float x = DrawingHelper.getGameViewWidth()/2;\n float y = DrawingHelper.getGameViewHeight()/2;\n _position.set(x,y);\n }", "@Override\r\n public void setupMove(double localTime) {\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.setController(Game.mCamera);\r\n ((Client)mEndPoint).sendUDP(localChar.getControl());\r\n\r\n ChatMessage chat = localChar.getChat();\r\n if (chat != null && chat.s != null) {\r\n System.err.println(\"Sending chat to server:\" + chat.s);\r\n ((Client)mEndPoint).sendTCP(chat);\r\n chat.s = null;\r\n }\r\n }\r\n\r\n // receive world state from server\r\n TransmitPair pair;\r\n for (;;) {\r\n pair = pollHard(localTime, 0);\r\n if (pair == null)\r\n break;\r\n\r\n if (pair.object instanceof StateMessage) {\r\n // Server updates client with state of all entities\r\n StateMessage state = (StateMessage) pair.object;\r\n applyEntityChanges(state.timestamp, state.data);\r\n\r\n // update clock correction based on packet timestamp, arrival time\r\n if (mClockCorrection == Double.MAX_VALUE) {\r\n mClockCorrection = state.timestamp - localTime;\r\n } else {\r\n mClockCorrection = Config.CORRECTION_WEIGHT * (state.timestamp - localTime)\r\n + (1 - Config.CORRECTION_WEIGHT) * mClockCorrection;\r\n }\r\n } else if (pair.object instanceof StartMessage) {\r\n // Server tells client which character the player controls\r\n mLocalCharId = ((StartMessage) pair.object).characterEntity;\r\n System.err.println(\"Client sees localid, \" + mLocalCharId);\r\n } else if (pair.object instanceof ChatMessage) {\r\n ChatMessage chat = (ChatMessage) pair.object;\r\n mChatDisplay.addChat(localTime, chat.s, Color.white);\r\n } else if (pair.object instanceof ChunkMessage) {\r\n ChunkMessage chunkMessage = (ChunkMessage) pair.object;\r\n ChunkModifier.client_putModified(chunkMessage);\r\n }\r\n }\r\n\r\n // move local char\r\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.setupMove(localTime);\r\n }\r\n }", "public void setLocalEID() {\n localPlayer.eid = LOCAL_PLAYER_EID;\n addEntity(localPlayer);\n }", "void setPlayerLocation(@Nonnull Location location);", "public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }", "int getPlayerLocation(Player p) {\n\t\t\treturn playerLocationRepo.get(p);\n\t\t}", "public void spawn(Location location) {\r\n Packet<?>[] packets = {\r\n new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER),\r\n new PacketPlayOutNamedEntitySpawn(),\r\n new PacketPlayOutEntityHeadRotation()\r\n };\r\n\r\n setFieldCastValue(packets[0], \"b\", Collections.singletonList(this.getPlayerInfoData((PacketPlayOutPlayerInfo) packets[0])));\r\n\r\n setFieldValue(packets[1], \"a\", this.entityId); // Just change entity id to prevent client-side problems\r\n setFieldValue(packets[1], \"b\", this.profile.getId());\r\n setFieldValue(packets[1], \"c\", location.getX());\r\n setFieldValue(packets[1], \"d\", location.getY());\r\n setFieldValue(packets[1], \"e\", location.getZ());\r\n setFieldValue(packets[1], \"f\", (byte) (location.getYaw() * 256.0F / 360.0F));\r\n setFieldValue(packets[1], \"g\", (byte) (location.getPitch() * 256.0F / 360.0F));\r\n setFieldValue(packets[1], \"h\", this.player.getPlayer().getHandle().getDataWatcher());\r\n\r\n setFieldValue(packets[2], \"a\", this.entityId);\r\n setFieldValue(packets[2], \"b\", (byte) (location.getYaw() * 256.0F / 360.0F));\r\n\r\n for (GamePlayer player : this.plugin.getGameManager().getAllPlayers())\r\n for (Packet<?> packet : packets)\r\n player.sendPacket(packet);\r\n }", "private void playerMove(PlayerPiece playerPiece, String direction) {\n // Row will be -1 from player location with the same column value\n System.out.println(playerPiece + \" trying to move \" + direction + \".\");\n Tile playerLocation = playerPiece.getLocation();\n System.out.println(\"Player in: \" + playerLocation.getRow() + \" \" + playerLocation.getColumn());\n int newRow = playerLocation.getRow();\n int newColumn = playerLocation.getColumn();\n switch (direction) {\n case \"u\":\n newRow -= 1;\n break;\n case \"d\":\n newRow += 1;\n break;\n case \"l\":\n newColumn -= 1;\n break;\n case \"r\":\n newColumn += 1;\n break;\n }\n if (newRow >= 0 && newColumn >= 0 && newRow < this.board.getGrid().getRows() && newColumn < this.board.getGrid().getColumns()) {\n System.out.println(newRow + \" \" + newColumn);\n Tile newLocation = this.board.getGrid().getTile(newRow, newColumn);\n System.out.println(\"New Location:\" + newLocation);\n System.out.println(\"Cords: \" + newLocation.getRow() + \" \" + newLocation.getColumn());\n if (newLocation.isAvailable()) {\n playerLocation.removeOccupier();\n playerPiece.setLocation(newLocation);\n newLocation.setOccupier(playerPiece);\n System.out.println(\"Player moved to: \" + playerLocation.getRow() + \" \" + playerLocation.getColumn());\n this.board.getGrid().print();\n }\n }\n }", "public void update() {\n\t\tgetLocation().offsetX(getDirection().getXOffset());\n\t\tgetLocation().offsetY(getDirection().getYOffset());\n\t\t\n\t\tChunk center = World.getMap().getCenterChunk();\n\t\t\n\t\tint localX = (int) (getLocation().getX() - center.getData().getRealX());\n\t\tint localY = (int) (getLocation().getY() - center.getData().getRealY());\n\t\t\n\t\tif(localX < 0 ||localY< 0\n\t\t\t|| localX > 256 || localY > 256) {\n\t\t\t\tWorld.getMap().load(getLocation());\n\t\t}\n\t}", "public void movePlayer(String nomeArq, int px, int py) {\r\n if(Main.player1.Vez()) {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)){\r\n \tMain.player1.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player1.MudaLado(false,true);\r\n } \r\n pos = Main.player1.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0.1;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false) {\r\n \tMain.player1.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player1.Size()[0],Main.player1.Size()[1])==false)\r\n {\r\n \tMain.player1.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n Main.Fase.repinta(); \r\n }\r\n else {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)) {\r\n \tMain.player2.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player2.MudaLado(false,true);\r\n } \r\n pos = Main.player2.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false) {\r\n \tMain.player2.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false)\r\n {\r\n \tMain.player2.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n }\r\n }", "public void updatePosition(){\n\t\t//maps the position to the closest \"grid\"\n\t\tif(y-curY>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY+GameSystem.GRID_SIZE;\n\t\t\tyGridNearest++;\n\t\t}\n\t\telse if(curX-x>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX-GameSystem.GRID_SIZE;\n\t\t\txGridNearest--;\n\t\t}\n\t\telse if(x-curX>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX+GameSystem.GRID_SIZE;\n\t\t\txGridNearest++;\n\t\t}\n\t\telse if(curY-y>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY-GameSystem.GRID_SIZE;\n\t\t\tyGridNearest--;\n\t\t}\n\t\t//sets the last completely arrived location grid\n\t\tif(y-yTemp>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp+GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY++;\n\t\t}\n\t\telse if(xTemp-x>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp-GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX--;\n\t\t}\n\t\telse if(x-xTemp>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp+GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX++;\n\t\t}\n\t\telse if(yTemp-y>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp-GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY--;\n\t\t}\n\t\t//only updates nextX and nextY when the move buttons are being pressed down\n\t\t/*\n\t\tif(movable){\n\t\t\tif(direction.equals(\"right\")){\n\t\t\t\t\tnextX=lastX+1;\n\t\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"left\")){\n\t\t\t\tnextX=lastX-1;\n\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"up\")){\n\t\t\t\tnextY=lastY-1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t\telse if(direction.equals(\"down\")){\n\t\t\t\tnextY=lastY+1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t\n\t}", "public void snapToGrid(Player pl) {\n\t\t// Find the closest spot\n\t\t\n\t\tif(pl.getVelocity().x == 0 && pl.getLocation().x - 2 % 16 != 0)\n\t\t{\n\t\t\tfloat locationX = Math.round(pl.getLocation().x / 16f);\n\t\t\tfloat preferredX = (locationX * 16) + 2f;\n\t\t\t\n\t\t\tfloat move = preferredX - pl.getLocation().x;\n\t\t\tif(Math.abs(move) > 0.1f)\n\t\t\t\tmove = 0.1f * Math.signum(move);\n\t\t\tpl.getLocation().x += move;\n\t\t}\n\t\t\n\t\tif(pl.getVelocity().y == 0 && pl.getLocation().y - 2 % 16 != 0)\n\t\t{\n\t\t\tfloat locationY = Math.round(pl.getLocation().y / 16f);\n\t\t\tfloat preferredY = (locationY * 16) + 2f;\n\t\t\t\n\t\t\tfloat move = preferredY - pl.getLocation().y;\n\t\t\tif(Math.abs(move) > 0.1f)\n\t\t\t\tmove = 0.1f * Math.signum(move);\n\t\t\tpl.getLocation().y += move;\n\t\t}\n\t\t\n\t}", "private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}", "private void move() {\n\t\t\tx += Math.PI/12;\n\t\t\thead.locY = intensity * Math.cos(x) + centerY;\n\t\t\thead.yaw = spinYaw(head.yaw, 3f);\n\t\t\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, head.getId(), \n\t\t\t\tnew Location(player.getWorld(), head.locX, head.locY, head.locZ, head.yaw, 0));\n\t\t}", "public void setSpace(int position, Box player){\r\n\t\tboard[position - 1] = player;\r\n\t\t\r\n\t}", "public void putPlayerAtPosition(Player player, Point moveTo) {\n\t\tremovePosition(player.getPosition());\n\t\toccupiedPositions.add(moveTo);\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getName().equals(player.getName()))\n\t\t\t\tp.setPosition(moveTo);\n\t\t}\n\t}", "@Nonnull\n Location getPlayerLocation();", "public void onPlayerCollide(Player player) {\n \tplayer.x().set(getX());\r\n \tplayer.y().set(getY());\r\n \t\r\n \t// One ladder at a time\r\n \tif (player.getInventory().findEntity(this) == null) {\r\n \t\tplayAudio(\"sounds/pickup.wav\");\r\n \t\tplayer.getInventory().addEntity(this);\r\n \tdisplayInventory();\r\n \t}\n }", "public void placeMarker(BoardPosition marker, char player)\r\n {\n if(gameMap.containsKey(player))\r\n {\r\n List<BoardPosition> tempList;\r\n tempList = gameMap.get(player);\r\n tempList.add(marker);\r\n gameMap.put(player, tempList);\r\n }\r\n // If the player does not exist in the map, create a new array list and put the key and value in the map\r\n else\r\n {\r\n List<BoardPosition> newList = new ArrayList<BoardPosition>();\r\n newList.add(marker);\r\n gameMap.put(player, newList);\r\n }\r\n }", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "public static void worldLocsInsert(Player player) {\n\n\t\ttry {\n\n\t\t\tStatement st = conn.createStatement();\n\n\t\t\tLocation pLoc = player.getLocation();\n\t\t\tint x = pLoc.getBlockX();\n\t\t\tint y = pLoc.getBlockY();\n\t\t\tint z = pLoc.getBlockZ();\n\t\t\tUUID uuid = player.getUniqueId();\n\n\t\t\t/* This is easier... */\n\t\t\tst.executeUpdate(\"DELETE FROM worldlocs WHERE uuid='\" + uuid + \"';\");\n\t\t\tst.executeUpdate(\"INSERT INTO worldlocs(uuid, x, y, z) VALUES ('\" + uuid + \"', '\" + x + \"', '\" + y + \"', '\" + z + \"');\");\n\n\t\t\tst.close();\n\n\t\t} catch (Exception e) {\n\t\t\tPvPTeleport.instance.getLogger().info(e.getMessage());\n\t\t}\n\n\t}", "public int putPlayerOnField(CPlayerEntity pPlayer, CPositionEntity pPosition){\r\n int i = 0;\r\n int lReturnValue = PUT_PLAYER_FAILURE_PLAYER_NOT_IN_SQUAD;\r\n for (CYourPlayerEntry lPlayerEntry : mYourPlayerEntries) {\r\n if (lPlayerEntry.getPlayer() != null) {\r\n if (lPlayerEntry.getPlayer().getId() == pPlayer.getId() && lPlayerEntry.getPosition() == null) {\r\n lReturnValue = PUT_PLAYER_SUCCESS_NO_SWAP;\r\n }\r\n }\r\n }\r\n\r\n /*\r\n * if we found the player we want to put in our squad\r\n * we go through every player of the squad\r\n */\r\n if (lReturnValue == PUT_PLAYER_SUCCESS_NO_SWAP){\r\n for (CYourPlayerEntry lPlayerEntry : mYourPlayerEntries){\r\n if (lPlayerEntry.getPosition() != null) {\r\n /*\r\n * if a player in the squad already has the position\r\n * where we want to put our passed player, we set his\r\n * position to null (to swap him to the bench)\r\n */\r\n if (lPlayerEntry.getPosition().getName().equals(pPosition.getName())) {\r\n editPlayerPosition(i, null);\r\n lReturnValue = PUT_PLAYER_SUCCESS_WITH_SWAP;\r\n }\r\n }\r\n /*\r\n * when we finally find our passed player, we set\r\n * his position to the passed one\r\n */\r\n if (lPlayerEntry.getPlayer() != null) {\r\n if (lPlayerEntry.getPlayer().getId() == pPlayer.getId()) {\r\n editPlayerPosition(i, pPosition);\r\n }\r\n }\r\n i++;\r\n }\r\n }\r\n return lReturnValue;\r\n }", "public boolean movePlayer(MazePlayer p, Direction d) {\n//\t System.out.println(\"Player \"+p.name+\" requests to move in direction \"+d);\n// players can move through walls with some small probability!\n\t\t // calculate the new position after the move \n\t\t MazePosition oldPos = playerPosition.get(p.name);\n\t\t MazePosition newPos = theBoard.tryMove(oldPos,d);\n\n\t\t \n\t\t //make sure there is no other player at that position\n\t\t // and if there is someone there then just return without moving\n\t\t if (playerPosition.containsValue(newPos)){\n\t\t\t if (!newPos.equals(oldPos))\n\t\t\t\t if (debugging) System.out.println(\"player \"+p.name+\" tried to move into an occupied space.\");\n\t\t\t else\n\t\t\t\t if (debugging) System.out.println(p.name+\" stays at \"+oldPos);\n\t\t\t return false;\n\t\t }\n\t\t \n\t\t //otherwise, make the move\n\t\t playerPosition.put(p.name,newPos);\n\t\t if (debugging) System.out.println(p.name+\": \"+oldPos+\" -> \"+newPos);\n\t\t \n\t\t //take off points if you moved through a wall\n\t\t if (!theBoard.canMove(oldPos,d)){\n\t\t\t score.put(p.name,score.get(p.name)-2);\n\t\t\t if (debugging) System.out.println(p.name+\" moved through a wall\");\n\t\t }\n\t\t \n\t\t // mark that old space as \"free space\"\n\t\t freeSpace.add(0,oldPos);\n\t\t \n\t\t // check to see if there is a jewel in the new position.\n\t\t int i = jewelPosition.indexOf(newPos);\n\t\t if (i > -1) {\n\t\t\t // add 5 to the score\n\t\t\t score.put(p.name,score.get(p.name)+5);\n\t\t\t // remove the jewel\n\t\t\t jewelPosition.remove(i);\n\t\t\t if (debugging) System.out.println(\"and lands on a jewel!, score is now \" +score.get(p.name));\n\t\t\t // add another jewel\n\t\t\t MazePosition q = getEmptySpace();\n\t\t\t jewelPosition.add(q);\n\t\t\t if (debugging) System.out.println(\"adding a new jewel at \"+q);\n\t\t\t \n\t\t }\n\t\t else {\n\t\t\t // if no jewel, then remove the space from the freeSpace list\n\t\t\t freeSpace.remove(newPos);\n\t\t }\n\t\t return true;\n\n }", "public void putPlayerAtStart() {\n // put the player on the ground\n player.putOn(ground1); \n player.move(new Vec2(-90, 0));\n }", "public void saveCurrentPlayer() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/current_player\",_currentPlayer));\n\t}", "private void moveShipUp()\r\n\t\t{\r\n\t\t\t\tboolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n\r\n //if firstPlayer move unit up\r\n if(currentPlayer == 1)\r\n {\r\n int currentPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player1.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }\r\n }//end if\r\n\r\n //if secondPlayer move unit up\r\n if(currentPlayer == 2)\r\n {\r\n int currentPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n if(currentPos >= 0 && currentPos < mapWidth)\r\n {\r\n int newPos = mapHeight -1;\r\n int newPos2 = mapHeight * newPos + currentPos;\r\n int mapTemp = mapPieces[0][newPos2];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(newPos2);\r\n }\r\n else\r\n {\r\n int mapTemp = mapPieces[0][currentPos - mapWidth];\r\n if(mapTemp != 0)//if unit tries to move onto land\r\n moved = false;\r\n else\r\n worldPanel.player2.units[currentUnit - 1].setPosition(currentPos - mapWidth);\r\n }//end else\r\n }//end if\r\n\r\n //set up new player once unit has moved\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n\r\n //set up new mapPosition if player moved\r\n if(moved == true)\r\n setMapPos();\r\n\t\t}", "public void setPlayer(Player player) {\n this.currentPlayer = player;\n }", "public void movePlayer(String direction) {\n if(playerAlive(curPlayerRow, curPlayerCol)){\n if(direction.equals(\"u\")&&(curPlayerRow-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow-1), curPlayerCol);\n curPlayerRow -= 1;\n }else if(direction.equals(\"d\")&&(curPlayerRow+1)<=7){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow+1), curPlayerCol);\n curPlayerRow += 1;\n }else if(direction.equals(\"l\")&&(curPlayerCol-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol-1));\n curPlayerCol -= 1;\n }else if(direction.equals(\"r\")&&(curPlayerCol+1)<=9){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol+1));\n curPlayerCol += 1;\n }\n }\n if(playerFoundTreasure(curPlayerRow, curPlayerCol)){\n playerWins();\n }\n adjustPlayerLifeLevel(curPlayerRow, curPlayerCol);\n int[] array = calcNewTrollCoordinates(curPlayerRow, curPlayerCol, curTrollRow, curTrollCol);\n if(curPlayerRow == curTrollRow && curPlayerCol == curTrollCol){\n gameBoard[curTrollRow][curTrollCol] = new TrollPiece();\n }else{\n int newTrollRow = array[0];\n int newTrollCol = array[1];\n overwritePosition(curTrollRow, curTrollCol, newTrollRow, newTrollCol);\n curTrollRow = newTrollRow;\n curTrollCol = newTrollCol;\n }\n }", "private void playerMoveUp()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() - 1);\n if (this.getCurrentY() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else// hit edge redo setlocation\n {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } \n }", "private void movePlayer() {\r\n\t\tshipImageView.setX(ship.getCurrentLocation().x * scalingFactor);\r\n\t\tshipImageView.setY(ship.getCurrentLocation().y * scalingFactor);\r\n\t\tship.notifyObservers();\r\n\t}", "private static void updateOnePlayerPosition(int change, Player player, LifeArea lifeArea) {\n if ((player.getGlobalPosition() + change) >= 0) {\n player.setGlobalPosition(player.getGlobalPosition() + change);\n } else {\n player.setGlobalPosition(0);\n }\n // Update lifeArea position\n player.setLifeAreasPosition(player.getLifeAreasPosition()[lifeArea.ordinal()] + change, lifeArea);\n\n\n }", "public void playerPlaceProtection(Location loc, Player player) {\n List list = (List) plugin.map.get(player.getName());\n list.add(new Areas(loc));\n plugin.map.put(player.getName(), list);\n }", "Tile getPosition();", "private void prepare()\n {\n addObject(player,185,196);\n player.setLocation(71,271);\n Ground ground = new Ground();\n addObject(ground,300,360);\n invent invent = new invent();\n addObject(invent,300,375);\n }", "public Point getXyLocation() {\n return playerxy;\n }", "public void createOwnerPlayer(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player == null) {\r\n// System.out.println(\"Create owner player \" + name);\r\n player = new Player(name, x, y);\r\n inPlayer = player;\r\n players.put(name, player);\r\n }\r\n }", "public void setOriginalLocation() {\r\n for (int i = 0; i < this.enemies.size(); i++) {\r\n Point originalPoint = this.startLocations.get(i);\r\n this.enemies.get(i).setLocation(originalPoint);\r\n }\r\n }", "private void render(Vec3d playerPos) {\n GlStateManager.pushMatrix();\n GlStateManager.translated(- playerPos.getX(), - playerPos.getY(), - playerPos.getZ());//The render starts at the player, so we subtract the player coords and move the render to 0,0,0\n GlStateManager.callList(callList);\n GlStateManager.popMatrix();\n }", "private void updatePosition(){\n updateXPosition(true);\n updateYPosition(true);\n }", "static void enter(Player player, Room room) {\n if (player.moveTo(room)) {\n System.out.println(\"You just entered \" + player.getLocation());\n }\n else {\n System.out.println(\"That way appears to be blocked.\");\n }\n }", "public abstract void makePlayer(Vector2 origin);", "public void recordLocation(){\n\t\tg2d.setColor(Color.blue);\n\t\n int x = (int)(sd.getLocationX() * scale) + width/2;\n int y = (int)(sd.getLocationY() * scale) + height/2;\n g2d.fillRect(x,y,8,8);\n\t\n\t}", "private void spacePressed()\r\n {\r\n boolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n setMapPos();\r\n }", "void setPosition(Unit unit, MapLocation position);", "public Location getRandomLocationForPlayers() {\n\t\tfinal Location temp = getRandomLocationForMobs();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX(), temp.getBlockY() + 1, temp.getBlockZ());\n\t}", "@Test\n\t\tpublic void canGiveTheseusLocation() {\n\t\t\tPoint whereTheseus = new Pointer(3,3);\n\t\t\tgameLoader.addTheseus(whereTheseus);\n\t\t\tPoint expected = whereTheseus;\n\t\t\tPoint actual = gameSaver.wheresTheseus();\n\t\t\t\n\t\t\tassertEquals(expected.across(), actual.across());\n\t\t\tassertEquals(expected.down(), actual.down());\n\t\t}", "@Override\n\tpublic void gameStarted() {\n\t\tupdatePosition(0,0,0);\n//\t\tstartSendingPositionsThread();\n\t}", "private void nextPosition()\n\t{\n\t\tdouble playerX = Game.player.getX();\n\t\tdouble playerY = Game.player.getY();\n\t\tdouble diffX = playerX - x;\n\t\tdouble diffY = playerY - y;\n\t\tif(Math.abs(diffX) < 64 && Math.abs(diffY) < 64)\n\t\t{\n\t\t\tclose = true;\n\t\t} \n\t\telse\n\t\t{\n\t\t\tclose = false;\n\t\t}\n\t\tif(close)\n\t\t{\n\t\t\tattackPlayer();\n\t\t} \n\t\telse if(alarm.done())\n\t\t{\n\t\t\tdirection = Math.abs(random.nextInt() % 360) + 1;\n\t\t\talarm.setTime(50);\n\t\t}\n\t\thspd = MathMethods.lengthDirX(speed, direction);\n\t\tvspd = MathMethods.lengthDirY(speed, direction);\n\t\tif(hspd > 0 && !flippedRight)\n\t\t{\n\t\t\tflippedRight = true;\n\t\t\tsetEnemy();\n\t\t} \n\t\telse if(hspd < 0 && flippedRight)\n\t\t{\n\t\t\tflippedRight = false;\n\t\t\tsetEnemy();\n\t\t}\n\t\tmove();\n\t\talarm.tick();\n\t\tshootTimer.tick();\n\t}", "public int getPlayerPosition(int player)\n {\n return players[player];\n }", "public static void teleportPlayer(GamePlayer player, List<Location> spawnpoint) {\r\n\t\tRandom rand = new Random();\r\n\t\tLocation spawn = spawnpoint.get(rand.nextInt(spawnpoint.size()));\r\n\t\t\r\n\t\tplayer.getPlayer().setSaturation(100000);\r\n\t\tplayer.getPlayer().setHealth(20);\r\n\t\tplayer.getPlayer().teleport(spawn);\r\n\t\tgiveStuff(player);\r\n\t}", "public Player() {\n\t\tsetDimensions(16, 16);\n\t\tsetLocation(512 + 16, 512 + 16);\n\t\tsetKeyBindings();\n\t}", "protected void manageMovement(boolean localUpdate, Player player, PacketBuilder packet) {\n int movementUpdateId = (localUpdate && (player.basicSettings().isTeleporting() || player.basicSettings().isMapRegionUpdate())) ? 3\n : (player.getDirections().getSecondDirection() != null ? 2\n : (player.getDirections().getDirection() != null ? 1\n : (player.getMasks().requiresUpdate() ? 0\n : -1)));\n /*\n * put basic movement header in\n */\n packet.putBits(1, movementUpdateId == -1 ? 0 : 1);\n\n if (movementUpdateId != -1) {\n /*\n * tell the client that our player teleported/changeregion, has movement, or is standing still.\n */\n packet.putBits(2, movementUpdateId);\n if (movementUpdateId == 3) {\n /**\n * Apply custom/scrambled bits for Teleport/region change\n */\n handleRegionChange(player, packet);\n } else if (movementUpdateId > 0) {\n /*\n * Write the primary sprite (i.e. walk direction).\n */\n packet.putBits(3, player.getDirections().getDirection().intValue());\n if (movementUpdateId == 2) {\n /*\n * Write the secondary sprite (i.e. run direction).\n */\n packet.putBits(3, player.getDirections().getSecondDirection().intValue());\n }\n /*\n * Write a flag indicating if a block update happened.\n */\n packet.putBits(1, player.getMasks().requiresUpdate() ? 1 : 0);\n }\n }\n }", "final protected void setSpawnPosition(int newX, int newY)\n {\n spawnPoint = new Point(newX, newY);\n boundingBox.setLocation(spawnPoint);\n }", "public ChunkCoordinates getPlayerCoordinates()\n {\n return new ChunkCoordinates(0, 0, 0);\n }", "public void setPlayersAtGo()\n {\n for(int i = 0; i < m_numPlayers; i++)\n {\n m_gameBoard.addPlayerToSpace(i + 1, 0);\n }\n }", "public void update(Player localPlayer)\n\t{\n\t\t\n\t\tfor (int i = 0; i < entities.size(); i++)\n\t\t{\n\t\t\tif (entities.get(i) != null)\n\t\t\t\tentities.get(i).update();\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < players.size(); i++)\n\t\t{\n\t\t\tif (players.get(i) != null)\n\t\t\t\tplayers.get(i).update();\n\t\t}\n\t\t\n\t\tif (localPlayer != null)\n\t\t{\n\t\t\tthis.screenPos = new DVector((WIDTH/2) - localPlayer.worldPos.getX(),\n\t\t\t\t\t(HEIGHT/2) - localPlayer.worldPos.getY());\n\t\t}\n\t\t\n\t\tcheckCollisions();\n\t\n\t\tCollections.sort(players, new Comparator<PlayerMP>() {\n\t\t @Override\n\t\t public int compare(PlayerMP p1, PlayerMP p2) {\n\t\t if (p1.score < p2.score)\n\t\t return 1;\n\t\t if (p1.score > p2.score)\n\t\t return -1;\n\t\t return 0;\n\t\t }\n\t\t});\n\t\t\n\t}", "public int[] savePlayerPosition(){\n int [] playerPosition = new int[2];\n playerPosition[0] = player.getX();\n playerPosition[1]= player.getY();\n return playerPosition;\n }", "public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }", "public void generatePlayer()\n {\n board.getTile(8,0).insertPlayer(this.player);\n }", "public void setUserLocation(Room setRoom)\n {\n\n // Gets each person from the characters' array list.\n for(Person person: characters){\n\n // Check if found the player.\n if(person.getName().equals(PLAYER)){\n\n // sets the location of the player to the specifed room.\n person.setLocation(setRoom);\n }\n }\n }", "private void saveMove(){\n\t\tpreviousTile=monster.currentTile;\r\n\t}", "public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }", "public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }", "private void resendPosition(Player player) {\r\n\t\tPacketContainer positionPacket = protocolManager.createPacket(PacketType.Play.Server.POSITION);\r\n\t\tLocation location = player.getLocation();\r\n\r\n\t\tpositionPacket.getDoubles().write(0, location.getX());\r\n\t\tpositionPacket.getDoubles().write(1, location.getY());\r\n\t\tpositionPacket.getDoubles().write(2, location.getZ());\r\n\t\tpositionPacket.getFloat().write(0, 0f); // No change in yaw\r\n\t\tpositionPacket.getFloat().write(1, 0f); // No change in pitch\r\n\t\tgetFlagsModifier(positionPacket).write(0, EnumSet.of(PlayerTeleportFlag.X_ROT, PlayerTeleportFlag.Y_ROT)); // Mark pitch and yaw as relative\r\n\r\n\t\tPacketContainer velocityPacket = protocolManager.createPacket(PacketType.Play.Server.ENTITY_VELOCITY);\r\n\t\tvelocityPacket.getIntegers().write(0, player.getEntityId());\r\n\t\tvelocityPacket.getIntegers().write(1, 0).write(2, 0).write(3, 0); // Set velocity to 0,0,0\r\n\r\n\t\ttry {\r\n\t\t\tprotocolManager.sendServerPacket(player, positionPacket);\r\n\t\t\tprotocolManager.sendServerPacket(player, velocityPacket);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new RuntimeException(\"Failed to send position and velocity packets\", e);\r\n\t\t}\r\n\t}", "@Test\n public void testMovePlayerToCell()\n {\n theEngine.start();\n assertTrue(theEngine.inPlayingState());\n \n assertFalse(getThePlayer().getLocation() == getEmptyCell());\n movePlayerToCell(getEmptyCell());\n assertEquals(getThePlayer().getLocation(), getEmptyCell());\n }", "protected void updatePosition() {\n\t\tif(motion == null) {\n\t\t\tmotion = new Motion3D(player, true);\n\t\t} else motion.update(player, true);\n\t\t\n\t\tmotion.applyToEntity(this);\n\t\tthis.rotationPitch = player.rotationPitch;\n\t\tthis.rotationYaw = player.rotationYaw;\n\t}", "private void setPoints () {\n\t\tArrayList<Point> emptySpot = new ArrayList<Point>();\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\tif (maze[i][j] == 0) {\n\t\t\t\temptySpot.add(new Point (i, j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.shuffle(emptySpot);\n\t\tthis.goal = emptySpot.get(0);\n\t\tdouble goalRange = this.goal.getX() + this.goal.getY();\n\t\tfor (int i = 1; i < emptySpot.size(); i++) {\n\t\t\tPoint playerStart = emptySpot.get(i);\n\t\t\tdouble playerRange = playerStart.getX() + playerStart.getY();\n\t\t\tif (Math.abs(playerRange - goalRange) > width/2)\n\t\t\tthis.playerStart = playerStart;\n\t\t}\n\t}", "public void moveRobber(HexLocation loc) {\n\n\t}", "@Override\n\tpublic void updatePosition(Level level, Player player) {\n\t\tArrayList<ArrayList<Cell>> cells = level.getCells();\n\t\tint[][] map = new int[cells.get(0).size()][cells.size()];\n\t\tmap = fillMap(map, cells);\n\t\tif (!checkFloodFill(map, getxPos(), getyPos(), player.getxPos(), player.getyPos(), cells.get(0).size(), cells.size())) {\n\t\t\tmap = fillMap(map, cells);\n\t\t\trandomDirection(cells);\n\t\t} else {\n\t\t\tmap = fillMap(map, cells);\n\t\t\tmap = floodFill(map, getxPos(), getyPos(), player.getxPos(), player.getxPos(), cells.get(0).size(), cells.size(), 10);\n\t\t\ttracepath(map, player.getxPos(), player.getyPos(), player.getxPos(), player.getyPos(), cells.get(0).size(), cells.size());\n\t\t}\n\t}", "@java.lang.Override\n public double getPlayerLat() {\n return playerLat_;\n }" ]
[ "0.6874519", "0.6820814", "0.67372143", "0.65880793", "0.63353163", "0.63277966", "0.63214904", "0.6319267", "0.63171154", "0.62741584", "0.6232242", "0.62099904", "0.6183772", "0.6167713", "0.6149511", "0.6144453", "0.6134839", "0.6120705", "0.608089", "0.6070484", "0.6066909", "0.6062153", "0.600312", "0.59605455", "0.5952508", "0.5937507", "0.59349006", "0.59196293", "0.5910266", "0.5900337", "0.5896635", "0.5894065", "0.58913654", "0.5890202", "0.5880133", "0.586868", "0.58265567", "0.5823777", "0.5822872", "0.5798993", "0.5794634", "0.5781376", "0.576431", "0.5752729", "0.57470036", "0.5743144", "0.5735242", "0.57242966", "0.5722824", "0.5716173", "0.5710939", "0.5708005", "0.57034063", "0.57018185", "0.5695644", "0.5686228", "0.56805956", "0.5673674", "0.5661996", "0.5658714", "0.56570995", "0.5635975", "0.56332994", "0.56129235", "0.56080717", "0.5599609", "0.5590101", "0.55857265", "0.55732065", "0.55695164", "0.556881", "0.5565768", "0.55633634", "0.5558419", "0.5528182", "0.552484", "0.55227596", "0.5517017", "0.5511442", "0.55112046", "0.5510093", "0.55099005", "0.5507606", "0.55049235", "0.55043375", "0.55032164", "0.5498862", "0.5497737", "0.5495395", "0.5494257", "0.54791194", "0.5478842", "0.54783833", "0.5475152", "0.5472728", "0.54706204", "0.54675376", "0.54614913", "0.5458147", "0.54566765", "0.5455564" ]
0.0
-1
Restores the player from local coordinates to where they used to be.
default void doPostProcessing(INetHandlerPlayServer server, boolean callingFromSponge) { if (isPacketOnMainThread(server, callingFromSponge)) { NetHandlerPlayServer serverHandler = (NetHandlerPlayServer) server; EntityPlayerMP player = serverHandler.player; PhysicsWrapperEntity wrapper = getPacketParent(serverHandler); // I don't care what happened to that ship in the time between, we must restore // the player to their proper coordinates. ISubspaceProvider worldProvider = (ISubspaceProvider) player.getServerWorld(); ISubspace worldSubspace = worldProvider.getSubspace(); ISubspacedEntity subspacedEntity = (ISubspacedEntity) player; ISubspacedEntityRecord record = worldSubspace .getRecordForSubspacedEntity(subspacedEntity); // System.out.println(player.getPosition()); if (subspacedEntity.currentSubspaceType() == CoordinateSpaceType.SUBSPACE_COORDINATES) { subspacedEntity.restoreSubspacedEntityStateToRecord(record); player.setPosition(player.posX, player.posY, player.posZ); } // System.out.println(player.getPosition()); // We need this because Sponge Mixins prevent this from properly working. This // won't be necessary on client however. } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetPlayerPosition() {\n\t\tthis.tilePositionX = this.STARTING_X;\n\t\tthis.tilePositionY = this.STARTING_Y;\n\t}", "public void setOriginalLocation() {\r\n for (int i = 0; i < this.enemies.size(); i++) {\r\n Point originalPoint = this.startLocations.get(i);\r\n this.enemies.get(i).setLocation(originalPoint);\r\n }\r\n }", "private void resendPosition(Player player) {\r\n\t\tPacketContainer positionPacket = protocolManager.createPacket(PacketType.Play.Server.POSITION);\r\n\t\tLocation location = player.getLocation();\r\n\r\n\t\tpositionPacket.getDoubles().write(0, location.getX());\r\n\t\tpositionPacket.getDoubles().write(1, location.getY());\r\n\t\tpositionPacket.getDoubles().write(2, location.getZ());\r\n\t\tpositionPacket.getFloat().write(0, 0f); // No change in yaw\r\n\t\tpositionPacket.getFloat().write(1, 0f); // No change in pitch\r\n\t\tgetFlagsModifier(positionPacket).write(0, EnumSet.of(PlayerTeleportFlag.X_ROT, PlayerTeleportFlag.Y_ROT)); // Mark pitch and yaw as relative\r\n\r\n\t\tPacketContainer velocityPacket = protocolManager.createPacket(PacketType.Play.Server.ENTITY_VELOCITY);\r\n\t\tvelocityPacket.getIntegers().write(0, player.getEntityId());\r\n\t\tvelocityPacket.getIntegers().write(1, 0).write(2, 0).write(3, 0); // Set velocity to 0,0,0\r\n\r\n\t\ttry {\r\n\t\t\tprotocolManager.sendServerPacket(player, positionPacket);\r\n\t\t\tprotocolManager.sendServerPacket(player, velocityPacket);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new RuntimeException(\"Failed to send position and velocity packets\", e);\r\n\t\t}\r\n\t}", "@Override\r\n public void updateMixer() {\n playerPosition = mixer.getGlobalCoordinates();\r\n }", "public void setPlayerPosition(Player player) {\n if (player.getPositionX() < 0 && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //left exit to right entry\n player.position.x = screenWidth - wallSize - player.getRadius();\n player.position.y = player.getPositionY();\n } else if ((player.getPositionX() > screenWidth / 2 - doorSize && player.getPositionX() < screenWidth / 2 + doorSize) && player.getPositionY() < 0) {\n //top exit to bottom entry\n player.position.x = player.getPositionX();\n player.position.y = screenHeight - wallSize - player.getRadius();\n } else if (player.getPositionX() > screenWidth && (player.getPositionY() > screenHeight / 2 - doorSize && player.getPositionY() < screenHeight / 2 + doorSize)) {\n //right exit to left entry\n player.position.x = wallSize + player.getRadius();\n player.position.y = player.getPositionY();\n } else {\n //bottom exit to top entry\n player.position.x = player.getPositionX();\n player.position.y = wallSize + player.getRadius();\n }\n }", "private void setMapPos()\r\n {\r\n try\r\n {\r\n Thread.sleep(1000);//so that you can see players move\r\n }\r\n catch(Exception e){}\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int unitPos = 0;\r\n int firstX = 0;\r\n int firstY = 0;\r\n if (currentPlayer == 1)\r\n {\r\n unitPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n }\r\n if (currentPlayer == 2)\r\n {\r\n unitPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n }\r\n int tempX = unitPos % mapWidth;\r\n int tempY = unitPos - tempX;\r\n if (tempY == 0) {}\r\n else\r\n tempY = tempY / mapHeight;\r\n tempX = tempX - 11;\r\n tempY = tempY - 7;\r\n if (tempX >= 0)\r\n firstX = tempX;\r\n else\r\n firstX = tempX + mapWidth;\r\n if (tempY >= 0)\r\n firstY = tempY;\r\n else\r\n firstY = tempY + mapWidth;\r\n\r\n int drawWidth = worldPanel.getDrawWidth();\r\n int drawHeight = worldPanel.getDrawHeight();\r\n worldPanel.setNewXYPos(firstX, firstY);\r\n miniMap.setNewXY(firstX, firstY, drawWidth, drawHeight);\r\n }", "private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }", "public void reload() {\n\t\tpause();\n\t\tsetPosition(0);\n\t}", "public void syncPositionSilent() {\n MathUtil.setVector(this.syncAbsPos, this.liveAbsPos);\n this.syncYaw = this.liveYaw;\n this.syncPitch = this.livePitch;\n this.syncVel = this.liveVel;\n }", "private void returnPlayerHome(Player player_to_be_eaten)\n {\n player_to_be_eaten.setX_cordinate(player_to_be_eaten.getInitial_x());\n player_to_be_eaten.setY_cordinate(player_to_be_eaten.getInitial_y());\n player_to_be_eaten.setSteps_moved(0);\n }", "public void resetPlayer() {\n\t\thealth = 3;\n\t\tplayerSpeed = 5f;\n\t\tmultiBulletIsActive = false;\n\t\tspeedBulletIsActive = false;\n\t\tquickFireBulletIsActive = false;\n\t\tinvincipleTimer = 0;\n\t\txPosition = 230;\n\t}", "public static void movePlayerToStartingLocation(Map map) {\n movePlayer(map, 2, 2); // or instead of 0,0 you can select a different starting location\r\n }", "public void respawnPlayer() {\n \tboard.swapTile(board.getTile(player.getPos()), board.getTile(new Point(8,0)));\n player.setPlayerPos(new Point(8,0));\n resetAmmo();\n }", "public void ResetPlayer() {\n\t\tfor (int i = 0; i < moveOrder.length; i++) {\n\t\t\tmoves.add(moveOrder[i]);\n\t\t}\n\t\tthis.X = 0;\n\t\tthis.Y = 0;\n\t\tthis.movesMade = 0;\n\t\tthis.face = 1;\n\t}", "public void update() {\n\t\tgetLocation().offsetX(getDirection().getXOffset());\n\t\tgetLocation().offsetY(getDirection().getYOffset());\n\t\t\n\t\tChunk center = World.getMap().getCenterChunk();\n\t\t\n\t\tint localX = (int) (getLocation().getX() - center.getData().getRealX());\n\t\tint localY = (int) (getLocation().getY() - center.getData().getRealY());\n\t\t\n\t\tif(localX < 0 ||localY< 0\n\t\t\t|| localX > 256 || localY > 256) {\n\t\t\t\tWorld.getMap().load(getLocation());\n\t\t}\n\t}", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "public void resetPlayer() {\n\t\tthis.carrotCards = 65;\n\t\tthis.playerSpace = 0;\n\n\t}", "void setPlayerLocation(@Nonnull Location location);", "public void resetPosition() {\n\t\tposition = new double[3];\n\t\tgyroOffset = 0;\n\t}", "Rover(){\n\t\tthis.id = 0;\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t\tthis.orientation = Directions.NORTH;\n\t\tthis.mapW=this.defaultMapW;\n\t\tthis.mapH=this.defaultMapH;\n\t}", "public void resetPosition()\n {\n resetPosition(false);\n }", "public void moveToLastAcceptableLocation(){\n\t\tthis.x=this.xTemp;\n\t\tthis.y=this.yTemp;\n\t}", "private void moveToCurrentLocation() {\n \t\tGPSFilterLocationRetriever retriever = new GPSFilterLocationRetriever( new Criteria() );\n \t\tLocation loc = retriever.getLocation( this );\n \n \t\tif ( loc == null ) {\n \t\t\t// User turned off GPS, send it to device location settings.\n \t\t\tIntent i = new Intent( android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS );\n \t\t\tthis.startActivity( i );\n \t\t} else {\n \t\t\t// First move to the last known location..\n \t\t\tthis.moveCameraToLocation( loc, false );\n \n \t\t\t// Check if location fix is out dated, if it is, request a new location, ONCE.\n \t\t\tlong elapsedTime = System.currentTimeMillis() - loc.getTime();\n \t\t\tif ( elapsedTime > MAX_LOCATION_FIX_AGE ) {\n \t\t\t\t// Therefore, we request a single fix.\n \t\t\t\tretriever.requestSingleUpdate( this, new LocationAdapter() {\n \t\t\t\t\t@Override\n \t\t\t\t\tpublic void onLocationChanged( Location loc ) {\n \t\t\t\t\t\tmoveCameraToLocation( loc, true );\n \t\t\t\t\t}\n \t\t\t\t} );\n \t\t\t}\n \t\t}\n \t}", "public void resetPuck() {\n this.puck.setPosition(new Point(this.center_point));\n }", "public void setPlayerPosition() throws IOException\r\n\t{\r\n\t\tboolean flag = false;\r\n\t\t\r\n\t\tint X = 0;\r\n\t\tint Y = 0;\r\n\t\t\r\n\t\twhile(flag == false)\r\n\t\t{\r\n\t\t\toStream.writeInt(X);\r\n\t\t\toStream.writeInt(Y);\r\n\t\t\tflag = iStream.readBoolean();\r\n\t\t\tX++;\r\n\t\t\tY++;\r\n\t\t}\r\n\t\tboard.makePlayer(X-1, Y-1);\r\n\t}", "public void setStartingPosition(GameTile [][] visibleMap) {\r\n\t\t//method to set the starting position of our player.\r\n\t\tfor(int i=0; i<visibleMap.length; i++) {\r\n\t\t\tfor(int j=0; j<visibleMap[i].length; j++) {\r\n\t\t\t\tif(visibleMap[i][j] != null && visibleMap[i][j].hasPlayer()) {\r\n\t\t\t\t\tplayerX = i;\r\n\t\t\t\t\tplayerY = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setPlayerPosition(Player player) {\n\n if (player.getPosition().equals(\"Left Wing\")) {\n\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][0] == null) {\n forwardLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Center\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][1] == null) {\n forwardLines[i][1] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Wing\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][2] == null) {\n forwardLines[i][2] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Left Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][0] == null) {\n defenceLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][1] == null) {\n defenceLines[i][1] = player;\n break;\n }\n }\n }\n }", "public void reset(){\n x = originalX;\n y = originalY;\n dx = originalDX;\n dy = originalDY;\n }", "public void reset() {\n\t\tmCenterOfProjection = new Vector3f(0, 0, 15);\n\t\tmLookAtPoint = new Vector3f(0, 0, 0);\n\t\tmUpVector = new Vector3f(0, 1, 0);\n\t\tmCameraMatrix = new Matrix4f();\n\t\tthis.update();\n\t}", "@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}", "@Override\r\n public void updateMixer() {\n playerPosition = mixer.getGlobalCoordinates();\r\n playerOrientation = mixer.getGlobalOrientation();\r\n }", "private void changeCurrentPlayer() {\n switch (currentPlayer) {\n case 0: currentPlayer = 1;\n return;\n default: currentPlayer = 0;\n return;\n }\n }", "Location getPlayerLocation();", "public void resetPaddleToStartingPosition(){\n myRectangle.setX(initialXLocation);\n }", "private void ReplacePlayer()\n {\n String oldPlayer = GetPlayerString(mTeamsComboBox.getSelectedItem().toString(),\n mPositionComboBox.getSelectedItem().toString());\n if( oldPlayer == null )\n return;\n\n String newPlayer = GetPlayerString_UI();\n String team = mTeamsComboBox.getModel().getElementAt(mTeamsComboBox.getSelectedIndex()).toString();\n ReplacePlayer(team, oldPlayer, newPlayer);\n }", "public Builder clearPlayerLat() {\n \n playerLat_ = 0D;\n onChanged();\n return this;\n }", "public void setPlayerAtStart(Player player) {\n\t\tplayer.moveTo(start.getX()*10, start.getY()*10, start.getZ()*10);\n\t}", "public void changePlayerPixels() {\n //change the player point2pixels\n if (!playerFlag) {\n game.getPlayer().setPixels(convertor.gps2Pixels(game.getPlayer().getPoint()));\n Point3D point = new Point3D(game.getPlayer().getPixels()[0] , game.getPlayer().getPixels()[1]);\n GraphNode playerNode = new GraphNode(point);\n vertices.add(playerNode);\n\n }\n\n else {\n Point3D point = new Point3D(game.getPlayer().getPixels()[0] , game.getPlayer().getPixels()[1]);\n GraphNode playerNode = new GraphNode(point);\n vertices.add(playerNode);\n }\n\n playerFlag = true;\n\n }", "public void updatePlayerLocation() {requires new property on gamestate object\n //\n }", "public void teleportPlayer(int x, int y){\n hero.setX(x);\n hero.setY(y);\n }", "private void resetPlayer(int playerID) {\n\n\t\tif(getPlayerMap().get(playerID) != null){\n\t\t\tgetPlayerMap().get(playerID).setParticipating(false);\n\t\t\tgetPlayerMap().get(playerID).setCrashed(false);\n\t\t\tgetPlayerMap().get(playerID).setCurrentPosition(null);\n\t\t\tgetPlayerMap().get(playerID).setCurrentVelocity(null);\n\t\t}\n\t}", "public void resetPlayers() {\n Player curPlayer;\n for(int i = 0; i < players.size(); i++){\n curPlayer = players.peek();\n curPlayer.resetRole();\n curPlayer.setLocation(board.getSet(\"trailer\"));\n curPlayer.setAreaData(curPlayer.getLocation().getArea());\n view.setDie(curPlayer);\n players.add(players.remove());\n }\n\n }", "private void setupPlayerPosition() {\n\t\tHashMap<Suspect, Coordinates> startPositions = new HashMap<Suspect, Coordinates>();\r\n\t\tstartPositions.put(Suspect.KasandraScarlet, new Coordinates(18, 28));\r\n\t\tstartPositions.put(Suspect.JackMustard, new Coordinates(7, 28));\r\n\t\tstartPositions.put(Suspect.DianeWhite, new Coordinates(0, 19));\r\n\t\tstartPositions.put(Suspect.JacobGreen, new Coordinates(0, 9));\r\n\t\tstartPositions.put(Suspect.EleanorPeacock, new Coordinates(6, 0));\r\n\t\tstartPositions.put(Suspect.VictorPlum, new Coordinates(20, 0));\r\n\r\n\t\tfor (int i = 0; i < this.listOfPlayer.size(); i++) {\r\n\t\t\tPlayer p = this.listOfPlayer.get(i);\r\n\t\t\tSuspect sus = p.getSuspect().getData();\r\n\t\t\tboolean b = p.setCoord(startPositions.get(sus), this.grid);\r\n\t\t\t// should always be able to put character on starting position\r\n\t\t}\r\n\t\tSystem.out.println(\"Initial player starting positions set\");\r\n\t}", "private void movePlayer() {\r\n\t\tshipImageView.setX(ship.getCurrentLocation().x * scalingFactor);\r\n\t\tshipImageView.setY(ship.getCurrentLocation().y * scalingFactor);\r\n\t\tship.notifyObservers();\r\n\t}", "public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "private void resetLocation(Point newLocation) {\n\t\tif (newLocation.x < 0) {\n\t\t\tnewLocation.x = 0;\n\t\t}\n\n\t\tif (newLocation.y < 0) {\n\t\t\tnewLocation.y = 0;\n\t\t}\n\t}", "public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }", "void setPlayerLocation(Player p, int bp) {\n\t\t\tplayerLocationRepo.put(p, bp);\n\t\t}", "public void relocateToPoint(boolean isUserClick){\n// System.out.println(\"Scene x: \"+point.getX()+\", y: \"+point.getY());\n// System.out.println(\"Local x: \"+getParent().sceneToLocal(point).getX()+\", y: \"+getParent().sceneToLocal(point).getY());\n// System.out.println(\"Relocate x: \"+(getParent().sceneToLocal(point).getX() - (getWidth() / 2))+\", y: \"+(getParent().sceneToLocal(point).getY() - (getHeight() / 2)));\n// System.out.println(getBoundsInLocal().getWidth());\n// System.out.println(widthProperty());\n\n if (isUserClick) {\n double new_x=getParent().sceneToLocal(x,y).getX();\n double new_y=getParent().sceneToLocal(x,y).getY();\n setX(new_x);\n setY(new_y);\n relocate(\n// (getParent().sceneToLocal(x,y).getX() - (widthCountry / 2)),\n// (getParent().sceneToLocal(x,y).getY() - (heightCountry / 2))\n new_x,new_y\n );\n } else {\n relocate(x,y);\n }\n\n\n }", "private void setOrigin() {\n Hep3Vector origin = VecOp.mult(CoordinateTransformations.getMatrix(), _sensor.getGeometry().getPosition());\n // transform to p-side\n Polygon3D psidePlane = this.getPsidePlane();\n Translation3D transformToPside = new Translation3D(VecOp.mult(-1 * psidePlane.getDistance(),\n psidePlane.getNormal()));\n this._org = transformToPside.translated(origin);\n }", "void gettingBackToInitial(){\n robot.setDrivetrainPosition(-hittingMineralDistance, \"translation\", 1.0);\n }", "public void resetWorld(){\r\n\t\tSystem.out.println(\"Resetting world\");\r\n\t\tengine.removeAllEntities();\r\n\t\tlvlFactory.resetWorld();\r\n\t\t\r\n\t\tplayer = lvlFactory.createPlayer(cam);\r\n\t\tlvlFactory.createFloor();\r\n lvlFactory.createWaterFloor();\r\n \r\n int wallWidth = (int) (1*RenderingSystem.PPM);\r\n int wallHeight = (int) (60*RenderingSystem.PPM);\r\n TextureRegion wallRegion = DFUtils.makeTextureRegion(wallWidth, wallHeight, \"222222FF\");\r\n lvlFactory.createWalls(wallRegion); //TODO make some damn images for this stuff \r\n \r\n // reset controller controls (fixes bug where controller stuck on directrion if died in that position)\r\n controller.left = false;\r\n controller.right = false;\r\n controller.up = false;\r\n controller.down = false;\r\n controller.isMouse1Down = false;\r\n controller.isMouse2Down = false;\r\n controller.isMouse3Down = false;\r\n\t\t\r\n\t}", "private void resetRayo() {\n rayo.setX(getWidth() / 2 - 10);\n rayo.setY(getHeight() - player.getHeight() - 50);\n }", "public abstract void changePlayerAt(ShortPoint2D pos, Player player);", "void playerPositionChanged(Player player);", "@Override\n\tpublic void resetLocation() {\n\t\t\n\t}", "public void reset() {\n\t\t//reset player to 0\n\t\tplayer = 0;\n\t\t\n\t\tfor(int row = size - 1; row >= 0; row --)\n\t\t\tfor(int col = 0; col < size; col ++)\n\t\t\t\tfor(int dep = 0; dep < size; dep ++)\n\t\t\t\t\t//goes through all board positions and sets to -1\n\t\t\t\t\tboard[row][col][dep] = -1;\n\t}", "public static void restartPositions() {\r\n\t\tnew GameStats();\r\n\t\tMain.initPlayers();\r\n\t\tif (CustomizeFrame.getInstance() != null) {\r\n\t\t\t((Player) GameStats.getPlayers().get(0)).setCustomGraphics(64, 64);// set default custom\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// graphics\r\n\t\t}\r\n\t}", "void restoreBefore() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapBefore);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapBefore);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceBefore);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsBefore);\r\n\t\t}", "private void restoreCurrentLocation(){\n if(globalCurrentLocation==null){\n return;\n }\n if(currentLocation==null){\n Bitmap icon = ((BitmapDrawable)userImage.getDrawable()).getBitmap();\n Bitmap smallIcon = Bitmap.createScaledBitmap(icon,100,100,false);//Sony xperia mini 40x40\n MarkerOptions markerOptions = new MarkerOptions().position(globalCurrentLocation).title(\"Me\").icon(BitmapDescriptorFactory.fromBitmap(smallIcon));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(globalCurrentLocation,15));\n\n currentLocation = mMap.addMarker(markerOptions);\n markerOnClick.put(currentLocation,new MyMarker(user.getId(),true));\n }\n }", "public void adjLocation(double l){this.PlayerLocation;}", "public void update() {\n\t\tfinal StarSystem oldLocation = getPlayer().getLocation();\n\t\tfinal StarSystem newLocation = getChart().getSelected();\n\t\tgetPlayer().setLocation(newLocation);\n\t\tgetPlayer().setFuel(-oldLocation.distanceToStarSystem(newLocation));\n\t\tgetChart().setSelected(null);\n\t\tgetChart().repaint();\n\t\tplanetLbl.setText(\"Current Location: \" + player.getLocation().getName()\n\t\t\t\t+ \"....Tech Level: \" + player.getLocation().getTechLevel());\n\n\t}", "public void movePlayer(String nomeArq, int px, int py) {\r\n if(Main.player1.Vez()) {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)){\r\n \tMain.player1.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player1.MudaLado(false,true);\r\n } \r\n pos = Main.player1.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0.1;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false) {\r\n \tMain.player1.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player1.Size()[0],Main.player1.Size()[1])==false)\r\n {\r\n \tMain.player1.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n Main.Fase.repinta(); \r\n }\r\n else {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)) {\r\n \tMain.player2.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player2.MudaLado(false,true);\r\n } \r\n pos = Main.player2.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false) {\r\n \tMain.player2.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false)\r\n {\r\n \tMain.player2.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n }\r\n }", "public void restore() {\r\n for (int i = 0; i < 24; i++) {\r\n int staticLevel = getStaticLevel(i);\r\n setLevel(i, staticLevel);\r\n }\r\n if (entity instanceof Player) {\r\n ((Player) entity).getActionSender().sendSound(new Audio(2674));\r\n }\r\n rechargePrayerPoints();\r\n }", "void ship_respawn() {\n ship.resetPosition();\n ship_image_view.setX(ship.x_position); // Update the ship image position\n }", "public static void changePlayer() {\n\t\tvariableReset();\n\t\tif (curPlayer == 1)\n\t\t\tcurPlayer = player2;\n\t\telse\n\t\t\tcurPlayer = player1;\n\t}", "public void putPlayerAtStart() {\n // put the player on the ground\n player.putOn(ground1); \n player.move(new Vec2(-90, 0));\n }", "private void playerMoveUp()\n {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(false);\n this.setCurrentY(this.getCurrentY() - 1);\n if (this.getCurrentY() > -1) {\n if (!nextIsWall()) {\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } else {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n }\n } else// hit edge redo setlocation\n {\n this.setCurrentY(this.getCurrentY() + 1);\n this.getCurrentLevel().getInLevelLocation()[this.getCurrentX()][this.getCurrentY()].setHasPlayer(true);\n } \n }", "public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }", "private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }", "public void updatePosition() {\n\n this.x = this.temp_x;\n this.y = this.temp_y;\n this.ax = 0;\n this.ay = 0;\n\t\tthis.axplusone = 0;\n this.ayplusone = 0;\n \n }", "private void recenter(PlayerMapObjectInterface target) {\n\n\t}", "public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\n }", "public void setToOriginals(){\n\t\t//set all occupied nodes as empty\n\t\tif(nodeStatus == Status.occupied){\n\t\t\tsetAsEmpty();\n\t\t}\n\t\t//if the node had a unit end on it, reset that value\n\t\tif(ended == true){\n\t\t\tended=false;\n\t\t}\n\t\tf=0;\n\t\tg=0;\n\t\th=0;\n\t}", "MazePoint getActivePlayerCoordinates();", "public void setPlayer(Player player) {\n this.currentPlayer = player;\n }", "public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }", "public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }", "public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t\tplayer.resetAllPlayerGuesses();\n\t}", "void resetLocal();", "public void enterPlayerView(){\n\t\tplayerSeen=true;\r\n\t\tplayerMapped=true;\r\n\t}", "public void resetCoordinates(){\n pos=0;\n if(this.pIndex<2){\n this.coordinates[0]=TILE_SIZE*15-DICE_SIZE;}\n else{\n this.coordinates[0]=0;}\n if(this.pIndex%3==0){\n this.coordinates[1]=0;}\n else{\n this.coordinates[1]=TILE_SIZE*15-DICE_SIZE;} \n }", "public void snapToGrid(Player pl) {\n\t\t// Find the closest spot\n\t\t\n\t\tif(pl.getVelocity().x == 0 && pl.getLocation().x - 2 % 16 != 0)\n\t\t{\n\t\t\tfloat locationX = Math.round(pl.getLocation().x / 16f);\n\t\t\tfloat preferredX = (locationX * 16) + 2f;\n\t\t\t\n\t\t\tfloat move = preferredX - pl.getLocation().x;\n\t\t\tif(Math.abs(move) > 0.1f)\n\t\t\t\tmove = 0.1f * Math.signum(move);\n\t\t\tpl.getLocation().x += move;\n\t\t}\n\t\t\n\t\tif(pl.getVelocity().y == 0 && pl.getLocation().y - 2 % 16 != 0)\n\t\t{\n\t\t\tfloat locationY = Math.round(pl.getLocation().y / 16f);\n\t\t\tfloat preferredY = (locationY * 16) + 2f;\n\t\t\t\n\t\t\tfloat move = preferredY - pl.getLocation().y;\n\t\t\tif(Math.abs(move) > 0.1f)\n\t\t\t\tmove = 0.1f * Math.signum(move);\n\t\t\tpl.getLocation().y += move;\n\t\t}\n\t\t\n\t}", "public void reassignAllAgents() {\n\t\tPoint safePosition = null;\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\tsafePosition = getSafeTeleportPosition();\n\t\t\t\tp.setPosition(safePosition);\n\t\t\t\toccupiedPositions.add(safePosition);\n\t\t\t}\n\t\t}\n\t}", "public void resetRobotPositionOnUI() {\r\n\t\tthis.x = checkValidX(1);\r\n\t\tthis.y = checkValidY(1);\r\n\t\ttoggleValid();\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t\t\r\n\t}", "public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }", "public void setLocalEID() {\n localPlayer.eid = LOCAL_PLAYER_EID;\n addEntity(localPlayer);\n }", "public void reset() {\n\t\txD = x;\n\t\tyD = y;\n\t\taction = 0;\n\t\tdir2 = dir;\n\t\tvisibleToEnemy = false;\n\t\tselected = false;\n\t\t\n\t\tif (UNIT_R == true) {\n\t\t\t// dir = 0;\n\t\t} else if (UNIT_G == true) {\n\t\t\t// dir = 180 / 2 / 3.14;\n\t\t}\n\t}", "public void resetPose() {\n }", "public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}", "@Override\n protected void onPause() {\n currentPosition = player.getCurrentPosition();\n player.pause();\n super.onPause();\n }", "public void refreshPosition() {\n\n this.setTransform(getTransform());\n }", "public void setPlayerPosition(CellView playerPosition) {\n this.playerPosition = playerPosition;\n }", "public int getCurrentPlayerRealPosition();", "public void restoreCamera() {\r\n float mod=1f/10f;\r\n p.camera(width/2.0f, height/2.0f, cameraZ,\r\n width/2.0f, height/2.0f, 0, 0, 1, 0);\r\n p.frustum(-(width/2)*mod, (width/2)*mod,\r\n -(height/2)*mod, (height/2)*mod,\r\n cameraZ*mod, 10000);\r\n }", "private void resetTankPoint() {\n\t\tmodifyMapStatus(0);// release the point where tank occupies\n\t\tif (direction == UP) {\n\t\t\tthis.centerPoint.setY(centerPoint.getY() - speed);\n\t\t} else if (direction == DOWN) {\n\t\t\tthis.centerPoint.setY(centerPoint.getY() + speed);\n\t\t} else if (direction == LEFT) {\n\t\t\tthis.centerPoint.setX(centerPoint.getX() - speed);\n\t\t} else if (direction == RIGHT) {\n\t\t\tthis.centerPoint.setX(centerPoint.getX() + speed);\n\t\t}\n\t\tresetFrontPoint();\n\t\tmodifyMapStatus(1);\n\t}", "public void move(){\n super.move();\n load.updateCoordinates(this.x,this.y);\n }", "PositionedObject(){\n float x = DrawingHelper.getGameViewWidth()/2;\n float y = DrawingHelper.getGameViewHeight()/2;\n _position.set(x,y);\n }", "private void setWorldCoordinatesFromFields() {\n if (trackerPanel == null) return;\n OffsetOriginStep step = (OffsetOriginStep) getStep(trackerPanel.getFrameNumber());\n boolean different = step.worldX != xField.getValue() || step.worldY != yField.getValue();\n if (different) {\n XMLControl trackControl = new XMLControlElement(this);\n XMLControl coordsControl = new XMLControlElement(trackerPanel.getCoords());\n step.setWorldXY(xField.getValue(), yField.getValue());\n step.getPosition().showCoordinates(trackerPanel);\n Undo.postTrackAndCoordsEdit(this, trackControl, coordsControl);\n }\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 }" ]
[ "0.7171928", "0.64130265", "0.62364316", "0.62139714", "0.61948955", "0.6174966", "0.61611915", "0.6089986", "0.6071915", "0.59919304", "0.5929186", "0.5896702", "0.5831877", "0.58233523", "0.58013684", "0.57967514", "0.5787401", "0.5784109", "0.57670385", "0.5747541", "0.57304", "0.57224584", "0.57223177", "0.57213897", "0.5714948", "0.570276", "0.56948704", "0.56726944", "0.5670621", "0.56656355", "0.56631744", "0.56440645", "0.5640552", "0.5628196", "0.56281286", "0.562348", "0.56233233", "0.5619106", "0.5591866", "0.5591224", "0.5577417", "0.55722266", "0.55716884", "0.55715656", "0.5561316", "0.555932", "0.55480283", "0.5541891", "0.5534367", "0.55321485", "0.55296326", "0.55183524", "0.55182964", "0.5516376", "0.5514678", "0.5496331", "0.5486395", "0.5480749", "0.5475707", "0.54742545", "0.5466525", "0.54641056", "0.54620606", "0.5458888", "0.5450683", "0.5445042", "0.5444775", "0.5441786", "0.5432238", "0.5431241", "0.5425373", "0.5420133", "0.54152566", "0.5412005", "0.54065794", "0.54064673", "0.5403416", "0.5397412", "0.5391013", "0.5383424", "0.5376652", "0.5374309", "0.53720105", "0.5361923", "0.53603476", "0.53598475", "0.53593665", "0.535622", "0.53554964", "0.53494066", "0.5344986", "0.5335874", "0.5332849", "0.5330877", "0.5330165", "0.5329953", "0.5329235", "0.53241056", "0.5319358", "0.5317442", "0.53107685" ]
0.0
-1
HashTable and MySet change together
@Before public void test_change(){ HashTable<String,String> table = new HashTable<>(1); MySet<String> s = (MySet<String>) table.keySet(); table.put("AA","BB"); table.put("AA","CC"); assertTrue(s.contains("AA")); table.remove("AA"); assertFalse(s.contains("AA")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo30185a(HashSet<zzawj> hashSet);", "HSet entrySet();", "protected void rehash( )\r\n\t{\r\n\t\tint newSize = nextPrime(this.tableSize*2);\r\n\t\tMyHashTable<T> newHashTable = new MyHashTable<T>(newSize);\r\n\t\tIterator<T> thisTableIter = this.iterator();\r\n\t\twhile(thisTableIter.hasNext())\r\n\t\t{\r\n\t\t\tT e = thisTableIter.next();\r\n\t\t\tnewHashTable.insert(e);\r\n\t\t}\r\n\t\tthis.clear();\r\n\t\tthis.size = newHashTable.size;\r\n\t\tthis.tableSize = newHashTable.tableSize;\r\n\t\tthis.table = newHashTable.table;\r\n\t}", "HSet keySet();", "private void rehash() {\r\n Entry[] oldHashTable = this.hashTable;\r\n this.capacity = this.capacity * 2;\r\n this.hashTable = new Entry[this.capacity];\r\n this.size = 0;\r\n for (Entry eachEntry : oldHashTable) {\r\n if (eachEntry != null) {\r\n if (!eachEntry.isDeleted) {\r\n this.add((K)eachEntry.key,(V)eachEntry.value);\r\n }\r\n }\r\n }\r\n return;\r\n }", "private void rehash(){\n\t\tHashTable that = new HashTable(2 * this.table.length);\n\t\tfor (int i = 0; i < this.table.length; i++){\n\t\t\tif (this.table[i] != null){\n\t\t\t\tthat.addRecord(this.table[i].getValue());\n\t\t\t}\n\t\t}\n\t\tthis.table = that.table;\n\t\treturn;\n\t}", "private void rehash() {\n LinkedList<Entry<K,V>>[] oldTable = table;\n table = new LinkedList[oldTable.length * 2 + 1];\n numKeys = 0;\n for (LinkedList<Entry<K, V>> list : oldTable) {\n if (list != null) {\n for (Entry<K,V> entry : list) {\n put(entry.getKey(), entry.getValue());\n numKeys++;\n }\n }\n }\n }", "@Test\n\tpublic void testAddHash() {\n\t\t// add a new method for ordering\n\t\tMySet <String> s = loadSet();\n\t\ts.add(\"Alice\");\n\t\ts.add(\"Sue\");\n\t\ts.add(\"Bob\");\n\t\ts.add(\"Cindy\");\n\t\ts.add(\"Joe\");\n\t\t\n\t\tassertEquals(5, ((MyHashSet<String>)s).map.size());\n\t\t\n\t\t\t\n\t}", "public InternalWorkingOfHashSet() {\r\n map = new HashMap<>();\r\n }", "private void rehash() {\n Entry<K, V>[] old = table;\n allocate((int) (old.length * INC));\n\n for (int i = 0; i < old.length; ++i) {\n if (old[i] != null) {\n for (Node<Pair<K, V>> j = old[i].list.getHead().getNext();\n j != old[i].list.getTail();\n j = j.getNext()) {\n put(j.getData().key, j.getData().value);\n }\n\n }\n }\n }", "public HashMultiSet() {\n\t\thMap = new HashMap<T, Integer>();\n\t\tsize = 0;\n\t}", "public void HashsetBasicExanple() {\n\t\t\n\t\tHashSet<String> hs = new HashSet<String>();\n\t\ths.add(\"Sudha\");\n\t\ths.add(\"Yog\");\n\t\ths.add(\"Sathya\");\n\t\ths.add(\"Sadhana\");\n\t\ths.add(null);\n\t\ths.add(\"Aadhav\");\n\t\ths.add(\"Yog\");\n\t\t\n\t\t//Insertion order is not mainted and duplicate value is not allowed.\n\t\tSystem.out.println(hs);//[Yog, null, Sudha, Sathya, Aadhav, Sadhana]\n\t\t\n\t\tSystem.out.println(hs.contains(null));//true\n\t\t\n\t\ths.remove(null);\n\t\tSystem.out.println(hs);//[Yog, Sudha, Sathya, Aadhav, Sadhana]\n\t\t\n\t\tHashSet<String> hs1 = new HashSet<String>();\n\t\ths1.add(\"a\");\n\t\ths1.add(\"b\");\n\t\ths1.add(\"c\");\n\t\ths1.add(\"e\");\n\t\tSystem.out.println(hs1);//[a, b, c, e]\n\t\t\n\t\ths.addAll(hs1);\n\t\tSystem.out.println(hs);//[Yog, a, b, Sudha, c, Sathya, e, Aadhav, Sadhana]\n\t\t\n\t\tSystem.out.println(hs.containsAll(hs1));//true\n\t\t\n\t\t\n\t\t//Iterator using iterator\n\t\t\n\t\tIterator<String> iterator = hs.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\tSystem.out.println(\"Iterate using Iterator \" + iterator.next());\t\n\t\t}\n\t}", "protected void rehash() {\n // TODO: fill this in.\n //double number of maps, k, each time it is called\n\t\t//use MyBetterMap.makeMaps and MyLinearMap.getEntries\n\t\t//collect entries in the table, resize the table, then put the entries back in\n\t\tList<MyLinearMap<K, V>> newmaps = MyBetterMap.makeMaps(maps.size()*2);\n\t\tfor(MyLinearMap<K, V> curr: this.maps) {\n\t\t\tfor(Entry ent: MyLinearMap.getEntries()) {\n\t\t\t\tnewmaps.put(ent.key, ent.value);\n\t\t\t}\n\t\t}\n\t\tthis.maps = newmaps;\n\t\treturn;\n\t}", "public void rehash() {\n\t\tArrayList<Node<MapPair<K, V>>> temp=buckets;\n\t\tbuckets=new ArrayList<>();\n\t\tfor(int i=0;i<2*temp.size();i++)\n\t\t{\n\t\t\tbuckets.add(null);\n\t\t}\n\t\tfor(Node<MapPair<K, V>> node:temp)\n\t\t{\n\t\t\tif(node!=null)\n\t\t\t{\n\t\t\t\twhile(node!=null)\n\t\t\t\t{\n\t\t\t\t\tput(node.data.key,node.data.value);\n\t\t\t\t\tnode=node.next;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void rehash()\r\n\t{\r\n\t\tint M = table.length;\r\n\t\tMapEntry<K, V>[] origTable = table; // save original\r\n\t\t\r\n\t\t//new table\r\n\t\ttable = new MapEntry[2*M + 1];\r\n\t\tcount = 0;\r\n\t\tmaxCount = table.length - table.length/3;\r\n\t\t\r\n\t\tfor (MapEntry<K, V> oe : origTable)\r\n\t\t{\r\n\t\t\tMapEntry<K, V> e = oe;\r\n\t\t\tif (e != null && e != DUMMY) // No need to rehash dummy\r\n\t\t\t{\r\n\t\t\t\tint slot = findSlot(e.getKey(), true);\r\n\t\t\t\ttable[slot] = e;\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void rehash() {\r\n\t\tSystem.out.println( \"rehashing : buckets \" + numBuckets + \" size \" + size );\r\n\t\tArrayList<MapNode<K, V>> temp = buckets;\r\n\t\tbuckets = new ArrayList();\r\n\t\tfor( int i = 0; i < 2*numBuckets; i++ ) {\r\n\t\t\tbuckets.add( null );\r\n\t\t}\r\n\t\tsize = 0; //size 0 means abi ek b element nhi h\r\n\t\tnumBuckets *= 2; //ab number of buckets double ho gya h\r\n\t\t//now we will trvrs old arraylist and linkedlist and\r\n\t\t//copy is elemenet one by one\r\n\t\tfor( int i = 0; i < temp.size(); i++ ) {\r\n\t\t\tMapNode< K, V > head = temp.get(i);\r\n\t\t\twhile( head != null ) {\r\n\t\t\t\t\r\n\t\t\t\tK key = head.key;\r\n\t\t\t\tV value = head.value;\r\n\t\t\t\tinsert( key, value );\r\n\t\t\t\thead = head.next;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void rehash() {\r\n // Save a reference to origTable\r\n LinkedList<Entry<K,V>>[] origTable = mainTable;\r\n // Double capacity of this mainTable\r\n mainTable = new LinkedList[2 * origTable.length + 1];\r\n\r\n // Reinsert all items in origTable into expanded mainTable.\r\n numberOfKeys = 0;\r\n for (int i = 0; i < origTable.length; i++) {\r\n if (origTable[i] != null) {\r\n for (Entry<K,V> nextEntry : origTable[i]) {\r\n // Insert entry in expanded mainTable\r\n insert(nextEntry.key, nextEntry.value);\r\n }\r\n }\r\n }\r\n }", "public HashMultiSet() {\r\n\t\tbaseMap = new HashMap<>();\r\n\t}", "public static void main(String[] args)\n {\n\n HastTable<String> wordset = new HastTable<>();\n wordset.add(\"green\");\n wordset.add(\"green\");\n wordset.add(\"green\");\n wordset.add(\"green\");\n wordset.add(\"green\");\n wordset.add(\"green\");\n wordset.add(\"green\");\n// wordset.add(\"pink\");\n// wordset.add(\"yellow\");\n// wordset.add(\"purple\");\n// wordset.add(\"red\");\n// wordset.add(\"black\");\n\n System.out.println(\"Before reshash(): \" + wordset.toString());\n\n wordset.add(\"purple\");\n wordset.add(\"orange\");\n\n System.out.println(\" After reshash(): \" + wordset.toString());\n System.out.println(\"remove(red): \" + wordset.remove(\"red\"));\n System.out.println(\"size(): \" + wordset.size());\n\n for (String word: wordset)\n {\n System.out.println(word);\n //wordset.remove(\"pink\");\n }\n\n\n HastTable<Integer> intSet = new HastTable<>();\n intSet.add(13);\n intSet.add(1);\n intSet.add(14);\n intSet.add(18);\n // intSet.add(13);\n intSet.add(59);\n intSet.add(44);\n System.out.println(\"Before reshash(): \" + intSet.toString());\n\n intSet.add(12);\n intSet.add(85);\n // intSet.add(55);\n // intSet.add(78);\n // intSet.add(71);\n // intSet.add(16);\n\n// intSet.add(9);\n// intSet.add(34);\n System.out.println(\"After reshash(): \" + intSet.toString());\n\n\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\t\tprivate void rehash() {\r\n\t\t\t// double size of array\r\n\t\t\tTableElement<K, V>[] NewDictionary = (TableElement<K, V>[]) new TableElement[dictionary.length * 2];\r\n\r\n\t\t\tcurrentCapacity = dictionary.length * 2;\r\n\r\n\t\t\t// re-mod the keys to get new hash\r\n\t\t\tfor (int i = 0; i < dictionary.length; i++) {\r\n\t\t\t\tif (dictionary[i] != null) {\r\n\t\t\t\t\tint newHash = (Math.abs(dictionary[i].getKey().hashCode()) % currentCapacity);\r\n\r\n\t\t\t\t\t// put re-hashed keys into new array\r\n\t\t\t\t\twhile (NewDictionary[newHash] != null) {\r\n\t\t\t\t\t\tint probe = getProbed(newHash);\r\n\t\t\t\t\t\tnewHash = (newHash + probe) % currentCapacity;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tTableElement element = dictionary[i];\r\n\t\t\t\t\tNewDictionary[newHash] = element;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// set old dictionary to new dictionary\r\n\t\t\tthis.dictionary = NewDictionary;\r\n\t\t}", "protected void rehash() {\n int oldCapacity = table.length;\n ServerDescEntry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n ServerDescEntry newMap[] = new ServerDescEntry[newCapacity];\n\n threshold = (int)(newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity ; i-- > 0 ;) {\n for (ServerDescEntry old = oldMap[i] ; old != null ; ) {\n ServerDescEntry e = old;\n old = old.next;\n\n int index = (e.desc.sid & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\n }\n }", "public AbstractHashSet() {\n\t\tmap = new DelegateAbstractHashMap(this);\n\t}", "public void rehash(){\n //creates a new temporary hashtable since arrays are immutable\n LLNodeHash[] temp = hashTable;\n //doubles the size of the current hashtable\n hashTable = new LLNodeHash[hashTable.length * 2];\n for (int i = 0; i < temp.length; i++){\n //if the index of the array has an element\n if (temp[i] != null){\n LLNodeHash ptr = temp[i];\n //traverse the linked list and adds each word back to the new hashtable incase they have a new position\n while (ptr.getNext() != null){\n LLNodeHash word = new LLNodeHash(ptr.getKey(), ptr.getFreq(), null);\n add(word);\n ptr = ptr.getNext();\n }\n //adds the last element to the new hashtable\n LLNodeHash word = new LLNodeHash(ptr.getKey(), ptr.getFreq(), null);\n add(word);\n }\n }\n }", "public MyHashSet() {\n hset = new boolean[bucket][]; //get the second array size only if it is required : space conservation if possible\n }", "void setHashMap();", "private void rehash( )\n {\n HashEntry<AnyType> [ ] oldArray = array;\n\n // Create a new double-sized, empty table\n allocateArray( 2 * oldArray.length );\n occupied = 0;\n theSize = 0;\n\n // Copy table over\n for( HashEntry<AnyType> entry : oldArray )\n if( entry != null) {\n \tput(entry.key, entry.value);\n }\n }", "private void setKeySet(OwnSet<K> st){\n this.keySet = st; \n }", "private void rehashing(boolean increase){\r\n int newLength;\r\n // if loadFactor is too big. //\r\n if (increase){\r\n newLength = capacity()*CAPACITY_CHANGE;\r\n }\r\n // if loadFactor is too small. //\r\n else{newLength = capacity()/CAPACITY_CHANGE;}\r\n // builds the new hashSet with the new capacity. //\r\n ClosedHashCell[] newHashSet = new ClosedHashCell[newLength];\r\n buildHashSet(newLength, newHashSet);\r\n for (ClosedHashCell cell : hashSet){\r\n if (cell.getValue() != null) {\r\n int j = 0;\r\n int clamping = (cell.getValue().hashCode() + (j+j*j) / 2) & (newLength - 1);\r\n while (!newHashSet[clamping].addMe(cell.getValue())) {\r\n j++;\r\n clamping = (cell.getValue().hashCode() + (j+j*j) / 2) & (newLength - 1);\r\n }\r\n }\r\n }\r\n hashSet = newHashSet;\r\n }", "public MySet(int size) {\n table = (HashNode<E>[]) new HashNode[size];\n }", "private void rehash() {\n\t HashEntry[] oldArray = array;\n\n\t // Create a new double-sized, empty table\n\t allocateArray(2 * oldArray.length);\n\t occupied = 0;\n\t theSize = 0;\n\n\t // Copy table over\n\t for (HashEntry entry : oldArray) {\n\t if (entry != null && entry.isActive)\n\t add(entry.element);\n\t }\n\t }", "@Override \n int hashCode();", "public HashMultiSet() {\n\t\tmultiSet = new HashMap<>();\n\t}", "protected static void rehash() \r\n\t{\r\n\t\tEntry\told, e;\r\n\t\tint\t\ti, index;\r\n\r\n\t\tEntry\toldMap[] = m_table;\r\n\t\tint\t\toldCapacity = oldMap.length;\r\n\r\n\t\tint newCapacity = oldCapacity * 2 + 1;\r\n\t\tEntry newMap[] = new Entry[newCapacity];\r\n\r\n\t\tm_threshold = (int)(newCapacity * m_loadFactor);\r\n\t\tm_table = newMap;\r\n\r\n\t\tfor (i = oldCapacity ; i-- > 0 ;) {\r\n\t\t\tfor (old = oldMap[i] ; old != null ; ) {\r\n\t\t\t\te = old;\r\n\t\t\t\told = old.m_next;\r\n\r\n\t\t\t\tindex = (e.m_name.hashCode() & 0x7FFFFFFF) % newCapacity;\r\n\t\t\t\te.m_next = newMap[index];\r\n\t\t\t\tnewMap[index] = e;\r\n\t\t\t}\r\n\t\t}\r\n }", "protected void rehash() {\n int oldCapacity = table.length;\n Entry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n Entry newMap[] = new Entry[newCapacity];\n\n threshold = (int) (newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity; i-- > 0; ) {\n for (Entry old = oldMap[i]; old != null; ) {\n Entry e = old;\n old = old.next;\n\n int index = (e.key & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\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 }", "public static void main(String[] args) {\n\t\tSet<Puppy> set = new LinkedHashSet<Puppy>(10);\n\t\t\n\t\t// this DS which can hold other object\n\t\tPuppy puppy1=new Puppy(\"Tommy\",10 );\n\t\tPuppy puppy2=new Puppy(\"AHH\", 12);\n\t\tPuppy puppy3=new Puppy(\"MYY\", 5);\n\t\tPuppy puppy4=new Puppy(\"NANY\", 3);\n\t\tPuppy puppy5=new Puppy(\"NANY\", 3);\n\t\t\n\t\t//dog4 and dog5 are duplicate elements\n\t\tset.add(puppy1);\n\t\tset.add(puppy2);\n\t\tset.add(puppy3);\n\t\tset.add(puppy4);\n\t\tset.add(puppy5);\n\t\t\n\t\tSystem.out.println(\"puppy4 . hashCode () = \"+puppy4.hashCode());\n\t\tSystem.out.println(\"puppy5 . hashCode () = \"+puppy5.hashCode());\n\t\t\n\t\tIterator<Puppy> iterator=set.iterator();\n\t\t\n\t\tSystem.out.println(\"Accessing data using Iterator interface!\");\n\t\twhile(iterator.hasNext()){\n\t\t\tPuppy puppy=iterator.next();\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"____________-----\");\n\t\tfor(Puppy puppy:set){\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\tPuppy puppy6=new Puppy(\"NANY\", 3);\n\t\t\n\t\tboolean b=set.contains(puppy6);\n\t\tif(b){\n\t\t\tSystem.out.println(\"puppy6 found in set!\"+puppy6);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Run it\");\n\t\t /* final Entry<K,V> getEntry(Object key) {\n\t\t int hash = (key == null) ? 0 : hash(key.hashCode());\n\t\t for (Entry<K,V> e = table[indexFor(hash, table.length)];\n\t\t e != null;\n\t\t e = e.next) {\n\t\t Object k;\n\t\t if (e.hash == hash &&\n\t\t ((k = e.key) == key || (key != null && key.equals(k))))\n\t\t return e;\n\t\t }\n\t\t return null;\n\t\t } */\n\t\t b=set.contains(puppy1);\n\t\tif(b){\n\t\t\tSystem.out.println(b+\"is found in set!\");\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n Set<Integer> S1 = new TreeSet<>();\r\n // add objects\r\n S1.add(65); S1.add(36); S1.add(24); S1.add(36);\r\n \r\n // show the content and assert they are sorted and no duplications\r\n System.out.println(\"set = \" + S1); \r\n //remove elements\r\n S1.remove(36); S1.remove(24);\r\n System.out.println(S1); //assert set = 65\r\n S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80\r\n System.out.println(\"set = \" +S1); //assert set = 15, 24, 65, 80\r\n \r\n System.out.println(\"Does S1 contain 10?\"\r\n + S1.contains(10)); // assert false\r\n System.out.println(\"S1 has \" + S1.size() +\" objects\"); // assert 4\r\n\r\n // create another Set object implemented using HashSet\r\n Set<Integer> S2 = new HashSet<>();\r\n // add all objects in S1 to S2\r\n S2.addAll(S1);\r\n System.out.println(\"hashset = \" +S2); //assert they may not be ordered\r\n\r\n // create another Set object implemented using LinkedHashSet\r\n Set<Integer> S3 = new LinkedHashSet<>();\r\n S3.add(150); // add 150\r\n S3.addAll(S1);// add all objects in S1 to S2\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[150,15,24,65,80]\r\n \r\n S3.removeAll(S3); // remove all items\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[]\r\n }", "Set<Node<K, V>> entrySet();", "public MyHashSet() {\n s = new ArrayList<>();\n }", "public RandomizedSet() {\n\n\n sub =new ArrayList<Integer>();\n hm=new HashMap<Integer,Integer>();\n rand =new Random();\n\n }", "@Test(expected = Exception.class)\n public void test() throws Exception {\n\n new HashMap<>();\n MyHashTable2 mp = new MyHashTable2();\n mp.put(\"prem\",7);\n mp.put(\"radha\",72);\n mp.put(\"geeta\",74);\n mp.put(\"sunita\",76);\n mp.put(\"atul\",87);\n mp.put(\"rakesh\",37);\n mp.put(\"aklesh\",72);\n\n // try to add duplicate keys and test exception\n mp.put(\"aklesh\",72);\n\n\n assert 7 == mp.get(\"prem\");\n assert 72 == mp.get(\"aklesh\");\n assert 87 == mp.get(\"atul\");\n assert null == mp.get(\"noting\");\n\n System.out.println(mp.getKeySet());\n\n mp.prettyPrint();\n }", "private void rehash(int newCap) {\n System.out.println(\"ARGHHHH\");\n // make a new table of the new size, then iterate over the old\n // table and reinsert each entry.\n var oldTable = table;\n clear(newCap);\n for (var e : oldTable) {\n // skip nulls and tombstones.\n if (e != null) {\n this.bubbaPut(e.key, e.value);\n }\n }\n }", "public AbstractHashSet(Collection c) {\n\t\tmap = new DelegateAbstractHashMap(Math.max((int) (c.size() / .75f) + 1,\n\t\t\t\t16), this);\n\t\taddAll(c);\n\t}", "public DelegateAbstractHashMap(AbstractHashSet set) {\n\t\t\tsuper();\n\t\t\tthis.set = set;\n\t\t}", "public MyHashSet() {\n \n }", "@Override\n int hashCode();", "public RandomizedSet() {\n data = new ArrayList<>();\n val2Index = new HashMap<>();\n }", "public int hashCode()\r\n\t{\n\t\treturn (i % 9); //this will make the values to store in the table based on size of hashtable is 9 and calculation will be (i %9)\r\n\t}", "public Set keySet() {\n\treturn table.keySet();\n }", "public static void main(String[] args) {\r\n\t\tHashSet h1=new HashSet();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\th1.add(3);\r\n\t\th1.add(7); //Homogeous \r\n\t\th1.add(9);//hetrogeous\r\n\t\th1.add(10);\r\n\t\t\r\n\t\tTreeSet t1=new TreeSet(h1);\r\n\t\tt1.add(100);\r\n\t\tSystem.out.println(t1);\r\n\t}", "private void rehash(int newHasTableSize) {\n\t\t// allocate the new hash table and record a reference\n\t\t// to the current one in oldTable\n\t\tint newTableSize = nextPrime(newHasTableSize);\n\t\tAVLTree<T>[] newTable = new AVLTree[newTableSize];\n\t\tfor (int i = 0; i < newTableSize; i++)\n\t\t\tnewTable[i] = new AVLTree<T>();\n\n\t\tAVLTree<T>[] oldTable = table;\n\n\t\tint index;\n\n\t\t// cycle through the current hash table\n\t\tfor (int i = 0; i < table.length; i++) {\n\t\t\t// see if there is a linked list present\n\t\t\tif (table[i] != null) {\n\t\t\t\tIterator<T> iter = table[i].iterator();\n\t\t\t\tT currItem;\n\t\t\t\twhile (iter.hasNext()) {\n\t\t\t\t\tcurrItem = iter.next();\n\n\t\t\t\t\tindex = (currItem.hashCode() & Integer.MAX_VALUE)\n\t\t\t\t\t\t\t% newTableSize;\n\t\t\t\t\t// funcion hash para conocer la posicion del elemento.\n\n\t\t\t\t\tnewTable[index].add(currItem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// the table is now newTable\n\t\ttable = newTable;\n\t\t// update the table threshold\n\t\ttableThreshold = (int) (table.length * maxLoadFactor);\n\t\t// let garbage collection get rid of oldTable\n\t\toldTable = null;\n\t}", "public DelegateAbstractHashMap(int initialCapacity, AbstractHashSet set) {\n\t\t\tsuper(initialCapacity);\n\t\t\tthis.set = set;\n\t\t}", "public static void main(String[] args) {\n\n Set<String> mySetList = new SetC<>();\n Set<String> hashSetList = new HashSet<>();\n\n\n\n mySetList.add(\"Тест1\"); hashSetList.add(\"Тест1\");\n mySetList.add(\"Тест2\"); hashSetList.add(\"Тест2\");\n mySetList.add(\"Тест3\"); hashSetList.add(\"Тест3\");\n\n\n\n System.out.println(\"mySetList:\"+mySetList+\"\\nhashSetList:\"+hashSetList);\n\n\n\n }", "public static void main(String[] args) {\nLinkedHashSet<String> name_set=new LinkedHashSet<String>();\nname_set.add(\"John\");\nname_set.add(\"Fletcher\");\nname_set.add(\"Kirill\");\nname_set.add(\"Kowing\");\n//Adding same Record again to Linked Hash Set , will not add duplicate record\nname_set.add(\"John\");\nSystem.out.println(\" Record Set\"+name_set);\nSystem.out.println(\"Size of the Set: \"+name_set.size());\nSystem.out.println(\"Set Contains Kirill: \"+name_set.contains(\"Kirill\"));\nSystem.out.println(\"Set Contains Johncena : \"+name_set.contains(\"Johncena\"));\nname_set.remove(\"Kowing\");\nSystem.out.println(\"-----------------------------------------------\");\n\nSystem.out.println(\"Updated Record Set: \"+name_set);\nSystem.out.println(\"Size of the Set: \"+name_set.size());\nSystem.out.println(\"Set Contains Kirill: \"+name_set.contains(\"Kirill\"));\nSystem.out.println(\"Set Contains Kowing : \"+name_set.contains(\"Kowing\"));\n\n\t}", "protected abstract Set method_1559();", "protected abstract Set<String> _addToSet(String key, Collection<String> str);", "public MyMultiset() {\n\t\tthis.set = new HashSet<Node>();\n\t}", "@Override\n public int hashCode();", "public Object clone()\n/* */ {\n/* 251 */ return new IntHashSet(this);\n/* */ }", "@Override\n\t public int hashCode();", "public static void main(String[] args) {\nSystem.out.println(\"**********************HashSet********************\");\n\t Set<String> set=new HashSet<String>();\n\t set.add(\"abc\");\n\t set.add(\"abc\");\n\t set.add(\"def\");\n\t print(set);\n\t \n\t System.out.println(\"**********************LinkedHashSet********************\"); \n\t Set<Integer> lset=new LinkedHashSet<Integer>();\n\t lset.add(1);\n\t lset.add(100);\n\t lset.add(100);\n\t print(lset);\n\t \n\t System.out.println(\"**********************TreeSet********************\");\n\t Set<String> ts=new TreeSet<String>();\n\t ts.add(\"aabbcc\");\n\t ts.add(\"ddeeff\");\n\t ts.add(\"awsedr\");\n\t print(ts);\n\t \n\t System.out.println(\"**********************ArrayList********************\");\n\t List<Integer> list=new ArrayList<Integer>();\n\t list.add(1);\n\t list.add(2);\n\t list.add(3);\n\t list.add(3);\n\t list.add(4);\n\t print(list);\n\t \n\t \n\t System.out.println(\"**********************Vector********************\");\n\t List<String> vect=new Vector<String>();\n\t vect.add(\"a\");\n\t vect.add(\"b\");\n\t vect.add(\"c\");\n\t vect.add(\"d\");\n\t vect.add(\"d\");\n\t print(vect);\n\t \n\t System.out.println(\"**********************LinkedList********************\");\n\t List<Integer> linkedList=new LinkedList<Integer>();\n\t linkedList.add(9);\n\t linkedList.add(7);\n\t linkedList.add(1);\n\t linkedList.add(7);\n\t print(linkedList);\n\t \n\t System.out.println(\"**********************HashMap<Integer, Integer>********************\");\n\t Map<Integer, Integer> mp=new HashMap<Integer,Integer>();\n\t mp.put(1, 2);\n\t mp.put(3, 4);\n\t mp.put(5, 6);\n\t mp.put(7, 8);\n\t printMap(mp);\n\t \n\t \n\t System.out.println(\"**********************HashMap<Integer, String>********************\");\n\t Map<Integer, String> mp1=new HashMap<Integer,String>();\n\t mp1.put(1, \"a\");\n\t mp1.put(2, \"b\");\n\t mp1.put(3, \"c\");\n\t mp1.put(4, \"d\");\n\t printMap(mp1);\n\t \n\t System.out.println(\"**********************LinkedHashMap<String, Integer>********************\");\n\t Map<String, Integer> mp2=new HashMap<String, Integer>();\n\t mp2.put(\"a\", 1);\n\t mp2.put(\"a\", 2);\n\t mp2.put(\"b\", 3);\n\t mp2.put(\"d\", 4);\n\t printMap(mp2);\n\t \n\t \n\t System.out.println(\"**********************TreeMap<String, String>********************\");\n\t Map<String, String> mp3=new HashMap<String, String>();\n\t mp3.put(\"a\", \"z\");\n\t mp3.put(\"a\", \"y\");\n\t mp3.put(\"a\", \"y\");\n\t mp3.put(\"b\", \"x\");\n\t mp3.put(\"d\", \"w\");\n\t printMap(mp3);\n\t \n\t \n\t \n\t \n\t}", "public DelegateAbstractHashMap(int initialCapacity, float loadFactor,\n\t\t\t\tAbstractHashSet set) {\n\t\t\tsuper(initialCapacity, loadFactor);\n\t\t\tthis.set = set;\n\t\t}", "public static void main(String[] args) {\n HashSet<Person> set = new HashSet<>();\n Person p1 = new Person(\"小妹妹\", 18);\n Person p2 = new Person(\"小妹妹\", 18);\n Person p3 = new Person(\"小妹妹\", 19);\n System.out.println(p1.hashCode());\n System.out.println(p2.hashCode());\n System.out.println(p1 == p2);\n System.out.println(p1.equals(p2));\n set.add(p1);\n set.add(p2);\n set.add(p3);\n System.out.println(set);\n }", "public static void main(String[] args){\n\t\tTreeSet hs=new TreeSet();\n\t\t\n\t\ths.add(\"d\");\n\t\ths.add(\"c\");\n\t\ths.add(\"b\");\n\t\ths.add(\"a\");\n\t\ths.add(\"c\");\n\t\ths.add(\"i\");\n\t\ths.add(\"l\");\n\t\ths.add(new Integer(2));\n\t\ths.add(new Float(2));\n\t\t\n\t\t\t\t\n\t\tSystem.out.println(\"Hashset is \"+hs);\n\t\tSystem.out.println(\"Size of Hashset is \"+ hs.size());\n\t\t\n\t\tSystem.out.println(\"Does hashset contains this 'u' element \" + hs.contains(\"u\"));\t\t\n\t\tSystem.out.println(\"is hashset empty \" + hs.isEmpty());\n\t\tSystem.out.println(\"remove the element \"+hs.remove(\"i\"));\n\t\t\n\t\t\n\t hs.clear();\n\t System.out.println(\"get class \" +hs.getClass());\n\t\t\n\t System.out.println(\"is hashset empty \" +hs.isEmpty());\n\t \n\t \n\t\t\n\t}", "private static void testConsistentHashing() {\n Map<String, AtomicInteger> CHNodesMap = Maps.newHashMap();\r\n List<String> CHNodes = Lists.newArrayList();\r\n for(int i = 0 ; i < nodesCount; i ++) {\r\n CHNodes.add(\"CHNode\"+i);\r\n CHNodesMap.put(\"CHNode\"+i, new AtomicInteger());\r\n }\r\n ConsistentHashing<String, String> ch = new ConsistentHashing(charsFunnel, charsFunnel, CHNodes);\r\n \r\n // insert keys\r\n long startTime = System.currentTimeMillis();\r\n for(int i = 0 ; i < keyCount; i++) {\r\n CHNodesMap.get(ch.getHash(\"\"+i)).incrementAndGet();\r\n }\r\n long endTime = System.currentTimeMillis();\r\n long timeElapsed = endTime - startTime;\r\n // System.out.println(\"Execution Time in milliseconds : \" + timeElapsed);\r\n\r\n // print out distriubution + clear\r\n for(Entry<String, AtomicInteger> entry : CHNodesMap.entrySet()) {\r\n System.out.println(entry.getKey() + \": \" + entry.getValue().get());\r\n entry.getValue().set(0);\r\n }\r\n \r\n // remove node 3\r\n System.out.println(\"\\n=== After Removing Node 3 ===\");\r\n ch.removeNode(\"CHNode3\");\r\n CHNodesMap.remove(\"CHNode3\");\r\n \r\n // re-add\r\n for(int i = 0 ; i < keyCount; i++) {\r\n CHNodesMap.get(ch.getHash(\"\"+i)).incrementAndGet();\r\n }\r\n \r\n // print out distriubution again\r\n for(Entry<String, AtomicInteger> entry : CHNodesMap.entrySet()) {\r\n System.out.println(entry.getKey() + \": \" + entry.getValue().get());\r\n }\r\n }", "public HashSet(int c){\n @SuppressWarnings(\"unchecked\")\n LinkedList<E>[] tmp = new LinkedList[c];\n this.data = tmp;\n this.buckets = c;\n this.clear();\n }", "void Rehash(){\n\t\tRehash++;\r\n\t\t//updates if the hash table changed size\r\n\t\tStockNode[] temp=new StockNode[(2*Table.length)+1];\r\n\t\t//creates a temporary table with the new size \r\n\t\tfor(int i=Table.length-1;i>=0;i--){\r\n\t\t\t//goes through each array linked list \r\n\t\t\tStockNode t=Table[i];\r\n\t\t\twhile(t!=null){\r\n\t\t\t\t//the change of node to its new proper place is done here \r\n\t\t\t\tint key = toInt(t.stockName);\r\n\t\t\t\tint index = key%temp.length;\r\n\t\t\t\tif(temp[index]!=null){\r\n\t\t\t\t\tStockNode next=temp[index].next;\r\n\t\t\t\t\twhile(next!=null){\r\n\t\t\t\t\t\ttemp[index]=next;\r\n\t\t\t\t\t\tnext=temp[index].next;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttemp[index].next=t;\r\n\t\t\t\t} else{\r\n\t\t\t\t\ttemp[index]=t;\r\n\t\t\t\t}\r\n\t\t\t\tStockNode next=t.next;\r\n\t\t\t\tt.next=null;\r\n\t\t\t\tt=next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tTable=temp;\r\n\t}", "private void reHash(int a){\r\n int arrayNewSize = this.capacity();\r\n if(a == 1){\r\n arrayNewSize = arrayNewSize * 2;\r\n }\r\n else if(a == -1){\r\n arrayNewSize = arrayNewSize / 2;\r\n }\r\n String[] newHashTable = new String[arrayNewSize];\r\n String [] oldCopy = this.hashTable.clone();\r\n this.capacity = arrayNewSize;\r\n this.hashTable = newHashTable;\r\n for(String i: oldCopy){\r\n this.reHashAdd(i);\r\n }\r\n this.hashing = false;\r\n }", "public AbstractHashSet(int initialCapacity, float loadFactor) {\n\t\tmap = new DelegateAbstractHashMap(initialCapacity, loadFactor, this);\n\t}", "@Test\r\n public void testHashSetInsert()\r\n {\r\n Square s0 = new Square(1, -1),\r\n s1 = new Square(1, -1);\r\n HashSet<Square> hs = new HashSet<>();\r\n hs.add(s0);\r\n assertEquals(1, hs.size());\r\n hs.add(s1);\r\n assertEquals(1, hs.size());\r\n assertTrue(hs.contains(s0));\r\n assertTrue(hs.contains(s1));\r\n }", "@Override\n public Set<K> keySet() {\n Set<K> keySet = new HashSet<K>(size());\n for (LinkedList<Entry<K,V>> list : table) {\n for (Entry<K,V> entry : list) {\n if (entry != null) {\n keySet.add(entry.getKey());\n }\n }\n }\n return keySet;\n }", "public final void mo18090a(Hashtable hashtable) {\n HashMap hashMap = new HashMap();\n for (Entry entry : hashtable.entrySet()) {\n String str = (String) f3784a.get(entry.getKey());\n if (str == null) {\n str = (String) entry.getKey();\n }\n this.f3787e.f3806b.remove(str);\n hashMap.put(str, entry.getValue());\n }\n this.f3788f.f3806b = hashMap;\n setChanged();\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\tint hashCode = 0;\r\n\t\tfor (K key : keySet()) {\r\n\t\t\thashCode += (key.hashCode() ^ get(key).hashCode());\r\n\t\t}\r\n\t\treturn hashCode;\r\n\t}", "public static void main(String[] args) {\n\t\tHashSet<Integer> hs = new HashSet<Integer>();// Generics\n\t\ths.add(123);\n\t\ths.add(124);\n\t\ths.add(124);\n\t\ths.add(null);\n\t\ths.add(125);\n\t\ths.add(129);\n\t\ths.add(145);\n\t\tSystem.out.println(hs);\n\t\t// accessing hash set elements/objects in sequence\n\t\tIterator<Integer> itr = hs.iterator();\n\t\tSystem.out.println(\"HashSet values using Iterator\");\n\t\twhile (itr.hasNext()) {\n\t\t\tSystem.out.println(itr.next());\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tHashSet<String> flowerList = new HashSet<String>(8, 0.60f);\n\t\t// capacity = 8\n\t\t// load factor = 0.6 means if hash set is filled by 60% then the size of hash\n\t\t// set will be doubled\n\t\tflowerList.add(\"Rose\");\n\t\tflowerList.add(\"Jasmine\");\n\t\tflowerList.add(\"Marigold\");\n\n\t\t// adding Student objects in to hash set\n\t\tHashSet<Hash_Student> stdList = new HashSet<Hash_Student>();\n\t\tHash_Student std;\n\t\tScanner sc = new Scanner(System.in);\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tSystem.out.println(\"Enter the details of Student\");\n\t\t\tSystem.out.println(\"Enter the Student id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tSystem.out.println(\"Enter the Student Name\");\n\t\t\tString name = sc.next();\n\t\t\tstdList.add(new Hash_Student(id, name));\n\t\t}\n\n\t\t// displaying the student details\n\t\tIterator<Hash_Student> stuItr = stdList.iterator();\n\t\tSystem.out.println(\"Student HashSet values using Iterator\");\n\t\twhile (stuItr.hasNext()) {\n\t\t\tHash_Student st = stuItr.next();\n\t\t\tSystem.out.println(st.getSname() + \" \\t\\t\\t \" + st.getSid());\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// removeing the student\n\t\tSystem.out.println(\"Enter the Student id to remove\");\n\t\tint id = sc.nextInt();\n\t\twhile (stuItr.hasNext()) {\n\t\t\tHash_Student st = stuItr.next();\n\t\t\tif (st.getSid() == id) {\n\t\t\t\tstuItr.remove();\n\t\t\t}\n\t\t}\n\t}", "public abstract Set<Map.Entry<K, V>> entrySet();", "public static Set getKeySet(Hashtable table) {\n\t\treturn (table == null) ? Collections.EMPTY_SET : table.keySet();\n\t}", "public RandomizedSet() {\r\n rehash(16, null);\r\n random = new Random();\r\n }", "private static void LessonHash() {\n\n System.out.println(\"---Hash Table---\");\n\n Hashtable<Integer, String> oopPrinciples = new Hashtable<>();\n oopPrinciples.put(1, \"Inheritance\");\n oopPrinciples.put(2, \"Polymorphism\");\n oopPrinciples.put(3, \"Abstraction\");\n oopPrinciples.put(4, \"Encapsulation\");\n //oopPrinciples.put(5, null); // throws null pointer execption\n\n //Single output from hashtable\n System.out.println(oopPrinciples.get(3));\n\n //All values\n for(Integer key : oopPrinciples.keySet()) {\n System.out.println(oopPrinciples.get(key));\n };\n System.out.println(\"----------------\");\n\n // Key-Value Pairs / Value List\n /*\n Hash Map\n 1.) Does allow null for either key or value\n 2.) unsynchronized, not thread safe, but performance is better\n */\n\n System.out.println(\"---Hash Map---\");\n\n HashMap<Integer, String> oopPrinciples2 = new HashMap<>();\n oopPrinciples2.put(1, \"Inheritance\");\n oopPrinciples2.put(2, \"Polymorphism\");\n oopPrinciples2.put(3, \"Abstraction\");\n oopPrinciples2.put(4, \"Encapsulation\");\n oopPrinciples2.put(5, null);\n\n //Single output from hashtable\n System.out.println(oopPrinciples2.get(3));\n\n //All values\n for(Integer key : oopPrinciples.keySet()) {\n System.out.println(oopPrinciples.get(key));\n };\n System.out.println(\"----------------\");\n\n // Key-Value Pairs / Value List\n /*\n Hash Set\n 1.) Built in mechanism for duplicates\n 2.) used for when you wanna maintain unique list\n */\n\n System.out.println(\"---Hash Set---\");\n\n HashSet<String> oopPrinciples3 = new HashSet<>();\n oopPrinciples3.add(\"Inheritance\");\n oopPrinciples3.add(\"Polymorphism\");\n oopPrinciples3.add(\"Abstraction\");\n oopPrinciples3.add(\"Encapsulation\");\n\n //Single output from hashtable\n System.out.println(oopPrinciples3);\n\n //All values\n for(String s : oopPrinciples3) {\n System.out.println(s);\n }\n\n if(oopPrinciples.contains(\"Inheritance\")) {\n System.out.println(\"Value does exist!\");\n } else {\n System.out.println(\"Value does not exist!\");\n }\n\n System.out.println(\"----------------\");\n }", "private static Set<String> m23474a(Set<String> set, Set<String> set2) {\n if (set.isEmpty()) {\n return set2;\n }\n if (set2.isEmpty()) {\n return set;\n }\n HashSet hashSet = new HashSet(set.size() + set2.size());\n hashSet.addAll(set);\n hashSet.addAll(set2);\n return hashSet;\n }", "private void rehash() {\n if (rehashing) {\n int newCapacity = 2 * capacity + 1;\n if (newCapacity > MAXIMUM_CAPACITY) {\n return;\n }\n\n objectCounter += 2;\n MapElement[] newMap = new MapElement[newCapacity]; \n \n MapElement me = null;\n MapElement t = null;\n MapElement next = null;\n int newIndex = 0;\n \n for (int index = 0; index < capacity; index++) {\n me = map[index];\n while (me != null) {\n next = me.getNext();\n newIndex = me.getKey() % newCapacity;\n if (newIndex < 0) {\n newIndex = -newIndex;\n }\n if (newMap[newIndex] == null) {\n // No element yet for this new index\n newMap[newIndex] = me;\n me.setNext(null);\n } else {\n // Hook the element into the beginning of the chain\n t = newMap[newIndex];\n newMap[newIndex] = me;\n me.setNext(t);\n }\n me = next;\n }\n }\n \n map = newMap;\n capacity = newCapacity;\n // Max. number of elements before a rehash occurs\n maxLoad = (int) (loadFactor * capacity + 0.5f);\n\n newMap = null;\n }\n }", "public Set<T> toSet()\r\n\t{\r\n\t\tSet<T> s = new HashSet<T>();\r\n//\t\tSystem.out.println(\"in toSet method\");\r\n//\t\tSystem.out.println(\"thisTable.tostring \" + this.toString());\r\n\t\tIterator<T> thisTableIter = this.iterator();\r\n\t\t\r\n\t\twhile (thisTableIter.hasNext())\r\n\t\t{\r\n\t\t\tT e = thisTableIter.next();\r\n\t\t//\tSystem.out.println(e + \" \");\r\n\t\t\ts.add(e);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "void add(ThreadLocal<?> key, Object value) {\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n if (k == null) {\n table[index] = key.reference;\n table[index + 1] = value;\n return;\n }\n }\n }", "public RandomizedSet() {\n map = new HashMap<>();\n }", "private void extendTable() {\n\n FreqNode[] freqTable = frequencyTable;//create temp table\n numNodes = 0; //set nodes to 0 \n FreqNode tmpNode; //temp variable\n frequencyTable = new FreqNode[frequencyTable.length * 2];//doubles the size \n\n //for every element in the table \n for (FreqNode node : freqTable) {\n //set the node \n tmpNode = node;\n while (true) {\n //if the node currently has a value \n if (tmpNode == null) {\n break;\n }//else \n else {\n //place the key and value at the current position\n this.put(tmpNode.getKey(), tmpNode.getValue());\n tmpNode = tmpNode.getNext();\n }//end else\n }//end while \n }//end for \n }", "public DesignHashSet() {\n map=new HashMap<>();\n }", "public void removeAll() {\n _hash = new Hashtable();\n _first = null;\n _last = null;\n }", "public HashTableChained() {\r\n num_buckets = 101; //prime number close to 100\r\n hash_table = new DList[num_buckets]; \r\n }", "@org.junit.Test\n public void put() throws Exception {\n for (int i = 0; i < 2_000_000; i++) {\n hashTable.put(Integer.toString(i), Integer.toString(i));\n }\n\n for (int i = 0; i < 2_000_000; i++) {\n assertEquals(true, hashTable.contains(Integer.toString(i)));\n }\n}", "public MyHashSet() {\n nodes = new Node[Max_Size];\n }", "public int hashCode() {\r\n \treturn super.hashCode();\r\n }", "public abstract Set<Map.Entry<K, V>> a();", "public RandomizedSet() {\n m = new HashMap<>();\n l = new ArrayList<>();\n }", "@Test\n public void hmset(){\n User user1 = new User(\"1\",\"xz1\",\"11\",\"男\") ;\n User user2 = new User(\"2\",\"xz2\",\"22\",\"男\") ;\n String key1 = \"user:\"+user1.getId() ;\n String key2 = \"user:\"+user2.getId() ;\n Pipeline pipeline = jedis.pipelined() ;\n pipeline.hdel(key1,\"name\",\"age\",\"sex\") ;\n pipeline.hdel(key2,\"name\",\"age\",\"sex\") ;\n pipeline.hmset(key1,user1.toMap()) ;\n pipeline.hmset(key2,user2.toMap()) ;\n pipeline.hmget(key1,\"name\",\"age\",\"sex\");\n pipeline.hmget(key2,\"name\",\"age\",\"sex\");\n System.out.println(pipeline.syncAndReturnAll());\n }", "public void add2Hash( Hashtable h, String source ) {\n \n AstCursor c = new AstCursor();\n \n for ( c.FirstElement( this ); c.MoreElement(); c.NextElement() ) {\n Es es = ( Es ) c.node;\n es.add2Hash( h, source );\n }\n }", "@Override\n public Set keySet() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.keySet();\n }", "@Override\n public Set keySet() {\n OmaLista palautettava = new OmaLista();\n\n for (int i = 0; i < this.values.length; i++) {\n if (this.values[i] != null) {\n for (int z = 0; z < this.values[i].size(); z++) {\n palautettava.add(this.values[i].value(z).getKey());\n }\n }\n }\n\n return palautettava;\n }", "public AbstractHashSet(int initialCapacity) {\n\t\tmap = new DelegateAbstractHashMap(initialCapacity, this);\n\t}", "@Override\n public int hashCode() {\n int result = table1.hashCode();\n result = 31 * result + table2.hashCode();\n return result;\n }", "@Override\n public int hashCode()\n {\n if ( h == 0 )\n {\n rehash();\n }\n\n return h;\n }", "@Override\n public abstract int hashCode();" ]
[ "0.7015264", "0.69206893", "0.69199204", "0.6916972", "0.6882439", "0.67482173", "0.67340034", "0.6719706", "0.66890895", "0.6612499", "0.6597011", "0.6568509", "0.6443834", "0.6404083", "0.64039797", "0.64038324", "0.6402989", "0.63942593", "0.6362378", "0.6316016", "0.6301948", "0.6301656", "0.6297563", "0.62873113", "0.6264605", "0.6261315", "0.6203365", "0.6173758", "0.6153811", "0.6149843", "0.60732186", "0.60720974", "0.6051716", "0.6049964", "0.6046014", "0.60210866", "0.60172886", "0.600825", "0.6000022", "0.59949255", "0.59880865", "0.59725916", "0.59650916", "0.59634376", "0.5962548", "0.5932978", "0.59328425", "0.5916904", "0.59058315", "0.58990854", "0.5897904", "0.5896231", "0.5887875", "0.58819425", "0.5875258", "0.58635503", "0.58587027", "0.5855849", "0.5853172", "0.5841312", "0.5840266", "0.5837263", "0.58349246", "0.5834372", "0.5832203", "0.5830677", "0.5827159", "0.5824678", "0.5822951", "0.58221906", "0.5816442", "0.57957155", "0.5790862", "0.5783949", "0.57630974", "0.5760692", "0.5759832", "0.57566893", "0.575526", "0.5754353", "0.5750413", "0.5746282", "0.5743565", "0.5739564", "0.57260454", "0.5711211", "0.5710263", "0.57074153", "0.57018095", "0.57009417", "0.5700655", "0.5697522", "0.56959206", "0.56957316", "0.56943613", "0.56926227", "0.5691076", "0.5689365", "0.5687932", "0.56794536" ]
0.7251835
0
Constructor, for both variants absolute height and font varying height.
public SpacerHeight(boolean isFontMultiple, double spacerHeight) { if (isFontMultiple) { this.fontMultiple = spacerHeight ; } else { this.fontMultiple = null ; this.spacerSize = spacerHeight ; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setHeight(VariableAmount height);", "Builder height(VariableAmount height);", "@Override\r\n public void setHeight(String height) {\n }", "public void setFontHeightInPoints(short height)\n {\n font.setFontHeight(( short ) (height * 20));\n }", "@Override\n\tpublic void setHeight(float height) {\n\n\t}", "@Override\n\tpublic void setHeight(short arg0) {\n\t\t\n\t}", "public void setFontHeight(short height)\n {\n font.setFontHeight(height);\n }", "public void setHeight(int height);", "public void setHeight(int height);", "public abstract double getBaseHeight();", "@Override\n public int height()\n {\n return textCent.height();\n }", "public void setHeight(int h)\n {\n height = h;\n }", "public void setHeight(final String value)\n {\n height = value;\n }", "public void setFontHeightInPoints(short height) {\n\t\tthis.fontHeightInPoints = height;\n\t}", "void setHeight(int height);", "void setHeight(int height);", "public void setFontHeight(short height) {\n\t\tthis.fontHeight = height;\n\t}", "private void setHeight(float height){\n this.height = height;\n }", "void setFitHeight(short height);", "public void setHeight(double height){\n h=height;\r\n }", "public void setHeight(double value) {\n this.height = value;\n }", "default void setHeight(int height) {\n setHeight(VariableAmount.fixed(height));\n }", "public void setHeight(int h) {\n this.H = h;\n }", "public void setHeight(String height) {\r\n this.height = height;\r\n }", "public void setHeight(int value) {\n this.height = value;\n }", "Integer getDefaultHeight();", "public void setHeight(int l){\n \theight = l;\n }", "public void setHeight(double height) {\n this.height = height;\n }", "public void setHeight(String height) {\n this.height = height;\n }", "public double getBaseHeight();", "default Builder height(int height) {\n return height(VariableAmount.fixed(height));\n }", "public abstract Builder setOutputHeight(int value);", "@Override\n\tpublic void setHeightInPoints(float arg0) {\n\t\t\n\t}", "public int getHeight() {\r\n if ( fontMetrics != null ) {\r\n return fontMetrics.getHeight() + 6;\r\n } else {\r\n return 6;\r\n }\r\n }", "public void setHeight(double height) {\r\n this.height = height;\r\n }", "public int getHeight() {return height;}", "@Override\r\n\tpublic void setHeight(int height) {\n\t\t\r\n\t}", "public int getHeight() { return height; }", "int getHeight() {return height;}", "public abstract int getNormalizedHeight();", "public void setHeight(double height) {\n this.height = height;\n }", "public void setHeight(Short height) {\r\n this.height = height;\r\n }", "public abstract float getHeight();", "public float getHeight() {\n\t\t\n\t\tfloat height = 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\tFontChar c = font.getChar(text.charAt(i));\n\t\t\tfloat h = (c.T_HEIGHT + c.Y_OFFSET) * size;\n\t\t\t\n\t\t\tif(h > height)\n\t\t\t\theight = h;\n\t\t}\n\t\t\n\t\treturn height;\n\t}", "private void initializeHeightData() {\n nineHeights[0] = 1f;\n nineHeights[1] = 0f;\n nineHeights[2] = 1f;\n nineHeights[3] = 0f;\n nineHeights[4] = 0.5f;\n nineHeights[5] = 0f;\n nineHeights[6] = 1f;\n nineHeights[7] = 0f;\n nineHeights[8] = 1f;\n }", "@Override\n public int getHeight() {\n return height;\n }", "@Override\n public int getHeight() {\n return height;\n }", "VariableAmount getHeight();", "String getHeight();", "String getHeight();", "Length getHeight();", "public void setHeight(int newValue)\n {\n height = newValue;\n }", "public void setHeight(int height) {\n this.height = height;\n }", "public abstract int getDisplayHeight();", "public void setHeight(int height) {\r\n this.height = height;\r\n }", "public short getFontHeight()\n {\n return font.getFontHeight();\n }", "public void setBestHeight() { setHeight(getBestHeight()); }", "@Override\n\tpublic void height() {\n\t\t\n\t}", "public int getH() { return height; }", "public abstract void setNormalizedHeight(int i);", "public abstract int getHeight();", "public abstract int getHeight();", "public void setHeight(int h){ heightRadius = h; }", "public void setHeight(int height) {\n this.height = height;\n }", "public void setHeight(int height) {\n this.height = height;\n }", "public int getHeight()\n {return height;}", "private void updateLineHeight() {\n Text text = new Text(\"AM\");\n text.setFont(new Font(fontType, fontSize));\n lineHeight = round(text.getLayoutBounds().getHeight());\n }", "public short getFontHeight() {\n\t\treturn this.fontHeight;\n\t}", "public abstract int layoutHeight();", "private float getFontHeight(Paint paint) {\n Rect rect = new Rect();\n paint.getTextBounds(\"1\", 0, 1, rect);\n return rect.height();\n }", "private int getTextHeight() {\n return lineHeight * (textBuffer.getMaxLine() - 1);\n }", "public int getPreferredHeight() \n { \n Font font = Font.getDefault().derive( Font.BOLD, FONT_SIZE );\n return font.getHeight() + VMARGIN;\n }", "public void setHeight(double height) {\n\t\tthis.height = height;\n\t}", "public void setHeight(double height) {\n\t\tthis.height = height;\n\t}", "public void setHeight(double height) {\n\t\tthis.height = height;\n\t}", "public void setHeight(int height) {\n if(height < 0) throw new NegativeSizeException(\"Negative height\"); \n \tthis.height = height;\n }", "public int Height(){\r\n return height;\r\n }", "public static float textHeight(BitmapFont fntIn, String sIn){\n return new GlyphLayout(fntIn,sIn).height;\n }", "@java.lang.Override\n public long getHeight() {\n return height_;\n }", "@Override\n public int heightHint() {\n return isMultiline() ? 45 : 15;\n }", "public double getHeight(){\n return ((Math.sqrt(3.0))/2.0)*(super.getLength());\n }", "public int grHeight() { return height; }", "public Integer getHeight(){return this.height;}", "public void setHeight(double height) {\n\t\t this.height = height;\n\t }", "private void calculateHeightRatio() {\n\tif (texHeight != 0) {\n\t heightRatio = ((float) height) / texHeight;\n\t}\n }", "public double height() { return _height; }", "public float getHeight();", "public short getFontHeightInPoints() {\n\t\treturn fontHeightInPoints;\n\t}", "private void setHeight(long value) {\n bitField0_ |= 0x00000008;\n height_ = value;\n }", "public void setHeight(double h) {\n\t\t\theight.set(clamp(h, HEIGHT_MIN, HEIGHT_MAX));\n\t\t}", "@Override\n public int getHeight() {\n return this.height;\n }", "double getNewHeight();", "public int height();", "public int height();", "public int height();", "public int height();", "abstract public int getMinHeight();", "public int getHeight(){\n return height;\n }", "public void setHeight(float top, float bottom) {\n this.top = top;\n this.bottom = bottom;\n }", "@Override\n protected void setHeight(Context context, Integer heightInDp) {\n }" ]
[ "0.64414775", "0.63833785", "0.63295174", "0.6237539", "0.6219516", "0.61952144", "0.6094235", "0.60273635", "0.60273635", "0.6020169", "0.5997243", "0.5974593", "0.5963042", "0.59596705", "0.5955", "0.5955", "0.59513", "0.59491456", "0.5920767", "0.5891014", "0.58804333", "0.58714074", "0.5839628", "0.58259034", "0.58203226", "0.5808423", "0.578979", "0.57826465", "0.5767487", "0.57377887", "0.57286674", "0.57244295", "0.57209957", "0.57032925", "0.57016146", "0.5691243", "0.5685822", "0.56819177", "0.56715506", "0.5643023", "0.56361836", "0.56234735", "0.5611952", "0.56115097", "0.55951464", "0.55863506", "0.55863506", "0.5556559", "0.5554958", "0.5554958", "0.5554199", "0.5549444", "0.5539325", "0.5507906", "0.5487268", "0.5485339", "0.54566437", "0.5456474", "0.54344255", "0.54343855", "0.542303", "0.542303", "0.5422904", "0.54120183", "0.54120183", "0.5385408", "0.53837293", "0.53826445", "0.53725", "0.5365297", "0.5364718", "0.536413", "0.53587985", "0.53587985", "0.53587985", "0.53470445", "0.53448784", "0.53249335", "0.53199047", "0.5313508", "0.5308497", "0.5307608", "0.52986956", "0.52963454", "0.5288373", "0.5287804", "0.5279515", "0.5276889", "0.52766454", "0.52762586", "0.52713054", "0.5267139", "0.5264265", "0.5264265", "0.5264265", "0.5264265", "0.52612287", "0.5246259", "0.52453345", "0.52371603" ]
0.5847976
22
Returns the spacer height in absolute units, calculating from the template and font if required. Subsequent calls with the same quill use a cached value.
public double getSpacerSize(Quill quill) throws IOException { if (fontMultiple!=null) { if (quill==null) throw new IllegalArgumentException("Argument 'quill' should not be null"); if (quill!=this.spacerQuill) { this.spacerSize = quill.getFontHeight() * fontMultiple ; this.spacerQuill = quill ; } } return spacerSize ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCurrentHeight();", "public SpacerHeight(boolean isFontMultiple, double spacerHeight) { \n\t\tif (isFontMultiple) { \n\t\t\tthis.fontMultiple = spacerHeight ; \n\t\t} else { \n\t\t\tthis.fontMultiple = null ; \n\t\t\tthis.spacerSize = spacerHeight ; \n\t\t}\n\t}", "private int getQustionHeight(int width, int height){\n\t\tView view = (View) questionText.getClientProperty(javax.swing.plaf.basic.BasicHTML.propertyKey);\n \tview.setSize(width, height);\n \tfloat h = view.getPreferredSpan(View.Y_AXIS);\n \treturn (int)Math.ceil(h);\n\t}", "Integer getCurrentHeight();", "public final int mo39473l() {\n return getMeasuredHeight();\n }", "double getOldHeight();", "public int getHeight() {\r\n if ( fontMetrics != null ) {\r\n return fontMetrics.getHeight() + 6;\r\n } else {\r\n return 6;\r\n }\r\n }", "public float getHeight() {\n\t\t\n\t\tfloat height = 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\tFontChar c = font.getChar(text.charAt(i));\n\t\t\tfloat h = (c.T_HEIGHT + c.Y_OFFSET) * size;\n\t\t\t\n\t\t\tif(h > height)\n\t\t\t\theight = h;\n\t\t}\n\t\t\n\t\treturn height;\n\t}", "public float getPeekHeight() {\n int i;\n if (this.mNotificationStackScroller.getNotGoneChildCount() > 0) {\n i = this.mNotificationStackScroller.getPeekHeight();\n } else {\n i = this.mQsMinExpansionHeight;\n }\n return (float) i;\n }", "public double getBaseHeight();", "String getHeight();", "String getHeight();", "public int getPreferredHeight() \n { \n Font font = Font.getDefault().derive( Font.BOLD, FONT_SIZE );\n return font.getHeight() + VMARGIN;\n }", "public abstract int layoutHeight();", "private int getTextHeight() {\n return lineHeight * (textBuffer.getMaxLine() - 1);\n }", "double getNewHeight();", "public int getQsbOffsetY() {\n int freeSpace = isTaskbarPresent\n ? workspacePadding.bottom\n : hotseatBarSizePx - hotseatCellHeightPx - hotseatQsbHeight;\n\n if (isScalableGrid && qsbBottomMarginPx > mInsets.bottom) {\n // Note that taskbarSize = 0 unless isTaskbarPresent.\n return Math.min(qsbBottomMarginPx + taskbarSize, freeSpace);\n } else {\n return (int) (freeSpace * QSB_CENTER_FACTOR)\n + (isTaskbarPresent ? taskbarSize : mInsets.bottom);\n }\n }", "public short getFontHeight()\n {\n return font.getFontHeight();\n }", "public int getHeight() {\r\n\t\treturn height + yIndent;\r\n\t}", "public String getheight()\n\t{\n\t\treturn height.getText();\n\t}", "private float getFontHeight(Paint paint) {\n Rect rect = new Rect();\n paint.getTextBounds(\"1\", 0, 1, rect);\n return rect.height();\n }", "private float getCurrentDisplayedHeight() {\n if (getDrawable() != null)\n return getDrawable().getIntrinsicHeight() * matrixValues[Matrix.MSCALE_Y];\n else\n return 0;\n }", "public String getHeight() {\r\n if (height != null) {\r\n return height;\r\n }\r\n ValueBinding vb = getValueBinding(\"height\");\r\n return vb != null ? (String) vb.getValue(getFacesContext()) :\r\n DEFAULT_HEIGHT;\r\n }", "public void computeHeight() {\n\t\tif (getContext().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {\n\t\t\tint screenHeight = ScreenUtils.getScreenHeight(getContext());\n\t\t\tif (DisplayHelper.isTabModel(getContext())) {\n\t\t\t\tsetHeight(screenHeight * 3 / 4);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsetHeight(screenHeight * 4 / 5);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tint screenHeight = ScreenUtils.getScreenHeight(getContext());\n\t\t\tif (DisplayHelper.isTabModel(getContext())) {\n\t\t\t\tsetHeight(screenHeight * 2 / 3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsetHeight(screenHeight - 80);\n\t\t\t}\n\t\t}\n\t}", "public String getHeight() {\n return height;\n }", "public String getHeight() {\n return height;\n }", "public double getCurrentHeight() {\n return this.currentHeight;\n }", "public double getPrefHeight() { return getPrefHeight(-1); }", "public String getHeightAttribute() {\n if (wrapHeight) {\n return VALUE_WRAP_CONTENT;\n } else if (fillHeight) {\n //return mRule.getFillParentValueName();\n return VALUE_MATCH_PARENT;\n } else {\n return AndroidDesignerUtils.pxToDpWithUnits(myArea, bounds.height);\n }\n }", "public int getHeight() {\n return (roomHeight);\n }", "public short getFontHeight() {\n\t\treturn this.fontHeight;\n\t}", "public abstract double getBaseHeight();", "public static int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public static int getFieldHeight() {\n return FIELD_HEIGHT;\n }", "int getheight();", "public int height() {\n\t\treturn 0;\n\t}", "public final String getHeight() {\n return this.height;\n }", "public short getFontHeightInPoints() {\n\t\treturn fontHeightInPoints;\n\t}", "public final int getHeight(){\n return height_;\n }", "public Integer getHeight()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.height, null);\n }", "private int getCurrentHeight()\r\n\t{\r\n\t\tsynchronized (mMutex)\r\n\t\t{\r\n\t\t\treturn mCurrentHeight;\r\n\t\t}\r\n\t}", "Builder height(VariableAmount height);", "public int height() {\n return current.height();\n }", "@Contract(pure = true)\r\n public int getHeight() {\r\n return height;\r\n }", "public int height()\n throws Exception\n {\n return this.text.height();\n }", "public int getTabHeight() {\n checkWidget();\n int result;\n if( fixedTabHeight != SWT.DEFAULT ) {\n result = fixedTabHeight;\n } else {\n result = tabHeight - 1; // -1 for line drawn across top of tab\n }\n return result;\n }", "float getSectionFooterHeight(int section);", "@Field(3) \n\tpublic int height() {\n\t\treturn this.io.getIntField(this, 3);\n\t}", "public Integer getExpectedHeight() {\n f f2 = this.d();\n if (f2 == null) return null;\n try {\n return f2.b;\n }\n catch (Throwable throwable) {\n com.adincube.sdk.util.a.c(\"BannerView.getExpectedHeight\", new Object[]{throwable});\n ErrorReportingHelper.report(\"BannerView.getExpectedHeight\", com.adincube.sdk.h.c.b.b, throwable);\n }\n return null;\n }", "public double getHeight() {\n\t\t\treturn height.get();\n\t\t}", "public int grHeight() { return height; }", "protected double getMinHeightImpl()\n {\n Insets ins = getInsetsAll();\n double minH = _scroller.getMinHeight();\n return minH + ins.getHeight();\n }", "protected int measureHeight(int measureSpec) {\n int specMode = MeasureSpec.getMode(measureSpec);\n int specSize = MeasureSpec.getSize(measureSpec);\n int result;\n if (specMode == MeasureSpec.EXACTLY) {\n result = specSize;\n } else {\n result = (int) (2 * radius) + getPaddingTop() + getPaddingBottom() + (int) (2 * strokeWidth);\n if (specMode == MeasureSpec.AT_MOST) {\n result = Math.min(result, specSize);\n }\n }\n return result;\n }", "private double getHeight() {\n\t\treturn height;\n\t}", "float getSurfaceHeight();", "@DISPID(-2147417101)\n @PropGet\n int offsetHeight();", "public float getHeight();", "public Number getHeight() {\n\t\treturn getAttribute(HEIGHT_TAG);\n\t}", "public static int getOrigHeight() {\n\t\treturn 48;\n\t}", "public float getHeight() {\n return height;\n }", "public int getHeight() { return height; }", "default int gfxHeight() {\n\t\treturn 96;\n\t}", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "private void refreshHeight() {\n\t\tint lines = Math.min(maxLineCount, Math.max(minLineCount, text\n\t\t\t\t.getLineCount()));\n\t\tint newHeight = lines * text.getLineHeight();\n\n\t\tGridData data = (GridData) text.getLayoutData();\n\t\tif (data.heightHint != newHeight) {\n\t\t\tdata.heightHint = newHeight;\n\t\t\tlayout();\n\t\t}\n\t}", "int calcHeightForText(String str) {\n\t\tFontMetrics metrics = self.getGraphics().getFontMetrics(self.getFont());\n\t\tint hgt = metrics.getHeight();\n\t\tint adv = metrics.stringWidth(str);\n\t\tfinal int PIXEL_PADDING = 6;\n\t\tDimension size = new Dimension(adv, hgt + PIXEL_PADDING);\n\t\tfinal float PADDING_PERCENT = 1.1f;\n\t\t// calculate modifier to line wrapping so we can display the wrapped message\n\t\tint mult = (int) Math.floor(size.width / (textArea.getSize().width * PADDING_PERCENT));\n\t\t// System.out.println(mult);\n\t\tmult++;\n\t\treturn size.height * mult;\n\t}", "VariableAmount getHeight();", "Integer getDefaultHeight();", "public int height() {\r\n return height;\r\n }", "public final int getHeight() {\r\n return config.height;\r\n }", "public int getHeight() {\n return height;\n }", "public final int getHeight() {\r\n return height;\r\n }", "private int computeTextPaddingBottom() {\n boolean isInWorkspace = (mLayoutStyle == LayoutStyle.WorkspaceStyle);\n\n int standardPadding = !mSupportCard && isInWorkspace ?\n BUBBLE_TEXT_BOTTOM_PADDING_SMALL : BUBBLE_TEXT_BOTTOM_PADDING;\n\n final Resources res = getContext().getResources();\n float density = res.getDisplayMetrics().density;\n float fontScale = res.getConfiguration().fontScale;\n\n // adjust the padding for different font size:\n // standard text size = 10sp\n mTextPaddingBottom = standardPadding - (int) (density * (10 * (fontScale - 1.0f)));\n return mTextPaddingBottom;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height;\n }", "public int getHeight() {\n return height_;\n }", "public double getRectHeight() {\n return (hexHeight * 1.5) + 0.5;\n }", "public int height() {\n return height;\n }", "public int height() {\n return height;\n }", "public int height() {\n return height;\n }", "public float getHeight() {\r\n\t\treturn height;\r\n\t}", "public float getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight()\n {\n return height;\n }", "@java.lang.Override\n public long getHeight() {\n return height_;\n }", "@Override\n public float getH() {\n return h + font.getSize() + border.getH();\n }", "public static double getOrigHeight() {\n\t\treturn 42.65172576904297;\n\t}", "public int getHeight() {\n\t\treturn gfHeight;\n\t}", "public int getHeight() {\n\treturn height;\n}" ]
[ "0.6141084", "0.6112459", "0.61102074", "0.6089663", "0.5909586", "0.5845559", "0.58345795", "0.5720843", "0.5691115", "0.5633758", "0.5625684", "0.5625684", "0.5614413", "0.55970585", "0.55777246", "0.5573836", "0.5536236", "0.5507657", "0.5495026", "0.54947114", "0.5493482", "0.54554254", "0.5446649", "0.5441099", "0.54383606", "0.54383606", "0.5414131", "0.5379285", "0.5377324", "0.53614867", "0.53598905", "0.53579026", "0.5357565", "0.53561944", "0.5344621", "0.53391874", "0.5336144", "0.53360415", "0.5330367", "0.53287584", "0.53257716", "0.532452", "0.5322532", "0.531979", "0.5311665", "0.5305798", "0.53039044", "0.52964056", "0.5288408", "0.52882797", "0.5284915", "0.5284771", "0.5284172", "0.5279722", "0.5266916", "0.52667236", "0.52610815", "0.5260454", "0.5258483", "0.52432436", "0.5242541", "0.5241337", "0.5238362", "0.5238362", "0.5238362", "0.5238362", "0.5238362", "0.5238362", "0.5238362", "0.5238362", "0.5238362", "0.5238362", "0.5238362", "0.52345175", "0.5233436", "0.522457", "0.5222543", "0.5221329", "0.5219555", "0.5214981", "0.5214459", "0.52129066", "0.5212455", "0.5212455", "0.5212455", "0.5205683", "0.52026737", "0.5200336", "0.5200336", "0.5200336", "0.5195614", "0.51948524", "0.5191722", "0.5191722", "0.51915526", "0.5188113", "0.51871455", "0.5182596", "0.51814026", "0.518013" ]
0.6958414
0
Created by zyongliu on 23/11/16.
public interface Orders { Optional<Order> createOrder(User user, HashMap<String, Object> orderInfo); Optional<Order> findByUidOid(String uid, long oid); List<Order> findAllByUid(String username); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public void init() {\n }", "@Override\n public void func_104112_b() {\n \n }", "private void poetries() {\n\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void init() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n public void init() {}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void init() {\n\t}", "public void mo6081a() {\n }", "private void kk12() {\n\n\t}", "private void init() {\n\n\n\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "private void strin() {\n\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n public void initialize() { \n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n super.init();\n\n }", "private zza.zza()\n\t\t{\n\t\t}", "@Override\n public void function()\n {\n }" ]
[ "0.63929117", "0.62565947", "0.6202407", "0.61735445", "0.6147911", "0.6139102", "0.6139102", "0.6091609", "0.60466564", "0.5995249", "0.5982245", "0.5980238", "0.5979114", "0.5959059", "0.5942501", "0.5936818", "0.5936284", "0.5928931", "0.5920308", "0.59124476", "0.5893709", "0.5893709", "0.5883385", "0.58510023", "0.5847852", "0.5847852", "0.5847852", "0.5847852", "0.5847852", "0.5831381", "0.5822098", "0.58110803", "0.5807764", "0.5801484", "0.579957", "0.57891804", "0.57845795", "0.5784551", "0.57837576", "0.57820743", "0.5764442", "0.57595736", "0.5750281", "0.5750281", "0.57445097", "0.5743524", "0.5743524", "0.5743524", "0.57409674", "0.57409674", "0.57409674", "0.57400376", "0.57400376", "0.57400376", "0.5732847", "0.5732756", "0.5732756", "0.5724546", "0.5724546", "0.5724546", "0.5724546", "0.5724546", "0.5724546", "0.57156545", "0.5702458", "0.56930894", "0.56839955", "0.5683659", "0.567643", "0.56757784", "0.56684077", "0.5667255", "0.56640834", "0.5659006", "0.56572807", "0.5656124", "0.5653637", "0.5647711", "0.5638948", "0.5638948", "0.5638948", "0.5638948", "0.5638948", "0.5638948", "0.5638948", "0.56157535", "0.55937415", "0.55923533", "0.55922484", "0.55908144", "0.55895984", "0.5588862", "0.55831516", "0.5572684", "0.5572684", "0.5572652", "0.5565393", "0.5557377", "0.5557204", "0.55476147", "0.5539586" ]
0.0
-1
TODO: Due to the time limitation, I did not refactor this test though my approach would be the same as previous tests i.e define a page object for checkout and read all of the input and desired data via PropertyLoader class. Please have a look at SignInPage.java
@Test public void checkoutTest() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void SignInTest() throws InterruptedException {\n LoginTC login = new LoginTC(driver);\n login.LoginTest();\n\n SignInPagePO signInPage = new SignInPagePO(driver);\n\n\n //Step 1: Click On Users\n Assert.assertEquals(signInPage.clickUsers(), true,\"Opps!! unable to click Users\");\n\n //Step 2 :: Click On Managers\n\n Assert.assertEquals(signInPage.clickManagers(), true,\"Opps!! unable to click Managers\");\n\n //Step 3: Click On addmanager\n\n Assert.assertEquals(signInPage.clickAddmanager(), true,\"Opps!! unable to click addmanager\");\n\n //Step 1 :: Enter valid Username\n\n String firstname=\"testname\";\n Assert.assertEquals(signInPage.enterfirstName(firstname), true,\"Opps!! unable to enter first name\");\n\n //Step 1 :: Enter valid Username\n String lastname=\"testlastname\";\n Assert.assertEquals(signInPage.enterlasttName(lastname), true,\"Opps!! unable to enter last name\");\n\n\n }", "@BeforeMethod\n\tpublic void setUp(){\n\t\tinitialization();\n\t\tloginPage=new LoginPage();\n\t\thomePage=loginPage.login(props.getProperty(\"username\"), props.getProperty(\"password\"));\n\t}", "@Test\r\n\tpublic void login() throws Exception{\r\n\t\t\r\n\t\tSignInPage objSignInPage=new SignInPage(driver);\r\n\t\t\r\n\t\t//insert username and password\r\n\t\tobjSignInPage.signIn(Util_VU.LOGIN_ID,Util_VU.PASSWORD);\r\n\t\t\r\n\t\t//get\r\n\t\tString step2=driver.getTitle();\r\n\t\tSystem.out.println(step2);\r\n\t\t\r\n\t}", "@Test(description = \"Verify Login page elements\")\n @Issue(\"EZ-8885\")\n void verifyTextElementsOnLoginPage() {\n LoginPage loginPage = new LoginPage(BaseUrl.loginPageBaseUrl());\n loginPage.open().getPageLogoLink();\n loginPage.getSectionTitle();\n loginPage.getTitleRelatedToFields();\n\n\n SoftAssertions softly = new SoftAssertions();\n softly.assertThat(loginPage.getPageLogoLink()).isEqualTo(\"https://hotline.ua/public/i/logo-v2.svg\");\n softly.assertThat(loginPage.getSectionTitle()).isEqualTo(\"Вход\");\n softly.assertThat(loginPage.getTitleRelatedToFields()).isEqualTo(\"Заполните поля\");\n softly.assertThat(getBrowserConsoleErrors()).isFalse();\n softly.assertAll();\n }", "public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n @Issue(\"EZ-8885\")\n void verifyGeneralElementsOnLoginPage() {\n LoginPage loginPage = new LoginPage(BaseUrl.loginPageBaseUrl());\n loginPage.open().getStatusLoginFields();\n LoginPage.getButtonsStatus();\n\n SoftAssertions softly = new SoftAssertions();\n softly.assertThat(loginPage.getStatusLoginFields()).isTrue();\n softly.assertThat(LoginPage.getButtonsStatus()).isTrue();\n softly.assertThat(getBrowserConsoleErrors()).isFalse();\n softly.assertAll();\n\n }", "public LoginPOJO() {\n\n\t\tPageFactory.initElements(driver, this);\t\n\t}", "@Test (description = \"entering incorrect username\")\n public void negative_login_test1() {\n\n Driver.getDriver().get(ConfigurationReader.getProperty(\"smartbearUrl\"));\n\n//Lets start using PageObjectModel\n\n //#1 We need to create the object of class we want to use\n //instantiate here\n loginPage = new LoginPage();\n\n//#2 call the object to use the web elements\n //entering incorrect username\n loginPage.userNameInput.sendKeys(\"aaa\");\n\n //enter correct password\n String smartbear_password = ConfigurationReader.getProperty(\"smartbear_password\");\n loginPage.passwordInput.sendKeys(smartbear_password);\n\n loginPage.loginButton.click();\n loginPage.errorMessage.isDisplayed();\n\n //assert true that error message is displayed on the page\n Assert.assertTrue(loginPage.errorMessage.isDisplayed(), \"Error message is not displayed, Verification is FAILED!!!\");\n BrowserUtil.wait(3);\n\n }", "public interface AccountsPage extends Page {\n\n /**\n * Return the UI element of 'Login ID' field.\n *\n * @return the UI element of 'Login ID' field\n */\n WebElement getLoginIDField();\n\n /**\n * Return the UI element of 'Name' field.\n *\n * @return the UI element of 'Name' field\n */\n WebElement getNameField();\n\n /**\n * Return the UI element of 'Organization' field.\n *\n * @return the UI element of 'Organization' field\n */\n WebElement getOrganizationField();\n\n /**\n * Return the UI element of 'Status' select field.\n *\n * @return the UI element of 'Status' select field\n */\n WebElement getStatusSelectField();\n\n /**\n * Return the UI element of 'Search' button.\n *\n * @return the UI element of 'Search' button\n */\n WebElement getSearchButton();\n\n /**\n * Return the UI element of the table record at the given index, which starts from 1.\n *\n * @param idx The index of the table record.\n * @return the UI element of the table record at the given index\n */\n WebElement getTableRecordAtIndex(int idx);\n\n /**\n * Return the UI element of the column of the given table record with the column name.\n *\n * @param tableRecord the table record\n * @param columnName the column name\n * @return the UI element of the column\n */\n WebElement getColumnByName(WebElement tableRecord, String columnName);\n\n /**\n * Return the UI element of 'New Account' button.\n *\n * @return the UI element of 'New Account' button\n */\n WebElement getNewAccountButton();\n\n /**\n * Open the 'New Account' page.\n *\n * @return 'New Account' page object\n */\n NewAccountPage openNewAccountPage();\n\n /**\n * Open the 'Edit Account' page by the given Login ID text.\n *\n * @param loginID Login ID text\n * @return 'Edit Account' page object\n * @throws NoSuchElementException if the account being requested does not exist.\n */\n EditAccountPage openEditAccountPageByLoginID(String loginID) throws NoSuchElementException;\n\n}", "@Test\n public void loginTest() throws MalformedURLException{\n // User user=new User();\n loginPage.fillGmailAccountInput().hitNextbutton().fillPasswordInput();\n InboxPage inboxPage = loginPage.clickNextButton();\n Assert.assertTrue(inboxPage.isElementClickable(inboxPage.composeButton ));\n\n }", "@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}", "public LoginPage(){\n\t\tPageFactory.initElements(driver, this);\n\t\t\n\t}", "@Test\n\tpublic void checkPageLoginFlow() {\n\t driver.findElement(By.cssSelector(\"a.login\")).click();\n\n\t // Click login again on Login Page\n\t driver.findElement(By.cssSelector(\"button.login-page-dialog-button\")).click();\n\t\t \n\t // Enter Username & PW\n\t String username = \"username\";\n\t String password = \"password\";\n\n\t // Select and enter text for username and password\n\t driver.findElement(By.id(\"1-email\")).click();\n\t driver.findElement(By.id(\"1-email\")).sendKeys(username);\n\t driver.findElement(By.name(\"password\")).click();\n\t driver.findElement(By.name(\"password\")).sendKeys(password);\n\n\t // Verify Username box displayed\n\t boolean usernameElement = driver.findElement(By.id(\"1-email\")).isDisplayed();\n\t \tAssert.assertTrue(usernameElement, \"Is Not Present, this is not expected\");\n\t \n\t // Verify Password box displayed\n\t boolean passwordElement = driver.findElement(By.name(\"password\")).isDisplayed();\n\t \tAssert.assertTrue(passwordElement, \"Is Not Present, this is not expected\");\n\t}", "@Test\t\t\n\tpublic void validuser() {\n\t\tFile file = new File(\"C:\\\\Users\\\\gururaj.ravindra\\\\eclipse-workspace\\\\6D\\\\config.properties\\\\testdata.properties\");\n\t\t \n\t\tFileInputStream fileInput = null;\n\t\ttry {\n\t\t\tfileInput = new FileInputStream(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tProperties prop = new Properties();\n\t\t\n\t\t//load properties file\n\t\ttry {\n\t\t\tprop.load(fileInput);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\tWebDriver driver= BrowserFactory.StartBrowser(prop.getProperty(\"browserName\"),prop.getProperty(\"url\"));\n\t\tLoginPage login_page = PageFactory.initElements(driver, LoginPage.class);\n\t\tlogin_page.Validlogin(prop.getProperty(\"username\"),prop.getProperty(\"password\"));\n\t}", "@Test(dataProvider = \"getData\")\r\n\tpublic void basePageNavigation(String username, String password) throws IOException {\n\t\tdriver.get(props.getProperty(\"url\"));\r\n\r\n\t\tLandingPage lp = new LandingPage(driver);\r\n\t\t// Assert heading message is loaded\r\n\t\tSystem.out.println(\"Verifying if the heading message is loaded\");\r\n\t\tString logoText = lp.GetHeadingText().getText();\r\n\t\tAssert.assertEquals(logoText, \"By Players, For Players\");\r\n\r\n\t\t// clear values from username and password fields is any;\r\n\t\tif (!lp.GetEmailInputField().getAttribute(\"value\").isEmpty()\r\n\t\t\t\t|| !lp.GetPasswordInputField().getAttribute(\"value\").isEmpty()) {\r\n\t\t\tlp.GetEmailInputField().clear();\r\n\t\t\tlp.GetEmailInputField().clear();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"inserting username\");\r\n\t\tSystem.out.println(String.format(\r\n\t\t\t\t\"Inserting respective values for the fields \\\"Username\\\": \\\"%s\\\" and for \\\"Password\\\": \\\"%s\\\"\",\r\n\t\t\t\tusername, password));\r\n\t\tlp.GetEmailInputField().sendKeys(username);\r\n\t\tlp.GetPasswordInputField().sendKeys(password);\r\n\t\t// click on login button\r\n\t\tSystem.out.println(\"Clicking on login submit button\");\r\n\t\tlp.GetLoginSubmitButton().click();\r\n\t\t// Assert user is logged in successfully\r\n\t\tSystem.out.println(\"Verifying if the user is successfully logged in\");\r\n\t\tLoginPage lnPage = new LoginPage(driver);\r\n\t\tlnPage.GetVerifyButton().click();\r\n\t\tlnPage.GetAccountButton().click();\r\n\t\tString accountName = lnPage.GetAccountName().getText();\r\n\t\tAssert.assertEquals(accountName, \"john doe\");\r\n\t\t// logout from the site\r\n\t\tlnPage.GetLogoutButton().click();\r\n\t}", "public CheckOutPageTest()\n\t{\n\t\tsuper();\n\t}", "@BeforeMethod\n\tpublic void setUp() {\n\t\tinitialization();\n\t\tloginPage = new LoginPage();\n\n\t\thomePage = loginPage.login(prop.getProperty(\"username\"), prop.getProperty(\"password\"));\n\n\t\tSystem.out.println(\"Logged in successfully\");\n\n\t}", "public LoginPage(){\n\t\tPageFactory.initElements(driver, this);\n\t}", "@Test\n\tpublic void checkLoginPage() {\n\n\t\t// Locate the logo on the page\n\t\tWebElement logo = driver.findElement(By.xpath(\"(//a/img)[1]\"));\n\t\tString logoSrc = logo.getAttribute(\"src\");\n\n\t\t// Locate the heading of the page\n\t\tString heading = driver.findElement(By.className(\"auth-header\"))\n\t\t\t\t.getText();\n\n\t\t// Locate the Username related fields\n\t\tString usernameLabel = driver.findElement(By.xpath(\"(//label)[1]\"))\n\t\t\t\t.getText();\n\t\tWebElement usernameIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-user-male-circle\"));\n\t\tWebElement usernameTextField = driver.findElement(By.id(\"username\"));\n\t\tString placeholderText = usernameTextField.getAttribute(\"placeholder\");\n\n\t\t// Locate the Password related fields\n\t\tString passwordLabel = driver.findElement(By.xpath(\"(//label)[2]\"))\n\t\t\t\t.getText();\n\t\tWebElement passwordIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-fingerprint\"));\n\t\tWebElement passwordTextField = driver.findElement(By.id(\"password\"));\n\t\tString placeholderPassword = passwordTextField\n\t\t\t\t.getAttribute(\"placeholder\");\n\n\t\t// Locate the Sign in button\n\t\tWebElement signInButton = driver.findElement(By.id(\"log-in\"));\n\t\tString signInButtonText = signInButton.getText();\n\n\t\t// Locate the Remember me checkbox and label\n\t\tWebElement rememberMeCheckbox = driver\n\t\t\t\t.findElement(By.className(\"form-check-input\"));\n\t\tString rememberMeText = driver\n\t\t\t\t.findElement(By.className(\"form-check-label\")).getText();\n\n\t\t// Locate the social media icons\n\t\tWebElement twitterIcon = driver.findElement(By.xpath(\"(//a/img)[2]\"));\n\t\tString twitterSrc = twitterIcon.getAttribute(\"src\");\n\n\t\tWebElement facebookIcon = driver.findElement(By.xpath(\"(//a/img)[3]\"));\n\t\tString facebookSrc = facebookIcon.getAttribute(\"src\");\n\n\t\tWebElement linkedInIcon = driver.findElement(By.xpath(\"(//a/img)[4]\"));\n\t\tString linkedInSrc = linkedInIcon.getAttribute(\"src\");\n\n\t\t// Assert that the logo is displayed\n\t\tAssert.assertTrue(logo.isDisplayed());\n\t\tAssert.assertEquals(logoSrc,\n\t\t\t\t\"https://demo.applitools.com/img/logo-big.png\");\n\n\t\t// Add assertions for all elements displayed on the Login for,\n\t\tAssert.assertEquals(heading, \"Login Form\");\n\t\tAssert.assertEquals(usernameLabel, \"Username\");\n\t\tAssert.assertTrue(usernameIcon.isDisplayed());\n\t\tAssert.assertTrue(usernameTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderText, \"Enter your username\");\n\n\t\tAssert.assertEquals(passwordLabel, \"Password\");\n\t\tAssert.assertTrue(passwordIcon.isDisplayed());\n\t\tAssert.assertTrue(passwordTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderPassword, \"Enter your password\");\n\n\t\tAssert.assertTrue(signInButton.isDisplayed());\n\t\tAssert.assertEquals(signInButtonText, \"Log In\");\n\n\t\tAssert.assertTrue(rememberMeCheckbox.isDisplayed());\n\t\tAssert.assertFalse(rememberMeCheckbox.isSelected());\n\t\tAssert.assertEquals(rememberMeText, \"Remember Me\");\n\n\t\tAssert.assertTrue(twitterIcon.isDisplayed());\n\t\tAssert.assertEquals(twitterSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/twitter.png\");\n\n\t\tAssert.assertTrue(facebookIcon.isDisplayed());\n\t\tAssert.assertEquals(facebookSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/facebook.png\");\n\n\t\tAssert.assertTrue(linkedInIcon.isDisplayed());\n\t\tAssert.assertEquals(linkedInSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/linkedin.png\");\n\t}", "@BeforeMethod\n\tpublic void setup()\n\t{\n\t\tinitialization();\n\t\tlogin_page=new Loginpage();\n\t\thome_page=login_page.verifylogin(prop.getProperty(\"username\"), prop.getProperty(\"password\"));\t\n\t}", "@Test\n\n public void verifyRegistrationPageSLT() throws InterruptedException {\n ReadFromPropFile readFromPropFileObj = new ReadFromPropFile(\"RegiProfile.properties\");\n RegisterHealthcareProfPO registerHealthcareProfPOObj = new RegisterHealthcareProfPO(driver);\n\n //**********************Registration Screen************************************//\n\n //1. Click \"Sign in\" button\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.SignIN_xpath),\"Unable to click on SignIn link \");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on SignIn link \", \"User should able to click on sign in link\");\n\n //3. Click on \"Click Here\" button for healthcare office.\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.HireReg_xpath),\"Unable to 'Click Here' button\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on 'Click Here' button \", \"User should able to Click on 'Click Here' button \");\n\n //4.Enter \"Facility\" name\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.FacilityName_xpath,readFromPropFileObj.getFacilityName()),\"Unable to enter facilityName\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter facility name \", \"User should able to enter on facility name \");\n\n //5.Enter \"First name\"\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.FName_xpath, readFromPropFileObj.getFirstName()),\"Unable to enter First Name\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter first name \", \"User should able to enter first name \");\n\n //5A.Enter \"last name\"\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.LName_xpath, readFromPropFileObj.getLastName()),\"Unable to get LastName\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter last name \", \"User should able to enter on last name \");\n\n //6.Enter EmailID\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Email_xpath, readFromPropFileObj.getEmail1()),\"Unable to enter emailID\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter EmailID \", \"User should able to enter EmailID\");\n\n //7.Enter phone number\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Phone_xpath, readFromPropFileObj.getphone()),\"Unable to enter ph\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter phone number \", \"User should able to enter phone number\");\n\n //8.Enter department\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Dept_xath, readFromPropFileObj.getDept()),\"Unable to enter Dept\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter department \", \"User should able to enter department\");\n\n //9.Enter address\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Address_xpath, readFromPropFileObj.getAddress()),\"Unable to enter addrees\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter address \", \"User should able to enter address\");\n\n //10.Enter city\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.City_xpath, readFromPropFileObj.getCity()),\"Unable to enter city\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter department \", \"User should able to enter department\");\n\n ((JavascriptExecutor) driver).executeScript(\"window.scrollBy(0,3000)\");\n\n //11.Select State\n Assert.assertTrue(registerHealthcareProfPOObj.selectFromDropDownBtn(registerHealthcareProfPOObj.State_xpath, registerHealthcareProfPOObj.State1_xpath),\"Unable to select state\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Select state \", \"User should able to select state\");\n\n //12.Enter zip code\n Assert.assertTrue(registerHealthcareProfPOObj.enterTextInInputBtn(registerHealthcareProfPOObj.Zip_xpath, readFromPropFileObj.getZip()),\"Unable to enter zip\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Enter zip code \", \"User should able to enter zip code\");\n\n //13.Click \"Registor Now\" button\n Assert.assertTrue(registerHealthcareProfPOObj.clickOnLinkBtn(registerHealthcareProfPOObj.RegisterNow_xpath),\"Unable to click on register now\");\n ExtentTestManager.getTest().log(LogStatus.PASS, \"Click on 'Register Now'\", \"User should able to Click on 'Register Now' \");\n\n //14.User registered successfully and message should display - \"check inbox to verify your account\".\n String expectedMessage = \"Check inbox to verify your account.\";\n Assert.assertEquals(registerHealthcareProfPOObj.findText(registerHealthcareProfPOObj.VerifyAcct_xpath),expectedMessage);\n ExtentTestManager.getTest().log(LogStatus.PASS, \"User should see toast message 'Check inbox to verify your account'\", \"User able to see the toast message\");\n\n }", "@Test\n public void searchPageTest (){\n searchPage=new SearchPage();\n\n // loginPage.goToLoginPage();\n // loginPage.login();\n searchPage.searchKeysFromHeader(\"İphone\");\n searchPage.searchResultPage(\"İphone\");\n\n}", "public CheckoutOrderPage(WebDriver driver) {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t\tsuper(driver);\n\t\tcheckoutOrderPropertiesReader = new ObjectReader(PageConstant.CHECKOUT_ORDER_PROPERTIES_FILE_PATH);\n\t}", "public loginPage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "@Given(\"landing to the loginpage and signin\")\n\tpublic void user_on_login_page_andSignin() {\n\t\t\n\t\t\n\t\tdriver.findElement(By.className(\"login\")).click();\n\t\t\n\t}", "public GitHubSignInPage openSignInPage() {\n\t\tsignInBtn = driver.findElement(By.linkText(SIGNIN_BTN_ID));\n\t\tsignInBtn.click();\n\t\tSystem.out.println(\"Navigating to signin page...\");\n\n\t\treturn new GitHubSignInPage(driver);\n\t}", "public SignInStepsDefs() throws IOException {\n\t\tsuper();\n\t\tdriver = StepBaseSetup.driver;\n\t\t\n\t\tif(StepBaseSetup.isMobileUI()){\n\t\t\tlogin = PageFactory.initElements(driver, LoginPageMobile.class); \n\t\t} else {\n\t\t\tlogin = PageFactory.initElements(driver, LoginPage.class); \n\t\t}\n\t}", "@Test\n\tpublic void SignIn()\n\t{\n\t\tdriver.get(baseUrl);\n\t\tHomePage hp =new HomePage(driver);\n\t\thp.SignIn();\n\t\tString handle=driver.getWindowHandle();\n\t\tdriver.switchTo().window(handle);\n\t\t\n\t\t//2.\tLogin -Enter non-valid credentials. Expected error message is displayed\n\t\tLoginPage lp =new LoginPage(driver);\n\t\tlp.email(f);\n\t\tlp.password(p);\n\t\tlp.Login();\t\n\t\t\n\t\t// 3. Verify error message\n\t\tString ExpMsg = lp.Error_Mess();\n\t\tString DispMsg = (\"Authentication failed.\");\n\t\ttry\n\t\t{\n\t\t\tassertEquals(ExpMsg,DispMsg);\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//4.\tLogin -Enter wrong credentials. Expected error message is displayed\n\t\tlp.email(g);\n\t\tlp.password(p);\n\t\tlp.Login();\n\t\t\n\t\t//5.\tVerify error message\n\t\tString ExpMsg1 = lp.Error_Mess();\n\t\tString DispMsg1 = (\"Invalid email address.\");\n\t\ttry\n\t\t{\n\t\t\tassertEquals(ExpMsg1,DispMsg1);\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//6.\tLogin -Enter valid credentials and Sign in\n\t\tlp.Signin();\n\t\tlp.email(e);\n\t\tlp.password(p);\n\t\tlp.Login();\n\t}", "public SignInPage clickSignin() {\n\t\tclick(SIGNIN_LOCATOR);\n\t\treturn new SignInPage(driver);\n\t\t\n\t}", "public LoginPage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public LoginPage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public LoginPage()\n{\n\tPageFactory.initElements(driver, this);\n}", "public AccountPage Signup_through_loginpage() {\n\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\tjs.executeScript( \"arguments[0].click();\", SignUpButton );\n\tsignupPage.SignUp_Form();\n\treturn new AccountPage();\n\t}", "public void signInPage(Report signInReport) {\n\t\twaitForElementToBeClickable(\"id\", skipSignInButton,signInReport);\n\t\tsignInReport.passReporting(\"Login Page is displayed\");\n\t\tclick(\"id\", skipSignInButton, signInReport);\n\t}", "@Test(groups = {\"smoke tests\"})\n public void validPurchase() {\n page.GetInstance(CartPage.class)\n .clickProceedToCheckoutButton() //to OrderAddressPage\n .clickProceedToCheckoutButton() //to OrderShippingPage\n .acceptTermsAndProceedToCheckout() //to OrderPaymentPage\n .clickPayByBankWireButton() //to OrderSummaryPage\n .clickIConfirmMyOrderButton(); //to OrderConfirmationPage\n\n // Then\n page.GetInstance(OrderConfirmationPage.class).confirmValidOrder(\"Your order on My Store is complete.\");\n }", "@Test\n\tpublic void Authentication_01() throws InterruptedException\n\t{\n\t\tLandingPage lp = PageFactory.initElements(driver, LandingPage.class);\n\t\tLoginPage lg = PageFactory.initElements(driver, LoginPage.class);\n\t\tRegisterPage rp = PageFactory.initElements(driver, RegisterPage.class);\n\t\t//open login page\n\t\tlp.clickRegisterButton();\n\t\t\n\t\t//verify user has accessed login page\n\t\t//sa.assertEquals(lg.checkLoginText(), \"Login\", \"Register page is not accessed\");\n\t\t\n\t\t//verify all field is exist register page\n\t\t\n\t\tassertEquals(rp.avatarIsExist(), true, \"avatar is not exist\");\n\t\tassertEquals(rp.firstNameIsExist(), true, \"first name is not exist\");\n\t\thidekeyboard();\n\t\tassertEquals(rp.lastNameExist(), true, \"last name is not exist\");\n\t\tassertEquals(rp.emailExist(), true, \"email is not exist\");\n\t\tassertEquals(rp.passwordExist(), true, \"password is not exist\");\n\t\tassertEquals(rp.nextButtonIsExist(), true, \"next button is not exist\");\n\t\tassertEquals(rp.goBackButtonExist(), true, \"go back button is not exist\");\n\t}", "public LoginPage() {\r\n\t\t\t\r\n\t\t\t//Initialize webElements.\r\n\t\t\tPageFactory.initElements(driver, this);\r\n\t\t}", "public HomePage clickOnSignInButton() {\n driver.findElement(signInButton).submit();\n\n // Return a new page object representing the destination. Should the login page\n // ever\n // go somewhere else (for example, a legal disclaimer) then changing the method\n // signature\n // for this method will mean that all tests that rely on this behaviour won't\n // compile.\n return new HomePage(driver);\n }", "@Given(\"User is logging on MyStore\")\r\n public void searchingForProduct() {\n LoginPageNew login = new LoginPageNew(driver);\r\n MainPage main = new MainPage(driver);\r\n AccountPage accPage = new AccountPage(driver);\r\n AddingAnAddressForm addressForm = new AddingAnAddressForm(driver);\r\n login.loginAs(\"[email protected]\", \"123456\");\r\n main.goToAccPage();\r\n accPage.goToAddAddressForm();\r\n addressForm.fillingAddressForm(\"12\",\"Street Fighting Man\",\"02-223\",\"Sandia\",\"112322031\");\r\n accPage.goToMainPage();\r\n }", "public LoginPage(){\n PageFactory.initElements(driver, this); //all vars in this class will be init with this driver\n }", "@Given(\"^I am able to access the sign in page$\")\n public void i_am_able_to_access_the_sign_in_page() throws Throwable {\n bbcSite.bbcSignInPage().goToSignInPage();\n Assert.assertEquals(bbcSite.bbcSignInPage().getSignInPageURL(), bbcSite.getCurrentURL());\n }", "@Given(\"^I'm on \\\"([^\\\"]*)\\\" page of GetGo pay with valid \\\"([^\\\"]*)\\\" and \\\"([^\\\"]*)\\\"$\")\n public void i_m_on_page_of_GetGo_pay_with_valid_and(String arg1, String arg2, String arg3) throws Throwable {\n passworddetails=arg3;\n email=PropertyReader.testDataOf(arg2);\n if(Device.isAndroid()) {\n welcome.clickLogin();\n login.enterEmail(PropertyReader.testDataOf(arg2));\n login.clickNext();\n login.enterPassword(PropertyReader.testDataOf(arg3));\n //login.enterPassword(PropertyReader.dynamicReadTestDataOf(arg3));\n\n login.clickLogin();\n //dashboard.\n }\n else\n {\n login.iOSLoginFlow(PropertyReader.testDataOf(arg2),PropertyReader.testDataOf(arg3));\n }\n\n }", "protected void bootstrapImpl(PropertyReader bootstrapProperties)\n throws MissingRequiredPropertyException,\n InvalidPropertyValueException,\n BootstrapException {\n String loginPage = bootstrapProperties.get(\"xinsff.login.page\");\n if (loginPage != null) {\n _unrestrictedPages.add(loginPage);\n _unrestrictedPages.add(\"Control\");\n _unrestrictedPages.add(\"Logout\");\n String unrestrictedPages = bootstrapProperties.get(\"xinsff.unrestricted.pages\");\n if (unrestrictedPages != null && !unrestrictedPages.equals(\"\")) {\n StringTokenizer stUnrestricted = new StringTokenizer(unrestrictedPages, \",\", false);\n while (stUnrestricted.hasMoreTokens()) {\n String nextPage = stUnrestricted.nextToken();\n _unrestrictedPages.add(nextPage);\n }\n }\n } else {\n _unrestrictedPages.add(\"*\");\n }\n }", "public LoginBackendPage() {\n\t\t PageFactory.initElements(driver, this);\n\t}", "@Test\r\n\tpublic void validLoginTest()\r\n\t{\n\t\thomePOM.selectMyAccount();\r\n\t\t\r\n\t\t//select Login option from My Account\r\n\t\thomePOM.myAccountLogin();\r\n\t\t//read username from property file\r\n\t\tusername=properties.getProperty(\"username\");\r\n\t\t//read password from property file\r\n\t\tpassword=properties.getProperty(\"password\");\r\n\t\t\r\n\t\t//login to Application\r\n\t\tloginPOM.sendLoginDetails(username,password);\r\n\t\t\r\n\t\t//validate login\r\n\t\tloginPOM.loginValidate();\r\n\t\t\r\n\t\t\r\n\t}", "public LoginPage()\r\n\t{\r\n\t\tPageFactory.initElements(driver,this);\r\n\t}", "@Test\n public void testApplicationTest() throws MalformedURLException {\n\n // Open Application\n HomePage homePage = openApplication();\n log(\"Opened application\");\n\n // Click to SIgn In\n MainMenuPage mainMenuPage = homePage.clickToSignInLink();\n log(\"Clicked Sign In Link\");\n\n // Sign In\n MyAccountPage myAccountPage = mainMenuPage.signIn();\n log(\"Signed In\");\n\n // Click to Catalog\n ProductListPage productListPage = myAccountPage.clickToCatalog();\n log(\"Clicked Button Catalog\");\n\n // Click to filter Laptop Category\n productListPage.clickToFilter(CatalogList.LaptopCategory.getName());\n log(\"Clicked to filter laptop category\");\n\n // Click to filter Laptop SubCategory\n productListPage.clickToFilter(SubCategoryList.LaptopSubCategory.getName());\n log(\"Clicked to filter laptop subCategory\");\n\n // Click to filter not hart tasks\n productListPage.clickToFilter(GoalCategory.NotHardTasks.getName());\n log(\"Clicked to filter not hard tasks\");\n\n // Click to the first product\n ProductPage productPage = productListPage.clickToFirstProduct();\n log(\"Clicked to the first product\");\n\n // Click to button Buy Product\n CheckoutPage checkoutPage = productPage.clickBuyProduct();\n log(\"Clicked to button Buy Product\");\n\n // Click to Back\n checkoutPage.clickBack();\n log(\"Clicked to Back\");\n\n // Click to cart offer menu\n checkoutPage.clickCartOfferMenu();\n log(\"Clicked to cart offer menu\");\n\n // Click to delete product\n checkoutPage.clickDeleteProduct();\n log(\"Clicked to delete product\");\n\n // Check empty cart\n checkoutPage.checkEmptyCart();\n log(\"Checked empty cart\");\n\n // Close application\n closeApplication();\n log(\"Closed application\");\n\n }", "@BeforeMethod\n\tpublic void setup() {\n\t\tinitialization();\n\t\tloginpage = new LoginPage();\n\t\tcontactpage=new ContactPage();\n\t\ttestutil = new TestUtil();\n\t\thomepage=loginpage.login(prop.getProperty(\"username\"), prop.getProperty(\"password\"));\n\t}", "@BeforeMethod\n public void loadLoginPage(){\n driver.get(\"http://ec2-52-53-181-39.us-west-1.compute.amazonaws.com/\");\n Loginpage page = new Loginpage(driver);\n page.createAccount();\n }", "private void initPages() {\n\t\tloginPage = new LoginPage(driver);\n\t\tflipkart = new FlipkartPage(driver);\n\t\t\n\t}", "protected void doAdditionalPageInitialization(IPage page) {\n }", "@Test\n\tpublic void verifyForgetPasswordPageHeadingAndInfoTextAlongWithEmailField() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tAssert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordPageHeading), \"Recover your password\",\"Recover your password heading is not displaying in forget password page\");\n\t\tAssert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordInfoText), \"Please enter your email address to reset your password.\",\"Info text is not displaying as expected in forget password page\");\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordEmailInputField), \"Email field is not displaying in forget password page\");\n\t}", "public LoginPageTest()\n\t{\n\t\tsuper();\n\t}", "@Override\n public void doInit(Page page, Map<String, Object> args) throws Exception {\n Selectors.wireVariables(page, this, Selectors.newVariableResolvers(getClass(), null));\n\n UserCredential cre = authService.getUserCredential();\n if (cre == null || cre.isAnonymous()) {\n Executions.sendRedirect(\"/login/\");\n }\n }", "@Test\n public void stage03_testLogin() {\n String userName = \"\";\n String password = \"\";\n //Sign in\n SignIn signIn = new SignIn(driver);\n HomePage homePage = signIn.loginValidUser(userName, password);\n //Get login name\n String loginName = homePage.getLoginName();\n //Testing if login name is correct\n assertEquals(loginName, (userName));\n //logging\n if (loginName.equals(userName)) {\n logger.info(\"Loged in succesfully.\");\n logger.info(\"( stage02_testOpenLoginPage )Actual username : \" + loginName + password);\n } else {\n logger.error(\"Unable to login.\");\n logger.error(\"( stage02_testOpenLoginPage )Actual username : \" + loginName);\n }\n }", "public void loginCorporate(CorporateLoginData corporateLoginData) {\n type(By.name(\"auth[ACCOUNT]\"), corporateLoginData.getAccountnumber());\n click(By.xpath(\"//form[@id='authForm']/div[3]/button\"));\n if (isSelectedPresent(By.name(\"auth[PIN]\"))){ // searching the pin field, if true - fills pin and caller\n type(By.name(\"auth[PIN]\"), corporateLoginData.getPin());\n click(By.xpath(\"//form[@id='authForm']/div[3]/button\"));\n if (isSelectedPresent(By.name(\"auth[CALLER]\"))) {\n type(By.name(\"auth[CALLER]\"), corporateLoginData.getCaller());\n click(By.xpath(\"//form[@id='authForm']/div[3]/button\"));\n }\n } else if (isSelectedPresent(By.name(\"auth[PASSWORD]\"))){ // searching the password field, if true - fills password and caller\n type(By.name(\"auth[PASSWORD]\"), corporateLoginData.getPin());\n click(By.xpath(\"//form[@id='authForm']/div[3]/button\"));\n if (isSelectedPresent(By.name(\"auth[CALLER]\"))) {\n type(By.name(\"auth[CALLER]\"), corporateLoginData.getCaller());\n click(By.xpath(\"//form[@id='authForm']/div[3]/button\"));\n }\n } else if (isSelectedPresent(By.name(\"auth[CALLER]\"))){ // searching the caller field, if true - fills caller\n type(By.name(\"auth[CALLER]\"), corporateLoginData.getCaller());\n click(By.xpath(\"//form[@id='authForm']/div[3]/button\"));\n }\n }", "@Test\n\tpublic void verifyBackToLoginButtonInForgetPasswordPageAndItsNavigation() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordLoginPageLink), \"Back to login link isn't present in forgot password page\");\n\t\ttry {\n\t\t\tclick(forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}catch (Exception e) {\n\t\t\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.emailTextField);\n\t\twaitTill(1000);\n\t\tAssert.assertTrue(verifyElementPresent(loginPage.emailTextField), \"User isn't landing on login page on clicking back to login button from forgot password page\");\n\t}", "@Test\r\n\tpublic void test_2_SignIn() {\n\t\tdriver.findElement(By.cssSelector(\"#nav-link-accountList > span.nav-line-2\")).click();\r\n\t\tString signIn = driver.getTitle();\r\n\t\tAssert.assertEquals(signIn, \"Amazon Sign In\");\r\n\t\t// enter email\r\n\t\tdriver.findElement(By.id(\"ap_email\")).sendKeys(email);\r\n\t\t// enter password\r\n\t\tdriver.findElement(By.id(\"ap_password\")).sendKeys(password);\r\n\t\t// click on submit\r\n\t\tdriver.findElement(By.id(\"signInSubmit\")).click();\r\n\t\tSystem.out.println(\"Sign in is successful\");\r\n\t}", "@BeforeAll\n public static void classSetup() {\n\n loginPage = new LoginPage();\n }", "public SignInController() {\n\t\t\n\t\tread = new ReadTestFile();\n\t\t\n\t\tloginInformation = read.getLoginInformation();\n\t\tfor(LoginInformation item : loginInformation){\n\t\t\tSystem.out.printf(\"%s %s %s %s \\n\", item.getId(), item.getPassword(), item.getName(),item.getpassenger_contact());\n\t\t}\n\t\t/*loginInformation.add(new LoginInformation(\"moment\",\"123456\"));\n\t\tloginInformation.add(new LoginInformation(\"aaaaa\",\"aaaaa\"));\n\t\tloginInformation.add(new LoginInformation(\"mmmmm\",\"123\"));*/\n\t\t\n\t}", "@Test\n\tpublic void _02_loginWithValidCredentials() throws InterruptedException {\n\t\t\n\t\tlp = new LoginPage();\n\t\tThread.sleep(1000);\n\t\tlp.userName.clear();\n\t\tsendText(lp.userName, ConfigsReader.getProperty(\"username\"));\n\t\tlp.loginBtn.click();\n\t\tlp.password.clear();\n\t\tsendText(lp.password, ConfigsReader.getProperty(\"password\"));\n\t\tlp.loginBtn.click();\n\n\t\tThread.sleep(3000);//for demo purposes only\n\t\tpp = new ProfilePage();\n\t\tAssertJUnit.assertEquals(ConfigsReader.getProperty(\"username\"), pp.userName.getText());\n\t}", "public static void signin() {\n browseSetUp(chromeDriver, chromeDriverPath, url);\n // click on my account web element\n driver.findElement(By.cssSelector(\"#headerMyAccount > div.MyAccount__icon > div > div.HeaderIcon__primary > svg\")).click();\n // step two: enter your credentials\n //valid user name:\n driver.findElement(By.cssSelector(\"#SPSOSignIn > a > span\")).click();\n // step three: enter valid email\n driver.findElement(By.cssSelector(\"#email\")).sendKeys(\"[email protected]\");\n // valid passoword:\n driver.findElement(By.id(\"password-input-field\")).sendKeys(\"java206java206\");\n // click on sign in\n driver.findElement(By.cssSelector(\"#single-signin__body > div > div.col__12-12.col__8-12--xs.u--paddingNone-top.col__4-12--lg.col__4-12--md.col__6-12--sm > form > button > span\")).click();\n\n\n\n\n }", "@Test\n public void check_Login_Success() {\n lPage = new LoginPage(webDriver);\n lPage.login(\"admin\",\"admin\");\n hPage = new HomePage(webDriver);\n String loginText = hPage.getHomePageText();\n assertEquals(\"Congratulations!\",loginText);\n }", "@Test\n\t@Parameters({\"username\", \"password\", \"searchText\"})\n\tpublic void purchaseFlowTest(String username, String password, String searchText) {\n\t\t\n\t\tHomepage homepageObj = new Homepage(driver);\n\t\tSignInPage signInPageObj = new SignInPage(driver);\n\t\tResults resultsObj = new Results(driver);\n\t\tProductPage productObj = new ProductPage(driver);\n\t\tCartPage cartObj = new CartPage(driver);\n\t\t\n\t\t\n\t\t// Login to the app using the credentials passed by the testng XML file\n\t\t\n\t\tsignInPageObj.tapSignInButton();\n\t\tsignInPageObj.enterLoginDetails(username, password);\n\t\tsignInPageObj.tapSubmitButton();\n\t\t\n\t\t\n\t\t// Search for the query passed by the testng XML file\n\t\t\n\t\thomepageObj.enterSearchText(searchText);\n\t\t\n\t\t\n\t\t// Tap on a random search result and save its name\n\t\t\n\t\tString productName = resultsObj.tapOnAResult();\n\t\t\n\t\t// Verify that the product name displayed on the product details page is same as the name\n\t\t// that was mentioned on the results page \n\t\t\n\t\tassertTrue(productObj.getProductName().contains(productName));\n\t\t\n\t\t\n\t\t// Add the product to the cart and go to the cart view\n\t\t\n\t\tproductObj.adjustView();\n\t\tproductObj.tapAddToCartButton();\n\t\tproductObj.goToCart();\n\t\t\n\t\t\n\t\t// Verify that the product is present in the cart and the Checkout button is present\n\t\t\n\t\tassertTrue(cartObj.isCheckoutButtonPresent());\n\t\tString str = cartObj.getCartItem();\n\t\tassertTrue(productName.contains(str.substring(0, str.length()-4)));\n\t\t\n\t\t\n\t\t// Remove the product item from the cart and verify that it is removed\n\t\t\n\t\tcartObj.deleteItem();\n\t\tassertFalse(cartObj.isCheckoutButtonPresent());\n\t}", "public Loginpage()\n\t{\n\t\tPageFactory.initElements(driver, this);\n\t}", "@Test(priority=1)\r\n\tpublic void loginApp()\r\n\t{\r\n\t\t\r\n\t\tlogger=report.createTest(\"Login To Pymidol\");\r\n\t\r\n\t\tLoginPage loginPage=PageFactory.initElements(driver, LoginPage.class); //it will goto login page check all the locators initialise then it will return object of same class\r\n\t\t\r\n\t\tlogger.info(\"Starting Application\"); //it will provide information about test or test step\r\n\t\t\r\n\t\tloginPage.loginToPymidol(excel.getStringData(\"Login\", 0, 0), excel.getStringData(\"Login\", 0, 1));\r\n\t\t\r\n\t\tlogger.pass(\"Login done Success\");\r\n\t\r\n\t}", "public LoginPage() {\n }", "@Override\n protected void init(PageDto page, HttpServletRequest request, HttpServletResponse response, Model model) {\n\n }", "@Test(priority = 4)\n\tpublic void loginTest1() throws InterruptedException {\n\t\tHomePage home = new HomePage(this.driver);\n\t\tAssert.assertTrue(home.myAccountElementIsDisplayed());\n\t\thome.navigateToMyAccount();\n\t\tAssert.assertTrue(home.dropBoxMyAccountIsDisplayed());\n\t\t// After step must be openned small window when are few elements with Login btn\n\t\tLoginPage login = new LoginPage(this.driver);\n\t\tlogin = home.navigateToLogin();\n\t\tAssert.assertTrue(login.loginPageIsOpen());\n\t\t// After step by clicking login must be openned new ProfilePage\n\t\t// when user can write email and password and log in\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToEmailField(\"\");\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToPasswordField(\"\");\n\t\tThread.sleep(2000);\n\t\tlogin.navigateToLoginBtn();\n\t\tThread.sleep(2000);\n\t\tAssert.assertTrue(login.errorDisplayed());\n\t\thome.navigateToReturnHomePage();\n\t}", "@Test\r\n\tpublic void TC_02_verify_Registration_ValidData() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\t\r\n\t\t// Step 2: Enter valid registration details including first name,last name,email address, password and confirm password\r\n\t\t\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", confirmPassword);\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should be able to register themselves by verifying their credentials on registration page\r\n\t\t\r\n\t\tregUserInfo = Page_Registration.getRegisteredUserInfo();\r\n\t\tif (regUserInfo.toLowerCase().contains(firstName.toLowerCase())\r\n\t\t\t\t&& regUserInfo.toLowerCase().contains(lastName.toLowerCase()))\r\n\t\t\tSystem.out.println(\"User registered successfully\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"User could not be registered\");\r\n\r\n\t}", "@Test(description = \"Login con credenciales correctas\", enabled = false)\n\tpublic void login() {\n\t\tPageLogin pageLogin = new PageLogin(driver);\n\t\tPageReservation pageReservation = new PageReservation(driver);\n\t\tpageLogin.login(\"mercury\", \"imercury\");\n\t\tpageReservation.assertPage();\n\t\t//****Este código se cambió por A****\n\t\t/*driver.findElement(By.name(\"userName\")).sendKeys(\"mercury\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"mercury\");\n\t\tdriver.findElement(By.name(\"login\")).click();*/\n\t\t//******todo este código que se repite se cambió por B****\n\t\t/*try {\n\t\t\tThread.sleep(5);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t//****código B****\n\t\t/*Helpers helper = new Helpers();\n\t\thelper.sleepSeconds(4);*/\n\t\t//este codigo pasa a la Page Object(page reservation)\n\t\t//Assert.assertTrue(driver.findElement(By.xpath(\"/html/body/div/table/tbody/tr/td[2]/table/tbody/tr[4]/td/table/tbody/tr/td[2]/table/tbody/tr[3]/td/font\")).getText().contains(\"Flight Finder to search\"));\n\t}", "public SignInPage selectSignInButtonFromNavBar() {\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(navigationBarSignInLinkLocator))\n \t .click();\n \t\n \t new WebDriverWait (DRIVER, 5).until(\n \t\t\t ExpectedConditions.stalenessOf(DRIVER.findElement(navigationBarSignInLinkLocator)));\n \t \n return new SignInPage(); \n }", "@Test\n public void stage04_searchAndPage() {\n String keyWord = \"bilgisayar\";\n Integer pageNumber = 2;\n //Searching with parameters\n SearchKey searchKey = new SearchKey(driver);\n HomePage homePage = searchKey.search(keyWord, pageNumber);\n //Getting current url\n String currentUrl = homePage.getCurrentURL();\n //Testing if this is desired page\n assertEquals(currentUrl, \"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\");\n //logging\n if (currentUrl.equals(\"https://www.gittigidiyor.com/arama/?k=bilgisayar&sf=2\")) {\n logger.info(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n } else {\n logger.error(\"( stage02_testOpenLoginPage )Actual location : \" + currentUrl);\n }\n }", "@Test\r\n\tpublic void TC_06_verify_password_Mandatory_Field() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details except password\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", \"\");\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", confirmPassword);\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding password\r\n\t\t// is displayed\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Please enter a value for Password\");\r\n\r\n\t}", "public void page()\n {\n com.jayway.restassured.response.Response response= given().relaxedHTTPSValidation().when().get(\"http://18.222.188.206:3333/accounts?_page=3\");\n response.then().assertThat().statusCode(200);\n System.out.println(\"The list of accounts in the page 3 is displayed below:\");\n response.prettyPrint();\n }", "public void initPageComponents() {\n\t\t\n\t\tboolean showMeterID \t= false;\n\t\tboolean showBillerID \t= false;\n\t\tboolean showRegID\t\t= false;\n\t\tboolean fillMeterID\t\t= false;\n\t\tboolean fillBillerID \t= false;\n\t\tboolean fillRegID\t\t= false;\n\t\tif(billPayBean.getBillerId().equals(\"91901\")) { //prepaid\n\t\t\tshowMeterID \t= true;\n\t\t\tshowBillerID \t= true;\n\t\t\tfillMeterID\t\t= true;\n\t\t\tfillBillerID\t= true;\n\t\t} else if(billPayBean.getBillerId().equals(\"91951\")) { //postpaid\n\t\t\tshowBillerID \t= true;\n\t\t\tfillBillerID\t= true;\n\t\t} else if(billPayBean.getBillerId().equals(\"91999\")) { //nontaglis\n\t\t\tshowRegID\t\t= true;\n\t\t\tfillRegID\t\t= true;\n\t\t}\n\t\t\n\t\tfinal Form<BankBillPaymentConfirmPage> form = new Form<BankBillPaymentConfirmPage>(\"confirmBillPay\", \n\t\t\t\tnew CompoundPropertyModel<BankBillPaymentConfirmPage>(this));\n\t\tform.add(new FeedbackPanel(\"errorMessages\"));\n\t\tform.add(new Label(\"billPayBean.billerLabel\")); \n\t\tform.add(new Label(\"billPayBean.productLabel\"));\n\t\tform.add(new Label(\"billPayBean.billAmount\"));\n\t\tform.add(new AmountLabel(\"billPayBean.feeAmount\"));\n\t\tfinal boolean showNameandBillNumber = billPayBankNameList.contains(billPayBean.getBillerId());\n\t\tform.add(new Label(\"label.customer.name\", getLocalizer().getString(\"label.customer.name\", this)).setVisible(showNameandBillNumber)); \n\t\tform.add(new Label(\"billPayBean.customerName\").setVisible(showNameandBillNumber));\n\t\tform.add(new Label(\"label.meter.number\", getLocalizer().getString(\"label.meter.number\", this)).setVisible(showMeterID));\n\t\tform.add(new Label(\"billPayBean.meterNumber\").setVisible(fillMeterID));\n\t\tform.add(new Label(\"label.bill.number\", getLocalizer().getString(\"label.bill.number\", this)).setVisible(showBillerID));\n\t\tform.add(new Label(\"billPayBean.billNumber\").setVisible(fillBillerID));\n\t\tform.add(new Label(\"label.reg.number\", getLocalizer().getString(\"label.reg.number\", this)).setVisible(showRegID));\n\t\tform.add(new Label(\"billPayBean.regNumber\").setVisible(fillRegID));\n\t\t\n\t\tform.add(new PasswordTextField(\"billPayBean.pin\").add(new ErrorIndicator()));\n\t\t\n\t\taddSubmitButton(form);\n\t\t\n\t\tadd(form);\n\t}", "@Test(priority = 1)\n\tprotected void landingpageVerification() {\n\t\tAssert.assertEquals(spincoLandingPage.isLogoDisplayed(),true);\n\t\tspincoLandingPage.clickLoginRegister();\n\t}", "@Test\n\tpublic void TC_001() throws Exception {\n\t\tFileInputStream fi = new FileInputStream(\"./testdata/testdata.properties\");\n\t\tProperties prop = new Properties();\n\t\tprop.load(fi);\n\n\t\t// URL\n\t\tdriver.navigate().to(prop.getProperty(\"baseURL\"));\n\t\t// click on login link\n\t\tcfn.clickByAnyLocator(obj.Login_button);\n\t\tcfn.clickByAnyLocator(obj.Signin_signin_button);\n\t\n\t//\tThread.sleep(5000);\n\t\t// Click on submit button without enter any details\n\t\t\n\t cfn.validateTextMsg(obj.Signin_Email_Error_Msg, prop.getProperty(\"SigninEmailInvalidinputErrMsg\"));\n\t\tcfn.validateTextMsg(obj.Signin_Password_Error_Msg, prop.getProperty(\"SigninPasswordinputErrMsg\"));\n\t\tcfn.clickByAnyLocator(obj.Signin_signin_button);\n\t\t// Reresh the screen\n\t\tdriver.navigate().refresh();\n\t\tThread.sleep(5000);\n\t\t// Click on Continue button on confirmation alert\n\t\t//System.out.println(\"Confirmation Alert Text is: \"+driver.switchTo().alert().getText());\t\t\n\t\t//driver.switchTo().alert().accept();\n\t\t//Thread.sleep(5000);\t\n\t\t\n\t\t// enter valid data and signin\n\t\tcfn.sendKeysByAnyLocator(obj.Signin_Email_EditBox, prop.getProperty(\"Email\"));\n\t\tcfn.sendKeysByAnyLocator(obj.Signin__Password_EditBox, prop.getProperty(\"Password\"));\n\t cfn.clickByAnyLocator(obj.Signin_signin_button);\n\n\t}", "@Test(dataProvider = \"CreateData\", dataProviderClass = DataProviderClass.class)\n public void TC001_VerifyUserLogsInToP4GpageSuccessfully(HashMap<String, String> data) {\n PantryForGoodHomePage p4gPage = new PantryForGoodHomePage(driver);\n PantryForGoodSignInPage p4gSignIn = new PantryForGoodSignInPage(driver);\n p4gPage.navigateToURL(baseURL);\n //Sign In\n p4gSignIn.logInToHomePage(data.get(\"username\"), data.get(\"password\"));\n //Verify if user is logged in successfully\n p4gPage.isUserLoggedInSuccessfully(data.get(\"expectedUsername\"));\n //Log out\n p4gPage.signOut();\n }", "@Test\n public void testBrushes(){\n MainPage page1 = new MainPage(getDriver());\n page1.findBrushes();\n\n //enter and check the price range\n BrushesPage brushes = new BrushesPage(getDriver());\n brushes.writeRange();\n brushes.openAllBrushes();\n brushes.checkRange();\n\n //add brush and go to basket\n brushes.addBrush();\n brushes.goToBasket();\n\n //free delivery, total price, add brushes\n BasketPage basket = new BasketPage(getDriver());\n basket.freeDelivery();\n int totalPrice = basket.checkTotalPrice();\n basket.addBrushesForFreeDelivery(totalPrice);\n basket.checkFreeDelivery();\n basket.checkAllValues();\n }", "@Test\n\tpublic void Authentication_04() throws InterruptedException\n\t{\n\t\tRegisterPage rp = PageFactory.initElements(driver, RegisterPage.class);\n\t\t\n\t\trp.inputField(\"wesley\", \"11\", \"wesley11\", \"12345678\");\n\t\t\n\t\t\n\t\t//verify validation is displayed\n\t\tassertEquals(rp.messageValidationIsExist(\"Username is not a valid email address\"), true,\"Message validation is not displayed\");\n\t\t\n\t\trp.clickOkMessageValidationButton();\n\t\t//rp.clearField();\n\t\t\n\t\t\n\t}", "@Test\n\tpublic void testUserSignupLogin() {\n\t\tdriver.get(baseURL + \"/signup\");\n\t\tAssertions.assertEquals(\"Sign Up\", driver.getTitle());\n\t\tSignupPage signupPage = new SignupPage(driver);\n\t\tsignupPage.signup(firstName, lastName, username, password);\n\n\t\t//user logs in\n\t\tdriver.get(baseURL + \"/login\");\n\t\tLoginPage loginPage = new LoginPage(driver);\n\t\tloginPage.loginUser(username, password);\n\n\t\t//verifies that the home page is accessible\n\t\tAssertions.assertEquals(\"Home\", driver.getTitle());\n\t}", "@Override\n public void afterPropertiesSet() {\n // TODO: instead of autowiring initialize page objects with proxies\n try {\n Field mapField = Validator.class.getDeclaredField(\"map\");\n mapField.setAccessible(true);\n mapField.set(validator, map);\n\n Field uiField = Validator.class.getDeclaredField(\"ui\");\n uiField.setAccessible(true);\n uiField.set(validator, ui);\n } catch (ReflectiveOperationException e) {\n throw new RuntimeException(\"Could not instantiate the page object!\", e);\n }\n }", "@Test(priority=0)\n \n public void test_Login(){\n \tobjLogin = new PilrLogin(driver);\n \n \t//Verify login page title\n \tString loginPageTitle = objLogin.getPageSource();\n \tAssert.assertTrue(loginPageTitle.toLowerCase().contains(\"sign in\"));\n\n \n \t//login to application\n \tobjLogin.loginToPilr(objtestvars.getUserName(), \n \t\t\tobjtestvars.getPassWrd());\n \n \t// go the next page\n \tobjHomePage = new PilrHomePage(driver);\n \n \t//Verify home page\n \tAssert.assertTrue(objHomePage.getHomePageWelcome().toLowerCase().contains(\n \t\t\t\"welcome back, bikerjohn!\"));\n \tSystem.out.println(\"[Test Case]Home Page Verified\");\n }", "public LoginPageObject(WebDriver mappingDriver) {\r\n\t\tdriver = mappingDriver;\r\n\t}", "@Parameters(\"browser\")\n @Test\n public void ossSignInValidTest() {\n OSSHome ossHome = new OSSHome();\n OSSSignIn ossSignIn =\n ossHome.header.navigateToOSSSignIn().signInto(\"[email protected]\", \"123456\");\n assertThat(ossSignIn.header.viewCustomerAccount, text(\"Please signup\"));\n }", "private void signIn() {\n }", "@BeforeEach\n public void beforeTest() {\n loginPage.navigateToLoginPage();\n }", "public void VerifyDetailsin_Cart_inCheckout(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Image, ItemDesc, ItemNum, Price, Quantity, Inc/Exec tax, Remove and change in Cart in Checkout\");\r\n\r\n\t\ttry{\r\n\t\t\tString image= getPropertyValue(locator_split(\"imgCartinCheckout\"), \"src\");\r\n\t\t\tString ItemDesc = getText(locator_split(\"txtItemDescCartinCheckout\"));\r\n\t\t\tString ItemNum = getText(locator_split(\"txtitemNumCartinCheckout\"));\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"lnkRemChanCartinCheckout\"));\r\n\t\t\tString Remove = getText(ele.get(0));\r\n\t\t\tString change = getText(ele.get(1));\r\n\t\t\tString Price = getText(locator_split(\"txtpriceCartinCheckout\"));\r\n\t\t\tList<WebElement> ele1 = listofelements(locator_split(\"txtIncExctaxinCartinCheckout\"));\r\n\t\t\tString Tax= getText(ele1.get(0));\r\n\t\t\tString Quantity = getText(locator_split(\"txtQuantityCartinCheckout\"));\r\n\t\t\tString UnitofMeasure= getText(locator_split(\"txtUnitofmeasureCartinCheckout\"));\r\n\t\t\tSystem.out.println(\"Following details are present in CartinCheckout \\n\"+image+\"\\n\"+\r\n\t\t\t\t\tItemDesc+\"\\n\"+ItemNum+\"\\n\"+Remove+\"\\n\"+change+\"\\n\"+Price+\"\\n\"+Tax+\"\\n\"+Quantity+\"\\n\"+UnitofMeasure+\"\\n\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Following details are present in CartinCheckout \\n\"+image+\"\\n\"+\r\n\t\t\t\t\tItemDesc+\"\\n\"+ItemNum+\"\\n\"+Remove+\"\\n\"+change+\"\\n\"+Price+\"\\n\"+Tax+\"\\n\"+Quantity+\"\\n\"+UnitofMeasure+\"\\n\");\r\n\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkRemChanCartinCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtIncExctaxinCartinCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void enterURL() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"enter signup url to create child company\");\n\t\t// driver.get(\"http://www.simplebilling.co.in:8080/signup\");\n\t\tp.getPropertyFile(\"test\", \"configuration.properties\");\n\t\tString url = p.getVal(\"url\");\n\t\tdriver.get(url);\n\t}", "@Override\n public void testRenderMyPage() {\n\n\tsetMockSupportedCarriers(dailyRhythmPortalService);\n\n\tEntitlementLookup entitlementLookup = EntitlementLookupFactory.getEntitlementLookup();\n\n\t// start and render the test page\n\tEntitlementLookupPage page = new EntitlementLookupPage(entitlementLookup, null, null);\n\ttester.startPage(page);\n\n\t// Check that the right page was rendered (no unexpected redirect or\n\t// intercept)\n\ttester.assertRenderedPage(EntitlementLookupPage.class);\n\ttester.assertNoErrorMessage();\n\n\tassertNavigation();\n }", "public void VerifyViewCartandPrintinCheckout(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- View Cart and Print Cart should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tList<WebElement> ele = listofelements(locator_split(\"lnkViewPrintCart\"));\r\n\t\t\tif(ele.size()==2){\r\n\t\t\t\tSystem.out.println(\"View Cart -\"+ele.get(1).getText()+\" and print Cart -\"+ele.get(0).getText()+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- View Cart \"+ele.get(1).getText()+\" and print Cart \"+ele.get(0).getText()+\" is present\");\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"View cart or Print or both is not present\");\r\n\t\t\t}\r\n\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- View cart or Print or both is not present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkViewPrintCart\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testContentDefaultValues() throws Exception\n {\n assertEquals( projectName + \"-portlet\", page.getPortletPluginProject() );\n assertTrue( page.getSourceFolderText().contains( \"docroot/WEB-INF/src\" ) );\n assertEquals( \"NewVaadinPortletApplication\", page.getApplicationClassText() );\n assertEquals( \"com.test\", page.getJavaPackageText() );\n assertEquals( \"com.vaadin.Application\", page.getSuperClassCombobox() );\n assertEquals( \"com.vaadin.terminal.gwt.server.ApplicationPortlet2\", page.getVaadinPortletClassText() );\n // page2\n page.next();\n assertEquals( \"newvaadinportlet\", page2.getPortletName() );\n assertEquals( \"NewVaadinPortlet\", page2.getDisplayName() );\n assertEquals( \"NewVaadinPortlet\", page2.getPortletTitle() );\n assertFalse( page2.get_createResourceBundleFileCheckbox().isChecked() );\n assertEquals( \"content/Language.properties\", page2.getResourceBundleFilePath() );\n // page3\n page.next();\n assertFalse( page3.isEntryCategoryEnabled() );\n assertFalse( page3.isEntryWeightEnabled() );\n assertFalse( page3.isCreateEntryClassEnabled() );\n assertFalse( page3.isEntryClassEnabled() );\n\n assertEquals( \"/icon.png\", page3.getIconText() );\n assertEquals( false, page3.isAllowMultipleInstancesChecked() );\n assertEquals( \"/css/main.css\", page3.getCssText() );\n assertEquals( \"/js/main.js\", page3.getJavaScriptText() );\n assertEquals( \"newvaadinportlet-portlet\", page3.getCssClassWrapperText() );\n assertEquals( \"Sample\", page3.getDisplayCategoryCombobox() );\n assertEquals( false, page3.isAddToControlPanelChecked() );\n assertEquals( \"My Account Administration\", page3.getEntryCategoryCombobox() );\n assertEquals( \"1.5\", page3.getEntryWeightText() );\n assertEquals( false, page3.isCreateEntryClassChecked() );\n assertEquals( \"NewVaadinPortletApplicationControlPanelEntry\", page3.getEntryClassText() );\n }", "public void SwichLogingPageAndSignIn()\r\n {\r\n WaitTime(2000);\r\n driver.navigate().to(\"https://www.n11.com/giris-yap\");\r\n \r\n driver.findElement(By.cssSelector(\"#email\")).sendKeys(\"[email protected]\");\r\n WaitTime(2000);\r\n driver.findElement(By.cssSelector(\"#password\")).sendKeys(\"nacre123456\");\r\n WaitTime(2000);\r\n driver.findElement(By.cssSelector(\"#loginButton\")).click();\r\n \r\n }", "public interface ISignInPresenter {\n void checkUserInfo(String url, Map<String,String>par);\n void signInFail(String msg);\n void signInSucceed(UserBean userBean);\n}", "@BeforeClass\n public void beforeTest(){\n LoginRegistrationPage loginRegistrationPage = new LoginRegistrationPage(getDriver());\n homePage = loginRegistrationPage.loginFormFillAndSubmit(\"[email protected]\", \"edcvfr789\");\n Assert.assertTrue(homePage.isPageLoaded());\n }", "@Test(priority=1)\n\tpublic void LoginPageTest() {\n\t\tloginpage.testLogin();\n\t\t\n\t}", "public void VerifyCartCheckout_Coupon_OrderSumamrysections(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- cartcheckout, coupon and Order summary should be present in checkout page\");\r\n\r\n\t\ttry{\r\n\t\t\tif(isElementPresent(locator_split(\"boxCheckoutCartCheckout\")) & isElementPresent(locator_split(\"boxCheckoutCoupon\"))\r\n\t\t\t\t\t& isElementPresent(locator_split(\"boxCheckoutOrderSummary\"))){\r\n\t\t\t\tSystem.out.println(\"cartcheckout, coupon and Order summary is present in checkout page\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- cartcheckout, coupon and Order summary is present in checkout page\");\r\n\t\t\t}else{\r\n\t\t\t\tthrow new Exception(\"cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- cartcheckout/coupon/Order summary are not present in checkout page\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutCartCheckout\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutCoupon\")\r\n\t\t\t\t\t+ elementProperties.getProperty(\"boxCheckoutOrderSummary\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Test(dataProviderClass = DataProviderUtils.class, dataProvider = \"excelDataReader\",groups = {\"Sprint41\"}, description = \"Enabling Automatic Login checkbox should enable user name, password, domain and document vault fields based on the default authentication type\")\r\n\tpublic void SprintTest41_8_1A(HashMap<String,String> dataValues, String driverType) throws Exception {\r\n\r\n\t\tdriver = null; \r\n\r\n\t\ttry {\r\n\r\n\r\n\r\n\r\n\t\t\tdriver = WebDriverUtils.getDriver();\r\n\r\n\t\t\tConcurrentHashMap <String, String> dataPool = new ConcurrentHashMap <String, String>(dataValues);\r\n\r\n\t\t\tConfigurationPage configurationPage = LoginPage.launchDriverAndLoginToConfig(driver, true); //Launched driver and logged in\r\n\r\n\t\t\t//Step-1 : Navigate to General in tree view\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.treeView.clickTreeViewItem(Caption.ConfigSettings.GeneralSettings.Value + \">>\" + Caption.ConfigSettings.General.Value);\r\n\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getPageName().toUpperCase().equalsIgnoreCase(\"GENERAL - GENERAL SETTINGS\"))\r\n\t\t\t\tthrow new Exception(\"General settings page in configuration is not opened.\");\r\n\r\n\t\t\tLog.message(\"1. Navigated to General page.\");\r\n\r\n\t\t\t//Step-2 : Enable Default authentication type \r\n\t\t\t//-------------------------------------------\r\n\r\n\t\t\tconfigurationPage.configurationPanel.setDefaultAuthType(dataPool.get(\"AuthenticationType\")); //Enable automatic login checkbox\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getDefaultAuthType().equals(dataPool.get(\"AuthenticationType\")))\r\n\t\t\t\tthrow new Exception(\"Default authentication type (\" + dataPool.get(\"AuthenticationType\") + \") check box is not enabled.\");\r\n\r\n\t\t\tLog.message(\"2. Default authentication type (\" + dataPool.get(\"AuthenticationType\") + \") check box is enabled.\");\r\n\r\n\t\t\t//Step-3 : Enable Automatic Login check box\r\n\t\t\t//-----------------------------------------\r\n\t\t\tconfigurationPage.configurationPanel.setAutoLogin(true); //Enable automatic login checkbox\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.getAutoLogin())\r\n\t\t\t\tthrow new Exception(\"Automatic login check box is not enabled.\");\r\n\r\n\t\t\tLog.message(\"3. Automatic login check box is enabled.\");\r\n\r\n\t\t\t//Verification : Verify that User name, password, domain and vault fields are in enabled state based on the authentication type\r\n\t\t\t//-----------------------------------------------------------------------------------------------------------------------------\r\n\t\t\tString addlInfo = \"\";\r\n\t\t\tString passInfo = \"\";\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.isAutoLoginUserNameEnabled()) //Checks if User name enabled\r\n\t\t\t\taddlInfo = \"Auto Login User Name is not enabled;\";\r\n\t\t\telse\r\n\t\t\t\tpassInfo = \"User name,\";\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.isAutoLoginPasswordEnabled()) //Checks if User name enabled\r\n\t\t\t\taddlInfo += \"Auto Login Password is not enabled;\";\r\n\t\t\telse\r\n\t\t\t\tpassInfo += \" Password,\";\r\n\r\n\t\t\tif (configurationPage.configurationPanel.getDefaultAuthType().equalsIgnoreCase(\"Windows user\"))\r\n\t\t\t\tif (!configurationPage.configurationPanel.isAutoLoginDomainEnabled()) //Checks if User name enabled\r\n\t\t\t\t\taddlInfo += \"Auto Login Domain is not enabled;\";\r\n\t\t\t\telse\r\n\t\t\t\t\tpassInfo += \" Domain,\";\r\n\r\n\t\t\tif (!configurationPage.configurationPanel.isAutoLoginVaultEnabled()) //Checks if User name enabled\r\n\t\t\t\taddlInfo += \"Auto Login Vault is not enabled;\";\r\n\t\t\telse\r\n\t\t\t\tpassInfo += \" Select vault\";\r\n\r\n\t\t\tif (addlInfo.equals(\"\")) //Verifies default layout have selected default custom layout\r\n\t\t\t\tLog.pass(\"Test case Passed. Enabling auto login enabled (\" + passInfo + \") for the default authentication type (\" + dataPool.get(\"AuthenticationType\") + \").\");\r\n\t\t\telse\r\n\t\t\t\tLog.fail(\"Test case Failed. Enabling auto login is not as expected. Additional information : \" \r\n\t\t\t\t\t\t+ addlInfo, driver);\r\n\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tLog.exception(e, driver);\r\n\t\t} //End catch\r\n\r\n\t\tfinally {\r\n\t\t\tUtility.quitDriver(driver);\r\n\t\t} //End finally\r\n\r\n\t}", "@Test\r\n\tpublic void TC_07_verify_Confirmpassword_Mandatory_Field() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details except confirm password\r\n\t\t\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", \"\");\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding confirm password\r\n\t\t// is displayed\r\n\t\t\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Please enter a value for Confirm Password\");\r\n\r\n\t}", "@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }" ]
[ "0.60776234", "0.58444333", "0.58294314", "0.5826714", "0.57656264", "0.576538", "0.5714908", "0.57030886", "0.5685038", "0.56842357", "0.5675336", "0.565132", "0.56460065", "0.5635401", "0.5596446", "0.5565379", "0.55625117", "0.5561723", "0.5560627", "0.55572647", "0.5544989", "0.55385447", "0.553015", "0.54841125", "0.5468307", "0.54616106", "0.5439498", "0.5421984", "0.5405634", "0.5399221", "0.5399221", "0.5397692", "0.53971237", "0.5394919", "0.53920734", "0.5386619", "0.5385518", "0.5378383", "0.53710353", "0.53638524", "0.5357777", "0.5335117", "0.533066", "0.5328083", "0.53035533", "0.5273873", "0.52525884", "0.5252147", "0.52486676", "0.52480906", "0.5246241", "0.52411187", "0.5229798", "0.5214732", "0.52133816", "0.52079636", "0.5205954", "0.51987463", "0.51939607", "0.51915663", "0.5189932", "0.5187234", "0.51789767", "0.5171032", "0.51408064", "0.5133536", "0.5121246", "0.511754", "0.5112065", "0.5097016", "0.5092994", "0.5092936", "0.50841194", "0.50809634", "0.50752735", "0.50720835", "0.50478363", "0.50472397", "0.504368", "0.50431514", "0.503518", "0.50334054", "0.5030365", "0.5026011", "0.50206465", "0.5020492", "0.50154054", "0.501518", "0.501508", "0.50081676", "0.49996823", "0.49867168", "0.49852532", "0.49847242", "0.49766695", "0.49705115", "0.49667823", "0.49653876", "0.49618948", "0.49518862", "0.4944064" ]
0.0
-1
Specifies the number of nested NS instances required for the NS scale level.
public String getNumberOfInstances() { return numberOfInstances; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getScaleCount();", "public void InitializeMaxNumInstances(int num) {\n }", "public void setScale(double n) {\n\n\t}", "protected int numChildren() {\r\n return 3;\r\n }", "void setNoOfBuckets(int noOfBuckets);", "public void setChildCount (int childCount) {\n this.childCount = childCount;\n }", "public void setNumChildren(StringWithCustomFacts numChildren) {\n this.numChildren = numChildren;\n }", "void setMaxScale(int value);", "public void setTreeSize(Double newtreesize)\n {\n treesize = newtreesize; \n }", "public final int dimension() { return _N; }", "public NumberOfNodesBasedConfig(int numberOfNodes) {\n this.numberOfNodes = numberOfNodes;\n }", "public int getSize(){\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE NUMBER OF NODES IN THE TREE AND STORE THE VALUE IN CLASS VARIABLE \"size\"\n * RETURN THE \"size\" VALUE\n *\n * HINT: THE NMBER OF NODES CAN BE UPDATED IN THE \"size\" VARIABLE EVERY TIME A NODE IS INSERTED OR DELETED FROM THE TREE.\n */\n\n return size;\n }", "private void initializeNoxItemSize(TypedArray attributes) {\n float noxItemSizeDefaultValue = getResources().getDimension(R.dimen.default_nox_item_size);\n float noxItemSize = attributes.getDimension(R.styleable.nox_item_size, noxItemSizeDefaultValue);\n noxConfig.setNoxItemSize(noxItemSize);\n }", "int childrenSize();", "public void setNumberOfInstances(int numberOfInstances) {\n\t\tthis.numberOfInstances = numberOfInstances;\n\t}", "default void setSpikesPerChunk(int count) {\n setSpikesPerChunk(VariableAmount.fixed(count));\n }", "public void setNumObjects(int x)\n\t{\n\t\tthis.numObjects = x;\n\t}", "public abstract int getNumChildren();", "void setSpikesPerChunk(VariableAmount count);", "public int getChildCount();", "int getChildCount();", "public int getChildCount()\n/* */ {\n/* 500 */ return this.children.size();\n/* */ }", "@Override\n public int getSize() {\n return nodos.size();\n }", "public int getCapacity() {\n\t\tfinal String key = ConfigNames.CHILD_THREADS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn getJson().getInt(key);\n\t}", "public void setNumPoints(int np);", "public void setNumChildren(String numChildren) {\n this.numChildren = numChildren == null ? null : new StringWithCustomFacts(numChildren);\n }", "public Size calcSize(ChartOptions options) {\n Node n = this; // current node in the level\n Size s = new Size(); // alt,iter,opt: size of current construct\n int iterCompensation = 0;\n boolean samelevel = true; // next node in same level?\n int realHeight = n.calcHeight(options);\n Size maxTotalSize = new Size(0, 0);\n while (n != null && samelevel) {\n switch (n.typ) {\n case PREDICATE:\n case EXCEPTION:\n case TERM:\n case NONTERM:\n n.size.setHeight(\n options.fontHeight() + options.symbolGapHeight() * 2\n + options.componentGapHeight());\n n.size.setWidth(options.stringWidth(n.sym.name) + options.symbolGapWidth() * 2);\n if (n.typ.matches(NodeType.TERM, \n NodeType.EXCEPTION, \n NodeType.PREDICATE)) {\n n.size.maxWidth(options.arcSize());\n }\n\n if (!n.up && n.next != null && n.next.typ == NodeType.WRAP\n && n.next.size.getHeight() == 0)\n {\n if (!n.next.up\n && n.next.next != null\n && (n.next.next.typ.matches(NodeType.TERM, \n NodeType.NONTERM, \n NodeType.EXCEPTION,\n NodeType.PREDICATE)))\n {\n s.incWidth(options.componentGapWidth() / 2);\n }\n }\n if (!n.up\n && n.next != null\n && (n.next.typ.matches(NodeType.TERM,\n NodeType.NONTERM,\n NodeType.EXCEPTION,\n NodeType.PREDICATE)))\n {\n s.incWidth(options.componentGapWidth() / 2);\n }\n break;\n case EPS:\n n.size.setHeight(\n options.fontHeight()\n + options.componentGapHeight());\n n.size.setWidth(options.componentGapWidth());\n break;\n case OPT:\n n.size = n.sub.calcSize(options);\n n.size.incWidth(options.componentGapWidth() * 2);\n n.size.incHeight(\n options.componentGapHeight() / 2\n + options.componentGapHeight());\n break;\n case ITER:\n n.size = n.sub.calcSize(options);\n n.size.incWidth(options.componentGapWidth() * 2);\n n.size.incHeight(options.componentGapHeight() / 2);\n break;\n case WRAP:\n maxTotalSize.incHeight(\n s.getHeight()\n - options.componentGapHeight() / 2);\n maxTotalSize.maxWidth(s.getWidth());\n s.setHeight(0);\n s.setWidth(0);\n break;\n case RERUN:\n n.size = n.sub.calcSize(options);\n if (n.itergraph != null) {\n n.altSize = n.size;\n n.iterSize = n.itergraph.calcSize(options);\n n.size.maxWidth(n.iterSize.getWidth());\n n.size.incHeight(\n options.fontHeight() * 3 / 2\n + options.componentGapHeight());\n } \n n.size.incHeight(options.componentGapHeight() / 2);\n \n n.size.incWidth(options.componentGapWidth() * 2);\n break;\n case ALT: {\n Node a = n;\n int maxH = -options.componentGapHeight();\n int maxW = 0;\n while (a != null) {\n a.size = a.sub.calcSize(options);\n maxH += a.size.getHeight();\n if (a.size.getWidth() > maxW) {\n maxW = a.size.getWidth();\n }\n a = a.down;\n }\n if (n.sub.typ == NodeType.ITER && realHeight != 0) {\n maxH +=\n (options.fontHeight() + options.componentGapHeight())\n / 2;\n }\n maxW += 2 * options.componentGapWidth();\n maxH += options.componentGapHeight();\n\n n.altSize.setHeight(maxH);\n n.altSize.setWidth(maxW);\n }\n break;\n }\n if (n.typ == NodeType.ITER && realHeight != 0) {\n iterCompensation = (options.fontHeight() + options\n .componentGapHeight()) / 2;\n }\n if (n.typ == NodeType.ALT) {\n s.maxHeight(n.altSize.getHeight());\n s.incWidth(n.altSize.getWidth());\n } else {\n s.maxHeight(n.size.getHeight());\n s.incWidth(n.size.getWidth());\n }\n if (n.typ == NodeType.ITER) {\n s.maxHeight(n.size.getHeight() + iterCompensation);\n }\n if (n.up) {\n samelevel = false;\n }\n n = n.next;\n }\n if (maxTotalSize.getWidth() != 0) {\n maxTotalSize.incHeight(\n s.getHeight() - options.componentGapHeight()\n / 2);\n maxTotalSize.maxWidth(s.getWidth());\n return maxTotalSize;\n } else {\n return s;\n }\n }", "int getDimensionsCount();", "public void setMaxNumOfStages(int s) {\n maxNumOfStages = s;\n }", "public void setWrapSize(ChartOptions options) {\n Node n = this;\n int maxH = 0;\n while (n != null) {\n n.firstLevel = true;\n switch (n.typ) {\n case WRAP:\n n.size.setHeight(maxH);\n maxH = 0;\n break;\n case ITER:\n if (maxH < n.size.getHeight()\n + (options.fontHeight() + options.componentGapHeight())\n / 2)\n {\n maxH = n.size.getHeight()\n + (options.fontHeight() + options\n .componentGapHeight()) / 2;\n }\n break;\n default:\n if (maxH < n.size.getHeight() || maxH < n.altSize.getHeight()) {\n if (n.altSize.getHeight() != 0) {\n maxH = n.altSize.getHeight();\n } else {\n maxH = n.size.getHeight();\n }\n }\n break;\n }\n n = n.next;\n }\n }", "private void countSubDataPropertyOfAxiomsMetric() {\r\n\t\tint subDataPropertyOfAxiomsCount = ontology.getAxiomCount(AxiomType.SUB_DATA_PROPERTY,\r\n\t\t\t\tOntologyUtility.ImportClosures(imports));\r\n\t\treturnObject.put(\"subDataPropertyOfAxioms\", subDataPropertyOfAxiomsCount);\r\n\r\n\t}", "@FameProperty(name = \"numberOfChildren\", derived = true)\n public Number getNumberOfChildren() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "public void setTicksCount(int size) {\n\t\t\n\t}", "public void setResizeElementCount(int v) { vboSet.setResizeElementCount(v); }", "public void setCount(int count)\r\n\t{\r\n\t}", "public void setWidth(int n){ // Setter method\n \n width = n; // set the class attribute (variable) radius equal to num\n }", "public int size (){\n return N;\n }", "@Override\n protected int getMaxEntries(final PropertyContext context) {\n return 2;\n }", "public int Size() {\n return group_.Size();\n }", "public int size(){\r\n\t\treturn N;\r\n\t}", "public JobBuilder nodeCount(int nodeCount) {\r\n job.setNodeCount(nodeCount);\r\n return this;\r\n }", "@Override\n\tpublic int size() {\n\t\tmodCount = root.numChildren();\n\t\treturn modCount;\n\t}", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "public final void setN(final int koko) {\r\n this.n = koko;\r\n }", "private void increaseSize(int num) {\n int increasedSize = _edges.size() + num;\n for (int i = 0; i < _edges.size(); i++) {\n for (int j = 0; j < num; j++) {\n _edges.get(i).add(new Edge(_idIncr));\n _idIncr += 1;\n }\n }\n for (int k = 0; k < num; k += 1) {\n _edges.add(new ArrayList<Edge>());\n for (int z = 0; z < increasedSize; z++) {\n _edges.get(increasedSize - num + k).add(new Edge(_idIncr));\n _idIncr += 1;\n }\n }\n }", "public int getN() {\n\t\treturn N;\n\t}", "@Override\n\tpublic int size() {\n\t\treturn N;\n\t}", "public Series setNumberOfInstances( int theInteger) {\n\t\tmyNumberOfInstances = new IntegerDt(theInteger); \n\t\treturn this; \n\t}", "public abstract int getNodesQuantity();", "public void setPackageSize(int size){\r\n }", "public void setNoOfImages(int noOfImages) {\n this.noOfImages = noOfImages;\n }", "public int nodeCount(){\r\n\t\treturn size;\r\n\t}", "@Override\n\tpublic int getPropertyCount() {\n\t\treturn 5;\n\t}", "@Override\n\tpublic int getPropertyCount() {\n\t\treturn 5;\n\t}", "public double getTreeSize()\n {\n return treesize; \n }", "public int getSetSize(){ return Integer.parseInt(setSize.getText()); }", "int treeSize() {\n return\n memSize()\n + initializers.listSize()\n + updaters.listSize()\n + (optionalConditionExpression == null ? 0 : getExpression().treeSize())\n + (body == null ? 0 : getBody().treeSize()); }", "public int size() {\r\n return N;\r\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public Series setNumberOfInstances(IntegerDt theValue) {\n\t\tmyNumberOfInstances = theValue;\n\t\treturn this;\n\t}", "public void setCapacity(int n) {\n\t\tcapacity = n;\n\t}", "public int size() {\n return N;\n\n }", "public void set_size(int s);", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "protected int defaultNumAttributes() {\n return 10;\n }", "public NM getPsl14_NumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public void setLength(int n){ // Setter method\n \n length = n; // set the class attribute (variable) radius equal to num\n }", "int getNodesCount();", "int getNodesCount();", "public void SetNPoints(int n_points);", "@Override\n\tpublic void setDimensions() {\n\t\t\n\t}", "@Override\n public int nodeSize() {\n return this.nodes.size();\n }", "public static int DimNum() {\n\t\treturn root_map.size();\n\t}", "private static void checkNSRecurseCheckCardinality(Vector<XSParticleDecl> children, int min1, int max1, SubstitutionGroupHandler dSGHandler, XSParticleDecl wildcard, int min2, int max2, boolean checkWCOccurrence) throws XMLSchemaException {\n/* 1226 */ if (checkWCOccurrence && !checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1227 */ throw new XMLSchemaException(\"rcase-NSRecurseCheckCardinality.2\", new Object[] {\n/* 1228 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1229 */ Integer.toString(max1), \n/* 1230 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1231 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* */ \n/* 1235 */ int count = children.size();\n/* */ try {\n/* 1237 */ for (int i = 0; i < count; i++) {\n/* 1238 */ XSParticleDecl particle1 = children.elementAt(i);\n/* 1239 */ particleValidRestriction(particle1, dSGHandler, wildcard, null, false);\n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ }\n/* 1245 */ catch (XMLSchemaException e) {\n/* 1246 */ throw new XMLSchemaException(\"rcase-NSRecurseCheckCardinality.1\", null);\n/* */ } \n/* */ }", "public Builder setNumOfChunks(int value) {\n \n numOfChunks_ = value;\n onChanged();\n return this;\n }", "public int getNetSize() {\n return graph.size();\n }", "int getConstraintsCount();", "@JSProperty(\"size\")\n void setSize(double value);", "public int getN() {\n return n_;\n }", "interface WithNodeCount {\n /**\n * Specifies nodeCount.\n * @param nodeCount The job will be gang scheduled on that many compute nodes\n * @return the next definition stage\n*/\n WithStdOutErrPathPrefix withNodeCount(int nodeCount);\n }", "void setNumberOfInfantry(int infantry);", "public int getChildCount() { return 0; }", "@NonNull\n public Builder instances(@IntRange(from = 1, to = 32767) int instanceCount) {\n nBuilderInstances(mNativeBuilder, instanceCount);\n return this;\n }", "public int size(){\n\t\t\r\n\t\treturn N;\r\n\t}", "public Builder setN(int value) {\n \n n_ = value;\n onChanged();\n return this;\n }", "public void setSampleSize(int n){\n\t\tsetParameters(populationSize, type1Size, n);\n\t}", "public int getSpace(){\n // iterate through nodes\n int totalSpace = 0;\n Collection<SupplyNode> nodeCol = t.values();\n Iterator<SupplyNode> it = nodeCol.iterator();\n \n // multiply resource count by resource space\n while (it.hasNext()){\n SupplyNode s = it.next();\n totalSpace += (s.getCurrent()*s.getResource().getCost());\n }\n \n // return\n return totalSpace;\n }", "public int getScale(){\n return scale;\n }", "public int numNodes()\r\n {\r\n\tint s = 0;\r\n\tfor (final NodeTypeHolder nt : ntMap.values())\r\n\t s += nt.numNodes();\r\n\treturn s;\r\n }", "public int size() {\n return _N;\n\n }" ]
[ "0.596512", "0.57413673", "0.57301974", "0.5702381", "0.5527052", "0.5459521", "0.53799003", "0.53524417", "0.5348234", "0.53386444", "0.5317126", "0.5311754", "0.53058374", "0.52685314", "0.52350795", "0.5223432", "0.5214815", "0.52068704", "0.5192121", "0.5178058", "0.51757723", "0.51732695", "0.51658255", "0.5154928", "0.5151622", "0.51510566", "0.51479036", "0.51459175", "0.5145316", "0.5141223", "0.5126053", "0.5116999", "0.5105878", "0.5089345", "0.50724286", "0.5049044", "0.50441307", "0.5011598", "0.5011061", "0.5009128", "0.49984598", "0.4995658", "0.49867877", "0.49859", "0.4983947", "0.49691465", "0.49671572", "0.4961998", "0.496173", "0.4960342", "0.49573478", "0.4955275", "0.49524894", "0.49524894", "0.49498898", "0.494625", "0.49413005", "0.49391156", "0.49335995", "0.49335995", "0.49335995", "0.49335995", "0.49335995", "0.49335995", "0.49335995", "0.49310502", "0.492953", "0.492546", "0.49232346", "0.4920244", "0.4920244", "0.4920244", "0.4920244", "0.4920244", "0.49167848", "0.49132025", "0.49027008", "0.49019775", "0.49019775", "0.48970866", "0.4895764", "0.48931038", "0.48916084", "0.48870558", "0.48850524", "0.4883284", "0.48813763", "0.4878252", "0.48741892", "0.4873035", "0.48709887", "0.48661676", "0.48642644", "0.4862307", "0.48569867", "0.48534903", "0.48495468", "0.48478606", "0.4847787", "0.4845255" ]
0.48538867
95
Identifies the profile to be used for a nested NS involved in the NS level.
public String getNsProfileId() { return nsProfileId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public URI getProfile() { \n\t\treturn getProfileElement().getValue();\n\t}", "@objid (\"d7af9849-7951-4020-8339-9057fcec6b89\")\n Profile getOwnerProfile();", "public PosSymbol getProfileName() {\n return profileName;\n }", "@ModelNodeBinding(detypedName = \"profile\")\n\tpublic String profile() {\n\t\treturn this.profile;\n\t}", "public String getParentProfile() {\n\t\treturn mParentProfile == null ? new String() : mParentProfile.getName();\n\t}", "ValueMap getProfileMap(Node profileNode) throws RepositoryException;", "public Profile getProfile() {\n return _profile;\n }", "public String getProfile() {\n return profile;\n }", "H getProfile();", "public EntityProfile getProfile()\n\t{\n\t\treturn m_profile;\n\t}", "public static Profile getProfile() {\n return profile;\n }", "LabNetworkProfile networkProfile();", "public MetadataProfile getProfile() {\n\t\treturn profile;\n\t}", "public String getProfile();", "public ProfileSummary( String name, ProfileCollectorTask.NodeProfile profile) { this.name = name; this.profile= profile; }", "public Profile getProfile() {\n return m_profile;\n }", "@ManyToOne(fetch = FetchType.LAZY)\n\t@JoinColumn(name = \"ID_SECURITY_PROFILE\", referencedColumnName = \"ID_SECURITY_PROFILE\", nullable = false)\n\tpublic Profile getProfile() {\n\t\treturn this.profile;\n\t}", "String getProfile();", "public String getPROFILE_NAME() {\r\n return PROFILE_NAME;\r\n }", "private String getSubpopName( Person person, Config config ) {\n\t\tString subpop = PopulationUtils.getSubpopulation(person );\n\t\treturn \"subpop_\" + subpop;\n\t}", "public Profile getChild() {\n \treturn null;\n\t}", "public ProfileService profile() {\n return service;\n }", "public NetworkProfile networkProfile() {\n return this.networkProfile;\n }", "CertprofileQa getCertprofile(String certprofileName);", "public native ProfileInfo getIptcProfile() throws MagickException;", "@java.lang.Override\n public com.google.protobuf2.Any getProfile() {\n return profile_ == null ? com.google.protobuf2.Any.getDefaultInstance() : profile_;\n }", "public String toString() {\r\n\t\treturn profileName;\r\n\t}", "@Override\n\tpublic SceneType getSceneType() {\n\t\treturn SceneType.SCENE_PROFILE;\n\t}", "@objid (\"6680b948-597e-4df9-b9a2-de8dc499acb3\")\n void setOwnerProfile(Profile value);", "interface WithNetworkProfile {\n /**\n * Specifies the networkProfile property: The network profile for the lab, typically applied via a lab plan.\n * This profile cannot be modified once a lab has been created..\n *\n * @param networkProfile The network profile for the lab, typically applied via a lab plan. This profile\n * cannot be modified once a lab has been created.\n * @return the next definition stage.\n */\n WithCreate withNetworkProfile(LabNetworkProfile networkProfile);\n }", "@Override\n\tpublic ProfileInfo getProfileInfo() {\n\t\treturn (ProfileInfo)map.get(PROFILE_INFO);\n\t}", "@Override\n\tpublic Profile getProfile(long profileId) {\n\t\treturn null;\n\t}", "@java.lang.Override\n public com.google.protobuf2.AnyOrBuilder getProfileOrBuilder() {\n return getProfile();\n }", "public UriDt getProfileElement() { \n\t\tif (myProfile == null) {\n\t\t\tmyProfile = new UriDt();\n\t\t}\n\t\treturn myProfile;\n\t}", "public void setProfile(Profile profile) {\n _profile = profile;\n }", "public ProfileStoreCollectionInfo secondaryInfo() {\n return this.secondaryInfo;\n }", "public String getOtherPart(Profile profile) {\n\t\t\n\t\tif(!(this instanceof Parent_Connection))\n \t\tif(person1.getName().equals(profile.getName())){\n \t\t\treturn String.format(\"\\n\\n%s %s\", person2.getName(), getType());\n\t\t\t\n \t\t}else {\n \t\t\treturn String.format(\"\\n\\n%s %s\", person1.getName(), getType());\n \t\t}\n\t\telse {\n\t\t\tif(((Parent_Connection)this).getChild().getName().equals(profile.getName())){\n\t\t\t\treturn String.format(\"\\n\\n%s %s\\n\\n%s %s\", \n\t\t\t\t\t\t person1.getName(), \"[PARENT]\", person2.getName(), \"[PARENT]\");\n\t\t\t}else {\n \t\t\treturn String.format(\"\\n\\n%s %s\", ((Parent_Connection)this).getChild().getName(), \"[CHILD]\");\n \t\t}\n\t\t}\n\t}", "public WebElement profileSetUpTab() {\n\t\treturn getElementfluent(By.xpath(\"//menuitem[contains(text(),'Profile')]\"));\n\t}", "public void setProfile(Profile profile) {\n\t\tthis.profile = profile;\n\t}", "private ProviderProfile parseProfile(Elements tds) throws ParsingException {\n try {\n ProviderProfile profile = new ProviderProfile();\n String id = tds.get(0).text();\n String fullProviderInfo = tds.get(1).text();\n fullProviderInfo = fullProviderInfo.replaceAll(\"\\u00A0\", \" \").trim();\n String adminBoundary = \"\";\n Elements bolds = tds.get(1).children().select(\"b\");\n if (bolds.size() >= 6) {\n adminBoundary = bolds.get(5).text();\n }\n\n String name = Util.getStringInBetween(fullProviderInfo, \"Name:\", \"Address:\");\n String address = Util.getStringInBetween(fullProviderInfo, \"Address:\", \"Phone:\");\n String phone = Util.getStringInBetween(fullProviderInfo, \"Phone:\", \"Fax:\");\n String fax = Util.getStringInBetween(fullProviderInfo, \"Fax:\", \"Administrator:\");\n String administrator = !\"\".equals(adminBoundary) ? Util.getStringInBetween(fullProviderInfo,\n \"Administrator:\", adminBoundary) : \"\";\n \n // classifications\n Elements classifications = tds.get(1).children().select(\"p\");\n for (Element classification : classifications) {\n String para = classification.text().replaceAll(\"\\u00A0\", \" \").trim();\n if (para.contains(\"Minnesota Classifications\")) {\n profile.setStateClassifications(para.substring(\"Minnesota Classifications:\".length()));\n } else if (para.contains(\"Federal Classifications\")) {\n profile.setFederalClassifications(para.substring(\"Federal Classifications:\".length()));\n }\n }\n\n // id\n profile.setEmployerId(id);\n // name\n Business business = new Business();\n profile.setBusiness(business);\n business.setName(name);\n // address\n List<Address> addresses = new ArrayList<Address>();\n Address addressObj = new Address();\n addresses.add(addressObj);\n profile.setAddresses(addresses);\n String[] addressParts = address.split(\" \");\n if (addressParts.length >= 4) {\n String location = addressParts[0].trim();\n String city = addressParts[1].trim();\n String state = addressParts[2].trim();\n String zipcode = addressParts[3].trim();\n addressObj.setLocation(location);\n addressObj.setCity(city);\n addressObj.setState(state);\n addressObj.setZipcode(zipcode);\n }\n // phone\n profile.setContactPhoneNumber(phone);\n // fax\n profile.setContactFaxNumber(fax);\n // administrator\n profile.setContactName(administrator);\n\n profile.setProviderType(getProviderType());\n return profile;\n } catch (Throwable e) {\n throw new ParsingException(\"Failed to parse the html\", e);\n }\n }", "com.google.protobuf2.Any getProfile();", "public interface JavaProfile {\r\n\r\n /** the constant for the java profile 'JavaSE-1.6' */\r\n String JAVA_PROFILE_JavaSE_1_6 = \"JavaSE-1.6\";\r\n\r\n /** the constant for the java profile 'J2SE-1.5' */\r\n String JAVA_PROFILE_J2SE_1_5 = \"J2SE-1.5\";\r\n\r\n /** the constant for the java profile 'J2SE-1.4' */\r\n String JAVA_PROFILE_J2SE_1_4 = \"J2SE-1.4\";\r\n\r\n /** the constant for the java profile 'J2SE-1.3' */\r\n String JAVA_PROFILE_J2SE_1_3 = \"J2SE-1.3\";\r\n\r\n /** the constant for the java profile 'J2SE-1.2' */\r\n String JAVA_PROFILE_J2SE_1_2 = \"J2SE-1.2\";\r\n\r\n /** the constant for the java profile 'JRE-1.1' */\r\n String JAVA_PROFILE_JRE_1_1 = \"JRE-1.1\";\r\n\r\n /** the constant for the java profile 'CDC-1.1_Foundation-1.1' */\r\n String JAVA_PROFILE_CDC_1_1_Foundation_1_1 = \"CDC-1.1_Foundation-1.1\";\r\n\r\n /** the constant for the java profile 'CDC-1.0_Foundation-1.0' */\r\n String JAVA_PROFILE_CDC_1_0_Foundation_1_0 = \"CDC-1.0_Foundation-1.0\";\r\n\r\n /** the constant for the java profile 'OSGi_Minimum-1.0' */\r\n String JAVA_PROFILE_OSGi_Minimum_1_0 = \"OSGi_Minimum-1.0\";\r\n\r\n /** the constant for the java profile 'OSGi_Minimum-1.1' */\r\n String JAVA_PROFILE_OSGi_Minimum_1_1 = \"OSGi_Minimum-1.1\";\r\n\r\n /**\r\n * <p>\r\n * Returns the name of the java profile, e.g. <code>J2SE-1.5</code> or {@link JavaProfile#JAVA_PROFILE_J2SE_1_5}.\r\n * </p>\r\n * \r\n * @return the name of the java profile.\r\n */\r\n String getName();\r\n\r\n /**\r\n * <p>\r\n * Returns a list of execution environment names that this java profile is a super set of (e.g.\r\n * <code>[OSGi/Minimum-1.0, OSGi/Minimum-1.1, JRE-1.1, J2SE-1.2]</code> ).\r\n * </p>\r\n * \r\n * @return a list of execution environment names that this java profile is a super set of.\r\n */\r\n List<String> getExecutionEnvironmentNames();\r\n\r\n /**\r\n * <p>\r\n * Returns all specified system packages.\r\n * </p>\r\n * \r\n * @return\r\n */\r\n List<String> getSystemPackages();\r\n\r\n /**\r\n * <p>\r\n * Returns the java profile as a properties object. The following properties are defined:\r\n * <ul>\r\n * <li><code>org.osgi.framework.system.packages</code></li>\r\n * <li><code>org.osgi.framework.bootdelegation</code></li>\r\n * <li><code>org.osgi.framework.executionenvironment</code></li>\r\n * <li><code>osgi.java.profile.name</code></li>\r\n * </ul>\r\n * </p>\r\n * \r\n * @return the java profile as properties.\r\n */\r\n StringMap getProperties();\r\n\r\n /**\r\n * <p>\r\n * Returns <code>true</code>, if the specified package name denotes a system package.\r\n * </p>\r\n * \r\n * @param packageName\r\n * the package name\r\n * \r\n * @return <code>true</code>, if the specified package name denotes a system package, <code>false</code> otherwise.\r\n */\r\n boolean isSystemPackage(String packageName);\r\n\r\n /**\r\n * <p>\r\n * Returns <code>true</code>, if the specified package name is must be delegated to the boot class loader.\r\n * </p>\r\n * \r\n * @param packageName\r\n * the package name\r\n * \r\n * @return <code>true</code>, if the specified package name is must be delegated to the boot class loader.\r\n */\r\n boolean isDelegatedToBootClassLoader(String packageName);\r\n}", "public ServerProfile getServerProfile(String repositoryId) {\r\n\t\t\r\n\t\tRepository repository = (Repository)repositories.get(repositoryId);\r\n\t\treturn repository.getServerProfile();\r\n\t}", "public com.google.protobuf2.Any getProfile() {\n if (profileBuilder_ == null) {\n return profile_ == null ? com.google.protobuf2.Any.getDefaultInstance() : profile_;\n } else {\n return profileBuilder_.getMessage();\n }\n }", "public native ProfileInfo getGenericProfile(int i) throws MagickException;", "public interface ProfileType\n {\n /**\n * Parent profile type\n */\n String ADMIN = \"0\";\n\n /**\n * remeber profile type\n */\n String GENERAL = \"1\";\n }", "@java.lang.Override\n public boolean hasProfile() {\n return profile_ != null;\n }", "ApplicationProfile getApplicationProfile();", "public com.google.protobuf2.AnyOrBuilder getProfileOrBuilder() {\n if (profileBuilder_ != null) {\n return profileBuilder_.getMessageOrBuilder();\n } else {\n return profile_ == null ?\n com.google.protobuf2.Any.getDefaultInstance() : profile_;\n }\n }", "SecurityProfile securityProfile();", "@AutoEscape\n\tpublic String getPersonnelSubArea();", "void trace(SimpleSubConfig one, SimpleSubConfig two, UserSubConfigBean userSubConfig);", "public Integer getProfileId() {\n return _profileId;\n }", "@Test\n public void destiny2GetProfileTest() {\n Long destinyMembershipId = null;\n Integer membershipType = null;\n List<DestinyDestinyComponentType> components = null;\n InlineResponse20037 response = api.destiny2GetProfile(destinyMembershipId, membershipType, components);\n\n // TODO: test validations\n }", "public boolean hasProfile() {\n return profileBuilder_ != null || profile_ != null;\n }", "private String getActiveProfile() {\r\n String[] profiles = env.getActiveProfiles();\r\n String activeProfile = \"add\";\r\n if (profiles != null && profiles.length > 0) {\r\n activeProfile = profiles[0];\r\n }\r\n System.out.println(\"===== The active profile is \" + activeProfile + \" =====\");\r\n return(activeProfile);\r\n }", "public OSProfile osProfile() {\n return this.osProfile;\n }", "public BigDecimal getPROFILE_ID() {\r\n return PROFILE_ID;\r\n }", "public abstract Properties getProfileProperties();", "public String getProfileAttribute() {\r\r\n\t\treturn _profileAttribute;\r\r\n\t}", "public void setPROFILE_ID(BigDecimal PROFILE_ID) {\r\n this.PROFILE_ID = PROFILE_ID;\r\n }", "Profile getProfile( String profileId );", "@Override\n\tpublic Namespace getNamespace(Address addr) {\n\t\tif (addr.isMemoryAddress()) {\n\t\t\tfor (TraceSymbol sym : symbolManager.labels().getAt(program.snap, null, addr, true)) {\n\t\t\t\tif (sym instanceof TraceNamespaceSymbol /* Function */) {\n\t\t\t\t\treturn (TraceNamespaceSymbol) sym;\n\t\t\t\t}\n\t\t\t\treturn sym.getParentNamespace();\n\t\t\t}\n\t\t}\n\t\treturn symbolManager.getGlobalNamespace();\n\t}", "public int getProfile_id() {\n return profileID;\n }", "public HashMap getSubOrg() {\n\t\treturn subOrg;\n\t}", "@Test\r\n public void lookProfileByOwner() {\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n\r\n // Our member looked at his own profile\r\n member.lookedBy(member);\r\n \r\n // Still no activity for member\r\n assertNull(Activity.find(\"select a from Activity a where a.member = ?\", member).first());\r\n }", "public String myName2() {\n\t\treturn SubEast2.class.getName();\n\t}", "public ProjectProfileBO getProfile()\r\n {\r\n return mProfile;\r\n }", "private FunctionProfile getParent(Thread thread, Function function) {\n if (!function.isCallPathFunction()) {\n return null;\n }\n\n Function parentFunction = parentMap.get(function);\n if (parentFunction == null) {\n String functionName = function.getName();\n String parentName = functionName.substring(0, functionName.lastIndexOf(\"=>\"));\n parentFunction = cubeDataSource.getFunction(parentName);\n parentMap.put(function, parentFunction);\n }\n FunctionProfile parent = thread.getFunctionProfile(parentFunction);\n return parent;\n }", "interface WithSecurityProfile {\n /**\n * Specifies the securityProfile property: The lab security profile..\n *\n * @param securityProfile The lab security profile.\n * @return the next definition stage.\n */\n Update withSecurityProfile(SecurityProfile securityProfile);\n }", "public String getParentNamespace () throws java.io.IOException, com.linar.jintegra.AutomationException;", "public NetworkFunctionUserConfigurationOsProfile osProfile() {\n return this.osProfile;\n }", "String getNamespaceStringValue(Object ns);", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"In Prince 9.0 and up you can set the PDF profile.\")\n @JsonProperty(JSON_PROPERTY_PROFILE)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getProfile() {\n return profile;\n }", "DiagnosticInfo getInnerDiagnosticInfo();", "public Boolean getProfile()\n {\n return profile;\n }", "public ProfileConfig getCurrentProfileConfig() {\n return this.currentProfileConfig;\n }", "ValueMap getCompactProfileMap(Node profileNode) throws RepositoryException;", "public String getProfileId() {\n return profileId;\n }", "protected List<Profile> createProfiles(String namespace, JsonNode node) {\n List<Profile> profiles = new LinkedList();\n if (Namespace.isNamespaceValid(namespace)) {\n for (Iterator<Map.Entry<String, JsonNode>> it = node.fields(); it.hasNext(); ) {\n Map.Entry<String, JsonNode> entry = it.next();\n profiles.add(new Profile(namespace, entry.getKey(), entry.getValue().asText()));\n }\n } else {\n throw new CatalogException(\n \"Invalid namespace specified \" + namespace + \" for profiles \" + node);\n }\n return profiles;\n }", "java.lang.String getNamespace();", "public KunKunProfile getProfile() {\n\t\tObject temp;\n//\t\tif (profile == null || profile.getUserData() == null\n//\t\t\t\t|| profile.getUserData().id == -1) {// nghia la bien o trang\n//\t\t\t\t\t\t\t\t\t\t\t\t\t// thai ban dau hoac da bi\n//\t\t\t\t\t\t\t\t\t\t\t\t\t// reset\n//\t\t\tif ((temp = KunKunUtils.readObject(\n//\t\t\t\t\tKunKunProfile.KUNKUN_PROFILE)) != null) {\n//\t\t\t\tprofile = (KunKunProfile) temp;// bi out memory\n//\t\t\t\tSystem.setProperty(\"networkaddress.cache.ttl\",\"0\");\n//\t\t\t\tSystem.setProperty(\"networkaddress.cache.negative.ttl\" , \"0\");\n//\t\t\t}\n//\t\t}\n\t\treturn profile;\n\t}", "String getParentDriverName();", "public void testAssociationNestedSearch2() throws ApplicationException\r\n\t{\r\n\t\tHardTop searchObject = new HardTop();\r\n\t\tIi ii=new Ii();\r\n\t\tii.setExtension(\"2\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.inheritance.parentwithassociation.sametable.Luggage\",searchObject );\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(1,results.size());\r\n\t\t\r\n\t\tLuggage result = (Luggage)results.iterator().next();\r\n\t\tassertNotNull(result);\r\n\t\tassertNotNull(result.getId());\r\n\t\tassertEquals(result.getId().getRoot(),II_ROOT_GLOBAL_CONSTANT_VALUE);\r\n\t\tassertEquals(\"2\", result.getId().getExtension());\r\n\t}", "public String cmdChanProfile(){\r\n\t\treturn \"get /unit-\" + this.getTbs().getSlot() + \"/port-\" + this.getTbs().getPortNumber() + \"/chan-1/cfgm/chanprofile\";\r\n\t}", "public String getProfile() {\n\tif (profileBuf.length() > 0) {\n\t profileBuf.append (\"\\n\");\n\n\t // should be replaced by java.util.Formatter from Java 1.5\n\t profileBuf.append (profilingTotal);\n\t profileBuf.append (\"\\t\");\n\t profileBuf.append (\"TOTAL\\n\");\n// \t profileBuf.append (Printf.format (\"%7d\\t%s\\n\",\n// \t\t\t\t\t new String[] {\"\" + profilingTotal, \"TOTAL\"}));\n\t return new String (profileBuf);\n\t} else {\n\t return \"\";\n\t}\n }", "public Circle getAccountStageProfileCircle()\n {\n return accountStageProfileCircle;\n }", "public String getNamespace() {\n\t\treturn EPPNameVerificationMapFactory.NS;\n\t}", "HumanProfile getUserProfile();", "public String getApplicationProfile()\n {\n return mApplicationProfile;\n }", "public Resident(Profile profile) {\r\n super(profile);\r\n }", "private void setSubProfiles(Vector subs)\n {\n subProfiles = subs;\n }", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "interface WithSecurityProfile {\n /**\n * Specifies the securityProfile property: The lab security profile..\n *\n * @param securityProfile The lab security profile.\n * @return the next definition stage.\n */\n WithCreate withSecurityProfile(SecurityProfile securityProfile);\n }", "java.lang.String getProfileURL();", "public void saveProfiles() throws IOException\n {\n try\n {\n profFile.getParentFile().mkdirs();\n profFile.delete();\n profFile.createNewFile();\n PrettyPrinterXmlWriter pp = new PrettyPrinterXmlWriter(new SimpleXmlWriter(new FileWriter(profFile)));\n pp.writeXmlVersion();\n pp.writeEntity(\"XNATProfiles\");\n if (this.size() != 0)\n {\n for (XNATProfile ip : this)\n {\n pp.writeEntity(\"XNATProfile\")\n .writeAttribute(\"profileName\", ip.getProfileName())\n \n .writeEntity(\"serverURL\")\n .writeText(ip.getServerURL().toString())\n .endEntity() \n // encrypt(sc.getServerURL().toString()));\n \n .writeEntity(\"userid\")\n .writeText(ip.getUserid())\n .endEntity()\n \n .writeEntity(\"projectList\");\n \n for (String is : ip.getProjectList())\n pp.writeEntity(\"project\")\n .writeText(is)\n .endEntity();\n \n pp.endEntity()\n .writeEntity(\"dicomReceiverHost\")\n .writeText(ip.getDicomReceiverHost())\n .endEntity()\n \n .writeEntity(\"dicomReceiverPort\")\n .writeText(ip.getDicomReceiverPort())\n .endEntity()\n \n .writeEntity(\"dicomReceiverAeTitle\")\n .writeText(ip.getDicomReceiverAeTitle())\n .endEntity()\n \n .endEntity();\n }\n }\n pp.writeEntity(\"preferredProfile\")\n .writeText(currentProfile)\n .endEntity()\n .endEntity()\n .close();\n }\n catch (IOException exIO)\n \t\t{\n throw exIO;\n }\n }", "public String getProfesionTI() {\n return this.profesionTI;\n }", "public ProfileImage getProfileImage() {\n return profileImage;\n }", "protected Map<String, Object> getUserProfile() {\r\n\t\tTimeRecorder timeRecorder = RequestContext.getThreadInstance()\r\n\t\t\t\t\t\t\t\t\t\t\t\t .getTimeRecorder();\r\n\t\tString profileId = (String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID);\r\n\r\n\t\tSite site = Utils.getEffectiveSite(request);\r\n\t\tString siteDNSName = (site == null ? null : site.getDNSName());\r\n\r\n\t\tIUserProfileRetriever retriever = UserProfileRetrieverFactory.createUserProfileImpl(AuthenticationConsts.USER_PROFILE_RETRIEVER, siteDNSName);\r\n\t\ttry {\r\n\t\t\ttimeRecorder.recordStart(Operation.PROFILE_CALL);\r\n\t\t\tMap<String, Object> userProfile = retriever.getUserProfile(profileId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request);\r\n\t\t\ttimeRecorder.recordEnd(Operation.PROFILE_CALL);\r\n\t\t\treturn userProfile;\r\n\t\t} catch (UserProfileException ex) {\r\n\t\t\ttimeRecorder.recordError(Operation.PROFILE_CALL, ex);\r\n\t\t\tRequestContext.getThreadInstance()\r\n\t\t\t\t\t\t .getDiagnosticContext()\r\n\t\t\t\t\t\t .setError(ErrorCode.PROFILE001, ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "boolean hasProfile();" ]
[ "0.5552379", "0.5462279", "0.5259834", "0.51318663", "0.51271325", "0.50879204", "0.50806314", "0.5012514", "0.49931517", "0.49884683", "0.49824515", "0.4953108", "0.49254712", "0.49082017", "0.49053434", "0.4889525", "0.48809615", "0.48681346", "0.484019", "0.47977108", "0.47930697", "0.47476536", "0.47399864", "0.47347072", "0.4723705", "0.47229105", "0.4694384", "0.4684035", "0.46788234", "0.4659566", "0.46548954", "0.46535483", "0.46532914", "0.46501762", "0.46327516", "0.46229726", "0.46199238", "0.46168816", "0.45974094", "0.45967582", "0.45913562", "0.4577719", "0.4577213", "0.4565442", "0.45551318", "0.4543885", "0.4542707", "0.4535869", "0.45352736", "0.4513239", "0.45107841", "0.45007902", "0.44886178", "0.44832537", "0.44795492", "0.447897", "0.44779417", "0.44778767", "0.4450875", "0.44343182", "0.44261032", "0.442518", "0.44250703", "0.4417435", "0.4401482", "0.4398775", "0.43978968", "0.43963438", "0.43939003", "0.438397", "0.43778458", "0.4376082", "0.4374867", "0.4374151", "0.4372307", "0.43610477", "0.4358692", "0.43515754", "0.43509585", "0.43465158", "0.43259823", "0.43186077", "0.43162835", "0.43145388", "0.43140456", "0.430779", "0.4306156", "0.42982462", "0.42960683", "0.4291969", "0.4285253", "0.42819527", "0.4276903", "0.42655167", "0.42609414", "0.4250564", "0.42498392", "0.42414084", "0.42380953", "0.4232021" ]
0.52371335
3
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }" ]
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168" ]
0.0
-1
Line to update the line in the data.
public ReadData(String pathname, String userInput) { User = userInput; filename = pathname; //Records the path filename. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void line(String line) {\n\t\t}", "public void addDataLine(String line) {\n this.data.textProperty().set(\n String.format(\n \"%s\\n%s\",\n this.data.textProperty().get(),\n line\n )\n );\n }", "public void setLine ( String value )\n {\n line = value;\n }", "public void setLine (int Line);", "public void setLine(int line);", "void setCurrentLineNode(Node<UnderlyingData> currentLineNode);", "public void setline(String line) {\n\t\t_line = line;\n\t}", "private void updatePolyLine(LatLng latLng) {\n\t\tList<LatLng> points = polyLine.getPoints();\n\t\tpoints.add(latLng);\n\t\tpolyLine.setPoints(points);\n\t}", "public void updateLineType(int lineType) {\n graph.updateLineType(lineType);\n }", "private void updatePolyLine(LatLng latLng) {\n List<LatLng> points = polyLine.getPoints();\n points.add(latLng);\n polyLine.setPoints(points);\n }", "public void updateLine(long objectId, SupplierSettlementLine line) throws CoreException {\n try (Response response = clientApi.put(path + \"/\" + objectId + LINES + line.getId(), line)) {\n readResponse(response, String.class);\n }\n }", "public void setLine(String line) {\n this.line = line;\n //System.out.println(this.line + \" \" + line);\n }", "public void appendLine() {\n\t\t\tmBuilder.append(NewLineChar);\n\t\t\tlastAppendNewLine = true;\n\t\t}", "@Override\n public Line getLine() {\n return line;\n }", "void markLine() {\n lineMark = cursor;\n }", "public void updateLineNumber(int lineNumber) {\n\t\t// remember the old value\n\t\toldLineNumber = this.lineNumber;\n\t\tthis.lineNumber = lineNumber;\n\t}", "public void computeLine ()\r\n {\r\n line = new BasicLine();\r\n\r\n for (GlyphSection section : glyph.getMembers()) {\r\n StickSection ss = (StickSection) section;\r\n line.includeLine(ss.getLine());\r\n }\r\n\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\r\n line + \" pointNb=\" + line.getNumberOfPoints() +\r\n \" meanDistance=\" + (float) line.getMeanDistance());\r\n }\r\n }", "public void addValueLine(String line) {\n\t\tvaluesBuilder.append(line);\n\t\tif (!line.endsWith(NEW_LINE)) {\n\t\t\tvaluesBuilder.append(NEW_LINE);\n\t\t}\n\t\tthis.dirtyAttributes.add(Constants.VALUES);\n\t}", "public void updatePartiallyLine(long objectId, SupplierSettlementLine line) throws CoreException {\n try (Response response = clientApi.post(path + \"/\" + objectId + LINES + line.getId(), line)) {\n readResponse(response, String.class);\n }\n }", "public final void changeModified(int line, int column) {\n\t\tmodified=true;\n\t\tArrayList<Integer> coordinates = new ArrayList<Integer>(); \n\t\tcoordinates.add(line);\n\t\tcoordinates.add(column);\n\t\tsetChanged();\n\t\tnotifyObservers(coordinates);\n\t}", "public void onOutputLineAdded(Window window, OutputLine line) {\n\t\t\t\n\t\t\tlinesLayout.addLine(line);\n\t\t}", "public void PUT(String line) {\r\n\t\tanalisisURL(line);\r\n\t}", "private synchronized void updateLineCount(long lineCount) {\r\n\t\tthis.parsedLines += lineCount;\r\n\t}", "public void drawLine(float[] line) {\n\t\tparent.line(line[0], line[1], line[2], line[3]);\n\t}", "private void addLine()\n\t{\n\t\tlines.add(printerFormatter.markEOL());\n\t}", "public synchronized void addLine(Line line)\r\n\t{\r\n\t\tlines.add(line);\r\n\t}", "public void setLine(int line, String value) {\n VirtualTeam team = getOrCreateTeam(line);\n String old = team.getCurrentPlayer();\n\n if (old != null && created)\n getPlayer().sendPacket(removeLine(old));\n\n team.setValue(value);\n sendLine(line);\n }", "public void newBufLine() {\n this.buffer.add(new ArrayList<Integer>());\n this.columnT = 0;\n this.lineT++;\n }", "public void ler(String[] lineData) {\n this.setRoomId(Integer.parseInt(lineData[0]));\n this.setHostId(Integer.parseInt(lineData[1]));\n this.setRoomType(lineData[2]);\n this.setCountry(lineData[3]);\n this.setCity(lineData[4]);\n this.setNeighbourhood(lineData[5]);\n this.setReviews(Integer.parseInt(lineData[6]));\n this.setOverallSatisfaction(Double.parseDouble(lineData[7]));\n this.setAccommodates(Integer.parseInt(lineData[8]));\n this.setBedrooms(Double.parseDouble(lineData[9]));\n this.setPrice(Double.parseDouble(lineData[10]));\n this.setPropertyType(lineData[11]);\n }", "public void setLine2(String line2) {\n this.line2 = line2;\n }", "private void updateChangeMessage(final CVSChangeLog change, final String line) {\n String message = change.getMsg();\n if (message.isEmpty()) {\n message += line;\n } else {\n message += LINE_SEPARATOR + line;\n }\n change.setMsg(message);\n }", "public void setLinePos(int linePos) {\n this.linePos = linePos;\n }", "private void moveLineOn() {\n getScroller().startScroll(getOffsetX(),getOffsetY(),0,getLineHeight(),0);\n }", "private void addLine (String line) {\n writer.write (line);\n writer.newLine();\n // blockOut.append (line);\n // blockOut.append (GlobalConstants.LINE_FEED);\n }", "@Override\n public void onLineInserted(int y, String line) {\n if (cursor.getY() == file.getLineCount() - 1) {\n if (file.getLineCount() > 1) {\n throw new IllegalStateException();\n }\n return;\n }\n if (y <= cursor.getY()) {\n cursor.moveBy(1, 0);\n }\n fireSizeChanged();\n }", "public void setLineTime( float newLineTime )\n\t{\n\t\tlineTime = newLineTime;\n\t}", "@Override\n public void lineTo(double x, double y) {\n graphicsEnvironmentImpl.lineTo(canvas, x, y);\n }", "public void lineTo(double x, double y)\n {\n\tPoint2D pos = transformedPoint(x,y);\n\tdouble tx = pos.getX();\n\tdouble ty = pos.getY();\n\t\n\tLine line = new Line(_currentx, _currenty, tx, ty);\n\n\tSystem.out.println(\"+Line: \" + line.toString());\n\t_currentPath.add(line);\n\t_currentx = tx;\n\t_currenty = ty;\n }", "public void setLine1(String line1) {\n this.line1 = line1;\n }", "public void lineTo(int x, int y){\n paint.setColor(Color.parseColor(\"#000000\"));\n //ToDo: implement line drawing here\n\n canvas.drawLine(lastX, lastY, x, y, paint);\n lastX = x;\n lastY = y;\n Log.d(\"Canvas Element\", \"drawing line from: \" + lastX + \", \" + lastY +\",\" + \" to: \" + x +\", \" + y);\n }", "public int getLine() {return _line;}", "public void flushCurrentLine()\n {\n line = null;\n }", "public void updateData() {}", "public void setLine2(java.lang.String line2) {\r\n this.line2 = line2;\r\n }", "public void setLineId(String line_id)\r\n {\r\n this.line_id = line_id;\r\n }", "@Override\n\t\t\tpublic void commandOutput(int id, String line) {\n\t\t\t\tRootTools.log(\"Command\", \"ID: \" + id + \", \" + line);\n\t\t\t\tMessage message = callback\n\t\t\t\t\t\t.obtainMessage(Constants.OUTPUT_UPDATED);\n\t\t\t\tmessage.obj = line;\n\t\t\t\tcallback.sendMessage(message);\n\n\t\t\t}", "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 setOrderLine (MOrderLine oLine, int M_Locator_ID, BigDecimal Qty)\n\t{\n\t\tMOrgPOS orgpos = MOrgPOS.getOrgPos(getCtx(), oLine.getParent().getAD_Org_ID(), get_Trx());\n\t\tif(M_Locator_ID > 0 && (oLine.getParent().getC_DocTypeTarget_ID() == orgpos.getDocType_Ticket_ID()))\n\t\t\tM_Locator_ID = oLine.get_ValueAsInt(\"M_Locator_ID\")>0?oLine.get_ValueAsInt(\"M_Locator_ID\"):orgpos.getM_LocatorStock_ID();\n\t\tsetC_OrderLine_ID(oLine.getC_OrderLine_ID());\n\t\tsetLine(oLine.getLine());\n\t\tsetC_UOM_ID(oLine.getC_UOM_ID());\n\t\tMProduct product = oLine.getProduct();\n\t\tif (product == null)\n\t\t{\n\t\t\tsetM_Product_ID(0);\n\t\t\tsetM_AttributeSetInstance_ID(0);\n\t\t\tsuper.setM_Locator_ID(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetM_Product_ID(oLine.getM_Product_ID());\n\t\t\tsetM_AttributeSetInstance_ID(oLine.getM_AttributeSetInstance_ID());\n\t\t\t//\n\t\t\tif (product.isItem())\n\t\t\t{\n\t\t\t\tif (M_Locator_ID == 0)\n\t\t\t\t\tsetM_Locator_ID(Qty);\t//\trequires warehouse, product, asi\n\t\t\t\telse\n\t\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t\t}\n\t\t\telse\n\t\t\t\tsuper.setM_Locator_ID(0);\n\t\t}\n\t\tsetC_Charge_ID(oLine.getC_Charge_ID());\n\t\tsetDescription(oLine.getDescription());\n\t\tsetIsDescription(oLine.isDescription());\n\t\t//\n\t\tsetAD_Org_ID(oLine.getAD_Org_ID());\n\t\tsetC_Project_ID(oLine.getC_Project_ID());\n\t\tsetC_ProjectPhase_ID(oLine.getC_ProjectPhase_ID());\n\t\tsetC_ProjectTask_ID(oLine.getC_ProjectTask_ID());\n\t\tsetC_Activity_ID(oLine.getC_Activity_ID());\n\t\tsetC_Campaign_ID(oLine.getC_Campaign_ID());\n\t\tsetAD_OrgTrx_ID(oLine.getAD_OrgTrx_ID());\n\t\tsetUser1_ID(oLine.getUser1_ID());\n\t\tsetUser2_ID(oLine.getUser2_ID());\n\t}", "public void commentLine(byte[] data, int start, int length) {\n crc.update(data, start, length);\n }", "public void setLineNo (int LineNo);", "public void drawLine(float[] line) {\n\t\tline(line[0], line[1], line[2], line[3]);\n\t}", "void storeline(String linebuffer, fileInfo pinfo) {\n\t\tint linenum = ++pinfo.maxLine; /* note, no line zero */\n\t\tif (linenum > fileInfo.MAXLINECOUNT) {\n\t\t\tSystem.err.println(\"MAXLINECOUNT exceeded, must stop.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tpinfo.symbol[linenum] = node.addSymbol(linebuffer, pinfo == oldinfo,\n\t\t\t\tlinenum);\n\t}", "public void markLine(Line line, Player player) {\n // The logic preventing double marking of a side is handled\n // in the mark function of the Board type. CHECK THIS!\n //\n Side side = line.getSide();\n this.setSide(side, true);\n\n Color lineColor = player.getLineColor();\n BoardDisplay bd = controller.getDisplay().getBoardDisplay();\n bd.colorSelectedLine(line, lineColor);\n }", "void updateGlobalLines() {\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tif (i != selectedLine) // do not update Line if it is being dragged\n\t\t\t\t\t\t\t\t\t// (because dragging method already updates\n\t\t\t\t\t\t\t\t\t// it\n\t\t\t{\n\t\t\t\tline[i] = new Line(myParent, point[neighborPointsFromLine(i)[1]].position,\n\t\t\t\t\t\tpoint[neighborPointsFromLine(i)[0]].position, i, this);\n\t\t\t}\n\t\t}\n\t}", "public void fluctuateLine() {\n fluctuateLine(this.randomGenerator);\n }", "public void update(Object obj) {\n\t\t\t\t\t\tNode clone = new Node();\n\t\t\t\t\t\tclone.attachChild(new SharedLine(lineGeo1));\n\t\t\t\t\t\tclone.attachChild(new SharedLine(lineGeo2));\n\t\t\t\t\t\tlines.attachChild(clone);\n\t\t\t\t\t\tTealWorldManager.getWorldManager().addToUpdateList(lines);\n\t\t\t\t\t}", "public void update(LineEvent event) {\r\n if (LineEvent.Type.STOP.equals(event.getType())) {\r\n stop();\r\n }\r\n }", "public void editForwardLines(int line, int player, int newLine, int newPlayer) {\n Player selection1 = forwardLines[line][player];\n Player selection2 = forwardLines[newLine][newPlayer];\n\n //swap players\n forwardLines[line][player] = selection2;\n forwardLines[newLine][newPlayer] = selection1;\n }", "@Override\n\t\t\tpublic void update(Observable o, Object arg) {\n\t\t\t\tupdateCurrentLineFontSize(Properties.getDefaultProperties().getIntProperty(currentLineFontSizeKey));\n\t\t\t}", "public void setLineNo(int lineNo)\n\t{\n\t\tsetIntColumn(lineNo, OFF_LINE_NO, LEN_LINE_NO);\n\t}", "protected abstract void lineTo(final float x, final float y);", "public void setLinePosition(int pos) {\n this.linePosition = pos;\n }", "public void setLine1(java.lang.String line1) {\r\n this.line1 = line1;\r\n }", "public void setInvoiceLine (MInvoiceLine iLine, int M_Locator_ID, BigDecimal Qty)\n\t{\n\t\tsetC_OrderLine_ID(iLine.getC_OrderLine_ID());\n\t\tsetLine(iLine.getLine());\n\t\tsetC_UOM_ID(iLine.getC_UOM_ID());\n\t\tint M_Product_ID = iLine.getM_Product_ID();\n\t\tif (M_Product_ID == 0)\n\t\t{\n\t\t\tset_ValueNoCheck(\"M_Product_ID\", null);\n\t\t\tset_ValueNoCheck(\"M_Locator_ID\", null);\n\t\t\tset_ValueNoCheck(\"M_AttributeSetInstance_ID\", null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsetM_Product_ID(M_Product_ID);\n\t\t\tsetM_AttributeSetInstance_ID(iLine.getM_AttributeSetInstance_ID());\t\t\t\n\t\t\tif (M_Locator_ID == 0)\n\t\t\t\tsetM_Locator_ID(Qty);\t//\trequires warehouse, product, asi\n\t\t\telse\n\t\t\t\tsetM_Locator_ID(M_Locator_ID);\n\t\t}\n\t\tsetC_Charge_ID(iLine.getC_Charge_ID());\n\t\tsetDescription(iLine.getDescription());\n\t\tsetIsDescription(iLine.isDescription());\n\t\t//\n\t\tsetC_Project_ID(iLine.getC_Project_ID());\n\t\tsetC_ProjectPhase_ID(iLine.getC_ProjectPhase_ID());\n\t\tsetC_ProjectTask_ID(iLine.getC_ProjectTask_ID());\n\t\tsetC_Activity_ID(iLine.getC_Activity_ID());\n\t\tsetC_Campaign_ID(iLine.getC_Campaign_ID());\n\t\tsetAD_OrgTrx_ID(iLine.getAD_OrgTrx_ID());\n\t\tsetUser1_ID(iLine.getUser1_ID());\n\t\tsetUser2_ID(iLine.getUser2_ID());\n\t}", "public Line getLine()\n {\n return line;\n }", "public void setProductLine(entity.APDProductLine value);", "public int line() {\r\n return line;\r\n }", "public void line(String line, int lineNumber) {\n\t\t\tline(line);\n\t\t}", "public final void nextRow() {\n this.line++;\n }", "public void setLineID(int lineID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LINEID$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(LINEID$2);\n }\n target.setIntValue(lineID);\n }\n }", "@Override\n public void forceIncrementModificationCounter(LineEntity entity) {\n\n }", "public static void writeLine(String string, int line) {\r\n\t\taddLine(string, line);\r\n\t\trefresh();\r\n\t}", "void setLineNumber(int lineNumber) {}", "public void updateLineChart()\r\n {\r\n hoursLoggedSeries = new XYChart.Series<>();\r\n hoursLoggedSeries.setName(Integer.toString(LocalDate.now().getYear()));\r\n lineChart.getData().clear();\r\n \r\n try{\r\n populateSeriesFromDB();\r\n }\r\n catch(SQLException e)\r\n {\r\n System.err.println(e.getMessage());\r\n }\r\n lineChart.getData().addAll(hoursLoggedSeries);\r\n }", "public SalesOrderLine put(final SalesOrderLine newSalesOrderLine) throws ClientException {\n return send(HttpMethod.PUT, newSalesOrderLine);\n }", "public String fixline(String line, float by);", "@Override\n\t\t\tpublic void update(Observable o, Object arg) {\n\t\t\t\tupdateCurrentLineForeground(Properties.getDefaultProperties().getOptinalColorProperty(currentLineFontForegroundKey, \n\t\t\t\t\t\t\t\t\t\t\tColor.black));\n\t\t\t}", "public void setLineWeight(int nuovo_lineaspessore)\n {\n \tboolean bo = informaPreUpdate();\n lineaspessore = nuovo_lineaspessore;\n\t\tinformaPostUpdate(bo);\n }", "public SalesOrderLine patch(final SalesOrderLine sourceSalesOrderLine) throws ClientException {\n return send(HttpMethod.PATCH, sourceSalesOrderLine);\n }", "protected void writeLine(String line) throws IOException {\n writer.write(line);\n writer.write(EOL);\n }", "private void processCalculation(String line) {\n\t\t//TODO: fill\n\t}", "public void updatePolyline(Polyline polyline) {\n if (!isAddedToMap(polyline)) {\n logNonAdded(polyline);\n } else {\n this.polylines.update(polyline);\n }\n }", "public int getLine() {\r\n return line;\r\n }", "@Override\n\t\t\tpublic void update(Observable o, Object arg) {\n\t\t\t\tupdateOtherLineFontSize(Properties.getDefaultProperties().getIntProperty(otherLineFontSizeKey));\n\t\t\t}", "public void updateBuffer(final int input) {\n\n // Check for null pointers on buffer line\n if(this.buffer.get(lineT).isEmpty() || this.lineT == this.buffer.get(lineT).size()) \n this.buffer.get(lineT).add(input);\n \n else { \n if(this.inputMode) // Insert mode\n this.buffer.get(lineT).add(columnT, input);\n else // Overwrite mode\n this.buffer.get(lineT).set(columnT, input);\n }\n this.columnT++; // Increase one unit column target position\n }", "public void resetLine() {\n reactorLine.setCurrentFrequency(reactorLine.getBaseFrequency());\n reactorLine.setCurrentAmplitude(reactorLine.getBaseAmplitude());\n reactorLine.setCurrentPhase(reactorLine.getBasePhase());\n inputAdjuster.setCurrentFrequency(inputAdjuster.getBaseFrequency());\n inputAdjuster.setCurrentAmplitude(inputAdjuster.getBaseAmplitude());\n inputAdjuster.setCurrentPhase(inputAdjuster.getBasePhase());\n this.updateOscilloscopeData();\n }", "private void readLine() throws IOException {\n line = reader.readLine(); // null at the end of the source\n currentPos = -1;\n\n if (line != null) {\n lineNum++;\n }\n\n if (line != null) {\n sendMessage(new Message(MessageType.SOURCE_LINE, new Object[]{lineNum, line}));\n }\n }", "private void addToLineItem(LineItem newLineItem) {\r\n LineItem[] tempItems = new LineItem[lineItems.length + 1];\r\n System.arraycopy(lineItems, 0, tempItems, 0, lineItems.length);\r\n tempItems[lineItems.length] = newLineItem;\r\n lineItems = tempItems;\r\n }", "public int getLine() {\n return line;\n }", "private static void lineTo(float x, float y) {\n setPenDown();\n mPivotX = mPenX = x;\n mPivotY = mPenY = y;\n mPath.lineTo(x * mScale, y * mScale);\n elements.add(\n new PathElement(ElementType.kCGPathElementAddLineToPoint, new Point[] {new Point(x, y)}));\n }", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "public void addActualExpenseLine(ActualExpense line) {\n line.setDocumentLineNumber(getActualExpenses().size() + 1);\n final String sequenceName = line.getSequenceName();\n final Long sequenceNumber = getSequenceAccessorService().getNextAvailableSequenceNumber(sequenceName, ActualExpense.class);\n line.setId(sequenceNumber);\n line.setDocumentNumber(this.documentNumber);\n notifyChangeListeners(new PropertyChangeEvent(this, TemPropertyConstants.ACTUAL_EXPENSES, null, line));\n getActualExpenses().add(line);\n logErrors();\n }", "void putLine(String line);", "public void newChatLine(String line) {\n\t\tSystem.out.println(line);\n\t}", "public String getLine() {\n return this.line;\n }", "public void updateLinesAndGrid() {\n\t\tutilities.redrawAllLines(0, false);\n\t\ttableDisplay.setGrid(utilities.getOrderedWayPoints());\n\t}", "public void addPolyLine() {\n abstractEditor.drawNewShape(new ELineDT());\n }", "public String getline() {\n\t\treturn _line;\n\t}", "void updateData();", "public int getLine() {\r\n\t\treturn line;\r\n\t}", "public int getLine() {\n return line;\n }" ]
[ "0.69290656", "0.69076645", "0.6798374", "0.67971534", "0.6643306", "0.6573523", "0.6434843", "0.63702416", "0.6363032", "0.63428193", "0.6325786", "0.6321458", "0.6273296", "0.6271083", "0.62257487", "0.6211941", "0.6183295", "0.6167805", "0.61520875", "0.6132818", "0.61230093", "0.6114757", "0.6111868", "0.609606", "0.6066663", "0.60499436", "0.6028386", "0.6021362", "0.6018159", "0.6003544", "0.5991925", "0.59802985", "0.59560597", "0.5951096", "0.5925119", "0.59217125", "0.5918253", "0.59078914", "0.5901809", "0.58907515", "0.58821607", "0.5874325", "0.5867219", "0.5857173", "0.5850534", "0.58465517", "0.583091", "0.5830529", "0.58281153", "0.582702", "0.5819341", "0.58165646", "0.58049595", "0.5795708", "0.57921445", "0.5788", "0.5772108", "0.5763738", "0.5750835", "0.5746717", "0.5739221", "0.5731164", "0.57285005", "0.5728291", "0.5723172", "0.57171464", "0.5705704", "0.5700572", "0.56837296", "0.5677273", "0.56749105", "0.5672056", "0.5666052", "0.5658778", "0.5632165", "0.5620396", "0.5618143", "0.5613602", "0.5613307", "0.55937207", "0.5593397", "0.55932754", "0.55882907", "0.55874497", "0.5583231", "0.5579931", "0.55785584", "0.5576852", "0.55710053", "0.55643195", "0.5561422", "0.5561337", "0.55603164", "0.554993", "0.5540347", "0.553583", "0.55251884", "0.5522145", "0.55177826", "0.5517521", "0.5509911" ]
0.0
-1
Method will read and set user information to the class.
public void getUserData() { int count; //Loop counter String pathname = filename; String div = ","; //Used to divide info. String [] userArray; //To hold divided info. try { FileReader reader = new FileReader(pathname); BufferedReader bufferedReader = new BufferedReader(reader); String line; //While getting each line of the data file, BUT stops when USER data found. //Loop through each line and determine which user data to choose. while ((line = bufferedReader.readLine()) != null) { // System.out.println("User Data in file: " + line); System.out.println("Checking User name in line of data ..."); //This divides the info in the data file into an array. userArray = line.split(div); if (User.equals(userArray[0])) { System.out.println("User Found: " + User); user_line = line; //Assigning data to class variables. UserPassword = userArray[1].trim(); //Assigning the password. Device_ID = Integer.parseInt(userArray[2].trim()); //Assigning device ID. isLost = (Integer.parseInt(userArray[3].trim()) == 0) ? false : true; //This reads out information. for (count = 0; count < userArray.length; count++) { System.out.println("INFO: " + userArray[count]); } break; } System.out.println("========================================"); } reader.close(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void populateUserInfo() {\n User user = Session.getInstance().getUser();\n labelDisplayFirstname.setText(user.getFirstname());\n labelDisplayLastname.setText(user.getLastname());\n lblEmail.setText(user.getEmail());\n lblUsername.setText(user.getUsername());\n }", "public void populateUserInformation()\n {\n ViewInformationUser viewInformationUser = new ViewFXInformationUser();\n\n viewInformationUser.buildViewProfileInformation(clientToRegisteredClient((Client) user), nameLabel, surnameLabel, phoneLabel, emailLabel, addressVbox);\n }", "private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }", "private void initUser() {\n\t}", "private void loadUserData() {\n\t\tuserData = new UserData();\n }", "public void setupUser() {\n }", "private void setUserData(){\n }", "public void setupUserInfo(Bundle upUserInfo) {\n // Getting Info\n String name = upUserInfo.getString(\"userName\");\n String email = upUserInfo.getString(\"userEmail\");\n\n\n // Setting local Variables\n this.tutorName = name;\n this.tutorEmail = email;\n\n TextView nameField = (TextView) findViewById(R.id.UserNameField);\n nameField.setText(name);\n\n\n }", "private UserPrefernce(){\r\n\t\t\r\n\t}", "public UserInfo() {\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "private void getUser(){\n user = new User();\n SharedPreferences preferences = getSharedPreferences(\"account\", MODE_PRIVATE);\n user.setId(preferences.getInt(\"id\", 0));\n user.setPhone(preferences.getString(\"phone\", \"\"));\n user.setType(preferences.getInt(\"type\",0));\n }", "private void getUserInfo() {\n\t}", "public void setUser(UserData data) {\n user = data;\n }", "private void setUser(){\n try{\n if (!mainUser.getUsername().equals(\"\")){\n this.userName.setText(mainUser.getUsername());\n }else{\n this.userName.setText(\"User\");\n }\n\n\n File file = new File(mainUser.getProfileImage());\n if (!file.exists()){\n file = new File(getClass().getResource(\"../images/eren.png\").getFile());\n }\n Image img = new Image(file.toURI().toString());\n profileImage.setImage(img);\n\n setEventLabel(\"Welcome \"+mainUser.getFname()+\" \"+mainUser.getLname()+\".\");\n }catch (NullPointerException e){\n AlertBox.alert(AlertType.ERROR, stackRoot, anchorRoot, \"There was an error while updating UserInfo\");\n }\n }", "public User() {\n this.prefs = Gdx.app.getPreferences(\"prefs\");\n\n this.noWalls = prefs.getBoolean(\"noWalls\");\n this.noGrid = prefs.getBoolean(\"noGrid\");\n }", "public void setUser(String user)\n {\n _user = user;\n }", "private void readObject ( ObjectInputStream in ) throws IOException, ClassNotFoundException {\n ObjectInputStream.GetField fields = in.readFields();\n _user = (CTEUser) fields.get(\"_user\", null);\n }", "private void loadUser() {\n File dataFile = new File(getFilesDir().getPath() + \"/\" + DATA_FILE);\n\n if(dataFile.exists()) {\n loadData();\n } else { // First time CigCount is launched\n user = new User();\n }\n }", "static void loadUser() {\n\t\tScanner inputStream = null; // create object variable\n\n\t\ttry { // create Scanner object & assign to variable\n\t\t\tinputStream = new Scanner(new File(\"user.txt\"));\n\t\t\tinputStream.useDelimiter(\",\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"No User Infomation was Loaded\");\n\t\t\t// System.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\twhile (inputStream.hasNext()) {\n\n\t\t\t\tString instanceOf = inputStream.next();\n\n\t\t\t\tString readUserName = inputStream.next();\n\t\t\t\tString readPassword = inputStream.next();\n\t\t\t\tString readEmployeeNumber = inputStream.next();\n\t\t\t\tString readName = inputStream.next();\n\t\t\t\tString readPhone = inputStream.next();\n\t\t\t\tString readEmail = inputStream.next();\n\t\t\t\tif (instanceOf.contains(\"*AD*\")) {\n\t\t\t\t\tAdmin a1 = new Admin(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Admin User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword() + \" \"+ a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*CC*\")) {\n\t\t\t\t\tCourseCoordinator a1 = new CourseCoordinator(readUserName, readPassword, readEmployeeNumber,\n\t\t\t\t\t\t\treadName, readPhone, readEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an CC User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword() + \" \"+ a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*AP*\")) {\n\t\t\t\t\tApproval a1 = new Approval(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Approval User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword()+ \" \" + a1.getEmployeeNum());\n\t\t\t\t} else if (instanceOf.contains(\"*CA*\")) {\n\t\t\t\t\tCasual a1 = new Casual(readUserName, readPassword, readEmployeeNumber, readName, readPhone,\n\t\t\t\t\t\t\treadEmail);\n\t\t\t\t\ta1.setHrly_rate(inputStream.nextInt());\n\t\t\t\t\tuserInfoArray.add(a1);\n\t\t\t\t\t//System.out.println(\"Read an Casual User: \" + ((User) a1).getUserName() + \" \" + a1.getPassword()+ \" \" + a1.getEmployeeNum());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalStateException e) {\n\t\t\tSystem.err.println(\"Could not read from the file\");\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.err.println(\"Something wrong happened while reading the file\");\n\t\t}\n\t\tinputStream.close();\n\t}", "public void setUser(User user) { this.user = user; }", "public void setUser(String user) {\r\n this.user = user;\r\n }", "public void setUserData (Object userData) {\n\t\tthis.userData = userData;\n\t}", "public void setUserDetails(){\n name = firebaseUser.getDisplayName();\n username.setText(name);\n\n Glide.with(this).load(firebaseUser.getPhotoUrl()).into(profileIcon);\n }", "public void populateUserDetails() {\n\n this.enterprise = system.getOpRegionDirectory().getOperationalRegionList()\n .stream().filter(op -> op.getRegionId() == user.getNetworkId())\n .findFirst()\n .get()\n .getBuDir()\n .getBusinessUnitList()\n .stream()\n .filter(bu -> bu.getUnitType() == BusinessUnitType.CHEMICAL)\n .map(unit -> (ChemicalManufacturingBusiness) unit)\n .filter(chemBusiness -> chemBusiness.getEnterpriseId() == user.getEnterpriseId())\n .findFirst()\n .get();\n\n this.organization = (ChemicalManufacturer) enterprise\n .getOrganizationList().stream()\n .filter(o -> o.getOrgId() == user.getOrganizationId())\n .findFirst()\n .get();\n\n }", "@Override\n\tprotected void initData() {\n\t\trequestUserInfo();\n\t}", "protected void init() {\n setUUIDString();\n setNoteCreatedAt();\n setNoteUpdatedAt();\n setCreator(ParseUser.getCurrentUser());\n addAuthor(ParseUser.getCurrentUser());\n setACL(new ParseACL(ParseUser.getCurrentUser()));\n }", "public UserInfo() {\n }", "public void getUserData() {\r\n User user = serverView.getUserInfo(username.getText());\r\n username.setText(\"\");\r\n if (user == null) {\r\n Alert alert = new Alert(AlertType.ERROR);\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"no User with this username\");\r\n alert.showAndWait();\r\n } else {\r\n\r\n try {\r\n userContent.getChildren().clear();\r\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"UserInfoView.fxml\"));\r\n fxmlLoader.setController(new UserInfoController(user));\r\n Pane pane = fxmlLoader.load();\r\n userContent.getChildren().add(pane);\r\n\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }", "private void init(){\n this.firstNameTF.setText(user.getFirstName());\n this.nameTF.setText(user.getName());\n this.phoneTF.setText(user.getPhone());\n\n this.mailLabel.setText(user.getMail());\n this.roleLabel.setText(user.getFirstName());\n }", "public static void setUserDetails(UserSetup userSetup) {\n\n }", "void setUserInfo(UserInfo info);", "public void setUser(User theUser) {\n\t\tmyUser = theUser;\n\t}", "private void initObjects() {\n inputValidation = new InputValidation(activity);\n databaseHelper = new DatabaseHelper(activity);\n user = new User();\n }", "public void setUserData(Object userData) {\n this.userData = userData;\n }", "@PostConstruct\n\tprotected void handleLoad() {\n\t\tString _id = contextMB.getUser().getId();\n\t\tsetUser(userBC.load(Long.valueOf(_id)));\n\t}", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setUser(String user) {\n this.user = user;\n }", "public void setAuthentication(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.putString(\"userid\", mUserId);\n preferencesEditor.putString(\"areaid\", mAreaId);\n preferencesEditor.commit();\n }", "private void userInformation()\n {\n name = eName.getText().toString();\n userName = eUserName.getText().toString();\n email = eEmail.getText().toString();\n password = ePassword.getText().toString();\n password = encryptionAlgo.encryptPass(password);//initialize new encrypt password\n address = eAddress.getText().toString();\n favouriteWord = eFavourite.getText().toString();\n }", "public UserData() {\n\t\tvalid = false;\n\t\tcode = \"\";\n\t\t\n\t\tphone = \"\";\n\t\temail = \"\";\n\t\t\n\t\taccounts = new ArrayList<Account>();\n\t\tpayees = new ArrayList<Payee>();\n\t}", "public void setUser(String user) \r\n\t{\n\t\tthis.user = user;\r\n\t}", "@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}", "protected void proccesValues() {\n Users user = new Users();\n user.setName(bean.getName());\n user.setSurname(bean.getSurname());\n user.setUsername(bean.getUsername());\n StrongPasswordEncryptor passwordEncryptor = new StrongPasswordEncryptor();\n String encryptedPassword = passwordEncryptor.encryptPassword(bean.getPassword());\n user.setPassword(encryptedPassword);\n \n usersService.persist(user);\n Notification.show(msgs.getMessage(INFO_REGISTERED), Notification.Type.ERROR_MESSAGE);\n resetValues();\n UI.getCurrent().getNavigator().navigateTo(ViewLogin.NAME);\n }", "public void setUser_name(String user_name);", "public void initData(Users user){\n \n this.selectedUser = user;\n String idValue = String.valueOf(selectedUser.getId());\n String expiresValue = String.valueOf(selectedUser.getExpires_at());\n String enabledValue = String.valueOf(selectedUser.getEnabled());\n String lastLoginValue = String.valueOf(selectedUser.getLast_login());\n email.setText(selectedUser.getEmail());\n password.setText(selectedUser.getPassword());\n role.setText(selectedUser.getRoles());\n idField.setText(idValue);\n expiresField.setText(expiresValue);\n enabledField.setText(enabledValue);\n lockedTextField.setText(lastLoginValue);\n lastLoginTextField.setText(idValue);\n System.out.println(user.toString());\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "public void setUser(java.lang.String param){\r\n localUserTracker = true;\r\n \r\n this.localUser=param;\r\n \r\n\r\n }", "private void setCredentials() {\n Properties credentials = new Properties();\n\n try {\n credentials.load(new FileInputStream(\"res/credentials.properties\"));\n } catch (IOException e) {\n __logger.error(\"Couldn't find credentials.properties, not setting credentials\", e);\n return;\n }\n\n this.username = credentials.getProperty(\"username\");\n this.password = credentials.getProperty(\"password\");\n this.smtpHost = credentials.getProperty(\"smtphost\");\n this.imapHost = credentials.getProperty(\"imaphost\");\n\n if (password == null || password.equals(\"\")) {\n password = this.getPasswordFromUser();\n }\n\n __logger.info(\"Set credentials\");\n }", "public UserModel(){\n ID = 0; // The user's ID, largely used in conjuction with a database\n firstName = \"fname\"; //User's first name\n lastName = \"lname\"; // User's last name\n password= \"pass\"; ///User password\n username = \"testuser\"; //Valid email for user\n role = 0; //Whether the user is a typical user or administrator\n status = 0; //Whether the user is active or disabled\n }", "void setUserData(Object userData);", "void setUserUsername(String username);", "public User() {\n this.firstName = \"Lorenzo\";\n this.lastName = \"Malferrari\";\n this.username = \"[email protected]\";\n this.email = \"[email protected]\";\n this.password = \"123456\";\n this.city = \"Bologna\";\n this.country = \"Italia\";\n this.gender = \"Maschio\";\n this.birthdate = new Date();\n this.age = 21;\n this.imgUser = 1;\n this.last_access = new Date();\n this.registration_date = new Date();\n }", "private void setupUsernameAndFullNameTextView() {\n usernameTextView.setText(prismUser.getUsername());\n userFullNameText.setText(prismUser.getFullName());\n }", "private void loadUserData() {\n\t\t// Load and update all profile views\n\n\t\t// Load profile photo from internal storage\n\t\ttry {\n\t\t\t// open the file using a file input stream\n\t\t\tFileInputStream fis = openFileInput(getString(R.string.profile_photo_file_name));\n\t\t\t// the file's data will be read into a bytearray output stream\n\t\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\t\t// inputstream -> buffer -> outputstream\n\t\t\tbyte[] buffer = new byte[5 * 1024];\n\t\t\tint n;\n\t\t\t// read data in a while loop\n\t\t\twhile ((n = fis.read(buffer)) > -1) {\n\t\t\t\tbos.write(buffer, 0, n); // Don't allow any extra bytes to creep\n\t\t\t\t// in, final write\n\t\t\t}\n\t\t\tfis.close();\n\t\t\t// get the byte array from the ByteArrayOutputStream\n\t\t\tbytePhoto = bos.toByteArray();\n\t\t\tbos.close();\n\t\t} catch (IOException e) {\n\t\t}\n\n\t\t// load the byte array to the image view\n\t\tloadImage();\n\n\t\t// Get the shared preferences - create or retrieve the activity\n\t\t// preference object.\n\t\tString mKey = getString(R.string.preference_name);\n\t\tSharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n\t\t// Load name\n\t\tmKey = getString(R.string.name_field);\n\t\tString mValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editName)).setText(mValue);\n\n\t\t// Load class info\n\t\tmKey = getString(R.string.class_field);\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editClass)).setText(mValue);\n\n\t\t// Load Major\n\t\tmKey = getString(R.string.major_field);\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editMajor)).setText(mValue);\n\n\t\t// Load course information\n\t\t// Course 1 name\n\t\tmKey = \"Course #1 Name\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse1name)).setText(mValue);\n\n\t\t// Course 1 Time\n\t\tmKey = Globals.COURSE1_TIME_KEY;\n\t\tSpinner mSpinnerSelection = (Spinner) findViewById(R.id.course1TimeSpinner);\n\t\tmSpinnerSelection.setSelection(mPrefs.getInt(mKey, 0));\n\n\t\tmKey = \"Course #1 Location\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse1loc)).setText(mValue);\n\n\t\t// Course 2\n\t\tmKey = \"Course #2 Name\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse2name)).setText(mValue);\n\n\t\t// Course 2 Time\n\t\tmKey = Globals.COURSE2_TIME_KEY;\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course2TimeSpinner);\n\t\tmSpinnerSelection.setSelection(mPrefs.getInt(mKey, 0));\n\n\t\tmKey = \"Course #2 Location\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse2loc)).setText(mValue);\n\n\t\t// Course 3\n\t\tmKey = \"Course #3 Name\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse2name)).setText(mValue);\n\n\t\t// Course 3 Time\n\t\tmKey = Globals.COURSE3_TIME_KEY;\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course3TimeSpinner);\n\t\tmSpinnerSelection.setSelection(mPrefs.getInt(mKey, 0));\n\n\t\tmKey = \"Course #3 Location\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse3loc)).setText(mValue);\n\n\t\t// Course 4\n\t\tmKey = \"Course #4 Name\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse4name)).setText(mValue);\n\n\t\t// Course 4 Time\n\t\tmKey = Globals.COURSE4_TIME_KEY;\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course4TimeSpinner);\n\t\tmSpinnerSelection.setSelection(mPrefs.getInt(mKey, 0));\n\n\t\tmKey = \"Course #4 Location\";\n\t\tmValue = mPrefs.getString(mKey, \"\");\n\t\t((EditText) findViewById(R.id.editCourse4loc)).setText(mValue);\n\t}", "private void initObjects() {\n databaseHelper = new DatabaseHelper(activity);\n dbHelper = new DBHelper(activity);\n inputValidation = new InputValidation(activity);\n progress = new ProgressDialog(activity);\n user=new User();\n }", "private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }", "void setUserData(KingdomUser user, String path, Object value);", "@Override\n\tpublic void setUser(String sessionId, UserInfo userInfo) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"setUser\");\n//\t\tif (!isCloudChannelLive()) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_USER_OFFLINE,\n//\t\t\t\t\t\"User is not online\");\n//\t\t}\n\t\t\n\t\tUserPayload payload = new UserPayload();\n\t\t\n//\t\tUserInfo payload = new UserInfo();\n\t\tpayload.setCellPhone(userInfo.getCellPhone());\n\t\tpayload.setDisplayName(userInfo.getDisplayName());\n\t\tpayload.setEmail(userInfo.getEmail());\n\t\tpayload.setIdNumber(userInfo.getIdNumber());\n\t\t\n\t\t//user name cannot modified in cloud service\n//\t\tpayload.setUserName(userInfo.getUserName());\n\t\t\n\t\tUserSetRequest request = new UserSetRequest();\n\t\trequest.setSessionId(sessionId);\n\t\trequest.setPayload(payload);\n\t\ttry {\n\t\t\tcloudSecurityManager.setUser(request);\n\t\t\t\n\t\t\tUserInfo savedUserInfo = userInfoDao.getUserInfoByToken(sessionId);\n\t\t\tif (savedUserInfo != null) {\n\t\t\t\tsavedUserInfo.setCellPhone(userInfo.getCellPhone());\n\t\t\t\tsavedUserInfo.setDisplayName(userInfo.getDisplayName());\n\t\t\t\tsavedUserInfo.setEmail(userInfo.getEmail());\n\t\t\t\tsavedUserInfo.setIdNumber(userInfo.getIdNumber());\n\t\t\t\tuserInfoDao.saveUserInfo(savedUserInfo);\n\t\t\t}\n\t\t} catch (CloudException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new HFModuleException(e.getErrorCode(), e.getMessage());\n\t\t}\n\t\t\n//\t\tJSONObject req = new JSONObject();\n//\t\tJSONObject pl = new JSONObject();\n//\t\ttry {\n//\n//\t\t\tif (info.getDisplayName() != null)\n//\t\t\t\tpl.put(\"displayName\", info.getDisplayName());\n//\t\t\tif (info.getUserName() != null)\n//\t\t\t\tpl.put(\"userName\", info.getUserName());\n//\t\t\tif (info.getPassword() != null)\n//\t\t\t\tpl.put(\"password\", info.getPassword());\n//\t\t\tif (info.getCellPhone() != null)\n//\t\t\t\tpl.put(\"cellPhone\", info.getCellPhone());\n//\t\t\tif (info.getEmail() != null)\n//\t\t\t\tpl.put(\"email\", info.getEmail());\n//\t\t\tif (info.getIdNumber() != null)\n//\t\t\t\tpl.put(\"idNumber\", info.getIdNumber());\n//\n//\t\t\treq.put(\"CID\", 10221);\n//\t\t\treq.put(\"SID\", getsid());\n//\t\t\treq.put(\"PL\", pl);\n//\t\t\tString rsp = HttpProxy.reqByHttpPost(req.toString());\n//\n//\t\t\tJSONObject jo = new JSONObject(rsp);\n//\t\t\tif (jo.isNull(\"RC\")) {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\t\"can not set user\");\n//\t\t\t}\n//\t\t\tif (jo.getInt(\"RC\") != 1) {\n//\t\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\t\"can not set user\");\n//\t\t\t}\n//\n//\t\t} catch (JSONException e) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_SET_USER,\n//\t\t\t\t\t\"can not set user\");\n//\t\t}\n\t}", "private UserInterface() {\r\n\t\tif (yesOrNo(\"Look for saved data and use it?\")) {\r\n\t\t\tretrieve();\r\n\t\t} else {\r\n\t\t\tstore = Store.instance();\r\n\t\t}\r\n\t}", "private void populateUserProfile() {\n setProfilePic();\n mDisplayNameTextView.setText(user.getName());\n mUsernameTextView.setText(String.format(\"@%s\", user.getUsername()));\n mBioTextView.setText(user.getBio());\n setAdapterForUserStories();\n\n new Thread(new Runnable() {\n public void run(){\n setFollowingCount();\n setFollowersCount();\n setStoriesCount();\n queryStoriesFromUser();\n }\n }).start();\n }", "public void init(UserData userData) {\n this.userData = userData;\n }", "@Override\n public UserInfo loadUserInfo() {\n // load the user directly from the database. the instance returned from currentUser() might not\n // be with the latest changes\n return userGroupService.findUser(userGroupService.currentUser().getUsername());\n }", "private void getUser(){\n mainUser = DatabaseAccess.getUser();\n }", "public User() {\n setName(\"\");\n setBirthdate(\"\");\n setCity(\"\");\n setIsSingle(true);\n setPartnerName(\"\");\n setPartnerGender(\"\");\n setMonthsUntilDeath(0);\n }", "public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}", "private void getGredentialsFromMemoryAndSetUser()\n\t{\n\t SharedPreferences settings = getSharedPreferences(LOGIN_CREDENTIALS, 0);\n\t String username = settings.getString(\"username\", null);\n\t String password = settings.getString(\"password\", null);\n\t \n\t //Set credentials to CouponsManager.\n\t CouponsManager.getInstance().setUser(new User(username, password));\n\t \n\t}", "void setUserInfo(final UserInfo userInfo);", "public User getUserData();", "private UserAccountInfoParcelableBean(Parcel in) {\n\t\tuserName = in.readString();\n\t\tpassword1 = in.readString();\n\t\tpassword2 = in.readString();\n\t\tfirstName = in.readString();\n\t\tlastName = in.readString();\n\t\teMailAddress = in.readString();\n\t\tuserType = in.readString();\n\t}", "public UserData prepareUserData() throws IOException {\n\n String userName = dataGenerator.prepareUserName();\n String firstName = dataGenerator.prepareFirstName();\n String lastName = dataGenerator.prepareLastName() ;\n String email = dataGenerator.prepareEmail();\n String password = dataGenerator.preparePassword();\n\n return new UserData(userName,firstName,lastName,email,password);\n }", "protected User(){\n this.username = null;\n this.password = null;\n this.accessLevel = null;\n this.name = DEFAULT_NAME;\n this.telephone = DEFAULT_TELEPHONE;\n this.email = DEFAULT_EMAIL;\n }", "public void setUser(String businessName) {\n editSharedPrefs().putString(USER_NAME, businessName).apply();\n editSharedPrefs().putBoolean(SHARED_PREFS_SETUP, true);\n }", "public void setUser(User user) {\r\n this.user = user;\r\n }", "public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }", "@Override\n public boolean setLoggedUser(User user) \n {\n try\n {\n File file = new File(System.getProperty(\"user.home\")+\"\\\\user.ser\");\n \n File file_remember_me = new File(System.getProperty(\"user.home\")+\"\\\\remember.ser\");\n if(!file_remember_me.exists()) file.deleteOnExit();\n \n FileOutputStream fout = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fout); \n oos.writeObject(user);\n oos.close();\n\t}\n catch(Exception ex){ ex.printStackTrace();return false;}\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 User() {\n uid= 0;\n username = \"\";\n password = \"\";\n role = \"user\";\n status = false;\n updatedTime = new Timestamp(0);\n }", "public void initUser(ActiveSession user) {\n this.user = user;\n }", "public users() {\n initComponents();\n connect();\n autoID();\n loaduser();\n \n \n }", "user(String username, int herotype) {\r\n this.username = username;\r\n this.herotype = herotype;\r\n }", "public void setUserData(Object argUserData) {\n userData = argUserData;\n }", "abstract public void setUserData(Object data);", "public User() {\n this.inv = new Inventory();\n this.fl = new FriendList();\n this.tradesList = new TradesList();\n this.tradeCount = 0;\n this.downloadsEnabled = true;\n }", "public User() {\n this.username = \"test\";\n }", "private void initUserInstance(User user){\n Fridge fridge = DatabaseHelper.getDatabaseInstance().takeFridgeOfUser(user);\n //print the printable\n Log.i(\"login_fridge\", fridge.toString());\n //assign fridge to user\n user.setFridge(fridge);\n\n //populate Instance class with current user\n Instance.getSingletonInstance().setCurrentUser(user);\n }", "private void loadUserInformation() {\n FirebaseUser user = mAuth.getCurrentUser();\n\n if (user != null) {\n if (user.getPhotoUrl() != null) {\n Glide.with(this).load(user.getPhotoUrl().toString()).into(profilePic);\n }\n if (user.getDisplayName() != null) {\n name.setText(user.getDisplayName());\n }\n\n }\n\n }", "public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void setLayoutElements() {\n // AuthenticatedUser is async thread.\n // It is getting the details for the\n // authenticated user and use them\n // to set UI elements below.\n AuthenticatedUser getAccount = new AuthenticatedUser(\n this, profilePictureProgressBar, profilePicture, firstName, lastName, email\n );\n\n // Starting the thread.\n getAccount.execute();\n }", "public void setUserInfo(UserInfo userInfo) {\r\n this.userInfo = userInfo;\r\n }", "private void setAuthenticatedUser(HttpServletRequest req, HttpSession httpSess, String userName) {\n\t\t// Set the authentication\n\t\tauthComponent.setCurrentUser(userName);\n\n\t\t// Set up the user information\n\t\tUserTransaction tx = transactionService.getUserTransaction();\n\t\tNodeRef homeSpaceRef = null;\n\t\tUser user;\n\t\ttry {\n\t\t\ttx.begin();\n\t\t\tuser = new User(userName, authService.getCurrentTicket(), personService.getPerson(userName));\n\t\t\thomeSpaceRef = (NodeRef) nodeService.getProperty(personService.getPerson(userName), ContentModel.PROP_HOMEFOLDER);\n\t\t\tif(homeSpaceRef == null) {\n\t\t\t\tlogger.warn(\"Home Folder is null for user '\"+userName+\"', using company_home.\");\n\t\t\t\thomeSpaceRef = (NodeRef) nodeService.getRootNode(Repository.getStoreRef());\n\t\t\t}\n\t\t\tuser.setHomeSpaceId(homeSpaceRef.getId());\n\t\t\ttx.commit();\n\t\t} catch (Throwable ex) {\n\t\t\tlogger.error(ex);\n\n\t\t\ttry {\n\t\t\t\ttx.rollback();\n\t\t\t} catch (Exception ex2) {\n\t\t\t\tlogger.error(\"Failed to rollback transaction\", ex2);\n\t\t\t}\n\n\t\t\tif (ex instanceof RuntimeException) {\n\t\t\t\tthrow (RuntimeException) ex;\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"Failed to set authenticated user\", ex);\n\t\t\t}\n\t\t}\n\n\t\t// Store the user\n\t\thttpSess.setAttribute(AuthenticationHelper.AUTHENTICATION_USER, user);\n\t\thttpSess.setAttribute(LoginBean.LOGIN_EXTERNAL_AUTH, Boolean.TRUE);\n\n\t\t// Set the current locale from the Accept-Lanaguage header if available\n\t\tLocale userLocale = parseAcceptLanguageHeader(req, m_languages);\n\n\t\tif (userLocale != null) {\n\t\t\thttpSess.setAttribute(LOCALE, userLocale);\n\t\t\thttpSess.removeAttribute(MESSAGE_BUNDLE);\n\t\t}\n\n\t\t// Set the locale using the session\n\t\tI18NUtil.setLocale(Application.getLanguage(httpSess));\n\n\t}", "public void setUser(String paramUser) {\n\tstrUser = paramUser;\n }", "private void initializeCurrentUser() {\n if (enableLoginActivity && mAuth.getCurrentUser() != null) {\n try {\n initializeUser();\n refreshGoogleCalendarToken();\n } catch (PetRepeatException e) {\n Toast toast = Toast.makeText(this, getString(R.string.error_pet_already_existing),\n Toast.LENGTH_LONG);\n toast.show();\n }\n\n if (mAuth.getCurrentUser() != null) {\n mAuth.getCurrentUser().getIdToken(false).addOnCompleteListener(task -> {\n user.setToken(Objects.requireNonNull(task.getResult()).getToken());\n });\n }\n }\n }", "void setPassedUser(User passedUser);", "public void setUsername(String username) {this.username = username;}", "public User()\r\n\t{\r\n\t\tthis.userId = 0;\r\n\t\tthis.userName = \"\";\r\n\t\tthis.role = \"\";\r\n\t\tthis.firstName = \"\";\r\n\t\tthis.lastName = \"\";\r\n\t\tthis.emailAddress = \"\";\r\n\t\tthis.streetAddress = \"\";\r\n\t\tthis.city = \"\";\r\n\t\tthis.state = \"\";\r\n\t\tthis.zip = 0;\r\n\t\tthis.country = \"\";\r\n\t}", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public java.lang.String getUser(){\r\n return localUser;\r\n }" ]
[ "0.7048738", "0.6975615", "0.6919609", "0.6803239", "0.6784126", "0.67703784", "0.67527133", "0.67121136", "0.6611589", "0.65396154", "0.6511064", "0.64980483", "0.6423524", "0.6372005", "0.6323363", "0.6316567", "0.6276165", "0.6261602", "0.6196", "0.616929", "0.6155892", "0.6135129", "0.6134369", "0.61339635", "0.61174035", "0.61089396", "0.61047506", "0.6092508", "0.60904354", "0.6083822", "0.60801774", "0.60566247", "0.6035293", "0.6028331", "0.6021413", "0.60102093", "0.60102093", "0.60102093", "0.60102093", "0.6008924", "0.60085577", "0.6002233", "0.5999361", "0.59964275", "0.5976972", "0.5948956", "0.5947516", "0.5943016", "0.5943016", "0.5943016", "0.5919353", "0.5913887", "0.5910602", "0.59100056", "0.59059197", "0.5890938", "0.5890623", "0.5878763", "0.5878232", "0.58745146", "0.58709645", "0.58659345", "0.5858552", "0.5852951", "0.5852471", "0.5846273", "0.58360624", "0.58303267", "0.5827303", "0.58251303", "0.58250016", "0.5821933", "0.58156276", "0.5811972", "0.58095646", "0.58021975", "0.58007556", "0.5800676", "0.5799536", "0.5799153", "0.57890576", "0.57689726", "0.5768122", "0.57507145", "0.5750061", "0.5749404", "0.57483983", "0.5746219", "0.57405174", "0.5738096", "0.5730965", "0.5727097", "0.5716476", "0.57157505", "0.571548", "0.57049364", "0.5703501", "0.5695746", "0.5691238", "0.5691238" ]
0.5815232
73
Used to write the user into the file to set device to LOST/FOUND. Needs: password, phone ID, and status.
public void writeDeviceLost(boolean status) { String writeStatement = (User + ", " + UserPassword + ", " + Device_ID + ", "); //System.out.println("\nWRITE Statement: " + writeStatement); writeStatement += (status) ? (1) : (0); // System.out.println("\nWRITE Statement: " + writeStatement); //Write Area Below Start try { //THIS WORKS DONT TOUCH IT. or at least save copies. File fileToBeModified = new File(filename); String oldContent = ""; BufferedReader reader = null; FileWriter writer = null; reader = new BufferedReader(new FileReader(fileToBeModified)); String line = reader.readLine(); while (line != null) { oldContent = oldContent + line + System.lineSeparator(); line = reader.readLine(); } //Replacing oldString with newString in the oldContent String newContent = oldContent.replaceAll(user_line, writeStatement); //Rewriting the input text file with newContent writer = new FileWriter(fileToBeModified); writer.write(newContent); reader.close(); writer.close(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@Override\n public boolean setLoggedUser(User user) \n {\n try\n {\n File file = new File(System.getProperty(\"user.home\")+\"\\\\user.ser\");\n \n File file_remember_me = new File(System.getProperty(\"user.home\")+\"\\\\remember.ser\");\n if(!file_remember_me.exists()) file.deleteOnExit();\n \n FileOutputStream fout = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fout); \n oos.writeObject(user);\n oos.close();\n\t}\n catch(Exception ex){ ex.printStackTrace();return false;}\n \n return true;\n }", "public void userSettings(String userName, String password, File nameFile,File passFile, String fileadd) {\n try\n {\n \n if(!nameFile.exists())\n {\n nameFile.createNewFile();\n }\n if(!passFile.exists())\n {\n passFile.createNewFile();\n }\n \n FileReader ufr = new FileReader(nameFile);\n FileReader pfr = new FileReader(passFile);\n \n BufferedReader ubr = new BufferedReader(ufr);\n BufferedReader pbr = new BufferedReader(pfr);\n \n ArrayList<String> uName = new ArrayList<>();\n ArrayList<String> uPass = new ArrayList<>();\n for (int i = 0; i < lineNum(fileadd); i++) {\n uName.add(ubr.readLine());\n uPass.add(pbr.readLine());\n }\n for (int i = 0; i < lineNum(fileadd); i++) \n {\n if (userName.equals(uName.get(i)))\n {\n uPass.set(i, password);\n } \n }\n \n ufr.close();\n pfr.close();\n FileWriter fw = new FileWriter(passFile);\n PrintWriter pw = new PrintWriter(fw);\n pw.print(\"\");\n \n FileWriter fw2 = new FileWriter(passFile, true);\n PrintWriter pw2 = new PrintWriter(fw2, true);\n \n for (int j = 0; j < uPass.size() -1; j++)\n {\n \n pw.print(uPass.get(j));\n pw.println();\n \n }\n pw.close();\n }catch(Exception e)\n {\n e.printStackTrace();\n }\n \n }", "@Override\r\n public void onUserSet(GenericDevice dev, PDeviceHolder devh, PUserHolder us) {\n\r\n }", "public static void createOrOpenUsersFile() {\n try {\r\n File usersFile = new File(\"users.txt\");\r\n if (usersFile.createNewFile()) {\r\n System.out.println(\"\\nFile \" + usersFile.getName() + \" has been created.\");\r\n } else {\r\n System.out.println(\"\\nFile \" + usersFile.getName() + \" is ready.\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n }", "void addUserInfo(String user, String password) {\r\n if (!userInfo.containsKey(user)) {\r\n userInfo.put(user, password);\r\n } else {\r\n System.out.println(\"User already exist!\");\r\n }\r\n writeToFile(\"Password.bin\", userInfo);\r\n }", "private void writeAccount() {\n SharedPreferences pref = getSharedPreferences(\"ACCOUNT\", Context.MODE_PRIVATE);\n SharedPreferences.Editor edt = pref.edit();\n\n edt.putString(\"email\", Me.getInstance().getEmail());\n edt.putString(\"password\", txtPassword.getText().toString().trim());\n\n edt.commit();\n }", "public static void setUserPassed(boolean passed, @Nullable Context context) {\n Account.passed = passed;\n\n // if logging out, there is no need to update the map or database\n if (user.equals(\"\")) return;\n\n map.put(user, passed);\n\n // also update the database\n try {\n String date = (new SimpleDateFormat(\"dd/MM/yyyy\", Locale.ENGLISH)).format(new Date());\n // 3 fields to store in database:\n // 1. username NRIC (String)\n // 2. whether the user has GREEN PASS (boolean)\n // 3. display date of vaccination (String)\n String string = user + \",\" + passed + \",\" + date;\n File.overwriteLine(\"vaccine.txt\", context, string, user, \",\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void changeContact(String id,String pass,String newno) throws IOException\n {\n \tNode<Admin> pos = adm_list.getFirst();\n \twhile(pos!=null)\n \t{\n \t\tif(pos.getData().employee_id.equals(id) && pos.getData().password.equals(pass))\n \t\t{\n \t\t\tpos.getData().contact = newno;\n \t\t}\n \t\tpos = pos.getNext();\n \t}\n \twrite_adm_file();\n }", "void appendUserInformation(String line);", "private void storeLoggedInUser(LoginResponse response){\n preferenceManager = SharedPreferenceManager.getInstance(this);\n preferenceManager.StoreAccountDetails(response.getAccount());\n\n if(response.getCamera() != null){\n preferenceManager.StoreDeviceDetails(response.getCamera());\n }\n registerDeviceToken();\n }", "public void setUser_mac(java.lang.String newUser_mac);", "private void writeNewUser(String name,String email,String password) {\n mDatabase.child(\"User\").child(name).child(\"Email\").setValue(email);\n mDatabase.child(\"User\").child(name).child(\"Password\").setValue(password);\n }", "private void setPwdByOS() {\n\t\t\n\t\tString home = System.getProperty(\"user.home\");\n\t\t\n\t\tif (OSUtils.isWindows()) {\n\t\t\tpwd = home + \"\\\\client\\\\\";\n\t\t\t\n\t\t} else if (OSUtils.isMac() || OSUtils.isUnix()) {\n\t\t\tpwd = home + \"/client/\";\n\t\t\t\n\t\t}\n\t\t\n\t\tboolean exists = FileUtils.createDirectory(pwd);\n\t\tif (!exists) {\n\t\t\tSystem.err.println(\"Failed to create PWD: \" + pwd);\n\t\t}\n\t\n\t}", "public void write(Context c) throws IOException, FileNotFoundException {\n\t\tFileOutputStream f = null;\n\t\tObjectOutputStream o = null;\n\t\tf = c.openFileOutput(this.filename, Context.MODE_PRIVATE);\n\t\to = new ObjectOutputStream(f);\n\t\to.writeObject(this.user);\n\t\to.flush();\n\t\to.close();\n\t\t//f.close();\n\t}", "public static String saveUser(User user){\r\n File userDir = (File)userDirs.get(user);\r\n\r\n if (user.isGuest()){\r\n System.out.println(\"Querying user about saving guest settings\");\r\n int result = JOptionPane.showConfirmDialog(getMainFrame(), \r\n \"Would you like to save the guest preferences?\\n(they may be shared with anyone else using this computer)\", \"Save preferences?\", JOptionPane.YES_NO_OPTION);\r\n if (result == JOptionPane.YES_OPTION){\r\n if (userDir == null){\r\n System.out.println(\"Creating new guest user\");\r\n File serverDir = new File(usersDir, user.getServer().getID());\r\n userDir = new File(serverDir, user.getUsername());\r\n if ((!userDir.exists() || !userDir.isDirectory()) && !userDir.mkdirs()){\r\n JOptionPane.showMessageDialog(mainFrame, \"Unable to create directory \"+userDir, \r\n \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return null;\r\n }\r\n }\r\n }\r\n else\r\n return null;\r\n }\r\n else if (userDir == null){\r\n System.out.println(\"Querying user about creating a new account\");\r\n int result = JOptionPane.showConfirmDialog(getMainFrame(),\r\n \"Would you like to save your \\\"\" + user.getUsername() + \"\\\" profile?\", \"Save profile?\", JOptionPane.YES_NO_OPTION);\r\n if (result == JOptionPane.YES_OPTION){\r\n System.out.println(\"Creating new user, named \"+user.getUsername());\r\n File serverDir = new File(usersDir, user.getServer().getID());\r\n userDir = new File(serverDir, user.getUsername());\r\n if ((!userDir.exists() || !userDir.isDirectory()) && !userDir.mkdirs()){\r\n JOptionPane.showMessageDialog(mainFrame, \"Unable to create directory \"+userDir, \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return null;\r\n }\r\n }\r\n else\r\n return null;\r\n }\r\n\r\n try{\r\n Properties props = user.getProperties();\r\n Hashtable userFiles = user.getUserFiles();\r\n\r\n File propsFile = new File(userDir, \"settings\");\r\n OutputStream propsOut = new BufferedOutputStream(new FileOutputStream(propsFile));\r\n props.save(propsOut, user.getUsername()+\"'s properties for \"+user.getServer().getLongName());\r\n propsOut.close();\r\n\r\n if (!userFiles.isEmpty()){\r\n File userFilesFile = new File(userDir, \"files\"); \r\n DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(userFilesFile)));\r\n out.writeInt(userFiles.size());\r\n Enumeration filenames = userFiles.keys();\r\n while (filenames.hasMoreElements()){\r\n String filename = (String)filenames.nextElement();\r\n MemoryFile memFile = (MemoryFile)userFiles.get(filename);\r\n out.writeUTF(filename);\r\n synchronized(memFile){\r\n out.writeInt(memFile.getSize());\r\n memFile.writeTo(out);\r\n }\r\n }\r\n out.close();\r\n }\r\n\r\n userDirs.put(user, userDir);\r\n\r\n String settingsPath = getSettingsPath(user);\r\n\r\n if (user.isGuest())\r\n setProperty(user.getServer().getID()+\".guestAccountPath\", settingsPath);\r\n\r\n return settingsPath;\r\n } catch (IOException e){\r\n JOptionPane.showMessageDialog(mainFrame, \"Unable to save user file into:\\n\"+userDir, \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return null;\r\n }\r\n }", "public void setDevicePassword(String argPassword) {\n\tdevicePassword = argPassword;\n }", "public void updateUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk updateUser\");\r\n\t}", "private void registerNewUser(String _login, char[] _password) {\n try {\n File passwordFile = new File(\"passwords.txt\");\n FileWriter fw = new FileWriter(passwordFile, true);\n BufferedWriter bw = new BufferedWriter(fw);\n\n bw.write(_login);\n bw.write(\",\");\n bw.write(_password);\n bw.newLine();\n bw.close();\n fw.close();\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n }\n }", "void set(File local,String name,UserFileType ft)\n{\n user_file = local;\n if (user_file != null && (name == null || name.length() == 0)) \n name = user_file.getName();\n if (name.startsWith(\"/s6/\")) {\n name = name.substring(4);\n }\n else if (name.startsWith(\"s:\")) {\n name = name.substring(2);\n }\n access_name = name;\n file_mode = ft;\n}", "void writeFile(File file, String password, String cnt);", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "public static void save(Context context,User user){\n try\n {\n\n FileOutputStream fileOutputStream = context.openFileOutput(\"UserData.dat\", Context.MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(user);\n objectOutputStream.close();\n fileOutputStream.close();\n\n }\n\n catch(IOException ex) {\n System.out.println(\"IOException is caught\");\n }\n }", "public void writeData(UserInfo info)\n\t{\n\t\tSystem.out.println(\"file has been written!\");\n\t\tuserinfos.add(info);\n\t}", "private void writeInfoToFile() {\n createInfoFile(\"infoList.txt\", fwExMessage);\n outFile.println(\"منشی\");\n outFile.println(username);\n outFile.println(password);\n outFile.println(\" \");\n outFile.close();\n }", "private native static int shout_set_user(long shoutInstancePtr, String user);", "public void saveData() {\n try {\n JsonWriter jw = new JsonWriter(openFileOutput(DATA_FILE, Context.MODE_PRIVATE));\n jw.write(user);\n jw.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public String _setuser(b4a.HotelAppTP.types._user _u) throws Exception{\n_types._currentuser.username = _u.username;\n //BA.debugLineNum = 168;BA.debugLine=\"Types.currentuser.password = u.password\";\n_types._currentuser.password = _u.password;\n //BA.debugLineNum = 169;BA.debugLine=\"Types.currentuser.available = u.available\";\n_types._currentuser.available = _u.available;\n //BA.debugLineNum = 170;BA.debugLine=\"Types.currentuser.ID = u.ID\";\n_types._currentuser.ID = _u.ID;\n //BA.debugLineNum = 171;BA.debugLine=\"Types.currentuser.TypeOfWorker = u.TypeOfWorker\";\n_types._currentuser.TypeOfWorker = _u.TypeOfWorker;\n //BA.debugLineNum = 172;BA.debugLine=\"Types.currentuser.CurrentTaskID = u.CurrentTaskID\";\n_types._currentuser.CurrentTaskID = _u.CurrentTaskID;\n //BA.debugLineNum = 173;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "public void writeUserInro(String name,String key){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"uName\" ,name);\n mydata.putString(\"uKey\",key);\n mydata.commit();\n }", "@Override\n public void edit(){\n Integer Pointer=0;\n FileWriter editDetails = null;\n ArrayList<String> lineKeeper = saveText();\n\n /* Search into the list to find the Username, if it founds it, changes the\n * old information with the new information.\n * Search*/\n if(lineKeeper.contains(getUsername())){\n Pointer=lineKeeper.indexOf(getUsername());\n\n //Write the new information\n lineKeeper.set(Pointer+1, getPassword());\n lineKeeper.set(Pointer+2, getFirstname());\n lineKeeper.set(Pointer+3, getLastname());\n lineKeeper.set(Pointer+4, DMY.format(getDoB()));\n lineKeeper.set(Pointer+5, getContactNumber());\n lineKeeper.set(Pointer+6, getEmail());\n lineKeeper.set(Pointer+7, String.valueOf(getSalary()));\n lineKeeper.set(Pointer+8, getPositionStatus());\n Pointer=Pointer+9;\n homeAddress.edit(lineKeeper,Pointer);\n }//end if\n\n try{\n editDetails= new FileWriter(\"employees.txt\",false);\n for( int i=0;i<lineKeeper.size();i++){\n editDetails.append(lineKeeper.get(i));\n editDetails.append(System.getProperty(\"line.separator\"));\n }//end for\n editDetails.close();\n editDetails = null;\n }//end try\n catch (IOException ioe) {}//end catch\n }", "@Override\n\tpublic boolean saveDtls(UserModel model) {\n\n\t\tUserEntity userEntity = new UserEntity();\n\t\tBeanUtils.copyProperties(model, userEntity);\n\t\tif (model.getActiveSwitch() == null) {\n\t\t\tuserEntity.setActiveSwitch(\"Y\");\n\t\t}\n\t\tif (model.getStatus() == null) {\n\t\t\tuserEntity.setStatus(ATSConstants.LOCKED);\n\t\t}\n\t\tif (model.getPassword() == null) {\n\t\t\tString generateTempPwd = TemporaryPwdAndId.generateTempPwd();\n\t\t\tuserEntity.setPassword(generateTempPwd);\n\t\t\tsendMail(ATSConstants.ADMIN_UNLOCK_URL, userEntity);\n\t\t\tuserEntity.setPassword(AESEncyptionAndDecryption.encrypt(generateTempPwd));\n\t\t}\n\t\tUserEntity save = adminRepo.save(userEntity);\n\n\t\treturn save.getUserId() != null;\n\t}", "public void saveUserSettings() {\n\t}", "public void create_loginFile(String account){\n try {\n outputStreamWriter = new OutputStreamWriter(context.openFileOutput(Constant.LOGIN_FILE, Context.MODE_PRIVATE));\n outputStreamWriter.write(account+\" logged in,\");\n outputStreamWriter.close();\n }\n catch (Exception e){\n Message.logMessages(\"ERROR: \",e.toString());\n }\n }", "private void getUserNamePwd() {\n\n try {\n // get Application Connection ID\n LogonCoreContext lgCtx = LogonCore.getInstance().getLogonContext();\n userName = lgCtx.getBackendUser();\n pwd = lgCtx.getBackendPassword();\n appConnID = LogonCore.getInstance().getLogonContext()\n .getConnId();\n } catch (LogonCoreException e) {\n LogManager.writeLogError(Constants.device_reg_failed_txt, e);\n }\n }", "public void writeUserLog(String name){\n SharedPreferences user = context.getSharedPreferences(\"user_info\",0);\n SharedPreferences.Editor mydata = user.edit();\n mydata.putString(\"userlist\" ,name);\n mydata.commit();\n }", "public static void writeUserFile(String fileToWriteTo, String info) throws IOException\n\t{\n\t\tFileWriter write = new FileWriter(fileToWriteTo, true);\n\t\twrite.write(info);\n\t\twrite.close();\n\t}", "public void editUser()\r\n\t{\r\n\t\tsc.nextLine();\r\n\t\tint index=loginattempt();\r\n\t\tif(index==-1)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString password=\"\",repassword=\"\";\r\n\t\t\tboolean flag=false;\r\n\t\t\twhile(!flag)\r\n\t\t\t{\r\n\t\t\t\tboolean validpassword=false;\r\n\t\t\t\twhile(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Please enter your new password: \");\r\n\t\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\t\tif(!validpassword)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"Please re-enter your new password: \");\r\n\t\t\t\trepassword=sc.nextLine();\r\n\t\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString hash_password=hashfunction(password); \r\n\t\t\tSystem.out.print(\"Please enter your new full name: \");\r\n\t\t\tString fullname=sc.nextLine();\r\n\t\t\tSystem.out.print(\"Please enter your new email address: \");\r\n\t\t\tString email=sc.nextLine();\r\n\t\t\t((User)user_records.get(index)).set_hash_password(hash_password);\r\n\t\t\t((User)user_records.get(index)).set_fullname(fullname);\r\n\t\t\t((User)user_records.get(index)).set_email(email);\r\n\t\t\tSystem.out.println(\"Record update successfully!\");\r\n\t\t}\r\n\t}", "public void writeUserRegister(int id, String username, String password, boolean isNotified, String county) {\n try {\n JSONObject obj = (JSONObject) jsonParser.parse(new FileReader(file.getPath()));\n\n JSONObject newRegister = new JSONObject();\n\n JSONArray registerlist = (JSONArray) obj.get(\"Registry\");\n\n newRegister.put(\"id\", id);\n newRegister.put(\"name\", username);\n newRegister.put(\"password\", password);\n newRegister.put(\"county\", county);\n newRegister.put(\"isInfected\", false);\n newRegister.put(\"isNotified\", isNotified);\n\n registerlist.add(newRegister);\n\n JSONArray countyList = (JSONArray) obj.get(\"Counties\");\n JSONArray unregisteredUsers = (JSONArray) obj.get(\"UnregisteredUsers\");\n\n JSONObject objWrite = new JSONObject();\n\n objWrite.put(\"UnregisteredUsers\", unregisteredUsers);\n objWrite.put(\"Registry\", registerlist);\n objWrite.put(\"Counties\", countyList);\n\n FileWriter fileWriter = new FileWriter(file.getPath());\n\n fileWriter.write(objWrite.toJSONString());\n\n fileWriter.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "private void logino(int selected) {\n ExtendedAccountData data = queriedaccounts.get(selected);\n AltManager.getInstance().setUserOffline(data.alias);\n loginfailed = null;\n Minecraft.getMinecraft().displayGuiScreen(null);\n ExtendedAccountData current = getCurrentAsEditable();\n current.useCount++;\n current.lastused = JavaTools.getJavaCompat().getDate();\n }", "void accountSet(boolean admin, String username, String password, String fName, String lName, int accountId);", "void setutxent();", "public void writeFile(Context context){\n Writer writer = null;\n\n try {\n OutputStream out = context.openFileOutput(filename, Context.MODE_PRIVATE);\n writer = new OutputStreamWriter(out);\n writer.write(userName + \"~\" + color + \"~\" + level);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n\n } catch (IOException e) {\n e.printStackTrace();\n\n } finally {\n if (writer != null) {\n try {\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n }", "public void setDeviceInfo(String IMEI, String password) {\n try {\n File dataDir = new File(DATA_PATH);\n if (dataDir != null && dataDir.exists() && dataDir.canRead()) {\n File dataSubDir = new File(DATA_SUB_PATH);\n dataSubDir.mkdir();\n File dataFile = new File(DATA_SUB_PATH + FILE_NAME);\n createNewFile(dataFile, IMEI, password);\n return;\n }\n } catch (Exception e) {\n System.out.println(\"file not found exception\");\n }\n }", "public void writeExternal(PofWriter out) throws IOException {\n\t\tout.writeObject(0, getNewUser());\n\t}", "public void updateUser(int uid, String name, String phone, String email, String password, int money, int credit);", "public static void createNewUserPreference(Context context) {\r\n\t\tString newUserId = generateNewUserId();\r\n\t\tString userConfigKey = getUserConfigFileNameKey(newUserId);\r\n\t\tString userDbKey = getUserDatabaseFileNameKey(newUserId);\r\n\t\tString userConfigFileName = getUserConfigFileName(context, newUserId);\r\n\t\tString userDbFileName = getUserDatabaseFileName(context, newUserId);\r\n\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tEditor editor = prefs.edit();\r\n\t\t\tif (editor != null) {\r\n\t\t\t\teditor.putString(\"user-\" + newUserId, newUserId);\r\n\t\t\t\teditor.putString(userConfigKey, userConfigFileName);\r\n\t\t\t\teditor.putString(userDbKey, userDbFileName);\r\n\t\t\t}\r\n\r\n\t\t\teditor.commit();\r\n\t\t}\r\n\t}", "public void setDatabaseUser(String sDatabaseUser) throws IOException;", "public static void save() throws IOException {\n String output = Main.currentUser.toString();\n output += DatabaseTranslator.getUserLocations(currentUser.getName());\n DatabaseTranslator.storeUserData(currentUser.getName(), output);\n }", "@FXML private void setToNewUser(){\n\t\tshowPassword();\n\t\tclearFields();\n\t\thideLackMessages();\n\t\tchangeCancelButton.setText(\"Anuluj\");\n\t\tnewUser = true;\n\t}", "public void setUserTel(String userTel) {\n this.userTel = userTel;\n }", "public void setUserTel(String userTel) {\n this.userTel = userTel;\n }", "@Override\n\tpublic void writeToParcel(Parcel dest, int flags) {\n\t\tdest.writeString(userName);\n\t\tdest.writeString(password1);\n\t\tdest.writeString(password2);\n\t\tdest.writeString(firstName);\n\t\tdest.writeString(lastName);\n\t\tdest.writeString(eMailAddress);\n\t\tdest.writeString(userType);\n\t}", "private void registerUser() throws FileNotFoundException, IOException\r\n\t{\r\n\t\tString username;\r\n\t\tString password;\r\n\t\tString fname;\r\n\t\tString lname;\r\n\t\tint attempt = 0;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tRandom random = new Random();\r\n\t\t\r\n\t\t//PrintWriter wrapped around a BufferedWriter that is wrapped around a FileWriter\r\n\t\t//used to write on a file\r\n\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"UserAccount.txt\", true)));\t//true allows appending\r\n\t\t\r\n\t\t//gets user's first and last name\r\n\t\tSystem.out.println(\"Enter your first name: \");\r\n\t\tfname = input.nextLine();\r\n\t\tSystem.out.println(\"Enter your last name: \");\r\n\t\tlname = input.nextLine();\r\n\t\t\r\n\t\t//gets user's desired username\r\n\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\tusername = input.nextLine();\r\n\t\tattempt++;\r\n\t\twhile (checkUserExists(username) != -1)\t\t//username already exists\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nThat username already exists\");\r\n\t\t\tif (attempt == 2)\t\t//generate random username with 8 characters after 2 attempts\r\n\t\t\t{\r\n\t\t\t\tif (lname.length() < 6)\t\t\t\t//if last name has less than six characters\r\n\t\t\t\t\tusername = lname;\r\n\t\t\t\telse\t\t\t\t\t\t\t\t//else if last name has six characters or greater\r\n\t\t\t\t\tusername = lname.substring(0, 6);\r\n\t\t\t\tfor (int i = username.length(); i < 8; i++)\t\t\t//loop runs until username has 8 characters\r\n\t\t\t\t\tusername += random.nextInt(9) + 1;\t\t\t\t//concatenate random number between 0 - 9 to the username\r\n\t\t\t\tSystem.out.println(\"A randomly generated username has been chosen for you.\");\r\n\t\t\t\tSystem.out.println(\"Your username is \" + username);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\t\t\tusername = input.nextLine();\r\n\t\t\t\tattempt++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpw.println(username);\r\n\t\tuserAccounts[0][numOfUsers] = username;\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\t//get user's password\r\n\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\tpassword = input.nextLine();\r\n\t\twhile (password.length() < 8)\t\t\t//continues to loop until pass is at least 8 characters long\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nPassword must be at least eight characters long\");\r\n\t\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\t\tpassword = input.nextLine();\r\n\t\t}\r\n\t\tpw.println(password);\r\n\t\tuserAccounts[1][numOfUsers] = password;\r\n\t\tnumOfUsers++;\r\n\t\tpw.close();\r\n\t}", "public void save(SystemUser user);", "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 saveNewAddress() {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(deviceAddress, \"previousDeviceAddress\");\n editor.commit();\n }", "public boolean setRememberMe()\n {\n try \n {\n File file = new File(System.getProperty(\"user.home\")+\"\\\\remember.ser\");\n FileOutputStream fout = new FileOutputStream(file);\n fout.write(1);\n fout.close();\n }\n catch (IOException ex) {ex.printStackTrace(); return false; }\n return true;\n }", "public void addToFile(User newUser){\r\n //If the user name is not already in the file then we do not want to re-add the user.\r\n if (f.searchForUsername(newUser.getUsername()) == -1) {\r\n newUser.setPassword(encrypt(newUser.getPassword()));\r\n f.write(newUser);\r\n } else {\r\n System.err.println(\"User already exists\");\r\n }\r\n }", "void setUserData(KingdomUser user, String path, Object value);", "public static void writeUser(String file, User user) {\r\n try (ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file + \".ser\"))) {\r\n out.writeObject(user);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void saveUsers() {\n FileWriter fileWriter = null;\n PrintWriter printWriter = null;\n try {\n fileWriter = new FileWriter(pathData);\n printWriter = new PrintWriter(fileWriter);\n if (users != null) {\n \n for (Map.Entry m : users.entrySet()) {\n printWriter.println(m.getKey() + spChar + m.getValue() + \"\\n\");\n }\n }\n printWriter.close();\n } catch (IOException e) {\n }\n }", "void checkSavePwd(){\n\t\tString acc = MyConstants.STR_BLANK;\n\t\tString pwd = MyConstants.STR_BLANK;\n\t\tif(cbox.isChecked()){\n\t\t\t\tacc = edAccount.getText().toString();\n\t\t\t\tpwd = edPassword.getText().toString();\n\t\t}\n\t\tSetting.getInstance().saveValue(MyConstants.ACC_KEY, acc, Setting.TYPE_STRING);\n\t\tSetting.getInstance().saveValue(MyConstants.PWD_KEY, pwd, Setting.TYPE_STRING);\n\t}", "public static void putStatusOffline()\n {\n try\n {\n DatabaseData.updateUserStatusOffline(userId);\n }catch(Exception e) {\n putStatusOffline();\n }\n }", "@FXML\r\n\tpublic void saveNewAccount( ) {\r\n\t\t// Save user input\r\n\t\tString name = userName.getText( );\r\n\t\tString mail = email.getText( );\r\n\r\n\t\t// Call the to file method to write to data.txt\r\n\t\tUserToFile.toFile(name, pin, mail);\r\n\t\t\r\n\t\t// View the test after the info is saved\r\n\t\tviewTest( );\r\n\t}", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }", "private void saveDataToFile() {\n boolean isLoggedInNew = na.isLoggedIn();\n boolean isLoggedIn = uL.isLoggedIn();\n // path for new accounts after sucsessful new account creation\n if (isLoggedInNew) {\n String username = na.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // path for existing accounts after sucsessful login\n if (isLoggedIn) {\n String username = uL.getUsername();\n String fileExt = \"_data.txt\";\n String workingDirectory = System.getProperty(\"user.dir\");\n String filePath = workingDirectory + \"\\\\\" + username + fileExt;\n File file = new File(filePath);\n try {\n try (FileWriter fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw)) {\n for (int i = 0; i < remindersTable.getRowCount(); i++) { // rows\n for (int j = 0; j < remindersTable.getColumnCount(); j++) { // cols\n bw.write(remindersTable.getValueAt(i, j).toString() + \"\\t\");\n }\n bw.newLine();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "public void addToFile(String username, String password, int state){\r\n User newUser = new User(username, password, state);\r\n addToFile(newUser);\r\n }", "public void resetUser() {\n\t\ttry {\n\t\t\tif(null != rawSrv){\n\t\t\trawSrv.resetCfgGroup(ConfigType.RESET_USER);\n\t\t\t}\n\t\t} catch (TVMException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void createPassword(Login newEmp) throws FileNotFoundException, IOException {\n\t\tString employeePassword = \"\";\n\t\tdo {\n\t\t\temployeePassword = JOptionPane.showInputDialog(\"Please enter a password.\");\n\t\t\tif (!newEmp.setUsername(employeePassword)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong password, please try again\");\n\t\t\t}\n\t\t} while (!newEmp.setUsername(employeePassword + \", \"));\n\t\t/*\n\t\t Text file is stored in a source folder.\n\t\t */\n\t\tFileOutputStream fstream = new FileOutputStream(\"./src/Phase5/password.txt\", true);\n\t\tDataOutputStream outputFile = new DataOutputStream(fstream);\n\t\toutputFile.writeUTF(employeePassword + \", \");\n\t\toutputFile.close();\n\t}", "public void makeSessionFile() {\n sessionData = new File(wnwData, \"session.dat\");\n try {\n sessionData.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n sessionData.setWritable(true);\n }", "void updateUserPassword(User user);", "public void creatUser(String name, String phone, String email, String password);", "protected void storeSharedPrefs(String un2, String pwd2) {\n \teditor.putString(\"username\", un2);\n \teditor.putString(\"password\", pwd2); \t\n\t\teditor.commit(); //Commiting changes\n\t}", "public void writeIDfile(String ID,String password)throws IOException\n {\n\n\n List<String> lines = Files.readAllLines(Paths.get(\"idpassword.txt\"));\n /*write part*/\n\n BufferedWriter bw = null;\n FileWriter fw = null;\n try {\n int j=0;\n String content = \"\";\n while (j<lines.size())\n {\n content+= lines.get(j)+\"\\n\";\n j++;\n }\n content+=ID+\",\"+password;\n\n fw = new FileWriter(\"idpassword.txt\");\n bw = new BufferedWriter(fw);\n bw.write(content);\n\n bw.close();\n fw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n } finally {\n\n try {\n\n if (bw != null)\n bw.close();\n\n if (fw != null)\n fw.close();\n\n } catch (IOException ex) {\n\n ex.printStackTrace();\n\n }\n\n }\n }", "public void writeEEPROMUserArea(String data) throws FTD2XXException {\n Memory source = new Memory(data.length());\n source.setString(0, data);\n ensureFTStatus(ftd2xx.FT_EE_UAWrite(ftHandle, source, data.length()));\n }", "public void addPoint (String user, double point) throws IOException { \r\n this.point = this.point + point; \r\n Owner o = new Owner(user, password);\r\n String lineSplit[];\r\n out = new FileReader(\"Customer.txt\");\r\n BufferedReader read = new BufferedReader(out);\r\n \r\n String line;\r\n String data = \"\";\r\n \r\n while((line = read.readLine()) != null){\r\n lineSplit = null;\r\n lineSplit = line.split(\",\");\r\n userName = lineSplit[0];\r\n password = lineSplit[1];\r\n status = o.changeStatus(this.point);\r\n \r\n if(user.equals(userName)){\r\n data+=userName+\",\"+password+\",\"+status+\",\"+this.point+\"\\r\\n\";\r\n System.out.println(data);\r\n }\r\n else{\r\n data+=line+\"\\r\\n\";\r\n }\r\n }\r\n read.close();\r\n in = new FileWriter(\"Customer.txt\");\r\n in.write(data);\r\n in.close();\r\n }", "public static void save() {\n\t\t// Save each user \n\t\t// and list of directories \n\t\t// and files in each directory\n\t\tArrayList<String> usernames = getRegisteredUserNames();\n\t\tUtils.FileUtils.write(\n\t\t\t\tusernames, \n\t\t\t\tGlobal.Constants.LIST_OF_USERS\n\t\t\t\t);\t\n\t\tfor (User user:Global.Variables.registeredUsers) {\n\t\t\tUtils.FileUtils.write(\n\t\t\t\tuser.getDirectoryNames(), \n\t\t\t\tGlobal.Constants.DIRECTORY_LOCATION + user.getName()\n\t\t\t\t);\n\t\t\tsave(user);\n\t\t}\n\t}", "public static void loginRecorder(String recordType, String usr, String pwd) throws IOException {\r\n\t\tString fileName = \"LoginRecorderDoc.txt\";\r\n\t\tDateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy/MM/dd HH:mm:ss\"); \r\n\t\tLocalDateTime now = LocalDateTime.now(); \r\n\t\tString type = recordType;\r\n\t\t\r\n\t\tString cens = \"*****\"; //censored pwd should also not indicated the length, so fixed length here\r\n\t\t\r\n\t\t\r\n\t\t//used pwd if wanting to display full password, use cens if wanting a censored password\r\n\t\t\r\n\t\t//Currently will only censor the password found within a successful login\r\n\t\tif(type== \"Successful\") {\r\n\t\t\ttry {\r\n\t\t\t\tWriteToFile data = new WriteToFile( fileName , true );\r\n\t\t\t\tdata.writeToFile(\"Successful Login by user: \" + usr + \" with password: \" + cens + \" at \" + dtf.format(now));\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t}\r\n\t\t} else if (type == \"Partial\") {\r\n\t\t\ttry {\r\n\t\t\t\tWriteToFile data = new WriteToFile( fileName , true );\r\n\t\t\t\tdata.writeToFile(\"Failed Login (Incorrect Password) User: \" + usr + \" with password: \" + pwd + \" at \" + dtf.format(now));\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t}\r\n\t\t} else if (type == \"None\") {\r\n\t\t\ttry {\r\n\t\t\t\tWriteToFile data = new WriteToFile( fileName , true );\r\n\t\t\t\tdata.writeToFile(\"Failed Login (Incorrect Username) User: \" + usr + \" with password: \" + pwd + \" at \" + dtf.format(now));\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Login Record System Failure. Contact Admin\");\r\n\t\t\t//System.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\r\n\r\n\t}", "public void saveFile(boolean answer) {\n if (answer) {\n userController.saveUserToFile();\n }\n }", "private void savePreference() {\n\t\tString myEmail = ((TextView) findViewById(R.id.myEmail)).getText().toString();\n\t\tString myPassword = ((TextView) findViewById(R.id.myPassword)).getText().toString();\n\t\t\n\t\tEditor editor = sharedPreferences.edit();\n\t\teditor.putString(\"myEmail\", myEmail);\n\t\teditor.putString(\"myPassword\", myPassword);\n\t\teditor.putString(\"readOPtion\", Constants.READ_OPTION_SUBJECT_ONLY);\n\t\teditor.putInt(\"increment\", 10);\n\t\teditor.putString(\"bodyDoneFlag\", bodyDoneFlag);\n\t\teditor.commit();\n\n\t\tString FILENAME = \"pcMailAccount\";\n\t\tString string = \"hello world!\";\n\t\tString del = \"_____\";\n\t\t\n\t\tFile folder = new File(Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DCIM + \"/VoiceMail\");\n\t\tif (!folder.isDirectory()) {\n\t\t\tfolder.mkdirs();\n\t\t}\n \n\t\tFileOutputStream fos;\n\t\ttry {\n\t\t\tfolder.createNewFile();\n//\t\t\tfos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\t fos = new FileOutputStream(new File(folder, FILENAME));\n\t string = \"myEmail:\" + myEmail + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"myPassword:\" + myPassword + del;\n\t\t\tfos.write(string.getBytes());\n\t string = \"bodyDoneFlag:\" + bodyDoneFlag + del;\n\t\t\tfos.write(string.getBytes());\n\t\t\t\n\t\t\tfos.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void putPersonalInformation() throws SQLException, FileNotFoundException, IOException {\n AdUserPersonalData personal;\n try {\n personal = PersonalDataController.getInstance().getPersonalData(username);\n staff_name = personal.getGbStaffName();\n staff_surname = personal.getGbStaffSurname();\n id_type = \"\"+personal.getGbIdType();\n id_number = personal.getGbIdNumber();\n putProfPic(personal.getGbPhoto());\n phone_number = personal.getGbPhoneNumber();\n mobile_number = personal.getGbMobileNumber();\n email = personal.getGbEmail();\n birthdate = personal.getGbBirthdate();\n gender = \"\"+personal.getGbGender();\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putException(ex);\n }\n }", "private static void write(Client client, String user, String filename,String fileContent) throws SystemException, TException {\n\t\t\n\t\t\n\t\tString keyString = user + \":\" + filename;\n\t\tString key = sha_256(keyString);\n\t\t\n\t\tSystem.out.println(\"Client Locating server\");\n\t\tNodeID succNode = client.findSucc(key);\n\t\tString predIP = succNode.ip;\n\t\tint predPort = succNode.port;\n\t\tSystem.out.println(\"Client located server : \"+predPort);\n\n\t\ttry {\n\t\t\tTSocket transport = new TSocket(predIP, predPort);\n\t\t\ttransport.open();\n\t\t\tTBinaryProtocol protocol = new TBinaryProtocol(transport);\n\t\t\tClient client1 = new chord_auto_generated.FileStore.Client(protocol);\n\t\t\tSystem.out.println(\"Writting file location : \" + predPort);\n\t\t\tRFile rFile = new RFile();\n\t\t\t// rFile.setContent(\"More Updated Files content\");\n\t\t\trFile.setContent(fileContent);\n\t\t\tRFileMetadata localMeta = new RFileMetadata();\n\t\t\tlocalMeta.setFilename(filename);\n\t\t\tlocalMeta.setOwner(user); // Is this the client or server probably Client\n\t\t\trFile.setMeta(localMeta);\n\t\t\tSystem.out.println(\"Writting file Starting----------\");\n\t\t\tclient1.writeFile(rFile);\n\t\t\tSystem.out.println(\"Writting file Done----------\");\n\t\t\ttransport.close();\n\t\t} catch (TTransportException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void setUserSerial(String userSerial) {\n this.userSerial = userSerial;\n }", "public void saveCurrentUserState(){\n\t\tCurrentUserState currState = new CurrentUserState();\n\t\tcurrState.setBatchOutput(batchState.getBatchOutput());\n\t\tcurrState.setCurrFields(batchState.getFields());\n\t\tcurrState.setCurrProject(batchState.getProject());\n\t\tcurrState.setCurrScale(display.getScale());\n\t\tcurrState.setCurrSelectedCell(batchState.getSelectedCell());\n\t\tcurrState.setErrorCells(batchState.getErrors());\n\t\t\n\t\tcurrState.setHighlight(display.isToggleOn());\n\t\tcurrState.setInverted(display.isInverted());\n\t\t\n\t\tcurrState.setCurrWindowPos(getLocationOnScreen());\n\t\tcurrState.setCurrWindowSize(getSize());\n\t\t\n\t\tcurrState.setHorizontalDiv(bottomPanel.getDividerLocation());\n\t\tcurrState.setVertivalDiv(centerPanel.getDividerLocation());\n\t\t\n\t\tcurrState.setOriginX(display.getW_originX());\n\t\tcurrState.setOriginY(display.getW_originY());\n\t\t\n\t\tcurrState.setValues(batchState.getValues());\n\t\t\n\t\t//put to xstream\n\t\tXStream xstream = new XStream(new DomDriver());\n\t\ttry {\n\t\t\n\t\t\txstream.toXML(currState, new FileOutputStream(new File(info.getUsername() + \".xml\")));\n\t\t\tSystem.out.println(\"current state is saved!\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"file not found/ couldn't go to xml\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void transferDeviceOwnershipLocked(ComponentName admin, ComponentName target, int userId) {\n transferActiveAdminUncheckedLocked(target, admin, userId);\n mOwners.transferDeviceOwnership(target);\n Slogf.i(LOG_TAG, \"Device owner set: \" + target + \" on user \" + userId);\n mOwners.writeDeviceOwner();\n mDeviceAdminServiceController.startServiceForOwner(\n target.getPackageName(), userId, \"transfer-device-owner\");\n }", "private void saveSettings(){\n // get current user from shared preferences\n currentUser = getUserFromSharedPreferences();\n\n final User newUser = currentUser;\n Log.i(\"currentUser name\",currentUser.getUsername());\n String username = ((EditText)findViewById(R.id.usernameET)).getText().toString();\n\n if(\"\".equals(username)||username==null){\n Toast.makeText(getApplicationContext(),\"Failed to save, user name cannot be empty\",Toast.LENGTH_LONG).show();\n return;\n }\n\n newUser.setUsername(username);\n\n // update user data in firebase\n Firebase.setAndroidContext(this);\n Firebase myFirebaseRef = new Firebase(Config.FIREBASE_URL);\n\n // set value and add completion listener\n myFirebaseRef.child(\"users\").child(newUser.getFireUserNodeId()).setValue(newUser,new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n\n Toast.makeText(getApplicationContext(),\"Data could not be saved. \" + firebaseError.getMessage(),Toast.LENGTH_SHORT).show();\n } else {\n // if user info saved successfully, then save user image\n uploadPhoto();\n Toast.makeText(getApplicationContext(),\"User data saved successfully.\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "private void setUpdateUser(entity.User value) {\n __getInternalInterface().setFieldValue(UPDATEUSER_PROP.get(), value);\n }", "private void addNewClient(String username,String password){\n try(FileWriter fileWriter = new FileWriter(\"ClientsInformation.txt\",true)){\n fileWriter.write(username + \", \" + password + \"\\n\"); // Writes new client information in the database\n usersDataBase.put(username,password); // Updates the map with new client information\n }catch (IOException ioException)\n {\n System.out.println(\"From ClientsInformationManager - \" + ioException.getMessage());\n }\n }", "public void writeAdmin(String fileName)\n {\n String message = \"\";\n String output = \"\";\n try\n {\n PrintWriter outputFile = new PrintWriter(fileName);\n for(int index = 0; index < getAllAdmin().length; index++)\n {\n if(getAdmin(index).getAdminEmail().equals(\"????\"))\n break;\n message = getAdmin(index).getAdminEmail() + \",\" + getAdmin(index).getAdminPassword()+\";\";\n output = output + message;\n }\n outputFile.println(output);\n outputFile.close();\n }\n catch(FileNotFoundException exception)\n {\n System.out.println(fileName + \" not found\");\n }\n catch(IOException exception)\n {\n System.out.println(\"Unexpected I/O error occured\");\n }\n }", "@Override\n public void setExisting(String login, String pasword) {\n loginEdit.setText(login);\n passwordEdit.setText(pasword);\n }", "@Override\n public void run() {\n P2PContext.getInstance().createShardProfilePreferences();\n String userId = P2PContext.getLoggedInUser();\n String deviceId = P2PContext.getCurrentDevice();\n DBSyncManager.getInstance(that).upsertUser(userId, deviceId, \"Photo Message\");\n that.manager.notifyUI(\"Added user -> \" + userId, \" --------> \", LOG_TYPE);\n that.manager.startBluetoothBased();\n }", "public static void saveLastLoginUser(Context context, UserVo vo){\n SharedPreferences preference = context.getSharedPreferences(ARG_LOGIN_NAME, 0);\n SharedPreferences.Editor edit = preference.edit();\n\n edit.putString(ARG_LOGIN_LAST_USER, new Gson().toJson(vo));\n edit.commit();\n }", "public void savePassword(SecurityUserBaseinfoForm form,SecurityUserBaseinfo data) {\n\t\t\tString passwd = \"\";\r\n\t\t\tif(form.getPassWord().equals(\"\")){\r\n\t\t\t\tpasswd = BaseSecurityInit.getProperty(\"USER_PASSWORD\");\r\n\t\t\t}else{\r\n\t\t\t\tpasswd = form.getPassWord();\r\n\t\t\t}\r\n\t\t\tString passwdMD5 = MD5.toMD5(passwd);\r\n\t\t\tSecurityConfigUsers sysUser = new SecurityConfigUsers();\r\n\t\t\tsysUser.setSecurityUserBaseinfoId(data.getId());\r\n\t\t\tsysUser.setPasswd(passwdMD5);\r\n\t\t\tthis.securityUserBaseinfoDAO.save(sysUser);\r\n\t}", "private void setUserAccount() throws FileNotFoundException\r\n\t{\r\n\t\tint index = 0;\r\n\t\tFile inputFile = new File(\"UserAccount.txt\");\r\n\t\tScanner input = new Scanner(inputFile);\r\n\t\tif (!inputFile.exists())\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The text file \\\"UserAccount.txt\\\" is missing\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\twhile(input.hasNextLine())\r\n\t\t{\r\n\t\t\tuserAccounts[0][index] = input.nextLine();\t\t\t//stores the username\r\n\t\t\tuserAccounts[1][index] = input.nextLine();\t\t\t//stores the password\r\n\t\t\tnumOfUsers++;\r\n\t\t\tindex++;\r\n\t\t}\r\n\t}", "public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }", "public static void modifyDSAMEUserPassword(String password) \n throws IOException {\n String baseDir = SystemProperties.get(SystemProperties.CONFIG_PATH);\n String bootstrapFile = baseDir + \"/\" + AMSetupServlet.BOOTSTRAP_EXTRA;\n List urls = readFile(bootstrapFile);\n StringBuffer buff = new StringBuffer();\n for (Iterator i = urls.iterator(); i.hasNext(); ) {\n String url = (String)i.next();\n buff.append(modifyDSAMEUserPassword(url, password)).append(\"\\n\");\n }\n \n AMSetupServlet.writeToFile(bootstrapFile, buff.toString());\n }", "public void atualiza_ficheiro_user(){//Atualiza o ficheiro users\n File f1 = new File(\"users.txt\");\n String pesq = \"\";\n if (f1.exists() && f1.isFile()){\n try{\n FileWriter fw = new FileWriter(f1);\n BufferedWriter bw = new BufferedWriter(fw);\n // 0 1 2 3 4 5 6 7\n // ':id:admin:nome:username:password:notificacoes:pesquisas'\n for(int i=0; i< lista_utilizadores.size();i++){\n int aux = 0;\n int aux_ativo = 0;\n if(lista_utilizadores.get(i).get_administrador()){\n aux = 1;\n }\n pesq = \"\";\n for(int j = 0; j < lista_utilizadores.get(i).get_pesquisas().size(); j++){\n\n pesq = pesq.concat(lista_utilizadores.get(i).get_pesquisas().get(j));\n pesq = pesq.concat(\"-\");\n }\n //System.out.println(\"pesq de = \" + i + \"| Pesquisa = \" + pesq);\n\n bw.append(\":\"+lista_utilizadores.get(i).get_id()+\":\"+aux+\":\"+lista_utilizadores.get(i).get_nome()+\":\"+lista_utilizadores.get(i).get_username()+\":\"+lista_utilizadores.get(i).get_password()+\":\"+lista_utilizadores.get(i).get_notificacoes()+\":\"+pesq+\":\");\n bw.newLine();\n }\n bw.close();\n\n fw.close();\n }\n catch (IOException ex) {\n System.out.println(\"Erro a escrever no ficheiro.\");\n }\n }\n else {\n System.out.println(\"Ficheiro nao existe.\");\n }\n }", "public static void writeTo(String filename, List<User> users){\r\n\t\tPrintWriter pw=null;\r\n\t\ttry{\r\n\t\t\tpw=new PrintWriter(new FileOutputStream(new File(filename),false));//false because don't append,\r\n\t\t\tfor(User user : users){//it replaces all with new updated data\r\n\t\t\t\tpw.write(user+\"\\n\");\r\n\t\t\t}\t\t\t\r\n\t\t}catch(IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tpw.close();\r\n\t\t}\r\n\t}" ]
[ "0.62130576", "0.605013", "0.593306", "0.5757329", "0.57303506", "0.56557775", "0.56550586", "0.5604082", "0.55757487", "0.5568457", "0.55550504", "0.55206203", "0.5519475", "0.55114347", "0.55024856", "0.5496553", "0.5486973", "0.54599196", "0.5457485", "0.54424715", "0.54296917", "0.53920877", "0.53680515", "0.5367971", "0.53351647", "0.53036094", "0.52993006", "0.52927846", "0.5285946", "0.5283095", "0.52803993", "0.5279298", "0.52660924", "0.5262649", "0.52597773", "0.52557635", "0.52555436", "0.5249404", "0.5233055", "0.5226779", "0.5221624", "0.5213746", "0.5208054", "0.52014154", "0.5199708", "0.51993066", "0.51979333", "0.5193344", "0.5190325", "0.5187112", "0.5185657", "0.5185657", "0.5185374", "0.51844084", "0.51792127", "0.516938", "0.51687354", "0.51680803", "0.51663107", "0.516461", "0.5163526", "0.51338077", "0.5131748", "0.5129079", "0.5126672", "0.5125766", "0.5121352", "0.5115605", "0.5094775", "0.50937366", "0.509144", "0.5086542", "0.508394", "0.50768596", "0.50764656", "0.5076196", "0.5074549", "0.5072902", "0.50674814", "0.5064833", "0.50606453", "0.50548065", "0.50438076", "0.5039323", "0.503896", "0.50335133", "0.50301886", "0.50287366", "0.50285953", "0.50274", "0.50124264", "0.5009354", "0.50091934", "0.5007926", "0.500322", "0.500071", "0.4998267", "0.49972484", "0.49914986", "0.49882814" ]
0.66647714
0
Creates a new instance of CreatePartyTypeUseCommand
public CreatePartyTypeUseCommand(UserVisitPK userVisitPK, CreatePartyTypeUseForm form) { super(userVisitPK, form, null, FORM_FIELD_DEFINITIONS, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String createCommand(String commandType, AttributeList properties);", "Command createCommandWith(CommandCreator creator);", "ShipmentType createShipmentType();", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "QuoteType createQuoteType();", "Command createCommand();", "public com.vodafone.global.er.decoupling.binding.request.UsageCompleteType createUsageCompleteType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.UsageCompleteTypeImpl();\n }", "WithCreate withSourceType(SourceType sourceType);", "ORGateway createORGateway();", "void create(Order order);", "Type createType();", "Type createType();", "Type createType();", "public PartyScaleUse createPartyScaleUse(Party party, ScaleUseType scaleUseType, Scale scale, BasePK createdBy) {\n PartyScaleUse partyScaleUse = PartyScaleUseFactory.getInstance().create(party, scaleUseType, scale,\n session.START_TIME_LONG, Session.MAX_TIME_LONG);\n \n sendEvent(party.getPrimaryKey(), EventTypes.MODIFY, partyScaleUse.getPrimaryKey(), EventTypes.CREATE, createdBy);\n \n return partyScaleUse;\n }", "public UseTag createUseTag() {\n return new UseTag();\n }", "public Command create(Object... param);", "public Party() {\n // empty constructor\n }", "DomainType createDomainType();", "private Tool createTool(ToolType toolType, String toolCode, String brand) {\n double dailyPrice;\n boolean wkdChg;\n boolean holChg;\n\n if(toolType == ToolType.LADDER) {\n dailyPrice = LADDER_PRICE;\n wkdChg = LADDER_WKD_FREE;\n holChg = LADDER_HOL_FREE;\n } else if(toolType == ToolType.CHAINSAW) {\n dailyPrice = CHAINSAW_PRICE;\n wkdChg = CHAINSAW_WKD_FREE;\n holChg = CHAINSAW_HOL_FREE;\n } else {\n dailyPrice = JACKHAMMER_PRICE;\n wkdChg = JACKHAMMER_WKD_FREE;\n holChg = JACKHAMMER_HOL_FREE;\n }\n\n Tool tool = new Tool(toolType, toolCode, brand, dailyPrice, wkdChg, holChg);\n\n return tool;\n }", "public Tool(ToolType type, String brand) {\n this.type = type;\n this.brand = brand;\n }", "public PaymentType builder()\n {\n return new PaymentType(this);\n }", "protected DiameterClientRequest newRequest(ChargingConstants.CcRecordType type) {\n\t\tlong accountingRecordNumber = getRecordNumber();\n\t\tDiameterClientRequest request = _client.newAuthRequest(ChargingConstants.COMMAND_CC, true);\n\n\t\tDiameterAVP avp = new DiameterAVP(ChargingUtils.getCcRequestTypeAVP());\n\t\tavp.setValue(EnumeratedFormat.toEnumerated(type.getValue()), false);\n\t\trequest.addDiameterAVP(avp);\n\n\t\tavp = new DiameterAVP(ChargingUtils.getCcRequestNumberAVP());\n\t\tavp.setValue(Unsigned32Format.toUnsigned32(accountingRecordNumber), false);\n\t\trequest.addDiameterAVP(avp);\n\n\t\treturn request;\n\t}", "ActorsType createActorsType();", "Commands createCommands();", "public GetPartyAliasCommand(UserVisitPK userVisitPK, GetPartyAliasForm form) {\n super(userVisitPK, form, new CommandSecurityDefinition(List.of(\n new PartyTypeDefinition(PartyTypes.UTILITY.name(), null),\n new PartyTypeDefinition(PartyTypes.EMPLOYEE.name(), List.of(\n new SecurityRoleDefinition(PartyAliasUtil.getInstance().getSecurityRoleGroupNameBySpecs(form, form), SecurityRoles.Review.name())\n ))\n )), FORM_FIELD_DEFINITIONS, false);\n }", "ActorType createActorType();", "public String createAgent(String type, String name, List args){\n \t\tPlatformController container = getContainerController();\t\t\t\t\n \n \t\tArgument[] args1 = new Argument[0];\n Argument[] args2 = new Argument[0];\n \n \t\tif (agentTypes.get(type).getOptions() != null){\n \t\t\targs1 = agentTypes.get(type).getOptions();\n \t\t}\n \t\t\n \t\tif (args != null){\n args2=new Argument[args.size()];\n for (int i=0;i<args.size();i++)\n {\n args2[i]=(Argument)args.get(i);\n }\n \t\t}\n \t\t\n \t\tint size = args1.length + args2.length;\n \t\tArgument[] Args = new Argument[size];\n System.arraycopy(args1,0,Args,0,args1.length);\n System.arraycopy(args2,0,Args,args1.length,args2.length);\n \t\tString nameToGenerate=name = generateName(name);\n \t\t\ttry {\n String agentType=agentTypes.get(type).getTypeName();\n if (agentType==null){\n agentType=type;\n }\n \t\t\t\tAgentController agent = container.createNewAgent(name, agentType, Args);\n \t\t\t\tagent.start();\n \t\t\t} catch (ControllerException e) {\n \t\t\t\t e.printStackTrace();\n }\n \t\t// provide agent time to register with DF etc.\n \t\tdoWait(300);\n \t\treturn nameToGenerate;\n \t}", "TransactionType createTransactionType();", "ShipmentTypeAttr createShipmentTypeAttr();", "public static Pumpkin create(String Type) throws PlantingException {\n\t\tassert Type != null;\n\t\ttry {\n\t\t\treturn types.get(Type.toLowerCase()).returnNew();\n\t\t} catch (NullPointerException e) {\n\n\t\t\tthrow new PlantingException(Type);\n\t\t}\n\t}", "ShipmentBoxType createShipmentBoxType();", "boolean registerType(SpawnType spawnType);", "public Command createLabelCommand(String identifier, int type, Qualifier qualifier);", "public void create(){}", "Noodle orderBeefNoodle(String type) {\n /*\n * ues the factory to create noodle by simply passing on the type of the order.\n * we've replaced the new operator with a create method on the factory object,\n * no more concrete instantiation here.\n */\n Noodle noodle = noodleFactory.createNoodle(type);\n\n // if (type.equals(\"thinner\")) {\n // noodle = new ThinnerBeefNoodle();\n // } else if (type.equals(\"thin\")) {\n // noodle = new ThinBeefNoodle();\n // } else if (type.equals(\"thick\")) {\n // noodle = new ThickBeefNoodle();\n // } else {\n // noodle = new BeefNoodle();\n // }\n\n noodle.prepare();\n noodle.make();\n noodle.fill();\n return noodle;\n }", "@Override public EntityCommand createFromParcel(Parcel source) { return null; }", "Oracion createOracion();", "private CommandType(String name) {\n\t\t\n\t\tthis.name = name;\n\t}", "void generate(String name, List<String> types, Settings settings);", "public static Builder builder(String lineType){\n return new Builder(lineType);\n }", "interface WithCreate {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n TrustedIdProvider create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n TrustedIdProvider create(Context context);\n }", "Shipment createShipment();", "IOperationable create(String operationType);", "SUP createSUP();", "public static OrderSetCustomTypeActionBuilder of() {\n return new OrderSetCustomTypeActionBuilder();\n }", "For createFor();", "@Override\n\tpublic void create(Owner owner) {\n\n\t}", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "SourceBuilder createService();", "CharacterType createCharacterType(CharacterType t, long gameId);", "PermissionType createPermissionType();", "<U extends T> U create(String name, Class<U> type) throws InvalidUserDataException;", "@Test\n public void type() throws IllegalArgumentException {\n WebDriverCommandProcessor proc = new WebDriverCommandProcessor(\"http://localhost/\", manager.get());\n CommandFactory factory = new CommandFactory(proc);\n factory.newCommand(1, \"type\", \"aaa\", \"\");\n }", "Definition createDefinition();", "@Override\n\tpublic IProduct factoryMethod() {\n\t\treturn new Toy();\n\t}", "public com.vodafone.global.er.decoupling.binding.request.PurchaseType createPurchaseType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.PurchaseTypeImpl();\n }", "OperacionColeccion createOperacionColeccion();", "HarvestType createHarvestType();", "public PurchaseType()\r\n {\r\n }", "Operacion createOperacion();", "CapabilitiesType createCapabilitiesType();", "private TypeDb createTypeInstance(long id, String nameEn) {\n TypeDb typeDb = new TypeDb();\n typeDb.setId(id);\n typeDb.setTypeNameEn(nameEn);\n typeDb.setTypeNameRu(new TypeMapper().toRu(nameEn));\n return typeDb;\n }", "InboundServicesType createInboundServicesType();", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "AxisType createAxisType();", "@Override\n\tprotected Pizza createPizza(String type) {\n\t\tPizza pizza = null;\n\t\tPizzaIngredientFactory pizzaIngredientFactory = new NYPizzaIngredientFactory();\n\t\tif(type.equals(\"cheese\")){\n\t\t\tpizza = new CheesePizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Cheese Pizza\");\n\t\t} else if(type.equals(\"veggie\")){\n\t\t\tpizza = new VeggiePizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Veggie Pizza\");\n\t\t} else if(type.equals(\"clam\")) {\n\t\t\tpizza = new ClamPizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Clam Pizza\");\n\t\t} return pizza;\n\t}", "public EntityBundleCreate() {}", "@Override\n\tprotected DnD createInteraction() {\n\t\treturn new DnD();\n\t}", "protected VendorCheck createVendorCheck() {\r\n VendorCheck vendorCheck = new VendorCheck();\r\n vendorCheck.setVendorCheckId(new Long(99999));\r\n return vendorCheck;\r\n }", "public com.vodafone.global.er.decoupling.binding.request.UsageAuthRequestType createUsageAuthRequestType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.UsageAuthRequestTypeImpl();\n }", "public Builder type(String type) {\n this.type = type;\n return this;\n }", "public void instantiateCommand() throws SystemException {\r\n\t\t// Check the definitation.\r\n\t\tdefinitionCheck();\r\n\t\t\r\n\t\t// Create the fresh instance.\r\n\t\tcommandInstance = new ReadWriteableAttributes();\r\n\t}", "public com.vodafone.global.er.decoupling.binding.request.UsageAttributesType createUsageAttributesType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.UsageAttributesTypeImpl();\n }", "public OrderSetCustomTypeActionBuilder type(\n Function<com.commercetools.api.models.type.TypeResourceIdentifierBuilder, com.commercetools.api.models.type.TypeResourceIdentifierBuilder> builder) {\n this.type = builder.apply(com.commercetools.api.models.type.TypeResourceIdentifierBuilder.of()).build();\n return this;\n }", "ShipmentItemBilling createShipmentItemBilling();", "WithCreate withOsType(OperatingSystemTypes osType);", "ObjectTypeDefinition createObjectTypeDefinition();", "Scope createScope();", "public String clientCreateUser(User caller, String type) throws MupeException {\r\n return Person.clientGetCreator(caller, \"Person\");\r\n }", "TradeItem createTradeItem(Account proposer, Flippo proposerFlippo, Account receiver, Flippo receiverFlippo);", "Provider createProvider();", "PartyType getExporterParty();", "public abstract Product productFactory(String type);", "TypeSystemDefinition createTypeSystemDefinition();", "@Override\n public Command build() {\n switch (CommandType.fromString(commandName.getEscapedAndStrippedValue())) {\n case ASSIGN:\n return new AssignmentCommand(commandArgs);\n case CAT:\n return new CatCommand(commandArgs);\n case ECHO:\n return new EchoCommand(commandArgs);\n case WC:\n return new WcCommand(commandArgs);\n case PWD:\n return new PwdCommand(commandArgs);\n case GREP:\n return new GrepCommand(commandArgs);\n case EXIT:\n return new ExitCommand(commandArgs);\n default:\n return new OtherCommand(commandName, commandArgs);\n }\n }", "ShipmentContactMechType createShipmentContactMechType();", "QuoteTypeAttr createQuoteTypeAttr();", "public void createPartyPanel()\n {\n setPartyLabel(game.getPartyPane(), 0);\n //setPartyLabel(\"EMPTY\", 1);\n //setPartyLabel(\"EMPTY\", 2);\n //setPartyLabel(\"EMPTY\", 3);\n reloadPartyPanel();\n }", "Delivery createDelivery();", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "public void registerCommands() {\n\t CommandSpec cmdCreate = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdCreate.getInstance())\n\t .permission(\"blockyarena.create\")\n\t .build();\n\n\t CommandSpec cmdRemove = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdRemove.getInstance())\n\t .permission(\"blockyarena.remove\")\n\t .build();\n\n\t CommandSpec cmdJoin = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"mode\")))\n\t )\n\t .executor(CmdJoin.getInstance())\n\t .build();\n\n\t CommandSpec cmdQuit = CommandSpec.builder()\n\t .executor(CmdQuit.getInstance())\n\t .build();\n\n\t CommandSpec cmdEdit = CommandSpec.builder()\n\t .arguments(\n\t onlyOne(GenericArguments.string(Text.of(\"id\"))),\n\t onlyOne(GenericArguments.string(Text.of(\"type\"))),\n\t GenericArguments.optional(onlyOne(GenericArguments.string(Text.of(\"param\"))))\n\t )\n\t .executor(CmdEdit.getInstance())\n\t .permission(\"blockyarena.edit\")\n\t .build();\n\n\t CommandSpec cmdKit = CommandSpec.builder()\n\t .arguments(onlyOne(GenericArguments.string(Text.of(\"id\"))))\n\t .executor(CmdKit.getInstance())\n\t .build();\n\n\t CommandSpec arenaCommandSpec = CommandSpec.builder()\n\t .child(cmdEdit, \"edit\")\n\t .child(cmdCreate, \"create\")\n\t .child(cmdRemove, \"remove\")\n\t .child(cmdJoin, \"join\")\n\t .child(cmdQuit, \"quit\")\n\t .child(cmdKit, \"kit\")\n\t .build();\n\n\t Sponge.getCommandManager()\n\t .register(BlockyArena.getInstance(), arenaCommandSpec, \"blockyarena\", \"arena\", \"ba\");\n\t }", "ProjetoRN createProjetoRN();", "Factory<? extends T> buildPersonFactory(String type);", "RentalAgency createRentalAgency();", "public static CommandType createClass(String name) {\n\t\t\n\t\tif(counter < MAX) {\n\t\t\tcounter ++;\n\t\t\treturn new CommandType(name);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Es können keine CommandType Objekte mehr erstellt werden!\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\n\t}", "public org.python.types.Type __new__(org.python.types.Type cls);", "private static void crearPedidoGenerandoOPP() throws RemoteException {\n\n\t\tlong[] idVariedades = { 25 };\n\t\tint[] cantidades = { 7 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 2\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\t}", "protected final Transaction createTransaction(TransactionTypeKeys type) {\n\t\tTransaction trans = null;\n\t\tString payee = getForm().getPayFrom();\n\t\tdouble amount = parseAmount();\n\n\t\t// Put amount in proper form.\n\t\tif ((type == INCOME && amount < 0.0)\n\t\t\t\t|| (type == EXPENSE && amount >= 0.0)) {\n\t\t\tamount = -amount;\n\t\t}\n\n\t\t// Put payee in proper form.\n\t\tpayee = purgeIdentifier(payee);\n\n\t\ttrans = new Transaction(getForm().getField(CHECK_NUMBER).getText(),\n\t\t\t\tparseDate(), payee, Money.of(amount,\n\t\t\t\t\t\tUI_CURRENCY_SYMBOL.getCurrency()), getCategory(),\n\t\t\t\tgetForm().getField(NOTES).getText());\n\n\t\t// Set attributes not applicable in the constructor.\n\t\ttrans.setIsReconciled(getForm().getButton(PENDING).isSelected() == false);\n\n\t\tif (isInEditMode() == true) {\n\t\t\ttrans.setLabel(getEditModeTransaction().getLabel());\n\t\t}\n\n\t\treturn trans;\n\t}", "protected abstract Command getCreateCommand(CreateRequest request);", "WithCreate withKind(String kind);" ]
[ "0.5599695", "0.5338165", "0.5283318", "0.51502573", "0.5123807", "0.50823045", "0.5020095", "0.49933338", "0.49570003", "0.4933011", "0.4929239", "0.4929239", "0.4929239", "0.48520514", "0.48394635", "0.48180008", "0.47568083", "0.47406667", "0.4731618", "0.47308278", "0.47252667", "0.47109", "0.4704557", "0.47021607", "0.46983388", "0.4696669", "0.46755746", "0.4673511", "0.46643335", "0.4662236", "0.46436596", "0.46367303", "0.4636526", "0.46274263", "0.46248317", "0.46212488", "0.46194127", "0.46113214", "0.46093473", "0.46084756", "0.4591884", "0.45875183", "0.45766643", "0.45648095", "0.45610854", "0.45575806", "0.45494595", "0.45432273", "0.45367062", "0.45353335", "0.45319423", "0.45168278", "0.451524", "0.4512616", "0.45120153", "0.44945803", "0.4494289", "0.44776252", "0.44727543", "0.44644564", "0.44590288", "0.44535235", "0.44432908", "0.4440833", "0.44392383", "0.44285163", "0.44250116", "0.44235873", "0.44188365", "0.44185418", "0.44130027", "0.4407215", "0.44068003", "0.4406579", "0.44059852", "0.44037157", "0.43977648", "0.43891934", "0.4387631", "0.43869588", "0.43848172", "0.43842247", "0.43838912", "0.43837357", "0.43818897", "0.43772823", "0.43731552", "0.43716258", "0.4371132", "0.43705523", "0.436787", "0.43648294", "0.43644366", "0.43635225", "0.43610668", "0.4359587", "0.4356707", "0.43543273", "0.43533227", "0.435266" ]
0.6709838
0
InnerTest a; BuilderExampleBuilder b;
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private OuterTest(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "public void testBuilderExample() throws IOException {\n doTest();\n }", "private Builder(org.apache.gora.cascading.test.storage.TestRow.Builder other) {\n super(other);\n }", "public static io.confluent.developer.InterceptTest.Builder newBuilder(io.confluent.developer.InterceptTest.Builder other) {\n return new io.confluent.developer.InterceptTest.Builder(other);\n }", "public void testBuilderWithExistingBuilderClass() throws IOException {\n doTest();\n }", "public void testBuilderExampleCustomized() throws IOException {\n doTest();\n }", "public static io.confluent.developer.InterceptTest.Builder newBuilder(io.confluent.developer.InterceptTest other) {\n return new io.confluent.developer.InterceptTest.Builder(other);\n }", "@Test\n public void testBuilder_1()\n throws Exception {\n\n Project.Builder result = Project.builder();\n\n assertNotNull(result);\n }", "TestTarget createTestTarget();", "private A(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<com.xubao.test.simpleTest.protobufTest.ForExtendTest.A, ?> builder) {\n super(builder);\n }", "@Test\n public void testBuilderFrom_1()\n throws Exception {\n Project p = new Project();\n\n Project.Builder result = Project.builderFrom(p);\n\n assertNotNull(result);\n }", "Builder addExampleOfWork(CreativeWork.Builder value);", "private void demoInnerClass2() {\n }", "TestFirstBlock createTestFirstBlock();", "private Nested(Builder builder) {\n super(builder);\n }", "TestBlock createTestBlock();", "public static org.apache.gora.cascading.test.storage.TestRow.Builder newBuilder(org.apache.gora.cascading.test.storage.TestRow.Builder other) {\n return new org.apache.gora.cascading.test.storage.TestRow.Builder(other);\n }", "Builder addMainEntity(Thing.Builder value);", "public static io.confluent.developer.InterceptTest.Builder newBuilder() {\n return new io.confluent.developer.InterceptTest.Builder();\n }", "Builder addAbout(Thing.Builder value);", "@Test\r\n\tpublic void client2() {\n\t}", "private MTest2(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "BElement createBElement();", "protected abstract void executeTests() throws BuilderException;", "public void testGetObjectInstanceWithAttributesUsingBuilder() throws Exception {\r\n\t\t// setup test builder\r\n\t\tfinal ObjectFactoryBuilder builder = new ObjectFactoryBuilder() {\r\n\t\t\tpublic ObjectFactory createObjectFactory(Object refInfo, Hashtable environment) throws NamingException {\r\n\t\t\t\treturn new TestDirObjectFactory();\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\t// should be ignored, since it only supports ObjectFactory\r\n\t\tfinal ObjectFactoryBuilder builder2 = new ObjectFactoryBuilder() {\r\n\t\t\tpublic ObjectFactory createObjectFactory(Object refInfo, Hashtable environment) throws NamingException {\r\n\t\t\t\treturn new ObjectFactory() {\r\n\t\t\t\t\tpublic Object getObjectInstance(Object var0, Name var1,\r\n\t\t\t\t\t\t\tContext var2, Hashtable var3)\r\n\t\t\t\t\t\t\tthrows Exception {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\tregisterService(ObjectFactoryBuilder.class.getName(), \r\n\t\t\t\t builder, null);\r\n\t\t\r\n\t\tregisterService(ObjectFactoryBuilder.class.getName(), \r\n\t\t\t\t\t\tbuilder2, null);\r\n\t\t\r\n\t\t// test should resolve reference with builder installed, \r\n\t\t// since the DirObjectFactory is indirectly created by the builder\r\n\t\tServiceReference serviceReference = \r\n\t\t\tgetContext().getServiceReference(\"org.osgi.service.jndi.JNDIProviderAdmin\");\r\n\t\tassertNotNull(\"JNDIProviderAdmin service was not published as expected\", serviceReference);\r\n\t\t\t\r\n\t\tJNDIProviderAdmin contextAdmin = \r\n\t\t\t(JNDIProviderAdmin) getContext().getService(serviceReference);\r\n\t\t\t\r\n\t\tReference reference = new Reference(\"test\", \r\n\t\t\t\t\t TestDirObjectFactory.class.getName(), null);\r\n\t\tObject result = contextAdmin.getObjectInstance(reference, null, null, new Hashtable(), null);\r\n\t\tassertNotNull(\"JNDIProviderAdmin did not properly consult the DirObjectFactory\", \r\n\t\t\t\t\t result);\r\n\t\t\r\n\t\tassertFalse(\"JNDIProviderAdmin should not have returned reference\",\r\n\t\t\t\t result instanceof Reference);\r\n\t\tassertTrue(\"JNDIProviderAdmin returned an incorrect type\", \r\n\t\t\t\tresult instanceof Integer);\r\n\t\t\r\n\t\tassertEquals(\"JNDIProviderAdmin returned an incorrect value\",\r\n\t\t\t\t\t new Integer(100), result);\r\n\t}", "public static void main(String[] args) throws Exception {\r\n\t\tInnerAnnomiousNestedClass n=new InnerAnnomiousNestedClass();\r\n\t BB b=new BB() {\r\n\t\t @Override\r\n\t\tpublic void show() {\r\n\t\t\tSystem.out.println(\"Hello How are you\");\r\n\t\t}\r\n\t};\r\n\t // AA a=new AA();\r\n\t}", "private AnotherMessage(Builder builder) {\n super(builder);\n }", "private MTest1(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "InlineExample createInlineExample();", "public interface FrameworksBuilder {\r\n\r\n public List<FrameworkMethodWithParameters> build(TestClass testClass);\r\n}", "public static Builder newBuilder(Builder other) {\n return new Builder(other);\n }", "public static Builder newBuilder(Builder other) {\n return new Builder(other);\n }", "Builder addProducer(Person.Builder value);", "@Test\n public void testInlineObject5() {\n // TODO: test InlineObject5\n }", "private Builder() {}", "@org.junit.Test(timeout = 10000)\n public void testEmptyBarInner_add15567() throws java.lang.Exception {\n io.protostuff.Bar bar = new io.protostuff.Bar();\n bar.setSomeBaz(new io.protostuff.Baz());\n java.util.ArrayList<io.protostuff.Bar> bars = new java.util.ArrayList<io.protostuff.Bar>();\n bars.add(bar);\n java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();\n // AssertGenerator replace invocation\n int o_testEmptyBarInner_add15567__10 = // MethodCallAdder\nwriteListTo(out, bars, io.protostuff.SerializableObjects.bar.cachedSchema());\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(o_testEmptyBarInner_add15567__10, 4);\n writeListTo(out, bars, io.protostuff.SerializableObjects.bar.cachedSchema());\n byte[] data = out.toByteArray();\n java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(data);\n java.util.List<io.protostuff.Bar> parsedBars = parseListFrom(in, io.protostuff.SerializableObjects.bar.cachedSchema());\n junit.framework.TestCase.assertTrue(((parsedBars.size()) == (bars.size())));\n int i = 0;\n for (io.protostuff.Bar b : parsedBars)\n io.protostuff.SerializableObjects.assertEquals(bars.get((i++)), b);\n \n }", "@Test\n\tpublic void buildTest() {\n\t\tXMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory();\n\n\t\t// Get the assertion builder based on the assertion element name\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tSAMLObjectBuilder<Assertion> builder = (SAMLObjectBuilder<Assertion>) builderFactory\n\t\t\t\t.getBuilder(Assertion.DEFAULT_ELEMENT_NAME);\n\n\t\t// Create the assertion\n\t\tAssertion assertion = builder.buildObject();\n\n\t}", "private Builder(com.autodesk.ws.avro.Call.Builder other) {\n super(other);\n }", "@Test\n @Named(\"Referencing members\")\n @Order(4)\n public void _referencingMembers() throws Exception {\n StringConcatenation _builder = new StringConcatenation();\n _builder.append(\"package bootstrap\");\n _builder.newLine();\n _builder.newLine();\n _builder.append(\"describe \\\"Example Tables\\\"{\");\n _builder.newLine();\n _builder.append(\" \");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"String field = \\\"Hello\\\"\");\n _builder.newLine();\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"def method(){\");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"\\\"World\\\"\");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"} \");\n _builder.newLine();\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"def myExampleWithMemberCalls{\");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"| input | result |\");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"| field | \\\"Hello\\\" |\");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"| method() | \\\"World\\\" | \");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"} \");\n _builder.newLine();\n _builder.append(\" \");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"fact \\\"supports closures as values\\\"{ \");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"myExampleWithMemberCalls.forEach[\");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"input should be result\");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"] \");\n _builder.newLine();\n _builder.append(\" \");\n _builder.append(\"} \");\n _builder.newLine();\n _builder.append(\"}\");\n _builder.newLine();\n this._behaviorExecutor.executesSuccessfully(_builder);\n }", "public static baconhep.TTau.Builder newBuilder(baconhep.TTau.Builder other) {\n return new baconhep.TTau.Builder(other);\n }", "Builder addExampleOfWork(String value);", "private void t4(MoreTests o) {\n // any instance includes instance\n readAnyInstance();\n readFrom(this);\n readFrom(o);\n }", "Builder addPublisher(Person.Builder value);", "TestLastBlock createTestLastBlock();", "Builder addWorkExample(CreativeWork.Builder value);", "public void testBuilderPredefined() throws IOException {\n doTest();\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "TestContainer createTestContainer();", "TestNode createTestNode();", "TeststepBlock createTeststepBlock();", "@Test\n public void testAddACopy() {\n }", "@Test\n public void calculateWeightedAverage_1() throws Exception {\n WeightedAverage.Builder builder = WeightedAverage.newBuilder();\n builder.add(100,50);\n assertEquals(builder.calculate(), new BigDecimal(100));\n assertEquals(builder.build().calculateWeightedAverage(),\n new BigDecimal(100));\n }", "@Test\r\n public void testMethod2() {\r\n Targetable instance = new Adapter();\r\n instance.method1();\r\n instance.method2();\r\n }", "public interface AgentBuilder extends Builder<AgentBuilder, Agent> {\n\n /**\n * Sets the admin_state_up\n *\n * @param state the state of admin_state_up\n * @return the agent builder\n */\n AgentBuilder adminStateUp(boolean state);\n\n}", "@org.junit.Test(timeout = 10000)\n public void testEmptyBarInner_cf15625_failAssert6_add15826() throws java.lang.Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n io.protostuff.Bar bar = new io.protostuff.Bar();\n bar.setSomeBaz(new io.protostuff.Baz());\n java.util.ArrayList<io.protostuff.Bar> bars = new java.util.ArrayList<io.protostuff.Bar>();\n bars.add(bar);\n java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();\n // AssertGenerator replace invocation\n int o_testEmptyBarInner_cf15625_failAssert6_add15826__12 = // MethodCallAdder\nwriteListTo(out, bars, io.protostuff.SerializableObjects.bar.cachedSchema());\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(o_testEmptyBarInner_cf15625_failAssert6_add15826__12, 4);\n writeListTo(out, bars, io.protostuff.SerializableObjects.bar.cachedSchema());\n byte[] data = out.toByteArray();\n java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(data);\n java.util.List<io.protostuff.Bar> parsedBars = parseListFrom(in, io.protostuff.SerializableObjects.bar.cachedSchema());\n // StatementAdderOnAssert create null value\n io.protostuff.DelimiterTest vc_3590 = (io.protostuff.DelimiterTest)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_3590);\n // StatementAdderMethod cloned existing statement\n vc_3590.testBarTooLarge3();\n // MethodAssertGenerator build local variable\n Object o_23_0 = (parsedBars.size()) == (bars.size());\n int i = 0;\n for (io.protostuff.Bar b : parsedBars)\n io.protostuff.SerializableObjects.assertEquals(bars.get((i++)), b);\n \n org.junit.Assert.fail(\"testEmptyBarInner_cf15625 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "private BuilderUtils() {}", "public interface BoundTestPart1<A,B> {\n\n A getA();\n B getB();\n}", "public void testGetSubLearner()\n {\n this.testSetSubLearner();\n }", "public Multi2Test( String testName )\n {\n super( testName );\n }", "SharedBuilder<B, C, M1, M2> setM2(M2 m2);", "SharedBuilder<B, C, M1, M2> setM2(M2 m2);", "@org.junit.Test(timeout = 10000)\n public void testEmptyFooInner_cf31700_failAssert7_add31989() throws java.lang.Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.util.ArrayList<io.protostuff.Bar> bars = new java.util.ArrayList<io.protostuff.Bar>();\n bars.add(new io.protostuff.Bar());\n java.util.ArrayList<io.protostuff.Foo> foos = new java.util.ArrayList<io.protostuff.Foo>();\n io.protostuff.Foo foo = new io.protostuff.Foo();\n foo.setSomeBar(bars);\n foos.add(foo);\n java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();\n // AssertGenerator replace invocation\n int o_testEmptyFooInner_cf31700_failAssert7_add31989__15 = // MethodCallAdder\nwriteListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(o_testEmptyFooInner_cf31700_failAssert7_add31989__15, 4);\n writeListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n byte[] data = out.toByteArray();\n java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(data);\n java.util.List<io.protostuff.Foo> parsedFoos = parseListFrom(in, io.protostuff.SerializableObjects.foo.cachedSchema());\n // StatementAdderOnAssert create null value\n io.protostuff.DelimiterTest vc_7288 = (io.protostuff.DelimiterTest)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_7288);\n // StatementAdderMethod cloned existing statement\n vc_7288.testBaz();\n // MethodAssertGenerator build local variable\n Object o_26_0 = (parsedFoos.size()) == (foos.size());\n int i = 0;\n for (io.protostuff.Foo f : parsedFoos)\n io.protostuff.SerializableObjects.assertEquals(foos.get((i++)), f);\n \n org.junit.Assert.fail(\"testEmptyFooInner_cf31700 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "public interface BuilderAndTesterFactory {\n\tpublic DirectoryFinder getDirectoryFinder();\n\t\n\t/**\n\t * Create a Builder for a ProjectSubmission.\n\t * \n\t * @param projectSubmission the ProjectSubmission to build\n\t * @return a Builder which can build the ProjectSubmission\n\t * @throws BuilderException\n\t * @throws MissingConfigurationPropertyException\n\t */\n\tpublic Builder createBuilder(ProjectSubmission projectSubmission)\n\t\t\tthrows BuilderException, MissingConfigurationPropertyException, ZipExtractorException;\n\t\n\t/**\n\t * Create a Tester for a ProjectSubmission.\n\t * \n\t * @param haveSecurityPolicyFile true if there is a security.policy file\n\t * @param projectSubmission the ProjectSubmission to test\n\t * @return a Tester which can test the ProjectSubmission\n\t * @throws MissingConfigurationPropertyException\n\t */\n\tpublic Tester createTester(boolean haveSecurityPolicyFile, ProjectSubmission projectSubmission)\n\t\t\tthrows MissingConfigurationPropertyException;\n}", "@Test(groups = {\"groupTwo\"},dependsOnMethods= {\"test1\"})\n\tpublic void test2() {\n\t\tSystem.out.println(\"test two\");\n\t}", "private static class <init> extends <init>\n{\n\n public void a(Object obj, StringBuilder stringbuilder)\n {\n au au1 = (au)obj;\n y y1 = new y();\n y1.a(\"$ts\", Integer.valueOf(au1.a()));\n y1.a(\"$inc\", Integer.valueOf(au1.b()));\n a.a(y1, stringbuilder);\n }", "static void method1(B b1)\n\t\t{\n\t\t\tb1.test1();\n\t\t\tb1.test2();\n\t\t}", "@org.junit.Test(timeout = 10000)\n public void testEmptyFooInner2_cf36313_failAssert8_add36622() throws java.lang.Exception {\n // AssertGenerator generate try/catch block with fail statement\n try {\n java.util.ArrayList<io.protostuff.Bar> bars = new java.util.ArrayList<io.protostuff.Bar>();\n io.protostuff.Bar bar = new io.protostuff.Bar();\n bar.setSomeBaz(new io.protostuff.Baz());\n bars.add(bar);\n java.util.ArrayList<io.protostuff.Foo> foos = new java.util.ArrayList<io.protostuff.Foo>();\n io.protostuff.Foo foo = new io.protostuff.Foo();\n foo.setSomeBar(bars);\n foos.add(foo);\n java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();\n // AssertGenerator replace invocation\n int o_testEmptyFooInner2_cf36313_failAssert8_add36622__18 = // MethodCallAdder\nwriteListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(o_testEmptyFooInner2_cf36313_failAssert8_add36622__18, 6);\n writeListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n byte[] data = out.toByteArray();\n java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(data);\n java.util.List<io.protostuff.Foo> parsedFoos = parseListFrom(in, io.protostuff.SerializableObjects.foo.cachedSchema());\n // StatementAdderOnAssert create null value\n io.protostuff.DelimiterTest vc_8322 = (io.protostuff.DelimiterTest)null;\n // AssertGenerator add assertion\n org.junit.Assert.assertNull(vc_8322);\n // StatementAdderMethod cloned existing statement\n vc_8322.testFoo();\n // MethodAssertGenerator build local variable\n Object o_29_0 = (parsedFoos.size()) == (foos.size());\n int i = 0;\n for (io.protostuff.Foo f : parsedFoos)\n io.protostuff.SerializableObjects.assertEquals(foos.get((i++)), f);\n \n org.junit.Assert.fail(\"testEmptyFooInner2_cf36313 should have thrown NullPointerException\");\n } catch (java.lang.NullPointerException eee) {\n }\n }", "private D(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<com.xubao.test.simpleTest.protobufTest.ForExtendTest.D, ?> builder) {\n super(builder);\n }", "private void test2(){\n\t}", "BOperation createBOperation();", "public static Builder builder(){ return new Builder(); }", "protected void generateInner(boolean verbose, SourceBuilder builder) {\n for (int i = 0; i < m_inners.size(); i++) {\n ((ClassHolder)m_inners.get(i)).generate(verbose, builder);\n }\n }", "@org.junit.Test(timeout = 10000)\n public void testEmptyFooInner2_add36251() throws java.lang.Exception {\n java.util.ArrayList<io.protostuff.Bar> bars = new java.util.ArrayList<io.protostuff.Bar>();\n io.protostuff.Bar bar = new io.protostuff.Bar();\n bar.setSomeBaz(new io.protostuff.Baz());\n bars.add(bar);\n java.util.ArrayList<io.protostuff.Foo> foos = new java.util.ArrayList<io.protostuff.Foo>();\n io.protostuff.Foo foo = new io.protostuff.Foo();\n foo.setSomeBar(bars);\n foos.add(foo);\n java.io.ByteArrayOutputStream out = new java.io.ByteArrayOutputStream();\n // AssertGenerator replace invocation\n int o_testEmptyFooInner2_add36251__16 = // MethodCallAdder\nwriteListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n // AssertGenerator add assertion\n org.junit.Assert.assertEquals(o_testEmptyFooInner2_add36251__16, 6);\n writeListTo(out, foos, io.protostuff.SerializableObjects.foo.cachedSchema());\n byte[] data = out.toByteArray();\n java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(data);\n java.util.List<io.protostuff.Foo> parsedFoos = parseListFrom(in, io.protostuff.SerializableObjects.foo.cachedSchema());\n junit.framework.TestCase.assertTrue(((parsedFoos.size()) == (foos.size())));\n int i = 0;\n for (io.protostuff.Foo f : parsedFoos)\n io.protostuff.SerializableObjects.assertEquals(foos.get((i++)), f);\n \n }", "@Override\n @Test\n public void testSimpleJoin() throws Exception { }", "public static org.apache.gora.cascading.test.storage.TestRow.Builder newBuilder(org.apache.gora.cascading.test.storage.TestRow other) {\n return new org.apache.gora.cascading.test.storage.TestRow.Builder(other);\n }", "abstract SharedBuilder<B, C, M1, M2> setM2(M2 m2);", "abstract SharedBuilder<B, C, M1, M2> setM2(M2 m2);", "@Test\n public void isSameBeneficiary() {\n assertTrue(ANIMAL_SHELTER.isSameBeneficiary(ANIMAL_SHELTER));\n\n // null -> returns false\n assertFalse(ANIMAL_SHELTER.isSameBeneficiary(null));\n\n // same name, different attribute -> return true\n assertTrue(ANIMAL_SHELTER.isSameBeneficiary(\n new BeneficiaryBuilder(BABES).withName(VALID_NAME_ANIMAL_SHELTER).build()));\n\n // different name and different phone or email -> returns false\n Beneficiary differentPhone = new BeneficiaryBuilder(BABES).withPhone(VALID_PHONE_BABES)\n .withEmail(VALID_EMAIL_ANIMAL_SHELTER).build();\n assertFalse(ANIMAL_SHELTER.isSameBeneficiary(differentPhone));\n\n Beneficiary differentEmail = new BeneficiaryBuilder(BABES).withPhone(VALID_PHONE_ANIMAL_SHELTER)\n .withEmail(VALID_EMAIL_BABES).build();\n assertFalse(ANIMAL_SHELTER.isSameBeneficiary(differentEmail));\n\n //different name, (same phone and email) different attributes -> returns true\n Beneficiary editedAnimalShelter = new BeneficiaryBuilder(ANIMAL_SHELTER)\n .withName(VALID_NAME_BABES)\n .withAddress(VALID_ADDRESS_BABES).build();\n assertTrue(ANIMAL_SHELTER.isSameBeneficiary(editedAnimalShelter));\n\n // same name, same email, different attributes -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(ANIMAL_SHELTER).withPhone(VALID_PHONE_BABES)\n .withAddress(VALID_ADDRESS_BABES).build();\n assertTrue(ANIMAL_SHELTER.isSameBeneficiary(editedAnimalShelter));\n\n // same name, same phone, same email, different attributes -> returns true\n editedAnimalShelter = new BeneficiaryBuilder(ANIMAL_SHELTER).withAddress(VALID_ADDRESS_BABES).build();\n assertTrue(ANIMAL_SHELTER.isSameBeneficiary(editedAnimalShelter));\n }", "@Test\n\tpublic void test2() {\n\t}", "interface In2 {\n String f();\n String g();\n class Nested {\n static void testIn(In2 i) {\n System.out.println(i.f() + i.g());\n }\n }\n}", "private Builder() {\n\t\t}", "BSubTrue createBSubTrue();", "private Builder(org.apache.gora.cascading.test.storage.TestRow other) {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n if (isValidValue(fields()[0], other.defaultLong1)) {\n this.defaultLong1 = (java.lang.Long) data().deepCopy(fields()[0].schema(), other.defaultLong1);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.defaultStringEmpty)) {\n this.defaultStringEmpty = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.defaultStringEmpty);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.columnLong)) {\n this.columnLong = (java.lang.Long) data().deepCopy(fields()[2].schema(), other.columnLong);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.unionRecursive)) {\n this.unionRecursive = (org.apache.gora.cascading.test.storage.TestRow) data().deepCopy(fields()[3].schema(), other.unionRecursive);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.unionString)) {\n this.unionString = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.unionString);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.unionLong)) {\n this.unionLong = (java.lang.Long) data().deepCopy(fields()[5].schema(), other.unionLong);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.unionDefNull)) {\n this.unionDefNull = (java.lang.Long) data().deepCopy(fields()[6].schema(), other.unionDefNull);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.family2)) {\n this.family2 = (java.util.Map<java.lang.CharSequence,java.lang.CharSequence>) data().deepCopy(fields()[7].schema(), other.family2);\n fieldSetFlags()[7] = true;\n }\n }", "public void test_WrapNestedNotifyingCase() throws Exception {\n\t\tinit(null); \n\t\trepo = factory.createRepository(new RepositoryWrapper(notifier)) ;\n\t\trepo.initialize() ;\n\t\t\n\t\tassertTrue(repo instanceof NamedQueryRepositoryWrapper) ;\n\t\tfunctionalTest();\n\t}", "public static void main(String[] args) {\n\n House house=new House.HouseBuilder().build();\n\n House house1=new House.HouseBuilder()\n .addGarage(true)\n .addGarden(new Garden())\n .addRooms(5)\n .addWindows(10)\n .build();\n\n\n\n\n House houseWithoutGarden=new House.HouseBuilder().addGarage(true).addRooms(5).addWindows(10).build();\n\n }", "private Builder() {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n }", "@Test\n public void testSetClient() {\n\n Client client = client2;\n Beneficiaire instance = ben1;\n instance.setClient(client);\n assertEquals(client, instance.getClient());\n\n\n }", "Builder addCreator(Person.Builder value);", "@Test\r\n\tpublic void test2(){\n\t}", "@Test\r\n\tpublic void createSuccess() {\r\n\t\tnew WeldJoint<Body>(b1, b2, new Vector2());\r\n\t}", "private Builder(io.confluent.developer.InterceptTest other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.req_custid)) {\n this.req_custid = data().deepCopy(fields()[0].schema(), other.req_custid);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.req_message)) {\n this.req_message = data().deepCopy(fields()[1].schema(), other.req_message);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.req_json)) {\n this.req_json = data().deepCopy(fields()[2].schema(), other.req_json);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.req_remote_addr)) {\n this.req_remote_addr = data().deepCopy(fields()[3].schema(), other.req_remote_addr);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.req_uri)) {\n this.req_uri = data().deepCopy(fields()[4].schema(), other.req_uri);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.req_headers)) {\n this.req_headers = data().deepCopy(fields()[5].schema(), other.req_headers);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.req_method)) {\n this.req_method = data().deepCopy(fields()[6].schema(), other.req_method);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.result_json)) {\n this.result_json = data().deepCopy(fields()[7].schema(), other.result_json);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.result_post)) {\n this.result_post = data().deepCopy(fields()[8].schema(), other.result_post);\n fieldSetFlags()[8] = true;\n }\n }", "public static void main(String args[]){\n\tOuter.createInner();\r\n\t//new Outer.Inner();\r\n\t//new Outer.new Inner();\r\n}", "@Test\n\tpublic void testADSBTupleBuilder2() {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.ADSB_2D);\n\t\t\n\t\tfinal Tuple tuple1 = tupleBuilder.buildTuple(ADS_B_3);\n\t\tfinal Tuple tuple2 = tupleBuilder.buildTuple(ADS_B_2);\n\t\tfinal Tuple tuple3 = tupleBuilder.buildTuple(ADS_B_1);\n\t\tfinal Tuple tuple4 = tupleBuilder.buildTuple(ADS_B_3);\n\n\t\tAssert.assertNull(tuple1);\n\t\tAssert.assertNull(tuple2);\n\t\tAssert.assertNull(tuple3);\n\t\tAssert.assertNotNull(tuple4);\n\t}", "private Builder(io.confluent.developer.InterceptTest.Builder other) {\n super(other);\n if (isValidValue(fields()[0], other.req_custid)) {\n this.req_custid = data().deepCopy(fields()[0].schema(), other.req_custid);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.req_message)) {\n this.req_message = data().deepCopy(fields()[1].schema(), other.req_message);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.req_json)) {\n this.req_json = data().deepCopy(fields()[2].schema(), other.req_json);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.req_remote_addr)) {\n this.req_remote_addr = data().deepCopy(fields()[3].schema(), other.req_remote_addr);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.req_uri)) {\n this.req_uri = data().deepCopy(fields()[4].schema(), other.req_uri);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.req_headers)) {\n this.req_headers = data().deepCopy(fields()[5].schema(), other.req_headers);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.req_method)) {\n this.req_method = data().deepCopy(fields()[6].schema(), other.req_method);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.result_json)) {\n this.result_json = data().deepCopy(fields()[7].schema(), other.result_json);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.result_post)) {\n this.result_post = data().deepCopy(fields()[8].schema(), other.result_post);\n fieldSetFlags()[8] = true;\n }\n }", "TrainingTest createTrainingTest();", "Builder addAuthor(Person.Builder value);", "private Builder(br.unb.cic.bionimbus.avro.gen.JobInfo.Builder other) {\n super(other);\n }", "protected GuiTestObject bed_2(TestObject anchor, long flags) \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"bed_2\"), anchor, flags);\n\t}", "@Test\n\tpublic void testGeneratedCriteriaBuilder2() {\n\n\t\tClientFormMetadataExample.Criteria criteria = new ClientFormMetadataExample.Criteria()\n\t\t\t\t.andIdentifierIsNull()\n\t\t\t\t.andIdentifierIsNotNull()\n\t\t\t\t.andIdentifierEqualTo(\"anc/json\")\n\t\t\t\t.andIdentifierNotEqualTo(\"maternity/json\")\n\t\t\t\t.andIdentifierGreaterThan(\"anc/json\")\n\t\t\t\t.andIdentifierGreaterThanOrEqualTo(\"child/json\")\n\t\t\t\t.andIdentifierLessThan(\"child/json\")\n\t\t\t\t.andIdentifierLessThanOrEqualTo(\"child/json\")\n\t\t\t\t.andIdentifierLike(\"child/json\")\n\t\t\t\t.andIdentifierNotLike(\"child/json\")\n\t\t\t\t.andIdentifierIn(new ArrayList<>())\n\t\t\t\t.andIdentifierNotIn(new ArrayList<>())\n\t\t\t\t.andIdentifierBetween(\"1\", \"10\")\n\t\t\t\t.andIdentifierNotBetween(\"4\", \"7\")\n\t\t\t\t.andJurisdictionIsNotNull()\n\t\t\t\t.andJurisdictionIsNull()\n\t\t\t\t.andJurisdictionEqualTo(\"kenya\")\n\t\t\t\t.andJurisdictionNotEqualTo(\"kenya\")\n\t\t\t\t.andJurisdictionNotBetween(\"rwanda\", \"uganda\")\n\t\t\t\t.andJurisdictionLessThan(\"sa\")\n\t\t\t\t.andJurisdictionLessThanOrEqualTo(\"sa\")\n\t\t\t\t.andJurisdictionGreaterThan(\"sa\")\n\t\t\t\t.andJurisdictionGreaterThanOrEqualTo(\"sa\")\n\t\t\t\t.andJurisdictionLike(\"%a%\")\n\t\t\t\t.andJurisdictionNotLike(\"%a%\")\n\t\t\t\t.andJurisdictionIn(new ArrayList<>())\n\t\t\t\t.andJurisdictionNotIn(new ArrayList<>())\n\t\t\t\t.andJurisdictionBetween(\"a\", \"z\")\n\t\t\t\t.andJurisdictionNotBetween(\"ba\", \"chw\")\n\t\t\t\t.andVersionIsNull()\n\t\t\t\t.andVersionIsNotNull()\n\t\t\t\t.andVersionEqualTo(\"0.0.1\")\n\t\t\t\t.andVersionNotEqualTo(\"0.0.2\")\n\t\t\t\t.andVersionGreaterThan(\"0.0.3\")\n\t\t\t\t.andVersionGreaterThanOrEqualTo(\"0.0.3\")\n\t\t\t\t.andIsDraftIsNull()\n\t\t\t\t.andIsDraftIsNotNull()\n\t\t\t\t.andIsDraftEqualTo(true)\n\t\t\t\t.andIsDraftGreaterThan(false)\n\t\t\t\t.andIsDraftGreaterThanOrEqualTo(false)\n\t\t\t\t.andIsDraftLessThan(true)\n\t\t\t\t.andIsDraftLessThan(true)\n\t\t\t\t.andIsDraftLessThanOrEqualTo(true)\n\t\t\t\t.andIsDraftIn(new ArrayList<>())\n\t\t\t\t.andIsDraftBetween(true, false)\n\t\t\t\t.andIsDraftNotBetween(true, false)\n\t\t\t\t.andIsJsonValidatorIsNull()\n\t\t\t\t.andIsJsonValidatorIsNotNull()\n\t\t\t\t.andIsJsonValidatorEqualTo(true)\n\t\t\t\t.andIsJsonValidatorNotEqualTo(true)\n\t\t\t\t.andIsJsonValidatorGreaterThan(false)\n\t\t\t\t.andIsJsonValidatorGreaterThanOrEqualTo(false)\n\t\t\t\t.andIsJsonValidatorLessThan(true)\n\t\t\t\t.andIsJsonValidatorLessThanOrEqualTo(true)\n\t\t\t\t.andIsJsonValidatorIn(new ArrayList<>())\n\t\t\t\t.andIsJsonValidatorNotIn(new ArrayList<>())\n\t\t\t\t.andRelationIsNull()\n\t\t\t\t.andRelationIsNotNull()\n\t\t\t\t.andRelationEqualTo(\"anc/child.json\")\n\t\t\t\t.andRelationLike(\"%a%\")\n\t\t\t\t.andRelationNotLike(\"%a%\")\n\t\t\t\t.andRelationIn(new ArrayList<>())\n\t\t\t\t.andRelationNotIn(new ArrayList<>())\n\t\t\t\t.andRelationBetween(\"child\", \"registration\")\n\t\t\t\t.andRelationNotBetween(\"child\", \"registration\")\n\t\t\t\t.andRelationLessThan(\"child\")\n\t\t\t\t.andRelationLessThanOrEqualTo(\"child\")\n\t\t\t\t.andRelationGreaterThan(\"child\")\n\t\t\t\t.andRelationGreaterThanOrEqualTo(\"child\");\n\n\t\tassertEquals(69, criteria.getAllCriteria().size());\n\t}", "@Test\n public void instanceTest() {\n // TODO: test instance\n }" ]
[ "0.6194706", "0.61442643", "0.6140512", "0.6053447", "0.5834357", "0.583184", "0.5819234", "0.57389873", "0.5696309", "0.56740147", "0.5632752", "0.5596036", "0.55731905", "0.5508141", "0.54720837", "0.54452455", "0.5432955", "0.5406086", "0.5388138", "0.5382057", "0.5374793", "0.53707176", "0.5303436", "0.5293442", "0.5261778", "0.5252109", "0.5250385", "0.52407795", "0.52407384", "0.52325094", "0.522634", "0.522634", "0.52149975", "0.5181999", "0.5179197", "0.5176324", "0.5163293", "0.5140746", "0.51397", "0.51306015", "0.51265365", "0.5121381", "0.51170945", "0.5102378", "0.5100036", "0.50984764", "0.5097362", "0.5097362", "0.509463", "0.50944823", "0.509342", "0.50904465", "0.5084542", "0.5073372", "0.50731057", "0.50527304", "0.504946", "0.50388336", "0.5034984", "0.50328076", "0.5032573", "0.5032573", "0.5031324", "0.50293434", "0.50240445", "0.5007844", "0.5005514", "0.49967796", "0.49894708", "0.49878183", "0.4985576", "0.49824703", "0.49791473", "0.49731237", "0.49697196", "0.4962503", "0.49616617", "0.49616617", "0.49613532", "0.49591285", "0.4951966", "0.494788", "0.49364665", "0.4933205", "0.49276334", "0.49229625", "0.4922161", "0.49152538", "0.49147496", "0.49132055", "0.4906714", "0.49024743", "0.48974207", "0.4896869", "0.48947653", "0.48888674", "0.48855835", "0.4885123", "0.48799172", "0.48756698", "0.48745644" ]
0.0
-1
/ Opposites are more strict than similar: they are the same class and are not the same object. However they return true for "opposite," and false for anything else.
public boolean opposedTo(Object o);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasSameAs();", "boolean hasIsEquivalent();", "boolean _is_equivalent(org.omg.CORBA.Object other);", "public boolean equivalentInteractions(InteractionObject first, InteractionObject second) {\n\t\tboolean result = \n\t\t\tfirst.getType() == second.getType() &&\n\t\t\tfirst.getIndex() == second.getIndex();\n\t\treturn result;\n\t}", "public boolean isIdentical(Remote obj1, Remote obj2)\n {\n\torg.omg.CORBA.Object corbaObj1 = (org.omg.CORBA.Object)obj1;\n\torg.omg.CORBA.Object corbaObj2 = (org.omg.CORBA.Object)obj2;\n\n\treturn corbaObj1._is_equivalent(corbaObj2);\n }", "public boolean isIsosceles() {\n\t\t\tif((this.sideOne == this.sideTwo & this.sideOne != this.sideThree) || (this.sideOne == this.sideThree & this.sideOne != this.sideTwo) || (this.sideTwo == this.sideThree & this.sideTwo != this.sideOne)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "boolean equivalent(Concept x, Concept y);", "public boolean isIsosceles() {\n\t\t\tif(sideOne == sideTwo || sideTwo == sideThree || sideOne == sideThree) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}", "protected boolean isEqual( Object lhs, Object rhs ){\r\n\t\tboolean x = lhs==null;\r\n\t\tboolean y = rhs == null;\r\n\t\t//XOR OPERATOR, only one is null\r\n\t\tif ((x || y) && !(x && y))\r\n\t\t\treturn false;\r\n\t\tif (lhs.equals(rhs))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }", "public boolean isIsosceles () {\r\n\t\tif ((startSide1 == startSide2 || startSide1 == startSide3 || startSide2 == startSide3) && isTriangle () == true && isEquilateral() == false) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}", "public boolean equivalent(Tradeoff trade)\r\n\t{\r\n\t\tboolean eq = false;\r\n\t\tif ((trade.getOnt1().toString().equals(ont1.toString())) &&\r\n\t\t\t\t(trade.getOnt2().toString().equals(ont2.toString())))\r\n\t\t\teq = true;\r\n\t\telse if ((trade.getOnt1().toString().equals(ont2.toString())) &&\r\n\t\t\t\t(trade.getOnt2().toString().equals(ont1.toString())))\r\n\t\t\teq = true;\r\n\t\treturn eq;\r\n\t}", "boolean isMirror();", "private static boolean equiv(VObject src, VObject dst)\n {\n return ((src.getId() != null && src.getId().equals(dst.getId()))\n || (src.getSid() != null && src.getSid().equals(dst.getSid())) \n || (src.getName() != null && src.getName().equals(dst.getName())));\n }", "private boolean isPure(Collection<Instance> instances) {\n\t\tif (instances.size() <= 1) {\n\t\t\treturn true;\n\t\t}\n\t\tIterator<Instance> iter = instances.iterator();\n\t\tint match = iter.next().getCategory();\n\t\twhile (iter.hasNext()) {\n\t\t\tif (match != iter.next().getCategory()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean allSameClass(List<Instance> instances) {\r\n\r\n\t\tString firstClassFound = (String) instances.get(0).getClassAttribute();//.getAttributes().get(4).getValue();\r\n\t\t// search thru' instances until it finds a different classification to the first one\r\n\t\tfor(Instance ins : instances){\t\t\t\r\n\t\t\t//if(!ins.getAttributes().get(4).getValue().equals(firstClassFound)){\r\n\t\t\tif(!ins.getClassAttribute().equals(firstClassFound)){\r\n\t\t\t\treturn false;\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn true;\r\n\t}", "public static boolean preEq(Object a, Object b) {\n\t\treturn a != null && b != null && a.getClass().equals(b.getClass());\n\t}", "public boolean checkEquivalent(OWLClass class1, OWLClass class2) {\n for (OWLClass cls : loader.getEquivalentClasses(class1)) {\n if (cls.getIRI().equals(class2.getIRI())) {\n return true;\n }\n }\n return false;\n }", "private boolean notEqualFeatures(Instance inst1, Instance inst2) {\n\n for(int i = 0; i < m_Train.numAttributes(); i++){\n if(i == m_Train.classIndex())\n\tcontinue;\n if(inst1.value(i) != inst2.value(i))\n\treturn true;\n }\n return false;\n }", "public boolean equivalent(Operation o) {\n return o.token == this.token && o.op == this.op;\n }", "@Test\n public void testDifferentClassEquality() {\n }", "boolean canEqual(Object obj);", "public static boolean opposites(Pair[] data){\n HashSet<Pair> hs = new HashSet<>(20, 0.9f);\n for(Pair p : data) {\n if(hs.contains(new Pair(p.b(), p.a())))\n return true;\n hs.add(p);\n }\n return false;\n }", "@Test\n public void equalsFalseDifferentPiece() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n player1.addPiece(new Piece(PlayerColor.BLACK, 1));\n\n Player player2 = new Player(PlayerColor.BLACK, \"\");\n player2.addPiece(new Piece(PlayerColor.BLACK, 2));\n\n assertFalse(player1.equals(player2));\n }", "@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}", "public boolean equalsIgnoreRotRef(final Pattern other)\n\t{\n\t\t// for every feature element, we also need it to be present in other, \n\t\t// and vice versa\n\t\tif (featureElements.size() != other.featureElements.size())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (final FeatureElement element : featureElements)\n\t\t{\n\t\t\tif (!other.featureElements.contains(element))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (final FeatureElement element : other.featureElements())\n\t\t{\n\t\t\tif (!featureElements.contains(element))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn allowsReflection == other.allowsReflection;\n\t}", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "public boolean realEquals(Object o){\n\t\treturn keywords.equals(o);\n\t}", "boolean isCommutative();", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }", "public boolean isSameAs(Move comp){ \n return this.xFrom==comp.xFrom &&\n this.xTo==comp.xTo &&\n this.yFrom==comp.yFrom &&\n this.yTo==comp.yTo;\n }", "public boolean match(MindObject other){\n return other.isSubtypeOf(this) || isSubtypeOf(other);\n }", "public boolean notEquals(XObject obj2)\n throws javax.xml.transform.TransformerException{\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.notEquals(this);\n return !equals(obj2);\n }", "public boolean equals(Object o) {\n\t\tif (o instanceof InstagramObject) {\n\t\t\t//if (((InstagramObject) o).checkClass(element.getAttribute(\"class\")) ) {\n\t\t\t\tif (((InstagramObject) o).getElement().equals(element))\n\t\t\t\t\treturn true;\n\t\t//\t}\n\t\t} return false;\n\t}", "private boolean isEqual(Iterator<?> instance, OasisList<?> baseList) {\n\n boolean equal = true;\n int i = 0;\n while (instance.hasNext()) {\n if (!baseList.get(i++).equals(instance.next())) {\n equal = false;\n break;\n }\n }\n\n return equal;\n }", "public boolean _is_equivalent(Object that) {\n return equals(that) ;\n }", "abstract boolean equivalentXml(Object target);", "private Boolean areCompatible(Class a, Class b) {\n return (a.isAssignableFrom(b) || b.isAssignableFrom(a));\n }", "public boolean isEqual(Heaper anObject) {\n\treturn anObject.getCategory() == getCategory();\n/*\nudanax-top.st:15781:SequenceSpace methodsFor: 'testing'!\n{BooleanVar} isEqual: anObject {Heaper}\n\t\"is equal to any basic space on the same category of positions\"\n\t^anObject getCategory == self getCategory!\n*/\n}", "private boolean equal(Fragment left, Fragment right) {\n return (left != null && right != null && left.getClass().getName().equalsIgnoreCase(right.getClass().getName()));\n }", "public static boolean isSameObject(Object a, Object b) {\n return Builtins.isSameObject(a, b);\n }", "public boolean isEquals() {\n long len = -1L;\n\n //1. check the lengths of the words\n for(S left : slp.getAxioms()) {\n if(len == -1L) {\n len = slp.length(left);\n }\n else {\n if(len != slp.length(left)) {\n return false;\n }\n }\n }\n\n // all words are the empty word\n if(len == 0) {\n return true;\n }\n\n // 2. the length are all equals and not zero => execute the recompression\n execute();\n\n S otherSymbol = null;\n boolean first = true;\n\n // 3. chech now if for all axioms X : |val(X)| = 1 and all val(X) are equals.\n for(S left : slp.getAxioms()) {\n if(first) {\n slp.length(left, true);\n first = false;\n }\n\n if(slp.length(left) != 1) {\n return false;\n }\n else {\n S symbol = slp.get(left, 1);\n if(otherSymbol == null) {\n otherSymbol = symbol;\n }\n\n if(!symbol.equals(otherSymbol)) {\n return false;\n }\n }\n }\n\n return true;\n }", "public boolean hitObject(BasicObject oppose){\n if (oppose.classOfObejct != classOfObejct){\n if (abs(posX - oppose.posX) < (wid / 2 + oppose.wid/2) && abs(posY - oppose.posY) < (hei / 2 + oppose.hei/2)){\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "@Test\n\tpublic void testEqualsObject_False() {\n\t\tassertNotEquals(book1, book2);;\n\t}", "boolean isSubclass(Concept x, Concept y);", "public boolean equivalentTo (BusinessObject other, Callback<BusinessObject, Boolean> ignoreFields) {\n\t\tif (this == other) {\n\t\t\treturn true;\t// no point checking... we know they're the same...\n\t\t}\n\t\tif (getClass() != other.getClass() ||\t// different class... must be different\n\t\t\t\t((children == null) != (other.children == null)) ||\t// one is null while other isn't\n\t\t\t\t(children != null && children.size() != other.children.size())) {\t// both has children, but differing amounts\t\n\t\t\treturn false;\n\t\t} \n\t\tif (children != null) {\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\t// Not going to bother comparing if callback returns true\n\t\t\t\tif (ignoreFields != null && ignoreFields.call(child)) continue;\t\n\t\t\t\tString name = child.nameProperty().getValue();\n\t\t\t\tBusinessObject otherChild = other.findChildByName(name);\n\t\t\t\tif(otherChild == null || !child.equivalentTo(otherChild, ignoreFields)) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean equivalent(DataType dataType) {\n return equals(dataType);\n }", "@Test\n\tpublic void test_TCM__boolean_equals_Object() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\");\n\n assertFalse(\"attribute equal to null\", attribute.equals(null));\n\n final Object object = attribute;\n assertTrue(\"object not equal to attribute\", attribute.equals(object));\n assertTrue(\"attribute not equal to object\", object.equals(attribute));\n\n // current implementation checks only for identity\n// final Attribute clonedAttribute = (Attribute) attribute.clone();\n// assertTrue(\"attribute not equal to its clone\", attribute.equals(clonedAttribute));\n// assertTrue(\"clone not equal to attribute\", clonedAttribute.equals(attribute));\n\t}", "private boolean isInNormalForm (OWLDescription cls_left, OWLDescription cls_right) throws OWLException\n\t{\n\t\tif (isConjunction(cls_left) && isPureConjunction(cls_right))\n\t\t\treturn true;\n\t\t\n\t\tif (isPureDisjunction(cls_left) && isConjunction(cls_right))\n\t\t\treturn true;\n\t\t\n\t\tif (isPureConjunction(cls_left) && isPureDisjunction(cls_right))\n\t\t\treturn true;\n\t\t\t\n\t\treturn false;\n\t}", "public boolean equals(XObject obj2) {\n/* */ try {\n/* 262 */ if (4 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 268 */ return obj2.equals(this);\n/* */ }\n/* 270 */ if (1 == obj2.getType())\n/* */ {\n/* 272 */ return (bool() == obj2.bool());\n/* */ }\n/* 274 */ if (2 == obj2.getType())\n/* */ {\n/* 276 */ return (num() == obj2.num());\n/* */ }\n/* 278 */ if (4 == obj2.getType())\n/* */ {\n/* 280 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 282 */ if (3 == obj2.getType())\n/* */ {\n/* 284 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* 286 */ if (5 == obj2.getType())\n/* */ {\n/* */ \n/* */ \n/* 290 */ return xstr().equals(obj2.xstr());\n/* */ }\n/* */ \n/* */ \n/* 294 */ return super.equals(obj2);\n/* */ \n/* */ }\n/* 297 */ catch (TransformerException te) {\n/* */ \n/* 299 */ throw new WrappedRuntimeException(te);\n/* */ } \n/* */ }", "@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "private boolean notEquals(Object a, Object b)\n {\n if (a != null && b == null)\n return true;\n if (a == null && b != null)\n return true;\n if (a != null && !a.equals(b))\n return true;\n return false;\n }", "@Test\r\n public void testOpposite() {\r\n System.out.println(\"opposite\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1Element, v2Element, edgeElement);\r\n\r\n Vertex result = instance.opposite(v1, e);\r\n Vertex expectedResult = v2;\r\n assertEquals(expectedResult, result);\r\n\r\n result = instance.opposite(v2, e);\r\n expectedResult = v1;\r\n assertEquals(expectedResult, result);\r\n }", "@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}", "public static boolean areMirror(Node n1, Node n2) {\r\n //If any condition where children sizes are not same it means shape is not similar so return false\r\n if(n1.children.size() != n2.children.size()){\r\n return false;\r\n }\r\n \r\n boolean res = true;\r\n //For node2 interate from reverse\r\n int j = n2.children.size()-1;\r\n \r\n for(int i=0; i<n1.children.size(); i++){\r\n Node child1 = n1.children.get(i);\r\n \r\n Node child2 = n2.children.get(j--); //decrease j while traversing from behind\r\n \r\n res = areMirror(child1, child2);\r\n \r\n //if even once a false is encountered it means no calculate further and return from here\r\n if(res == false){\r\n return false;\r\n }\r\n }\r\n return res;\r\n }", "private boolean matchModes(QName m1, QName m2) {\n/* 133 */ return ((null == m1 && null == m2) || (null != m1 && null != m2 && m1.equals(m2)));\n/* */ }", "public abstract boolean doEquivalent(T t, T t2);", "public boolean isIdentical(FeRangeElement other) {\n\tDean.shouldImplement();\n\treturn false;\n/*\nudanax-top.st:20673:FeVirtualDataHolder methodsFor: 'accessing'!\n{BooleanVar} isIdentical: other {FeRangeElement}\n\t\"This can do a version comparison (which seems a bit extreme).\"\n\tDean shouldImplement.\n\t^false \"fodder\"!\n*/\n}", "@Test\n public void testNotPositionInstanceEquals(){\n Pillar p = new Pillar(0,0);\n assertFalse(Maze.position(0,0).equals(p));\n }", "public boolean isIdentical(Object o) {\n if (equals(o)) {\n Contact contact = (Contact) o;\n return firstName.equals(contact.firstName)\n && lastName.equals(contact.lastName)\n && phone.equals(contact.phone)\n && email.equals(contact.email)\n && dateOfBirth.equals(contact.dateOfBirth)\n && notes.equals(contact.notes);\n }\n\n return false;\n }", "private boolean areSameType(String s1, String s2) {\n\t\treturn((isMatrix(s1) && isMatrix(s2)) || (isOperator(s1) && isOperator(s2)) || (isNumber(s1) && isNumber(s2)));\n\t}", "@Test\n public void equals2() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 1);\n SmartPlayer y = new SmartPlayer(0, 2);\n assertFalse(x.equals(y));\n }", "@Test\n\tpublic void test_equals2() {\n\tTennisPlayer c1 = new TennisPlayer(11,\"Joe Tsonga\");\n\tTennisPlayer c2 = new TennisPlayer(521,\"Joe Tsonga\");\n\tassertFalse(c1.equals(c2));\n }", "public static boolean areMirror(Node n1, Node n2) {\n boolean flag=true;\n int n=n1.children.size();\n\n if(n!=n2.children.size())\n return false;\n for(int i=0;i<n;i++)\n {\n flag= flag && areMirror(n1.children.get(i),n2.children.get(n-i-1));\n if(flag==false)\n break;\n }\n return flag;\n }", "private boolean propriedadesIguais( Integer pro1, Integer pro2 ){\r\n\t if ( pro2 != null ){\r\n\t\t if ( !pro2.equals( pro1 ) ){\r\n\t\t\t return false;\r\n\t\t }\r\n\t } else if ( pro1 != null ){\r\n\t\t return false;\r\n\t }\r\n\t \r\n\t // Se chegou ate aqui quer dizer que as propriedades sao iguais\r\n\t return true;\r\n\t}", "@Test\n\tpublic void testEquals1() {\n\t\tDistance d1 = new Distance(0, 0);\n\t\tDistance d2 = new Distance();\n\t\tassertEquals(false, d1.equals(d2));\n\t}", "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 }", "@Test\n\tpublic void test_equals2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertFalse(t1.equals(t2));\n }", "@Test\n @DisplayName(\"Test should detect inequality between unequal states.\")\n public void testShouldResultInInequality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Goodbye\");\n\n Assertions.assertThat(os1).isNotEqualTo(os2);\n }", "public boolean sameType(FilterCondition fc) {\n return fc.getClass() == getClass();\n }", "@Override\n public boolean equals (final Object o) {\n return\n (o instanceof Composition)\n &&\n super.equals(o)\n &&\n Arrays.equals(\n _reversedTerms, \n ((Composition) o)._reversedTerms); }", "public static boolean m66061a(Object obj, Object obj2) {\n return obj == obj2 || (obj != null && obj.equals(obj2));\n }", "public abstract boolean equals(Object o);", "@Test\n public void equals_returnsTrueIfNameIsTheSame_false() {\n Animal firstAnimal = new Animal(\"Deer\");\n Animal anotherAnimal = new Animal(\"Deer\");\n assertTrue(firstAnimal.equals(anotherAnimal));\n }", "protected boolean areContentsTheSame(T old, T news) {\n if (old == null)\n return news == null;\n return old.sameContents(news);\n }", "public static void main(String args[]){\n\t\tOlive empty = new Olive();\n\t\tOlive notEmpty = new Olive(\"notEmpty\",new Money(1,1),300);\n\t\tOlive notEmpty2 = new Olive(\"notEmpty\",new Money(1,1),300);\n\t\tSystem.out.println(empty.toString()+\"\\n\"+notEmpty.toString()+\"\\n\" +notEmpty2.toString()+\"\\n\" );\n\t\tSystem.out.println(empty.equals(notEmpty)+\"\\n\" +notEmpty.equals(notEmpty2));\n\t}", "public static boolean areMirror2(Node n1, Node n2) {\n boolean flag=true;\n int n=n1.children.size();\n\n if(n!=n2.children.size() && n1.data!=n2.data)\n return false;\n for(int i=0;i<n;i++)\n {\n flag= flag && areMirror(n1.children.get(i),n2.children.get(n-i-1));\n if(flag==false)\n break;\n }\n return flag;\n }", "public boolean equals(Object o) { return compareTo(o) == 0; }", "public abstract boolean equals(Object other);", "static public boolean areEqual(Object aThis, Object aThat) {\r\n // System.out.println(\"Object\");\r\n return aThis == null ? aThat == null : aThis.equals(aThat);\r\n }", "Collection<? extends Noun> getIsEquivalent();", "default boolean areRelated(Triple... elements) {\n return witnesses(elements).anyMatch(x -> true);\n }", "public boolean hasAdjacentEqualPair()\n { \n \tfor( int i = 0; i < purchases.size()-1; i++ )\n \t{\n \t\tGizmo curr = purchases.get( i );\n \t\tGizmo nxt = purchases.get( i + 1 );\n \t\tif( curr.equals( nxt ) )\n \t\t\treturn true;\n \t}\n \treturn false; \t\n }", "@Override\n public boolean equals( GeoShape shape, double epsilon ){\n boolean response;\n if (!(shape instanceof GeoLine)){\n response = false;\n }\n else {\n response = super.equals(shape,epsilon);\n }\n return response;\n }", "boolean Symmetric(Node t)\n {\n return isMirror(t,t);\n }", "public boolean isIdentical(Filter f);", "public static boolean areSame(AnnotatedTypeMirror t1, AnnotatedTypeMirror t2) {\n return t1.toString().equals(t2.toString());\n }", "public boolean isThreeOfAKind() {\n\t\treturn this.sameSet.size() == 1;\n\t}", "boolean replacementfor(Type o);", "@Test\n\tpublic void isChildOrSameTest3()\n\t{\n\t\tNodeList n1=xmlDocument.getElementsByTagName(\"b\");\n\t\tNodeList n2=xmlDocument.getElementsByTagName(\"p\");\n\t\tassertEquals(false,Manipulator.isChildOrSame(n1.item(0),n2.item(0)));\n\t}", "@Test\n public void equalsFalseOtherObject() {\n Player player1 = new Player(PlayerColor.BLACK, \"\");\n String player2 = \"abcd\";\n assertFalse(player1.equals(player2));\n }", "public boolean isSameOVsameEntity() {\r\n\t\t\tList<TempTableHeader> leaves = this.getParents(); // leaves of boolean expression evaluation tree\r\n\t\t\t\r\n\t\t\t// prepare a set with names of OVs declared in current if-clause, \r\n\t\t\t// We'll use it later in order to check whether the OVs in leaf.getCurrentEntityAndArguments() matches with the ones declared in current if-clause\r\n\t\t\t// TODO migrate this set to somewhere else so that we don't have to instantiate the same set several times\r\n\t\t\tCollection<String> varSetNamesInCurrentIfClause = new ArrayList<String>();\t// Note: we may use HashSet if we expect many OVs declared in a single if-clause\t\r\n\t\t\t// Note: at this point, getVarsetname() is a string representing the ovs declared in this if-clause, and the ovs are separated by getSSBNNode().getStrongOVSeparator()\r\n\t\t\tfor (String ovName : getVarsetname().split(\"\\\\\" + getSSBNNode().getStrongOVSeparator())) {\r\n\t\t\t\tvarSetNamesInCurrentIfClause.add(ovName);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (TempTableHeader leaf : leaves) {\r\n\t\t\t\tif (leaf.isKnownValue()) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tList<OVInstance> args = leaf.getCurrentEntityAndArguments().arguments;\r\n\t\t\t\tif (args.isEmpty()) {\r\n\t\t\t\t\t// ignore nodes with no arguments\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// at least 1 OV in arguments shall be declared in the varset field of this if-clause, or else current combination of values of parents must be ignored\r\n\t\t\t\tboolean isAtLeast1OVDeclaredInVarsetname = false;\r\n\t\t\t\t\r\n\t\t\t\t// first, test if leaf has same arguments as its ssbnnode (if ssbnnode has same arguments as parents)\r\n\t\t\t\tfor (OVInstance argParent : args) {\r\n\t\t\t\t\t// check condition to activate the flag (i.e. to change content of isAllOVsDeclaredInVarsetname)\r\n\t\t\t\t\t// check if the ov of this argument was declared in the varsetname field of current if-clause\r\n\t\t\t\t\tif (varSetNamesInCurrentIfClause.contains(argParent.getOv().getName())) {\r\n\t\t\t\t\t\tisAtLeast1OVDeclaredInVarsetname = true;\t// we found at least 1 OV, so turn the flag on\r\n\t\t\t\t\t} else if (!argParent.getOv().getValueType().hasOrder() // we don't need to consider weak ovs\r\n\t\t\t\t\t\t\t\t&& isExactMatchStrongOV()) {\r\n\t\t\t\t\t\t// we can immediately return if compiler requires exact match of strong ovs\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if it has same OV as ssbnnode, then should be the same entity\r\n\t\t\t\t\tfor (OVInstance argChild : this.currentSSBNNode.getArguments()) {\r\n\t\t\t\t\t\tif (argChild.getOv().getName().equalsIgnoreCase(argParent.getOv().getName())) {\r\n\t\t\t\t\t\t\tif (!argChild.getEntity().getInstanceName().equalsIgnoreCase(argParent.getEntity().getInstanceName())) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (!isAtLeast1OVDeclaredInVarsetname) {\r\n\t\t\t\t\t// current value of parents was not declared in the varsetname field of current if-clause, so we should not consider it.\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = leaves.indexOf(leaf) + 1; i < leaves.size(); i++) {\r\n\t\t\t\t\t// try all other leaves\r\n\t\t\t\t\tfor (OVInstance argleaf : args) {\r\n\t\t\t\t\t\tif (leaves.get(i).isKnownValue()) {\r\n\t\t\t\t\t\t\t// if current leaf has a known value (i.e. it is allways evaluating false), then\r\n\t\t\t\t\t\t\t// it is not necessary to test OVInstance's name-value consistency\r\n\t\t\t\t\t\t\t// (we don't have to check if OVs with same name has same value, since\r\n\t\t\t\t\t\t\t// at evaluation time their values are not going to be used at all)\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfor (OVInstance argothers : leaves.get(i).getCurrentEntityAndArguments().arguments) {\r\n\t\t\t\t\t\t\tif(argleaf.getOv().getName().equalsIgnoreCase(argothers.getOv().getName())) {\r\n\t\t\t\t\t\t\t\tif (!argleaf.getEntity().getInstanceName().equalsIgnoreCase(argothers.getEntity().getInstanceName()) ) {\r\n\t\t\t\t\t\t\t\t\t// if they are the same OV but different instances of Entities... then false\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "boolean isNilExchange();", "@Test\n public void testEqualTo() {\n System.out.println(\"AbsolutePathNode - testEqualTo\");\n final AbsolutePathNode instance1 = new AbsolutePathNode();\n final AbsolutePathNode instance2 = new AbsolutePathNode();\n final TestNode testInstance = TestNode.instance;\n assertTrue(instance1.equalTo(instance2));\n assertFalse(instance1.equalTo(testInstance));\n }", "private boolean compatibleNodeTypes(AxiomTreeNode t1, AxiomTreeNode t2) {\n if (!t1.getNodeType().equals(t2.getNodeType())) {\n return false;\n }\n \n switch (t1.getNodeType()) {\n case CARD:\n int label1 = (Integer) t1.getLabel();\n int label2 = (Integer) t2.getLabel();\n return (label1 == label2);\n \t\n case OWLOBJECT:\n OWLObject o1 = (OWLObject) t1.getLabel();\n OWLObject o2 = (OWLObject) t2.getLabel();\n //System.out.println(o1.getClass());\n //System.out.println(o2.getClass());\n //Check for datatypes - then check datatype to see match. Else, return true if compatible.\n if(o1.getClass() == o2.getClass())\n {\n \tif(!o1.getDatatypesInSignature().isEmpty())\n \t{\n \t\t//Need to check if built in first. First check is convenience, datatypes should match\n \t\t//If one is built in, so should other. If neither is built in, this is also a viable match\n \t\t//If not equal and at least one is built in, its not a match.\n \t\tOWLDatatype dt1 = (OWLDatatype) o1.getDatatypesInSignature().toArray()[0];\n \t\t\tOWLDatatype dt2 = (OWLDatatype) o2.getDatatypesInSignature().toArray()[0];\n \t\t\t//System.out.println(\"DT1: \" + dt1);\n \t\t\t//System.out.println(\"DT2: \" + dt2);\n \t\tif(dt1.equals(dt2) && dt1.isBuiltIn())\n \t\t{\t\n \t\t\t//System.out.println(\"Standard state\");\n \t\t\t//System.out.println(o1.equals(o2));\n \t\t\treturn o1.equals(o2);\n \t\t}\n \t\telse if(!dt1.isBuiltIn() && !dt2.isBuiltIn())\n \t\t{\n \t\t\t//System.out.println(\"Unique state\");\n \t\t\treturn true;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t//System.out.println(\"Rejection state\");\n \t\t\treturn false;\n \t\t}\n \n \t}\n \telse\n \t{\n \t\treturn true;\n \t}\n }\n else\n {\n \treturn false;\n }\n }\n return false;\n }", "@Test\n\tpublic void testDeckEqualsAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", false, isSame);\n\t}", "public boolean hasSameSides(Property prop) {\n // this code provided by Dave Houtman [2020] personal communication\n return this.getXLength() == prop.getXLength() && this.getYWidth() == prop.getYWidth();\n }", "public static void main(String[] args) {\n Pair first = new Pair(\"Pesho\", \"Gosho\");\r\n Pair second = new Pair(\"Pesho\", \"Gosho\");\r\n Pair third = new Pair(\"Pesho\", \"Mariika\");\r\n \r\n System.out.println(first.equals(second));\r\n System.out.println(first.equals(third));\r\n }" ]
[ "0.6749787", "0.6714937", "0.65884763", "0.655669", "0.65106285", "0.6348506", "0.6274615", "0.6250004", "0.62475276", "0.62440646", "0.62258583", "0.6205136", "0.6188154", "0.6174038", "0.6162682", "0.6084542", "0.6021661", "0.59734887", "0.59526366", "0.5946615", "0.5920792", "0.5890185", "0.58887976", "0.586546", "0.5838612", "0.583487", "0.5833468", "0.57564175", "0.57517797", "0.5741912", "0.5739179", "0.57351536", "0.5734733", "0.5733556", "0.5731965", "0.5731897", "0.57293224", "0.5710224", "0.5710126", "0.57087576", "0.57044977", "0.57000023", "0.56911165", "0.56777453", "0.5663754", "0.5654932", "0.56449383", "0.56224805", "0.56193256", "0.5610773", "0.55953753", "0.55822086", "0.557493", "0.5574605", "0.5573722", "0.5567127", "0.556213", "0.55553555", "0.5554488", "0.5553453", "0.55509686", "0.5550667", "0.55494773", "0.5548978", "0.5545739", "0.5540811", "0.5539842", "0.55377245", "0.5537155", "0.5533846", "0.5531658", "0.55267817", "0.5523015", "0.55197763", "0.5519632", "0.5516154", "0.5515858", "0.5511469", "0.5509179", "0.5508094", "0.5506252", "0.55020493", "0.549416", "0.5491474", "0.54855627", "0.5484297", "0.54841185", "0.5480895", "0.5480603", "0.5478754", "0.5473618", "0.54681784", "0.5463792", "0.5462257", "0.54583204", "0.5454503", "0.54521346", "0.54424804", "0.5442076", "0.543803" ]
0.6289314
6
TODO Autogenerated method stub
public static void main(String[] args) { Scanner s=new Scanner(System.in); System.out.println("Enter the number of elements you want to store"); int n= s.nextInt(); int a[]=new int[10]; int i; System.out.println("Enter numbers"); for( i=0;i<=n;i++) { a[i]=s.nextInt(); } System.out.print("numbers are"); for(i=0;i<=n;i++) { System.out.println(a[i]); } }
{ "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
create class Student (name, age, course) implements Comparable create list of students
public static void main(String[] args) { List<Student> students = new ArrayList<>(); students.add(new Student(1, "Nazar", 24)); students.add(new Student(2, "Mykola", 17)); students.add(new Student(5, "Valentyn", 18)); students.add(new Student(4, "Oleg", 28)); students.add(new Student(3, "Maria", 20)); students.add(new Student(1, "Andriy", 44)); students.add(new Student(6, "Roman", 85)); // get iterator Iterator<Student> iterator = students.iterator(); while (iterator.hasNext()) { Student next = iterator.next(); System.out.println(next); } System.out.println(); // complex condition -> remove Iterator<Student> iterator2 = students.iterator(); while (iterator2.hasNext()) { Student next = iterator2.next(); if (next.getAge() > 30) { iterator2.remove(); } } System.out.println(); // Iterator<Student> iterator3 = students.iterator(); // // while(iterator3.hasNext()){ // Student next = iterator3.next(); // System.out.println(next); // } // foreach - show remove without iterator for (Student student : students) { if (student.getAge() > 30) { System.out.println(student); students.remove(student); } } System.out.println(); for (Student student : students) { System.out.println(student); } // fori - show how we can miss some objects for (int i = 0; i < students.size(); i++) { if (students.get(i).getAge() > 25) { students.remove(i); } } for (Student student : students) { System.out.println(student); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Student(String firstName, String lastName, int age, double gpa, String major, String department, List<Course> courses) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.gpa = gpa;\n this.major = major;\n this.department = department;\n this.courses = courses;\n }", "public static List<Student> getAllStudents(){\r\n Student student1 = new Student(\"Dowlath\",2,3.6,\"male\", Arrays.asList(\"Swim\",\"BasketBall\",\"VolleyBall\"),11);\r\n Student student2 = new Student(\"Bhavya\",2,3.8,\"female\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),12);\r\n\r\n\r\n /* 3rd Grade Students */\r\n Student student3 = new Student(\"Priya\",3,4.0,\"female\", Arrays.asList(\"Swim\",\"BasketBall\",\"Aerobics\"),10);\r\n Student student4 = new Student(\"Arsh\",3,3.9,\"male\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),9);\r\n\r\n\r\n /* 4th Grade Students */\r\n Student student5 = new Student(\"Sowmiya\",4,3.5,\"female\", Arrays.asList(\"Swim\",\"Dancing\",\"FootBall\"),15);\r\n Student student6 = new Student(\"Ariz\",4,3.9,\"male\",Arrays.asList(\"Swim\",\"BasketBall\",\"BaseBall\",\"FootBall\"),14);\r\n\r\n List<Student> students = Arrays.asList(student1,student2,student3,student4,student5,student6);\r\n return students;\r\n }", "@Test\n\n public void student_Givenstudentobject_shouldbesorted() {\n Student s1 = new Student(1, \"shivani\", 24);\n Student s2 = new Student(2, \"madhuri\", 25);\n Student s3 = new Student(3, \"neha\", 24);\n Student s4 = new Student(4, \"shivani\", 22);\n Student s5 = new Student(5, \"minal\", 20);\n // list of type students\n ArrayList<Student> al = new ArrayList<Student>();\n al.add(s1);\n al.add(s2);\n al.add(s3);\n al.add(s4);\n al.add(s5);\n // store all list elements in list\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n Collections.sort(al, new StudentSorter());\n System.out.println(\"\\nSorted list\");\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n }", "@Override\n public void addStudent(String firstName, String lastName, int age, Set<Course> courses) {}", "@Override\r\n\tpublic int compareTo(Student o) {\n\t\treturn this.name.compareTo(o.name);\r\n\t}", "public static void main(String[] args) {\n Student s1 = new Student(\"Azat\");\n Student s2 = new Student(\"Saida\");\n Student s3 = new Student(\"Adil\");\n Student s4 = new Student(\"Sabira\");\n Student s5 = new Student(\"Saniya\");\n\n\n List<Student> cybertekStudents = new ArrayList<>(Arrays.asList(s1, s2, s3, s4, s5));\n\n School cybertek = new School(\"Cybertek\", cybertekStudents);\n\n cybertekStudents.add(new Student(\"Denis\"));\n cybertekStudents.add(new Student(\"Irina\"));\n\n System.out.println(cybertek);\n System.out.println(cybertek.schoolName);\n System.out.println(cybertek.allStudentsList);\n\n Student[] students = {new Student(\"Gulnaz\"),\n new Student(\"Sardar\")};\n cybertek.addNewStudent(students);\n System.out.println(cybertek.allStudentsList);\n\n for (Student each : cybertekStudents) {\n System.out.println(each.studentName);\n //347-785-9417 munavvar\n //donna fro Wic, how she is share info 718 616 4338\n\n\n }\n }", "public static void main(String[] args){\n\n List<Student> arrList = new ArrayList<>(); // arraylist of our own class type\n arrList.add(new Student(111, \"bbb\", \"London\"));\n arrList.add(new Student(222,\"aaa\", \"nyc\"));\n arrList.add(new Student(333, \"ccc\", \"Jaipur\"));\n\n System.out.println(\"Unsorted list : \");\n for (Student student : arrList)\n System.out.println(student);\n\n // Sort the arrayList based on roll no\n Collections.sort(arrList, new Sortbyroll());\n\n System.out.println(\"Sorted by rollNo : \");\n for(Student student : arrList)\n System.out.println(student);\n\n // Sort the arrayList based on name\n Collections.sort(arrList, new Sortbyname());\n\n System.out.println(\"Sorted by name : \");\n for (int i=0; i<arrList.size(); i++)\n System.out.println(arrList.get(i));\n }", "public College()\r\n {\r\n students = new ArrayList<Student>();\r\n }", "public Student(String name, String gender, String email){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = new Course();\n this.course2 = new Course();\n this.course3 = new Course();\n }", "Student(String name) {\n\t\tthis.name = name;\n\t\tregisteredCourses = new Course[30];\n\t}", "@Test\n public void testCompareTo() throws ParseException {\n System.out.println(\"compareTo\");\n \n Student instance = new Student(9, \"Gabriela\", \"04567888\", \"[email protected]\", 8, \"start Street\", \"SouthWest\", \"SA\", \"5089\", \"Cert4\", new SimpleDateFormat(\"mm/dd/yyyy\").parse(\"10/17/2009\"), new SimpleDateFormat(\"mm/dd/yyyy\").parse(\"10/17/2009\"), \"1\", \"Awaited\", new Course(\"Cert4\", \"Certificate 4\", 250));\n int expResult = 0;\n int result = instance.compareTo(student);\n assertEquals(expResult, result);\n \n }", "List<Student> getStudent();", "@Override\n public List<Student> getStudentsByCourse(Course course) {\n return null;\n }", "public Student(String name, int age, char gender, int year, String course) {\r\n\t\tthis.name = name;\r\n\t\tthis.age = age;\r\n\t\tthis.gender = gender;\r\n\t\tthis.year = year;\r\n\t\tthis.course = course;\r\n\t}", "public static void main(String[] args) {\n ArrayList<Course> courses = new ArrayList<>();\n courses.add(new Course(\"Math\", \"12030\"));\n courses.add(new Course(\"English\", \"46537\"));\n courses.add(new Course(\"Programming\", \"64537\"));\n\n ArrayList<Teacher> teachers = new ArrayList<>();\n teachers.add(new Teacher(\"Albert\", \"Einstein\", \"[email protected]\", \"1\"));\n teachers.add(new Teacher(\"Nikola\", \"Tesla\", \"[email protected]\", \"2\"));\n teachers.add(new Teacher(\"Ada\", \"Lovelace\", \"[email protected]\", \"3\"));\n teachers.add(new Teacher(\"Charles\", \"Babbage\", \"[email protected]\", \"4\"));\n\n courses.get(0).getTaughtBy().add(teachers.get(1));\n courses.get(0).getTaughtBy().add(teachers.get(2));\n courses.get(1).getTaughtBy().add(teachers.get(0));\n courses.get(1).getTaughtBy().add(teachers.get(1));\n courses.get(2).getTaughtBy().add(teachers.get(2));\n\n\n\n ArrayList<Student> students = new ArrayList<>();\n students.add(new Student(\"Irina\", \"Smirnova\", \"[email protected]\", \"245\"));\n students.add(new Student(\"Andrey\", \"Smirnov\", \"[email protected]\", \"249\"));\n students.add(new Student(\"Galina\", \"Kutarina\", \"[email protected]\", \"246\"));\n\n courses.get(0).getTakenBy().add(students.get(1));\n courses.get(0).getTakenBy().add(students.get(2));\n courses.get(1).getTakenBy().add(students.get(1));\n courses.get(2).getTakenBy().add(students.get(0));\n\n\n listCourses(courses);\n // listTeachers(teachers);\n// listStudents(students);\n\n\n\n }", "public ArrayList<Studentdto> coursewiseStudent(String course) throws Exception {\n\t\tConnection con = null;\n\t\tcon = DBConnector.dbConnection();\n\t\tArrayList<Studentdto> coursewise = new ArrayList<Studentdto>();\n\t\ttry {\n\t\t\tPreparedStatement st = con.prepareStatement(\n\t\t\t\t\t\"select student_name,college_name,course_name,phn_no,address from student s ,college co,course cr where s.college_id=co.college_id and s.course_id =(select course_id from course where course_name=?) and cr.course_name=?\");\n\t\t\tst.setString(1, course);\n\t\t\tst.setString(2, course);\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\tint i = 1;\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudentdto studentdto = new Studentdto();\n\t\t\t\tstudentdto.setSlno(i++);\n\t\t\t\tstudentdto.setStudentname(rs.getString(1));\n\t\t\t\tstudentdto.setCollegename(rs.getString(2));\n\t\t\t\tstudentdto.setCoursename(rs.getString(3));\n\t\t\t\tstudentdto.setAddress(rs.getString(4));\n\t\t\t\tstudentdto.setPhno(rs.getString(5));\n\t\t\t\tcoursewise.add(studentdto);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (SQLSyntaxErrorException e) {\n\t\t\tthrow new SQLSyntaxErrorException(\"Error in SQL syntax\");\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Connection with database failed\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Some error occured\");\n\t\t}\n\n\t\treturn coursewise;\n\t}", "Student4(int i, String n, int t) {\n id = i;\n name = n;\n age = t;\n\n }", "@Override\n\tpublic int compareTo(Student o) {\n\t\treturn NATURAL_COMPARATOR.compare(this, o);\t\t\n\t}", "@Override\r\n public int compareTo(Student stud) \r\n {\r\n Student s = (Student) stud;\r\n return studentId - s.studentId;\r\n }", "public void add(Student s1){\r\n // add student object to list\r\n this.studentList.add(s1);\r\n // then sort list\r\n Collections.sort(this.studentList);\r\n }", "public ArrayList<Student> getStudentsForCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n String statement = GET_SUDENTS_FOR_COURSE;\n \n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n \n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsForCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n \n return result;\n }", "public Student(int id, String name, String course) {\n this.id = id;\n this.name = name;\n this.course = course;\n }", "public Student(String name, Integer age) {\n\n this.name = name;\n this.age = age;\n }", "@Override\n\tpublic int compareTo(Students o) {\n\t\tint tem = this.getAll() - o.getAll();\n\t\tint tem1 = (tem == 0) ? this.getCh() - o.getCh() : tem;\n\t\tint tem2 = (tem1 == 0) ? this.getMath() - o.getMath() : tem1;\n\t\tint tem3 = (tem2 == 0) ? this.getEng() - o.getEng() : tem2;\n\t\tint tem4 = (tem3 == 0) ? this.getName().compareTo(o.getName()) : tem3;\n\t\treturn -tem4;\n\t}", "@Override\n public int compare(Student o1, Student o2) {\n return o1.name.compareTo(o2.name);\n }", "public Student(String name, String gender, String email, Course course1, \n Course course2, Course course3){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = course1;\n this.course2 = course2;\n this.course3 = course3;\n }", "public static void main(String[] args) {\n\t\tStudent ivan = new Student(\"Ivan Petrov\", \"Computer Science\");\n\t\tivan.grade=5.5;\n\t\tivan.yearInCollege=2;\n\t\tivan.money=500;\n\t\tivan.age=19;\n\t\t\n\t\tStudent teodor = new Student(\"Teodor Alexiev\", \"Computer Science\");\n\t\tteodor.grade=5.25;\n\t\tteodor.yearInCollege=3;\n\t\tteodor.money=300;\n\t\tteodor.age=20;\n\t\t\n\t\tStudent irina = new Student(\"Irina Paraskelova\", \"Computer Science\");\n\t\tirina.grade = 5.65;\n\t\tirina.money=400;\n\t\tirina.age=18;\n\t\t\n\t\tStudent vasilena = new Student (\"Vasilena Kremenlieva\", \"Computer Science\");\n\t\tvasilena.grade = 5.0;\n\t\tvasilena.money=1000;\n\t\tvasilena.age=18;\n\t\t\n\t\tStudent trifon = new Student(\"Trifon Stoimenov\", \"Computer Science\");\n\t\ttrifon.grade = 5.70;\n\t\ttrifon.yearInCollege=3;\n\t\ttrifon.money = 800;\n\t\ttrifon.age=21;\n\t\t\n\t\tStudent alexander = new Student (\"Alexander Dobrikov\", \"Finance\");\n\t\talexander.grade = 4.75;\n\t\talexander.yearInCollege = 2;\n\t\talexander.money = 600;\n\t\talexander.age = 20;\n\t\t\n\t\tStudent mirela = new Student (\"Mirela Kostadinova\", \"Finance\");\n\t\tmirela.grade = 5.5;\n\t\tmirela.yearInCollege=1;\n\t\tmirela.money=100;\n\t\tmirela.age=19;\n\t\t\n\t\tStudent velizar = new Student(\"Velizar Stoyanov\", \"Finance\");\n\t\tvelizar.grade = 6.0;\n\t\tvelizar.yearInCollege = 3;\n\t\tvelizar.money = 500;\n\t\tvelizar.age = 22;\n\t\t\n\t\tStudent antoaneta = new Student(\"Antoaneta Borisova\", \"Finance\");\n\t\tantoaneta.grade = 5.30;\n\t\tantoaneta.yearInCollege = 2;\n\t\tantoaneta.money = 750;\n\t\tantoaneta.age = 19;\n\t\t\n\t\tirina.upYear();\n\t\tSystem.out.println(\"Irina is in year \"+irina.yearInCollege+\" of college.\");\n\t\t\n\t\tvasilena.receiveScholarship(5.0, 350);\n\t\tSystem.out.println(vasilena.money);\n\t\t\n\t\tStudentGroup cs1 = new StudentGroup(\"Computer Science\");\n\t\tcs1.addStudent(ivan);\n\t\tcs1.addStudent(teodor);\n\t\tcs1.addStudent(irina);\n\t\tcs1.addStudent(vasilena);\n\t\tcs1.addStudent(trifon);\n\t\tteodor.upYear();\n\t\tSystem.out.println(teodor.isDegree);\n\t\t\n\t\tcs1.addStudent(velizar);\n\t\t\n\t\tcs1.printStudentsInGroup();\n\t\tSystem.out.println(cs1.theBestStudent());\n\t\t\n\t\tcs1.emptyGroup();\n\t\tcs1.printStudentsInGroup();\n\t\t\n\t\tStudentGroup fin1 = new StudentGroup(\"Finance\");\n\t\t\n\t\tfin1.addStudent(alexander);\n\t\tfin1.addStudent(mirela);\n\t\tfin1.addStudent(velizar);\n\t\tfin1.addStudent(antoaneta);\n\t\t\n\t\tfin1.printStudentsInGroup();\n\t\t\t\n\t\t\n\t}", "public void testCompareTo() throws Exception {\r\n setUp();\r\n Student allison = new Student(\"0\", \"Allison\", \"DeSantis\");\r\n Student alli = new Student(\"0\", \"Aaa\", \"DeSantis\");\r\n\r\n // same last name, returns 1\r\n assertEquals(allison.compareTo(alli), 1);\r\n\r\n // same last name, returns -1\r\n Student al = new Student(\"0\", \"z\", \"DeSantis\");\r\n assertEquals(allison.compareTo(al), -1);\r\n\r\n // same name\r\n Student allis = new Student(\"0\", \"Allison\", \"DeSantis\");\r\n assertEquals(allison.compareTo(allis), 0);\r\n\r\n // same first name, returns 1\r\n Student last = new Student(\"0\", \"Allison\", \"c\");\r\n assertEquals(allison.compareTo(last), 1);\r\n\r\n // same first name, returns -1\r\n Student diff = new Student(\"0\", \"Allison\", \"Z\");\r\n assertEquals(allison.compareTo(diff), -1);\r\n\r\n\r\n Student c1 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n Student c2 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n\r\n assertEquals(c1.compareTo(c2), 0);\r\n\r\n assertEquals(c2.compareTo(c1), 0);\r\n\r\n Student c3 = new Student(\"0\", \"Colleen\", \"Schmidt\");\r\n assertEquals(c1.compareTo(c3), 0);\r\n }", "public Student(Name name, Phone phone, Email email, Address address, Set<Tag> tags, List<Subject> subjects) {\n super(name, phone, email, address, tags);\n subjectList = new ArrayList<>(subjects);\n }", "public static void main(String[] args){\n\t\tPersonalData data1= new PersonalData(1982,01,11,234567890);\n\t\tPersonalData data2= new PersonalData(1992,10,19,876543210);\n\t\tPersonalData data3= new PersonalData(1989,04,27,928374650);\n\t\tPersonalData data4= new PersonalData(1993,07,05,819463750);\n\t\tPersonalData data5= new PersonalData(1990,11,03,321678950);\n\t\tPersonalData data6= new PersonalData(1991,11,11,463728190);\n\t\tStudent student1=new Student(\"Ali Cantolu\",5005,50,data1);\n\t\tStudent student2=new Student(\"Merve Alaca\",1234,60,data2);\n\t\tStudent student3=new Student(\"Gizem Kanca\",5678,70,data3);\n\t\tStudent student4=new Student(\"Emel Bozdere\",8902,70,data4);\n\t\tStudent student5=new Student(\"Merter Kazan\",3458,80,data5);\n\n\t\t//A course (let us call it CSE141) with a capacity of 3 is created\n\t\tCourse CSE141=new Course(\"CSE141\",3);\n\n\t\t//Any 4 of the students is added to CSE141.\n\t\tif (!CSE141.addStudent(student1)) System.out.println(student1.toString()+ \" is not added\");\n\t\tif (!CSE141.addStudent(student2)) System.out.println(student2.toString()+ \" is not added\");\n\t\tif (!CSE141.addStudent(student3)) System.out.println(student3.toString()+ \" is not added\");\n\t\tif (!CSE141.addStudent(student4)) System.out.println(student4.toString()+ \" is not added\");\n\n\n\t\t//All students of CSE141 are printed on the screen.\n System.out.println(\"\\nAll students of \"+CSE141.getCourseName()+\": \");\n CSE141.list();\n\n //The capacity of CSE141 is increased.\n CSE141.increaseCapacity();\n\n //Remaining 2 students are added to CSE141.\n\t \tCSE141.addStudent(student4);\n\t \tCSE141.addStudent(student5);\n\n\t \t//All students of CSE141 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE141.getCourseName()+\": \");\n\t \tCSE141.list();\n\n\t \t//Student with ID 5005 is dropped from CSE141.\n\t \tCSE141.dropStudent(student1);\n\n\t \t//All students of CSE141 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE141.getCourseName()+\": \");\n\t \tCSE141.list();\n\n\t \t//Number of students enrolled to CSE141 is printed.\n\t \tSystem.out.println(\"\\nNumber of students enrolled to \"+CSE141.getCourseName()+\": \" + CSE141.getNumberOfStudents());\n\n\t \t//Birth year of best student of CSE141 is printed on the screen. (You should use getYear() method of java.util.Date class.)\n\t \tSystem.out.println(\"\\nBirth year of best student of CSE141 is \"+CSE141.getBestStudent().getPersonalData().getBirthDate().getYear());\n\n\t \t//A new course (let us call it CSE142) is created.\n\t \tCourse CSE142=new Course(\"CSE142\");\n\n\t \t//All students currently enrolled in CSE141 are added to CSE142. (You should use getStudents() method).\n\t \tStudent[] students = CSE141.getStudents();\n\t \tfor(int i=0;i<CSE141.getNumberOfStudents();i++)\n\t \t\tCSE142.addStudent(students[i]);\n\n\t \t//All students of CSE141 are removed from the course.\n\t \tCSE141.clear();\n\n\t \t//Student with ID 5005 is dropped from CSE141 and result of the operation is printed on the screen.\n\t \tSystem.out.println(\"\\nThe result of the operation 'Student with ID 5005 is dropped from \"+CSE141.getCourseName()+\"' is: \"+CSE141.dropStudent(student1));\n\n\t \t//All students of CSE142 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE142.getCourseName()+\": \");\n\t \tCSE142.list();\n\n\t \t//Best student of CSE142 is dropped from CSE142.\n\t \tCSE142.dropStudent(CSE142.getBestStudent());\n\n\t \t//All students of CSE142 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE142.getCourseName()+\": \");\n\t \tCSE142.list();\n\n\t \t//GPA of youngest student of CSE142 is printed on the screen.\n\t\tSystem.out.println(\"\\nThe Youngest Student's (\"+CSE142.getYoungestStudent()+\") GPA is \"+CSE142.getYoungestStudent().GPA());\n\n\t \t//Courses CSE141 and CSE142 are printed on the screen.\n\t \tSystem.out.println(\"\\nCourse Information for \"+CSE141.getCourseName()+\":\\n\" + CSE141.toString());\n\t \tSystem.out.println(\"\\nCourse Information for \"+CSE142.getCourseName()+\":\\n\" + CSE142.toString());\n\t }", "public List <Student> getAllStudents();", "@Override\n\tpublic List<Student> sortedStudent(List<Student> student) {\n\t\tCollections.sort(student, new MarksComparator());\n\t\treturn student;\n\t}", "public ArrayList getStudents();", "public static void main(String[] args) {\n\t\tstudentList obj1 = new studentList(101, \"James Henry\", \"1042 Northcut Way\");\r\n\t\tstudentList obj2 = new studentList(102, \"Frank Peterson\", \"942 James Cv\");\r\n\t\tstudentList obj3 = new studentList(103, \"Kyle Smith\", \"1502 Diana Dr\");\r\n\t\tstudentList obj4 = new studentList(104, \"Paco Suarez\", \"221 Risinger Pl\");\r\n\t\tstudentList obj5 = new studentList(105, \"Hillary Butler\", \"712 Rainbow Rd\");\r\n\t\tstudentList obj6 = new studentList(106, \"Susan Sanchez\", \"1245 Killaminjaro\");\r\n\t\tstudentList obj7 = new studentList(107, \"Peter Griffin\", \"999 Chowder St\");\r\n\t\tstudentList obj8 = new studentList(108, \"Nancy Hourglass\", \"758 Clanky Ave\");\r\n\t\tstudentList obj9 = new studentList(109, \"Luis Gonzales\", \"1236 Burnet Rd\");\r\n\t\tstudentList obj10 = new studentList(110, \"Bob Jacket\", \"494 St. Peters Blvd\");\r\n\t\t\r\n\t\t// Creating the ArrayList\r\n\t\tArrayList<studentList> list = new ArrayList<studentList>();\r\n\t\t\r\n\t\t// Add the objects to the ArrayList\r\n\t\tlist.add(obj1);\r\n\t\tlist.add(obj2);\r\n\t\tlist.add(obj3);\r\n\t\tlist.add(obj4);\r\n\t\tlist.add(obj5);\r\n\t\tlist.add(obj6);\r\n\t\tlist.add(obj7);\r\n\t\tlist.add(obj8);\r\n\t\tlist.add(obj9);\r\n\t\tlist.add(obj10);\r\n\t\t\r\n\t\t// Creating an additional line for cohesion\r\n\t\tSystem.out.println(\"---------------------------------\");\r\n\t\t\r\n\t\t// Creating the for loop to display all the information\r\n\t\tfor (studentList ob : list) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Student Number: \" + ob.rollNo);\r\n\t\t\tSystem.out.println(\"Student Name: \" + ob.name);\r\n\t\t\tSystem.out.println(\"Student Address: \" + ob.address);\r\n\t\t\tSystem.out.println(\"---------------------------------\");\r\n\t\t}\r\n\t\t\r\n\t}", "public Student(String name, String address, String facNumber) {\r\n super(name, address);\r\n this.facultyNumber = facNumber;\r\n courses = new HashMap<String, Double>();\r\n }", "public Course(String courseName) {\n studentList = new ArrayList<Student>(MAXSTUDENT);\n this.courseName = courseName;\n studentCount = 0;\n }", "@Override\n\tpublic int compareTo(StudentBean arg0) {\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tList<Student> students = new ArrayList<>();\r\n\t\t\r\n\t\tstudents.add(new Student(23, \"Aryan\"));\r\n\t\tstudents.add(new Student(23, \"Jeet\"));\r\n\t\tstudents.add(new Student(83, \"Dhruv\"));\r\n\t\tstudents.add(new Student(13, \"Amit\"));\r\n\t\tstudents.add(new Student(65, \"Aditya\"));\r\n\t\tstudents.add(new Student(57, \"Jeet\"));\r\n\t\t\r\n//\t\tCollections.sort(students);\r\n\t\t\r\n//\t\tCollections.sort(students, new SortByNameThenMarks());\t// We passed our own comparator object.\r\n\t\t\r\n\t\t// We can have our own anonymous comparator without making a class. We can do that so by doing the following:\r\n\t\t\r\n//\t\tCollections.sort(students, new Comparator<Student>() {\r\n//\r\n//\t\t\t@Override\r\n//\t\t\tpublic int compare(Student obj1, Student obj2) {\r\n//\t\t\t\tif(obj1.name.equals(obj2)) return obj1.marks - obj2.marks;\r\n//\t\t\t\treturn obj1.name.compareTo(obj2.name);\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t});\r\n\t\t\r\n\t\t// With the help of Lambda we could cut short the lines but we have to mention the sign \"->\".\r\n//\t\tCollections.sort(students,(Student obj1, Student obj2) -> {\r\n\t\t\r\n//\t\tCollections.sort(students,(obj1, obj2) -> {\r\n//\t\t\t\tif(obj1.name.equals(obj2)) return obj1.marks - obj2.marks;\r\n//\t\t\t\treturn obj1.name.compareTo(obj2.name);\r\n//\t\t\t});\r\n\t\t\r\n//\t\tCollections.sort(students, (obj1, obj2) -> obj1.name.compareTo(obj2.name));\r\n\t\t\r\n//\tThe comparator SortByNameThenMarks can be written in one line as follows. Also \".reversed()\" is used to reverse the order of comparison.\r\n\t\tCollections.sort(students, Comparator.comparing(Student::getName).thenComparing(Student::getMarks).reversed());\r\n\t\t\r\n\t\tstudents.forEach(System.out::println);\t// This is lambda expression to print \r\n\t}", "Student4(int i, String n) {\n id = i;\n name = n;\n\n }", "int compareTo(Student s){\n\n if(cgpa.compareTo(s.cgpa)!=0)\n return -(cgpa.compareTo(s.cgpa)); //Sort in descending order according to cgpa\n\n else{\n\n // if cgpa of both student is same\n if(name.compareTo(s.name)!=0)\n return (name.compareTo(s.name)); //sort in ascending order according to name\n\n else{\n // if name of both sudents are same\n return (token.compareTo(s.token)); //sort in ascending order according to token\n }\n\n }\n\n }", "List<Student> getAllStudents();", "public static void main(String[] args) {\n\n Set<Student> set = Sets.newTreeSet();\n Student s3 = new Student(3);\n Student s4 = new Student(4);\n Student s5 = new Student(5);\n Student s1 = new Student(1);\n Student s2 = new Student(2);\n List<Student> list = Lists.newArrayList();\n list.add(s4);\n list.add(s3);\n list.add(s5);\n list.add(s1);\n list.add(s2);\n\n list.sort(new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n return o1.getAge() - o2.getAge() < 0 ? 1 : -1;\n }\n });\n System.out.println(list);\n\n// s1.toString();\n// set.add(s3);\n// set.add(s4);\n// set.add(s5);\n// set.add(s1);\n// set.add(s2);\n// System.out.println(set);\n// for (Student s : set) {\n// System.out.println(s);\n// }\n\n\n }", "@Override\r\n\tpublic int compare(Student s1,Student s2) {\n\t\t\r\n\t\t\r\n\t\treturn s1.name.compareTo(s2.name);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public int compareTo(Student other) {\n double compareCgpa = this.cgpa - other.cgpa;\n if (compareCgpa > 0) return -1;\n else if (compareCgpa < 0) return 1;\n\n // Sort Students by name in ascending order.\n int compareName = this.name.compareTo(other.name);\n if (compareName > 0) return 1;\n else if (compareName < 0) return -1;\n\n // Sort Students by id in ascending order.\n return this.id > other.id ? 1 : -1;\n }", "@Override\r\n\t public int compare(Student_UsingComparator obj1, Student_UsingComparator obj2){\n\t\t return obj2.rollno-obj1.rollno;\r\n\t }", "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public Student ( int rollno, String name, String course ) {\n\t\tthis.rollno = rollno;\n\t\tthis.name = name;\n\t\tthis.course = course;\n\t}", "public studentList(int rollNo, String name, String address) {\r\n\t\t\r\n\t\tthis.rollNo = rollNo;\r\n\t\tthis.name = name;\r\n\t\tthis.address = address;\r\n\t\t\r\n\t}", "@Override\r\n\tpublic int compareTo(Student o) throws NullPointerException{\r\n\t\tString name1 = this.getName().toLowerCase();\r\n\t\tString name2 = o.getName().toLowerCase();\r\n\t\treturn name1.compareTo(name2);\r\n\t}", "private static List<Student> getStudents() {\n \t\n List<Student> studentList = new ArrayList<>();\n Scanner readStudents=null;\n try {\n\t\t\treadStudents = new Scanner(new File(\"src/Student.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Student file not found.\");\n\t\t}\n\t\twhile(readStudents.hasNextLine()) {\n\t\t\tString[] studentLine = readStudents.nextLine().split(\",\");\n\t\t\tlong studentId= Long.parseLong(studentLine[0]);\n\t\t\tint age = Integer.parseInt(studentLine[4]);\n\t\t\tlong recordId = Long.parseLong(studentLine[5]);\n \tStudent newStudent = new Student(studentId,age,studentLine[1],studentLine[2],studentLine[3],recordId);\n \tstudentList.add(newStudent);\n\t\t}\n \n readStudents.close();\n return studentList;\n }", "public Student(String fname, String lname, int age, String coll, String maj, double grade) {\n super(fname, lname, age);\n college = coll;\n major = maj;\n gpa = grade;\n }", "@Override\n\tpublic int compareTo(Student o) {\n\t\treturn this.score - o.score;\n\t\t\n\t}", "Student(String name){\n this.name = name;\n }", "public Student(Name name, Phone phone, Email email, Address address, Set<Tag> tags) {\n super(name, phone, email, address, tags);\n subjectList = new ArrayList<>();\n }", "Student(String n, int age, String i,Student ref)\n\t{\n\t\tthis.name=n;\n\t\tthis.age=age;\n\t\tthis.id=i;\n\t\tthis.next=ref;\n\t}", "@Override\n\tpublic int compareTo(Object o) {\n\t\tif(o instanceof Student){\n\t\t\tStudent tmp = (Student)o;\n\t\t\treturn tmp.total = this.total;\n\t\t}else{\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic int compareTo(Student o) \n\t{\n\t\treturn o.average - average;\n\t}", "public StudentRecord(Student s, Department dep, Degree deg, Term tb, List<Professor> a, List<Professor> c,\r\n List<CourseTaken> ct, List<String> n){\r\n student = s;\r\n department = dep;\r\n degreeSought = deg;\r\n termBegan = tb;\r\n advisors = a;\r\n committee = c;\r\n coursesTaken = ct;\r\n notes = n;\r\n }", "public Student(String firstName, String lastName, int age, int number) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.studentNumber = number;\n this.grades = new int[0];\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tArrayList<Student2> studs = new ArrayList<>();\r\n\t\tstuds.add(new Student2(6,\"neena\"));\r\n\t\tstuds.add(new Student2(1,\"nimmy\"));\r\n\t\tstuds.add(new Student2(4,\"cookie\"));\r\n\t\t\r\n\t\tCollections.sort(studs);\r\n\t\t\r\n\t\tfor(Student2 s : studs) {\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\r\n\t}", "public Course()\n\t{\n\t\tstudents = new Student[30];\n\t\tnumStudents = 0;\n\t}", "public Student(Integer age) {\n\n this.age = age;\n }", "@Override\r\n\tpublic List<Student> getStudents(String courseName) {\n\t\tList<Student> students=new ArrayList<>();\r\n\t\tString sql=\"select studentid, studentname, studentshv.courseid from studentshv inner join courseshv on studentshv.courseid=courseshv.courseid where coursename=?\";\r\n\t\tPreparedStatement pstmt = null;\r\n\t\ttry {\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setString(1, courseName);\r\n\t\t\tResultSet rs=pstmt.executeQuery();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tlong studentId=rs.getLong(\"studentid\");\r\n\t\t\t\tString studentName=rs.getString(\"studentname\");\r\n\t\t\t\tlong courseId=rs.getLong(\"courseid\");\r\n\t\t\t\tstudents.add(new Student(studentId,studentName,courseId));\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn students;\r\n\t}", "public ArrayList makeStudentList() {\r\n ArrayList<String> studenter = new ArrayList();\r\n Student student = new Student();\r\n \r\n \r\n \r\n return studenter;\r\n}", "Student(int i, String n) {\n id = i;\n name = n;\n }", "java.util.List<com.demo.springprotobuff.Demoproto.Student> getStudentList();", "public String getStudentList()\n\t{\n\t\tString courseOutput = \"\";\n\t\tint studentNum = 1;\n\t\t\n\t\tfor(Student student: classRoll)\n\t\t{\n\t\t\tcourseOutput += studentNum + \". \" + student + \"\\n\";\t\n\t\t\t\t//adds a Student to the already created string one student at a time\n\t\t\tstudentNum++;\n\t\t}\n\t\t\n\t\tcourseOutput = getCourseName() + getCourseNumber() + getInstructor() + courseOutput;\n\t\treturn courseOutput;\n\t}", "public static void main(String[] args) {\n Course course1 = new Course(\"Data Structures\");\n Course course2 = new Course(\"Database Systems\");\n\n course1.addStudent(\"Deniz Salman\");\n course1.addStudent(\"Ahmet Kaya\");\n course1.addStudent(\"Neşet Ertaş\");\n\n course2.addStudent(\"Mahir Çayan\");\n course2.addStudent(\"İbrahim Kayapakkaya\");\n\n course1.dropStudent(\"Deniz Salman\");\n System.out.println(\"Number of students in course1: \" + course1.numberOfStudents());\n System.out.println(course1.getStudents());\n\n System.out.println(\"Number of students in course2: \" + course2.numberOfStudents());\n System.out.println(course2.getStudents());\n\n }", "public StudentList() {\r\n\t\t\r\n\t\tlist = new Student[GROW_SIZE];\r\n\t}", "private void CreateStudentList() {\r\n\t\tStudentList=new ArrayList<Student>();\t\r\n}", "public static void main(String[] args) {\n\t\tHuman humanOne = new Human(\"Konovalov\", \"Anton\", 1991, true);\r\n\r\n\t\tStudent studentOne = new Student(\"One\", \"Arst\", 1992, true, \"It\", 3);\r\n\t\tStudent studentTho = new Student(\"Tho\", \"Adsart\", 1993, true, \"It\", 3);\r\n\t\tStudent studentThree = new Student(\"Three\", \"Adrt\", 1994, true, \"It\", 3);\r\n\t\tStudent studentFour = new Student(\"Four\", \"Agfrt\", 1995, true, \"It\", 3);\r\n\t\tStudent studentFive = new Student(\"Five\", \"Asrt\", 1996, true, \"It\", 3);\r\n\t\tStudent studentSix = new Student(\"Six\", \"Arrt\", 1997, false, \"It\", 3);\r\n\t\tStudent studentSeven = new Student(\"Seven\", \"Aeqrt\", 1998, true, \"It\", 3);\r\n\t\tStudent studentEight = new Student(\"Eight\", \"Aeqwrt\", 1999, true, \"It\", 3);\r\n\t\tStudent studentNine = new Student(\"Nine\", \"Areqt\", 1992, false, \"It\", 3);\r\n\t\tStudent studentTen = new Student(\"Ten\", \"Aeqrt\", 1993, true, \"It\", 3);\r\n\t\tStudent studentEleven = new Student(\"Eleven\", \"Aehrt\", 1991, true, \"It\", 3);\r\n\r\n\t\tGroup group = new Group();\r\n\t\ttry {\r\n\t\t\tgroup.add(studentOne);\r\n\t\t\tgroup.add(studentTho);\r\n\t\t\tgroup.add(studentThree);\r\n\t\t\tgroup.add(studentFour);\r\n\t\t\tgroup.add(studentFive);\r\n\t\t\tgroup.add(studentSix);\r\n\t\t\tgroup.add(studentSeven);\r\n\t\t\tgroup.add(studentEight);\r\n\t\t\tgroup.add(studentNine);\r\n\t\t\t// group.add(studentTen);\r\n\t\t\t// group.add(studentEleven);\r\n\t\t\t//group.addNewStudent();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error, more than 10 can not be created\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n//\t\tSystem.out.println(group);\r\n//\t\tgroup.sort();\r\n//\t\tSystem.out.println(group);\r\n//\t\t\r\n//\t\tStudent [] arrayStudentArmy= group.goToArmy(group);\r\n//\t\tfor (Student student : arrayStudentArmy) {\r\n//\t\t\tSystem.out.println(student);\r\n//\t\t}\r\n\t\t\r\n\t\tgroup.fileSave();\r\n\t\t\r\n\t\tGroup groupFromFile=new Group();\r\n\t\tgroupFromFile.newGroupStudent();\r\n\t\tSystem.out.println(groupFromFile);\r\n\t\r\n\r\n\t}", "@Override\n\tpublic int compare(Student o1, Student o2) {\n\n\t\treturn o1.getStudentNo().compareTo(o2.getStudentNo());\n\t}", "@Override\n\tpublic int compare(Student s1, Student s2) {\n\t\tif(s1.grade>s2.grade) {\n\t\t\treturn 1;\n\t\t}\n\t\tif(s1.grade<s2.grade) {\n\t\t\treturn -1;\n\t\t}\n\t\tif(s1.grade==s2.grade) {\n\t\t\treturn s1.name.compareTo(s2.name);\n\t\t}\n\t\treturn 0;\n\t\t\n\t}", "public static List<Student> getStudents() {\n\t\tList<Student> students = new ArrayList<>();\n\t\t\n\t\t// add sample data\n\t\tstudents.add(new Student(\"James\", \"Richt\", \"[email protected]\"));\n\t\tstudents.add(new Student(\"Kelly\", \"Lou\", \"[email protected]\"));\n\t\tstudents.add(new Student(\"Lin\", \"Howe\", \"[email protected]\"));\n\t\t\n\t\t// return the list\n\t\treturn students;\n\t}", "public static void main (String [] args) {\n Address school = new Address(\"800 Lancaster Ave.\", \"Villanova\",\n \"PA\", 19085);\n //create home address objects for a number of students\n Address home1 = new Address(\"21 Jump Street\", \"Blacksburg\",\n \"VA\", 24551);\n Address home2 = new Address(\"123 Main Street\", \"Euclid\", \"OH\", \n 44132);\n Address home3 = new Address(\"5248 Fortress Circle\", \"Valdosta\",\n \"GA\", 31605);\n Address home4 = new Address(\"505 Cedar Drive\", \"Nashville\",\n \"GA\", 31639);\n //create students\n Student student1 = new Student(\"Rick\",\"Sanchez\",home1,school,99,100,97,94);\n Student student2 = new Student(\"Morty\",\"Smith\" ,home2,school,14,28,37,55); \n Student student3 = new Student(\"Zach\",\"Spencer\",home3,school,98,89,86,95);\n Student student4 = new Student(\"Arron\",\"Croft\" ,home4,school,84,99,90,75);\n //create a CS1301 A course\n Course cs1301A = new Course(\"CS1301 A\");\n //create a CS1301 B course\n Course cs1301B = new Course(\"CS1301 B\"); \n //assign some students to CS1301 A\n cs1301A.addStudent(student1);\n cs1301A.addStudent(student2);\n //assign some students to CS1301 B\n cs1301B.addStudent(student3); \n cs1301B.addStudent(student4);\n //get the averages of the 2 courses\n System.out.println(\"*** Averages of CS1301 Courses ***\");\n System.out.println(\"CS1301 A: \"+cs1301A.average());\n System.out.println(\"CS1301 B: \"+cs1301B.average());\n //display the roll for the 2 courses\n System.out.println(\"\\n*** Roll Call ***\");\n cs1301A.roll();\n cs1301B.roll(); \n }", "public Student(){}", "@Override\n\t\tpublic int compareTo(student that) {\n\t\t\treturn that.gpa - this.gpa;\n\t\t}", "public Subject(String code, String name, int semester, int yearOfStuding, Professor professor,\n\t\t\tArrayList<Student> students) {\n\t\tsuper();\n\t\tthis.code = code;\n\t\tthis.name = name;\n\t\tthis.semester = semester;\n\t\tthis.yearOfStuding = yearOfStuding;\n\t\tthis.professor = professor;\n\t\tthis.students = students;\n\t}", "public static Student[] sortScore( Student s[]){\n\t\tStudent temp ;\r\n\t\tfor(int i=0; i<s.length; i++){\r\n\t\t\tfor(int j=i+1; j<s.length;j++)\r\n\t\t\t\tif(s[i].score > s[j].score){\r\n\t\t\t\t\ttemp = s[i];\r\n\t\t\t\t\ts[i] = s[j];\r\n\t\t\t\t\ts[j]= temp;\r\n\t\t\t\t} \t\t\t\r\n\t\t\t}\r\n\t\t\r\n\r\n\r\n\r\n\t\tSystem.out.println(\"Students with score<50 are: \");\r\n\t\tfor(int i=0; i<s.length;i++){\r\n\t\t\tif(s[i].score<50){\r\n\t\t\ts[i].Display();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Students with score>=50 and <65 are: \");\r\n\t\tfor(int i=0; i<s.length;i++){\r\n\t\t\tif(s[i].score>=50 && s[i].score<65){\r\n\t\t\ts[i].Display();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Students with score>=65 and <80 are: \");\r\n\t\tfor(int i=0; i<s.length;i++){\r\n\t\t\tif(s[i].score>=65 && s[i].score<80){\r\n\t\t\ts[i].Display();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Students with score>=80 and <100 are: \");\r\n\t\tfor(int i=0; i<s.length;i++){\r\n\t\t\tif(s[i].score>=80 && s[i].score<=100){\r\n\t\t\ts[i].Display();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn s;\r\n\r\n\r\n\t}", "Student(String name, double cgpa, int token){\n this.name=name;\n this.cgpa=cgpa;\n this.token=token;\n }", "@Override\n\tpublic int compareTo(Student student) {\n\t\tif(htno.compareTo(student.htno)<0)\n\t\t\treturn -1;\n\t\telse if(htno.compareTo(student.htno)>0)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\t}", "@Override\n\tpublic int compareTo(student o) {\n\t\treturn this.maths -o.maths;\n\t}", "public Student(String firstName, String lastName, int grade) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.grade = grade; \n studentNumber = totalStudents++; // the new student's number is equal the total number of students, therefore, each student number will be unique\n }", "public Student(String myname, int myid){ \r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades[0]= -1;\r\n\t\tgrades[1]= -1;\r\n\t\tgrades[2]= -1;\r\n\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++; \r\n\t}", "public Student(String name) {\n this.name = name;\n }", "@Override\n public String toString() {\n return \"Student{\" + \"id=\" + id + \", name=\" + name + \", yob=\" + yob + \", gpa=\" + gpa + '}';\n }", "@Override\n\tpublic int compareTo(StudentDetails student) {\n\t\tif(this.CIN > student.CIN){\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\telse if(this.CIN < student.CIN){\n\t\t\treturn -1;\n\t\t}\n\t\t\n\t\telse return 0;\n\t}", "@Override\n public int compare(Student student1, Student student2) {\n\n if(student1.getAge() == student2.getAge()) {\n //if age same then check with names\n\n if(student1.getName().compareTo(student2.getName()) == 0)\n //if names are also same then check with id\n return student1.getId().compareTo(student2.getId());\n\n else\n //if names are not same\n return student1.getName().compareTo(student2.getName());\n }\n\n else if(student1.getAge()>student2.getAge())\n //if ages are not same(student 1 age is greater than student2)\n return 1;\n\n else\n //if student2 age is greater than student1\n return -1;\n }", "public ArrayList<Studentdto> studentList() throws Exception {\n\t\tArrayList<Studentdto> studentlist = new ArrayList<Studentdto>();\n\t\tConnection con = null;\n\t\tcon = DBConnector.dbConnection();\n\t\ttry {\n\t\t\tPreparedStatement st = con.prepareStatement(\n\t\t\t\t\t\"select student_name,college_name, course_name,phn_no,address from student s ,college co,course cr where s.course_id=cr.course_id and s.college_id=co.college_id\");\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\tint i = 1;\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudentdto studentdto = new Studentdto();\n\t\t\t\tstudentdto.setSlno(i++);\n\t\t\t\tstudentdto.setStudentname(rs.getString(1));\n\t\t\t\tstudentdto.setCollegename(rs.getString(2));\n\t\t\t\tstudentdto.setCoursename(rs.getString(3));\n\t\t\t\tstudentdto.setAddress(rs.getString(4));\n\t\t\t\tstudentdto.setPhno(rs.getString(5));\n\t\t\t\tstudentlist.add(studentdto);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (SQLSyntaxErrorException e) {\n\t\t\tthrow new SQLSyntaxErrorException(\"Error in SQL syntax\");\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Connection with database failed\");\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Some error occured\");\n\t\t}\n\t\treturn studentlist;\n\t}", "public Course(int courseID) {\n this.courseID = courseID;\n morningRoster = new Vector<Student>();\n waitlist = new LinkedList<Student>();\n eveningRoster = new Vector<Student>();\n }", "@Override\n public int compare(Student o1, Student o2) {\n return o1.rollno - o2.rollno;\n }", "private void displayStudentByGrade() {\n\n studentDatabase.sortArrayList();\n\n for (Student student : studentDatabase) {\n\n stdOut.println(student.toStringsort() + \"\\n\");\n }\n }", "List<Student> selectByExample(StudentExample example);", "public String addStudent() {\r\n\t\tint rollnumber, no_of_courses = 0;\r\n\t\tString studname, coursename, courseid;\r\n\t\tSystem.out.println(\"Enter the Student rollnumber: \");\r\n\t\trollnumber=sc.nextInt();\r\n\t\tfor(int i=0;i<count;i++)\r\n\t\t{\r\n\t\tif(rollnumber==students[i].getRollNumber()) {\r\n\t\t\treturn (\"Sorry the Roll number is already taken!!\");\r\n\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Enter the Student name: \");\r\n\t\tstudname=sc.next();\r\n\t\tSystem.out.println(\"Enter the Number of courses student want to enroll: \");\r\n\t\tno_of_courses=sc.nextInt();\r\n\t\tCourses [] courses=new Courses[no_of_courses];\r\n\t\tfor(int i=0;i<no_of_courses;i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Enter the course id: \");\r\n\t\t\tcourseid=sc.next();\r\n\t\t\tSystem.out.println(\"Enter the course name:\");\r\n\t\t\tcoursename=sc.next();\r\n\t\t\tCourses object=new Courses(courseid, coursename);\r\n\t\t\tcourses[i]=object;\r\n\t\t}\t\t\r\n\t\tstudents[count++]=new Student(rollnumber, studname, courses);\r\n\t\treturn \"Student added successfully\";\t\r\n\t}", "public static ArrayList<String> getStudents(String course)\n\t{\n\t\tHashMap<String, String> map = createMap();\n\t\tArrayList<String> students = new ArrayList<String>();\n\t\t\n\t\treturn students;\n\t}", "public static ArrayList<String> getStudents(String course)\n\t{\n\t\tHashMap<String, String> map = createMap();\n\t\tArrayList<String> students = new ArrayList<String>();\n\t\t\n\t\treturn students;\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Employee> list= new ArrayList<Employee>();\n\t\t\n\t\tlist.add(new Employee(3,6000,\"vinod\"));\n\t\tlist.add(new Employee(6,7500,\"Rangu\"));\n\t\tlist.add(new Employee(1,9000,\"kittu\"));\n\t\tlist.add(new Employee(5,5000,\"bunny\"));\n\t\t\n\t\tCollections.sort(list, new NameComparator());\n\t\t\n\t\tIterator it = list.iterator();\n\t\t\n\t\twhile(it.hasNext()){\n\t\t\tEmployee emp = (Employee)it.next();\n\t\t\tSystem.out.println(emp.id+\" \"+emp.salaray+\" \"+emp.name);\n\t\t\t\n\t\t\t/*Collections.sort(list, new SalaryComparator());\n\t\t\t\n\t\t\tIterator it = list.iterator();\n\t\t\t\n\t\t\twhile(it.hasNext()){\n\t\t\t\tEmployee emp = (Employee)it.next();\n\t\t\t\tSystem.out.println(emp.id+\" \"+emp.salaray+\" \"+emp.name);\n\t\t}*/\n\t}\n\t}", "public int compare(Student s1, Student s2) {\n\n //uses compare method of student class to commpare students\n return s1.compareTo(s2);\n\n }", "public static void main(String[] args) {\n ArrayList<Student> students = new ArrayList<Student>();\n\n\n // adding to student: first name, last name, unique i.d. , and grade.\n Student student1 = new Student(\"Jessica\", \"Manning\", 1, 1);\n students.add(student1);\n Student student2 = new Student(\"Guadalupe\", \"Copeland\", 2, 1);\n students.add(student2);\n Student student3 = new Student(\"Maureen\", \"Schultz\", 3, 1);\n students.add(student3);\n Student student4 = new Student(\"Chester\", \"Bailey\", 4, 1);\n students.add(student4);\n Student student5 = new Student(\"Wanda\", \"Frank\", 5, 1);\n students.add(student5);\n Student student6 = new Student(\"Lynda\", \"Zimmerman\", 6, 1);\n students.add(student6);\n Student student7 = new Student(\"Valerie\", \"Saunders\", 7, 1);\n students.add(student7);\n Student student8 = new Student(\"Krystal\", \"Mcdaniel\", 8, 1);\n students.add(student8);\n Student student9 = new Student(\"Jared\", \"Parks\", 9, 1);\n students.add(student9);\n Student student10 = new Student(\"Angela\", \"Mendez\", 11, 1);\n students.add(student10);\n Student student11 = new Student(\"Linda\", \"Cain\", 12, 1);\n students.add(student11);\n Student student12 = new Student(\"Ellen\", \"Morrison\", 13, 1);\n students.add(student12);\n Student student13 = new Student(\"Tomas\", \"Padilla\", 14, 1);\n students.add(student13);\n Student student14 = new Student(\"Delbert\", \"Love\", 15, 1);\n students.add(student14);\n Student student15 = new Student(\"Blanca\", \"Hall\", 10, 1);\n students.add(student15);\n System.out.println(students);\n\n\n // Code a HashMap that takes a Teacher for a key and a Set of students for the value (not a List of students). Each Teacher will have 5 different students in a HashSet.\n\n //put the students into three groups\n Set<Student> classOne = new HashSet<>();\n classOne.add(student1);\n classOne.add(student2);\n classOne.add(student3);\n classOne.add(student4);\n classOne.add(student5);\n\n Set<Student> classTwo = new HashSet<>();\n classTwo.add(student6);\n classTwo.add(student7);\n classTwo.add(student8);\n classTwo.add(student9);\n classTwo.add(student10);\n\n Set<Student> classThree = new HashSet<>();\n classThree.add(student11);\n classThree.add(student12);\n classThree.add(student13);\n classThree.add(student14);\n classThree.add(student15);\n\n //create an array list of teachers\n ArrayList<Teacher> teachers = new ArrayList<>();\n\n Teacher teacher1 = new Teacher(\"Minerva\", \"Mcgonnagal\", 1, 1);\n teachers.add(teacher1);\n\n Teacher teacher2 = new Teacher(\"Albus\", \"Dumbledore\", 2, 1);\n teachers.add(teacher2);\n\n Teacher teacher3 = new Teacher(\"Professor\", \"Sprout\", 3, 1);\n teachers.add(teacher3);\n\n\n System.out.println(teachers);\n\n\n //create a hashmap with teacher as the key and student as the value\n\n Map<Teacher, Set> roster = new HashMap<>();\n roster.put(teacher1, classOne);\n roster.put(teacher2, classTwo);\n roster.put(teacher3, classThree);\n\n //print out the map keys in a for each loop (use the keySet() method).\n\n for (Teacher key: roster.keySet()) {\n System.out.println(key);\n }\n//Print out the map values in a for loop (use the values() method).\n for (Set value : roster.values()) {\n System.out.println(value);\n\n }\n\n }", "@Override\npublic ArrayList<String> courses() {\n\tArrayList<String> studentCourses = new ArrayList<String>();\n\tstudentCourses.add(\"CMPE - 273\");\n\tstudentCourses.add(\"CMPE - 206\");\n\tstudentCourses.add(\"CMPE - 277\");\n\tSystem.out.println(this.name+\" has take these courses\");\n\tfor(int i = 0 ; i < studentCourses.size() ; i++){\n\t\tSystem.out.println( studentCourses.get(i));\n\t}\n\treturn null;\n}", "private void printStudListByCourse() throws Exception {\n String courseID = null;\n ArrayList<Student> studentList = new ArrayList<Student>();\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"\\nPlease enter course ID\");\n courseID = sc.nextLine();\n while(!courseID.matches(\"^[a-zA-Z]{2}[0-9]{4}$\")){\n System.out.println(\"Invalid input! Please enter a valid index number!\");\n courseID = sc.nextLine();\n }\n\n studentList= this.adminManager.getStudentByCourse(courseID);\n if(studentList == null){\n System.out.println(\"\\nThere is no such a course index\\n\\n\");\n System.exit(1);\n }\n if (studentList.isEmpty()){\n System.out.println(\"\\nThere is no student registered for this course ID\\n\\n\");\n return;\n }\n else{\n System.out.println(\"Hang on a moment while we load database.\\n\\n\");\n System.out.println(\"------------------------------------------------------\");\n System.out.println(\" STUDENT NAME GENDER NATIONALITY\");\n System.out.println(\"------------------------------------------------------\");\n //\n for(Student student:studentList){\n System.out.println(String.format(\"%20s %6s %s\",student.getName(),student.getGender(),student.getNationality()));\n }\n\n System.out.println(\"------------------------------------------------------\\n\");\n }\n }" ]
[ "0.6891397", "0.65031207", "0.64392006", "0.63815904", "0.63386977", "0.6315932", "0.62944967", "0.6182634", "0.6088225", "0.6078027", "0.6076604", "0.60557574", "0.59656084", "0.59557384", "0.5946075", "0.5943297", "0.5936319", "0.59177977", "0.59088224", "0.59083456", "0.5902783", "0.5891195", "0.5890173", "0.5862065", "0.58427346", "0.58304834", "0.5823105", "0.581473", "0.5807", "0.5801899", "0.5801276", "0.57641315", "0.57547116", "0.57469875", "0.5725914", "0.57123923", "0.57092553", "0.57091606", "0.5709091", "0.57082194", "0.5707791", "0.57040447", "0.5703927", "0.5697818", "0.56926334", "0.5690198", "0.56844693", "0.5682133", "0.56781", "0.56739306", "0.5672987", "0.56593186", "0.5652746", "0.56503826", "0.5645044", "0.56419575", "0.56380767", "0.5622656", "0.5622315", "0.5619955", "0.56180453", "0.56179345", "0.5617631", "0.56162894", "0.56042135", "0.56019884", "0.5599978", "0.5598806", "0.5593955", "0.55927694", "0.5582014", "0.55816793", "0.55750567", "0.5574655", "0.5566357", "0.55559415", "0.5552473", "0.55482477", "0.55452675", "0.5537308", "0.5536054", "0.55224323", "0.55211663", "0.5514864", "0.5504047", "0.55033964", "0.5502809", "0.54990566", "0.5497593", "0.54949087", "0.54916465", "0.5483164", "0.5481265", "0.5480479", "0.5479168", "0.5479168", "0.54791117", "0.54783833", "0.5476608", "0.5475371", "0.5465267" ]
0.0
-1
WebDriver driver = BrowserSetup.browserStart("chrome","
public static void main(String[] args)throws Exception { FileInputStream inFile = new FileInputStream("C:\\Users\\vshadmin\\Desktop\\Book1.xlsx"); XSSFWorkbook book = new XSSFWorkbook(inFile); XSSFSheet sheet = book.getSheet("Sheet1"); // sheet.getRow(2).getCell(1).setCellValue("LNT"); // sheet.getRow(2).getCell(1).setCellValue("LNT"); //sheet.createRow(3).createCell(2).setCellValue("LNT"); FileOutputStream op = new FileOutputStream("C:\\Users\\vshadmin\\Desktop\\Book1.xlsx"); book.write(op); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BeforeTest\r\n\tpublic void launch()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Yogini\\\\chromedriver\\\\chromedriver.exe\"); //location of browser in local drive\r\n\t\tWebDriver driver = new ChromeDriver(); \r\n\t\tdriver.get(tobj.url);\r\n\t\tSystem.out.println(\"Before test, browser is launched\");\r\n\t}", "@BeforeTest\r\n public void launchBrowser() {\n System.setProperty(\"webdriver.chrome.driver\", ChromePath);\r\n driver= new ChromeDriver();\r\n driver.manage().window().maximize();\r\n driver.get(titulo);\r\n }", "public static WebDriver startBrowser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\t\n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\t WebDriver driver = new ChromeDriver();\n\t\t \n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\tdriver.get(\"http://techfios.com/test/107/\");\n\t\treturn driver;\n\t}", "@BeforeMethod(alwaysRun = true)\n public void browserSetup(){\n driver = new ChromeDriver();\n }", "@BeforeTest //special type of testng method which alway run before.\r\n\t\t\tpublic void openBrowser() {\r\n\t\t\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\t\t\t\tdriver.get(\"https://locator.chase.com/\");\r\n\t\t\t}", "@Before\n public synchronized static WebDriver openBrowser() {\n String browser = System.getProperty(\"BROWSER\");\n\n\n if (driver == null) {\n try {\n //Kiem tra BROWSER = null -> gan = chrome\n if (browser == null) {\n browser = System.getenv(\"BROWSER\");\n if (browser == null) {\n browser = \"chrome\";\n }\n }\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n break;\n case \"chrome_headless\":\n WebDriverManager.chromedriver().setup();\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"headless\");\n options.addArguments(\"window-size=1366x768\");\n driver = new ChromeDriver(options);\n break;\n default:\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n }\n } catch (UnreachableBrowserException e) {\n driver = new ChromeDriver();\n } catch (WebDriverException e) {\n driver = new ChromeDriver();\n } finally {\n Runtime.getRuntime().addShutdownHook(new Thread(new BrowserCleanup()));\n }\n driver.get(\"http://demo.guru99.com/v4/\");\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n log.info(\"----------- START BRWOSER -----------\");\n\n }\n return driver;\n }", "public void setChromeDriver(){\n System.setProperty(\"webdriver.chrome.driver\", browserDriverPath);\n seleniumDriver = new ChromeDriver();\n }", "@BeforeTest // which will be executed first before all the test methods\n@Parameters(\"browser\") //@Parameter is used to pass the values(during run time) to the test methods as arguments using .xml file\npublic void setup(String browser) throws Exception{\n \n//Check if parameter passed as 'chrome'\nif (browser.equalsIgnoreCase(\"chrome\")){\n//set path to chromedriver.exe\nSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\\\\\\\\\\\\\Users\\\\\\\\\\\\\\\\mouleeswaranb\\\\\\\\\\\\\\\\eclipse-workspace_Selenium learning_6127\\\\\\\\\\\\\\\\SeleniumProject\\\\\\\\\\\\\\\\drivers\\\\\\\\\\\\\\\\chromedriver.exe\");\ndriver = new ChromeDriver(); \n}\n\nelse{\n//If no browser passed throw exception\nthrow new Exception(\"Browser is not correct\");\n}\ndriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n}", "@Test\r\n\tpublic void launch_browser()\r\n\t{ \r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C://TESTING TOOLS - SOFTWARES/chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://www.javatpoint.com/\");\r\n\t\t// remove all cookies\r\n\t\t//driver.manage().deleteAllCookies();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\t\r\n\t}", "@Before\n public void start(){\n DesiredCapabilities caps = new DesiredCapabilities();\n driver = new FirefoxDriver(new FirefoxBinary(new File(\"C:\\\\Program Files (x86)\\\\Nightly\\\\firefox.exe\")), new FirefoxProfile(), caps);\n wait = new WebDriverWait(driver, 10);\n\n //IE\n// DesiredCapabilities caps = new DesiredCapabilities();\n// caps.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);\n// WebDriver driver = new InternetExplorerDriver(caps);\n\n\n }", "public static void main(String[] args) {\nString browser=\"ff\";\nif (browser.equals(\"chrome\")) {\n\tWebDriverManager.chromedriver().setup();\n\t// System.setProperty(\"webdriver.chrome.driver\", \"/Users/user/Downloads/chromedriver\");\n\tdriver=new ChromeDriver();\n}\nelse if (browser.equals(\"ff\")) {\n\tWebDriverManager.firefoxdriver().setup();\n\tdriver=new FirefoxDriver();\n}\nelse\n\tif (browser.equals(\"IE\")) {\n\t\tWebDriverManager.iedriver().setup();\n\t\tdriver=new InternetExplorerDriver();\n\t}\n\telse\n\t\tif (browser.equals(\"opera\")) {\n\t\t\tWebDriverManager.operadriver().setup();\n\t\t\tdriver=new OperaDriver();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"no defined driver\");\n\t\t}\n\n\ndriver.get(\"https://google.com\");\n\n\n\n\t\n\n\n\n\n\n\n\n\n\n\n\n\t}", "@BeforeTest\r\n\tpublic void operBrowser(){\n\t\td1=Driver.getBrowser();\r\n\t\tWebDriverCommonLib wlib=new WebDriverCommonLib();\r\n\t\td1.get(Constant.url);\r\n\t\twlib.maximizeBrowse();\r\n\t\twlib.WaitPageToLoad();\r\n\t}", "public static WebDriver startChrome() {\n\t\treturn new ChromeDriver();\n\t}", "public void setup(){\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"//Users//bpat12//Downloads//chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tSystem.out.println(\"launch browser\");\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tdriver.get(url);\n\t}", "@BeforeTest\n public void setup() {\n\n String browser = Environment.getProperties().browser().toString().toLowerCase();\n\n switch (browser) {\n \n case \"firefox\":\n FirefoxOptions options = new FirefoxOptions(); \n if(Environment.getProperties().headless()){\n options.addArguments(\"--headless\");\n }\n driver = new FirefoxDriver();\n break;\n \n default:\n ChromeOptions optionsChrome = new ChromeOptions();\n if(Environment.getProperties().headless()){\n optionsChrome.addArguments(\"--headless\");\n } \n driver = new ChromeDriver(optionsChrome);\n break;\n } \n\n driver.manage().window().maximize();\n }", "@Test\r\n\tpublic void f()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C://Data_Program//Selenium_Dependencies//chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.get(\"http://www.google.com\");\r\n\t}", "public static WebDriver chrome()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\Chrome\\\\chromedriver.exe\");\r\n\t\tgk = new ChromeDriver();\r\n\t\treturn gk;\r\n\t}", "public static void setup(String browser) throws Exception{\n if(browser.equalsIgnoreCase(\"firefox\")){\n \tFile pathToBinary = new File(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox 41\\\\firefox.exe\");\n \tFirefoxBinary binary = new FirefoxBinary(pathToBinary);\n \tFirefoxDriver driver = new FirefoxDriver(binary, new FirefoxProfile());\n \t\n \t//System.setProperty(\"webdriver.firefox.driver\",\"C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n \t/*DesiredCapabilities capabilies = DesiredCapabilities.firefox();\t\t\t\n capabilies.getBrowserName();\n capabilies.getVersion();*/\n \t\t\t\n \t//create Firefox instance\t \n //driver = new FirefoxDriver(); \n System.out.println(\"Browser Used: \"+browser);\n }\t \n //Check if parameter passed is 'Chrome'\n // https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/chrome/ChromeOptions.html\n // http://www.programcreek.com/java-api-examples/index.php?api=org.openqa.selenium.remote.DesiredCapabilities (Singleton)\n else if(browser.equalsIgnoreCase(\"chrome\")){\t \t \n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n ChromeOptions opt = new ChromeOptions();\n opt.setBinary(\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n opt.setExperimentalOption(\"Browser\", \"Chrome\");\n opt.getExperimentalOption(\"version\");\n \n// DesiredCapabilities capabilies = DesiredCapabilities.chrome();\n// capabilies.setBrowserName(\"chrome\");\n// capabilies.setPlatform(Platform.WINDOWS);\n// capabilies.setVersion(\"38\");\n// DesiredCapabilities capabilities = new DesiredCapabilities();\n \n //Create Chrome instance\n driver = new ChromeDriver(opt);\t \n }\n \n //Check if parameter passed is 'Safari'\t\n else if(browser.equalsIgnoreCase(\"safari\")){\t \t \n \tSystem.setProperty(\"webdriver.safari.driver\",\"C:/safaridriver.exe\");\n \t\n \t//System.setProperty(\"webdriver.safari.noinstall\", \"true\");\n \tdriver = new SafariDriver();\n \t\n /*\tSafariOptions options = new SafariOptions();\n \tSafariDriver driver = new SafariDriver(options);\n \tDesiredCapabilities capabilities = DesiredCapabilities.safari();\n \tcapabilities.setCapability(SafariOptions.CAPABILITY, options);*/\n }\n \n //Check if parameter passed is 'IE'\t \n else if(browser.equalsIgnoreCase(\"ie\")){\n \t//String IE32 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_32.exe\"; //IE 32 bit\n\t\t\tString IE64 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_64.exe\"; //IE 64 bit\n \tSystem.setProperty(\"webdriver.ie.driver\",IE64);\n \t\n /* \tDesiredCapabilities capabilies = DesiredCapabilities.internetExplorer();\n \tcapabilies.setBrowserName(\"ie\");\n capabilies.getBrowserName();\n capabilies.getPlatform();\n capabilies.getVersion();*/\n \n \t//Create IE instance\n \tdriver = new InternetExplorerDriver();\n }\t \n else{\t \n //If no browser passed throw exception\t \n throw new Exception(\"Browser is not correct\");\t \n }\t \n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tWebDriverManager.chromedriver().setup();\r\n\t\t\r\n\t\tWebDriver driver =new ChromeDriver();\r\n\t\t\r\n\t\t\r\n\r\n\t}", "@Before\r\n\tpublic void OpenChrome() {\n\t\tconfig = new ConfigReader();\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",config.getChromePath());\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\texPages = new ExpediaPages(driver);\r\n\t}", "@BeforeClass\n public void BeforeTest(){\n Configuration.browser = \"Chrome\";\n\n }", "public WebDriver LaunchChromeBrowserReturnIt() {\n\t\ttry {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\t\"/TestSuit/lib/chromedriver.exe\");\n\t\t\tdriver = new ChromeDriver(); // Launch chrome\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn driver;\n\n\t}", "@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}", "public void chromeLaunch() {\n\t\tSystem.setProperty(key, value);\n\t\ts=new ChromeDriver();\n\t\ts.manage().window().maximize();\n\t\ts.navigate().to(url);\n\t}", "public void Open_Browser() \r\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\");\r\n\t\t//Brower initiation\r\n\t\tdriver=new ChromeDriver();\r\n\t\t//maximize browser window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t}", "@Given(\"^launch an chrome browser$\")\r\n\tpublic void launch_an_chrome_browser() throws Throwable {\n\t sign.url();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"D:/workspace/chromedriver\");\r\n\t\t //System.setProperty(\"webdriver.chrome.driver\", ...);\r\n\t\t \r\n\t\t System.setProperty(\"selenide.browser\", \"Chrome\");\r\n\t\t Configuration.browser=\"chrome\";\r\n\t\t open(\"http://google.com\");\r\n\t\t //$(By.id(\"registerLink\")).pressEnter();\r\n\t\t }", "@Before\n public void start() {\n\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n //driver.manage().window().maximize();\n wait = new WebDriverWait(driver, 10);\n }", "@ BeforeTest \n\tpublic void Amazon() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\resources\\\\chromedriver.exe\"); // to make the path portable create folder reources and put the element to it \n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.amazon.com/\");\n\t\tSystem.out.println(driver.getCurrentUrl());\t\n\t\tdriver.manage().window().maximize();\n\n}", "@BeforeClass(description = \"Before class: start the Chrome browser\")\n public void setUpBrowser()\n {\n reports = new ExtentReports(\"C:\\\\Dev\\\\ToDoMVCTEST\\\\HTML_Report\\\\Report.html\", true);\n HTMLReport htmlReport = new HTMLReport();\n htmlReport.log(\"STARTING BeforeClass\");\n htmlReport.logINFO(\"Initialization of browser's driver\");\n driver = getDriver();\n htmlReport.logINFO(\"Maximize the window of browser\");\n driver.manage().window().maximize();\n htmlReport.logINFO(\"Setting timeouts in seconds\");\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n }", "public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n\n // create object for using selenium driver;\n WebDriver driver=new ChromeDriver();\n\n //open browser\n driver.get(\"http://amazon.com\");// bumu exlaydu\n //driver.get(\"http://google.com\");\n // open website\n System.out.println(driver.getTitle());\n\n\n\n\n }", "public static void main(String[] args) {\n WebDriver driver = WebDriverFactory.getDriver(\"chrome\");\n driver.manage().window().maximize();\n\n\n }", "@Before\n public void Setup() { //this is done before every test, chrome driver is saved in a specific location\n\n System.setProperty(\"webdriver.chrome.driver\",\n Constant.CROMEDRIVER);\n\n driver = new ChromeDriver();\n }", "@Before\r\n\tpublic void setup() {\r\n\t\tSystem.out.println(\"Before\");\r\n\t\t//System.setProperty(\"webdriver.chrome.driver\", \"C:/Users/Admin/Desktop/Chromedriver.exe\");\r\n\t\t//driver = new ChromeDriver();\r\n\t}", "@BeforeClass\n @Parameters({\"browser\", \"url\"})\n // Step 2: create a method with appropriate params\n void setup(String mBrowser, String mUrl){\n // Step 3: make use of the parameters\n if(mBrowser.equalsIgnoreCase(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\",\"C:/chromedriver_win32/chromedriver.exe\");\n driver = new ChromeDriver();\n }else if(mBrowser.equalsIgnoreCase(\"firefox\")){\n System.setProperty(\"webdriver.chrome.driver\",\"C:/firefox_win32/firefoxdriver.exe\");\n driver = new FirefoxDriver();\n }\n // Step 3: make use of the parameters\n driver.get(mUrl);\n }", "@BeforeTest\n public void setup() {\n System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\User\\\\IdeaProjects\\\\LoginToJira\\\\chromedriver.exe\");\n // Create a new instance of the Chrome driver\n this.driver = new ChromeDriver();\n }", "@Given(\"^the user launch the chrome application$\")\r\n\tpublic void the_user_launch_the_chrome_application() throws Throwable {\n\t\tlaunchBrowser(\"chrome\");\r\n\t\t register= new Para_Registartion_page(driver);\r\n\t}", "@Given(\"I set up my Chrome Driver\")\n\tpublic void i_am_on_Magalu_HomePage() {\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:/Users/gocruz/eclipse-workspace/portal.compras/chromedriver.exe\");\n\t\tdriver = new ChromeDriver(options);\n\n\t}", "public void initiateBrowser(String browser) {\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\n\t\tString current_dir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(os);\n\t\tSystem.out.println(current_dir);\n\t\tswitch (browser) {\n\t\tcase \"ie\":\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", current_dir + \"/drivers/IEDriverServer.exe\");\n\t\t\tdriver = new InternetExplorerDriver();\n\t\t\tbreak;\n\t\tcase \"chrome\":\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\tif (os.contains(\"linux\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/linuxdrivers/chromedriver\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\n\t\t\t\toptions.setBinary(\"/usr/bin/google-chrome\");\n\t\t\t\toptions.addArguments(\"--headless\");\n\t\t\t} else if (os.contains(\"windows\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", current_dir + \"/drivers/chromedriver.exe\");\n\t\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();\n\t\t\t\tLoggingPreferences logPrefs = new LoggingPreferences();\n\t\t\t\tlogPrefs.enable(LogType.BROWSER, Level.ALL);\n\t\t\t\tcaps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);\n\t\t\t}\n\t\t\toptions.addArguments(\"test-type\");\n\t\t\toptions.addArguments(\"disable-popup-blocking\");\n\t\t\tdriver = new ChromeDriver(options);\n\n\t\t\tdriver.manage().window().maximize();\n\t\t\tbreak;\n\t\tcase \"firefox\":\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tbreak;\n\t\t}\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t}", "@BeforeMethod\n\tpublic void setUp() {\n\t\tString driverByOS = \"\";\n\t\tif (System.getProperty(\"os.name\").equals(\"Windows 10\")) {\n\t\t\tdriverByOS = \"Drivers/chromedriver.exe\";\n\t\t} \n\t\telse {\n\t\t\tdriverByOS = \"Drivers/chromedriver\";\n\t\t}\n\t\t//para saber en qué sistema Operativo estamos corriendo el proyecto.\n\t\tSystem.out.println(System.getProperty(\"os.name\"));\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverByOS);\n\t\t//Utilizando headless browser HB\n\t\t/*-HB\n\t\tChromeOptions chromeOptions = new ChromeOptions();\n\t\tchromeOptions.addArguments(\"--headless\");\n\t\tdriver = new ChromeDriver(chromeOptions);\n\t\tHB-*/\n\t\tdriver = new ChromeDriver();\n\t\t//driver.manage().window().maximize(); //esto es para maximizar la ventana del navegador\n\t\t//driver.manage().window().fullscreen(); //esto es para poner en fullscreen la ventana del navegador\n\t\t/*driver.manage().window().setSize(new Dimension(200,200));\n\t\tfor (int i = 0; i <= 800; i++) {\n\t\t\tdriver.manage().window().setPosition(new Point(i,i));\n\t\t}*/\n\t\t//driver.manage().window().setPosition(new Point(800,200)); //posicionando la ventana del navegador\n\t\tdriver.navigate().to(\"http://newtours.demoaut.com/\");\n\t\t//Este codigo de abajo permite abrir otra ventana en el navegador\n\t\t//JavascriptExecutor javaScriptExecutor = (JavascriptExecutor)driver;\n\t\t//String googleWindow = \"window.open('http://www.google.com')\";\n\t\t//javaScriptExecutor.executeScript(googleWindow);\n\t\t//tabs = new ArrayList<String> (driver.getWindowHandles());\n\t\t/*try {\n\t\t\tThread.sleep(5000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t//Helpers helper = new Helpers();\n\t\t//helper.sleepSeconds(4);\n\t}", "public void browser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src/test/resources/Driver/chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.manage().window().maximize();// maximize the window\n\t\tdriver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\n\n\t}", "public static void startChromeDriver() {\r\n\t\tswitch (operatingSystem.toLowerCase().split(\" \")[0]) {\r\n\t\tcase \"windows\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriver.exe\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"linux\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriverLinux\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"mac\":\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src//main//resources//drivers//chromedriverMac\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Operating system not supported.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void openBrowser() {\n ResourceBundle config = ResourceBundle.getBundle(\"config\");\n\n config.getString(\"browser\").equalsIgnoreCase(\"Chrome\");\n System.setProperty(\"webdriver.chrome.driver\", \"src/Drivers/chromedriver_76.0.exe\");\n driver = new ChromeDriver();\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n// driver.get(config.getString(\"URL\"));\n driver.manage().window().maximize();\n }", "public void getDriver() {\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver = new ChromeDriver();\n\t}", "private void setChromeDriver() throws Exception {\n\t\t// boolean headless = false;\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Object>();\n\t\tchromePrefs.put(\"profile.default_content_settings.popups\", 0);\n\t\tchromePrefs.put(\"download.default_directory\", BasePage.myTempDownloadsFolder);\n\t\tchromeOptions.setExperimentalOption(\"prefs\", chromePrefs);\n\t\t// TODO: Using \"C:\" will not work for Linux or OS X\n\t\tFile dir = new File(BasePage.myTempDownloadsFolder);\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n\n\t\tchromeOptions.addArguments(\"disable-popup-blocking\");\n\t\tchromeOptions.addArguments(\"--disable-extensions\");\n\t\tchromeOptions.addArguments(\"start-maximized\");\n\n\t\t/*\n\t\t * To set headless mode for chrome. Would need to make it conditional\n\t\t * from browser parameter Does not currently work for all tests.\n\t\t */\n\t\t// chromeOptions.setHeadless(true);\n\n\t\tif (runLocation.toLowerCase().equals(\"smartbear\")) {\n\t\t\tReporter.log(\"-- SMARTBEAR: standard capabilities. Not ChromeOptions\", true);\n\t\t\tcapabilities = new DesiredCapabilities();\n\t\t} else {\n\t\t\tcapabilities = DesiredCapabilities.chrome();\n\t\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);\n\t\t}\n\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t \n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" Chrome-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}", "@BeforeTest\n\tpublic void OpenBrowser() throws InterruptedException {\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\PSQA\\\\Desktop\\\\driver\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.booking.com/\");\n\t\n\t\t\n\t\tdriver.manage().window().maximize();\n\t\tThread.sleep(100);\n\t\t\n}", "@Test\n public void test1(){\n\n WebDriverManager.chromedriver().setup();\n WebDriver driver2 = new ChromeDriver();\n\n\n\n driver2.get(url);\n bekle(2000);\n driver2.quit();\n\n\n\n }", "public static void main(String[] args) {\n String str = getDriver(\"chrome\");\n System.out.println(str);\n\n }", "@BeforeClass\n public static void setup(){\n WebDriverManager.chromedriver().setup();\n webDriver = new ChromeDriver();\n webDriver.manage().window().maximize();\n webDriver.manage().timeouts().implicitlyWait(3000, TimeUnit.MILLISECONDS);\n }", "@BeforeTest\n\n public void setup() {\n\n \t System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\Lenovo 1\\\\eclipse-workspace\\\\firstTestProject\\\\src\\\\test\\\\resources\\\\chromedriver.exe\");\n driver = new ChromeDriver();\n\n /* System.setProperty(\"webdriver.gecko.driver\", \"C:\\\\Users\\\\Lenovo 1\\\\eclipseprojects\\\\seleniumTestProject\\\\src\\\\test\\\\resources\\\\geckodriver.exe\");\n driver = new FirefoxDriver();*/\n\n\n// System.setProperty(\"webdriver.chrome.driver\", \"/home/ushani/Selenium_ProjectWS/TwoBulls/seleniumTestProject/src/test/resources/chromedriver\");\n// WebDriver driver = new ChromeDriver();\n\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\n driver.get(\"http://www.google.com\");\n }", "public static WebDriver setUp() {\n\t\n \t\n \tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\"); //if it doesn't work we can check with user.dir...\n \tdriver = new ChromeDriver(); //launch the Browser it opens empty page\n \tdriver.manage().window().maximize();\n \tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); //to wait globally\n \tdriver.get(\"http://166.62.36.207/humanresources/symfony/web/index.php/auth/login\");\n \t \n \treturn driver; //return object of the driver \t\n}", "private WebDriver startWebDriver(String browser) {\n\t\tString msg = \">>> DRIVER : %s TestCase %s\";\n\t\tif (driver == null) {\n\t\t\t// driver is not started so we start it\n\t\t\tdriver = BrowserFactory.create(BROWSERS.valueOf(browser));\n\n\t\t\tif (driver != null)\n\t\t\t\tSystem.out.println(String.format(msg, driver.getWindowHandle(), this));\n\t\t}\n\t\treturn driver;\n\t}", "@BeforeClass\r\n\tpublic void setUp() {\r\n\r\n\t\t// This will launch browser and specific url\r\n\t\tdriver = BrowserFactory.startBrowser(driver, \"Chrome\", \"https://www.flipkart.com/\");\t\r\n\t\r\n\t}", "@Test\n @Given(\"I launch browser\")\n public void s01_BrowserMaximizeLaunch() {\n System.setProperty(\"webdriver.chrome.driver\", \"src/ChromeDriver.exe\");\n// Init new instance of ChromeDriver.\n driver = new ChromeDriver();\n// Maximise browser window\n driver.manage().window().maximize();\n System.out.println(\"Step01 PASSED\");\n }", "public static void main(String[] args) throws MalformedURLException {\n\t\t\n\t\tDesiredCapabilities objRc=new DesiredCapabilities();\n\t\tobjRc.setBrowserName(\"chrome\");\n\t\tobjRc.setPlatform(Platform.WINDOWS);\n\t\tWebDriver driver=new RemoteWebDriver(new URL(\"http://localhost:4546/wd/hub\"),objRc);\n\t}", "public void driverStart(String baseURL) {\n// FirefoxDriverManager.getInstance().setup();\n// driver = new FirefoxDriver();\n// driver.manage().window().maximize();\n// webDriverWait = new WebDriverWait(driver, 10);\n//\n//// ChromeDriverManager.getInstance().setup();\n//// driver = new ChromeDriver();\n//// driver.manage().window().maximize();\n//// webDriverWait = new WebDriverWait(driver, 5);\n//\n// driver.get(baseURL);\n\n FirefoxDriverManager.getInstance().setup();\n WebDriver driver = new FirefoxDriver();\n driver.get(\"http://localhost/litecart/\");\n\n\n }", "public WebDriver browserSetup() throws IOException\r\n\t{ \r\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\r\n\t\tSystem.out.println(\"1.Chrome\\n2.Firefox \\nEnter your choice:\");\r\n\t\tString choice=br.readLine();\r\n\t\t\r\n\t\tswitch(choice)\r\n\t\t{\r\n\t\t//To start Chrome Driver\r\n\t\tcase \"1\":\r\n\t\t System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Test Automation\\\\Software\\\\chrome\\\\New Version\\\\chromedriver.exe\");\r\n\t\t ChromeOptions options=new ChromeOptions();\r\n\t\t options.addArguments(\"--disable-notifications\");\r\n\t\t driver=new ChromeDriver(options);\r\n\t\t break;\r\n\t\t\r\n\t\t//To start Firefox Driver\r\n\t\tcase \"2\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"C:\\\\***\\\\drivers\\\\geckodriver.exe\");\r\n\t\t\tdriver=new FirefoxDriver();\r\n\t\t\tbreak;\r\n\t\t} \r\n\t\t\r\n\t\tdriver.get(url);\r\n\t\t\r\n\t\t//To maximize the window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(8, TimeUnit.SECONDS);\r\n\t\t\r\n\t\treturn driver;\r\n\t}", "@BeforeClass\r\n @Parameters({\"browser\"})\r\n public void startDriver(@Optional(\"chrome\") String browserName)\r\n {\r\n if (browserName.equalsIgnoreCase(\"chrome\")) {\r\n System.setProperty(\"webdriver.chrome.driver\", System.getProperty(\"user.dir\")+\"/drivers/chromedriver\");\r\n driver = new ChromeDriver(chromeOption());\r\n }\r\n\r\n else if(browserName.equalsIgnoreCase(\"firefox\")) {\r\n System.setProperty(\"webdriver.gecko.driver\", System.getProperty(\"user.dir\")+\"/drivers/geckodriver.exe\");\r\n driver = new FirefoxDriver(firefoxOption());\r\n }\r\n\r\n else if (browserName.equalsIgnoreCase(\"safari\")) {\r\n driver = new SafariDriver();\r\n }\r\n\r\n driver.manage().window().maximize();\r\n driver.navigate().to(\"http://automationpractice.com/index.php\");\r\n }", "@BeforeClass\n public static void setup() {\n String driverPath = \"\";\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\n driver = new ChromeDriver();\n driver.manage().window().maximize();\n }", "private static WebDriver launchChrome()\n\t{\n\t\tif (REMOTE_URL != null && !REMOTE_URL.equals(\"\")) {\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\t\ttry {\n\n\t\t\t\treturn new RemoteWebDriver(new URL(System.getProperty(\"RemoteUrl\")), capabilities);\n\t\t\t}\n\n\n\t\t\tcatch (MalformedURLException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\telse\n\t\t{\n\t\tURL chromeDriverURL = BrowserDriver.class.getResource(\"/drivers/chromedriver.exe\");\n\t\tFile file = new File(chromeDriverURL.getFile()); \n\t\tSystem.setProperty(ChromeDriverService.CHROME_DRIVER_EXE_PROPERTY, file.getAbsolutePath());\n\t\t\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--start-maximized\");\n\t\toptions.addArguments(\"--ignore-certificate-errors\");\n\t\t\n\t\treturn new ChromeDriver(options);\n\t\t}\n\t}", "@Parameters(\"browser\")\n\t@BeforeMethod (groups= {\"smoke\"})\n\tpublic void setUp(@Optional String browser) {//name of the parameter from xml\n\t\tdriver=Driver.getDriver(browser);\n\t\tdriver.get(ConfigurationReader.getProperty(\"url\"));\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\tdriver.manage().window().maximize();\n\t}", "@BeforeMethod\n @Parameters(\"browser\")\n public static void startTest(String browser) throws Exception {\n if (browser.equalsIgnoreCase(\"firefox\")) {\n //create firefox instance\n WebDriverManager.firefoxdriver().setup();\n Constant.WEBDRIVER = new FirefoxDriver();\n Constant.WEBDRIVER.manage().window().maximize();\n }\n //Check if parameter passed as 'chrome'\n else if (browser.equalsIgnoreCase(\"chrome\")) {\n //set path to chromedriver.exe\n WebDriverManager.chromedriver().setup();\n //create chrome instance\n Constant.WEBDRIVER = new ChromeDriver();\n Constant.WEBDRIVER.manage().window().maximize();\n }\n //Check if parameter passed as 'Edge'\n else if (browser.equalsIgnoreCase(\"Edge\")) {\n //set path to Edge.exe\n WebDriverManager.edgedriver().setup();\n //create Edge instance\n Constant.WEBDRIVER = new EdgeDriver();\n Constant.WEBDRIVER.manage().window().maximize();\n } else {\n //If no browser passed throw exception\n throw new Exception(\"Browser is not correct\");\n }\n\n// String filePath = \"D:\\\\Selenium1\\\\selenium_1\\\\Reports\\\\\" + Utils.time() + \"extent.html\";\n// File extentReportFile = new File(filePath);\n// extent = new ExtentReports(filePath, true, DisplayOrder.OLDEST_FIRST, NetworkMode.ONLINE);\n// extent.loadConfig(new File(\"D:\\\\logi\\\\selen_project_git\\\\logi_selenium\\\\selen_gr_railway2\\\\src\\\\main\\\\\" +\n// \"resources\\\\ExtentReport\\\\extent-config.xml\"));\n }", "@Test\n public void test() throws MalformedURLException {\n System.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\drivers\\\\chromedriver.exe\"); \n WebDriver driver=new ChromeDriver();\n // WebDriver driver=new RemoteWebDriver(url,cap);\n driver.manage().window().maximize(); \n driver.get(\"https://curiedoctorapp.firebaseapp.com\");\n System.out.println(\"The title is\"+ driver.getTitle());\n driver.quit();\n \n }", "@Given(\"^Initialize the browser with Chrome$\")\r\n\tpublic void initialize_the_browser_with_Chrome() throws Throwable {\n\t\tdriver = DriverManager.getDriverInstance(\"chrome\", 20);\r\n\t\tSystem.out.println(\"Launched Chrome\");\r\n\t}", "public void setUpMethod(){\n driver = WebDriverFactory.getDriver(\"Chrome\");\n //maximize the page\n driver.manage().window().maximize();\n //implicit wait\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n }", "public void open() {\n setWebDriver();\n }", "@Test \n public void executSessionOne(){\n\t System.out.println(\"open the browser: chrome\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "private WebDriver getDriver() {\n return new ChromeDriver();\n }", "@BeforeClass\r\n public void beforeClass() {\n \tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\Tuan\\\\Downloads\\\\chromedriver.exe\");\r\n \tdriver = new ChromeDriver();\r\n \tdriver.get(\"http://daominhdam.890m.com/\");\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./browser/chromedriver.exe\");\r\n\t\t//DesiredCapabilities cap=new DesiredCapabilities();\r\n\t\t\r\n\t\tChromeOptions co=new ChromeOptions();\r\n\t\tco.addArguments(\"--disable-infobars\");\r\n\t\t//co.addArguments(\"--headless\");\r\n\t\tWebDriver driver=new ChromeDriver(co);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.close();\r\n\r\n\t}", "@BeforeMethod\n\tpublic void setUp() throws Exception{\n\n\t\tDesiredCapabilities chromecap= DesiredCapabilities.chrome();\n\t\tchromecap.setBrowserName(\"chrome\");\n\t\tchromecap.setPlatform(Platform.WINDOWS);\n\t\tdriver= new RemoteWebDriver(new URL(\"http://localhost:4444/wd/hub\"), chromecap);\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\n\t}", "public static void main(String[] args) {\n\n\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\COMPAQ\\\\Downloads\\\\chromedriver_win32\\\\chromedriver.exe\");\n\nWebDriver driver =new ChromeDriver();\n\n//WebDriverWait wait = new WebDriverWait(driver, 40);\n\n driver.get(\"http://qatestingtips.com/\");\n\t\n\n}", "@BeforeMethod\n public void setupMethod(){\n driver = WebDriverFactory.getDriver(\"chrome\");\n //maximize the page\n driver.manage().window().maximize();\n //implicit wait\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n //get the page\n driver.get(\"http://practice.cybertekschool.com/dropdown\");\n }", "private void setWebdriver() throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir + fileSeparator + \"lib\" + fileSeparator + \"chromedriver.exe\");\n\t\tcapability = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--disable-extensions\");\n\t\toptions.addArguments(\"disable-infobars\");\n\t\tcapability.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tdriver = new ChromeDriver(capability);\n\t\tdriver.manage().deleteAllCookies();\n\t\t_eventFiringDriver = new EventFiringWebDriver(driver);\n\t\t_eventFiringDriver.get(getUrl());\n\t\t_eventFiringDriver.manage().window().maximize();\n\n\t}", "@BeforeTest\r\n\tpublic void beforeTest() throws MalformedURLException {\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\PDC2B-Training.pdc2b\\\\Downloads\\\\Selenium Drivers\\\\BrowserDriver\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(5000, TimeUnit.SECONDS);\r\n\t}", "@BeforeSuite\r\n\tpublic void before_suite() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"G:\\\\chromedriver.exe\");\r\n\t}", "@Test \n public void executSessionThree(){\n System.out.println(\"open the browser: chrome III\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }", "@Test\n\tpublic void launchSite()\t{\n\t\t\n\t\tSystem.setProperty(EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY, \"D:\\\\Selenium Drivers\\\\MicrosoftWebDriver.exe\");\n\t\tEdgeDriver driver = new EdgeDriver();\n\t\tdriver.get(\"http://google.com\");\n\t\t\n\t}", "@BeforeClass\n\tpublic void initializebrowser() throws InterruptedException {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", Chrome);\n\t\t// driver = new ChromeDriver(); \n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--disable-extensions\");\n\t\toptions.addArguments(\"test-type\");\n\t\toptions.addArguments(\"--disable-popup-blocking\");\n\t\tdriver = new ChromeDriver(options);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(common.URL);\n\t\tThread.sleep(3000);\n\n\t\t\n\t\t/*DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();\n\t\t \n\t\t //Method and Description - void setCapability(java.lang.String capabilityName, boolean value)\n\t\t capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);\n\t\t \n\t\t //Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined \"properties\"; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.\n\t\t System.setProperty(\"webdriver.ie.driver\", common.IE);\n\t\t \n\t\t //InternetExplorerDriver(Capabilities capabilities)\n\t\t WebDriver driver = new InternetExplorerDriver(capabilities);\n\t\t \n\t\t driver.manage().window().maximize();\n\t\t driver.get(common.URL);\n\t\t Thread.sleep(3000);*/\n\t\t\n\t}", "@Given(\"^Launch the page$\")\r\n\tpublic void launch_the_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedrivernew.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://realestate.upskills.in\");\r\n\t \t}", "@Parameters(\"browser\")\n\t@BeforeMethod\n\tpublic void launchBrowser(String browser) throws InterruptedException{\n\t\tif(browser.equalsIgnoreCase(\"firefox\")) {\n\t\t\t \n\t\t\t driver = new FirefoxDriver();\n\t\t \n\t\t // If browser is IE, then do this\t \n\t\t \n\t\t }else if (browser.equalsIgnoreCase(\"ie\")) { \n\t\t \n\t\t\t // Here I am setting up the path for my IEDriver\n\t\t \n\t\t\t System.setProperty(\"webdriver.ie.driver\", \"C://Users//sudt//Downloads//IEDriverServer_x64_2.53.1//IEDriverServer (2).exe\");\n\t\t \n\t\t\t driver = new InternetExplorerDriver();\n\t\t \n\t\t } \n\t\t else if (browser.equalsIgnoreCase(\"chrome\")){\n\t\t\t System.setProperty(\"webdriver.chrome.driver\", \"C://Users//sudt//Downloads//chromedriver_win32//chromedriver.exe\");\n\t\t\t driver = new ChromeDriver();\n\t\t }\n\t\t else {\n throw new IllegalArgumentException(\"The Browser Type is Undefined\");\n }\n\n\t\tdriver.get(\"https://www.xero.com/us/\");\n\t\tdriver.manage().window().maximize();\n\t\n\t\n\t}", "@BeforeTest\n\tpublic void LaunchBrowser() {\n\t\t driver = init(\"URL_JQuery\");\n\t\t// driver.get(\"https://jqueryui.com/autocomplete/\");\n\t\t driver.switchTo().frame(0);\n\t\t jq = new JQueryAutocompletePage(driver);\n\t\t \n\t}", "public GoogleAutomation() {\n\t\t\n\t\t//The setProperty() method of Java system class sets the property of the system which is indicated by a key.\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"driver//chromedriver.exe\");\n\t\t\n\t\t//initilize webDriver \n\t\twebDriver = new ChromeDriver();\n\t}", "@BeforeMethod\n\tpublic static void launchDriver() throws MalformedURLException\n\t{\n\t \t\t \n\t\tDesiredCapabilities caps = new DesiredCapabilities();\n\t/* caps.setCapability(\"browser\", \"Chrome\");\n\t caps.setCapability(\"browser_version\", \"60.0\");\n\t caps.setCapability(\"os\", \"Windows\");\n\t caps.setCapability(\"os_version\", \"7\");\n\t caps.setCapability(\"resolution\", \"1024x768\");\n\t caps.setCapability(\"name\", \"Bstack-[Java] Sample Test\");*/\n\t //set from capability generator \n\t caps.setCapability(\"os\", \"Windows\");\n\t caps.setCapability(\"os_version\", \"10\");\n\t caps.setCapability(\"browser\", \"Chrome\");\n\t caps.setCapability(\"browser_version\", \"62.0\");\n\t caps.setCapability(\"project\", \"TestingOnBrowserStack\");\n\t caps.setCapability(\"build\", \"1.0\");\n\t caps.setCapability(\"name\", \"TestBroserStackSel\");\n\t caps.setCapability(\"browserstack.local\", \"false\");\n\t caps.setCapability(\"browserstack.selenium_version\", \"3.5.2\");\n\t \n\t driver = new RemoteWebDriver(new URL(URL), caps);\n\t\tdriver.manage().deleteAllCookies();\n\t\twait = new WebDriverWait(driver, 220);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n\t\t\n\t\t\n\t}", "@BeforeClass\n @Parameters({ \"browser\", \"url\" })\n public void startDriver(@Optional(\"chrome\") String WindowBrowser, @Optional(\"http://computer-database.herokuapp.com/computers\") String URL) {\n\n final String os = System.getProperty(\"os.name\");\n userDirectory = System.getProperty(\"user.dir\");\n Log.info(\"Starting to intialise driver\");\n Log.info(\"OS environment: \" + os);\n Log.info(\"Browser: \" + WindowBrowser);\n if (WindowBrowser.equalsIgnoreCase(BROWSERS.FIREFOX.getBrowserName())) {\n final StringBuilder geckoDriverPath = new StringBuilder();\n geckoDriverPath.append(userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\");\n if (os.contains(OS.MAC.getOsName())) {\n geckoDriverPath.append(File.separator + \"mac\" + File.separator + \"geckodriver\");\n } else if (os.contains(OS.WIN.getOsName())) {\n geckoDriverPath.append(File.separator + \"win\" + File.separator + \"geckodriver.exe\");\n }\n System.setProperty(\"webdriver.gecko.driver\", geckoDriverPath.toString());\n driver = new FirefoxDriver();\n } else if (WindowBrowser.equalsIgnoreCase(BROWSERS.CHROME.getBrowserName())) {\n final StringBuilder chromeDriverPath = new StringBuilder();\n System.out.println(userDirectory);\n chromeDriverPath.append(userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\");\n if (os.contains(OS.MAC.getOsName())) {\n chromeDriverPath.append(File.separator + \"mac\" + File.separator + \"chromedriver\");\n } else if (os.contains(OS.WIN.getOsName())) {\n chromeDriverPath.append(File.separator + \"win\" + File.separator + \"chromedriver.exe\");\n }\n System.setProperty(\"webdriver.chrome.driver\", chromeDriverPath.toString());\n driver = new ChromeDriver();\n } else if (WindowBrowser.equalsIgnoreCase(BROWSERS.SAFARI.getBrowserName())) {\n driver = new SafariDriver();\n }\n driver.manage().window().setSize(new Dimension(1440, 844));\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n BaseURl = URL;\n Log.info(\"Driver initialised successfully\");\n driver.get(BaseURl);\n Log.info(\"Opening URl: \" + URL);\n }", "private void setSauceWebdriver() {\n\n switch (getBrowserId(browser)) {\n case 0:\n capabilities = DesiredCapabilities.internetExplorer();\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n break;\n case 1:\n capabilities = DesiredCapabilities.firefox();\n break;\n case 2:\n capabilities = DesiredCapabilities.safari();\n break;\n case 3:\n capabilities = DesiredCapabilities.chrome();\n break;\n case 4:\n capabilities = DesiredCapabilities.iphone();\n capabilities.setCapability(\"deviceName\",\"iPhone Simulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n case 5:\n capabilities = DesiredCapabilities.iphone();\n capabilities.setCapability(\"deviceName\",\"iPad Simulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n case 6:\n capabilities = DesiredCapabilities.android();\n capabilities.setCapability(\"deviceName\",\"Android Emulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n capabilities.merge(extraCapabilities);\n capabilities.setCapability(\"javascriptEnabled\", true);\n capabilities.setCapability(\"platform\", platform);\n capabilities.setCapability(\"version\", version);\n\n try {\n this.driver.set(new RemoteWebDriver(new URL(System\n .getProperty(\"SAUCE_KEY\")), capabilities));\n } catch (MalformedURLException e) {\n LOGGER.log(Level.INFO,\n \"MalformedURLException in setSauceWebdriver() method\", e);\n }\n }", "@BeforeMethod\r\n\tpublic void Setup()\r\n\t{\n\t\tString strBrowserName=objConfig.getProperty(\"browser\");\r\n\t\tif(strBrowserName.equalsIgnoreCase(\"CHROME\"))\r\n\t\t{\r\n\t\t\tobjDriver=new ChromeDriver();\r\n\t\t}\r\n\t\telse if(strBrowserName.equalsIgnoreCase(\"FIREFOX\"))\r\n\t\t{\r\n\t\t\tobjDriver=new FirefoxDriver();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tobjDriver=new InternetExplorerDriver();\r\n\t\t}\r\n\t\t\r\n\t\t//To open the URL\r\n\t\t\r\n\t\tobjDriver.get(objConfig.getProperty(\"url\"));\r\n\t\t\r\n\t\t//To maximize the browser window.\r\n\t\tif(objConfig.getBooleanProperty(\"runFullScreen\"))\r\n\t\t\tobjDriver.manage().window().maximize();\r\n\r\n\t\t//To set the implicit wait time\r\n\t\tobjDriver.manage().timeouts().implicitlyWait(objConfig.getLongProperty(\"implicitTimeoutInSeconds\"), TimeUnit.SECONDS);\r\n\t\t\r\n\t\t\r\n\t}", "private WebDriver createChromeDriver() {\n\t\tsetDriverPropertyIfRequired(\"webdriver.chrome.driver\", \"chromedriver.exe\");\n\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"disable-plugins\");\n\t\toptions.addArguments(\"disable-extensions\");\n\t\toptions.addArguments(\"test-type\");\n\n\t\t\n\t\t_driver = new ChromeDriver(options);\n\t\treturn _driver;\n\t}", "@BeforeMethod\n public void acilis() {\n// WebDriverManager.chromedriver().setup();\n// driver = new ChromeDriver();\n Driver.getDriver().manage().window().maximize();\n Driver.getDriver().manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n System.out.println(\"TestNG\");\n actions = new Actions(Driver.getDriver());\n }", "public Start (WebDriver driver) {\n\t\tthis.driver=driver;\n\t}", "public static void openBrowser() {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n // === Google Chrome Browsers === //\n CHOSEN_BROWSER = CHROME;\n driver.manage().window().maximize();\n }", "@Given(\"browser is open\")\n\tpublic void browser_is_open() {\n\t\tSystem.out.println(\"browseris open\");\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"/home/rahul/Desktop\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().timeouts().implicitlyWait(40,TimeUnit.SECONDS);\n\t\t\n\t}", "@Given(\"^the user launch chrome application$\")\r\n\tpublic void the_user_launch_chrome_application() throws Throwable {\n\t w.browser();\r\n\t}", "public GAfterSearch(WebDriver chromeDriver) {\n super.chromeDriver = chromeDriver;\n }", "@Parameters(\"browser\")\n\t \n @BeforeTest\n // Passing Browser parameter from TestNG xml\n \n public void beforeTest(String browser){\n\t if(browser.equalsIgnoreCase(\"firefox\")){\n\t driver = new FirefoxDriver();\n\t \n\t }// If browser is IE, then do this\n\t else if (browser.equalsIgnoreCase(\"ie\")){ \n\t // Here I am setting up the path for my IEDriver\n\t System.setProperty(\"webdriver.ie.driver\", \"E:\\\\IEDriverServer.exe\");\n\t driver = new InternetExplorerDriver();\n\t } \n\t // Doesn't the browser type, lauch the Website\n\t browserHelper.setUp(driver);\n\t }", "@Test\r\n\tpublic void tc1(){\r\n\t\tWebDriverManager.chromedriver().setup();\r\n\t\tdriver=new ChromeDriver();\r\n\t\tdriver.get(\"https://www.seleniumhq.org/download/\");\r\n\t\tString title = driver.getTitle();\r\n\t\tSystem.out.println(title);\r\n\t\tdriver.close();\r\n\t}", "public static void main(String[] args) throws IOException {\n\r\n\r\n\t WebDriver driver;\r\n\t ChromeOptions options=new ChromeOptions();\r\n\t options.addArguments(\"C:\\\\chromedriver.exe\"); \r\n\t\tDesiredCapabilities capabilities=DesiredCapabilities.chrome();\r\n\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY,options);\r\n\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n driver.get(\"http://www.baidu.com\");\r\n \r\n \r\n \r\n//\t\tWebDriver driver;\r\n//\t\tProfilesIni allProfiles =new ProfilesIni();\r\n// FirefoxProfile profile=allProfiles.getProfile(\"default\");\r\n// DesiredCapabilities capabilities=DesiredCapabilities.firefox();\r\n//\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n//\t\tdriver.get(\"http://www.baidu.com\");\r\n\t}", "@BeforeMethod\n\tpublic void registerChromeDriver() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\"/Users/shwetasharma/Documents/softwares/chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tutil = new Utils(driver);\n\t\t// Put a Implicit wait, this means that any search for elements on the\n\t\t// page\n\t\t// could take the time the implicit wait is set for before throwing\n\t\t// exception\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\t// Launch the Applitools hackathon Website\n\t\tdriver.get(\"https://demo.applitools.com/hackathon.html\");\n\t\tdriver.manage().window().maximize();\n\n\t}", "public static void setChromeDriverProperty() {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\automation_new_code\\\\onfs.alip.accounting\\\\BrowserDriver/chromedriver.exe\");\n\t\t}", "public static void openBrowser() {\r\n\t\tString browser = prop.getProperty(\"browserType\").toLowerCase();\r\n\r\n\t\ttry {\r\n\t\t\tif (browser.equals(\"chrome\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"chromeName\"), prop.getProperty(\"chromePath\"));\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ff\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"FFName\"), prop.getProperty(\"FFPath\"));\r\n\t\t\t\tdriver = new FirefoxDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ie\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"IEName\"), prop.getProperty(\"IEPath\"));\r\n\t\t\t\tdriver = new InternetExplorerDriver();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t\tdriver=new FirefoxDriver();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//ChromePOM pom=new ChromePOM(driver);\r\n\t\t\r\n\t\t\r\n\t}" ]
[ "0.8135636", "0.80236727", "0.789142", "0.77268094", "0.76564777", "0.76478505", "0.76322246", "0.75341237", "0.7529616", "0.7515268", "0.75112075", "0.7509815", "0.7482996", "0.7466539", "0.746335", "0.7461419", "0.7453724", "0.74350536", "0.7422387", "0.74214137", "0.74071556", "0.7402564", "0.73721814", "0.73618615", "0.7354695", "0.73453593", "0.734497", "0.7340078", "0.7331278", "0.73285884", "0.73168963", "0.72931", "0.7288773", "0.72841007", "0.72491986", "0.72374105", "0.7234055", "0.7223104", "0.7216317", "0.7204324", "0.7198556", "0.7175215", "0.7168778", "0.7167649", "0.71667963", "0.7163964", "0.71596974", "0.71572936", "0.7136151", "0.71349627", "0.7119399", "0.7118722", "0.7114629", "0.7110821", "0.70966625", "0.7092925", "0.7090071", "0.7083235", "0.708112", "0.7079316", "0.70733446", "0.70728934", "0.70719457", "0.7061579", "0.7060362", "0.7052346", "0.7049983", "0.7041804", "0.7041557", "0.70346886", "0.7024342", "0.7023899", "0.7015705", "0.701569", "0.70138365", "0.6998363", "0.69978213", "0.69946975", "0.6988624", "0.69788086", "0.69756395", "0.6964051", "0.6946168", "0.6945276", "0.69447714", "0.6939265", "0.69290596", "0.6920751", "0.69067043", "0.69026893", "0.6902153", "0.69006604", "0.6897486", "0.68963635", "0.68826735", "0.687148", "0.6856075", "0.6832561", "0.6823406", "0.6822672", "0.6818761" ]
0.0
-1
/ Showing splash screen with a timer. This will be useful when you want to show case your app logo / company
@Override public void run() { // This method will be executed once the timer is over // Start your app main activity Intent i = new Intent(SplashScreen.this, MainActivity.class); startActivity(i); // close this activity finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void displaySplashScreen() {\n\t\t// Creates new thread to act as timer.\n\t\tThread logoTimer = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\n\t\t\t\t\tint logoTimer = 0;\n\t\t\t\t\t// Pauses for SPLASH_TIME amount of time\n\t\t\t\t\twhile (logoTimer < SPLASH_TIME) {\n\t\t\t\t\t\tsleep(100);\n\t\t\t\t\t\tlogoTimer = logoTimer + 100;\n\t\t\t\t\t}\n\t\t\t\t\t// Calls the activity from manifest.xml\n\t\t\t\t\tIntent intent = new Intent(getApplicationContext(),\n\t\t\t\t\t\t\tMenuActivity.class);\n\t\t\t\t\tintent.putExtra(\"connect\", connect);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Starts the thread.\n\t\tlogoTimer.start();\n\t}", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_splash_screen);\r\n StartAnimations();\r\n\r\n new Handler().postDelayed(new Runnable() {\r\n\r\n\r\n @Override\r\n public void run() {\r\n // This method will be executed once the timer is over\r\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n finish();\r\n }\r\n }, 5000);\r\n }", "private void SplashScreen() {\n// if (!mSettings.getBoolean(\"PlayedBefore\", false)) {\n// mSolitaireView.DisplaySplash();\n// }\n splas.setVisibility(View.VISIBLE);\n Handler h = new Handler(Looper.getMainLooper());\n h.postDelayed(new Runnable() {\n @Override\n public void run() {\n splas.setVisibility(View.GONE);\n }\n }, 3000);\n }", "public void showSplashScreen() {\r\n\r\n JPanel content = (JPanel) getContentPane();\r\n content.setBackground(Color.white);\r\n\r\n // setting the window's properties\r\n \r\n int width = 700;\r\n int height = 438;\r\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screen.width - width) / 2;\r\n int y = (screen.height - height) / 2;\r\n setBounds(x, y, width, height);\r\n\r\n // build the splash screen using an image \r\n \r\n JLabel gifImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/splash.gif\")));\r\n content.add(gifImage, BorderLayout.CENTER);\r\n\r\n // display it\r\n setVisible(true);\r\n\r\n new resourceLoader().execute();\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash);\n ButterKnife.inject(this);\n\n if(getResources().getBoolean(R.bool.isTablet)){\n lyMain.setBackgroundResource(R.drawable.ic_tablet_splash);\n }else {\n lyMain.setBackgroundResource(R.drawable.ic_smatphone_splash);\n }\n\n Thread timerThread = new Thread() {\n public void run() {\n try {\n sleep(3000);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n startActivity(new Intent(SplashActivity.this, ApplicationsGridActivity.class));\n }\n }\n };\n timerThread.start();\n\n }", "public frmSplashScreen() {\n initComponents();\n this.setLocationRelativeTo(null);\n timer.start();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_splash_screen);\n\t\tnm1 = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); //Declaracion de notificacion\n\t\t\n\t\tTimerTask task = new TimerTask(){\n\t\t @Override\n\t public void run() {\n\t Intent mainIntent = new Intent().setClass(SplashScreen.this, MainActivity.class);\n\t startActivity(mainIntent);\n\t finish();//Destrucion de la actividad, usuario no tendra oportunidad de verla hasta reiniciar\n\t }\t\t\n\t};\n\tTimer timer = new Timer();\n\ttimer.schedule(task, splashDelay); //Pasando los 6 segundos entramos a la tarea en si\n\tnoti1();\n\t}", "private void showSplashScreen() {\n splashDialog = new SplashScreenDialog(this);\n splashDialog.show();\n }", "@Override\n public void showSplash() {\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n Thread timerThread = new Thread() {\n public void run() {\n try {\n sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n if (user != null) {\n redireccionar();\n }else{\n Intent intent = new Intent(SplashScreen.this, Login.class);\n startActivity(intent);\n }\n\n }\n }\n };\n timerThread.start();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n //TODO: add any code you want to do while the splash screen is showing before the MainActivity is shown\n\n// try {\n// Thread.sleep(5000);\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "private static void splashScreen() {\n\t\t\n\t\tString message = \"Welcome to JProject v\"+VERSION+\"\\nby Gabriel Skoropada\";\n\t\t\n\t\tJOptionPane.showMessageDialog(null, message, \"JProject v\"+VERSION, JOptionPane.NO_OPTION, null);\n\t\t\n\t}", "public static void splashScreen() {\n System.out.println(printLine(\"-\",100));\n System.out.println(\"Welcome to KaviBase\"); // Display the string.\n System.out.println(\"Version \" + getVersion());\n System.out.println(getCopyright());\n System.out.println(\"\\nType \\\"help;\\\" to display supported commands.\");\n System.out.println(\"\\nEvery command should end with semicolon ;\");\n System.out.println(printLine(\"-\",100));\n }", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n requestWindowFeature(1);\n getWindow().setFlags(1024, 1024);\n setContentView(R.layout.activity_splash_screen);\n new Handler().postDelayed(new Runnable() {\n public void run() {\n SplashScreen.this.startActivity(new Intent(SplashScreen.this, MainActivity.class));\n SplashScreen.this.finish();\n }\n }, 3000);\n }", "@Override\r\n public void run() {\r\n // This method will be executed once the timer is over\r\n // Start your app main activity\r\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n\r\n // close this activity\r\n finish();\r\n }", "public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n\r\n // Do not display title bar, this makes the splash screen really full screen\r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n \r\n // Check if we need to display the splash screen. If no, go directly to the main intent\r\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\r\n boolean showscreen = prefs.getBoolean(\"showsplashscreen\", true);\r\n if (! showscreen) {\r\n \t gotoMainIntent();\r\n \t return;\r\n }\r\n \r\n\r\n // Set the layout\r\n setContentView(R.layout.splash);\r\n\r\n // This will run after a specified time (SPLASH_DISPLAY_LENGHT milliseconds)\r\n new Handler().postDelayed(new Runnable(){\r\n public void run() {\r\n \t gotoMainIntent();\r\n }\r\n }, SPLASH_DISPLAY_LENGHT);\r\n }", "public static void splashScreen() {\n System.out.println(line(\"-\", 80));\n System.out.println(\"Welcome to DavisBaseLite\"); // Display the string.\n System.out.println(\"DavisBaseLite Version \" + getVersion());\n System.out.println(getCopyright());\n System.out.println(\"\\nType \\\"help;\\\" to display supported commands.\");\n System.out.println(line(\"-\", 80));\n }", "public SplashScreen(String image, int showTime)\r\n {\r\n\tlogo = new ImageIcon(image);\r\n\r\n\tContainer splashPanel = getContentPane();\r\n\tsplashPanel.setLayout(new BorderLayout());\r\n\tBorder bd1 = BorderFactory.createBevelBorder(BevelBorder.RAISED);\r\n\tBorder bd2 = BorderFactory.createEtchedBorder();\r\n\tBorder bd3 = BorderFactory.createCompoundBorder(bd1, bd2);\r\n\t((JPanel) splashPanel).setBorder(bd3);\r\n\r\n\tsplashPanel.add(\"Center\", new JLabel(logo, JLabel.CENTER));\r\n\r\n\tsetUndecorated(true);\r\n\tshowFor(showTime);\r\n }", "private void splashScreen() {\r\n\t\t// Clear the screen, reset the level, and display the legend\r\n\t\tclear();\r\n\t\tdisplay.setLegend(\"Asteroids\");\r\n\r\n\t\t// Place four asteroids near the corners of the screen.\r\n\t\tplaceAsteroids();\r\n\t}", "private void showSplash() {\n \t\tthis.splashInfoContainer.setVisibility( View.VISIBLE );\n \t}", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.activity_splash_screen);\n\n intent = new Intent(this, MainActivity.class);\n\n\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n\n //Start MainActivity\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);\n }\n super.onCreate(savedInstanceState);\n setContentView(R.layout.helal_haram_splash);\n\n initViews();\n alphaAnimation(img);\n\n\n // splash efect kodu\n /* Thread timerThread = new Thread(){\n public void run(){\n try{\n sleep(1200);\n }catch(InterruptedException e){\n e.printStackTrace();\n }finally{\n\n Intent intent = new Intent(Splash.this, MainActivity.class);\n startActivity(intent);\n\n }\n }\n };\n timerThread.start();\n */\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n UserInfoData entry = new UserInfoData(this);\n \t\n \tentry.open();\n \t\n \tfinal String data = entry.getData();\n \t\n \tentry.close();\n Thread splashTimer = new Thread(){\n \tpublic void run(){\n \t\ttry{\n \t\t\tsleep(3000);\n \t\t\t\n \t}\n \t\tcatch(InterruptedException e){\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n finally{\n \tif (!data.equals(\"\")){\n \t\t\tstartActivity(new Intent (\"com.JacobyApps.android.mainMenu\")); \n \t}\n \t\telse{\n \n startActivity(new Intent (\"android.intent.action.Signup\"));\n \t}\n \tfinish();\n \t \n }\n \t \n \t}\n \t\n };\n splashTimer.start();\n }", "@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n Intent i = new Intent(SplashScreen.this, LoginScreen.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n\n // close this activity\n finish();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash__screen);\n\n\n Thread splashTread = new Thread() {\n @Override\n public void run() {\n try {\n int waited = 0;\n while (_active && (waited < _splashTime)) {\n sleep(3000);\n if (_active) {\n waited += 3000;\n }\n }\n } catch (Exception e) {\n\n } finally {\n\n startActivity(new Intent(Splash_Screen.this,\n MainActivity.class));\n finish();\n }\n };\n };\n splashTread.start();\n\n// Thread thread = new Thread(){\n//\n// @Override\n// public void run() {\n// try {\n// sleep(SPLASH_DISPLAY_LENGTH);\n// Intent intent = new Intent(getApplicationContext(),MainActivity.class);\n// startActivity(intent);\n// finish();\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n// }\n// };\n//\n// thread.start();\n\n\n }", "@Override \r\n public void onCreate(Bundle icicle) { \r\n super.onCreate(icicle);\r\n \r\n getWindow().setFormat(PixelFormat.RGBA_8888);\r\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);\r\n setContentView(R.layout.splash_activity);\r\n \r\n //Display the current version number \r\n PackageManager pm = getPackageManager(); \r\n try {\r\n \tPackageInfo pi = pm.getPackageInfo(\"org.mems\", 0);\r\n TextView versionNumber = (TextView) findViewById(R.id.versionNumber); \r\n versionNumber.setText(\"Version \" + pi.versionName); \r\n } catch (NameNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n new Handler().postDelayed(new Runnable() {\r\n public void run() { \r\n \tIntent mainIntent = new Intent(SplashActivity.this, MainActivity.class); \r\n \tSplashActivity.this.startActivity(mainIntent); \r\n \tSplashActivity.this.finish(); \r\n } \r\n }, 2000); //2000 for release \r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n \n mp = MediaPlayer.create(this, R.raw.love_story);\n mp.start();\n \n Thread logoTimer = new Thread(){\n \tpublic void run(){\n \t\ttry{\n \t\t\tint logoTimer = 0;\n \t\t\twhile(logoTimer<5000){\n \t\t\t\tsleep(100);\n \t\t\t\tlogoTimer = logoTimer +100;\n \t\t\t}\n \t\t\tstartActivity(new Intent(\"com.crognar.CLEARSCREEN\"));\n \t\t\t//clearscreen mag anders\n \t\t} \n \t\t\n \t\tcatch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n \t\t\n \t\tfinally{\n \t\t\tfinish();\n \t\t}\n \t}\n };\n logoTimer.start();\n }", "@Override\n public void onStart() {\n super.onStart();\n waitForSplashAnimation(SPLASH_SCREEN_DELAY);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\t\tsound = MediaPlayer.create(this,R.raw.sound);\n\t\tsound.start();\n\t\tThread timer = new Thread(){\n\t\t\tpublic void run(){\n\t\t\t\ttry{\n\t\t\t\t\tsleep(6300);\n\t\t\t\t}catch(InterruptedException e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}finally{\n\t\t\t\t\tIntent window = new Intent(\"android.intent.action.Menu\");\n\t\t\t\t\tstartActivity(window);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\ttimer.start();\n\t}", "@Override\n public void onCreate(final Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.splash_screen);\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(() -> {\n Intent mainIntent = new Intent(SplashScreen.this, MainActivity.class);\n SplashScreen.this.startActivity(mainIntent);\n SplashScreen.this.finish();\n }, SPLASH_DISPLAY_SECONDS * 1000);\n }", "public void showSplashScreen(View view) {\n // start the splash screen to show information\n Intent intent = new Intent(LoginActivity.this, InformationActivity.class);\n startActivity(intent);\n }", "public void splash(){\n ImageView splash = (ImageView) findViewById(R.id.mekslogo);\n Animation animation1 =\n AnimationUtils.loadAnimation(getApplicationContext(),\n R.anim.clockwise);\n animation1.setDuration(5000);\n splash.startAnimation(animation1);\n animation1.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n // Toast.makeText(getApplicationContext(),\"Animation ended\",Toast.LENGTH_SHORT).show();\n Intent intent=new Intent(MainActivity.this, sign_up.class);\n startActivity(intent);\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n\n }\n });\n }", "private void showSplash ()\n {\n ResourceBundle resourceBundle = null;\n try\n {\n resourceBundle = ResourceBundle.getBundle(\"splash\", Locale.getDefault());\n }\n catch (MissingResourceException ignored)\n {\n System.out.println(\"Info: file splash.properties not found in resources root directory.\");\n }\n\n FXMLLoader fxmlLoader = new FXMLLoader();\n if (resourceBundle != null)\n {\n fxmlLoader.setResources(resourceBundle);\n }\n try\n {\n primaryStage.setScene(new Scene(fxmlLoader.load(getClass().getResourceAsStream(\"/splash.fxml\"))));\n primaryStage.initStyle(StageStyle.UNDECORATED);\n primaryStage.centerOnScreen();\n primaryStage.show();\n }\n catch (NullPointerException ignored)\n {\n System.out.println(\"Info: file splash.fxml not found in resources root directory.\");\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic void init() throws Exception {\n\t\ttry {\n\t\t\tThread.sleep(SPLASH_SCREEN_TIMER);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n checkMainSetupCompletion();\n Intent i;\n if(isPermanentlySkipped == 1 || isFacebookLoggedIn == 1 )\n i = new Intent(SplashScreen.this, menuActivity.class);\n else\n i = new Intent(SplashScreen.this, MainActivity.class);\n startActivity(i);\n // close this activity\n finish();\n }", "public static void hideSplashScreen() {//todo: is this useful ?????.....\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n if (splashScreen != null) {\n splashScreen.setVisible(false);\n splashScreen.dispose();\n }\n }\n });\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n\n }", "public void showFor(int showTime)\r\n {\r\n\tsetSize(logo.getIconWidth(), logo.getIconHeight());\r\n\r\n\tDisplayMode screenDisp = getGraphicsConfiguration().getDevice().getDisplayMode();\r\n\tsetLocation((screenDisp.getWidth()/2)-getSize().width/2, (screenDisp.getHeight()/2)-getSize().height/2);\r\n\r\n\tsetVisible(true);\r\n\ttry\r\n\t {\r\n\t\tThread.sleep(showTime);\r\n\t } \r\n\tcatch(InterruptedException e) {}\r\n\tsetVisible(false);\r\n }", "private void goToMainScreen() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent;\n\n MainActivity act = new MainActivity();\n Intent intent = new Intent(getApplication(), MainActivity.class);\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGHT);\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n\t\t/* layout splashscreen dengan background gambar */\n setContentView(R.layout.activity_spalsh);\n\t/* handler untuk menjalankan splashscreen selama 5 detik lalu\n\t * membuat HomeActivity\n\t */\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent = null;\n\n mainIntent = new Intent(SpalshActivity.this,\n HomeActivity.class);\n\n SpalshActivity.this.startActivity(mainIntent);\n SpalshActivity.this.finish();\n overridePendingTransition(R.layout.fadein,R.layout.fadeout);\n\n\n }\n }, SPLASH_DISPLAY_LENGHT);\n }", "private static void hideSplashScreen() {\n if (splash != null) {\n splash.dispose();\n splash = null;\n }\n }", "public void run() {\n Intent i = new Intent(activity_splash.this, MainActivity.class);\r\n startActivity(i); // menghubungkan activity splashscren ke xml\r\n //jeda selesai Splashscreen\r\n this.finish();\r\n }", "public void run(){\r\n try{\r\n \tsleep(DURACION_SPLASH);\r\n }catch(InterruptedException e){\r\n //Si no puedo ejecutar el sleep muestro el error\r\n e.printStackTrace();\r\n }finally{\r\n //Llamo a la nueva actividad\r\n Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);\r\n \tstartActivity(intent);\r\n \tfinish();\r\n } \r\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.logo_show);\n\t\tnew Thread(new Runnable() { \n @Override\n public void run() {\n // TODO Auto-generated method stub\n try {\n Thread.sleep(2000);\n Intent i = new Intent(ScreenLogo.this, MusicProject.class);\n startActivity(i);\n ScreenLogo.this.finish();\n //handler.sendMessage(handler.obtainMessage(1));\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }).start();\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tgetWindow().requestFeature(Window.FEATURE_NO_TITLE);\r\n\r\n\t\t/** Making this activity, full screen */\r\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\r\n\t\t\t\tWindowManager.LayoutParams.FLAG_FULLSCREEN);\r\n\t\tsetContentView(R.layout.activity_splashscreen);\r\n\t\tCountDown _tik;\r\n\t\t_tik = new CountDown(2000, 2000, this, MainActivity.class);// It delay the screen for 2.5 second and after that switch to YourNextActivity\r\n\t\t_tik.start();\r\n\r\n\t\tinitTypeface();\r\n\r\n\t}", "@Override\n public void run() {\n\n\n if(sessionManager.isLoggedIn()){\n\n // This method will be executed once the timer is over\n // Start your app main activity\n mDilatingDotsProgressBar.hideNow();\n Intent i = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(i);\n\n }else{\n\n // This method will be executed once the timer is over\n // Start your app main activity\n mDilatingDotsProgressBar.hideNow();\n Intent i = new Intent(SplashActivity.this, LoginActivity1.class);\n startActivity(i);\n }\n\n\n\n\n }", "public SplashScreen() {\r\n instance = this;\r\n\r\n width = 600;\r\n height = 600;\r\n\r\n icon = \"graphics/application/icon_96.png\";\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash_screen);\n\n pref = getApplicationContext().getSharedPreferences(AppConstants.mypreference, Context.MODE_PRIVATE);\n\n\n // ************************** SCREEN DISPLAY FOR SOMETIMES ******************************************\n\n final int welcomeScreenDisplay = 1500;\n /** create a thread to show splash up to splash time */\n Thread welcomeThread = new Thread()\n {\n int wait = 0;\n\n @Override\n public void run()\n {\n try\n {\n super.run();\n /**\n * use while to get the splash time. Use sleep() to increase\n * the wait variable for every 100L.\n */\n while (wait < welcomeScreenDisplay)\n {\n sleep(100);\n wait += 100;\n }\n }\n catch (Exception e) {\n System.out.println(\"EXC=\" + e);\n }\n finally {\n /**\n * Called after splash times up. Do some action after splash\n * times up. Here we moved to another main activity class\n */\n String getStatus=pref.getString(AppConstants.IS_LOGIN, \"null\");\n if(getStatus.equals(\"true\"))\n {\n Intent i=new Intent(getApplicationContext(),WelcomeScreen.class);\n startActivity(i);\n finish();\n\n }else\n {\n //first time\n Intent i=new Intent(getApplicationContext(),LoginScreen.class);\n startActivity(i);\n finish();\n\n }\n\n }\n }\n };\n welcomeThread.start();\n\n }", "@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n if (serverUrl != null)\n emerTokenApiCall();\n else {\n Bundle bndlanimation = ActivityOptions.makeCustomAnimation(SplashScreenActivity.this, R.anim.anim_out, R.anim.anim_in).toBundle();\n Intent i = new Intent(SplashScreenActivity.this, CompanyDomainActivity.class);\n startActivity(i, bndlanimation);\n SplashScreenActivity.this.finish();\n }\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n makeActivityFullScreen();\n setContentView(R.layout.activity_splash);\n }", "@Override\n public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n //Assign the splashscreen_activity_main layout to the SplashScreenActivity\n setContentView(R.layout.splashscreen_activity_main);\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n Intent mainIntent = new Intent(SplashscreenActivity.this, MainActivity.class);\n SplashscreenActivity.this.startActivity(mainIntent);\n //We call finish() function to prevent user to come back to splashScreen\n SplashscreenActivity.this.finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "public static void main(String args[]) \n {\n //declare constant to hold the speed of the loader\n final int LOAD_SPEED = 10;\n //create the new splash screen called mySplash\n TspSplash mySplash = new TspSplash();\n //center splash\n mySplash.setLocationRelativeTo(null);\n //set icon \n mySplash.setIconImage(Toolkit.getDefaultToolkit().getImage\n (\"src/Images/Salesperson.png\")); \n //make splash visible\n mySplash.setVisible(true);\n \n try\n {\n //create a variable which will count loop to 100, incrementing by\n //one until it reaches 100\n for(int loader = 0; loader <= 100; loader++)\n {\n //set speed of counter (miliseconds)\n Thread.sleep(LOAD_SPEED);\n //display the counter in the loading label\n mySplash.loadingJLabel.setText(\"Loading \" \n + Integer.toString(loader) + \"%\");\n //increment the progress bar with the counter\n mySplash.splashJProgressBar.setValue(loader);\n //when the loop gets to 100, close the splash screen\n if (loader == 100)\n {\n //when loader is done, close the splash screen\n mySplash.dispose();\n }\n }\n }\n catch (Exception exp)\n {\n JOptionPane.showMessageDialog(null, \"Loading error--\" \n + \"Cannot load splash\");\n }\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() \n {\n public void run() \n {\n new TspGUI().setVisible(true);\n }\n });\n }", "@Override\n\t\t public void run() {\n\t\t \tsetContentView(R.layout.activity_splash);\n\t\t }", "@Override\r\n\t\t public void run() {\n\t\t Intent i = new Intent(SplashScreen.this, MainMenuActivity.class);\r\n\t\t startActivity(i);\r\n\t\t \r\n\t\t //Menyelesaikan Splashscreen\r\n\t\t finish();\r\n\t\t }", "private void hideSplash() {\n \t\tthis.splashInfoContainer.startAnimation( this.splashFadeOut );\n \t}", "public static void main(String[] args) {\n\t\t// Define new Runnable for splash screen execution\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tSplashScreenView splash;\n\t\t\tTimer timer;\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\t// Create splash screen boundary object and set visible\n\t\t\t\t\tsplash = new SplashScreenView();\n\t\t\t\t\tsplash.setVisible(true);\n\n\t\t\t\t\t// Begin timer for 2 seconds to display\n\t\t\t\t\ttimer = new Timer(2000, new ActionListener(){ \n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t// Create event on timer completion that hide the splash screen, and creates\n\t\t\t\t\t\t\t// the Kabasuji and corresponding view for interactions\n\t\t\t\t\t\t\tsplash.setVisible(false);\n\t\t\t\t\t\t\tKabasuji game = new Kabasuji();\n\t\t\t\t\t\t\tLevelSelectorView window = new LevelSelectorView(game);\n\n\t\t\t\t\t\t\t// allow controller to set up GUI based on the levels loaded by 'game'\n\t\t\t\t\t\t\tStartLevelSelectorController selectorController = new StartLevelSelectorController(window, game);\n\t\t\t\t\t\t\tselectorController.process();\n\n\t\t\t\t\t\t\t// show window\n\t\t\t\t\t\t\twindow.setVisible(true);\n\t\t\t\t\t\t\tImageIcon image = new ImageIcon(StartKabasuji.class.getResource(\"/images/heineman.jpg\"));\n\t\t\t\t\t\t\twindow.setIconImage(image.getImage().getScaledInstance(40, 40, 0));\n\t\t\t\t\t\t\tSystem.out.println(image);\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// Start the timer and ensure it only runs once\n\t\t\t\t\ttimer.setRepeats(false);\n\t\t\t\t\ttimer.start();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tThread.sleep(3000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tIntent it=new Intent(Splash.this,DashboardActivity.class);\n\t\t\tstartActivity(it);\n\t\t\tfinish();\n\t\t}", "private void setupSplash() {\n \t\tthis.splashInfoContainer = (LinearLayout) this.findViewById( R.id.edit_gpsfilter_area_splash );\n \n \t\tTextView textView = (TextView) this.splashInfoContainer.findViewById( R.id.edit_gpsfilter_area_splash_text );\n \t\ttextView.setText( Html.fromHtml( this.getString( R.string.edit_gpsfilter_area_splash_text ) ) );\n \n \t\t// Define fade out animation.\n \t\tthis.splashFadeOut = new AlphaAnimation( 1.00f, 0.00f );\n \t\tthis.splashFadeOut.setDuration( SPLASH_FADE_DELAY );\n \t\tthis.splashFadeOut.setAnimationListener( new AnimationListener() {\n \t\t\tpublic void onAnimationStart( Animation animation ) {\n \t\t\t}\n \n \t\t\tpublic void onAnimationRepeat( Animation animation ) {\n \t\t\t}\n \n \t\t\tpublic void onAnimationEnd( Animation animation ) {\n \t\t\t\tsplashInfoContainer.setVisibility( View.GONE );\n \t\t\t}\n \t\t} );\n \n \t\t// Don't show if not new and we got polygon.\n \t\tif ( !this.isConsideredFresh() ) {\n \t\t\tthis.splashInfoContainer.setVisibility( View.GONE );\n \t\t}\n \t}", "public ScreenSplash() {\n initComponents();\n this.setCursor(new Cursor(HAND_CURSOR));\n setBackground(new Color(0, 0, 0, 0));\n }", "public S<T> splash(int time,final String nextActivity){\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n to(nextActivity);\n activity.finish();\n }\n }, time);\n \n\t\treturn this;\n\t}", "public void initApp() {\n \tint ms = (int) Math.round(1000d / Settings.getFramesPerSecond());\n \ttimer = new Timer(ms, this);\n \ttimer.start();\n setBackground(new Color(35, 35, 35));\n Dimension d = new Dimension(Settings.getGridDimensions());\n d.setSize(d.getWidth() + Settings.getBoxSize() * 4 + 80, d.getHeight());\n setPreferredSize(d);\n setFocusable(true);\n }", "@Override\n public void run() {\n progressBar.setVisibility(View.GONE);\n // Esse método será executado sempre que o timer acabar\n // E inicia a activity principal\n Intent i = new Intent(SplashAct.this, LogEnter.class);\n startActivity(i);\n\n // Fecha esta activity\n finish();\n }", "@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n if (flag == true) {\n Intent intent = new Intent(SplashActivity.this, DashBoard.class);\n finish();\n startActivity(intent);\n }\n else {\n Intent intent1 = new Intent(SplashActivity.this, LoginActivity.class);\n finish();\n startActivity(intent1);\n }\n\n\n // close this activity\n finish();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\t\tMyThread myThread=new MyThread();\n\t myThread.start();\n\t}", "public void startSplashGameOver(){\r\n\t\t\r\n\t\tpanel[CurrentPanel].stop();\r\n\t\t\r\n\t\tDriver.panel[CurrentPanel].setVisible(false);\r\n\t\tgame.remove(panel[CurrentPanel] );\r\n\t\t\r\n\t\tCurrentPanel = 0;\r\n\t\t\r\n\t\t\r\n\t\tpanel[CurrentPanel] = new Splash(this);\r\n\t\t\r\n\t\tadd( panel[CurrentPanel] );\r\n\t\tpanel[CurrentPanel].setVisible(true);\r\n\t\tgame.setVisible(true);\r\n\t\t\r\n\t\tpanel[CurrentPanel].start();\r\n\t\t\r\n\t}", "@Override\n public void run() {\n SplashScreen.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n startActivity(new Intent(SplashScreen.this,MainActivity.class));\n finish();\n\n }\n });\n }", "void setSplashContentView() {\n// verifyUser = PreferenceHelper.isVerifyMail(getContext());\n // user is logged in app and is active.\n view.setSplashViewLayout(R.layout.activity_splash);\n\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\n\t\tRunnable showMain = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tIntent intent = new Intent(SplashActivity.this, KeepErAppyActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tLog.i(Util.TAG, \"SplashActivity.onCreate.run\");\n\t\t\t}\n\t\t};\n\n\t\tView vw = findViewById(R.id.big_beer);\n\t\tvw.postDelayed(showMain, 1000);\n\t\tLog.i(Util.TAG, \"SplashActivity.onCreate\");\n\t}", "private void waitForSplashAnimation(int duration) {\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n clearAndStartActivity(new Intent(SplashActivity.this, MainMenuActivity.class));\n }\n\n }, duration);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n ImageView image = (ImageView)findViewById(R.id.logo);//logo image\n Animation animation1 =\n AnimationUtils.loadAnimation(getApplicationContext(), R.anim.side_slide); //animation\n image.startAnimation(animation1);\n TextView t = (TextView) findViewById(R.id.textView2);\n t.startAnimation(animation1);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n\n Intent mySuperIntent = new Intent(MainActivity.this, Main2Activity.class);//link to main activity 2\n startActivity(mySuperIntent);\n finish();\n }\n }, SPLASH_TIME);\n }", "public Splash() {\n initComponents();\n }", "public Splash() {\n initComponents();\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// This method will be executed once the timer is over\n\t\t\t\t\t\t// Start your app main activity\n\t\t\t\t\t\tIntent i = new Intent(WelcomeScreen.this,\n\t\t\t\t\t\t\t\tLoginActivity.class);\n\t\t\t\t\t\tstartActivity(i);\n\n\t\t\t\t\t\t// close this activity\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.sample);\n\n splash = findViewById(R.id.splashscreen);\n\n splash.startAnimation(\n AnimationUtils.loadAnimation(this, R.anim.rotation) );\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n Intent mainIntent = new Intent(Sample.this,WebviewActivity.class);\n Sample.this.startActivity(mainIntent);\n Sample.this.finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n SplashScreen.show(this); // here\n super.onCreate(savedInstanceState);\n }", "static void renderSplashFrame(Graphics2D g) {\n\t\tfinal String version = \"Release: 2.1.1 - release date: 2022-07-31\";\r\n\t\tg.setComposite(AlphaComposite.Clear);\r\n\t\tg.fillRect(120, 140, 200, 40);\r\n\t\tg.setPaintMode();\r\n\t\tg.setColor(Color.BLACK);\r\n\t\tg.drawString(\"Loading \" + version + \"...\", 120, 350);\r\n\t}", "public static void showSplashScreen(Class cls, String propFile) {//todo: is this useful ?????.....\n final Class appClass = cls;\n final String resPropFile = propFile;\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n if (splashScreen == null) {\n String filename = \"\";\n String resFile = CoreUtil.getPathOnly(appClass.getName(), true) + \"resources.\" + resPropFile;\n try {\n filename = ResourceBundle.getBundle(resFile)\n .getString(\"image.SplashScreenImage\");\n } catch (MissingResourceException e) {\n System.out.println(\"java.util.MissingResourceException: Couldn't find value for: image.SplashScreenImage\");\n }\n String path = \"resources/images/\" + filename;\n ImageIcon img = new ImageIcon(appClass.getResource(path));\n splashScreen = new JWindow();\n splashLabel = new JLabel(img);\n splashScreen.getContentPane().add(splashLabel);\n splashScreen.pack();\n }\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n splashScreen.setLocation(screenSize.width / 2 - splashScreen.getSize().width / 2,\n screenSize.height / 2 - splashScreen.getSize().height / 2);\n splashScreen.setVisible(true);\n }\n });\n }", "@Override\n\tpublic Screen getStartScreen() {\n\t\treturn new Splash(this);\n\t}", "public void start() {\n\t\tFile splashFile = new File(\"Splash\", \"title\");\r\n\t\tsplashString = TextFileReader.getContents(splashFile);\r\n\t\tsendOutput(splashString);\r\n\t\tsendOutput(\"Version \" + versionNum);\r\n\t\tsendOutput(\"by \" + author);\r\n\t\tprintMenu();\r\n\t}", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.splashscreen);\n ((LinearLayout)findViewById(R.id.bgsplashid)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent mainIntent = new Intent(splash.this,firstAct.class);\n isClicked = true;\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n });\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n if(!isClicked) {\n Intent mainIntent = new Intent(splash.this, firstAct.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n SplashScreenBuilder.getInstance(this)\n .setVideo(R.raw.splash_animation)\n .setImage(R.drawable.app_icon)\n .enableSkipOnTap(false)\n .show();\n\n Button restart_app = findViewById(R.id.restart_app);\n restart_app.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Restart app\n Intent i = getBaseContext().getPackageManager().getLaunchIntentForPackage(getBaseContext().getPackageName());\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n overridePendingTransition(0, 0);\n finish();\n }\n });\n }", "@Override\n\t\t\t\t\tpublic boolean act(float delta) {\n\t\t\t\t\t\tchangeScreen(SplashScreen.class);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}", "@Override\n public void run() {\n startActivity(new Intent(SplashActivity.this, MainActivity3.class));\n //Close the current welcome page after the jump\n SplashActivity.this.finish();\n }", "public void run() {\n Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }", "private void removeSplashScreen(final boolean z) {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass4 */\n\n public void run() {\n if (SplashScreen.splashDialog != null && SplashScreen.this.splashImageView != null && SplashScreen.splashDialog.isShowing()) {\n int fadeDuration = SplashScreen.this.getFadeDuration();\n if (fadeDuration <= 0 || z) {\n SplashScreen.this.spinnerStop();\n SplashScreen.splashDialog.dismiss();\n Dialog unused = SplashScreen.splashDialog = null;\n SplashScreen.this.splashImageView = null;\n return;\n }\n AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.0f);\n alphaAnimation.setInterpolator(new DecelerateInterpolator());\n alphaAnimation.setDuration((long) fadeDuration);\n SplashScreen.this.splashImageView.setAnimation(alphaAnimation);\n SplashScreen.this.splashImageView.startAnimation(alphaAnimation);\n alphaAnimation.setAnimationListener(new Animation.AnimationListener() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass4.AnonymousClass1 */\n\n public void onAnimationRepeat(Animation animation) {\n }\n\n public void onAnimationStart(Animation animation) {\n SplashScreen.this.spinnerStop();\n }\n\n public void onAnimationEnd(Animation animation) {\n if (SplashScreen.splashDialog != null && SplashScreen.this.splashImageView != null && SplashScreen.splashDialog.isShowing()) {\n SplashScreen.splashDialog.dismiss();\n Dialog unused = SplashScreen.splashDialog = null;\n SplashScreen.this.splashImageView = null;\n }\n }\n });\n }\n }\n });\n }", "public void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_home_page);\n\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.hide();\n }\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent startActivityIntent = new Intent(SplashActivity.this, HomePage.class);\n startActivity(startActivityIntent);\n SplashActivity.this.finish();\n }\n }\n , SPLASH_DISPLAY_LENGTH);\n }", "public SplashScreen getSplashScreen() {\n if (splashScreen == null) {//GEN-END:|26-getter|0|26-preInit\n // write pre-init user code here\n splashScreen = new SplashScreen(getDisplay());//GEN-BEGIN:|26-getter|1|26-postInit\n splashScreen.setTitle(\"splashScreen\");\n splashScreen.setCommandListener(this);\n splashScreen.setText(\"Who is Java`s mascote?\");//GEN-END:|26-getter|1|26-postInit\n // write post-init user code here\n }//GEN-BEGIN:|26-getter|2|\n return splashScreen;\n }", "public void showTimer(){\n mTimerProgressBar.setVisibility(View.VISIBLE);\n mTimerText.setVisibility(View.VISIBLE);\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash_screen);\n\n SharedPreferences sp = getSharedPreferences(FrozenBubble.PREFS_NAME,\n Context.MODE_PRIVATE);\n boolean showSplashScreen = sp.getBoolean(\"showSplashScreen\", true);\n if ( showSplashScreen )\n {\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(\"showSplashScreen\", false);\n editor.commit();\n }\n else\n {\n startFrozenBubble();\n return;\n }\n\n // thread for displaying the SplashScreen\n splashThread = new Thread()\n {\n @Override\n public void run()\n {\n try\n {\n synchronized(this)\n {\n //\n // TODO: The splash screen waits before launching\n // the game activity. Change this so that\n // the game activity is started immediately,\n // and notifies the splash screen activity\n // when it is done loading saved state data\n // and preferences, so the splash screen\n // functions as a distraction from game\n // loading latency.\n //\n //\n wait(_splashTime); //wait 3 seconds\n }\n } catch(InterruptedException e) {}\n finally\n {\n startFrozenBubble();\n }\n }\n };\n\n splashThread.start();\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_splash);\r\n\r\n new Handler().postDelayed(new Runnable(){\r\n @Override\r\n public void run() {\r\n\r\n //check whether user has already logged in\r\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 }\r\n },SPLASH_TIME_OUT);\r\n\r\n\r\n\r\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashScreen.this, Welcome.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent(SplashscreenActivity.this, MainActivity.class);\n SplashscreenActivity.this.startActivity(mainIntent);\n //We call finish() function to prevent user to come back to splashScreen\n SplashscreenActivity.this.finish();\n }", "private void initializeSplashScreenCycle()\n\t{\n\t\t// desabilitando os botoes antes de iniciar a animacao da splash screen:\n\t\tUtilidades.Views.disableViews(this.arrViewsBloqueaveis);\n\n\t\tAnimation animLayoutSplitLogo = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.splash_move);\n\t\tAnimation animLayoutContent = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.splash_fade_in);\n\n\t\tanimLayoutContent.setAnimationListener(new AnimationListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onAnimationStart(Animation animation)\n\t\t\t{\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onAnimationRepeat(Animation animation)\n\t\t\t{\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onAnimationEnd(Animation animation)\n\t\t\t{\n\t\t\t\t// rehabilitando os botoes depois de finalizar a animacao da splash screen:\n\t\t\t\tUtilidades.Views.enableViews(arrViewsBloqueaveis);\n\t\t\t}\n\t\t});\n\n\t\t((RelativeLayout) findViewById(R.id.layout_split_logo)).startAnimation(animLayoutSplitLogo);\n\t\t((RelativeLayout) findViewById(R.id.layout_content)).startAnimation(animLayoutContent);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n new AddressBookPresenter(this);\n // 去掉标题\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.act_splash_screen);\n // 闪屏核心代码\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n if (LinphoneManager.getCore().getProxyConfigList().length > 0)\n {\n return;\n }\n Intent intent = new Intent(ActSplashScreen.this,\n LoginPhoneActivity.class);\n // 从启动动画切换到主界面\n startActivity(intent);\n ActSplashScreen.this.finish();// 结束动画\n }\n }, 3000);\n }", "private void launchHomeScreen(){\n\n prefManager.setFirstTimeLaunch(false);\n Intent i = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(i);\n }", "public void show(int seconds) {\n super.show(seconds);\n }", "@Override\r\n public void run() {\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n finish();\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n super.onCreate(savedInstanceState);\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n GLSurfaceView view = new GLSurfaceView(this);\n view.setEGLConfigChooser(8, 8, 8, 8, 16, 0); //Transparent background\n view.getHolder().setFormat(PixelFormat.TRANSLUCENT); //Transparent background\n view.setRenderer(new OpenGLRenderer(this));\n setContentView(view);\n //Transition to Landing screen\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // This app main activity\n Intent i = new Intent(SplashActivity.this, SearchActivity.class);\n startActivity(i);\n finish();\n }\n }, SPLASH_TIME_OUT);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\t\ttActivityDisplay = (TextView) findViewById(R.id.tView1);\n\t\t//playSong = MediaPlayer.create(Splash.this,R.raw.aakasam);\n\t\tSharedPreferences getPrefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n\tboolean musicPref = getPrefs.getBoolean(\"checkbox\",true);\n\n\tif (musicPref == true)\n\t//playSong.start();\n\t\t;\n\t Thread timer = new Thread (){\n\t\t public void run(){\n\t\t\t try {\n\t\t\t\t sleep(5000);\n\t\t\t } catch (InterruptedException e){\n\t\t\t\t e.printStackTrace();\n\t\t\t } finally {\n\t\t\t\t Intent startAnotherActivity = new Intent(\"android.intent.action.MENU\");\n\t\t\t startActivity(startAnotherActivity);\n\t\t\t }\n\t\t }\n\t\t \n\t };\n\t \n\t timer.start();\n\t\t\n\t\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n SplashScreen.show(this);\n super.onCreate(savedInstanceState);\n }" ]
[ "0.84425896", "0.7591602", "0.758093", "0.7500748", "0.7414789", "0.7305223", "0.7286512", "0.7254691", "0.7248612", "0.7214067", "0.71701914", "0.7142932", "0.7137518", "0.70892787", "0.70852166", "0.7075123", "0.704674", "0.70043606", "0.699664", "0.69352084", "0.68988055", "0.6781724", "0.6749791", "0.6747775", "0.6714674", "0.66332644", "0.66232806", "0.6587399", "0.6540456", "0.6535155", "0.6475595", "0.6460673", "0.6449633", "0.6440755", "0.6435798", "0.6433921", "0.6433464", "0.6427482", "0.64222753", "0.64178836", "0.64121777", "0.6408102", "0.63995636", "0.6398753", "0.6393601", "0.6387396", "0.6375906", "0.6353135", "0.633528", "0.63132083", "0.6305669", "0.630303", "0.629164", "0.6287169", "0.628667", "0.6279516", "0.62708944", "0.62642425", "0.6260593", "0.6255403", "0.62519944", "0.6233883", "0.62271106", "0.6207407", "0.6159996", "0.61172885", "0.6107155", "0.60936755", "0.60932165", "0.6072304", "0.60714436", "0.60714436", "0.60578454", "0.60456514", "0.6038867", "0.6035832", "0.6031083", "0.5980745", "0.596689", "0.59532", "0.59380007", "0.5928608", "0.5926101", "0.5919582", "0.59057397", "0.5897781", "0.5888746", "0.5876313", "0.5872564", "0.5862822", "0.5851432", "0.5845665", "0.5837999", "0.58372366", "0.5834943", "0.5833888", "0.58332694", "0.58196217", "0.58124435", "0.58096313" ]
0.72074145
10
The prototype will use a file based authentication mechanism. All userid/password pairs are periodically read from a Properties file.
private boolean checkCredentials(final String userid, final String password) { if(userid == null || password == null || userid.trim().length() < 1 || password.trim().length() < 1) { return false; } this.loadPasswordFile(); if(LoginServlet.passwords.containsKey(userid)) { final String expectedPassword = LoginServlet.passwords.getProperty(userid); if(expectedPassword.equals(password)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String readFile(File file, String password);", "private static boolean authenticate(String username, String password) {\r\n\t\tFile file = new File(\"auth.txt\");\r\n\t\tScanner scanner;\r\n\t\tString user = null;\r\n\t\tString pwd = null;\r\n\t\ttry {\r\n\t\t\tscanner = new Scanner(file);\r\n\t\t\tString nextLine = scanner.nextLine();\r\n\t\t\tString[] parts = nextLine.split(\"=\");\r\n\t\t\tuser = parts[0];\r\n\t\t\tpwd = parts[1];\r\n\t\t\tscanner.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn (username.equals(user) && password.equals(pwd));\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n try(\n\t\tFileInputStream in=new FileInputStream(\"credentials.properties\");\n \t)\n {\n \tProperties props=new Properties();\n \tprops.load(in);\n \tString uname=props.getProperty(\"username\");\n \tString pass=props.getProperty(\"password\");\n \t\n \tSystem.out.println(uname+\" \"+pass);\n \t\n } 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 \n\t}", "private void setCredentials() {\n Properties credentials = new Properties();\n\n try {\n credentials.load(new FileInputStream(\"res/credentials.properties\"));\n } catch (IOException e) {\n __logger.error(\"Couldn't find credentials.properties, not setting credentials\", e);\n return;\n }\n\n this.username = credentials.getProperty(\"username\");\n this.password = credentials.getProperty(\"password\");\n this.smtpHost = credentials.getProperty(\"smtphost\");\n this.imapHost = credentials.getProperty(\"imaphost\");\n\n if (password == null || password.equals(\"\")) {\n password = this.getPasswordFromUser();\n }\n\n __logger.info(\"Set credentials\");\n }", "@BeforeSuite\n\tpublic void propertiesFileReader(){\n\t\tif(prop == null){\t\t\t\n\t\t\tprop = new Properties();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"qa\")){ prop.load(new\n\t\t\t\t * FileInputStream(qaProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"stage\")){ prop.load(new\n\t\t\t\t * FileInputStream(stagProperty)); }else\n\t\t\t\t * if(strEnvironment.equalsIgnoreCase(\"prod\")){ prop.load(new\n\t\t\t\t * FileInputStream(prodProperty)); }\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"qa\")) \n\t\t\t\t\tFileUtils.copyFile(new File(qaProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"stage\"))\n\t\t\t\t\tFileUtils.copyFile(new File(stagProperty), new File(defaultProperty));\n\t\t\t\tif(strEnvironment.equalsIgnoreCase(\"prod\"))\n\t\t\t\t\tFileUtils.copyFile(new File(prodProperty), new File(defaultProperty));\n\t\t\t\t\n\t\t\t\tprop.load(new FileInputStream(defaultProperty));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"user + pass [\"+prop.getProperty(\"username\")+\"===\"+prop.getProperty(\"password\"));\n\t\t\t\t\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}\n\t}", "private boolean _credInit() throws FileNotFoundException, IOException \n {\n\n String user = (String) this._argTable.get(CMD.USER);\n String svgp = (String) this._argTable.get(CMD.SERVERGROUP);\n String password = null;\n\n //get the server group first\n if (svgp == null) \n {\n while (svgp == null)\n {\n //if servergroup is null, query.If empty, set to null (which is default) \n System.out.print(\"Server group>> \");\n svgp = this._readTTYLine();\n //System.out.println(\"\");\n svgp = svgp.trim();\n if (svgp.equals(\"\"))\n svgp = null;\n \n if (svgp == null)\n {\n System.out.println(\"Server group must be specified. Enter 'abort' to quit.\");\n }\n else if (svgp.equalsIgnoreCase(\"abort\") || svgp.equalsIgnoreCase(\"exit\") ||\n svgp.equalsIgnoreCase(\"quit\") || svgp.equalsIgnoreCase(\"bye\")) \n {\n System.exit(0);\n }\n }\n }\n else\n {\n System.out.println(\"Server group>> \"+svgp); \n }\n \n //---------------------------\n\n //request the authentication method from the servergroup\n AuthenticationType authType = null;\n try {\n authType = getAuthenticationType(svgp);\n } catch (SessionException sesEx) {\n \n if (sesEx.getErrno() == Constants.CONN_FAILED)\n {\n this._logger.error(\"Unable to connect to server group '\" +\n svgp+\"'.\\nPlease check network status and \"+\n \"FEI domain file configuration.\");\n \n// this._logger.severe(\"Unable to authenticate for group '\"+svgp+\n// \"' due to connection failure. Possible network issue.\");\n }\n else\n {\n this._logger.severe(\"Authentication Error! Unable to query server \"+\n \"authentication method for servergroup '\"+svgp + \"'. (\"+\n sesEx.getErrno()+\")\");\n }\n _logger.trace(null,sesEx);\n return false;\n }\n \n final String pwdPrompt = PasswordUtil.getPrompt(authType);\n\n //---------------------------\n \n if (user == null) \n {\n System.out.print(\"User name>> \");\n user = this._readTTYLine();\n user = user.trim();\n } \n else\n {\n System.out.print(\"User name>> \"+user);\n }\n \n boolean ok = false; \n while (!ok)\n { \n password = ConsolePassword.getPassword(pwdPrompt+\">> \");\n //System.out.println(\"\");\n password = password.trim();\n if (!password.equals(\"\"))\n ok = true; \n }\n \n //System.out.println(\"\");\n //password = password.trim();\n \n if (password.equalsIgnoreCase(\"abort\") || password.equalsIgnoreCase(\"exit\") ||\n password.equalsIgnoreCase(\"quit\") || password.equalsIgnoreCase(\"bye\")) \n {\n System.exit(0);\n }\n \n \n //create the encrypter for passwords\n String encrypted = null;\n try {\n encrypted = this._encrypter.encrypt(password);\n } catch (Exception ex) {\n this._logger.severe(\"Password encrypt Error! Could not write login credentials.\");\n _logger.trace(null,ex);\n return false;\n }\n \n\n \n UserToken userToken = null;\n String authToken = encrypted;\n try {\n userToken = getAuthenticationToken(svgp, user, encrypted);\n } catch (SessionException sesEx) {\n this._logger.severe(\"Authentication Error! Could not authenticate \"+\n \"user '\"+user+\"' for servergroup '\"+svgp + \"'.\"); \n _logger.trace(null,sesEx);\n return false;\n }\n \n \n //user was not authenticated\n if (userToken == null || !userToken.isValid())\n {\n this._logger.severe(\"Authentication Error: Could not authenticate \"+\n \"user '\"+user+\"' for servergroup '\"+svgp + \"'.\"); \n return false;\n }\n \n this._loginReader.setUsername(svgp, user);\n this._loginReader.setPassword(svgp, userToken.getToken());\n this._loginReader.setExpiry( svgp, userToken.getExpiry());\n \n \n boolean success = true;\n try {\n this._loginReader.commit();\n } catch (IOException ioEx) {\n this._logger.severe(\"Login File Error! Could not write login credentials.\");\n _logger.trace(null, ioEx);\n success = false;\n ++this._errorCount;\n }\n return success;\n \n }", "public DBCredentials() {\n try {\n // Get the inputStream\n InputStream inputStream = this.getClass().getClassLoader()\n .getResourceAsStream(file);\n\n Properties properties = new Properties();\n\n // load the inputStream using the Properties\n properties.load(inputStream);\n // get the value of the property\n this.dbUser = properties.getProperty(\"Username\");\n this.dbPassword = properties.getProperty(\"Password\");\n this.dbUrl = properties.getProperty(\"DataBase\");\n\n } catch (IOException e) {\n System.out.println(\"IOException\");\n e.printStackTrace();\n }\n }", "static Map<String, String> readPasswdFile (File pwdFile) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new FileReader(pwdFile));\n\t\tHashtable users = new Hashtable();\n\t\tString l = r.readLine();\n\t\twhile (l != null) {\n\t\t\tint hash = l.indexOf('#');\n\t\t\tif (hash != -1)\n\t\t\t\tl = l.substring(0, hash);\n\t\t\tl = l.trim();\n\t\t\tif (l.length() != 0) {\n\t\t\t\tStringTokenizer t = new StringTokenizer(l, \":\");\n\t\t\t\tString user = t.nextToken();\n\t\t\t\tString password = t.nextToken();\n\t\t\t\tusers.put(user, password);\n\t\t\t}\n\t\t\tl = r.readLine();\n\t\t}\n\t\tr.close();\n\t\treturn users;\n\t}", "@Test\n public void notPromptForPasswordIfuserNameIsGivenInFile() throws Exception {\n properties.setProperty(\"security-username\", \"user\");\n Mockito.doReturn(properties).when(connectCommand).loadProperties(ArgumentMatchers.any(File.class));\n result = ConnectCommandTest.gfshParserRule.executeCommandWithInstance(connectCommand, \"connect\");\n Mockito.verify(gfsh, Mockito.times(0)).readPassword(((CliStrings.CONNECT__PASSWORD) + \": \"));\n assertThat(properties).doesNotContainKey(\"security-password\");\n }", "private void authenticate(String user, String pass) {\n }", "public void init()\n {\n try\n {\n userPasswordsProperties = new Properties();\n userPasswordsProperties.load(new FileInputStream(userPasswordsPropertiesFileName));\n log.info(\"Successfully initialized. UsersPasswords property file is: \" + userPasswordsPropertiesFileName);\n }\n catch (Exception e)\n {\n throw new IllegalArgumentException(\"UserNamesPropertyFile name: \" + userPasswordsPropertiesFileName + \" not valid. Error: \" + e);\n }\n \n }", "private boolean readFilePasswordProperties()\n {\n boolean propertiesClaveCorrecto = true;\n try\n {\n InputStream fis = null;\n Properties properties = null;\n File archivo = null;\n // LEE PROPERTIES DE LA CLAVE\n //fis = new FileInputStream(FarmaConstants.RUTA_PROPERTIES_CLAVE);\n fis = \n this.getClass().getResourceAsStream(FarmaConstants.RUTA_PROPERTIES_CLAVE);\n //25.01.2008 ERIOS Se lee la ruta del parametro\n if( fis == null)\n {\n log.info(\"No leyo archivo\");\n //archivo = new File(\"ptoventaid.properties\");\n archivo = new File(prop2);\n fis = new FileInputStream(archivo);\n log.info(\"\" + archivo);\n }\n if (fis != null)\n {\n properties = new Properties();\n properties.load(fis);\n FarmaVariables.vClaveBD = FarmaEncripta.desencripta(properties.getProperty(\"ClaveBD\"));\n log.info(\"0. FarmaVariables.vClaveBD=\" + \n FarmaVariables.vClaveBD + \".\");\n\n /**\n * Se obtiene el SID y USER de BD\n * @author dubilluz\n * @since 13.10.2007\n */\n FarmaVariables.vSID = properties.getProperty(\"SID\");\n log.info(\"1. FarmaVariables.vSID=\" + \n FarmaVariables.vSID + \".\");\n if (FarmaVariables.vSID == null)\n FarmaVariables.vSID = ConstantsPtoVenta.SID;\n\n log.info(\"2. FarmaVariables.vSID=\" + \n FarmaVariables.vSID + \".\");\n\n //FarmaVariables.vUsuarioBD = FarmaEncripta.desencripta(properties.getProperty(\"UsuarioBD\")); \n FarmaVariables.vUsuarioBD = properties.getProperty(\"UsuarioBD\");\n log.debug(\"1. FarmaVariables.vUsuarioBD=\" + \n FarmaVariables.vUsuarioBD + \".\");\n if (FarmaVariables.vUsuarioBD == null)\n FarmaVariables.vUsuarioBD = ConstantsPtoVenta.USUARIO_BD;\n\n log.info(\"2. FarmaVariables.vUsuarioBD=\" + \n FarmaVariables.vUsuarioBD + \".\");\n\n log.info(\"cargo properties clave ptoventa.\");\n propertiesClaveCorrecto = true;\n }\n else\n {\n FarmaUtility.showMessage(myparent, \n \"Archivo de Configuracion de Clave no Encontrado.\\nPóngase en contacto con el área de sistemas.\", \n null);\n log.info(\"NO cargo properties clave ptoventa\");\n propertiesClaveCorrecto = false;\n }\n if (propertiesClaveCorrecto)\n return true;\n else\n return false;\n }\n catch (FileNotFoundException fnfException)\n {\n log.error(\"\",fnfException);\n FarmaUtility.showMessage(myparent, \n \"Archivo de Configuracion de Clave no Encontrado.\\nPóngase en contacto con el área de sistemas.\", \n null);\n }\n catch (IOException ioException)\n {\n log.error(\"\",ioException);\n FarmaUtility.showMessage(myparent, \n \"Error al leer archivo de Configuracion de Clave.\\nPóngase en contacto con el área de sistemas.\", \n null);\n }\n myparent.dispose();\n return false;\n }", "static String getAuth(String key) {\r\n try {\r\n Properties properties = new Properties();\r\n properties.load(new FileInputStream(new File(Run.CREDENTIALS_FILE_NAME)));\r\n\r\n return properties.getProperty(key);\r\n }\r\n catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n return null;\r\n }", "public static void main(String[] args) throws IOException {\n\t\tSftpAuthenticator auth = new SftpAuthenticator();\n\t\tMap<String, String> props = new HashMap<String, String>();\n\t\tdo {\n\t\t\tprops.clear();\n\t\t\tfor (RequiredInputField input : auth.getRequiredInputFields()) {\n\t\t\t\tSystem.out.print(\"Enter \" + input.getName() + \": \");\n\t\t\t\tString entered = readLine();\n\t\t\t\tswitch (input.getType()) {\n\t\t\t\tcase Bool:\n\t\t\t\t\tBoolean.parseBoolean(entered);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Number:\n\t\t\t\t\tInteger.parseInt(entered);\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\tprops.put(input.getName(), entered);\n\t\t\t}\n\t\t} while (!auth.isValid(props));\n\t\tauth.authorize(props);\n\n\t\tfor (Map.Entry<String, String> entry : props.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey() + \": \" + entry.getValue());\n\t\t}\n\t\tProperties tmp = new Properties();\n\t\ttmp.putAll(props);\n\t\ttmp.store(new FileWriter(new File(\"auth.props\")), null);\n\t}", "public void readXmlFile() {\r\n try {\r\n ClassLoader classLoader = getClass().getClassLoader();\r\n File credentials = new File(classLoader.getResource(\"credentials_example.xml\").getFile());\r\n DocumentBuilderFactory Factory = DocumentBuilderFactory.newInstance();\r\n DocumentBuilder Builder = Factory.newDocumentBuilder();\r\n Document doc = Builder.parse(credentials);\r\n doc.getDocumentElement().normalize();\r\n username = doc.getElementsByTagName(\"username\").item(0).getTextContent();\r\n password = doc.getElementsByTagName(\"password\").item(0).getTextContent();\r\n url = doc.getElementsByTagName(\"url\").item(0).getTextContent();\r\n setUsername(username);\r\n setPassword(password);\r\n setURL(url);\r\n } catch (Exception error) {\r\n System.out.println(\"Error in parssing the given xml file: \" + error.getMessage());\r\n }\r\n }", "public abstract boolean authenticate(String userid, String password) throws\n YAuthenticationException;", "public User doAuthentication(String account, String password);", "public void setAuthKeysFromTextFile(String textFile) {\n\n\t\ttry (Scanner scan = new Scanner(getClass().getResourceAsStream(textFile))) {\n\n\t\t\tString apikeyLine = scan.nextLine(), secretLine = scan.nextLine();\n\n\t\t\tapikey = apikeyLine.substring(apikeyLine.indexOf(\"\\\"\") + 1, apikeyLine.lastIndexOf(\"\\\"\"));\n\t\t\tsecret = secretLine.substring(secretLine.indexOf(\"\\\"\") + 1, secretLine.lastIndexOf(\"\\\"\"));\n\n\t\t} catch (NullPointerException | IndexOutOfBoundsException e) {\n\n\t\t\tSystem.err.println(\"Text file not found or corrupted - please attach key & secret in the format provided.\");\n\t\t}\n\t}", "public void setAuthentication(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.putString(\"userid\", mUserId);\n preferencesEditor.putString(\"areaid\", mAreaId);\n preferencesEditor.commit();\n }", "public PropertiesCredentials(File file) throws FileNotFoundException,\n\t\t\tIOException, IllegalArgumentException {\n\t\tthis(new FileInputStream(file));\n\t}", "List<String> authenticateUser(String userName, String password);", "private void readFileToUser(String fileName){\r\n\t\tString line = null;\r\n\t\ttry {\r\n\t\t\t// FileReader reads text files in the default encoding.\r\n\t\t\tFileReader fileReader = \r\n\t\t\t\t\tnew FileReader(fileName);\r\n\r\n\t\t\t// Always wrap FileReader in BufferedReader.\r\n\t\t\tBufferedReader bufferedReader = \r\n\t\t\t\t\tnew BufferedReader(fileReader);\r\n\r\n\t\t\twhile((line = bufferedReader.readLine()) != null) {\r\n\t\t\t\tString[] split = line.split(\",\", 3);\r\n\t\t\t\tString username = split[0];\r\n\t\t\t\tString password = split[1];\r\n\t\t\t\tString user = split[2];\r\n\t\t\t\tusers.add(new User(username,password,user));\r\n\r\n\t\t\t} \r\n\t\t\tbufferedReader.close(); \r\n\t\t}\r\n\t\tcatch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Unable to open file '\" + fileName + \"'\"); \r\n\t\t}\r\n\t\tcatch(IOException ex) {\r\n\t\t\tSystem.out.println(\"Error reading file '\" + fileName + \"'\"); \r\n\t\t}\r\n\t}", "boolean authenticate(String userName, String password);", "private void logIn() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n\n String user = a[0];\n String password = a[1];\n boolean rez = service.checkPassword(user, password);\n if(rez == TRUE)\n System.out.println(\"Ok\");\n else\n System.out.println(\"Not ok\");\n }", "public static void main(String[] args) throws IOException {\n\n String path = System.getProperty(\"user.dir\")+\"\\\\Files\\\\Config2.properties\";\n FileInputStream fileInputStream=new FileInputStream(path);\n Properties properties=new Properties();\n properties.load(fileInputStream);\n System.out.println(properties.get(\"browser\"));\n System.out.println(properties.get(\"url\"));\n System.out.println(properties.get(\"username\"));\n System.out.println(properties.get(\"password\"));\n //fileInputStream.close();\n FileOutputStream fileOutputStream=new FileOutputStream(path);\n Properties properties1=new Properties();\n properties.store(fileOutputStream,\"Masoud\");\n\n\n\n\n }", "private void initializeFileSystem() \r\n \t /*@ requires identityFile |-> _ &*& identityFileSignature |-> _ &*& addressFile |-> _ &*& addressFileSignature |-> _\r\n\t\t\t &*& caRoleIDFile |-> _ &*& preferencesFile |-> _ &*& idDirectory |-> _\r\n\t\t\t &*& certificateDirectoryFile |-> _ &*& privateKeyDirectoryFile |-> _ &*& authenticationObjectDirectoryFile |-> _ &*& objectDirectoryFile |-> _\r\n\t\t\t &*& tokenInfo |-> _ &*& belpicDirectory |-> _ &*& dirFile |-> _\r\n\t\t\t &*& masterFile |-> _ &*& selectedFile |-> _;\r\n\t @*/\r\n \t/*@ ensures dirFile |-> ?theDirFile &*& theDirFile.ElementaryFile(_, _, ?dirFileData, _, _, _) &*& theDirFile != null \r\n \t &*& dirFileData != null &*& dirFileData.length == 0x25\r\n\t &*& belpicDirectory |-> ?theBelpicDirectory &*& theBelpicDirectory.DedicatedFile(_, _, _, ?belpic_siblings, _) &*& theBelpicDirectory != null\r\n\t &*& tokenInfo |-> ?theTokenInfo &*& theTokenInfo.ElementaryFile(_, _, ?tokenInfoData, _, _, _) &*& theTokenInfo != null\r\n\t &*& tokenInfoData != null &*& tokenInfoData.length == 0x30\r\n\t &*& objectDirectoryFile |-> ?theObjectDirectoryFile &*& theObjectDirectoryFile.ElementaryFile(_, _, ?objectDirectoryFileData, _, _, _) &*& theObjectDirectoryFile != null\r\n\t &*& objectDirectoryFileData != null &*& objectDirectoryFileData.length == 40\r\n\t &*& authenticationObjectDirectoryFile |-> ?theAuthenticationObjectDirectoryFile &*& theAuthenticationObjectDirectoryFile.ElementaryFile(_, _, ?authenticationObjectDirectoryFileData, _, _, _) &*& theAuthenticationObjectDirectoryFile != null\r\n\t &*& authenticationObjectDirectoryFileData != null &*& authenticationObjectDirectoryFileData.length == 0x40\r\n\t &*& privateKeyDirectoryFile |-> ?thePrivateKeyDirectoryFile &*& thePrivateKeyDirectoryFile.ElementaryFile(_, _, ?privateKeyDirectoryFileData, _, _, _) &*& thePrivateKeyDirectoryFile != null\r\n\t &*& privateKeyDirectoryFileData != null &*& privateKeyDirectoryFileData.length == 0xB0\r\n\t &*& certificateDirectoryFile |-> ?theCertificateDirectoryFile &*& theCertificateDirectoryFile.ElementaryFile(_, _, ?certificateDirectoryFileData, _, _, _) &*& theCertificateDirectoryFile != null\r\n\t &*& certificateDirectoryFileData != null &*& certificateDirectoryFileData.length == 0xB0\r\n\t &*& idDirectory |-> ?theIdDirectory &*& theIdDirectory.DedicatedFile(_, _, _, ?idDirectory_siblings, _) &*& theIdDirectory != null\r\n\t &*& identityFile |-> ?theIdentityFile &*& theIdentityFile.ElementaryFile(_, _, ?identityData, _, _, _) &*& theIdentityFile != null\r\n\t &*& identityData != null &*& identityData.length == 0xD0\r\n\t &*& identityFileSignature |-> ?theIdentityFileSignature &*& theIdentityFileSignature.ElementaryFile(_, _, ?identitySignatureData, _, _, _) &*& theIdentityFileSignature != null\r\n\t &*& identitySignatureData != null &*& identitySignatureData.length == 0x80\r\n\t &*& addressFile |-> ?theAddressFile &*& theAddressFile.ElementaryFile(_, _, ?addressFileData, _, _, _) &*& theAddressFile != null\r\n\t &*& addressFileData != null &*& addressFileData.length == 117\r\n\t &*& addressFileSignature |-> ?theAddressFileSignature &*& theAddressFileSignature.ElementaryFile(_, _, ?addressFileSignatureData, _, _, _) &*& theAddressFileSignature != null\r\n\t &*& addressFileSignatureData != null &*& addressFileSignatureData.length == 128\r\n\t &*& caRoleIDFile |-> ?theCaRoleIDFile &*& theCaRoleIDFile.ElementaryFile(_, _, ?caRoldIDFileData, _, _, _) &*& theCaRoleIDFile != null\r\n\t &*& caRoldIDFileData != null &*& caRoldIDFileData.length == 0x20\r\n\t &*& preferencesFile |-> ?thePreferencesFile &*& thePreferencesFile.ElementaryFile(_, _, ?preferencesFileData, _, _, _) &*& thePreferencesFile != null\r\n\t &*& preferencesFileData != null &*& preferencesFileData.length == 100\r\n\t &*& masterFile |-> ?theMasterFile &*& theMasterFile.MasterFile(0x3F00, null, _, ?master_siblings, _) &*& theMasterFile != null\r\n\t &*& master_siblings == cons<File>(theDirFile, cons(theBelpicDirectory, cons(theIdDirectory, nil)))\r\n\t &*& belpic_siblings == cons<File>(theTokenInfo, cons(theObjectDirectoryFile, cons(theAuthenticationObjectDirectoryFile, cons(thePrivateKeyDirectoryFile, cons(theCertificateDirectoryFile,nil)))))\r\n\t &*& idDirectory_siblings == cons<File>(theIdentityFile, cons(theIdentityFileSignature, cons(theAddressFile, cons(theAddressFileSignature, cons(theCaRoleIDFile, cons(thePreferencesFile, nil))))))\r\n\t &*& selectedFile |-> theMasterFile &*& theBelpicDirectory.getClass() == DedicatedFile.class &*& theIdDirectory.getClass() == DedicatedFile.class;\r\n\t @*/\r\n\t{\r\n\t\tmasterFile = new MasterFile();\r\n\t\t/*\r\n\t\t * initialize PKCS#15 data structures see\r\n\t\t * \"5. PKCS#15 information details\" for more info\r\n\t\t */\r\n\t\t\r\n\t\t//@ masterFile.castMasterToDedicated();\r\n\t\t\r\n\t\tdirFile = new ElementaryFile(EF_DIR, masterFile, (short) 0x25);\r\n\t\tbelpicDirectory = new DedicatedFile(DF_BELPIC, masterFile);\r\n\t\ttokenInfo = new ElementaryFile(TOKENINFO, belpicDirectory, (short) 0x30);\r\n\t\tobjectDirectoryFile = new ElementaryFile(ODF, belpicDirectory, (short) 40);\r\n\t\tauthenticationObjectDirectoryFile = new ElementaryFile(AODF, belpicDirectory, (short) 0x40);\r\n\t\tprivateKeyDirectoryFile = new ElementaryFile(PRKDF, belpicDirectory, (short) 0xB0);\r\n\t\tcertificateDirectoryFile = new ElementaryFile(CDF, belpicDirectory, (short) 0xB0);\r\n\t\tidDirectory = new DedicatedFile(DF_ID, masterFile);\r\n\t\t/*\r\n\t\t * initialize all citizen data stored on the eID card copied from sample\r\n\t\t * eID card 000-0000861-85\r\n\t\t */\r\n\t\t// initialize ID#RN EF\r\n\t\tidentityFile = new ElementaryFile(IDENTITY, idDirectory, (short) 0xD0);\r\n\t\t// initialize SGN#RN EF\r\n\t\tidentityFileSignature = new ElementaryFile(SGN_IDENTITY, idDirectory, (short) 0x80);\r\n\t\t// initialize ID#Address EF\r\n\t\t// address is 117 bytes, and should be padded with zeros\r\n\t\taddressFile = new ElementaryFile(ADDRESS, idDirectory, (short) 117);\r\n\t\t// initialize SGN#Address EF\r\n\t\taddressFileSignature = new ElementaryFile(SGN_ADDRESS, idDirectory, (short) 128);\r\n\t\t// initialize PuK#7 ID (CA Role ID) EF\r\n\t\tcaRoleIDFile = new ElementaryFile(CA_ROLE_ID, idDirectory, (short) 0x20);\r\n\t\t// initialize Preferences EF to 100 zero bytes\r\n\t\tpreferencesFile = new ElementaryFile(PREFERENCES, idDirectory, (short) 100);\r\n\t\t\r\n\t\tselectedFile = masterFile;\r\n\t\t//@ masterFile.castDedicatedToMaster();\r\n\t}", "public AuthenticatedUser() {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Please input your username: \"); //Ask user to identify with services\n this.name = input.nextLine();\n \n if (!new File(AuctionSecurity.CLIENT_STORAGE + name + \"/Private.key\").exists()) { //If no private key exists for this invidual on file, we must make one.\n input = new Scanner(System.in);\n System.out.println(\"User not registered.\\nInsert secret code for registration: \");\n if (input.nextLine().equals(PASSCODE)) { //Ensure the user is someone whom we have given permission to register.\n this.privateKey = AuctionSecurity.registerUser(name);\n } else {\n System.out.println(\"That's the incorrect passcode. Therefore you cannot register.\");\n System.exit(0);\n }\n } else {\n this.privateKey = AuctionSecurity.getPrivateKey(name);\n }\n this.name = name;\n }", "public void authenticateUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tint index=loginattempt();\r\n\t}", "public void login(){\n boolean found = false;\n //variables to iterate the file\n String email= \"\";\n String passkey= \"\";\n String admin = \"\";\n\n try{\n //read file\n input = new Scanner(new File(\"credential.txt\"));\n //email and password input from user\n usernamePass();\n //defining how to saperate one user from another in the file\n input.useDelimiter(\"[,\\n]\");\n //looping through all credentials until find the match\n while (input.hasNext() && !found){\n email = input.next();\n passkey = input.next();\n admin = input.next();\n //condition for matching the credential of user\n if(email.trim().equals(this.email.trim()) && passkey.trim().equals(pass.trim())) {\n found = true;\n //checking if the user is admin or not\n if(admin.trim().equals(\"true\")){\n System.out.printf(\"This is admin\\n\");\n adminPanel();\n }\n else {\n System.out.printf(\"This is not admin!\");\n userChoice();\n }\n System.out.printf(\"Hurrah\");\n }\n }\n System.out.printf(\"There is no such user. Try again.\");\n input.close();\n SignupOrLogin();\n// String c;\n// while(numOfUser != 0){\n// System.out.printf(numOfUser+\"\\n\");\n// numOfUser-=1;\n// }\n//\n// //reading credentials file to login\n// while ((c=bufferedReader.readLine())!=null){\n// System.out.printf(c+\"\\n\");\n// if(c.contains(username)){\n// System.out.printf(\"match fount\");\n// }\n// else {\n// System.out.printf(\"match not found.\");\n// }\n// }\n }catch (Exception e){\n System.out.printf(\"No such user. Try again with current credentials.\\n\");\n SignupOrLogin();\n }\n }", "public void loadProperties(){\n\n\ttry{\n\t prop.load(file);\n // get the property value and print it out\n host = prop.getProperty(\"host\");\n\t port = prop.getProperty(\"port\");\n\t sslmode = prop.getProperty(\"sslmode\");\n\t source = prop.getProperty(\"source\");\n dbname = prop.getProperty(\"dbname\");\n help_url_prefix = prop.getProperty(\"base.help.url\");\n password = prop.getProperty(\"password\");\n\t user = prop.getProperty(\"user\");\t \n\t temp_dir = new File(System.getProperty(\"java.io.tmpdir\")).toString();\n\t working_dir = new File(System.getProperty(\"user.dir\")).toString();\n\t file.close();\n\t}catch(IOException ioe){\n\t\t\n\t} \n\t \n }", "public void readAdmin(String fileName)\n {\n try\n {\n FileReader inputFile = new FileReader(fileName);\n Scanner parser = new Scanner(inputFile);\n String[] array = parser.nextLine().split(\";\");\n for(int index = 0; index < array.length; index++)\n {\n String[] elements = array[index].split(\",\");\n String account = elements[0];\n String password = elements[1];\n setAdmin(index, account, password);\n }\n }\n catch(FileNotFoundException exception)\n {\n System.out.println(fileName + \" not found\");\n }\n catch(IOException exception)\n {\n System.out.println(\"Unexpected I/O error occured\");\n }\n\n }", "private void readFromFile(){\n\t\t\n\t\ttry {\n\t\t\tFile file=new File(\"controller.txt\");\n\t\t\tFileInputStream fin;\n\t\t\tfin = new FileInputStream(file);\n\t\t\tDataInputStream din=new DataInputStream(fin);\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(din));\n\t\t\t\n\t\t\tfor(int i=0; i<2; i++){\n\t\t\t\tif(i==0)\n\t\t\t\t\tcodedUserName=br.readLine();\n\t\t\t\telse \n\t\t\t\t\tcodedPassword=br.readLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void login() {\n setCredentials();\n setSysProperties();\n\n Properties sysProperties = System.getProperties();\n sysProperties.put(\"mail.store.protocol\", \"imaps\");\n this.session = Session.getInstance(sysProperties,\n new Authenticator() {\n @Override\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n }", "static void getProps() throws Exception {\r\n\t\tFileReader fileReader = new FileReader(\"C:\\\\repos\\\\test\\\\src\\\\main\\\\java\\\\test\\\\config.properties\");\r\n\t\tProperties properties = new Properties();\r\n\r\n\t\tproperties.load(fileReader);\r\n\r\n\t\tSystem.out.println(\"By using File Reader: \" + properties.getProperty(\"username\"));\r\n\r\n\t}", "private UserSession handleBasicAuthentication(String credentials, HttpServletRequest request) {\n\t\tString userPass = Base64Decoder.decode(credentials);\n\n\t\t// The decoded string is in the form\n\t\t// \"userID:password\".\n\t\tint p = userPass.indexOf(\":\");\n\t\tif (p != -1) {\n\t\t\tString userID = userPass.substring(0, p);\n\t\t\tString password = userPass.substring(p + 1);\n\t\t\t\n\t\t\t// Validate user ID and password\n\t\t\t// and set valid true if valid.\n\t\t\t// In this example, we simply check\n\t\t\t// that neither field is blank\n\t\t\tIdentity identity = WebDAVAuthManager.authenticate(userID, password);\n\t\t\tif (identity != null) {\n\t\t\t\tUserSession usess = UserSession.getUserSession(request);\n\t\t\t\tsynchronized(usess) {\n\t\t\t\t\t//double check to prevent severals concurrent login\n\t\t\t\t\tif(usess.isAuthenticated()) {\n\t\t\t\t\t\treturn usess;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tusess.signOffAndClear();\n\t\t\t\t\tusess.setIdentity(identity);\n\t\t\t\t\tUserDeletionManager.getInstance().setIdentityAsActiv(identity);\n\t\t\t\t\t// set the roles (admin, author, guest)\n\t\t\t\t\tRoles roles = BaseSecurityManager.getInstance().getRoles(identity);\n\t\t\t\t\tusess.setRoles(roles);\n\t\t\t\t\t// set authprovider\n\t\t\t\t\t//usess.getIdentityEnvironment().setAuthProvider(OLATAuthenticationController.PROVIDER_OLAT);\n\t\t\t\t\n\t\t\t\t\t// set session info\n\t\t\t\t\tSessionInfo sinfo = new SessionInfo(identity.getName(), request.getSession());\n\t\t\t\t\tUser usr = identity.getUser();\n\t\t\t\t\tsinfo.setFirstname(usr.getProperty(UserConstants.FIRSTNAME, null));\n\t\t\t\t\tsinfo.setLastname(usr.getProperty(UserConstants.LASTNAME, null));\n\t\t\t\t\tsinfo.setFromIP(request.getRemoteAddr());\n\t\t\t\t\tsinfo.setFromFQN(request.getRemoteAddr());\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInetAddress[] iaddr = InetAddress.getAllByName(request.getRemoteAddr());\n\t\t\t\t\t\tif (iaddr.length > 0) sinfo.setFromFQN(iaddr[0].getHostName());\n\t\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t\t // ok, already set IP as FQDN\n\t\t\t\t\t}\n\t\t\t\t\tsinfo.setAuthProvider(BaseSecurityModule.getDefaultAuthProviderIdentifier());\n\t\t\t\t\tsinfo.setUserAgent(request.getHeader(\"User-Agent\"));\n\t\t\t\t\tsinfo.setSecure(request.isSecure());\n\t\t\t\t\tsinfo.setWebDAV(true);\n\t\t\t\t\tsinfo.setWebModeFromUreq(null);\n\t\t\t\t\t// set session info for this session\n\t\t\t\t\tusess.setSessionInfo(sinfo);\n\t\t\t\t\t//\n\t\t\t\t\tusess.signOn();\n\t\t\t\t\treturn usess;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private boolean _credList() \n {\n\n //File file = new File(loginFileLocation);\n File file = this._loginReader.getFile();\n String fileLocation = (file == null) ? null : file.getAbsolutePath();\n \n if (!file.canRead())\n {\n this._logger.info(\"No credentials exist.\");\n //this._logger.severe(\"Login Error! Please acquire credentials \"\n // + \"with login utility.\");\n System.exit(-1);\n }\n \n String format1 = \"EEE, d MMM yyyy HH:mm:ss Z\";\n String format2 = \"yyyy-MM-dd'T'HH:mm:ss.SSSZ\";\n DateFormat dateFormat = new SimpleDateFormat(format2);\n \n Date timeStamp = new Date(file.lastModified());\n this._logger.info(Constants.COPYRIGHT);\n this._logger.info(Constants.CLIENTVERSIONSTR);\n this._logger.info(Constants.APIVERSIONSTR);\n this._logger.info(\"\"); // empty line\n this._logger.info(\"Credential cache file: \" + fileLocation);\n this._logger.info(\"File modified on: \" + timeStamp.toString());\n String defUser = this._loginReader.getUsername();\n if (defUser != null)\n this._logger.info(\"Default principal: \" + defUser);\n else\n this._logger.info(\"No default principal specified.\");\n \n String[] sgroups = this._loginReader.getNamespaces();\n for (int i = 0; i < sgroups.length; ++i)\n {\n String ns = sgroups[i];\n if (!ns.equals(LoginFile.DEFAULT_NAMESPACE))\n {\n String user = this._loginReader.getUsername(ns, false);\n long expiry = this._loginReader.getExpiry(ns);\n if (user != null)\n {\n String line = \"Principal for group '\"+ns+\"' : \" + user;\n if (expiry != Constants.NO_EXPIRATION)\n {\n String date = dateFormat.format(new Date(expiry));\n if (expiry < System.currentTimeMillis())\n {\n line = line + \" (expired \"+date+\")\"; \n }\n else\n {\n line = line + \" (expires \"+date+\")\"; \n }\n }\n this._logger.info(line);\n }\n }\n }\n\n return true;\n }", "private void init (Properties props) throws FileNotFoundException {\n\t\t\n\t\tport = Integer.parseInt (props.getProperty (AposNtrip.PROP_PORT));\n\t\tString userName = props.getProperty (AposNtrip.PROP_USERNAME);\n\t\tString password = props.getProperty (AposNtrip.PROP_PASSWORD);\n\t\tString mountPoint = props.getProperty (AposNtrip.PROP_MOUNTPOINT);\n\t\t\n\t\tbyte[] encodedPassword = ( userName + \":\" + password ).getBytes();\n\t Base64 encoder = new Base64 ();\n\t basicAuthentication = encoder.encode( encodedPassword );\n\t\n\t expectedRequest = \"GET /\" + mountPoint + \" HTTP/1.0\";\n\t expectedUserAgent = \"User-Agent: .*\";\n\t expectedAuthorisation = \"Authorization: Basic \" + (new String (basicAuthentication));\n\t expectedLocation = props.getProperty (PROP_EXPECTED_LOCATION);\n\t \n\t System.out.println (\"AposNtripCasterMock: expectedRequest=\" + expectedRequest);\n\t System.out.println (\"AposNtripCasterMock: expectedUserAgent=\" + expectedUserAgent);\n\t System.out.println (\"AposNtripCasterMock: expectedAuthorisation=\" + expectedAuthorisation);\n\t \n\t String fileName = props.getProperty (PROP_INPUT_DATA_FILE);\n\t\tURL url = Thread.currentThread ().getContextClassLoader ().getResource (fileName);\n\t\t\n\t\tif (url == null)\n\t\t\tthrow new FileNotFoundException (fileName);\n\t\t\n\t\tinputDataFile = new File (url.getFile ());\n\t}", "public static void readPassFile(String filepath) throws FileNotFoundException {\r\n Scanner sc = new Scanner(new FileInputStream(filepath));\r\n String [] passData;\r\n while (sc.hasNextLine()) {\r\n passData = sc.nextLine().split(\",\");\r\n // csv file: Email,Password.\r\n addPass(passData[0], passData[1]);\r\n }\r\n sc.close();\r\n }", "@Test\t\t\n\tpublic void validuser() {\n\t\tFile file = new File(\"C:\\\\Users\\\\gururaj.ravindra\\\\eclipse-workspace\\\\6D\\\\config.properties\\\\testdata.properties\");\n\t\t \n\t\tFileInputStream fileInput = null;\n\t\ttry {\n\t\t\tfileInput = new FileInputStream(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tProperties prop = new Properties();\n\t\t\n\t\t//load properties file\n\t\ttry {\n\t\t\tprop.load(fileInput);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\tWebDriver driver= BrowserFactory.StartBrowser(prop.getProperty(\"browserName\"),prop.getProperty(\"url\"));\n\t\tLoginPage login_page = PageFactory.initElements(driver, LoginPage.class);\n\t\tlogin_page.Validlogin(prop.getProperty(\"username\"),prop.getProperty(\"password\"));\n\t}", "EmployeeMaster authenticateUser(int employeeId, String password);", "public Person authenticateAndGetUser(String numCc, String password) throws RemoteException;", "abstract public AuthInfo createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain);", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tProperties prop = new Properties();\n\t\t\tInputStream in = ReadProperties.class.getClassLoader().getResourceAsStream(\"user.properties\");\n\t\t\tprop.load(in);\n\t\t\tSystem.out.println(\"直接输出prop对象:\"+prop);\n\t\t\tString loginname = prop.getProperty(\"loginname\");\n\t\t\tString Password = prop.getProperty(\"Password\");\n\t\t\tSystem.out.println(\"loginname:\"+loginname+\"---\"+\"Password:\"+Password);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\t\n\t\t}\n\t}", "private void getGredentialsFromMemoryAndSetUser()\n\t{\n\t SharedPreferences settings = getSharedPreferences(LOGIN_CREDENTIALS, 0);\n\t String username = settings.getString(\"username\", null);\n\t String password = settings.getString(\"password\", null);\n\t \n\t //Set credentials to CouponsManager.\n\t CouponsManager.getInstance().setUser(new User(username, password));\n\t \n\t}", "public void userSettings(String userName, String password, File nameFile,File passFile, String fileadd) {\n try\n {\n \n if(!nameFile.exists())\n {\n nameFile.createNewFile();\n }\n if(!passFile.exists())\n {\n passFile.createNewFile();\n }\n \n FileReader ufr = new FileReader(nameFile);\n FileReader pfr = new FileReader(passFile);\n \n BufferedReader ubr = new BufferedReader(ufr);\n BufferedReader pbr = new BufferedReader(pfr);\n \n ArrayList<String> uName = new ArrayList<>();\n ArrayList<String> uPass = new ArrayList<>();\n for (int i = 0; i < lineNum(fileadd); i++) {\n uName.add(ubr.readLine());\n uPass.add(pbr.readLine());\n }\n for (int i = 0; i < lineNum(fileadd); i++) \n {\n if (userName.equals(uName.get(i)))\n {\n uPass.set(i, password);\n } \n }\n \n ufr.close();\n pfr.close();\n FileWriter fw = new FileWriter(passFile);\n PrintWriter pw = new PrintWriter(fw);\n pw.print(\"\");\n \n FileWriter fw2 = new FileWriter(passFile, true);\n PrintWriter pw2 = new PrintWriter(fw2, true);\n \n for (int j = 0; j < uPass.size() -1; j++)\n {\n \n pw.print(uPass.get(j));\n pw.println();\n \n }\n pw.close();\n }catch(Exception e)\n {\n e.printStackTrace();\n }\n \n }", "public static void main(String[] args) throws IOException\r\n\t{\n\t\tFileInputStream fis=new FileInputStream(\"D:\\\\QSpiders_2019\\\\html\\\\config.properties.txt\");\r\n\t\t//Create an object of Properties class since getproperty() is a non-static method\r\n\t\tProperties prop=new Properties();\r\n\t\t//load the file into Properties class\r\n\t\tprop.load(fis);\r\n\t\t//read the data from Properties file using Key\r\n\t\tString URL =prop.getProperty(\"url\");\r\n\t\tSystem.out.println(URL);\r\n\t\tSystem.out.println(prop.getProperty(\"username\"));\r\n\t\tSystem.out.println(prop.getProperty(\"password\"));\r\n\t\tSystem.out.println(prop.getProperty(\"browser\"));\r\n\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tProperties p=new Properties();\n\t\tFile f=new File(\"Test.txt\");\n\t\tf.createNewFile();\n\t\tFileInputStream fis=new FileInputStream(\"Test.txt\");\n\t\tp.load(fis);\n\t\tString username=p.getProperty(\"user\");\n\t\tSystem.out.println(\"user name=\"+username);\n\t\tString pass=p.getProperty(\"pwd\");\n\t\tSystem.out.println(\"password=\"+pass);\n\t\tString add=(String) p.setProperty(\"nag\", \"8888\");\n\t\tFileOutputStream fos=new FileOutputStream(\"Test.txt\");\n\t\tp.store(fos, \"updated by Raghu\");\n\n\t}", "@Override\n public boolean login(String username, char[] password) throws RemoteException {\n //Determines whether or not user with a specific username exist\n if (fileExist(USER_DIR + username + \".xml\")) {\n try {\n //Make the password a string\n String strPassword = \"\";\n for (int i = 0; i < password.length; i++) {\n strPassword += String.valueOf(password[i]);\n }\n //Open the file with the user information\n inputStream = new FileInputStream(USER_DIR + username + \".xml\");\n inputStreamReader = new InputStreamReader(inputStream);\n reader = new BufferedReader(inputStreamReader);\n\n sb = new StringBuilder();\n\n while ((lineString = reader.readLine()) != null) {\n sb.append(lineString);\n }\n \n //After that the @param userInfo contain a whole information about the user\n String userInfo = new String(sb);\n \n //Validate user form with a regular expresions\n if (!Pattern\n .compile(\"<username>\" + username + \"</username>\")\n .matcher(userInfo)\n .find()) {\n return false;\n }\n\n if (!Pattern\n .compile(\"<password>\" + strPassword + \"</password>\")\n .matcher(userInfo)\n .find()) {\n return false;\n }\n //Get the user priviliges\n if (Pattern\n .compile(\"<privilige>ENCRYPT</privilige>\")\n .matcher(userInfo)\n .find()) {\n priviliges = User.Priviliges.ENCRYPT;\n } else if (Pattern\n .compile(\"<privilige>DECRYPT</privilige>\")\n .matcher(userInfo)\n .find()) {\n priviliges = User.Priviliges.DECRYPT;\n } else if (Pattern\n .compile(\"<privilige>ENCRYPT_AND_DECRYPT</privilige>\")\n .matcher(userInfo)\n .find()) {\n priviliges = User.Priviliges.ENCRYPT_AND_DECRYPT;\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n } finally {\n closeResources();\n }\n } else {\n return false;\n }\n return true;\n }", "public abstract boolean checkCredentials (String username, String password);", "abstract public boolean checkAuth(String userId) throws IOException;", "public void adminLoad() {\n try {\n File file = new File(adminPath);\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n String data = scanner.nextLine();\n String[]userData = data.split(separator);\n AdminAccounts adminAccounts = new AdminAccounts();\n adminAccounts.setUsername(userData[0]);\n adminAccounts.setPassword(userData[1]);\n users.add(adminAccounts);\n }\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public UpdateUserResource() {\n Properties prop = new Properties();\n InputStream input = null;\n\n try {\n input = LDAPUtil.class.getResourceAsStream(\"/OktaLDAPBridgeConfig.properties\");\n\n // load a properties file\n prop.load(input);\n\n oktaAPIUrlPrefix = prop.getProperty(\"oktaAPIUrlPrefix\");\n myHTTPUtil = HTTPUtil.getInstance();\n\n } catch (IOException ex) {\n LOGGER.error(\"Error during reading config file : \", ex);\n } finally {\n if (input != null) {\n try {\n input.close();\n } catch (IOException e) {\n LOGGER.error(\"Error closing config file handle : \", e);\n }\n }\n }\n }", "public PropertiesCredentials(InputStream inputStream) throws IOException {\n\t\tProperties accountProperties = new Properties();\n\t\ttry {\n\t\t\taccountProperties.load(inputStream);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tinputStream.close();\n\t\t\t} catch (Exception e) {\n\t\t\t}\n\t\t}\n\n\t\tif (accountProperties.getProperty(\"consumerKey\") == null\n\t\t\t\t|| accountProperties.getProperty(\"consumerSecret\") == null\n\t\t\t\t|| accountProperties.getProperty(\"accessToken\") == null\n\t\t\t\t|| accountProperties.getProperty(\"accessTokenSecret\") == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"The specified file or stream doesn't contain the expected properties: 'consumerKey' \"\n\t\t\t\t\t\t\t+ \"'consumerSecret' 'accessToken' and 'accessTokenSecret'.\");\n\t\t}\n\n\t\ttwitterCredentials = new TwitterCredentials(\n\t\t\t\taccountProperties.getProperty(\"consumerKey\"),\n\t\t\t\taccountProperties.getProperty(\"consumerSecret\"),\n\t\t\t\taccountProperties.getProperty(\"accessToken\"),\n\t\t\t\taccountProperties.getProperty(\"accessTokenSecret\"));\n\t}", "public static interface Credentials extends Serializable {\n\t\tpublic String getUserName();\n\t\t/**\n\t\t* The password is encrypted.\n\t\t*/\n\t\tpublic String getPassword();\n\t}", "public static void main(String[] args) {\n // check for correct usage\n if (args.length < 1) {\n System.out.println(\"usage: java Vault [-au] <filename>\");\n System.exit(1);\n }\n\n // check for au option\n boolean addUser = false;\n if (args.length == 2)\n addUser = true;\n\n // open the file, or print error and exit\n Scanner sc = null;\n try {\n sc = new Scanner(new FileReader((addUser ? args[1] : args[0])));\n }catch (IOException e) {\n System.out.println(\"Error! File '\" + (addUser ? args[1] : args[0]) + \n \"' could not be opened.\");\n System.exit(2);\n }\n \n // read each line of the file, storing each user in users\n ArrayList<User> users = new ArrayList<User>();\n while (sc.hasNextLine()) {\n String[] line = sc.nextLine().split(\" \");\n \n if (line.length == 4 && line[0].equals(\"user\")) {\n users.add(new User(line[1], line[2], line[3]));\n\n }else if (line.length == 4 && line[0].equals(\"data\")) {\n for (int i = 0; i < users.size(); i++) {\n if (users.get(i).getName().equals(line[1]))\n users.get(i).addDatum(line[2], line[3]);\n }\n\n }else {\n System.out.println(\"Error! File '\" + (addUser ? args[1] : args[0]) + \n \"' improperly formatted.\");\n System.exit(3);\n }\n\n }\n //close read file\n sc.close();\n\n // ask user for username and password\n System.out.print(\"username: \");\n String name = System.console().readLine();\n System.out.print(\"password: \");\n char[] password = System.console().readPassword();\n\n // if au option, collect info and add to file, then quit\n if (addUser) {\n PrintWriter pw = null;\n try {\n pw = new PrintWriter(new File(args[1]));\n } catch (FileNotFoundException fnfe) {\n fnfe.printStackTrace();\n System.exit(6);\n }\n\n System.out.print(\"Hash algorithm: \");\n String hashAlg = System.console().readLine();\n\n // perform checks and hash password\n for (char c : password) {\n if ((int)c < 42 || (int)c > 122) {\n System.out.println(\"Error! Invalid symbol '\" + c + \"' in password.\");\n System.exit(7);\n }\n }\n Hasher hasher = null;\n String passhash = null;\n if (hashAlg.equals(\"clear\")) {\n hasher = new Clear();\n }else if (hashAlg.equals(\"shift+caesar\")) {\n hasher = new Caesar();\n }else if (hashAlg.equals(\"shift+vigenere\")) {\n hasher = new Vigenere();\n }else {\n System.out.println(\"Error! Hash algorithm '\" + hashAlg + \"' not supported.\");\n System.exit(8);\n }\n passhash = hasher.hash(password);\n for (User u : users) {\n if (u.getName().equals(name)) {\n System.out.print(\"Error! Username '\" + name + \"' already in use.\");\n System.exit(9);\n }\n }\n \n users.add(new User(name, hashAlg, passhash));\n for (User u : users) {\n pw.println(String.join(\" \", \"user\", u.getName(), u.getHashAlg(), u.getHash()));\n }\n\n pw.close();\n System.exit(0);\n }\n\n // determine access, exit if denied\n boolean access = false;\n User curr = null;\n for (User u : users) {\n if (u.getName().equals(name)) {\n try {\n if (u.validate(password)) {\n System.out.println(\"Access granted!\");\n access = true;\n curr = u;\n }\n break;\n }catch (UnsupportedHashException e) {\n System.out.println(\"Error! Hash algorithm '\" + u.getHashAlg() + \n \"' not supported.\");\n System.exit(4);\n }\n }\n }\n if (!access) {\n System.out.println(\"Access denied!\");\n System.exit(5);\n }\n\n // if granted access, open prompt for commands\n System.out.print(\"> \");\n sc = new Scanner(System.in);\n String cmd = null;\n ArrayList<Datum> data = curr.getData();\n while (!(cmd = sc.next()).equals(\"quit\")) {\n switch(cmd) {\n case \"labels\": for (Datum d : data) {\n d.getEnc().init(password);\n try {\n String plain = d.getEnc().decrypt(d.getCipher());\n if (!plain.contains(\"_\")) throw new Exception();\n System.out.println(plain.split(\"_\")[0]);\n }catch (Exception e) {\n System.out.println(\"Error! Corrupted entry '\" +\n d.getCipher() + \n \"' in vault file.\");\n }\n }\n break;\n\n case \"get\": cmd = sc.next();\n for (Datum d : data) {\n d.getEnc().init(password);\n try {\n String plain = d.getEnc().decrypt(d.getCipher());\n if (!plain.contains(\"_\")) throw new Exception();\n if (plain.split(\"_\", 2)[0].equals(cmd))\n System.out.println(plain.split(\"_\", 2)[1]);\n }catch (Exception e) {\n System.out.println(\"Error! Corrupted entry '\" + \n d.getCipher() + \n \"' in vault file.\");\n }\n }\n break; \n\n default: System.out.println(\"Unknown command '\" + cmd + \"'.\");\n break;\n }\n System.out.print(\"> \");\n\n }\n\n \n\n }", "public KeyStore initializeUser(UserInfo userInfo, String keyPassword) throws CertException;", "private Properties loadProperties(String propertyFile) {\n\t\toAuthProperties = new Properties();\n\t\ttry {\n\t\t\toAuthProperties.load(App.class.getResourceAsStream(propertyFile));\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Unable to read \" + propertyFile\n\t\t\t\t\t+ \" configuration. Make sure you have a properly formatted \" + propertyFile + \" file.\");\n\t\t\treturn null;\n\t\t}\n\t\treturn oAuthProperties;\n\t}", "User authenticate(String username, String password);", "private Object authenticate(Invocation invocation, HttpServletRequest request,\r\n HttpServletResponse response) throws IOException {\r\n\r\n Object[] args = invocation.getArgs();\r\n if (args.length != 2) {\r\n throw new RuntimeException(\"The authenticate call must have two arguments\");\r\n }\r\n\r\n String user = (String) args[0];\r\n String password = (String) args[1];\r\n\r\n //We can make the remote call\r\n Object result = invoke(invocation);\r\n\r\n //If the authentification failed we finish the execution\r\n if (result instanceof LoginContext) {\r\n LoginContext loginContext = (LoginContext) result;\r\n if (loginContext == null) {\r\n throw new RuntimeException(\"Login failed!!\");\r\n }\r\n \r\n HttpSession session = request.getSession(false);\r\n String sessionId = session.getId();\r\n response.addHeader(\"jsessionid\", sessionId);\r\n\r\n \r\n session.setAttribute(User.USER_KEY, loginContext.getUser());\r\n\r\n session.setAttribute(RhSessionContext.CLIENT_ID, loginContext.getClient_id());\r\n session.setAttribute(RhSessionContext.ORG_ID, loginContext.getOrg_id());\r\n session.setAttribute(RhSessionContext.DUTY_ID, loginContext.getDutyId());\r\n\r\n Map attrs = loginContext.getAttributes();\r\n Set<Map.Entry> entries = attrs.entrySet();\r\n for (Map.Entry entry : entries) {\r\n session.setAttribute((String) entry.getKey(), entry.getValue());\r\n }\r\n\r\n // 创建login session\r\n LoginSession loginSession = new LoginSession();\r\n loginSession.setLoginName(loginContext.getUser().getUsername());\r\n loginSession.setIp(request.getRemoteHost());\r\n loginSession.setLoginDate(new Date(session.getCreationTime()));\r\n loginSession.setSessionId(session.getId());\r\n loginSession.setLiving(true);\r\n\r\n //Session hibernateSession = RhinoCtx.instance().getHibernate().getSession();\r\n try {\r\n \r\n ServiceBase serviceBase = (ServiceBase) ServiceFactory.getService(ServiceBase.NAME);\r\n //ServiceBase serviceBase = (ServiceBase) RhinoCtx.getBean(\"serviceBase\");\r\n //hibernateSession.beginTransaction();\r\n serviceBase.save(loginSession);\r\n //hibernateSession.getTransaction().commit();\r\n session.setAttribute(\"loginSession\", loginSession);\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n //hibernateSession.getTransaction().rollback();\r\n } finally {\r\n //hibernateSession.close();\r\n }\r\n }\r\n return result;\r\n }", "public final Properties init() throws FileNotFoundException, IOException{\n /*\n Your properties file must be in the deployed .war file in WEB-INF/classes/tokens. It is there automatically\n if you have it in Source Packages/java/tokens when you build. That is how this will read it in without defining a root location\n https://stackoverflow.com/questions/2395737/java-relative-path-of-a-file-in-a-java-web-application\n */\n String fileLoc =TinyTokenManager.class.getResource(Constant.PROPERTIES_FILE_NAME).toString();\n fileLoc = fileLoc.replace(\"file:\", \"\");\n setFileLocation(fileLoc);\n InputStream input = new FileInputStream(propFileLocation);\n props.load(input);\n input.close();\n currentAccessToken = props.getProperty(\"access_token\");\n currentRefreshToken = props.getProperty(\"refresh_token\");\n currentS3AccessID = props.getProperty(\"s3_access_id\");\n currentS3Secret = props.getProperty(\"s3_secret\");\n currentS3BucketName = props.getProperty(\"s3_bucket_name\");\n currentS3Region = Region.US_WEST_2;\n apiSetting = props.getProperty(\"open_api_cors\");\n return props;\n }", "public void authenticate(LoginCredentials credentials) throws LoginException;", "@Override\r\n public void initValues() {\r\n try {\r\n crackedPasswords = Files.readAllLines(Paths.get(DefectivePasswordValidatorConstants.PASSWORD_FILE_PATH),\r\n StandardCharsets.UTF_8);\r\n } catch (IOException e) {\r\n log.error(\"Exception occured while reading and initializing values from \"\r\n + DefectivePasswordValidatorConstants.PASSWORD_FILE_NAME, e);\r\n }\r\n }", "private boolean authenticate (HttpRequest request, HttpResponse response) throws UnsupportedEncodingException\n\t{\n\t\tString[] requestSplit=request.getPath().split(\"/\",3);\n\t\tif(requestSplit.length<2)\n\t\t\treturn false;\n\t\tString serviceName=requestSplit[1];\n\t\tfinal int BASIC_PREFIX_LENGTH=\"BASIC \".length();\n\t\tString userPass=\"\";\n\t\tString username=\"\";\n\t\tString password=\"\";\n\t\t\n\t\t//Check for authentication information in header\n\t\tif(request.hasHeaderField(AUTHENTICATION_FIELD)\n\t\t\t\t&&(request.getHeaderField(AUTHENTICATION_FIELD).length()>BASIC_PREFIX_LENGTH))\n\t\t{\n\t\t\tuserPass=request.getHeaderField(AUTHENTICATION_FIELD).substring(BASIC_PREFIX_LENGTH);\n\t\t\tuserPass=new String(Base64.decode(userPass), \"UTF-8\");\n\t\t\tint separatorPos=userPass.indexOf(':');\n\t\t\t//get username and password\n\t\t\tusername=userPass.substring(0,separatorPos);\n\t\t\tpassword=userPass.substring(separatorPos+1);\n\t\t\t\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tlong userId;\n\t\t\t\tAgent userAgent;\n\t\t\t\t\n\t\t\t\tif ( username.matches (\"-?[0-9].*\") ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tuserId = Long.valueOf(username);\n\t\t\t\t\t} catch ( NumberFormatException e ) {\n\t\t\t\t\t\tthrow new L2pSecurityException (\"The given user does not contain a valid agent id!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tuserId = l2pNode.getAgentIdForLogin(username);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tuserAgent = l2pNode.getAgent(userId);\n\t\t\t\t\n\t\t\t\tif ( ! (userAgent instanceof PassphraseAgent ))\n\t\t\t\t\tthrow new L2pSecurityException (\"Agent is not passphrase protected!\");\n\t\t\t\t((PassphraseAgent)userAgent).unlockPrivateKey(password);\n\t\t\t\t_currentUserId=userId;\n\t\t\t\t\n\t\t\t\tif(!_userSessions.containsKey(userId))//if user not registered\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tMediator mediator = l2pNode.getOrRegisterLocalMediator(userAgent);\n\t\t\t\t\t_userSessions.put(userId, new UserSession(mediator));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_userSessions.get(userId).updateServiceTime(serviceName,new Date().getTime());//update last access time for service\n\t\t\t\t\n\t\t\t\tconnector.logMessage(\"Login: \"+username);\n\t\t\t\tconnector.logMessage(\"Sessions: \"+Integer.toString(_userSessions.size()));\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}catch (AgentNotKnownException e) {\n\t\t\t\tsendUnauthorizedResponse(response, null, request.getRemoteAddress() + \": login denied for user \" + username);\n\t\t\t} catch (L2pSecurityException e) {\n\t\t\t\tsendUnauthorizedResponse( response, null, request.getRemoteAddress() + \": unauth access - prob. login problems\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t\n\t\t\t\tsendInternalErrorResponse(\n\t\t\t\t\t\tresponse, \n\t\t\t\t\t\t\"The server was unable to process your request because of an internal exception!\", \n\t\t\t\t\t\t\"Exception in processing create session request: \" + e);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponse.setStatus ( HttpResponse.STATUS_BAD_REQUEST );\n\t\t\tresponse.setContentType( \"text/plain\" );\n\t\t\tresponse.print ( \"No authentication provided!\" );\n\t\t\tconnector.logError( \"No authentication provided!\" );\n\t\t}\n\t\treturn false;\n\t}", "int authenticateUser(IDAOSession session, String userName, String password);", "private void Load( String szFileName )\n throws FileNotFoundException, NullPointerException, AppException\n {\n FileInputStream fs = null;\n File f = null;\n long nFileSize;\n \n f = new File( szFileName );\n if( !f.exists() || !f.canRead() )\n throw new FileNotFoundException( \"File \" + f.getPath() );\n\n try\n {\n nFileSize = f.length();\n fs = new FileInputStream( f );\n\n CharsetDecoder utf8Decoder = Charset.forName( \"UTF-8\" ).newDecoder();\n byte[] Data = null;\n\n // Read user name length and user name in UTF8\n if( nFileSize < 2 )\n throw new AppException( \"Bad file \" + f.getPath() );\n int nLength = (fs.read() << 8) | fs.read();\n nFileSize -= 2;\n if( nFileSize < nLength )\n throw new AppException( \"Bad file \" + f.getPath() );\n nFileSize -= nLength;\n Data = new byte[nLength];\n fs.read( Data );\n m_UserName = utf8Decoder.decode( ByteBuffer.wrap( Data ) ).toString();\n\n // Read user unique ID\n if( nFileSize < 16 )\n throw new AppException( \"Bad file \" + f.getPath() );\n nFileSize -= 16;\n m_Key = new byte[16];\n fs.read( m_Key );\n\n // Read template length and template data\n if( nFileSize < 2 )\n throw new AppException( \"Bad file \" + f.getPath() );\n nLength = (fs.read() << 8) | fs.read();\n nFileSize -= 2;\n if( nFileSize != nLength )\n throw new AppException( \"Bad file \" + f.getPath() );\n m_Template = new byte[nLength];\n fs.read( m_Template );\n fs.close();\n }\n catch( SecurityException e )\n {\n if( f == null )\n throw new AppException( \"Denies read access to the file \" + f.getPath() );\n else {\n throw new AppException( \"Denies read access to the file \" + szFileName );\n }\n }\n catch( IOException e)\n {\n if( f == null )\n throw new AppException( \"Bad file \" + f.getPath() );\n else\n throw new AppException( \"Bad file \" + szFileName );\n }\n }", "public String getCredentials();", "public boolean auth() throws IOException {\r\n \treturn auth(false);\r\n }", "void loadProperties(File propertiesFile) throws IOException\n {\n // Load the properties.\n LOGGER.info(\"Loading properties from \\\"{}\\\" file...\", propertiesFile);\n try (InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(propertiesFile), \"UTF-8\"))\n {\n properties.load(inputStreamReader);\n }\n\n // Log all properties except for password.\n StringBuilder propertiesStringBuilder = new StringBuilder();\n for (Object key : properties.keySet())\n {\n String propertyName = key.toString();\n propertiesStringBuilder.append(propertyName).append('=')\n .append(HERD_PASSWORD_PROPERTY.equalsIgnoreCase(propertyName) ? \"***\" : properties.getProperty(propertyName)).append('\\n');\n }\n LOGGER.info(\"Successfully loaded properties:%n{}\", propertiesStringBuilder.toString());\n }", "public AuthenticationUserVO getAuthenticateVO()\n/* */ throws LoginInterruptedException\n/* */ {\n/* 383 */ AuthenticationUserVO userVO = new AuthenticationUserVO();\n/* 384 */ Map<String, String> extMap = new HashMap();\n/* 385 */ LfwView widget = getCurrentWidget();\n/* 386 */ TextComp userIdComp = (TextComp)widget.getViewComponents().getComponent(\"userid\");\n/* 387 */ TextComp randomImageComp = (TextComp)widget.getViewComponents().getComponent(\"randimg\");\n/* */ \n/* 389 */ ICpSysinitQry cpSysinitQry = PortalServiceUtil.getCpSysinitQry();\n/* 390 */ boolean enabledRandomImage = false;\n/* */ try {\n/* 392 */ String showRanImg = cpSysinitQry.getSysinitValueByCodeAndPkorg(\"randomimg\", null);\n/* 393 */ enabledRandomImage = UFBoolean.valueOf(showRanImg).booleanValue();\n/* */ } catch (CpbBusinessException e) {\n/* 395 */ PortalLogger.error(e.getMessage(), e);\n/* */ }\n/* 397 */ String userId = null;\n/* */ \n/* 399 */ AppLifeCycleContext pctx = AppLifeCycleContext.current();\n/* 400 */ HttpSession session = LfwRuntimeEnvironment.getWebContext().getRequest().getSession();\n/* 401 */ String signdata = pctx.getParameter(\"p_signdata\");\n/* 402 */ String sn = pctx.getParameter(\"p_sn\");\n/* 403 */ String tz = pctx.getParameter(\"p_tz\");\n/* 404 */ if (userIdComp != null) {\n/* 405 */ if (enabledRandomImage) {\n/* 406 */ String rand = null;\n/* 407 */ if (session != null) {\n/* 408 */ rand = (String)session.getAttribute(\"rand\");\n/* */ }\n/* 410 */ String ricv = randomImageComp.getValue();\n/* 411 */ if (!StringUtils.equals(rand, ricv)) {\n/* 412 */ throw new LoginInterruptedException(LfwResBundle.getInstance().getStrByID(\"pserver\", \"PortalLoginHandler-000006\"));\n/* */ }\n/* */ }\n/* 415 */ userId = userIdComp.getValue();\n/* 416 */ if ((userId == null) || (userId.equals(\"\"))) {\n/* 417 */ throw new LoginInterruptedException(LfwResBundle.getInstance().getStrByID(\"pserver\", \"PortalLoginHandler-000007\"));\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 422 */ TextComp passComp = (TextComp)widget.getViewComponents().getComponent(\"password\");\n/* 423 */ String passValue = null;\n/* 424 */ if (passComp != null) {\n/* 425 */ passValue = passComp.getValue();\n/* 426 */ if (passValue == null) {\n/* 427 */ passValue = \"\";\n/* */ }\n/* */ }\n/* */ \n/* 431 */ ComboBoxComp multiLanguageCombo = (ComboBoxComp)widget.getViewComponents().getComponent(\"multiLanguageCombo\");\n/* 432 */ String language = multiLanguageCombo.getValue();\n/* */ \n/* 434 */ userVO.setUserID(userId);\n/* 435 */ userVO.setPassword(passValue);\n/* 436 */ extMap.put(\"p_language\", language);\n/* 437 */ extMap.put(\"p_maxwin\", \"N\");\n/* 438 */ extMap.put(\"p_signdata\", signdata);\n/* 439 */ extMap.put(\"p_sn\", sn);\n/* */ \n/* 441 */ extMap.put(\"p_tz\", tz);\n/* 442 */ String challlid = (String)session.getAttribute(\"challlid\");\n/* 443 */ extMap.put(\"challlid\", challlid);\n/* 444 */ userVO.setExtInfo(extMap);\n/* 445 */ return userVO;\n/* */ }", "public LibrarySystemLogin() throws IOException {\n\n initComponents();\n\n //load db\n l.loadBooks(bookdatabase);\n a.loadStudents(studentdatabase);\n a.loadLibrarians(lib_db);\n\n printInfo();\n //a.addLibrarian(new Librarian(\"Matt Lewis\", \"ml009\", \"password\", \"Librarian\"), lib_db);\n //printInfo();\n\n for(Librarian l: lib_db) {\n usermap.put(l.getUsername(), l.getPassword());\n }\n for(Student s: studentdatabase) {\n usermap.put(s.getUsername(), s.getPassword());\n }\n\n // 2. For-each loop\n System.out.println(\"All users:\");\n for (String key: usermap.keySet()) {\n System.out.println(key);\n }\n\n\n }", "public AuthInfo createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain);", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n // Create a session object if it is already not created.\n HttpSession session = request.getSession(true);\n\n String userName = request.getParameter(\"username\");\n String password = request.getParameter(\"password\");\n Boolean valid=false;\n\n //try(FileReader fr = new FileReader(\"D:/BYU-I/courses/cs-313/credentials.txt\"))\n \n try\n {\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"credentials.txt\", false));\n\n // print to console while debugging\n //BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));\n\n String usersPasswords = \"paul pass1 logan pass2 merideth pass3\";\n String[] words = usersPasswords.split(\" \");\n for (String word: words)\n {\n writer.write(word);\n writer.newLine();\n } \n writer.close();\n } catch(IOException e)\n {\n System.out.println(\"An I/O Error Occured: \" + e);\n }\n\n // br = new BufferedReader(new FileReader(\"D:/BYU-I/courses/cs-313/credentials.txt\"));\n BufferedReader br = null;\n br = new BufferedReader(new FileReader(\"credentials.txt\"));\n \n String user, pass;\n \n //Read and display file\n while((user = br.readLine()) != null)\n { \n pass = br.readLine();\n if(user.equals(userName) && pass.equals(password))\n {\n valid = true;\n }\n } \n \n if(valid)\n {\n request.setAttribute(\"username\", userName);\n request.setAttribute(\"password\", password); \n \n session.setAttribute(\"username\", userName);\n \n request.getRequestDispatcher(\"/welcome.jsp\").forward(request, response); \n }\n else\n {\n request.getRequestDispatcher(\"/invalidLogin.jsp\").forward(request, response); \n }\n }", "private void loadData() {\n\n \tInputStream inputStream = this.getClass().getResourceAsStream(propertyFilePath);\n \n //Read configuration.properties file\n try {\n //prop.load(new FileInputStream(propertyFilePath));\n \tprop.load(inputStream);\n //prop.load(this.getClass().getClassLoader().getResourceAsStream(\"configuration.properties\"));\n } catch (IOException e) {\n System.out.println(\"Configuration properties file cannot be found\");\n }\n \n //Get properties from configuration.properties\n browser = prop.getProperty(\"browser\");\n testsiteurl = prop.getProperty(\"testsiteurl\");\n defaultUserName = prop.getProperty(\"defaultUserName\");\n defaultPassword = prop.getProperty(\"defaultPassword\");\n }", "public static void loadProperties(String filename) {\n\n if (filename.equals(\"\")) {\n return;\n }\n propfilename = userhome + FS + filename;\n File f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n } else {\n propfilename = userhome + FS + \"Properties\" + FS + filename;\n f = new File(propfilename);\n if (f.exists()) {\n //loadProperties(propfilename);\n }\n }\n\n try {\n try (FileInputStream i = new FileInputStream(propfilename)) {\n prop.load(i);\n //prtProperties();\n }\n } catch (FileNotFoundException e) {\n System.out.println(\" ** Properties file not found=\" + propfilename + \" userhome=\" + userhome + \" \" + System.getProperty(\"user.home\"));\n saveProperties();\n } catch (IOException e) {\n System.out.println(\"IOException reading properties file=\" + propfilename);\n System.exit(1);\n }\n }", "private void GetRequiredProperties() {\r\n\r\n\r\n\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\t\r\n try {\r\n \r\n File file = new File(fileToRead);\r\n \r\n if (file.exists()) {\r\n logger.info(\"Config file exists\");\r\n } else {\r\n logger.error(\"Exception :: GetRequiredProperties :: Config file not found\");\r\n throw new RuntimeException(\"Exception :: GetRequiredProperties :: Config file not found\");\r\n }\r\n \r\n prop.load(new FileInputStream(file));\r\n\r\n } catch (Exception e) {\r\n\r\n logger.error(\"Exception :: GetRequiredProperties :: \" + e.getMessage(), e);\r\n\r\n throw new RuntimeException(\"Exception :: GetRequiredProperties :: \" + e.getMessage());\r\n }\r\n\r\n\t sifUrl = prop.getProperty(\"MDM_SIF_URL\");\r\n\t orsId = prop.getProperty(\"MDM_ORS_ID\");\r\n\t username = prop.getProperty(\"MDM_USER_NAME\");\r\n\t password = prop.getProperty(\"MDM_PASSWORD\");\r\n\t \r\n\t logger.info(\"SIF URL ::\" + sifUrl);\r\n\t logger.info(\"ORS ID ::\" + orsId );\r\n\t logger.info(\"User Id ::\" + username);\r\n\t logger.info(\"Password ::\" + password);\r\n\t \r\n\t\r\n\t}", "static void getProp() throws Exception {\r\n\r\n\t\tFileInputStream fileInputStream = new FileInputStream(\r\n\t\t\t\t\"C:\\\\repos\\\\test\\\\src\\\\main\\\\java\\\\test\\\\config.properties\");\r\n\r\n\t\tProperties properties = new Properties();\r\n\t\tproperties.load(fileInputStream);\r\n\r\n\t\tSystem.out.println(\"By using File Input stream class: \" + properties.getProperty(\"username\"));\r\n\r\n\t}", "public AuthCredentials(String scheme,String name,String password)\n {\n this.scheme = scheme;\n this.name = name;\n this.password = password;\n }", "public void shiro_signin(){\n Factory<SecurityManager> factory = new IniSecurityManagerFactory(\"classpath:shiro.ini\");\n SecurityManager securityManager = factory.getInstance();\n\n // for this simple example quickstart, make the SecurityManager\n // accessible as a JVM singleton. Most applications wouldn't do this\n // and instead rely on their container configuration or web.xml for\n // webapps. That is outside the scope of this simple quickstart, so\n // we'll just do the bare minimum so you can continue to get a feel\n // for things.\n SecurityUtils.setSecurityManager(securityManager);\n\n // Now that a simple Shiro environment is set up, let's see what you can do:\n\n // get the currently executing user:\n Subject currentUser = SecurityUtils.getSubject();\n\n // Do some stuff with a Session (no need for a web or EJB container!!!)\n Session session = currentUser.getSession();\n session.setAttribute(\"someKey\", \"aValue\");\n String value = (String) session.getAttribute(\"someKey\");\n if (value.equals(\"aValue\")) {\n logger.info(\"Retrieved the correct value! [\" + value + \"]\");\n }\n\n // let's login the current user so we can check against roles and permissions:\n if (!currentUser.isAuthenticated()) {\n UsernamePasswordToken token = new UsernamePasswordToken(\"root\", \"root\");\n token.setRememberMe(true);\n try {\n currentUser.login(token);\n } catch (UnknownAccountException uae) {\n logger.info(\"There is no user with username of \" + token.getPrincipal());\n } catch (IncorrectCredentialsException ice) {\n logger.info(\"Password for account \" + token.getPrincipal() + \" was incorrect!\");\n } catch (LockedAccountException lae) {\n logger.info(\"The account for username \" + token.getPrincipal() + \" is locked. \" +\n \"Please contact your administrator to unlock it.\");\n }\n // ... catch more exceptions here (maybe custom ones specific to your application?\n catch (AuthenticationException ae) {\n //unexpected condition? error?\n }\n }\n\n //say who they are:\n //print their identifying principal (in this case, a username):\n logger.info(\"User [\" + currentUser.getPrincipal() + \"] logged in successfully.\");\n\n //test a role:\n if (currentUser.hasRole(\"admin\")) {\n logger.info(\"has admin role\");\n } else {\n logger.info(\"no admin role\");\n }\n\n //test a typed permission (not instance-level)\n if (currentUser.isPermitted(\"order:read:finished\")) {\n logger.info(\"has order read \");\n } else {\n logger.info(\"no order read \");\n }\n }", "private Properties loadConfig(String baseFileName, String userPathParamName) throws IOException {\n\t\tString fileName = baseFileName + \".properties\";\n\t\tProperties properties = new Properties();\n\t\ttry (InputStream configStream = ApiInitializer.class.getClassLoader().getResourceAsStream(fileName)) {\n\t\t\tif (configStream != null) {\n\t\t\t\tproperties.load(configStream);\n\t\t\t}\n\t\t}\n\n\t\t// Then, override with whatever the user set up.\n\t\tString userFilePath = servletContext.getInitParameter(userPathParamName);\n\t\tif (userFilePath == null) {\n\t\t\tuserFilePath = \"WEB-INF/\" + baseFileName + \".properties\";\n\t\t} else {\n\t\t\tPath path = Paths.get(userFilePath, baseFileName + \".properties\");\n\t\t\tuserFilePath = path.toString();\n\t\t}\n\t\ttry (InputStream inStream = servletContext.getResourceAsStream(userFilePath);) {\n\t\t\tif (inStream != null) {\n\t\t\t\tproperties.load(inStream);\n\t\t\t}\n\t\t}\n\n\t\treturn properties;\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFileReader fr = new FileReader(\"./resources/data.properties\");\n\t\tProperties properties = new Properties();\n\t\tproperties.load(fr);\n\t\t\n\t\tString usernameData = properties.getProperty(\"username\");\n\t\tSystem.out.println(usernameData);\n\t}", "protected synchronized void login() {\n\t\tauthenticate();\n\t}", "public static void main(String[] args) {\n\n\tFile f=new File(\"C:/Users/christian/Desktop/registros.txt\"); \n\t\t\ttry{ \n\t\t\tFileReader fr=new FileReader(f); \n\t\t\tBufferedReader br=new BufferedReader(fr); \n\t\t\tString s; \n\t\t\tdo{ \n\t\t\t s=br.readLine(); \n\t\t\t System.out.println(s); \n\t\t\t}while(s!=null); \n\t\t\t} \n\t\t\tcatch(FileNotFoundException e){ \n\t\t\t\tSystem.out.println(\"Error al abrir el archivo\"); \n\t\t\t\t} \n\t\t\t\tcatch(IOException e){ \n\t\t\t\tSystem.out.println(\"Error al leer\"); \n\t\t\t\t} \n\t\t\t\n\t\t\tnew Principal().init();\n\t\t\t}", "private void initiate(){try{\n\t//String dataIni = run.class.getResource(\"../util/DataBase.ini\").getFile();\n //FileInputStream fin=new FileInputStream(dataIni); // 打开文件,从根目录开始寻找\n//\tFileInputStream fin=new FileInputStream(\"src/util/DataBase.ini\"); // 打开文件,从根目录开始寻找\n//\tProperties props=new Properties(); // 建立属性类,读取ini文件\n//\tprops.load(fin); \n//\tdriver=props.getProperty(\"driver\"); //根据键读取值\n//\turl=props.getProperty(\"url\");\n//\tusername=props.getProperty(\"username\");\n//\tuserpassword=props.getProperty(\"userpassword\");\n\t}\n\tcatch(Exception e){e.printStackTrace();}\n\t}", "@Override\n\tpublic boolean isUserAuthenticate(String username, String password) {\n\t\t// validate username and pwd with predefined credentials\n\t\tif (username.equals(Utility.USERNAME) && password.equals(Utility.PASSWORD)) {\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "LoggedUser authenticate(@Valid AccountCredentials credentials) throws IOException;", "default void authByKeys(ActiveMQSslConnectionFactory factory, Broker broker) {\n try {\n factory.setKeyStore(String.format(\"file:///%s\", broker.getKeystorePath()));\n // Password of the private key\n factory.setKeyStoreKeyPassword(broker.getKeystoreKeyPassword());\n // password of the keystore\n factory.setKeyStorePassword(broker.getKeystorePassword());\n // set the truststore jks file\n factory.setTrustStore(String.format(\"file:///%s\", broker.getTruststorePath()));\n // set the truststore password\n factory.setTrustStorePassword(broker.getTruststorePassword());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "SignedObject authenticate(String username, String hashedPassword) throws RemoteException, Exception;", "public void propagateCredentials( User user, String password );", "@Override\n public boolean auth(String email, String pseudonyme) {\n Properties props = new Properties();\n props.setProperty(\"org.omg.CORBA.ORBInitialHost\", \"localhost\");\n props.setProperty(\"org.omg.CORBA.ORBInitialPort\", \"3700\");\n props.setProperty(\"java.naming.factory.initial\", \"com.sun.enterprise.naming.SerialInitContextFactory\");\n props.setProperty(\"java.naming.factory.url.pkgs\", \"com.sun.enterprise.naming\");\n props.setProperty(\"java.naming.factory.state\", \"com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl\");\n \n StatelessDirectoryManagerBeanRemote sb = null;\n InitialContext ic;\n \n try {\n ic = new InitialContext(props);\n sb = (StatelessDirectoryManagerBeanRemote)ic.lookup(\"com.master2.datascale.directorymanager.bean.StatelessDirectoryManagerBeanRemote\");\n\t\t\t\n } catch (NamingException ex) {\n Logger.getLogger(StatefulAuctionManagerBean.class.getName()).log(Level.SEVERE, null, ex);\n }\n\t\t\t\n return sb.auth(email, pseudonyme);\n }", "private void loadSettings() {\r\n \tString fname = baseDir + \"/\" + configFile;\r\n\t\tString line = null;\r\n\r\n\t\t// Load the settings hash with defaults\r\n\t\tsettings.put(\"db_url\", \"\");\r\n\t\tsettings.put(\"db_user\", \"\");\r\n\t\tsettings.put(\"db_pass\", \"\");\r\n\t\tsettings.put(\"db_min\", \"2\");\r\n\t\tsettings.put(\"db_max\", \"10\");\r\n\t\tsettings.put(\"db_query\", \"UPDATE members SET is_activated=1 WHERE memberName=? AND is_activated=3\");\r\n\t\t// Read the current file (if it exists)\r\n\t\ttry {\r\n \t\tBufferedReader input = new BufferedReader(new FileReader(fname));\r\n \t\twhile (( line = input.readLine()) != null) {\r\n \t\t\tline = line.trim();\r\n \t\t\tif (!line.startsWith(\"#\") && line.contains(\"=\")) {\r\n \t\t\t\tString[] pair = line.split(\"=\", 2);\r\n \t\t\t\tsettings.put(pair[0], pair[1]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \tcatch (FileNotFoundException e) {\r\n\t\t\tlogger.warning( \"[SMF] Error reading \" + e.getLocalizedMessage() + \", using defaults\" );\r\n \t}\r\n \tcatch (Exception e) {\r\n \t\te.printStackTrace();\r\n \t}\r\n }", "public static void run_auth(String pass)\r\n\t{\r\n\t\tpassword = pass;\r\n\t\t\r\n\t\t// Call hash function to encrypt the input password\r\n\t\ttry \r\n\t\t{\r\n\t\t\thash = hash_password(password);\r\n\t\t\tSystem.out.println(\"Hashed password: \" + hash);\r\n\t\t} \r\n\t\tcatch (Exception e) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"There was an error hashing the input password...\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Call query function to retrieve hash from the DB\r\n\t\ttry \r\n\t\t{\r\n\t\t\tquery_hash = query_hash();\r\n\t\t\tSystem.out.println(\"Queried hash: \" + query_hash);\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"There was an error querying the database...\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void establishConnection() {\r\n\t\t// Load IMAP-Account credentials from the property file\r\n\t\tProperties prop = new Properties();\r\n\t\tInputStream in = this.getClass().getClassLoader().getResourceAsStream(\"server_resources/IMAPAccountCredentials.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(in);\r\n\t\t\tin.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\thost = prop.getProperty(\"imapHost\");\r\n\t\tuser = prop.getProperty(\"imapUsername\");\r\n\t\tpassword = prop.getProperty(\"imapPassword\");\r\n\t\tuseSSL = Boolean.parseBoolean(prop.getProperty(\"useSSL\"));\r\n\r\n\t\t// Create session for account\r\n\t\tProperties props = new Properties();\r\n\t\tprops.put(\"mail.imap.host\", host);\r\n\t\tif (useSSL) {\r\n\t\t\tprops.put(\"mail.imap.socketFactory.port\", \"993\");\r\n\t\t\tprops.put(\"mail.imap.socketFactory.class\", \"javax.net.ssl.SSLSocketFactory\");\r\n\t\t\tprops.put(\"mail.imap.auth\", \"true\");\r\n\t\t\tprops.put(\"mail.imap.port\", \"993\");\r\n\t\t}\r\n\t\tSession session = Session.getDefaultInstance(props, new javax.mail.Authenticator() {\r\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\r\n\t\t\t\treturn new PasswordAuthentication(user, password);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tfinal URLName unusedUrlName = null;\r\n\t\tif (useSSL) {\r\n\t\t\tstore = new IMAPSSLStore(session, unusedUrlName);\r\n\t\t} else {\r\n\t\t\tstore = new IMAPStore(session, unusedUrlName);\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tstore.connect(host, user, password);\r\n\t\t} catch (MessagingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public CryptFile(File file, CryptFile parentFile) {\n this.file = file;\n this.parentFile = parentFile;\n users = new Properties();\n }", "public void authenticate(String plainPassword) {\n\t\tthis.plainPassword = plainPassword;\n\t\tauthenticate();\n\t}", "@Override\n public void load(String keyWord, String fileName){\n FileReader loadDetails;\n String record;\n try{\n loadDetails=new FileReader(fileName);\n BufferedReader bin=new BufferedReader(loadDetails);\n while (((record=bin.readLine()) != null)){\n if ((record).contentEquals(keyWord)){\n setUsername(record);\n setPassword(bin.readLine());\n setFirstname(bin.readLine());\n setLastname(bin.readLine());\n setDoB((Date)DMY.parse(bin.readLine()));\n setContactNumber(bin.readLine());\n setEmail(bin.readLine());\n setSalary(Float.valueOf(bin.readLine()));\n setPositionStatus(bin.readLine());\n homeAddress.load(bin);\n }//end if\n }//end while\n bin.close();\n }//end try\n catch (IOException ioe){}//end catch\n catch (ParseException ex) {\n Logger.getLogger(Product.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static void readUserFile() {\n\t\ttry {\n\t\t\tObjectInputStream readFile = new ObjectInputStream(new FileInputStream(userFile));\n\t\t\tVerify.userList = (ArrayList<User>) readFile.readObject();\n\t\t\treadFile.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 (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//add contents of file to separate lists\n\t\tfor (int i=0; i<Verify.userList.size(); i++) {\n\t\t\tVerify.userIds.add(Verify.userList.get(i).getUserId());\n\t\t\tVerify.usernames.add(Verify.userList.get(i).getUsername());\n\t\t\tif (Verify.userList.get(i).getAccounts() != null) {\n\t\t\t\tVerify.accountList.addAll(Verify.userList.get(i).getAccounts());\n\t\t\t}\n\t\t\tif (Verify.userList.get(i).getRequests() != null) {\n\t\t\t\tVerify.requestList.addAll(Verify.userList.get(i).getRequests());\t\n\t\t\t}\n\t\t}\n\t\tfor (Account account: Verify.accountList) {\n\t\t\tVerify.accountIds.add(account.getAccountId());\n\t\t}\n\t}", "public static User loadUser(String path){\r\n if (path == null)\r\n throw new IllegalArgumentException(\"Path may not be null\");\r\n\r\n File userDir = new File(path);\r\n try{\r\n if (!userDir.exists())\r\n throw new FileNotFoundException(userDir.toString());\r\n if (!userDir.isDirectory())\r\n throw new IOException(\"Path must be a directory\");\r\n\r\n File parent = new File(userDir.getParent());\r\n String serverID = parent.getName();\r\n\r\n Server server = getServer(serverID);\r\n if (server == null){\r\n JOptionPane.showMessageDialog(mainFrame, \"Unable to load user file from:\\n\"+userDir+\r\n \"\\nBecause \"+serverID+\" is not a known server\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return null;\r\n }\r\n\r\n File settingsFile = new File(userDir, \"settings\");\r\n InputStream propsIn = new BufferedInputStream(new FileInputStream(settingsFile));\r\n Properties props = new Properties();\r\n props.load(propsIn);\r\n propsIn.close();\r\n\r\n Hashtable userFiles = new Hashtable();\r\n File userFilesFile = new File(userDir, \"files\"); \r\n if (userFilesFile.exists()){\r\n DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInputStream(userFilesFile)));\r\n ByteArrayOutputStream buf = new ByteArrayOutputStream();\r\n int filesCount = in.readInt();\r\n for (int i = 0; i < filesCount; i++){\r\n String filename = in.readUTF();\r\n int filesize = in.readInt();\r\n if (IOUtilities.pump(in, buf, filesize) != filesize)\r\n throw new EOFException(\"EOF while reading user-file: \"+filename);\r\n byte [] data = buf.toByteArray();\r\n buf.reset();\r\n MemoryFile memFile = new MemoryFile(data);\r\n userFiles.put(filename, memFile);\r\n }\r\n in.close();\r\n }\r\n\r\n User user = server.createUser(props, userFiles);\r\n\r\n userDirs.put(user, userDir);\r\n\r\n return user;\r\n } catch (IOException e){\r\n e.printStackTrace();\r\n JOptionPane.showMessageDialog(mainFrame, \"Unable to load user file from:\\n\"+userDir, \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return null;\r\n }\r\n }", "public interface CryptoService {\n /**\n * Read encrypted password file.\n *\n * @param file Encrypted file instance.\n * @param password Password to decrypt file.\n *\n * @return file content.\n *\n * */\n String readFile(File file, String password);\n\n /**\n * Write and encrypt content to file.\n *\n * @param file encrypted file location.\n * @param password password which will be used to encrypt file.\n * @param cnt file content.\n * */\n void writeFile(File file, String password, String cnt);\n\n /**\n * Encrypt content\n *\n * @param password password which will be used to encrypt file.\n * @param textToEncrypt text which will be encrypted\n * @return encrypted content\n * */\n String encrypt(String password, String textToEncrypt);\n\n /**\n * Decrypt content\n *\n * @param password password which will be used to encrypt file.\n * @param textToDecrypt text which will be decrypted\n * @return decrypted content\n * */\n String decrypt(String password, String textToDecrypt);\n\n /**\n * Write and encrypt the password database.\n *\n * @param passwordDatabase passwords database which will be saved to encrypted file.\n * */\n void writeFile(PasswordDatabase passwordDatabase) throws JsonConversionException;\n}", "public void run() {\n\n ConfigFileURLResolver resolver = new ConfigFileURLResolver(); \n \n try {\n this._domainFile = resolver.getFileURL(this._domainFilename);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + \"Error occurred while loading login file: \"+sesEx.getMessage());\n ++this._errorCount;\n return;\n }\n \n //--------------------------\n \n //try to create login file instance\n try {\n _loginReader = new LoginFile();\n } catch (IOException ioEx) {\n this._logger.error(ERROR_TAG + \"Error occurred while loading login file\");\n ++this._errorCount;\n return;\n }\n \n //--------------------------\n \n //try to create encrypter instance\n try {\n _encrypter = new PublicKeyEncrypter();\n } catch (IOException ioEx) {\n this._logger.error(ERROR_TAG + \"Error occurred while loading encrypter\");\n //ioEx.printStackTrace();\n this._logger.trace(null, ioEx);\n ++this._errorCount;\n return;\n }\n \n //--------------------------\n \n //create reconnect throttle \n \n _throttle = new ReconnectThrottle();\n \n //--------------------------\n \n //install shutdown handler to hook\n //Runtime.getRuntime().addShutdownHook(new ShutDownHandler());\n \n //check action id\n if (this._actionId.equals(Constants.NOOPERATION)) {\n this._logger.error(ERROR_TAG + \"Unrecognized user operation: \"\n + this._userOperation);\n ++this._errorCount;\n return;\n }\n\n boolean parseError = false;\n\n try {\n //construct parser and parser\n this._parser.parse(this._actionId, this._args);\n } catch (ParseException pEx) {\n parseError = true;\n\n //if no arguments were provided and exception is missing args,\n //then just send message to debug and rely on help message\n if (this._args.length == 0 && \n pEx.getErrorOffset() == UtilCmdParser.CODE_MISSING_ARGUMENTS)\n this._logger.debug(ERROR_TAG + pEx.getMessage());\n else\n this._logger.error(ERROR_TAG + pEx.getMessage());\n this._logger.debug(null, pEx);\n } catch (Exception ex) {\n parseError = true;\n this._logger.error(ERROR_TAG + ex.getMessage());\n this._logger.debug(null, ex);\n }\n\n if (parseError) {\n //attempt to logout\n try {\n this._logout();\n } catch (Exception le) {\n this._logger.debug(null, le);\n }\n ++this._errorCount;\n }\n\n //-------------------------\n\n boolean help = parseError || \n (this._parser == null) || this._parser.printHelp();\n\n //if help is true, print usage and return\n if (help) {\n this._logger.info(this._getUsage());\n return;\n }\n\n \n //-------------------------\n\n// FileEventHandlerManager fehManager = new FileEventHandlerManager(\n// this._argTable, this._actionId); \n// this._fileEventHandlerSet = fehManager.getFileEventHandlers();\n \n //-------------------------\n\n this._using = (this._parser.getOptionsFilename() != null);\n\n try {\n //iterate over number of argument sets, processing each\n\n Hashtable argTable;\n this._parser.reset();\n int iterations = this._parser.iterations();\n for (int i = 0; i < iterations; ++i) {\n argTable = (Hashtable) this._parser.getCurrentArguments();\n \n try {\n _process(argTable);\n } catch (SessionException sesEx) {\n this._logger.error(ERROR_TAG + sesEx.getMessage());\n this._logger.debug(null, sesEx);\n try {\n this._logout();\n } catch (Exception le) {\n this._logger.debug(null, le);\n }\n ++this._errorCount;\n //return;\n }\n this._parser.advance();\n }\n\n //-------------------------\n\n //logout successfully\n this._logout();\n\n //-------------------------\n\n } catch (Exception ex) {\n this._logger.error(ERROR_TAG + ex.getMessage());\n this._logger.debug(null, ex);\n try {\n this._logout();\n } catch (Exception le) {\n this._logger.debug(null, le);\n }\n ++this._errorCount;\n return;\n }\n\n }", "public void authenticationProcedure(){\n\t\tthrow new UnsupportedOperationException(\"TODO: auto-generated method stub\");\r\n\t}" ]
[ "0.654372", "0.6497558", "0.6484985", "0.6428726", "0.6385816", "0.62410486", "0.6220708", "0.6156259", "0.6144181", "0.60678834", "0.5988974", "0.59840536", "0.5950981", "0.58872986", "0.58802754", "0.5862439", "0.58596", "0.58363354", "0.58181846", "0.57928187", "0.57880324", "0.57722414", "0.5739431", "0.5695899", "0.5684037", "0.56824285", "0.5679227", "0.5669581", "0.56685054", "0.5668277", "0.5656972", "0.56567717", "0.5653416", "0.5643787", "0.5624561", "0.56196266", "0.56010735", "0.5598086", "0.55866665", "0.5580853", "0.5579426", "0.55739987", "0.5558547", "0.55480534", "0.55381227", "0.5529793", "0.55228835", "0.5511208", "0.54950595", "0.5484199", "0.5475545", "0.5474726", "0.54541004", "0.5448005", "0.54458433", "0.543848", "0.5437628", "0.5420083", "0.5413462", "0.5409997", "0.540295", "0.54026616", "0.5401834", "0.5399021", "0.5395515", "0.53845143", "0.53843516", "0.5374158", "0.53702", "0.53624", "0.5348492", "0.5329421", "0.5320643", "0.53204185", "0.5314108", "0.52932185", "0.5291594", "0.5289324", "0.5288781", "0.52741426", "0.5268391", "0.52635384", "0.52530015", "0.5230678", "0.5217112", "0.5199497", "0.5191302", "0.5190353", "0.51827306", "0.51816356", "0.51763475", "0.51727676", "0.51717824", "0.5164447", "0.51631385", "0.51628405", "0.51609087", "0.5160726", "0.51544434", "0.51513654" ]
0.5499196
48
used to maintain mapping between movie, shop and Entry
public MovieRentingSystem(int n, int[][] entries) { cheapestUnrentedShops = new HashMap(); cheapestRentedMovies = new TreeSet<int []>((a,b) -> a[2] == b[2] ? (a[0] == b[0] ? a[1] - b[1] : a[0] - b[0]) : a[2] - b[2]); movieToShopToEntry = new HashMap(); for(int []entry: entries){ int shop = entry[0]; int movie = entry[1]; Map<Integer, int []> hm = movieToShopToEntry.getOrDefault(movie, new HashMap()); hm.put(shop, entry); movieToShopToEntry.put(movie, hm); TreeSet<int []> ts = cheapestUnrentedShops.getOrDefault(movie, new TreeSet<int []>((a,b) -> a[2] == b[2] ? a[0] - b[0] : a[2] - b[2])); ts.add(entry); cheapestUnrentedShops.put(movie, ts); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tHashMap<Integer, Movil> moviles = new HashMap<Integer, Movil>();\r\n\t\t\r\n\t\t/*\r\n\t\t//Utilizando \"var\" como en C#\r\n\t\tvar movilJuan = new Movil(111, 4, \"Samsung\", 4);\r\n\t\tvar movilMaria = new Movil(232, 6, \"Apple\", 4);\r\n\t\tvar movilPedro = new Movil(955, 4, \"Xiaomi\", 5);\r\n\t\t*/\r\n\t\tMovil movilJuan = new Movil(111, 4, \"Samsung\", 4);\r\n\t\tMovil movilMaria = new Movil(232, 6, \"Apple\", 4);\r\n\t\tMovil movilPedro = new Movil(955, 4, \"Xiaomi\", 5);\r\n\r\n\t\tMovil movilBusqueda = new Movil(232, 6, \"Apple\", 4);\r\n\t\t\r\n\t\t//Añadimos los elementos a la colección\r\n\t\t/*\r\n\t\tmoviles.put(111, movilJuan);\r\n\t\tmoviles.put(232, movilMaria);\r\n\t\tmoviles.put(955, movilPedro);\r\n\t\t*/\r\n\t\tmoviles.put(movilJuan.getImei(), movilJuan);\r\n\t\tmoviles.put(movilMaria.getImei(), movilMaria);\r\n\t\tmoviles.put(movilPedro.getImei(), movilPedro);\r\n\t\t\r\n\t\t\r\n\t\t//Comprobamos is un elemento se encuentra en la colección por su valor\r\n\t\t//El método containsValue() requiere redefinir el método equals() de la clase Movil para saber que campo debe comparar para determinar que dos objetos sean iguales.\r\n\t\t//En caso de no hacerlo, los objetos se comparan utilizando sus Hashcodes (direcciones de memoria).\r\n\t\tif (moviles.containsValue(movilBusqueda)) {\r\n\t\t\tSystem.out.println(\"Encontrado\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No encontrado\");\r\n\t\t}\r\n\t\t\r\n\r\n\t\t\r\n\t}", "public MonomerStore(Map<String, Map<String, Monomer>> monomerDB,\r\n Map<String, Monomer> smilesMonomerDB) {\r\n this.monomerDB = monomerDB;\r\n this.smilesMonomerDB = smilesMonomerDB;\r\n }", "private static void randomizedEntry() {\r\n\t\tfor (int i = 0; i < shops.length; i++) {\r\n\t\t\tshops[i] = new Shop();\r\n\t\t}\r\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}", "public void addEntry(@NotNull Entry entry) {\n for (String name : entry.names) {\n mappingByName.put(name, entry);\n }\n }", "public int insertEntry (MovieRatings key) throws IOException {\n \t\t\n \t\t/* we're often going to have to split records across more than one page; that's probably something\n \t\t * we need to handle right here */\n \n \t\tint firstPageID = -1; // used to track where the ratings for this movie begin\n \t\t\n \t\twhile(key.getUserRatings().size() > 0) {\n \t\t\tlastPageID = allocate();\n \t\t\tif(firstPageID == -1)\n \t\t\t\tfirstPageID = lastPageID;\n \t\t\tlastPage = new MovieID_RatingsPage(pageSize);\n \t\t\tlastPage.insert(key, pageCapacity); /* insert max # of records that will fit on one page */\n \t\t\tbuffer.writePage(file, lastPageID, lastPage);\n \t\t}\n \t\t\n \t\tIDLookups.add(new IDLookup(key.getMovieID(), firstPageID));\n \t\t// System.out.println(\"Added new movie \" + key.getMovieID() + \" at page \" + firstPageID);\n \t\t\n \t\treturn lastPageID;\n \t}", "private Movie mapMovie(final Record movieRecord) {\n return new Movie(\n movieRecord.get(\"title\").asString(),\n movieRecord.get(\"tagline\").asString(),\n movieRecord.get(\"released\").asInt()\n );\n }", "private void createHisMap(Customer customer)\n {\n hisMap= new HashMap<>();\n idFile.open(\"history.txt\");\n String line=idFile.getNextLine();\n String name = customer.getUsername();\n specificLine=-1;\n int i=0;\n while (line!=null)\n {\n int j=0;\n String[] fields = line.split(\",\");\n if(fields[0].equals(name))\n {\n specificLine=i;\n }\n\n String[] fields2 = fields[1].split(\"%\");\n\n\n while (j<fields2.length)\n {\n if(hisMap.get(fields[0])==null)\n {\n hisMap.put(fields[0],new ArrayList<>());\n hisMap.get(fields[0]).add(fields2[j]);\n\n }\n else\n {\n hisMap.get(fields[0]).add(fields2[j]);\n }\n j++;\n }\n\n line=idFile.getNextLine();\n i++;\n }\n if(specificLine== -1)\n specificLine=i;\n }", "static void mysteryInsert(String name, movieNode movieNode) {\n if (flag == 1) {\n actorList actorlist = new actorList();\n holder_actorList = actorlist; //so that it can be accessed outside the if block\n actorlist.insertAtFront(name, movieNode);\n flag++;\n }\n else {\n\n holder_actorList.insertAtFront(name, movieNode);\n }\n }", "private void copyMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (map[i][j] instanceof Player) {\n\t\t\t\t\tnewMap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof BlankSpace) {\n\t\t\t\t\tnewMap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof Mho) {\n\t\t\t\t\tnewMap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof Fence) {\n\t\t\t\t\tnewMap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "public Player(String name, Map<Integer,Element> moves){\n this.name = name;\n this.moves = moves;\n}", "public void in(food entry)\n\t{\n\t\titems.add(entry);\n\t}", "public void addMovieDetails(MovieDetails movieDetails) {\n if (movieDetails != null) {\n if (!isMovieDetailsExists(movieDetails.getId())) {\n SQLiteDatabase sqLiteDatabase = this.getWritableDatabase();\n // Insert movie details data\n ContentValues values = insertMovieDetailsInCntnValues(movieDetails);\n sqLiteDatabase.insert(MoviesDetailsEntry.TABLE_NAME, null, values);\n // Insert genres data into genres table\n for (int i = 0; i < movieDetails.getGenres().size(); i++) {\n // If such genre doesn't exist, put into database\n if (!isGenreExist(movieDetails.getGenres().get(i).getGenreId())) {\n ContentValues genreValues = insertMovieGenresInCntnValues(movieDetails.getGenres().get(i));\n sqLiteDatabase.insert(GenreEntry.TABLE_NAME, null, genreValues);\n }\n // Insert genre_id and movie_id into movie_genre table\n ContentValues movieGenreValues = insertMovieGenreValues(movieDetails.getId(), movieDetails.getGenres().get(i).getGenreId());\n sqLiteDatabase.insert(MovieGenreEntry.TABLE_NAME, null, movieGenreValues);\n }\n sqLiteDatabase.close();\n }\n } else {\n throw new IllegalArgumentException(\"Passed movie object is null or already exist\");\n }\n }", "public MovieDetails editMovieFlexEntry(MovieDetails md);", "public StatusObj createMovieFlexEntry(MovieDetails md);", "void initialiseShowroom(){\n currentCars.put(\"Aston Martin\", new Car(\"Aston Martin\", 50000, 2012));\n currentCars.put(\"BMW\", new Car(\"BMW\", 30000, 2014));\n currentCars.put(\"Chevrolet\", new Car(\"Chevrolet\", 20000, 2013));\n currentCars.put(\"Datsun\", new Car(\"Datsun\", 2000, 2001));\n }", "private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }", "@Override\n public void onCreate(SQLiteDatabase sqLiteDatabase) {\n final String SQL_CREATE_MOVIES_TABLE =\n \"CREATE TABLE IF NOT EXISTS \" + MoviesEntry.TABLE_NAME + \" (\" +\n MoviesEntry._ID + \" INTEGER PRIMARY KEY AUTOINCREMENT, \" +\n MoviesEntry.COLUMN_MOVIE_ID + \" INTEGER NOT NULL, \" +\n MoviesEntry.COLUMN_MOVIE_TITLE + \" TEXT NOT NULL, \" +\n MoviesEntry.COLUMN_MOVIE_OVERVIEW + \" TEXT NOT NULL, \" +\n MoviesEntry.COLUMN_MOVIE_RATINGS + \" REAL NOT NULL, \" +\n MoviesEntry.COLUMN_MOVIE_RELEASE_DATE + \" TEXT NOT NULL, \" +\n MoviesEntry.COLUMN_MOVIE_GENRES + \" TEXT NOT NULL, \" +\n MoviesEntry.COLUMN_MOVIE_POSTER_PATH + \" TEXT NOT NULL, \" +\n MoviesEntry.COLUMN_MOVIE_BACKDROP_PATH + \" TEXT NOT NULL, \" +\n \" UNIQUE (\" + MoviesEntry.COLUMN_MOVIE_ID + \") ON CONFLICT REPLACE);\";\n\n sqLiteDatabase.execSQL(SQL_CREATE_MOVIES_TABLE);\n }", "public void InsertInfo(String Name) throws IOException{\r\n test.songMatch();\r\n test.sourceMatch();\r\n test.WordTable();\r\n test.doword2();\r\n \r\n String value=\"\";\r\n String Performer=\"\";// will hold either arrangers, vocalists, or circles\r\n int counter=0;\r\n List<String> ListLines=new ArrayList<>();\r\n List<String> ListInserts=new ArrayList<>();\r\n List<String> PerformerLinesList=new ArrayList<>();\r\n Map <Integer,String> Map=new HashMap<>();\r\n Map <Integer,String> TempMap=new HashMap<>();\r\n Map <Integer,Integer> LinesMap=new HashMap<>();\r\n for(String object:FileNames){\r\n try{\r\n \r\n MP3 mp3 = new MP3(object); \r\n Title=mp3.getTitle(); \r\n switch(Name){\r\n case \"Vocal\": value= \"Vocalists\";\r\n Performer=mp3.getComments().trim();//get comments AKA THE VOCALISTS \r\n break;\r\n case \"Arranger\": value= \"Arrangers\";\r\n Performer=mp3.getMusicBy().trim();//get comments AKA THE ARRANFERS \r\n break;\r\n case \"Circle\": value= \"Circles\";\r\n Performer=mp3.getBand().trim();//get comments AKA THE CIRCLES \r\n break;\r\n } \r\n String []perform; \r\n perform=Performer.split(\"/\"); \r\n for (String perform1 : perform) {\r\n perform1=perform1.trim();\r\n boolean check=true; \r\n TempMap.put(counter, perform1.toLowerCase()); \r\n for(int id:Map.keySet()){\r\n if(perform1.toLowerCase().hashCode()==Map.get(id).toLowerCase().hashCode()){\r\n // System.out.println(\"check is false\"+counter);\r\n check=false;\r\n break;\r\n }\r\n }\r\n if(!Map.containsValue(perform1)){\r\n if(check)\r\n Map.put(counter, perform1);\r\n counter++;\r\n }\r\n \r\n int id=0;\r\n for(int a:Map.keySet()){\r\n if(Map.get(a).toLowerCase().equals(perform1.toLowerCase())){ \r\n id=a;\r\n break;\r\n } \r\n }\r\n String nos=\"\";\r\n nos= value;\r\n nos= value.substring(0,nos.length()-1);\r\n \r\n //vocalist inserts for table \r\n ListInserts.add(\"Insert Into \" +value+ \" (\"+nos+\"_id,\"+nos+\"_Name) values(\"+id+\",\"+perform1+\");\");\r\n //System.out.println(\"Insert Into \" +value+ \" (\"+nos+\"_id,\"+nos+\"_Name) values(\"+id+\",\"+perform1+\");\");\r\n \r\n //vocalist lines inserts for vocalist lines table\r\n //System.out.println(\"Insert Into VocalistLines (Song_id,Vocalist_Id) values(\"+Title+perform1);//+Title.hashCode()+\",\"+id+\");\"); \r\n // System.out.println(\"Insert Into VocalistLines (Song_id,Vocalist_Id) values(\"+Title.hashCode()+\",\"+id+\");\");\r\n ListLines.add(\"Insert Into \" +value+\"Lines (Song_id,Vocalist_Id) values(\"+Title.hashCode()+\",\"+id+\");\");\r\n int songid=test.getsongid(test.getMap(\"T\"), Title);\r\n LinesMap.put(songid, id);\r\n PerformerLinesList.add(+songid+\"/\"+id);\r\n } \r\n \r\n }\r\n catch(IOException e){\r\n System.out.println(\"An error occurred while reading/saving the mp3 file.\");\r\n } \r\n }\r\n switch(Name){\r\n case\"Vocal\":\r\n VocalistsMap.putAll(Map);\r\n VocalistsLines.addAll(ListLines);\r\n VocalistsInsert.addAll(ListInserts); \r\n VocalLinesList.addAll(PerformerLinesList);\r\n break;\r\n case \"Arranger\":\r\n ArrangersMap.putAll(Map);\r\n ArrangersLines.addAll(ListLines);\r\n ArrangersInsert.addAll(ListInserts);\r\n ArrangerLinesList.addAll(PerformerLinesList);\r\n break;\r\n case\"Circle\":\r\n CirclesMap.putAll(Map); \r\n CirclesLines.addAll(ListLines);\r\n CirclesInsert.addAll(ListInserts);\r\n CircleLinesList.addAll(PerformerLinesList);\r\n break;\r\n }\r\n}", "@Override\n\tpublic void convertDaoToFrom(CommonEntity ent) {\n\t\tMovie dao=(Movie) ent;\n\t\tthis.setBackgroundImage(dao.getBackgroundImage());\n\t\tthis.setDesc(dao.getDescription());\n\t\tthis.setEmbed(dao.getEmbed());\n\t\tthis.setFeatured(dao.isFeatured());\n\t\tthis.setLatitude(dao.getMap().getLattitude());\n\t\tthis.setLongitude(dao.getMap().getLongitude());\n\t\tthis.setName(dao.getTitle());\n\t\tthis.setRank(dao.getRank());\n\t\t\n\t\t\n\t}", "public Room(String description) \n {\n this.description = description;\n exits = new HashMap<>();\n }", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}", "@Override\r\n\tprotected void loadUniqueIndexMap(TestBooking entiy) {\n\t\t\r\n\t}", "private Set<Obs> parseEntryRelationship(EntryRelationship entry) {\n\t\tSet<Obs> res = new HashSet<Obs>();\n\t\t\n\t\tif (entry.getAct()!=null) {\n\t\t\t//we only handle events\n\t\t\tif (entry.getAct().getMoodCode().compareTo(x_DocumentActMood.EVN)==0) {\n\t\t\t\tfor (EntryRelationship er : entry.getAct().getEntryRelationships()) {\n\t\t\t\t\tres.addAll( parseEntryRelationship(er) );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (entry.getObservation()!=null) {\n\t\t\t//we only handle events\n\t\t\tif (entry.getObservation().getMoodCode().compareTo(x_ActMoodDocumentObservation.EVN)==0) {\n\t\t\t\t\n\t\t\t\tif (entry.getObservation().getValues()!=null && !entry.getObservation().getValues().isEmpty()) {\n\t\t\t\t\tObs obs = new Obs();\n\t\t\t\t\tobs.setConcept(\n\t\t\t\t\t\tgetConcept(\n\t\t\t\t\t\t\tentry.getObservation().getCode().getCodeSystem(),\n\t\t\t\t\t\t\tentry.getObservation().getCode().getCode()\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t//TODO multiple values\n\t\t\t\t\tprocessValue(obs, entry.getObservation().getValues().get(0));\n\t\t\t\t\tprocessEffectiveTime(obs, entry.getObservation().getEffectiveTime());\n\t\t\t\t\t\n\t\t\t\t\tres.add(obs);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (EntryRelationship er : entry.getObservation().getEntryRelationships()) {\n\t\t\t\t\tres.addAll( parseEntryRelationship(er) );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (entry.getOrganizer()!=null) {\n\t\t\tfor (Component4 c : entry.getOrganizer().getComponents()) {\n\t\t\t\tres.addAll( parseComponent4(c) );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn res;\n\t}", "private void processTilesetMap() {\r\n for (int t = 0; t < this.getTileSetCount(); t++) {\r\n TileSet tileSet = this.getTileSet(t);\r\n this.tilesetNameToIDMap.put(tileSet.name, t);\r\n }\r\n }", "private long addMovie(String cp_id, String title, String status, Integer year, String quality, String tagline, String plot, String imdb, String runtime, String poster_original, String backdrop_original, ArrayList<String> genreStringArray) {\r\n\r\n // First, check if the location with this city name exists in the db\r\n Cursor cursor = mContext.getContentResolver().query(\r\n MovieContract.WantedEntry.CONTENT_URI,\r\n new String[]{MovieContract.WantedEntry.COLUMN_CP_ID},\r\n MovieContract.WantedEntry.COLUMN_CP_ID + \" = ?\",\r\n new String[]{cp_id},\r\n null);\r\n\r\n if (cursor.moveToFirst()) {\r\n\r\n int wantedMovieIdIndex = cursor.getColumnIndex(MovieContract.WantedEntry.COLUMN_CP_ID);\r\n Log.v(LOG_TAG, \"Found \" + title + \" in the database!\" );\r\n return cursor.getLong(wantedMovieIdIndex);\r\n } else {\r\n Log.v(LOG_TAG, \"Didn't find it in the database, inserting now!\");\r\n ContentValues wantedMovieValues = new ContentValues();\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_CP_ID, cp_id);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_TITLE, title);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_YEAR, year);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_STATUS, status);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_QUALITY, quality);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_RUNTIME, runtime);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_TAGLINE, tagline);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_PLOT, plot);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_IMDB, imdb);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_POSTER_ORIGINAL, poster_original);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_BACKDROP_ORIGINAL, backdrop_original);\r\n wantedMovieValues.put(MovieContract.WantedEntry.COLUMN_GENRES, Utility.convertArrayToString(genreStringArray));\r\n\r\n Uri wantedMovieInsertUri = mContext.getContentResolver()\r\n .insert(MovieContract.WantedEntry.CONTENT_URI, wantedMovieValues);\r\n\r\n Bitmap mIcon11 = null;\r\n String thumbnailFilename;\r\n String fullsizeFilename;\r\n if(poster_original != null) {\r\n try {\r\n InputStream in = new java.net.URL(poster_original).openStream();\r\n mIcon11 = BitmapFactory.decodeStream(in);\r\n Bitmap thumbnail = Bitmap.createScaledBitmap(mIcon11, 160, 240, false);\r\n thumbnailFilename = cp_id+\"_thumb\";\r\n fullsizeFilename = cp_id+\"_full\";\r\n String path = saveToInternalStorage(thumbnail, thumbnailFilename);\r\n String fullsizePath = saveToInternalStorage(mIcon11, fullsizeFilename);\r\n } catch (Exception e) {\r\n Log.e(\"Error\", e.getMessage());\r\n// e.printStackTrace();\r\n }\r\n }\r\n else{\r\n mIcon11 = BitmapFactory.decodeResource(mContext.getResources(),\r\n R.drawable.movie_placeholder);\r\n Bitmap thumbnail = Bitmap.createScaledBitmap(mIcon11, 160, 240, false);\r\n thumbnailFilename = cp_id+\"_thumb\";\r\n fullsizeFilename = cp_id+\"_full\";\r\n String thumbPath = saveToInternalStorage(thumbnail, thumbnailFilename);\r\n String fullsizePath = saveToInternalStorage(mIcon11, fullsizeFilename);\r\n }\r\n\r\n\r\n return ContentUris.parseId(wantedMovieInsertUri);\r\n }\r\n }", "public HashEntry( AnyType e )\n {\n \tkey = e;\n }", "private static void\n extraWrite (final Map.Entry <String, VersionedValue> entry, State self)\n {\n self.putString (entry.getKey ());\n self.putNumber4 (entry.getValue ().getVersion ());\n self.putString (entry.getValue ().getValue ());\n }", "public interface MovieMapper {\n\n public int insertMovie(Movie movie);\n\n public int updateMovie(Movie movie);\n\n public Movie getMovieById(int id);\n\n public int deleteMovie(int id);\n\n public List<Movie> getAllMovie();\n\n\n}", "public void addToMap(){\n\t\tInteger hc = currentQuery.hashCode();\n\t\tif (!hmcache.containsKey(hc)) {\n\t\t\thmcache.put(hc, 0);\n\t\t}else{\n\t\t\tInteger val = hmcache.get(hc) + (currentQuery.getWords().size());\n\t\t\thmcache.put(hc, val);\n\t\t}\n\t}", "private void addEntry(String word, String file, int position, HashMap<String, ArrayList<Integer>> subIndex) {\n\t\tif (subIndex.containsKey(word)) {\r\n\t\t\t// checks if the file name is a key in the nested\r\n\t\t\t// hash map of the word\r\n\t\t\tsubIndex.get(word).add(position);\r\n\t\t\r\n\t\t/*\r\n\t\t * if the word is not yet a key, create a new entry in the hash map.\r\n\t\t * Create new hash map to hold the file the word is found and an array\r\n\t\t * to find the position Then put that in the wordMap hash map as value\r\n\t\t * and the word as a key.\r\n\t\t */\r\n\t\t}else {\r\n\t\t\tsubIndex.put(word, new ArrayList<Integer>());\r\n\t\t\tsubIndex.get(word).add(position);\r\n\t\t\r\n\t\t}\r\n\t\r\n\t}", "@Override\n public void onCreate(SQLiteDatabase sqLiteDatabase) {\n final String SQL_CREATE_MOVIES_TABLE = \"CREATE TABLE \" + MoviesEntry.TABLE_NAME + \" (\" +\n MoviesEntry._ID + \" INTEGER PRIMARY KEY, \" +\n MoviesEntry.COLUMN__ADULT + \" INTEGER, \" +\n MoviesEntry.COLUMN_ORIGINAL_TITLE + \" TEXT, \" +\n MoviesEntry.COLUMN_OVERVIEW + \" TEXT, \" +\n MoviesEntry.COLUMN_RELEASE_DATE + \" INTEGER, \" +\n MoviesEntry.COLUMN_POSTER_PATH + \" TEXT, \" +\n MoviesEntry.COLUMN_TITLE + \" TEXT, \" +\n MoviesEntry.COLUMN_VIDEO + \" INTEGER, \" +\n MoviesEntry.COLUMN_VOTE_AVERAGE + \" REAL, \" +\n MoviesEntry.COLUMN_VOTE_COUNT + \" INTEGER, \" +\n MoviesEntry.COLUMN_COVER + \" BLOB);\";\n\n final String SQL_CREATE_MOVIES_DETAILS_TABLE = \"CREATE TABLE \" + MoviesDetailsEntry.TABLE_NAME + \" (\" +\n MoviesDetailsEntry._ID + \" INTEGER PRIMARY KEY, \" +\n MoviesDetailsEntry.COLUMN_ADULT + \" INTEGER, \" +\n MoviesDetailsEntry.COLUMN_BACKDROP_PATH + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_BUDGET + \" INTEGER, \" +\n MoviesDetailsEntry.COLUMN_HOMEPAGE + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_IMDB_ID + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_ORIGINAL_LANGUAGE + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_ORIGINAL_TITLE + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_OVERVIEW + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_POPULARITY + \" REAL, \" +\n MoviesDetailsEntry.COLUMN_POSTER_PATH + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_RELEASE_DATE + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_REVENUE + \" INTEGER, \" +\n MoviesDetailsEntry.COLUMN_RUNTIME + \" INTEGER, \" +\n MoviesDetailsEntry.COLUMN_STATUS + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_TAGLINE + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_TITLE + \" TEXT, \" +\n MoviesDetailsEntry.COLUMN_VIDEO + \" INTEGER, \" +\n MoviesDetailsEntry.COLUMN_VOTE_AVERAGE + \" REAL, \" +\n MoviesDetailsEntry.COLUMN_VOTE_COUNT + \" INTEGER, \" +\n MoviesDetailsEntry.COLUMN_USER_RATING + \" REAL, \" +\n MoviesDetailsEntry.COLUMN_COVER + \" BLOB);\";\n\n final String SQL_CREATE_MOVIE_GENRE_TABLE = \"CREATE TABLE \" + MovieGenreEntry.TABLE_NAME + \" (\" +\n MovieGenreEntry._ID + \" INTEGER PRIMARY KEY AUTOINCREMENT, \" +\n MovieGenreEntry.COLUMN_MOVIE_ID + \" INTEGER, \" +\n MovieGenreEntry.COLUMN_GENRE_ID + \" INTEGER, \" +\n // Set up the movie_id column as a foreign key to moviedetails table\n \" FOREIGN KEY (\" + MovieGenreEntry.COLUMN_MOVIE_ID + \") REFERENCES \" +\n MoviesDetailsEntry.TABLE_NAME + \" (\" + MoviesDetailsEntry._ID + \"), \" +\n\n \" FOREIGN KEY (\" + MovieGenreEntry.COLUMN_GENRE_ID + \") REFERENCES \" +\n GenreEntry.TABLE_NAME + \" (\" + GenreEntry._ID + \")\" + \" );\";\n\n final String SQL_CREATE_GENRES_TABLE = \"CREATE TABLE \" + GenreEntry.TABLE_NAME + \" (\" +\n GenreEntry._ID + \" INTEGER PRIMARY KEY AUTOINCREMENT, \" +\n GenreEntry.COLUMN_NAME + \" TEXT );\";\n\n\n final String SQL_CREATE_CAST_DETAILS_TABLE = \"CREATE TABLE \" + CastDetailsEntry.TABLE_NAME + \" (\" +\n CastDetailsEntry._ID + \" INTEGER PRIMARY KEY,\" +\n CastDetailsEntry.COLUMN_ADULT + \" INTEGER, \" +\n CastDetailsEntry.COLUMN_ALSO_KNOWN_AS + \" TEXT, \" +\n CastDetailsEntry.COLUMN_BIOGRAPHY + \" TEXT, \" +\n CastDetailsEntry.COLUMN_BIRTHDAY + \" INTEGER, \" +\n CastDetailsEntry.COLUMN_DEATHDAY + \" INTEGER, \" +\n CastDetailsEntry.COLUMN_HOMEPAGE + \" TEXT, \" +\n CastDetailsEntry.COLUMN_IMDB_ID + \" TEXT, \" +\n CastDetailsEntry.COLUMN_NAME + \" TEXT, \" +\n CastDetailsEntry.COLUMN_PLACE_OF_BIRTH + \" TEXT, \" +\n CastDetailsEntry.COLUMN_POPULARITY + \" REAL, \" +\n CastDetailsEntry.COLUMN_PROFILE_PATH + \" TEXT, \" +\n CastDetailsEntry.COLUMN_COVER + \" BLOB);\";\n\n final String SQL_CREATE_CAST_TABLE = \"CREATE TABLE \" + CastEntry.TABLE_NAME + \" (\" +\n CastEntry._ID + \" INTEGER PRIMARY KEY,\" +\n CastEntry.COLUMN_CHARACTER + \" TEXT, \" +\n CastEntry.COLUMN_CREDIT_ID + \" TEXT, \" +\n CastEntry.COLUMN_CAST_ID + \" INTEGER, \" +\n CastEntry.COLUMN_NAME + \" TEXT, \" +\n CastEntry.COLUMN_ORDER + \" INTEGER, \" +\n CastEntry.COLUMN_PROFILE_PATH + \" PROFILE_PATH, \" +\n CastEntry.COLUMN_MOVIE_ID + \" INTEGER, \" +\n CastEntry.COLUMN_COVER + \" BLOB, \" +\n \" FOREIGN KEY (\" + CastEntry.COLUMN_MOVIE_ID + \") REFERENCES \" +\n MoviesDetailsEntry.TABLE_NAME + \" (\" + MoviesDetailsEntry._ID + \")\" + \" );\";\n\n final String SQL_CREATE_TRAILER_TABLE = \"CREATE TABLE \" + TrailersEntry.TABLE_NAME + \" (\" +\n TrailersEntry._ID + \" TEXT PRIMARY KEY, \" +\n TrailersEntry.COLUMN_CODE + \" TEXT, \" +\n TrailersEntry.COLUMN_KEY + \" TEXT, \" +\n TrailersEntry.COLUMN_NAME + \" TEXT, \" +\n TrailersEntry.COLUMN_SITE + \" SITE, \" +\n TrailersEntry.COLUMN_SIZE + \" SIZE, \" +\n TrailersEntry.COLUMN_TYPE + \" TYPE, \" +\n TrailersEntry.COLUMN_MOVIE_ID + \" INTEGER, \" +\n \" FOREIGN KEY (\" + TrailersEntry.COLUMN_MOVIE_ID + \") REFERENCES \" +\n MoviesDetailsEntry.TABLE_NAME + \" (\" + MoviesDetailsEntry._ID + \")\" + \" );\";\n\n final String SQL_CREATE_FAVORITE_MOVIES_TABLE = \"CREATE TABLE \" + FavoriteMoviesEntry.TABLE_NAME + \" (\" +\n FavoriteMoviesEntry._ID + \" INTEGER PRIMARY KEY AUTOINCREMENT, \" +\n FavoriteMoviesEntry.COLUMN_MOVIE_ID + \" INTEGER, \" +\n \" FOREIGN KEY (\" + FavoriteMoviesEntry.COLUMN_MOVIE_ID + \") REFERENCES \" +\n MoviesDetailsEntry.TABLE_NAME + \" (\" + MoviesDetailsEntry._ID + \")\" + \" );\";\n\n final String SQL_CREATE_WATCHLIST_TABLE = \"CREATE TABLE \" + WatchlistMoviesEntry.TABLE_NAME + \" (\" +\n WatchlistMoviesEntry._ID + \" INTEGER PRIMARY KEY AUTOINCREMENT, \" +\n WatchlistMoviesEntry.COLUMN_MOVIE_ID + \" INTEGER, \" +\n \" FOREIGN KEY (\" + WatchlistMoviesEntry.COLUMN_MOVIE_ID + \") REFERENCES \" +\n MoviesDetailsEntry.TABLE_NAME + \" (\" + MoviesDetailsEntry._ID + \")\" + \" );\";\n\n sqLiteDatabase.execSQL(SQL_CREATE_MOVIES_TABLE);\n sqLiteDatabase.execSQL(SQL_CREATE_MOVIES_DETAILS_TABLE);\n sqLiteDatabase.execSQL(SQL_CREATE_GENRES_TABLE);\n sqLiteDatabase.execSQL(SQL_CREATE_MOVIE_GENRE_TABLE);\n sqLiteDatabase.execSQL(SQL_CREATE_CAST_TABLE);\n sqLiteDatabase.execSQL(SQL_CREATE_TRAILER_TABLE);\n sqLiteDatabase.execSQL(SQL_CREATE_FAVORITE_MOVIES_TABLE);\n sqLiteDatabase.execSQL(SQL_CREATE_WATCHLIST_TABLE);\n }", "public static void fill_map(){\n\t\tcategory_links_map.put(\"Categories\", \"Movies\");\n\t\tcategory_links_map.put(\"Actors\", \"Movies\");\n\t\tcategory_links_map.put(\"Movies\", \"Actors\");\n\t\tcategory_links_map.put(\"Artists\", \"Creations\");\n\t\tcategory_links_map.put(\"Creations\", \"Artists\");\n\t\tcategory_links_map.put(\"Countries\", \"Locations\");\n\t\tcategory_links_map.put(\"Locations\", \"Countries\");\n\t\tcategory_links_map.put(\"NBA players\", \"NBA teams\");\n\t\tcategory_links_map.put(\"NBA teams\", \"NBA players\");\n\t\tcategory_links_map.put(\"Israeli soccer players\", \"Israeli soccer teams\");\n\t\tcategory_links_map.put(\"Israeli soccer teams\", \"Israeli soccer players\");\n\t\tcategory_links_map.put(\"World soccer players\", \"World soccer teams\");\n\t\tcategory_links_map.put(\"World soccer teams\", \"World soccer players\");\n\t}", "public void acceptPrimaryKeyMap(Entity et, Map<String, ? extends Object> mp)\n { doAcceptPrimaryKeyMap((StShhnKnyMs)et, mp); }", "void onEntryAdded(Entry entry);", "public MovieDatabase() {\n\t\tthis.movieList = new ArrayList<>();\n\t\tthis.actorList = new ArrayList<>();\n\t}", "void update(Map<Player, List<Move>> history);", "@Override\n\tpublic Map<String, Object> getByPromotionActivity(PromotionActivity clssname) {\n\t\treturn promotionActivityMapper.getByPromotionActivity(clssname);\n\t}", "@Test\n void shouldAddWorkers(){\n\n Player p = new Player(1, \"FirstPlayer\");\n Worker w1 = new Worker(0, p, new Vector2(0,0));\n Worker w2 = new Worker(1, p, new Vector2(4,4));\n p.addWorker(w1);\n p.addWorker(w2);\n\n Player p2 = new Player(2,\"padoru\");\n Worker w3 = new Worker(0, p2, new Vector2(3,3));\n p2.addWorker(w3);\n\n map.setWorkers(p);\n map.setWorkers(p2);\n\n var mw = map.getWorkers();\n assertEquals(3, mw.size());\n assertTrue(mw.contains(w1));\n assertTrue(mw.contains(w2));\n assertTrue(mw.contains(w3));\n }", "@Override\n public int upsert(Movie obj)\n {\n if(this.search(obj.getTitle()) != null)\n this.delete(obj.getTitle());\n\n this.insert(obj);\n return (this.titles.get(obj.getTitle())).getKey();\n }", "public void loadDB(){\n ////////////// Code that builds stores with their items lists and builds carts /////////////////////////////////////////////////////////////\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n sampleData = new HashMap<>(); //Make 1 hashmap per store (each has that store's items)\n //storeB_Data = new HashMap<>(); //Hashmap that has items of store B\n\n //Add new item to HashMap of items\n sampleData.put(\"026229211706\", new InventoryItem(1.99, \"Notebook\", \"http://www.ryman.co.uk/media/catalog/product/0/3/0399030007.jpg\", \"Others\",\"026229211706\"));\n sampleData.put(\"096619756803\", new InventoryItem(2.99, \"Water Bottle\", \"http://www.ryman.co.uk/media/catalog/product/0/3/0399030007.jpg\", \"Others\",\"096619756803\"));\n sampleData.put(\"9781491962299\", new InventoryItem(4.99, \"Machine Learning\", \"http://www.ryman.co.uk/media/catalog/product/0/3/0399030007.jpg\", \"Others\",\"9781491962299\"));\n sampleData.put(\"1297432524354\", new InventoryItem(4.99, \"Item\", \"http://www.ryman.co.uk/media/catalog/product/0/3/0399030007.jpg\", \"Others\",\"1297432524354\"));\n sampleData.put(\"857263004111\", new InventoryItem(79.99, \"Trendy Jacket\", \"http://www.ryman.co.uk/media/catalog/product/0/3/0399030007.jpg\", \"Others\",\"857263004111\"));\n\n listOfAllItems.add(new CartItem(3.99,\"Toy\",\"http://www.pngmart.com/files/4/Plush-Toy-PNG-Transparent-Image.png\",\"Others\",\"1\",1));\n listOfAllItems.add(new CartItem(3.99,\"Toy\",\"http://www.pngmart.com/files/4/Plush-Toy-PNG-Transparent-Image.png\",\"Others\",\"1\",1));\n listOfAllItems.add(new CartItem(3.99,\"Toy\",\"http://www.pngmart.com/files/4/Plush-Toy-PNG-Transparent-Image.png\",\"Others\",\"1\",1));\n listOfAllItems.add(new CartItem(3.99,\"Toy\",\"http://www.pngmart.com/files/4/Plush-Toy-PNG-Transparent-Image.png\",\"Others\",\"1\",1));\n listOfAllItems.add(new CartItem(3.99,\"Toy\",\"http://www.pngmart.com/files/4/Plush-Toy-PNG-Transparent-Image.png\",\"Others\",\"1\",1));\n listOfAllItems.add(new CartItem(49.99,\"Hands On Machine Learning\",\"https://m.media-amazon.com/images/S/aplus-media/vc/11714e04-b1a6-439d-9482-87e757822f94.jpg\",\"Others\",\"1\",1));\n\n //This data will be populated into instance objects on each scan and \"add to cart\" /////////////////////////////\n //LAST INPUT (in this case, 1) IS THE QUANTITY. SHOULD BE SET TO WHATEVER IS ASSIGNED FROM THE DIALOGUE BOX\n //CartItem notebook = new CartItem(sampleData.get(\"026229212703\").getPrice(), sampleData.get(\"026229212703\").getName(), sampleData.get(\"026229212703\").getImage(), sampleData.get(\"026229212703\").getSalesTaxGroup(), sampleData.get(\"026229212703\").getItemKey(), 1);\n //CartItem water = new CartItem(sampleData.get(\"096619756803\").getPrice(), sampleData.get(\"096619756803\").getName(), sampleData.get(\"096619756803\").getImage(), sampleData.get(\"096619756803\").getSalesTaxGroup(), sampleData.get(\"096619756803\").getItemKey(), 1);\n //CartItem mints = new CartItem(sampleData.get(\"030242940017\").getPrice(), sampleData.get(\"030242940017\").getName(), sampleData.get(\"030242940017\").getImage(), sampleData.get(\"030242940017\").getSalesTaxGroup(), sampleData.get(\"030242940017\").getItemKey(), 1);\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n //CartListOfItems cart = new CartListOfItems();\n //cart.addToCart(notebook);\n //cart.addToCart(toyCar);\n }", "void Create(){\n map = new TreeMap<>();\r\n\r\n // Now we split the words up using punction and spaces\r\n String wordArray[] = wordSource.split(\"[{ \\n\\r.,]}}?\");\r\n\r\n // Now we loop through the array\r\n for (String wordArray1 : wordArray) {\r\n String key = wordArray1.toLowerCase();\r\n // If this word is not present in the map then add it\r\n // and set the word count to 1\r\n if (key.length() > 0){\r\n if (!map.containsKey(map)){\r\n map.put(key, 1);\r\n }\r\n else {\r\n int wordCount = map.get(key);\r\n wordCount++;\r\n map.put(key, wordCount);\r\n }\r\n }\r\n } // end of for loop\r\n \r\n // Get all entries into a set\r\n // I think that before this we just have key-value pairs\r\n entrySet = map.entrySet();\r\n \r\n }", "WordManager( DictionaryEntry entry, WordPanel wPanel )\n\t{\n\t\twordGuessed = new boolean[entry.getLinkedWords().size()];\n\t\tthis.entry = entry;\n\t\tthis.wPanel = wPanel;\n\t\t\n\t\twPanel.setWordList( entry.getLinkedWords() );\n\t}", "void put(MongoDBEntry<K, V> entry);", "Movie addMovie(final Movie movie);", "void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }", "@Override\n protected void insertIntoEntryTable(BibEntry bibEntry) {\n StringBuilder insertIntoEntryQuery = new StringBuilder()\n .append(\"INSERT INTO \")\n .append(escape(\"ENTRY\"))\n .append(\"(\")\n .append(escape(\"TYPE\"))\n .append(\") VALUES(?)\");\n\n // This is the only method to get generated keys which is accepted by MySQL, PostgreSQL and Oracle.\n try (PreparedStatement preparedEntryStatement = connection.prepareStatement(insertIntoEntryQuery.toString(),\n Statement.RETURN_GENERATED_KEYS)) {\n\n preparedEntryStatement.setString(1, bibEntry.getType());\n preparedEntryStatement.executeUpdate();\n\n try (ResultSet generatedKeys = preparedEntryStatement.getGeneratedKeys()) {\n if (generatedKeys.next()) {\n bibEntry.getSharedBibEntryData().setSharedID(generatedKeys.getInt(1)); // set generated ID locally\n }\n }\n } catch (SQLException e) {\n LOGGER.error(\"SQL Error: \", e);\n }\n }", "private void setupScreensFromDB() {\n ArrayList<Screen> allScreens = filmEdit.getScreens();\n for (Screen screen : allScreens) {\n screens.put(screen.getScreenNumber(), screen);\n }\n }", "@Override\n public void insertEntry(Entry entry) {\n members.add(entry);\n\n }", "public void acceptPrimaryKeyMap(Entity e, Map<String, ? extends Object> m)\n { doAcceptPrimaryKeyMap((Tweet)e, m); }", "private <T extends Reference> void buildMap(Map<String, T> map, List<T> objects) {\n for (T candidateObject : objects) {\n String rid = candidateObject.getId();\n log.debug(\"...... caching RID: {}\", rid);\n map.put(rid, candidateObject);\n }\n }", "public SalePurchase addSPEntry(SalePurchase speEntry) {\n\t\t List<SalePurchase> list = new ArrayList<>(salePurchaseEntries.values());\n\t\t int large = 0;\n\t\t for(int i = 0;i < list.size();i++){\n\t\t\t if(list.get(i).getSPId() > large){\n\t\t\t\t large = list.get(i).getSPId();\n\t\t\t }\n\t\t }\n\t\tspeEntry.setSPId(large+1);\n\t\tsalePurchaseEntries.put(speEntry.getSPId(), speEntry);\n\t\t//System.out.println(salePurchaseEntries);\n\t\treturn speEntry;\n\t}", "void initCaches(Map<EObject, String> eObjectToIdMap, Map<String, EObject> idToEObjectMap);", "private void addToMap(Word from, Word to) {\n Set<Word> s = wordMap.get(from);\n if(s == null) {\n s = new HashSet<>();\n wordMap.put(from, s);\n }\n s.add(to);\n }", "protected SafeHashMap.Entry instantiateEntry()\n {\n return new Entry();\n }", "@Override\r\n public void onCreate(SQLiteDatabase sqLiteDatabase) {\n final String CREATE_TABLE = \"CREATE TABLE \" + FavoriteEntry.TABLE_NAME + \" (\" +\r\n FavoriteEntry._ID + \" INTEGER PRIMARY KEY, \" +\r\n FavoriteEntry.COLUMN_MOVIE_ID + \" INTEGER UNIQUE NOT NULL, \" +\r\n FavoriteEntry.COLUMN_TITLE + \" TEXT NOT NULL, \" +\r\n FavoriteEntry.COLUMN_ORIGINAL_TITLE + \" TEXT NOT NULL, \" +\r\n FavoriteEntry.COLUMN_OVERVIEW + \" TEXT NOT NULL, \" +\r\n FavoriteEntry.COLUMN_POSTER_PATH + \" TEXT NOT NULL, \" +\r\n FavoriteEntry.COLUMN_RELEASE_DATE + \" DATE NOT NULL, \" +\r\n FavoriteEntry.COLUMN_RELEASE_TIME + \" VARCHAR(60) NOT NULL, \" +\r\n FavoriteEntry.COLUMN_RUNNING_TIME + \" VARCHAR(60) NOT NULL, \" +\r\n FavoriteEntry.COLUMN_VOTE_COUNT + \" INTEGER NOT NULL, \" +\r\n FavoriteEntry.COLUMN_VOTE_AVG + \" SMALLINT NOT NULL, \" +\r\n FavoriteEntry.COLUMN_POPULARITY + \" INTEGER NOT NULL, \" +\r\n FavoriteEntry.COLUMN_VIDEO + \" BOOLEAN NOT NULL);\";\r\n\r\n sqLiteDatabase.execSQL(CREATE_TABLE);\r\n }", "protected SafeHashMap.Entry<K, V> instantiateEntry()\n {\n return new Entry<>();\n }", "public MoviesDatabase()\n {\n file = new FileOperation();\n menu = new Menu();\n validation = new Validation();\n }", "public void addSong(Song s) \r\n {\r\n \tSong mySong = s;\r\n \t\r\n \t//Adding to the first HashTable - the Title One\r\n \tmusicLibraryTitleKey.put(mySong.getTitle(), mySong);\r\n \t \r\n \t// Checking if we already have the artist\r\n \t if(musicLibraryArtistKey.get(mySong.getArtist()) != null)\r\n \t {\r\n \t\t //Basically saying that get the key (get Artist) and add mySong to it (i.e. the arraylist)\r\n \t\t musicLibraryArtistKey.get(mySong.getArtist()).add(mySong);\r\n \t }\r\n \t \r\n \t // If artist is not present, we add the artist and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryArtistKey.put(mySong.getArtist(), arrayListOfSongs);\r\n \t }\r\n \t \r\n \t// Checking if we already have the year\r\n \t if (musicLibraryYearKey.get(mySong.getYear()) != null)\r\n \t {\r\n \t \t musicLibraryYearKey.get(mySong.getYear()).add(mySong);\r\n \t }\r\n \t \r\n \t// If year is not present, we add the year and the song\r\n \t else\r\n \t {\r\n \t\t ArrayList<Song> arrayListOfSongs = new ArrayList<>();\r\n \t\t arrayListOfSongs.add(mySong);\r\n \t\t \r\n \t\t musicLibraryYearKey.put(mySong.getYear(), arrayListOfSongs);\r\n \t }\r\n\t\r\n }", "public void acceptPrimaryKeyMap(Entity et, Map<String, ? extends Object> mp)\n { doAcceptPrimaryKeyMap((Camp)et, mp); }", "private void insertEntry() {\n String desiredId = idField.getText();\n String desiredName = nameField.getText();\n String desiredMajor = majorField.getText();\n\n if (studentHashMap.containsKey(desiredId)) {\n this.displayStatusPanel(\n \"Error: A student with this information already exists.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } else {\n studentHashMap.put(desiredId, new Student(desiredName, desiredMajor));\n\n this.displayStatusPanel(\n \"Success: \" + desiredName + \" has been added.\",\n \"Success\",\n JOptionPane.INFORMATION_MESSAGE\n );\n }\n }", "private void createLookup() {\r\n\t\tcreateLooupMap(lookupMap, objectdef, objectdef.getName());\r\n\t\tcreateChildIndex(childIndex, objectdef, objectdef.getName());\r\n\r\n\t}", "public void createHashMap() {\n myList = new HashMap<>();\n scrabbleList = new HashMap<>();\n }", "public interface Entry {\n\n}", "public VendingMachineDaoInMemImpl() {\n Item itemOne = new Item(1, \"Snickers\", new BigDecimal(1.85).setScale(2, RoundingMode.HALF_UP),9);\n Item itemTwo = new Item(2, \"M&Ms\", new BigDecimal(1.50).setScale(2, RoundingMode.HALF_UP),2); \n Item itemThree = new Item(3, \"Pringles\", new BigDecimal(2.10).setScale(2, RoundingMode.HALF_UP),5);\n Item itemFour = new Item(4, \"Reese's\", new BigDecimal(1.85).setScale(2, RoundingMode.HALF_UP), 4);\n Item itemFive = new Item(5, \"Pretzels\", new BigDecimal(1.25).setScale(2, RoundingMode.HALF_UP), 9);\n Item itemSix = new Item(6, \"Twinkies\", new BigDecimal(1.95).setScale(2, RoundingMode.HALF_UP), 3);\n Item itemSeven = new Item(7, \"Doritos\", new BigDecimal(1.75).setScale(2, RoundingMode.HALF_UP), 11);\n Item itemEight = new Item(8, \"Almond Joy\", new BigDecimal(1.85).setScale(2, RoundingMode.HALF_UP),0);\n Item itemNine = new Item(9, \"Trident\", new BigDecimal(1.95).setScale(2, RoundingMode.HALF_UP), 6);\n \n allItems.put(1, itemOne);\n allItems.put(2, itemTwo);\n allItems.put(3, itemThree);\n allItems.put(4, itemFour);\n allItems.put(5, itemFive);\n allItems.put(6, itemSix);\n allItems.put(7, itemSeven);\n allItems.put(8, itemEight);\n allItems.put(9, itemNine);\n }", "public static HashMap<Integer, Item> storeItems(){\n\t\tItem prod1 = new Item(\"Candy\",40);\n\t\tItem prod2 = new Item(\"Bread\",30);\n\t\tItem prod3 = new Item(\"Butter\",50);\n\t\tItem prod4 = new Item(\"Milk\",43);\n\t\tItem prod5 = new Item(\"Toast\",60);\n\t\tItem prod6 = new Item(\"Curd\",20);\n\t\tItem prod7 = new Item(\"Cream\",80);\n\t\tItem prod8 = new Item(\"Pastry\",45);\n\t\tItem prod9 = new Item(\"Cake\",300);\n\t\tItem prod10 = new Item(\"Panner\",200);\n\t\tItem prod11 = new Item(\"Egg\",8);\n\t\tproducts.put(1,prod1);\n\t\tproducts.put(2,prod2);\n\t\tproducts.put(3,prod3);\n\t\tproducts.put(4,prod4);\n\t\tproducts.put(5,prod5);\n\t\tproducts.put(6,prod6);\n\t\tproducts.put(7,prod7);\n\t\tproducts.put(8,prod8);\n\t\tproducts.put(9,prod9);\n\t\tproducts.put(10,prod10);\n\t\tproducts.put(11,prod11);\n\t\treturn products;\n\t}", "private void loadItemsMaps()\n {\n _icons=new HashMap<String,List<Item>>(); \n _names=new HashMap<String,List<Item>>(); \n List<Item> items=ItemsManager.getInstance().getAllItems();\n for(Item item : items)\n {\n String icon=item.getIcon();\n if (icon!=null)\n {\n registerMapping(_icons,icon,item);\n String mainIconId=icon.substring(0,icon.indexOf('-'));\n registerMapping(_icons,mainIconId,item);\n String name=item.getName();\n registerMapping(_names,name,item);\n }\n }\n }", "public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }", "protected Entry(){}", "public Map getShelfItemBelonging(String first, String second, List<ShelfItem> items);", "public void add(food entry)\n\t{\n\t\titems.add(entry);\n\t\t//updates isChanged to show changes\n\t\tisChanged = true;\n\t}", "@Override public void store(SQLiteDatabase db, List<TimelineItemDTOKey> items)\n {\n }", "private void addToMap(int x, int y, MapBox piece){\n\t\tBoxContainer type;\r\n\t\t\n\t\t// determine the type of this square\n\t\ttype = BoxContainer.Open;\r\n\t\t\n\t\tif (piece.hasKey()){\n\t\t\t// this is a key so mark it as such and add it to our array\n\t\t\ttype = BoxContainer.Key;\n\t\t\tPoint thisPoint = new Point(x, y, BoxContainer.Key);\n\t\t\tif (!checkForPointInArr(keys, thisPoint)){ // make sure it's not already in the array\n\t\t\t\tkeys.add(thisPoint); // add this to our key array\n\t\t\t}\n\t\t} else if (piece.isEnd()){\n\t\t\t// this is an exit so mark it as such and add it to our array\n\t\t\ttype = BoxContainer.Exit;\n\t\t\tPoint thisPoint = new Point(x, y, BoxContainer.Exit);\n\t\t\tif (!checkForPointInArr(exits, thisPoint)){ // make sure it's not already in the array\n\t\t\t\texits.add(new Point(x, y, BoxContainer.Exit)); // add this to our exit array\n\t\t\t}\n\t\t}\r\n\t\t\n\t\t// add it to the map\r\n\t\t\n\t\tmap.addElement(x, y, type);\n\t\t\n\t\t// add its surroundings to the map\n\t\tPoint[] surrondings = new Point[4];\r\n\t\t\n\t\tsurrondings[0] = new Point(x, y + 1, castToBoxContainer(piece.North)); // add the north piece\n\t\tsurrondings[1] = new Point(x, y - 1, castToBoxContainer(piece.South)); // add the south piece\n\t\tsurrondings[2] = new Point(x + 1, y, castToBoxContainer(piece.East)); // add the east piece\n\t\tsurrondings[3] = new Point(x - 1, y, castToBoxContainer(piece.West)); // add the west piece\n\t\t\n\t\tfor (int i = 0; i < surrondings.length; i++){\n\t\t\t// check if this is a key or an exit and if so add it to the respective arrays if it not already there\n\t\t\tif (surrondings[i].type == BoxContainer.Exit){\n\t\t\t\tif (!checkForPointInArr(exits, surrondings[i])){ // make sure it's not already there\n\t\t\t\t\texits.add(surrondings[i]);\n\t\t\t\t}\n\t\t\t} else if (surrondings[i].type == BoxContainer.Key){\n\t\t\t\tif (!checkForPointInArr(keys, surrondings[i])){ // make sure it's not already there\n\t\t\t\t\tkeys.add(surrondings[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmap.addElement(surrondings[i].x, surrondings[i].y, surrondings[i].type);\n\t\t}\n\t}", "@Override\n\tpublic void updateEntries(Reservation reservation) {\n\t\tresTable.save(reservation);\n\t\t\n\t}", "public void insert(JournalEntry entry) {\n SQLiteDatabase db = instance.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(\"title\", entry.getTitle());\n values.put(\"mood\", entry.getMood());\n values.put(\"content\", entry.getContent());\n db.insert(\"entries\", null, values);\n }", "public cacheEntry(int key, String value){\n int key;\n String value;\n cacheEntry(int key){\n this.key = key;\n this.value = value;\n }\n}", "private Map<String, Object> initializeModelForEntryForm() {\r\n\t\tMap<String, Object> myModel = new HashMap<String, Object>();\r\n\t\tCollection<Tag> primaryTags = tagService.getPrimaryTags();\r\n\t\tmyModel.put(\"primaryTags\", primaryTags);\r\n\r\n\t\tMap<String, Object> featured = new HashMap<String, Object>();\r\n\t\tfeatured.put(\"true\", \"featured\");\r\n\t\tmyModel.put(\"featured\", featured);\r\n\r\n\t\tList<Tag> secondaryTags = new ArrayList<Tag>();\r\n\r\n\t\tfor (Tag aTag : primaryTags) {\r\n\t\t\tsecondaryTags.addAll(tagService.getBelongingTags(aTag.getId()));\r\n\t\t}\r\n\r\n\t\tCollections.sort(secondaryTags, new Comparator<Tag>() {\r\n\t\t public int compare(Tag tag1, Tag tag2) {\r\n\t\t return tag1.getName().compareTo(tag2.getName());\r\n\t\t }\r\n\t\t});\r\n\r\n\t\tmyModel.put(\"secondaryTags\", secondaryTags);\r\n\t\tCollection<WebItemType> webItemTypes = webItemTypeService.getAllWebItemTypes();\r\n\t\tmyModel.put(\"allWebItemTypes\", webItemTypes);\r\n\r\n\t\treturn myModel;\r\n\t}", "public static void adicionaMap2() {\n\t\t\t\tcDebitos_DFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"dam\", new Integer[] { 6, 18 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"fiti\", new Integer[] { 19, 26 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"cartorio\", new Integer[] { 39, 76 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"valor\", new Integer[] { 77, 90 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"multa\", new Integer[] { 91, 104 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\t\t\t\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"processo\", new Integer[] { 21, 34 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"data_Venc\", new Integer[] { 35, 46 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"tributos\", new Integer[] { 47, 60 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"historico\", new Integer[] { 61, 78 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"valor\", new Integer[] { 79, 90 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"multa\", new Integer[] { 91, 104 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\t\t\t\t\r\n\t\t\t\t\r\n\r\n\r\n\t\t\r\n\r\n\t\t// No DAM ANO DATA VENC No. PROCESSO\r\n\t\t// No. PARCELAMENTO VALOR JUROS TOTAL\r\n\t\tcDebitos_JFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\tcDebitos_JFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\tcDebitos_JFlorianopolis.put(\"ano\", new Integer[] { 21, 26 });\r\n\t\tcDebitos_JFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\tcDebitos_JFlorianopolis.put(\"processo\", new Integer[] { 39, 55 });\r\n\t\tcDebitos_JFlorianopolis.put(\"nParcelamento\", new Integer[] { 55, 76 });\r\n\t\tcDebitos_JFlorianopolis.put(\"valor\", new Integer[] { 77, 104 });\r\n\t\tcDebitos_JFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\tcDebitos_JFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t// DAM LIV/FOLHA/CERT. DATA INSC HISTORICO\r\n\t\t// INSCRICAO VALOR\r\n\r\n\t\tcDebitos_J1Florianopolis.put(\"dam\", new Integer[] { 1, 13 });\r\n\t\tcDebitos_J1Florianopolis.put(\"liv_Folha_Cert\", new Integer[] { 14, 34 });\r\n\t\tcDebitos_J1Florianopolis.put(\"data_Insc\", new Integer[] { 35, 46 });\r\n\t\tcDebitos_J1Florianopolis.put(\"historico\", new Integer[] { 47, 92 });\r\n\t\tcDebitos_J1Florianopolis.put(\"inscricao\", new Integer[] { 93, 119 });\r\n\t\tcDebitos_J1Florianopolis.put(\"valor\", new Integer[] { 120, 132 });\r\n\t\t\r\n\t\t\r\n\t\t// No DAM ANO DATA VENC HISTORICO PROCESSO VALOR JUROS TOTAL\r\n\t\tcDebitos_LFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\tcDebitos_LFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\tcDebitos_LFlorianopolis.put(\"ano\", new Integer[] { 21, 26 });\r\n\t\tcDebitos_LFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\tcDebitos_LFlorianopolis.put(\"historico\", new Integer[] { 39, 76 });\r\n\t\tcDebitos_LFlorianopolis.put(\"processo\", new Integer[] { 77, 91 });\r\n\t\tcDebitos_LFlorianopolis.put(\"valor\", new Integer[] { 92, 104 });\r\n\t\tcDebitos_LFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\tcDebitos_LFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t\r\n\t}", "public HashMap toHash() {\n HashMap x = new HashMap();\n\n x.put(\"type\",\"media\");\n x.put(\"mediaid\",mediaid);\n x.put(\"title\",mediatitle);\n x.put(\"episodetitle\",episodetitle);\n x.put(\"mediapath\",mediapath);\n x.put(\"description\",Description);\n x.put(\"mediaencoding\",mediaencoding);\n x.put(\"mediatype\",mediatype);\n x.put(\"mediagroup\", mediagroup);\n x.put(\"mediasize\", getMediasize());\n x.put(\"mediaduration\", getMediaduration());\n// x.put(\"lastwatched\",lastwatched);\n x.put(\"airingstarttime\",airingstarttime);\n x.put(\"userrating\",userrating);\n x.put(\"mpaarated\",mpaarated);\n x.put(\"releasedate\",releasedate);\n x.put(\"genre\",genre);\n x.put(\"trailer\", getTrailer());\n x.put(\"mediaimporttime\", getMediaimporttime());\n\n if ( MediaFileAPI.IsTVFile(MediaFileAPI.GetMediaFileForID(mediaid))) {\n// ortus.api.DebugLogTrace(\"toHash() loading TV\");\n Object mf = MediaFileAPI.GetMediaFileForID(mediaid);\n x.put(\"channelname\",AiringAPI.GetAiringChannelName(mf));\n x.put(\"channelnumber\",AiringAPI.GetAiringChannelNumber(mf));\n x.put(\"airingduration\",AiringAPI.GetAiringDuration(mf));\n x.put(\"airingstarttime\",AiringAPI.GetAiringStartTime(mf));\n x.put(\"airingendtime\",AiringAPI.GetAiringEndTime(mf));\n }\n\n if ( seriesid > 0)\n x.put(\"seriesid\",seriesid);\n if ( seasonno > 0)\n x.put(\"seasonno\",seasonno);\n if ( episodeid > 0)\n x.put(\"episodeid\",episodeid);\n if ( episodeno > 0)\n x.put(\"episodeno\",episodeno);\n// List castlist = new ArrayList();\n// for ( Cast ic : cast) {\n// HashMap y = new HashMap();\n// y.put(\"name\",ic.getName());\n// y.put(\"job\",ic.getJob());\n// y.put(\"character\",ic.getCharacter());\n// castlist.add(y);\n// }\n// x.put(\"cast\",castlist);\n// ortus.api.DebugLogTrace(\"toHash() loading fanart\");\n if ( fanart.get(\"Backgrounds\") != null) {\n // x.put(\"background_high\", ortus.api.GetFanartFolder() + java.io.File.separator + ((Fanart)fanart.get(\"Backgrounds\").get(\"high\").get(0)).getFile());\n x.put(\"background_id\",((Fanart)fanart.get(\"Backgrounds\").get(\"high\").get(0)).getId());\n }\n if ( fanart.get(\"Posters\") != null) {\n // x.put(\"posters_high\", ortus.api.GetFanartFolder() + java.io.File.separator + ((Fanart)fanart.get(\"Posters\").get(\"high\").get(0)).getFile());\n x.put(\"posters_id\",((Fanart)fanart.get(\"Posters\").get(\"high\").get(0)).getId());\n }\n if ( fanart.get(\"Banners\") != null) {\n // x.put(\"banners_high\", ortus.api.GetFanartFolder() + java.io.File.separator + ((Fanart)fanart.get(\"Banners\").get(\"high\").get(0)).getFile());\n x.put(\"banners_id\",((Fanart)fanart.get(\"Banners\").get(\"high\").get(0)).getId());\n }\n// ortus.api.DebugLogTrace(\"GetMetadata: Returning: \" + x);\n \n return x;\n }", "public Object getKey(Movie item) {\n\t return (item == null) ? null : item.getId();\r\n\t }", "public void putMovieData(String movieName, String movieDate, String genre) {\n String[] columns = {MovieUriContract.GenreEntry._ID, MovieUriContract.GenreEntry.COLUMN_NAME};\n\n try{\n Cursor cursor = providerClient.query(\n MovieUriContract.GenreEntry.CONTENT_URI,\n columns,\n null,\n null,\n null\n );\n\n int genreId = -1;\n if(cursor.moveToFirst()) {\n genreId = cursor.getColumnIndex(genre);\n }\n cursor.close();\n\n if(genreId >= 0) {\n ContentValues movieValues = new ContentValues();\n movieValues.put(MovieUriContract.MovieEntry.COLUMN_NAME, movieName);\n movieValues.put(MovieUriContract.MovieEntry.COLUMN_RELEASE_DATE, movieDate);\n movieValues.put(MovieUriContract.MovieEntry.COLUMN_GENRE, genreId);\n providerClient.update(\n MovieUriContract.GenreEntry.CONTENT_URI,\n movieValues,\n null,\n null);\n }\n else {\n view.setErrorMessage();\n }\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }", "public Hashtable<String,Stock> createMap(){\n\tHashtable table = new Hashtable<String, Stock>();\n\treturn table;\n}", "protected static boolean switchEntryInList(String key, String entry) {\n if (hasEntryInList(key, entry))\n removeEntryInList(key, entry);\n else\n addEntryInList(key, entry);\n\n return hasEntryInList(key, entry);\n }", "public MapEntryArgInfo(Type[] types, Activity activity, AbstractController controller, int padding) {\n super(null, activity, controller, padding);\n this.types = types;\n }", "protected Map<E, ListenerEntry<? extends E>> createMap() {\n\t\treturn new WeakHashMap<>();\n\t}", "private void addMovieToDb() {\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(MovieColumns.ADULT,mMovie.getAdult());\n contentValues.put(MovieColumns.BACKDROP_PATH,mMovie.getBackdropPath());\n contentValues.put(MovieColumns.GENRE,Utils.arrayToString(mMovie.getGenreIds()));\n contentValues.put(MovieColumns.MOV_ID,mMovie.getMovieId());\n contentValues.put(MovieColumns.ORIGINAL_LANGUAGE,mMovie.getOrigLanguage());\n contentValues.put(MovieColumns.ORIGINAL_TITLE,mMovie.getOrigTitle());\n contentValues.put(MovieColumns.OVERVIEW,mMovie.getOverview());\n contentValues.put(MovieColumns.RELEASE_DATE,mMovie.getReleaseDate());\n contentValues.put(MovieColumns.POSTER_PATH,mMovie.getPosterPath());\n contentValues.put(MovieColumns.POPULARITY,mMovie.getPopularity());\n contentValues.put(MovieColumns.TITLE,mMovie.getTitle());\n contentValues.put(MovieColumns.VIDEO, mMovie.getVideo());\n contentValues.put(MovieColumns.VOTE_AVERAGE, mMovie.getVoteAverage());\n contentValues.put(MovieColumns.VOTE_COUNT, mMovie.getVoteCount());\n\n try {\n getActivity().getContentResolver().insert(MoviesProvider.Movies.MOVIES_URI, contentValues);\n Toast.makeText(getContext(),getString(R.string.movie_added_as_favorite),Toast.LENGTH_SHORT).show();\n }catch (Exception ex){\n if(ex instanceof SQLiteConstraintException){\n Toast.makeText(getContext(), getString(R.string.movie_already_added_as_favorite), Toast.LENGTH_SHORT).show();\n }else {\n Toast.makeText(getContext(), getString(R.string.movie_added_as_favorite_problem), Toast.LENGTH_SHORT).show();\n }\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tif (e.getSource() == entry) {\n\t\t\tString ID = JOptionPane.showInputDialog(\"Enter an ID number\");\n\t\t\tnumber = Integer.parseInt(ID);\n\t\t\tname = JOptionPane.showInputDialog(\"Enter a name\");\n\t\t\tlog.put(number, name);\n\t\t}\n\t\tif (e.getSource() == search) {\n\t\t\tString Detect = JOptionPane.showInputDialog(\"Enter an ID number\");\n\t\t\tint detect = Integer.parseInt(Detect);\n\t\t\tif (log.containsKey(detect)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, log.get(detect));\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Entry does not exist\");\n\t\t\t}\n\t\t}\n\t\tif (e.getSource() == view) {\n\t\t\tString output = \"\";\n\t\t\tfor (int key : log.keySet()) {\n\t\t\t\toutput += \"ID: \" + key + \" Name: \" + log.get(key) + \"\\n\";\n\t\t\t}\n\t\t\tJOptionPane.showMessageDialog(null, output);\n\t\t}\n\t\tif(e.getSource()== remove) {\n\t\t\tString Detect = JOptionPane.showInputDialog(\"Enter an ID number\");\n\t\t\tint detect = Integer.parseInt(Detect);\n\t\t\tif (log.containsKey(detect)) {\n\t\t\t\tlog.remove(detect);\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Entry removed\");\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Entry does not exist\");\n\t\t\t}\n\t\t}\n\t}", "public Integer getPosFromMovie (Movie input) {return (input == null) ? -1 : (this.titles.get(input.getTitle()) != null) ? (this.titles.get(input.getTitle())).getKey() : -1;}", "@Override\n\tpublic Map<String, Object> create(StoreBase entity) {\n\t\treturn null;\n\t}", "public void addEntry(KantoDex entry)\n {\n if(entries.isEmpty())\n {\n entries.add(entry);\n }\n else\n {\n boolean notFound = true;\n for(KantoDex entryInit : entries)\n {\n if(entry.getDexNumInt() == entryInit.getDexNumInt())\n {\n System.out.println(\"Error: Attempted to add an entry that already exists, or should not exist.\");\n notFound = false;\n }\n }\n if(notFound)\n {\n entries.add(entry);\n }\n }\n }", "private static void processViewEntry(final String[] words,\r\n Map<String, List<View>> viewsFromSessions\r\n /* add parameters as needed */\r\n ) {\r\n if (words.length != VIEW_NUM_FIELDS) {\r\n return;\r\n }\r\n\r\n // If a view list does not exist for the current session, create it and add the entry with a new LinkedList\r\n // as the value.\r\n String sessionId = words[VIEW_SESSION_ID];\r\n viewsFromSessions.putIfAbsent(sessionId, new LinkedList<>());\r\n\r\n // Grabs the sessionId, productId, and productPrice, and stores it in a View object,\r\n // which is then stored into the viewsFromSessions List<View> for\r\n // the respective String (sessionId).\r\n\r\n String productId = words[VIEW_PRODUCT_ID];\r\n int productPrice = parseInt(words[VIEW_PRICE]);\r\n viewsFromSessions.get(sessionId).add(new View(productId, productPrice));\r\n\r\n }", "@Dao\npublic interface MovieDao {\n\n @Insert(onConflict = REPLACE)\n void insert(Movie movie);\n\n @Delete\n void delete(Movie movie);\n\n @Query(\"DELETE FROM movie\")\n void deleteAll();\n\n @Query(\"DELETE FROM movie WHERE id =:id\")\n void deleteByID(String id);\n\n @Update\n void update(Movie movie);\n\n @Query(\"SELECT * FROM movie\")\n Flowable<List<Movie>> getAll();\n\n @Query(\"SELECT * FROM movie WHERE id =:ids\")\n Movie getById(int ids);\n\n @Insert(onConflict = REPLACE)\n void insertGenres(Genres.Genre genre);\n\n @Query(\"SELECT * FROM genre\")\n Single<List<Genres.Genre>> getAllGenre();\n\n\n}", "private void addEntry( List<TicketEntry> entries, JSONObject entry){\n //parsing the entry fields and building it\n String barcode = (String) entry.get(\"barcode\");\n String desc = (String) entry.get(\"description\");\n int amount = Integer.parseInt((String) entry.get(\"amount\"));\n double PPU = Double.parseDouble((String) entry.get(\"PPU\"));\n double discountRate = Double.parseDouble((String) entry.get(\"discountRate\"));\n entries.add(new TicketEntryImpl(barcode,desc,amount,PPU,discountRate));\n }", "public IdMap() {\n\t\tthis.add(new TextItems());\n\t\tthis.add(new DateTimeEntity());\n\t\tthis.add(EntityCreator.createJson(false));\n\t\tthis.add(EntityCreator.createJson(true));\n\t\tthis.add(new ObjectMapEntry());\n\t\tthis.add(EntityCreator.createXML());\n\t}", "@Override\n\tpublic Map<String, Object> update(StoreBase entity) {\n\t\treturn null;\n\t}", "public Map<T, V> populateMap() {\n Map<T, V> map = new HashMap<>();\n for (int i = 0; i < entryNumber; i++) {\n cacheKeys[i] = (T) Integer.toString(random.nextInt(1000000000));\n String key = cacheKeys[i].toString();\n map.put((T) key, (V) Integer.toString(random.nextInt(1000000000)));\n }\n return map;\n }", "public void makeMap(){\r\n\t\tint m =1;\r\n\t\t//EnvironObj temp = new EnvironObj(null, 0, 0);\r\n\t\tfor(int i=0; i<map.size(); i++){\r\n\t\t\tfor(int j =0; j<map.get(i).size(); j++){\r\n\t\t\t\tString o = map.get(i).get(j);\r\n\t\t\t\t//System.out.println(\"grabbing o from map, o = \" + o);\r\n\t\t\t\tif(o.equals(\"t\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"treee.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\t//System.out.println(\"objectList: \" + objectList);\r\n\t\t\t\t}else if(o.equals(\"p\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"path.png\", j+m, i*20, true);\r\n\t\t\t\t\t//dont need to add to obj list bc its always in back\r\n\t\t\t\t\twalkables.add(temp);\r\n\r\n\t\t\t\t}else if(o.equals(\"h\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"house.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t}else if(o.equals(\"g\")){\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t}\r\n\t\t\t\telse if(!o.equals(\"g\")){\r\n\t\t\t\t\tString fn = o +\".txt\";\r\n\t\t\t\t\tSystem.out.println(\"filename for NPC: \" + fn);\r\n\t\t\t\t\tnp = new NPC(o, fn, j+m, i*20);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\tcharacters.add(np);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm=0;\r\n\t\t}\r\n\t}", "private void populate(List<Entry> entries) {\n List<Long> entryIds = entries.stream().map(Entry::getId).collect(Collectors.toList());\n Map<Entry, List<Category>> entryToCategories = entryDAO.findCategoriesByEntryIds(entryIds);\n\n // Set the Categories property of each Entry, accordingly.\n entries.forEach(entry -> entry.setCategories(entryToCategories.getOrDefault(entry, Collections.emptyList())));\n }", "public HashEntityMap()\n\t\t{\n\t\t\tmapNameToValue = new HashMap<String, Integer>();\n\t\t}", "public static void main(String[] args) {\n\t\t\n\t\tMap<Integer,Employee> map = new HashMap<Integer, Employee>();\n\t\tMap<String, Employee> hashMap = new HashMap();\n\t\tMap<Employee, Integer> hashMap1 = new HashMap();\n\t\tfor (int i =1; i<=10; i++){\n\t\t\t\n\t\t\tmap.put(i, new Employee(i+3, \"Manish\"+(i+3)));\n\t\t}\n\t\tSystem.out.println(map);\n\t\t\n\t\tEmployee emp1 = new Employee(4, \"Manish3\");\n\t\t//Use of Contains\n\t\tSystem.out.println(map.containsValue(emp1)); \n\t\t\n\t\t//Key Set\n\t\tSystem.out.println(map.keySet());\n\t\t\n\t\t//retrieve entry set\n\t\tSystem.out.println(map.entrySet());\n\t\t\n\t\t//map.forEach(action);; TO DO- need to understand this method\n\t\t\n\n\t\t//Returns in sorted order when Key is natural (permitives or String or Enum)\n\t\thashMap.put(\"A\", new Employee(1, \"Manish\"));\n\t\thashMap.put(\"C\", new Employee(3, \"Gaurav\"));\n\t\thashMap.put(\"B\", new Employee(2, \"Vinay\"));\n\t\tSystem.out.println(hashMap);\n\t\t\n\t\t//maintains insertion order when key is Object type(dont have any natural order)\n\t\thashMap1.put(new Employee(1, \"Manish\"),1);\n\t\thashMap1.put(new Employee(3, \"Gaurav\"),3);\n\t\thashMap1.put(new Employee(2, \"Vinay\"),2);\n\t\tSystem.out.println(hashMap1);\n\t\tHashMap<Long, String> masterRoomPoolMapping = new HashMap<Long, String>();\n\t\tmasterRoomPoolMapping.put(new Long(123), \"Manish\");\n\t\tmasterRoomPoolMapping.put(new Long(124), \"Manish\");\n\t\tmasterRoomPoolMapping.put(new Long(125), \"Manish\");\n\t\tSystem.out.println(\"***************************************************\");\n\t\tSet<Long> keySet = masterRoomPoolMapping.keySet();\n\t\tSet<Long> newKeySet = new HashSet<Long>();\n\t\tfor(Long key : keySet){\n\t\t\tnewKeySet.add(new Long(key));\n\t\t}\n\t\tSystem.out.println(\"newKeySet***************************************************\");\n\t\tif(newKeySet.contains(new Long(123)))\n\t\t\tnewKeySet.remove(new Long(123));\n\t\tfor(Long key : newKeySet){\n\t\t\tSystem.out.println(key);\n\t\t}\n\t\tSystem.out.println(\"keySet1***************************************************\");\n\t\tSet<Long> keySet1 = masterRoomPoolMapping.keySet();\n\t\tfor(Long key : keySet1){\n\t\t\tSystem.out.println(masterRoomPoolMapping.get(key));\n\t\t}\n\t\tSystem.out.println(\"***************************************************\");\n\t\tSystem.out.println(masterRoomPoolMapping);\n\t}" ]
[ "0.55342114", "0.5373424", "0.53349394", "0.5324831", "0.53115493", "0.5233518", "0.51531744", "0.5087328", "0.5084645", "0.5083065", "0.5080619", "0.5032261", "0.5013784", "0.49902916", "0.4969226", "0.49654138", "0.4961846", "0.49493074", "0.4928639", "0.49270943", "0.49182296", "0.4901111", "0.48981792", "0.488992", "0.48850343", "0.48824683", "0.48742542", "0.4871841", "0.4870045", "0.48678973", "0.4865966", "0.48475626", "0.48423618", "0.4841046", "0.48392937", "0.48375297", "0.48276207", "0.48148012", "0.4809722", "0.4799008", "0.4790532", "0.4784735", "0.47728932", "0.4763473", "0.47632742", "0.47585985", "0.47572115", "0.47445187", "0.47329354", "0.47294268", "0.47210932", "0.47161478", "0.4713081", "0.47124374", "0.4710828", "0.46849537", "0.46832114", "0.46820632", "0.46810532", "0.4679663", "0.4678383", "0.46749666", "0.46673843", "0.46624303", "0.4658437", "0.46558487", "0.46556503", "0.4651057", "0.46493393", "0.464715", "0.46438596", "0.4643825", "0.46417055", "0.46389893", "0.46298987", "0.46298185", "0.46291795", "0.4628642", "0.4627862", "0.462683", "0.46254054", "0.46245039", "0.46182224", "0.4617636", "0.46135092", "0.46134874", "0.46114647", "0.46107024", "0.46100634", "0.4605753", "0.46044418", "0.46042028", "0.4604049", "0.45996168", "0.4595003", "0.4594068", "0.4592231", "0.45883253", "0.45862418", "0.4583981" ]
0.548453
1
Test of isRut method, of class Entradas.
@Test public void testIsRut() { System.out.println("isRut"); String rut = "19.208.616-7"; boolean expResult = false; boolean result = Entradas.isRut(rut); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isRSU() { return isRSU; }", "@Test\n public void testNuevaLr() {\n System.out.println(\"nuevaLr\");\n Alimento a = new Alimento(\"nom1\", \"inst1\", \"tempC1\");\n String uMedida = \"u1\";\n float cantidad = 3.0F;\n Receta instance = new Receta();\n boolean expResult = true;\n boolean result = instance.nuevaLr(a, uMedida, cantidad);\n assertEquals(expResult, result);\n }", "public void validarRut(String rut) {\n boolean validacion = false;\n try {\n rut = rut.toUpperCase().replace(\".\", \"\").replace(\"-\", \"\");\n int rutAux = Integer.parseInt(rut.substring(0, rut.length() - 1));\n char dv = rut.charAt(rut.length() - 1);\n int m = 0, s = 1;\n for (; rutAux != 0; rutAux /= 10) {\n s = (s + rutAux % 10 * (9 - m++ % 6)) % 11;\n }\n if (dv == (char) (s != 0 ? s + 47 : 75)) {\n validacion = true;\n recorrerUsuarios(rut);\n }\n } catch (java.lang.NumberFormatException e) {\n } catch (Exception e) {\n }\n if (validacion==false){\n Toast.makeText(getApplicationContext(),\"Rut no valido\",Toast.LENGTH_LONG).show();\n }\n }", "@Test\n public void testRucheVide() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test rucheVide =============================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n\n System.out.println(\"test sur une ruche venant d'être créé :\");\n assertTrue(instance.rucheVide());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test avec un insecte a l'origine :\");\n instance.ajoutInsecte(reine, orig);\n assertFalse(instance.rucheVide());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n }", "public void testReine() {\n assertEquals(reine.getCouleur(), Piece.Couleur.NOIR); // test couleur\n assertEquals(reine.getValeur(), 9.0f);\n assertFalse(reine.estBlanc());\n assertTrue(reine.estNoir());\n reine.setPosActuelle(Echiquier.Colonne.D, 1); // Positionner en D1\n assertTrue(reine.posEstPossible(Echiquier.Colonne.D, 7)); // Peut se déplacer à D7\n assertFalse(reine.posEstPossible(Echiquier.Colonne.E, 7)); // Ne peu pas E7\n }", "boolean hasPlainRedeem();", "@Test\n public void testRucheBrisee() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test rucheBrisee ===========================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n\n instance.ajoutCasesVoisines(orig);\n\n System.out.println(\"test sur une ruche vide :\");\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec un insecte :\");\n instance.ajoutInsecte(reine, orig);\n assertFalse(instance.rucheBrisee(null, null));\n //assertFalse(instance.rucheBrisee(reine));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes collés :\");\n instance.ajoutInsecte(reine, orig.voisinBas());\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes non collés :\");\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.deleteInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertTrue(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne ghost et casedest :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertTrue(instance.rucheBrisee(new Case(orig.voisinBas()), new Case(orig.voisinBas().voisinBas().voisinBas())));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec trois insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas().voisinGaucheBas());\n assertTrue(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec 7 insectes (1 à l'origine et les 6 coins remplit) :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertFalse(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec 7 insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas().voisinGaucheBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut().voisinHaut().voisinHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas().voisinGaucheBas().voisinBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertTrue(instance.rucheBrisee(null, null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n }", "public boolean muzeBytEuler(){\n\t\turciStupneVrcholu();\n\t\t//zjisti jestli je graf orientovany\n\t\tint druhGrafu = orientaceGrafu();\n\t\t\n\t\tif(druhGrafu == 0){\n\t\t\t//pokud nejsou vsechny vrcholy sudeho stupne vrati false\n\t\t\tif(!stupneProNeoriGraf()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(druhGrafu == 1){\n\t\t\t//pokud nejsou vstupni a vystupni stupne u kazdeho vrchlu si rovny \n\t\t\t//vrati false\n\t\t\tif(!stupneProOriGraf()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(druhGrafu == 2){\n\t\t\tSystem.out.println(\"Cast grafu je orientovana a cast neorientovana\");\n\t\t\treturn false;\n\t\t}\n\t\t//pokud jsou splneny podminky stupnu vraci true;\n\t\treturn true;\n\t\t\n\t}", "@Test\n public void testIsApellido_Materno() {\n System.out.println(\"isApellido_Materno\");\n String AM = \"Proud\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Materno(AM);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n\n }", "public boolean rigaAccertamento(Accertamento accertamento){\n \tboolean tipoAccertamento = true;\n \tif(accertamento instanceof SubAccertamento){\n \t\t//e' un sub\n \t\ttipoAccertamento = false;\n \t}\n \treturn tipoAccertamento;\n }", "@Test\n public void testIsNombre() {\n System.out.println(\"isNombre\");\n String Nom = \"Alfred\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isNombre(Nom);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n public void testIsApellido_Paterno() {\n System.out.println(\"isApellido_Paterno\");\n String AP = \"ulfric\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Paterno(AP);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n public void testRucheAUnInsecte() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test rucheAUnInsecte =======================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n\n System.out.println(\"test sur une ruche venant d'être créé :\");\n assertFalse(instance.rucheAUnSeulInsecte());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test avec un insecte a l'origine :\");\n instance.ajoutInsecte(reine, orig);\n assertTrue(instance.rucheAUnSeulInsecte());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n \n System.out.println(\"test avec deux insectes :\");\n instance.ajoutInsecte(reine, orig.voisinBas());\n assertFalse(instance.rucheAUnSeulInsecte());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n \n System.out.println(\"test avec trois insectes :\");\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertFalse(instance.rucheAUnSeulInsecte());\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"\");\n }", "@Test\n public void testRucheBrisee2() {\n System.out.println(\"=============================================\");\n System.out.println(\"Test rucheBrisee2 ===========================>\\n\");\n\n HexaPoint orig = new HexaPoint(0, 0, 0);\n Plateau instance = new Plateau();\n Reine reine = new Reine(new JoueurHumain(instance, true, NumJoueur.JOUEUR1));\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n\n System.out.println(\"test sur une ruche vide :\");\n assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec un insecte :\");\n instance.ajoutInsecte(reine, orig);\n assertFalse(instance.rucheBrisee2(null));\n assertFalse(instance.rucheBrisee2(reine.getEmplacement()));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes collés :\");\n instance.ajoutInsecte(reine, orig.voisinBas());\n //assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec deux insectes non collés :\");\n instance.deleteInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n //assertTrue(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n //assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec trois insectes en ligne ghost :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas());\n assertTrue(instance.rucheBrisee2(new Case(orig.voisinBas())));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec trois insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinBas().voisinBas().voisinGaucheBas());\n //assertTrue(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche avec 7 insectes (1 à l'origine et les 6 coins remplit) :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n //assertFalse(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n\n System.out.println(\"test sur une ruche casé avec 7 insectes :\");\n instance = new Plateau();\n instance.ajoutCasesVoisines(orig);\n instance.ajoutCasesVoisines(orig.voisinBas());\n instance.ajoutInsecte(reine, orig);\n instance.ajoutInsecte(reine, orig.voisinBas().voisinDroiteBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteBas().voisinGaucheBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinDroiteHaut().voisinHaut().voisinHaut());\n instance.ajoutInsecte(reine, orig.voisinGaucheBas().voisinGaucheBas().voisinBas().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinGaucheHaut().voisinBas());\n instance.ajoutInsecte(reine, orig.voisinHaut());\n assertTrue(instance.rucheBrisee2(null));\n System.out.println(\"\\u001B[32m\" + \"\\t Passed ✔ \\n\");\n }", "@Test\n public void testIsTelefono() {\n System.out.println(\"isTelefono\");\n int tel = 123456789;\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isTelefono(tel);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void riposteShieldTest() {\n\t\tDisplayWithShield();\n\t\t\n\t\tint cardPos = 0;\n\t\tint targetPlayer = 1;\n\t\tint targetDisplaySize = game.getDisplay(targetPlayer).deckSize();\n\t\t/*\n\t\t * test to make sure the target has a maiden as the last played card\n\t\t*/\n\t\tassertTrue(game.getDisplay(1).getCard(targetDisplaySize-1).isMaiden());\n\t\t\n\t\t/*\n\t\t * test to make sure the player's display is still empty\n\t\t */\n\t\tassertTrue(game.getDisplay(0).deckSize() == 0);\n\t\t\n\t\t\n\t\t//assertFalse(game.getDisplay(0).getCard(targetDisplaySize-1).isMaiden());\n\t\t\n\t\t//test the size of discard deck before playing Riposte\n\t\tassertEquals(game.getDiscardDeck().deckSize(), 0);\n\t\t\n\t\tassertEquals(game.getDisplay(targetPlayer).deckSize(), 7);\n\t\t\n\t\t//play Riposte\n\t\tRulesEngine.riposte(game, cardPos, targetPlayer);\n\t\t\n\t\t//test the size of discard deck after playing Riposte\n\t\tassertEquals(game.getDiscardDeck().deckSize(), 0);\n\t\t\n\t\t//Update this variable after a card has been removed from the display\n\t\ttargetDisplaySize = game.getDisplay(targetPlayer).deckSize();\n\t\t\n\t\t/*\n\t\t * test to make sure the target's last played card is still a maiden\n\t\t*/\n\t\tassertTrue(game.getDisplay(targetPlayer).getCard(targetDisplaySize-1).isMaiden());\n\t\t\n\t\t/*\n\t\t * test to make sure the player's display is still empty\n\t\t*/\n\t\tassertTrue(game.getDisplay(0).deckSize() == 0);\n\t}", "@Test\n public void testGetRuedas() {\n System.out.println(\"getRuedas\");\n Camiones instance = new Camiones(\"C088IJ\", true, 10);\n int expResult = 0;\n int result = instance.getRuedas();\n \n }", "@Test\n public void testAvaaRuutu() {\n int x = 0;\n int y = 0;\n Peli pjeli = new Peli(new Alue(3, 0));\n pjeli.avaaRuutu(x, y);\n ArrayList[] lista = pjeli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isAvattu());\n assertEquals(false, pjeli.isLahetetty());\n }", "@Test\n\tpublic void vero_se_e_solo_se_un_prestito_uguale_a_se_stesso() {\n\t\tassertTrue(prestito.equals(prestito),\"Prestito uguale sse uguale a se stesso\");\n\t}", "public boolean hasPlainRedeem() {\n return dataCase_ == 3;\n }", "public boolean hasPlainRedeem() {\n return dataCase_ == 3;\n }", "private String elaboraRitorno() {\n String testo = VUOTA;\n String titoloPaginaMadre = getTitoloPaginaMadre();\n\n if (usaHeadRitorno) {\n if (text.isValid(titoloPaginaMadre)) {\n testo += \"Torna a|\" + titoloPaginaMadre;\n testo = LibWiki.setGraffe(testo);\n }// fine del blocco if\n }// fine del blocco if\n\n return testo;\n }", "@Test\n public void test1() throws Throwable {\n SitNFe sitNFe0 = SitNFe.COM_DANFE;\n boolean boolean0 = sitNFe0.isReenviar();\n assertEquals(false, boolean0);\n }", "public abstract boolean teReproduces();", "boolean isRisen(Coordinates coord, double horizon, long ttime) throws AstrometryException;", "private boolean verificarRaza(String raza){\n //Arreglo de Strings con las razas peligrosas\n String[] razas_peligrosas = {\n \"Pit bull terrier\", \n \"American Staffordshire terrier\", \n \"Tosa Inu\",\n \"Dogo argentino\",\n \"Dogo Guatemalteco\",\n \"Fila brasileño\",\n \"Presa canario\",\n \"Doberman\",\n \"Gran perro japones\", \n \"Mastin napolitano\",\n \"Presa Mallorqui\",\n \"Dogo de burdeos\",\n \"Bullmastiff\",\n \"Bull terrier inglés\",\n \"Bulldog americano\",\n \"Rhodesiano\",\n \"Rottweiler\"\n };\n\n boolean bandera = true;\n\n //Ciclo que recorre todos los elementos del arreglo hasta que encuentra uno y termina el ciclo.\n for (int i = 0; i < razas_peligrosas.length; i++){\n if (raza.equals(razas_peligrosas[i])){\n bandera = false;\n break;\n }\n }\n\n return bandera;\n }", "@Test\r\n public void testWortUeberpruefen() {\r\n System.out.println(\"wortUeberpruefen\");\r\n String eingabewort = \"\";\r\n Turingband t = null;\r\n Texteinlesen instance = new Texteinlesen();\r\n instance.wortUeberpruefen(eingabewort, t);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public boolean allElementsInRus() {\n if (!allMenuCommandsInLang(\"Rus\")) return false;\n Log.info(\"allElementsInRus: all elements are in Russian\");\n return true;\n }", "@Test\r\n\tpublic void CT03CadastrarUsuarioComRaNulo() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = new Usuario();\r\n\t\t\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comRAInvalido_nulo();\r\n\t\t\tfail(\"deveria lançar uma exceção\");\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"RA invalido\", e.getMessage());\r\n\t\t}\r\n\t}", "@Test\n public void testVoitto() {\n Peli peli = new Peli(new Alue(3, 0));\n peli.avaaRuutu(1, 1);\n boolean ododtus = true;\n boolean tulos = peli.voitto();\n assertEquals(ododtus, tulos);\n }", "public boolean compararRut(String dato1, SisCliente sCliente){\r\n for(int i=0; i<sCliente.listaClientes.size(); i++){\r\n if(dato1.equals(sCliente.listaClientes.get(i).getRut())){\r\n System.out.println(\"RUT encontrado\");\r\n existe = true;\r\n break;\r\n }else{\r\n System.out.println(\"RUT no encontrado\");\r\n existe = false;\r\n } \r\n }\r\n return existe;\r\n }", "@Test\r\n public void testIsMatin() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : isMatin\");\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setMatin(false);\r\n boolean expResult = false;\r\n boolean result = instance.isMatin();\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void sucheReihen() throws Exception {\n System.out.println(\"sucheReihen\");\n KategorieKey key = null;\n List<Reihe> expResult = null;\n List<Reihe> result = SaalHelper.sucheReihen(key);\n assertEquals(expResult, result);\n \n }", "@Test(expected = PiezaVendidaException.class)\r\n\tpublic void reservarUnaPiezaVendida() {\r\n\t\tthis.pieza.reservar();\r\n\t\tthis.pieza.vender();\r\n\t\tthis.pieza.reservar();\r\n\t}", "public boolean speichereRechnung(Rechnung r) throws IOException {\n try {\n oos.writeObject(r);\n return true;\n } catch (IOException e) {\n return false;\n }\n }", "@Test\n public void testGetResearched() {\n VirusAttribute virusAttribute = new VirusAttribute(\"att\", \"desc\", 30);\n boolean result = virusAttribute.isResearched();\n assertFalse(result);\n }", "boolean getRedact();", "boolean getRedact();", "@Test\n public void testHasTemperaturaVariation() {\n System.out.println(\"hasTemperaturaVariation\");\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n boolean expResult = true;\n instance.setHasTemperaturaVariation(expResult);\n boolean result = instance.hasTemperaturaVariation();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void verurteilenTest() {\n\t\tR1.verurteilen(Sc1);\n\t\tR2.verurteilen(Sc2);\n\t\tassertEquals(true, Sc1.getIstVerurteilt());\n\t\tassertEquals(false, Sc2.getIstVerurteilt());\n\n\t\tR1.verurteilen(Sc2);\n\t\tR2.verurteilen(Sc1);\n\t\tassertEquals(true, Sc2.getIstVerurteilt());\n\t\tassertEquals(false, Sc1.getIstVerurteilt());\n\n\t}", "@Test\r\n\tpublic void CT03ConsultarLivroComRaNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comRA_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"RA inválido\", e.getMessage());\r\n\t\t}\r\n\t}", "@Test\n public void testGetTipoFinal() {\n System.out.println(\"getTipoFinal\");\n Reserva instance = new Reserva();\n String expResult = \"\";\n String result = instance.getTipoFinal();\n assertEquals(expResult, result);\n \n }", "@Test\r\n public void testAnalizaString() {\r\n System.out.println(\"analizaString\");\r\n RevisorParentesis instance = null;\r\n boolean expResult = true;\r\n boolean result = instance.analizaString();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n \r\n }", "@Test\n\tpublic void testLecturaFrom(){\n\t\tassertEquals(esquemaEsperado.getExpresionesFrom().toString(), esquemaReal.getExpresionesFrom().toString());\n\t}", "@Test\r\n public void testCalculerValeurTerrainAgricole() {\n Lot lot1 = new Lot(\"Lot1\", 2, 0, 300, \"14-02-2019\");\r\n Lot lot2 = new Lot(\"Lot2\", 2, 0, 600, \"12-06-2019\");\r\n Lot lot3 = new Lot(\"Lot3\", 2, 0, 1500, \"04-02-2019\");\r\n List<Lot> lots = new ArrayList();\r\n lots.add(lot1);\r\n lots.add(lot2);\r\n lots.add(lot3);\r\n // Terrain (typeTerrain, prix_min2, prix_min2, listLot)\r\n Terrain terrain = new Terrain(0, 50.00, 75.00, lots);\r\n Agricole.calculerValeurTerrainAgricole(terrain);\r\n // valFonciereAttendue = 50.0*300 + 50.0*600 + 50.0*1500 + 733.77 +\r\n // nbreDroitPassage = 500-(2*(5/100*300*50)) + 500-(2*(5/100*600*50))+\r\n // 500-(2*(5/100*1500*50)\r\n double valFonciereAttendue = 110233.8;\r\n double taxeScolaireAttendue=1322.85;\r\n double taxeMunicipaleAttendue = 2755.85;\r\n boolean resultat = valFonciereAttendue == terrain.getValeur_fonciere_totale()\r\n && taxeScolaireAttendue == terrain.getTaxe_scolaire()\r\n && taxeMunicipaleAttendue == terrain.getTaxe_municipale();\r\n assertTrue(\"valfoncièreAttendue: \" + valFonciereAttendue+\", vs valeur obtenue: \"+terrain.getValeur_fonciere_totale()\r\n + \"\\ntaxe scolaire attendue: \" + taxeScolaireAttendue+\", vs valeur obtenue: \"+terrain.getTaxe_scolaire()\r\n + \"\\ntaxe muninipale attendue: \" + taxeMunicipaleAttendue+\", vs valeur obtenue: \"+terrain.getTaxe_municipale(), \r\n resultat); \r\n \r\n }", "@Test\n public void testSalaire() {\n Assert.assertTrue(e.calculSalaire() == 15 * 20 + e.getSalaire());\n }", "boolean getCorrect();", "public boolean sucheMitspieler();", "public void testaReclamacao() {\n\t}", "@Test\r\n\tpublic void invalidRetakesTest() {\r\n\r\n\t\tretakeBean rbean = null;\r\n\t\tboolean b = false;\r\n\t\ttry {\r\n\t\t\tInstructorUI.appendRetakeNodeToXML(rbean);\r\n\t\t\tretakesReader reader = new retakesReader();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tretakes rlist = reader.read(retakesXMLPath);\r\n\r\n\t\t\t\tfor (retakeBean r : rlist) {\r\n\t\t\t\t\tif (r.compareTo(rbean) == 0 && !b) {\r\n\t\t\t\t\t\tb = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tb = false;\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tb = false;\r\n\t\t}\r\n\r\n\t\tAssert.assertFalse(b);\r\n\t}", "boolean hasRoll();", "boolean hasRoll();", "boolean hasRt();", "@Test\n public void testLukitseRuutu() {\n System.out.println(\"lukitseRuutu\");\n int x = 0;\n int y = 0;\n Peli peli = new Peli(new Alue(3, 1));\n peli.lukitseRuutu(x, y);\n ArrayList[] lista = peli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isLukittu());\n }", "boolean hasEresult();", "private boolean isRecruiterRole(String userRole) {\n\t\tlogger.info(\"Entering isRecruiterRole :: USER_ROLE from Session :: \" + userRole);\n\t\tif (\"RECRUITER\".equalsIgnoreCase(userRole)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\r\n\tpublic void debitarRechazado() {\r\n\t}", "public boolean erTom();", "@Override\n\tpublic boolean faelltAuf(TetrominoSpielstein tetrominoSpielstein) {\n\t\treturn false;\n\t}", "@Test\n public void testIsEmail() {\n System.out.println(\"isEmail\");\n String em = \"[email protected]\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isEmail(em);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public boolean containsRMneumonics() {\n\t\tswitch(this) {\n\t\t\n\t\tcase NOTA -> \t{return true;}\n\t\tcase NOTX -> \t{return true;}\n\t\tcase NEGA -> \t{return true;}\n\t\tcase NEGX -> \t{return true;}\n\t\tcase ASLA -> \t{return true;}\n\t\tcase ASLX -> \t{return true;}\n\t\tcase ASRA -> \t{return true;}\n\t\tcase ASRX -> \t{return true;}\n\t\tcase ROLA -> \t{return true;}\n\t\tcase ROLX -> \t{return true;}\n\t\tcase RORA -> \t{return true;}\n\t\tcase RORX -> \t{return true;}\n\t\t\n\t\tdefault -> {return false;}\n\t\t\n\t\t}\n\t}", "private boolean verificarMascota(Perro perro, int edad){\n //Propiedades del perro a evaluar\n String raza = perro.getRaza();\n String tamano = perro.getTamano();\n\n boolean bandera = false;\n\n //Si hay un niño pequeño, y se le asigna un perro con tamaño pequeño y no es raza peligrosa\n if (edad < 10 && tamano.equals(\"pequeno\") && verificarRaza(raza))\n bandera = true;\n \n //Si hay un niño grande y se le asigna un perro con tamaño pequeño o mediano y no es raza peligrosa\n else if (18 > edad && edad > 10 && (tamano.equals(\"pequeno\") || tamano.equals(\"mediano\")) && verificarRaza(raza))\n bandera = true;\n\n //Si no hay niños \n else if (edad > 18)\n bandera = true;\n\n //Si la familia no es apta\n else\n bandera = false;\n\n return bandera;\n }", "boolean hasCorrect();", "@Test\n public void testPartieFinie() {\n Joueur NORD = new Joueur(\"NORD\");\n assertFalse(Regles.partieFinie(NORD));\n NORD.jeu.clear();\n for (int i = 0; i < NORD.getNbPioche();) {\n NORD.piocherCarte();\n NORD.jeu.clear();\n }\n assertTrue(Regles.partieFinie(NORD));\n }", "@Test\n public void authenResultTest() {\n assertEquals(\"R\", authResponse.getAuthenResult());\n }", "@Test\n\tpublic void testLecturaNombre() {\n\t\tassertTrue(!esquemaReal.getNombrePatron().equals(\"\"));\n\t}", "boolean getEntrench(Unit unit);", "public boolean setRacun(Racun racun){ // info da li je racun postavljen uspesno\n if(this.racun!=null){\n System.out.println(\"za osobu \"+this.ime+ \" je vec registrovan racun.\");\n return false;\n }\n this.racun=racun; //this->return\n return true;\n }", "public boolean checkRapelState () { return noOfRapels > 0; }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "public boolean isSetRiu() {\n return this.riu != null;\n }", "@Test\n public void testVerifyNome() {\n System.out.println(\"verifyNome\");\n boolean expResult = true;\n boolean result = uv.verifyNome(u);\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testRicercaArticolo1() {\n\t\tString ricerca = \"No\";\n\t\tArrayList<Articolo> trovati = (ArrayList<Articolo>) \n\t\t\t\tb1.ricercaArticolo(ricerca);\n\t\tassertTrue(\"La lista deve essere vuota\", trovati.isEmpty());\n\t}", "public boolean ut()\n {\n //definir dados\n int lin, col;\n int i, j;\n boolean answer = true;\n \n //obter dimensoes \n lin = lines();\n col = columns();\n \n //verificar se tabela e' valida\n if(table == null)\n {\n System.out.println(\"ERRO: Tabela invalida. \");\n } //end\n else\n {\n //verificar se quantidade e' valida\n if(lin <= 0 || col <= 0)\n {\n System.out.println(\"ERRO: Quantidade invalida. \");\n } //end\n else\n {\n //verificar se e' quadrada\n if( lin == col )\n {\n for(i = 0; i < lin; i++)\n {\n for(j = 0; j < col; j++)\n {\n if(i > j)\n {\n answer = answer && (IO.getString(table[i][j]).equals((\"0\")));\n } //end\n } //end repetir\n } //end repetir\n } //end se\n } //end \n } //end se\n //retornar resposta\n return( answer );\n }", "private void verificaUnicitaAccertamento() {\n\t\t\n\t\t//chiamo il servizio ricerca accertamento per chiave\n\t\tRicercaAccertamentoPerChiave request = model.creaRequestRicercaAccertamento();\n\t\tRicercaAccertamentoPerChiaveResponse response = movimentoGestioneService.ricercaAccertamentoPerChiave(request);\n\t\tlogServiceResponse(response);\n\t\t// Controllo gli errori\n\t\tif(response.hasErrori()) {\n\t\t\t//si sono verificati degli errori: esco.\n\t\t\taddErrori(response);\n\t\t} else {\n\t\t\t//non si sono verificatui errori, ma devo comunque controllare di aver trovato un accertamento su db\n\t\t\tcheckCondition(response.getAccertamento() != null, ErroreCore.ENTITA_NON_TROVATA.getErrore(\"Movimento Anno e numero\", \"L'impegno indicato\"));\n\t\t\tmodel.setAccertamento(response.getAccertamento());\n\t\t}\n\t}", "boolean hasUa();", "boolean isAutorisationUtilisation();", "@Test\n public void testAnchoOruedas() {\n System.out.println(\"anchoOruedas\");\n Camiones instance = new Camiones(\"C088IJ\", true, 10);\n double expResult = 0.0;\n double result = instance.anchoOruedas();\n \n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\r\n public void testIsMidi() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : isMidi\");\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setMidi(false);\r\n boolean expResult = false;\r\n boolean result = instance.isMidi();\r\n assertEquals(expResult, result);\r\n }", "@Test(expected = PiezaVendidaException.class)\r\n\tpublic void venderUnaPiezaYaVendida() {\r\n\t\tthis.pieza.reservar();\r\n\t\tthis.pieza.vender();\r\n\t\tthis.pieza.vender();\r\n\t}", "public void setRSU(boolean isRSU) { this.isRSU = isRSU; }", "@Test\r\n public void testVerificaPossibilidade0() {\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\n public void testLeerArchivo() {\n System.out.println(\"LeerArchivo\");\n String RutaArchivo = \"\";\n RandomX instance = null;\n Object[] expResult = null;\n Object[] result = instance.LeerArchivo(RutaArchivo);\n assertArrayEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public boolean verificaGeracaoDadosLeituraRota(FaturamentoGrupo faturamentoGrupo, Rota rota)\r\n\t\t\tthrows ControladorException {\r\n\r\n\t\tboolean retorno = false;\r\n\t\ttry {\r\n\r\n\t\t\tretorno = repositorioImovel.verificaGeracaoDadosLeituraRota(faturamentoGrupo, rota);\r\n\r\n\t\t} catch (ErroRepositorioException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tthrow new ControladorException(\"erro.sistema\", ex);\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}", "@Test\n void registerVeichle() {\n vr.registerVeichle(dieselCar);\n vr.registerVeichle(dieselCar2);\n\n assertTrue(vr.getVeichles().contains(dieselCar) && vr.getVeichles().contains(dieselCar2));\n assertFalse(vr.registerVeichle(dieselCar));\n }", "@Test\n public void quandoCriaPilhaVazia(){\n // QUANDO (PRE-CONDIÇAO) E FAÇA (EXECUÇAO DO COMPORTAMENTO):\n PilhaString pilha1 = new PilhaString();\n \n // VERIFICAR (CHECK)\n assertTrue(pilha1.isVazia()); //true\n }", "@Test\n public void testSetRuedas() {\n System.out.println(\"setRuedas\");\n int ruedas = 3;\n Camiones instance = new Camiones(\"C088IJ\", true, 10);\n instance.setRuedas(ruedas);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "public void testModifierUtilisateur() {\n System.out.println(\"modifierUtilisateur\");\n Utilisateur putilisateur = null;\n boolean expResult = false;\n boolean result = Utilisateur.modifierUtilisateur(putilisateur);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "Boolean getPartiallyCorrect();", "@Test\r\n public void testVerificaPossibilidade() {\r\n usucapiao.setAnimusDomini(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }" ]
[ "0.64333516", "0.6355556", "0.61712396", "0.6138846", "0.61179346", "0.6052615", "0.5972634", "0.5877821", "0.5856574", "0.5848803", "0.5827389", "0.5783025", "0.5767358", "0.5766264", "0.57176906", "0.57015103", "0.567234", "0.56476516", "0.56402135", "0.56267315", "0.56164694", "0.56094277", "0.56077933", "0.55898064", "0.5582637", "0.5579145", "0.55778396", "0.55702376", "0.55667293", "0.5554385", "0.5542831", "0.553247", "0.55318964", "0.553081", "0.5520716", "0.5520568", "0.55160135", "0.55160135", "0.55072325", "0.5489748", "0.5483908", "0.5481472", "0.5481199", "0.54749453", "0.5471688", "0.5458135", "0.54479855", "0.5444951", "0.54310113", "0.54062814", "0.5401287", "0.5401287", "0.54005295", "0.5396032", "0.5394571", "0.5394305", "0.5389538", "0.53793436", "0.5367738", "0.5367603", "0.5354489", "0.53542936", "0.5354265", "0.5351388", "0.53479165", "0.5338328", "0.5337202", "0.5331313", "0.53284484", "0.53263235", "0.53263235", "0.53263235", "0.53263235", "0.53263235", "0.53263235", "0.53263235", "0.53263235", "0.53263235", "0.53263235", "0.53263235", "0.53256726", "0.5323331", "0.5322413", "0.53067285", "0.52958006", "0.52934444", "0.5289459", "0.52878344", "0.52873516", "0.5280178", "0.52787703", "0.5277494", "0.5276867", "0.5267504", "0.5262619", "0.5259481", "0.5259322", "0.5255614", "0.5245782", "0.5242674" ]
0.7928583
0
Test of isNombre method, of class Entradas.
@Test public void testIsNombre() { System.out.println("isNombre"); String Nom = "Alfred"; Entradas instance = new Entradas(); boolean expResult = false; boolean result = instance.isNombre(Nom); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testLecturaNombre() {\n\t\tassertTrue(!esquemaReal.getNombrePatron().equals(\"\"));\n\t}", "@Test\n\tpublic void testDarNombre()\n\t{\n\t\tassertEquals(\"El nombre esperado es Germán.\", \"Germán\", paciente.darNombre());\n\t}", "@Test\n public void testIsApellido_Materno() {\n System.out.println(\"isApellido_Materno\");\n String AM = \"Proud\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Materno(AM);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n\n }", "@Test\n\tpublic void obtenerNombreTest() {\n\t\tArchivo ar = new Imagen(\"test\", \"contenido\");\n\t\tassertEquals(\"test\", ar.obtenerNombre());\n\t}", "@Test\n public void testIsApellido_Paterno() {\n System.out.println(\"isApellido_Paterno\");\n String AP = \"ulfric\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Paterno(AP);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public boolean validarNombre() {\n\t\treturn validadores.validarLongitud(nombre, 50);\n\t}", "@Override\r\n public boolean validarNombre(String nombre) throws ServiceException {\n if (validarNombreNoNulo(nombre)) {\r\n // Se verifica la longitud del nombre\r\n int longitud = StringUtils.length(nombre);\r\n if (longitud < 5 || longitud > 20) {\r\n throw new ServiceException(\"consultorio.service.error.1204\", locale);\r\n }\r\n // Se verifica que el nombre sea alfabético numérico\r\n if (!StringUtils.isAlphanumericSpace(nombre)) {\r\n throw new ServiceException(\"consultorio.service.error.1205\", locale);\r\n }\r\n }\r\n return true;\r\n }", "public boolean verificarNombre(String nombreEtiqueta){\n for(int i = 0;i < this.listaEtiquetas.size();i++){\n if(this.listaEtiquetas.get(i).getEtiqueta().equals(nombreEtiqueta)){ //Si existe el nombre en la lista de etiquetas\n return true;\n }\n }\n return false;\n }", "@Test\r\n public void testGetNombre() {\r\n System.out.println(\"getNombre\");\r\n Usuario instance = new Usuario();\r\n String expResult = null;\r\n String result = instance.getNombre();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n public void testGetNombre() {\n System.out.println(\"getNombre\");\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n String expResult = \"T-3\";\n String result = instance.getNombre();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testIsTelefono() {\n System.out.println(\"isTelefono\");\n int tel = 123456789;\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isTelefono(tel);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "private boolean compararNombreUsuario () {\n\t\tlistaUsuarios = UsuarioDAO.readTodos(this.mainApp.getConnection());\n\t\tString nombre = this.campoTextoNombreUsuario.getText();\n\t\tfor (Usuario nombres : listaUsuarios) {\n\t\t\tif (nombres.getUsuario().equals(nombre)) {\n\t\t\t\treturn false;\n\t\t\t}//FIN IF\n\t\t}//FIN FOR\n\t\treturn true;\n\t}", "@Test\n public void testGetNombre() {\n System.out.println(\"getNombre\");\n Funcionario instance = new Funcionario();\n String expResult = \"\";\n String result = instance.getNombre();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public Boolean verificarCaracteres(String nome){\n\n this.resultado = false;\n Pattern pattern = Pattern.compile(\"^[a-zA-Z]*$\");\n Matcher matcher = pattern.matcher(nome);\n\n if(matcher.find()){\n this.resultado = true;\n }\n\n return this.resultado;\n }", "@Test\r\n public void testGetNombre() {\r\n String expResult = \"Mani\";\r\n articuloPrueba.setNombre(\"Mani\");\r\n String result = articuloPrueba.getNombre();\r\n assertEquals(expResult, result);\r\n }", "@Test\r\n public void testAnalizaString() {\r\n System.out.println(\"analizaString\");\r\n RevisorParentesis instance = null;\r\n boolean expResult = true;\r\n boolean result = instance.analizaString();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n \r\n }", "public void testAvisoSinNombre() throws Exception {\r\n\r\n\t\t// Comprueba cuántos avisos hay\r\n\t\tsolo.clickOnMenuItem(\"Ver Avisos\");\r\n\t\tint items_old=0, items_new=0;\r\n\t\tListView lv=null;\r\n\t\tif (!solo.getCurrentListViews().isEmpty()){\r\n\t\t\tlv = solo.getCurrentListViews().get(0);\r\n\t\t\titems_old = lv.getCount(); // Numero de avisos creados\r\n\t\t}\r\n\t\t// Intenta crear un aviso sin nombre\r\n\t\tsolo.clickOnMenuItem(\"Crear Aviso\");\r\n\t\tsolo.clearEditText(0); // Se asegura de que no haya nada en el campo de\r\n\t\t\t\t\t\t\t\t// nombre\r\n\t\tsolo.clickOnButton(\"Guardar\"); // Intenta guardar un aviso vacío\r\n\r\n\t\t// Comprueba que no se haya creado un aviso nuevo\r\n\t\tsolo.clickOnMenuItem(\"Ver Avisos\");\r\n\t\tif (!solo.getCurrentListViews().isEmpty()){\r\n\t\t\tlv=solo.getCurrentListViews().get(0);\r\n\t\t\titems_new=lv.getCount();\r\n\t\t}\r\n\t\tassertTrue(items_old==items_new);\r\n\t}", "@Test\n public void testVerifyNome() {\n System.out.println(\"verifyNome\");\n boolean expResult = true;\n boolean result = uv.verifyNome(u);\n assertEquals(expResult, result);\n }", "boolean existe(String nombre);", "private boolean validarNombre (String nombre){\n Pattern pattern = Pattern.compile(\"[a-zA-Z-ZñÑáéíóúÁÉÍÓÚ]+\\\\s[a-zA-Z-ZñÑáéíóúÁÉÍÓÚ\\\\s]+\");\n if (!nombre.matches(String.valueOf(pattern))){\n errorDu.setText(\"Debe cargar Nombre y Apellido y solo se permiten letras\");\n errorDu.setVisibility(View.VISIBLE);\n\n }\n return nombre.matches(String.valueOf(pattern));\n }", "public abstract java.lang.String getNombre();", "@Test\n public void testGetNombre() {\n System.out.println(\"getNombre\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n String expResult = \"nom1\";\n String result = instance.getNombre();\n assertEquals(expResult, result);\n }", "public void testGetNom() {\n System.out.println(\"getNom\");\n Utilisateur instance = null;\n String expResult = \"\";\n String result = instance.getNom();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Override\r\n public ResponseEntity<PersonaResponse> testNombre( ) {\r\n PersonaResponse response = new PersonaResponse();\r\n response.setNombre(\"Abdiel\");\r\n response.setApellidoP(\"cruz\");\r\n response.setApellidoM(\"Mendoza\");\r\n return new ResponseEntity<PersonaResponse>(response,HttpStatus.OK);\r\n }", "private boolean comprobarUsuario(String nombre, String contrasenia, String grupo) {\n\n return true;\n }", "@Override\r\n public boolean validarNombreNoNulo(String nombre) throws ServiceException {\n if (StringUtils.isBlank(nombre)) {\r\n throw new ServiceException(\"consultorio.service.error.1203\", locale);\r\n }\r\n return true;\r\n }", "@Test\n public void testIsEmail() {\n System.out.println(\"isEmail\");\n String em = \"[email protected]\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isEmail(em);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "boolean hasSurname();", "private boolean validar(String nombre,String direccion, int numero, String estado) {\r\n\t\tif (nombre == null || nombre.equals(\"\") || direccion == null || direccion.equals(\"\") || estado == null || estado == null || numero==0) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\n public void testSetNombre() {\n System.out.println(\"setNombre\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n String expResult = \"nom1\";\n String result = instance.getNombre();\n assertEquals(expResult, result);\n }", "public boolean verificaUnicidadeNome() {\n\t\tif(!EntidadesDAO.existeNome(entidades.getNome())) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void quandoCriaPilhaVazia(){\n // QUANDO (PRE-CONDIÇAO) E FAÇA (EXECUÇAO DO COMPORTAMENTO):\n PilhaString pilha1 = new PilhaString();\n \n // VERIFICAR (CHECK)\n assertTrue(pilha1.isVazia()); //true\n }", "@Test\n public void nao_deve_aceitar_descricao_com_caracteres_especiais() {\n telefone.setDescricao(\"celular empresarial: (11)9####-####.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "@Test\r\n\tpublic void CT05CadastrarUsuarioComNomeNulo() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = new Usuario();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNomeNulo();\r\n\t\t\tfail(\"deveria lançar uma exceção\");\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome invalido\", e.getMessage());\r\n\t\t}\r\n\t}", "String getNombre();", "String getNombre();", "String getNombre();", "@Test\n public void nao_deve_aceitar_descricao_com_a_primeira_letra_minuscula() {\n telefone.setDescricao(\"celular empresarial.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "@Test\n public void deve_aceitar_descricao_valida() {\n telefone.setDescricao(\"Celular pessoal.\");\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }", "@Test\n public void testInicioSesion_String_String() throws Exception {\n System.out.println(\"inicioSesion\");\n String nm = \"Dan\";\n String contra = \"danr\";\n CSesion instance = new CSesion();\n DataUsuario result = instance.inicioSesion(nm, contra);\n Usuario user = instance.getUsuario();\n DataUsuario infoP = instance.verInfoPerfil();\n\n Integer cant = 2;\n Integer num = 2;\n instance.agregaLinea(cant, num);\n\n DataOrdenCompra carrito = instance.verCarrito();\n instance.generarOrden();\n\n boolean puedeComent = instance.puedeComentar(2); // lo compro asi que puede\n instance.comentar(2, \"Yo lo compré\");\n\n //instance.responder(2, \"Si\", 1);\n }", "@Test\n public void deve_aceitar_descricao_entre_15_e_30_caracteres_valido() {\n telefone.setDescricao(random(20, true, false));\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }", "@Test\n\tvoid testeNomeVazio()\n\t{\n\t\ttry\n\t\t{\n\t\t\tcontatoBasico = new Contato (\" \", \"Gaudencio\", \"122345\");\n\t\t\tfail(\"Esperava erro ao passar nome vazio\");\n\t\t}catch(IllegalArgumentException iae)\n\t\t{\n\t\t}\n\t}", "@Test\n public void testGetNombreUsuario() {\n System.out.println(\"getNombreUsuario\");\n Usuario instance = new Usuario();\n String expResult = \"usuario 1\";\n instance.setNombreUsuario(expResult);\n String result = instance.getNombreUsuario();\n assertEquals(expResult, result);\n }", "@Test\r\n\tpublic void CT05ConsultarLivroComNomeNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNome_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome inválido\", e.getMessage());\r\n\t\t}\r\n\t}", "public boolean bajaCliente(String nombreCliente){\r\n\t\t//TODO Implementar metodo\r\n\t\tthrow new IllegalStateException();\r\n\t}", "@Test\n public void testNuevaLr() {\n System.out.println(\"nuevaLr\");\n Alimento a = new Alimento(\"nom1\", \"inst1\", \"tempC1\");\n String uMedida = \"u1\";\n float cantidad = 3.0F;\n Receta instance = new Receta();\n boolean expResult = true;\n boolean result = instance.nuevaLr(a, uMedida, cantidad);\n assertEquals(expResult, result);\n }", "@Test\n public void nao_deve_aceitar_descricao_com_numeros() {\n telefone.setDescricao(random(10, true, true));\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "@Test\n\tpublic void testDarMotivoIngreso()\n\t{\n\t\tassertEquals(\"El motivo de ingreso esperado es: Accidente\", Motivo.ACCIDENTE, paciente.darMotivoIngreso());\n\t}", "public void setNombre (String val) {\n this.nombre = val;\n }", "public String getNombre() {\n\t\treturn mNombre;\n\t}", "@Override\r\n public boolean validarNombreNoRepetido(Integer empresaId, String nombre) throws ServiceException, DaoException {\n List<Sucursal> sucursales = this.getSucursalesPorEmpresaNombre(empresaId, nombre, false, InterfaceDao.TO_UPPER_CASE);\r\n if (sucursales != null && sucursales.size() > 0) {\r\n throw new ServiceException(\"consultorio.service.error.1209\", locale);\r\n }\r\n return true;\r\n }", "public abstract String getNombre();", "@Test\r\n public void testSetNombre() {\r\n String nombre = \"Prueba\";\r\n articuloPrueba.setNombre(nombre);\r\n assertEquals(nombre, articuloPrueba.getNombre());\r\n }", "@AssertTrue(message=\"La clave debe ser alfanumerica \")\r\n\tpublic boolean validarClave(){\r\n\t\tboolean a=StringUtils.isAlphanumeric(clave);\r\n\t\tboolean b=StringUtils.isNotBlank(clave);\r\n\t\treturn (a && b);\r\n\t}", "@Test\n\tvoid testeContato()\n\t{\n\t\tString msg = \"Esperando obter nome completo\";\n\t\tassertEquals(\"Matheus Gaudencio\", contatoBasico.nomeCompleto(), msg);\n\t}", "public void testGetNomUtilisateur() {\n System.out.println(\"getNomUtilisateur\");\n Utilisateur instance = null;\n String expResult = \"\";\n String result = instance.getNomUtilisateur();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n\tpublic void CT04ConsultarLivroComNomeEmBranco() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNome_branco();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome inválido\", e.getMessage());\r\n\t\t}\r\n\t}", "public void testGetNomRole() {\n System.out.println(\"getNomRole\");\n Utilisateur instance = null;\n String expResult = \"\";\n String result = instance.getNomRole();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n\tpublic void CT04CadastrarUsuarioComNomeEmBranco() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = new Usuario();\r\n\t\t\r\n\r\n\t\ttry {\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNomeEmBranco();\r\n\t\t\tfail(\"deveria lançar uma exceção\");\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome invalido\", e.getMessage());\r\n\t\t}\r\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_menos_de_15_caracteres() {\n telefone.setDescricao(random(35, true, false));\n assertFalse(isValid(telefone, \"A descrição não pode ter menos de 15 e mais de 30 caracteres.\", Find.class));\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\n this.nombre = nombre;\n }", "public void setNombre(String nombre) {\r\n this.nombre = nombre;\r\n }", "public void setNombre(String nombre) {\r\n this.nombre = nombre;\r\n }", "public void setNombre(String nombre) {\r\n this.nombre = nombre;\r\n }", "@Test\n public void nao_deve_aceitar_descricao_com_mais_de_30_caracteres() {\n telefone.setDescricao(random(35, true, false));\n assertFalse(isValid(telefone, \"A descrição não pode ter menos de 15 e mais de 30 caracteres.\", Find.class));\n }", "public String getNombre() {\n return this.nombre;\n }", "public String getNombre() {\n return this._nombre;\n }", "@Test\n public void testIsMonto() {\n System.out.println(\"isMonto\");\n int money = 1000000;\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isMonto(money);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public static boolean comienza(String baseDeDatos, String entrada) {\n\t\t/* ENTRADA DE DATOS */\n\t\tString[] cadena;\n\t\tStringTokenizer tokenizerBD = new StringTokenizer(baseDeDatos, \" \");\n\t\tint cantTokensBD = tokenizerBD.countTokens();\n\t\tStringTokenizer tokenizerEntrada = new StringTokenizer(entrada, \" \");\n\t\tint cantTokensEntrada = tokenizerEntrada.countTokens();\n\t\tif (cantTokensEntrada == 0) {\n\t\t\treturn true;\n\t\t} else if (cantTokensEntrada == 1) {\n\t\t\tboolean encontrado = false;\n\t\t\tfor (int j=0; j<cantTokensBD && !encontrado; j++) {\n\t\t\t\tif (tokenizerBD.nextToken().toUpperCase().startsWith(entrada.trim().toUpperCase()) ) {\n\t\t\t\t\tencontrado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn encontrado;\n\t\t} else {\n\t\t\tboolean encontrado = false;\n\t\t\tcadena = new String[cantTokensBD];\n\t\t\tfor (int i=0; i<cantTokensBD; i++) {\n\t\t\t\tcadena[i] = new String(tokenizerBD.nextToken());\n\t\t\t}\n\t\t\tfor (int j=0; j<(cadena.length-1) && !encontrado; j++) {\n\t\t\t\tString aux = \"\";\n\t\t\t\tfor (int k=j; k<cadena.length; k++) {\n\t\t\t\t\taux += cadena[k]+\" \";\n\t\t\t\t} \n\t\t\t\tencontrado = aux.toUpperCase().startsWith(entrada.trim().toUpperCase());\n\t\t\t}\n\t\t\treturn encontrado;\n\t\t}\n\t}", "@Override\n public boolean containsNameCurso(String Curso) {\n try {\n Curso curso = (Curso) this.findByNameCurso(Curso);\n if(Curso.equals(curso.getNombre())){\n return true;\n } ;\n } catch (Exception ex) {\n //Exception Handler\n }\n return false;\n }", "@Test\r\n public void testCaso3_1() {\r\n System.out.println(\"Caso 3.1: Datos de entrada: cadena de 5 caracteres. Resultado esperado (Salida): La\\n\" +\r\n\"aplicación no permite el ingreso del dato y muestra un mensaje de error. \\n\");\r\n Ejercicio1 instance = new Ejercicio1();\r\n String expResult = \"Cadena incorrecta. La longuitud de la cadena es < 6\";\r\n String result = instance.IntroducirCadena(\"cinco\");\r\n assertEquals(expResult, result);\r\n }", "public String getNombreCompleto();", "public void setNombre(String nombre) {\r\n\t\tthis.nombre = nombre;\r\n\t}", "public void setNombre(String nombre) {\r\n\t\tthis.nombre = nombre;\r\n\t}", "public void setNombre(String nombre) {\r\n\t\tthis.nombre = nombre;\r\n\t}", "@Test\n\tpublic void testDarApellido()\n\t{\n\t\tassertEquals(\"El apellido esperado es Romero.\", \"Romero\", paciente.darApellido());\n\t}", "@Test\n public void testPartieFinie() {\n Joueur NORD = new Joueur(\"NORD\");\n assertFalse(Regles.partieFinie(NORD));\n NORD.jeu.clear();\n for (int i = 0; i < NORD.getNbPioche();) {\n NORD.piocherCarte();\n NORD.jeu.clear();\n }\n assertTrue(Regles.partieFinie(NORD));\n }", "private boolean verifSalon(String name, String nbJoueurs){\n boolean result=true;\n if(!(name.length()>0 && nbJoueurs.length()>0 && nbJoueurs.matches(\"[3-9]|10\"))) result=false;\n return result;\n }", "public java.lang.String getNombre()\r\n {\r\n return this.nombre;\r\n }", "public String getNombre() {\n\t\treturn this.nombre;\n\t}", "@Test\n public void obtenerTipoRespuesta_NB(){\n NumberBoxRecrea nbRecrea=new NumberBoxRecrea();\n String texto=Util.RESPUESTA_TIPO_NUMERO;\n assertEquals(texto,contCons.ObtenerTipoRespuesta(nbRecrea));\n }", "@Test\n public void nao_deve_aceitar_descricao_vazia() {\n telefone.setDescricao(EMPTY);\n assertFalse(isValid(telefone, \"A descrição não pode ser nula ou vazia.\", Find.class));\n }", "@Test\r\n public void testGetNombreDepto() {\r\n System.out.println(\"getNombreDepto\");\r\n Departamento instance = new Departamento();\r\n String expResult = null;\r\n String result = instance.getNombreDepto();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n public void testGetName() {\n Coctail instance = new Coctail(\"Sex on the beach\", \n new Ingredient[]{new Ingredient(\"Vodka\"), new Ingredient(\"Narancslé\"),\n new Ingredient(\"Áfonyalé\"), new Ingredient(\"Baracklikőr\")});\n String expResult = \"Sex on the beach\";\n String result = instance.getName();\n assertEquals(expResult, result);\n }", "private boolean verificaDados() {\n if (!txtNome.getText().equals(\"\") && !txtProprietario.getText().equals(\"\")) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"Falta campos a ser preenchido\", \"Informação\", 2);\n return false;\n }\n }", "public void setNombre(String nombre) {\n\t\tthis.nombre = nombre;\n\t}", "public void setNombre(String nombre) {\n\t\tthis.nombre = nombre;\n\t}", "public void setNombre(String nombre) {\n\t\tthis.nombre = nombre;\n\t}", "public void setNombre(String nombre) {\n\t\tthis.nombre = nombre;\n\t}" ]
[ "0.7426499", "0.70815796", "0.6884864", "0.68585324", "0.67618114", "0.67568594", "0.6713444", "0.669975", "0.66891664", "0.6672074", "0.65319246", "0.6524987", "0.64476216", "0.6408214", "0.6379629", "0.63521695", "0.63331646", "0.6321231", "0.63210356", "0.63099253", "0.62331164", "0.6178733", "0.61726326", "0.61726", "0.6145958", "0.61194307", "0.6094153", "0.6062846", "0.60393625", "0.60159254", "0.60139525", "0.59967893", "0.59913313", "0.59894806", "0.59413207", "0.59413207", "0.59413207", "0.5938594", "0.59335274", "0.5932411", "0.5929486", "0.5929121", "0.5925047", "0.5924261", "0.5918253", "0.5909398", "0.5905443", "0.5903199", "0.5899231", "0.5892034", "0.5890234", "0.5889191", "0.58818", "0.58799773", "0.58752126", "0.5859823", "0.5856475", "0.58403474", "0.5836467", "0.5832475", "0.5823024", "0.5823024", "0.5823024", "0.5823024", "0.5823024", "0.5823024", "0.5823024", "0.5823024", "0.5823024", "0.5823024", "0.5823024", "0.5823024", "0.5818894", "0.5818894", "0.5818894", "0.5818691", "0.5814827", "0.5810515", "0.58076173", "0.5796714", "0.5792475", "0.578681", "0.57828665", "0.5777673", "0.5777673", "0.5777673", "0.5771495", "0.57682055", "0.576116", "0.57585275", "0.57578343", "0.5757821", "0.5756077", "0.57531434", "0.5744913", "0.57391137", "0.57371837", "0.57371837", "0.57371837", "0.57371837" ]
0.8093563
0
Test of isApellido_Paterno method, of class Entradas.
@Test public void testIsApellido_Paterno() { System.out.println("isApellido_Paterno"); String AP = "ulfric"; Entradas instance = new Entradas(); boolean expResult = false; boolean result = instance.isApellido_Paterno(AP); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testDarApellido()\n\t{\n\t\tassertEquals(\"El apellido esperado es Romero.\", \"Romero\", paciente.darApellido());\n\t}", "@Test\n public void testIsApellido_Materno() {\n System.out.println(\"isApellido_Materno\");\n String AM = \"Proud\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Materno(AM);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n\n }", "@Test\n\tpublic void testLecturaNombre() {\n\t\tassertTrue(!esquemaReal.getNombrePatron().equals(\"\"));\n\t}", "public void setApellidoPaterno(String apellidoPaterno);", "@Test\r\n public void testGetApellido() {\r\n System.out.println(\"getApellido\");\r\n Usuario instance = new Usuario();\r\n String expResult = null;\r\n String result = instance.getApellido();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n public void testIsTelefono() {\n System.out.println(\"isTelefono\");\n int tel = 123456789;\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isTelefono(tel);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public void setApellidos(String p) { this.apellidos = p; }", "@AutoEscape\n\tpublic String getApellidoPaterno();", "@Test\n public void nao_deve_aceitar_descricao_com_a_primeira_letra_minuscula() {\n telefone.setDescricao(\"celular empresarial.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "public void setApellidos(String apellidos) { this.apellidos = apellidos; }", "@Test\n public void practicaTDDPasswordValidarMayusculas() {\n boolean respuesta = ValidadorPassword.validar(\"AA\");\n Assert.assertFalse(respuesta);\n }", "@Test\n public void testIsNombre() {\n System.out.println(\"isNombre\");\n String Nom = \"Alfred\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isNombre(Nom);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void testDarNombre()\n\t{\n\t\tassertEquals(\"El nombre esperado es Germán.\", \"Germán\", paciente.darNombre());\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_caracteres_especiais() {\n telefone.setDescricao(\"celular empresarial: (11)9####-####.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "public boolean asignarPaternidad(String Padre,String Hijo){\r\n return grafo2.nuevaPokeArista(\"\", Padre, Hijo, 0);\r\n }", "private boolean verificaDados() {\n if (!txtNome.getText().equals(\"\") && !txtProprietario.getText().equals(\"\")) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"Falta campos a ser preenchido\", \"Informação\", 2);\n return false;\n }\n }", "public static boolean testDaoLirePraticien() {\n boolean ok = true; \n ArrayList<Praticien> lesPraticiens = new ArrayList<Praticien>();\n try {\n lesPraticiens = daoPraticien.getAll();\n } catch (Exception ex) {\n ok = false;\n }\n System.out.println(\"liste des praticiens\");\n for (Praticien unPraticien: lesPraticiens){\n System.out.println(unPraticien);\n }\n return ok;\n \n }", "public void setApellidos(String apellidos){\n if(apellidos == null){\n throw new IllegalArgumentException(\"Apellidos de usuario igual a null\");\n }\n this.apellidos = apellidos;\n }", "public void testModifierUtilisateur() {\n System.out.println(\"modifierUtilisateur\");\n Utilisateur putilisateur = null;\n boolean expResult = false;\n boolean result = Utilisateur.modifierUtilisateur(putilisateur);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void deve_aceitar_descricao_entre_15_e_30_caracteres_valido() {\n telefone.setDescricao(random(20, true, false));\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }", "@Test\n public void nao_deve_aceitar_descricao_com_mais_de_30_caracteres() {\n telefone.setDescricao(random(35, true, false));\n assertFalse(isValid(telefone, \"A descrição não pode ter menos de 15 e mais de 30 caracteres.\", Find.class));\n }", "@Test\n public void testNuevaLr() {\n System.out.println(\"nuevaLr\");\n Alimento a = new Alimento(\"nom1\", \"inst1\", \"tempC1\");\n String uMedida = \"u1\";\n float cantidad = 3.0F;\n Receta instance = new Receta();\n boolean expResult = true;\n boolean result = instance.nuevaLr(a, uMedida, cantidad);\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testDarEdad()\n\t{\n\t\tassertEquals(\"La edad esperada es 22.\", 22, paciente.darEdad());\n\t}", "@Test\r\n @Ignore\r\n public void testFindPaciente() {\r\n System.out.println(\"findPaciente\");\r\n String termo = \"\";\r\n EnfermeiroDaoImpl instance = new EnfermeiroDaoImpl();\r\n List<Enfermeiro> expResult = null;\r\n List<Enfermeiro> result = instance.findPaciente(termo);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\tpublic void testResponderEjercicio4(){\n\t\tAlumno oscar = Alumno.CreaAlumno(\"2\", \"Oscar\", \"Password\", \"[email protected]\");\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(1));\n\t\tassertFalse(ej1.responderEjercicio(oscar, array));\n\t\tassertTrue(oscar.getEstadisticas().isEmpty());\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_menos_de_15_caracteres() {\n telefone.setDescricao(random(35, true, false));\n assertFalse(isValid(telefone, \"A descrição não pode ter menos de 15 e mais de 30 caracteres.\", Find.class));\n }", "@Test\n public void deve_aceitar_descricao_valida() {\n telefone.setDescricao(\"Celular pessoal.\");\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }", "public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Entrou PEsquisar ====\");\n\t\tSystem.out.println(listaProfissional);\n\n\t}", "@Test\n\tpublic void testRespondible3(){\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(20));\n\t\tassertFalse(ej1.sePuedeResponder());\n\t}", "public void setApellido(String apellido) {\n\t\tthis.apellido = apellido;\n\t}", "public boolean esmenor(){\n //este metodo no aplica en la resolución del caso de uso planteado\n //sólo sirve para determinar si el participante es menor de edad para \n //poner como obligatorio el campo nombreTutor de acuerdo a las reglas\n //del negocio.\n return false;\n }", "@Test\n public void publicadorPreguntaEnPublicacionAPostulante() {\n Mensaje mp = new Mensaje();\n mp.setPublicacionId(7);\n mp.setPregunta(\"Tenes jardin?\");\n mp.setUsuarioPreguntaId(usuario.getId());\n mp.setUsuarioRespuestaId(3);\n mp.guardarPregunta(usuario.getToken());\n assertTrue(mp.getId() > 0);\n\n }", "public void setApellido(java.lang.String apellido) {\n this.apellido = apellido;\n }", "@Test\n\tpublic void testRespondible4(){\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(20));\n\t\tassertFalse(ej1.sePuedeResponder());\n\t}", "public boolean validarIngresosUsuario_proveedor(JTextField proveedorTF, JTextField detalleTF,\n\t\t\tJTextField montoTF){\n\t\t\n\t\tif(!validarDouble(montoTF.getText())) return false;\n\t\tif(montoTF.getText().length() >30) return false;\n\t\tif(!validarInt(proveedorTF.getText())) return false;\n\t\tif(proveedorTF.getText().length() >30) return false;\n\t\tif(detalleTF.getText().equals(\"\")) return false;\n\t\tif(detalleTF.getText().length() >100) return false;\n\t\t//if(numero < 0) return false;\n\t\tif(numero_double < 0) return false;\n\t\n\t\treturn true;\n\t}", "@AssertTrue(message=\"La clave debe ser alfanumerica \")\r\n\tpublic boolean validarClave(){\r\n\t\tboolean a=StringUtils.isAlphanumeric(clave);\r\n\t\tboolean b=StringUtils.isNotBlank(clave);\r\n\t\treturn (a && b);\r\n\t}", "@Test\r\n public void testModificar() {\r\n System.out.println(\"modificar\");\r\n Integer idDepto = null;\r\n String nombreDepto = \"\";\r\n Departamento instance = new Departamento();\r\n instance.modificar(idDepto, nombreDepto);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "public boolean isPermisoAgendaPersonal() {\n for(Rolpermiso rp : LoginController.getUsuarioLogged().getRol1().getRolpermisoList()){\n if(rp.getPermiso().getDescripcion().equals(\"AAgenda\")){\n return true;\n }\n }\n return false;\n }", "public void testGetMotDePasse() {\n System.out.println(\"getMotDePasse\");\n Utilisateur instance = null;\n String expResult = \"\";\n String result = instance.getMotDePasse();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private boolean esDeMipropiedad(Casilla casilla){\n boolean encontrado = false;\n \n for(TituloPropiedad propiedad: this.propiedades){\n if(propiedad.getCasilla() == casilla){\n encontrado = true;\n break;\n }\n }\n return encontrado; \n }", "@Test\n public void testGetPersonaPaciente() {\n System.out.println(\"getPersonaPaciente\");\n Paciente instance = new Paciente();\n Persona expResult = null;\n Persona result = instance.getPersonaPaciente();\n assertEquals(expResult, result);\n\n }", "@Test\r\n public void testPartido3() throws Exception {\r\n P3.fijarEquipos(\"Barça\",\"Depor\"); \r\n P3.comenzar(); \r\n P3.tantoVisitante();\r\n P3.terminar(); \r\n assertEquals(\"Depor\",P3.ganador());\r\n }", "public boolean validarNombre() {\n\t\treturn validadores.validarLongitud(nombre, 50);\n\t}", "public void testGetPrenom() {\n System.out.println(\"getPrenom\");\n Utilisateur instance = null;\n String expResult = \"\";\n String result = instance.getPrenom();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearPeliculasTest() {\r\n\r\n\t\tpd.crearPeliculas();\r\n\t\tpd.pm.deletePersistent(pd.filmA);\r\n\t\tpd.pm.deletePersistent(pd.filmB);\r\n\t\tpd.pm.deletePersistent(pd.filmC);\r\n\t\tpd.pm.deletePersistent(pd.filmD);\r\n\r\n\t}", "@Test\n public void nao_deve_aceitar_tamanho_telefone_fixo_com_menos_de_8_numeros() {\n telefone.setTamanho(7);\n assertFalse(isValid(telefone, \"O tamanho do telefone não pode ser menor que 8.\", Find.class));\n }", "@Test\n public void quandoCriaPilhaVazia(){\n // QUANDO (PRE-CONDIÇAO) E FAÇA (EXECUÇAO DO COMPORTAMENTO):\n PilhaString pilha1 = new PilhaString();\n \n // VERIFICAR (CHECK)\n assertTrue(pilha1.isVazia()); //true\n }", "@Test\n public void nao_deve_aceitar_descricao_com_numeros() {\n telefone.setDescricao(random(10, true, true));\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "@Test\r\n public void testVerificaPossibilidade3() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "private void validarTituloPropiedad(TituloPropiedadParcelario pTituloPropiedad) throws Exception {\n\t\t// Valido valores nulos\n\t\t// if (this.getTituloPropiedad(pTituloPropiedad) != null) {\n\t\t// throw new CatastroException(0);\n\t\t// }\n\n\t\tif(pTituloPropiedad.getParcela() == null) {\n\t\t\tthrow new CatastroException(3);\n\t\t}\n\n\t\tCriterio locCriterio = Criterio.getInstance(this.entityManager, TituloPropiedad.class).add(Restriccion.IGUAL(\"parcela\", pTituloPropiedad.getParcela()))\n\t\t\t\t.add(Restriccion.NOT(Restriccion.IGUAL(\"idTituloPropiedad\", pTituloPropiedad.getIdTituloPropiedad()))).setProyeccion(Proyeccion.COUNT());\n\n\t\tif(pTituloPropiedad.getIdTituloPropiedad() != -1) {\n\t\t\tlocCriterio.add(Restriccion.NOT(Restriccion.IGUAL(\"idTituloPropiedad\", pTituloPropiedad.getIdTituloPropiedad())));\n\t\t}\n\n\t\tif(((Long) locCriterio.uniqueResult()) > 0) {\n\t\t\tthrow new CatastroException(5);\n\t\t}\n\n\t}", "@Test\r\n public void testPartido2() throws Exception { \r\n P2.fijarEquipos(\"Barça\",\"Depor\"); \r\n P2.comenzar(); \r\n P2.tantoLocal();\r\n P2.terminar(); \r\n assertEquals(\"Barça\",P2.ganador());\r\n }", "public void testColumnaDerechaLlena( )\n {\n setupEscenario1( );\n triqui.limpiarTablero( );\n triqui.marcarCasilla( 3, marcaJugador1 );\n triqui.marcarCasilla( 6, marcaJugador1 );\n triqui.marcarCasilla( 9, marcaJugador1 );\n assertTrue( triqui.columnaDerechaLlena( marcaJugador1 ) );\n assertTrue( triqui.ganoJuego( marcaJugador1 ) );\n }", "@Test\r\n public void testVerificaPossibilidade2() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\n public void nao_deve_aceitar_tamanho_telefone_fixo_com_mais_de_9_numeros() {\n telefone.setTamanho(10);\n assertFalse(isValid(telefone, \"O tamanho do telefone não pode ser maior que 9.\", Find.class));\n }", "public boolean validarCampos() {\n\t\tboolean valid = true;\n\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getNome())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getPaciente().getDataCadastro())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getSexo())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getRG())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(Util.isObjectNotNull(this.getPaciente().getRG()) && this.getPaciente().getRG() < 0) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG015\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getCPF())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isCPFValido(this.getPaciente().getCPF())) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG006\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(Util.isCPFValido(this.getPaciente().getCPF()) && isPacienteCadastrado(this.getPaciente())) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG017\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getEndereco())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getBairro())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getCidade())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getUF())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getPaciente().getDataNascimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getTelefone())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isTelefoneValido(this.getPaciente().getTelefone())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\t\n\t\treturn valid;\n\t}", "@Test\n public void testPartieFinie() {\n Joueur NORD = new Joueur(\"NORD\");\n assertFalse(Regles.partieFinie(NORD));\n NORD.jeu.clear();\n for (int i = 0; i < NORD.getNbPioche();) {\n NORD.piocherCarte();\n NORD.jeu.clear();\n }\n assertTrue(Regles.partieFinie(NORD));\n }", "public void setPrimerApellido(String primerApellido) {\n this.primerApellido = primerApellido;\n }", "@Test\n public void testModificar() {\n System.out.println(\"Edit\");\n Repositorio repo = new RepositorioImpl();\n Persona persona = new Persona();\n persona.setNombre(\"Hugo\");\n persona.setApellido(\"González\");\n persona.setNumeroDocumento(\"4475199\");\n repo.crear(persona);\n \n //recuperacion\n Persona p = (Persona) repo.buscar(persona.getId());\n \n //modificacion\n p.setNumeroDocumento(\"4475188\");\n repo.modificar(p);\n \n //test\n Persona pmod = (Persona)repo.buscar(persona.getId());\n assertEquals(pmod.getId(), p.getId());\n assertEquals(\"4475188\", pmod.getNumeroDocumento());\n }", "private boolean testeCheck(Cor cor) {\n\t\tPosicao reiPosicao = rei(cor).getPosicaoXadrez().paraPosicao();\n\t\t// Lista de pecas do oponente\n\t\tList<Peca> pecasOponente = pecasTabuleiro.stream()\n\t\t\t\t.filter(x -> ((PecaXadrez)x).getCor() == oponente(cor))\n\t\t\t\t.collect(Collectors.toList());\n\t\t// para cada peca do oponente verifica seus possiveis movimentos\n\t\tfor (Peca p : pecasOponente) {\n\t\t\tboolean[][] mat = p.movimentosPossiveis();\n\t\t\t//Se for essa posicao for verdadeiro (possivel movimento do oponente)\n\t\t\tif (mat[reiPosicao.getLin()][reiPosicao.getCol()]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean camposNumCorrectos() {\n\t\t return Utilidades.isPositiveNumber(anioText.getText().trim());\n\t}", "public String getApellido() {\n\t\treturn apellido;\n\t}", "@Test\n void cadastraEspecialidadeProfessorInvalido(){\n assertEquals(\"Campo email nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"\", \"Doutorado\", \"DSC\", \"01/01/2011\")));\n assertEquals(\"Campo formacao nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", null, \"DSC\", \"01/01/2011\")));\n assertEquals(\"Campo unidade nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", \"Doutorado\", \"\", \"01/01/2011\")));\n assertEquals(\"Campo data nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", \"Doutorado\", \"DSC\", null)));\n assertEquals(\"Formato de email invalido.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@\", \"Doutorado\", \"DSC\", \"01/05/2015\")));\n assertEquals(\"Pesquisadora nao encontrada.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email1@email\", \"Doutorado\", \"DSC\", \"01/05/2015\")));\n cadastraPesquisador();\n assertEquals(\"Pesquisador nao compativel com a especialidade.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"hunterxhunter@1998\",\"Doutorado\", \"DSC\", \"01/05/2015\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"01052015\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"2015/05/15\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"1/5/2015\")));\n }", "@Test\n\tpublic void testResponderEjercicio1(){\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(1));\n\t\tPlataforma.logout();\n\t\tPlataforma.login(Plataforma.alumnos.get(0).getNia(), Plataforma.alumnos.get(0).getPassword());\n\t\tassertTrue(ej1.responderEjercicio(nacho, array));\n\t\tassertFalse(nacho.getEstadisticas().isEmpty());\n\t}", "public static boolean verificarExistenciaPersona(Personas persona)\n {\n //Este método permite verificar si el usuario a crear es vendedor, comprador o ninguno. Validacion en el main y para el metodo que agrega los tipo de usuario\n ArrayList<Personas> personas = Personas.desserializarPersonas(\"Personas.ser\");\n for(Personas pe: personas)\n {\n if(pe.getCorreoElectronico().equals(persona.getCorreoElectronico()) && pe.getTipo().equals(pe.getTipo()) ) \n \n return true;\n }\n return false;\n }", "@Test\n public void usuarioPreguntaEnPublicacion() {\n Mensaje mp = new Mensaje();\n mp.setPublicacionId(2);\n mp.setPregunta(\"Es jugueton??\");\n mp.guardarPregunta(usuario.getToken());\n assertTrue(mp.getId() > 0);\n\n }", "public void testModifier() {\n System.out.println(\"modifier\");\n AbstractObjetAffaire instance = new AbstractObjetAffaireImpl();\n boolean expResult = false;\n boolean result = instance.modifier();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void testDarMotivoIngreso()\n\t{\n\t\tassertEquals(\"El motivo de ingreso esperado es: Accidente\", Motivo.ACCIDENTE, paciente.darMotivoIngreso());\n\t}", "public String getApellido(){\n\t\treturn apellido;\n\t}", "@Test\r\n public void testSetApellido() {\r\n System.out.println(\"setApellido\");\r\n String apellido = \"\";\r\n Usuario instance = new Usuario();\r\n instance.setApellido(apellido);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n\tpublic void testRespondible1(){\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(2));\n\t\tassertTrue(ej1.sePuedeResponder());\n\t}", "@Test\r\n\tpublic void CT03ConsultarLivroComRaNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comRA_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"RA inválido\", e.getMessage());\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testIsPatientEligible() {\r\n\t\tAssert.assertTrue(oic.isPatientEligible(\"1\"));\r\n\t\tAssert.assertFalse(oic.isPatientEligible(\"2\"));\r\n\t\t\r\n\t\tAssert.assertFalse(oic.isPatientEligible(\"ab\"));\r\n\t\tAssert.assertFalse(oic.isPatientEligible(\"1.2\"));\r\n\t\t\r\n\t\tAssert.assertFalse(oic.isPatientEligible(\"510\"));\r\n\t}", "public boolean entradaValida(String parametro, String entrada) {\n\t\tString expresion = expresiones(parametro);\n\t\tBoolean todoBien = true;\n\t\tPattern pattern;\n\t\tMatcher matcher;\n\t\tpattern = Pattern.compile(expresion);\n\t\tmatcher = pattern.matcher(entrada);\n\t\tif (!matcher.matches()) {\n\t\t\ttodoBien = false;\n\t\t} else {\n\t\t\ttodoBien = true;\n\t\t}\n\t\treturn todoBien;\n\t}", "public String getApellido(){\n return this.apellido;\n }", "@Test\r\n public void testModificar() {\r\n System.out.println(\"modificar\");\r\n Integer idUsuario = null;\r\n String nombre = \"\";\r\n String apellido = \"\";\r\n String usuario = \"\";\r\n String genero = \"\";\r\n String contrasenia = \"\";\r\n String direccion = \"\";\r\n Usuario instance = new Usuario();\r\n instance.modificar(idUsuario, nombre, apellido, usuario, genero, contrasenia, direccion);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\r\n public void testVerificaPossibilidade4() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public static boolean verificarLetras(String cadeia) {\n\t\tfor (int i = 0; i < cadeia.length(); i++) {\n\t\t\tif (Character.isDigit(cadeia.charAt(i))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test\r\n public void testPartido1() throws Exception {\r\n /* \r\n * En el estado EN_ESPERA\r\n */\r\n assertEquals( \"Ubicación: Camp Nou\" \r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido está en espera, aún no se han concretado los equipos\"\r\n , P1.datos());\r\n /* \r\n * En el estado NO_JUGADO\r\n */\r\n P1.fijarEquipos(\"Barça\",\"Depor\"); \r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido aún no se ha jugado\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nEquipo visitante: Depor\" \r\n , P1.datos()\r\n );\r\n /* \r\n * En el estado EN_JUEGO\r\n */\r\n P1.comenzar(); \r\n P1.tantoLocal();\r\n P1.tantoVisitante();\r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido está en juego\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nTantos locales: 1\"\r\n + \"\\nEquipo visitante: Depor\"\r\n + \"\\nTantos visitantes: 1\"\r\n , P1.datos()\r\n );\r\n /* \r\n * En el estado FINALIZADO\r\n */\r\n P1.terminar(); \r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido ha finalizado\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nTantos locales: 1\"\r\n + \"\\nEquipo visitante: Depor\"\r\n + \"\\nTantos visitantes: 1\"\r\n , P1.datos()\r\n );\r\n assertEquals(\"Empate\",P1.ganador());\r\n }", "public boolean validarIngresosUsuario_interno(JTextField motivoTF, JTextField detalleTF,\n\t\t\tJTextField montoTF){\n\t\t\n\t\tif(!validarDouble(montoTF.getText())) return false;\n\t\tif(montoTF.getText().length() >30) return false;\n\t\tif(!validarInt(motivoTF.getText())) return false;\n\t\tif(motivoTF.getText().length() >30) return false;\n\t\tif(detalleTF.getText().equals(\"\")) return false;\n\t\tif(detalleTF.getText().length() >100) return false;\n\t\t//if(numero < 0) return false;\n\t\tif(numero_double < 0) return false;\n\t\n\t\treturn true;\n\t}", "boolean puedoHipotecar(Casilla casilla){\n //Para poder hipotecar la casilla tiene que ser propiedad del jugador.\n return this.esDeMipropiedad(casilla);\n }", "public void testCorrectPassword() {\n Password p = new Password(\"jesus\".toCharArray());\n assertTrue(p.checkPassword(\"jesus\".toCharArray()));\n }", "public boolean validadorDeCedula(String cedula) {\n boolean cedulaCorrecta = false;\n\n try {\n\n if (cedula.length() == 10) // ConstantesApp.LongitudCedula\n {\n int tercerDigito = Integer.parseInt(cedula.substring(2, 3));\n if (tercerDigito < 6) {\n // Coeficientes de validación cédula\n // El decimo digito se lo considera dígito verificador\n int[] coefValCedula = {2, 1, 2, 1, 2, 1, 2, 1, 2};\n int verificador = Integer.parseInt(cedula.substring(9, 10));\n int suma = 0;\n int digito = 0;\n for (int i = 0; i < (cedula.length() - 1); i++) {\n digito = Integer.parseInt(cedula.substring(i, i + 1)) * coefValCedula[i];\n suma += ((digito % 10) + (digito / 10));\n }\n\n if ((suma % 10 == 0) && (suma % 10 == verificador)) {\n cedulaCorrecta = true;\n } else if ((10 - (suma % 10)) == verificador) {\n cedulaCorrecta = true;\n } else {\n cedulaCorrecta = false;\n }\n } else {\n cedulaCorrecta = false;\n }\n } else {\n cedulaCorrecta = false;\n }\n } catch (NumberFormatException nfe) {\n cedulaCorrecta = false;\n } catch (Exception err) {\n System.out.println(\"Una excepcion ocurrio en el proceso de validadcion\");\n cedulaCorrecta = false;\n }\n\n if (!cedulaCorrecta) {\n System.out.println(\"La Cédula ingresada es Incorrecta\");\n }\n return cedulaCorrecta;\n }", "@Test\n public void nao_deve_aceitar_descricao_nula() {\n telefone.setDescricao(null);\n assertFalse(isValid(telefone, \"A descrição não pode ser nula ou vazia.\", Find.class));\n }", "@Override\n\tpublic List<Empregado> pesquisar(String palavraChave) {\n\t\treturn empregadoRepository.pesquisar(palavraChave);\n\t}", "@Test\n\tpublic void testAdicionaDisciplinaAoTutor() {\n\t\t\n\t\ttutorUm.adicionarDisciplina(\"Teoria dos Grafos\", 5);\n\t\n\t}", "private static boolean VerificaPalavra(String palavra, Character[] alf) {\r\n\t\tint cont = 0;\r\n\t\tfor (int x = 0; x < palavra.length(); x++) {\r\n\t\t\tCharacter caracPalavra = palavra.charAt(x);\r\n\t\t\tfor (int y = 0; y < alf.length; y++) {\r\n\t\t\t\tif (caracPalavra.equals(alf[y])) {\r\n\t\t\t\t\tcont++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (cont == palavra.length()) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\t\"A palavra \\\"\" + palavra\r\n\t\t\t\t\t\t\t+ \"\\\" contém simbolos não pertencentes ao conjunto de simbolos (alfabeto,Σ= \"\r\n\t\t\t\t\t\t\t+ alfabetoImprime + \")!\",\r\n\t\t\t\t\t\"WARNING\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean verificarNombre(String nombreEtiqueta){\n for(int i = 0;i < this.listaEtiquetas.size();i++){\n if(this.listaEtiquetas.get(i).getEtiqueta().equals(nombreEtiqueta)){ //Si existe el nombre en la lista de etiquetas\n return true;\n }\n }\n return false;\n }", "@Test\n\tpublic void testResponderEjercicio3(){\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(20));\n\t\tassertFalse(ej1.responderEjercicio(nacho, array));\n\t\tassertTrue(nacho.getEstadisticas().isEmpty());\n\t}", "@Test\n\tpublic void testResponderEjercicio6(){\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(1));\n\t\tPlataforma.logout();\n\t\tPlataforma.login(Plataforma.alumnos.get(0).getNia(), Plataforma.alumnos.get(0).getPassword());\n\t\tassertTrue(ej1.responderEjercicio(nacho, array));\n\t\tassertFalse(ej1.responderEjercicio(nacho, array));\n\t}", "@Test\r\n public void testVerificaPossibilidade() {\r\n usucapiao.setAnimusDomini(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "private boolean jaTemDono(int posicao) {\n String nomeDono = Donos.get(posicao).toString();\n return (this.isUmJogador(nomeDono));\n\n }", "@Test\r\n\tpublic void CT05ConsultarLivroComNomeNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNome_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome inválido\", e.getMessage());\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean aceitaPalavra(String palavra) throws EntradaIndefinidaException {\n\t\treturn false;\n\t}", "public static boolean testDaoLireLabo() {\n boolean ok = true;\n ArrayList<Labo> lesLabo = new ArrayList<Labo>();\n try {\n lesLabo = daoLabo.getAll();\n } catch (Exception ex) {\n ok = false;\n }\n System.out.println(\"liste des labos\");\n for (Labo unLabo: lesLabo){\n System.out.println(unLabo);\n }\n return ok;\n }", "private boolean checkMaPhieuTT(String maPTT){\n String pattern = \"PTT\\\\d+\";\n return maPTT.matches(pattern);\n }", "@Test\n public void testIsValidFullName() {\n System.out.println(\"isValidFullName\");\n String fullName = \"Aliki Manou\";\n boolean expResult = true;\n boolean result = ValidVariables.isValidFullName(fullName);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testVerificaPossibilidade7() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n usucapiao.setBemComumCasal(true);\r\n usucapiao.setCompanheiroAbandonou(true);\r\n usucapiao.setRegistroDeOutroImovel(true);\r\n usucapiao.setTamanhoTerreno(251);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\n\tpublic void testActualizaEmp() {\n\n\t\tboolean valor = serv.actualizaEmp(empl, \"tel\", \"55677354\");\n\t\tassertEquals(\"Se esperaba un false\",valor, true);\n\t}", "@Override\n\tpublic boolean preModify() {\n\t\tif(!cuentaPapaCorrecta(instance)) {\n\t\t\tFacesMessages.instance().add(\n\t\t\t\t\tsainv_messages.get(\"cuentac_error_ctapdrno\"));\n\t\t\treturn false;\n\t\t}\n\t\tif(!cuentaEsUnica()) {\n\t\t\tFacesMessages.instance().add(\n\t\t\t\t\tsainv_messages.get(\"cuentac_error_ctaexis\"));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "@Test\n public void testDelecaoTelefones() {\n System.out.println(\"delecaoTelefones\");\n String idPessoa = \"\";\n AdministradorDAO instance = new AdministradorDAO();\n instance.delecaoTelefones(idPessoa);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }" ]
[ "0.68822724", "0.6828749", "0.67537993", "0.6713468", "0.625542", "0.6180176", "0.61630195", "0.6161732", "0.60451365", "0.6015332", "0.60152924", "0.5990691", "0.5976951", "0.58884597", "0.5860053", "0.5858057", "0.58353674", "0.583018", "0.5827894", "0.5808816", "0.57800347", "0.57706124", "0.5758213", "0.5727491", "0.57180166", "0.57059103", "0.5699442", "0.5698608", "0.5692867", "0.5682814", "0.5678989", "0.5648665", "0.5645683", "0.5640097", "0.5634847", "0.56138533", "0.56034374", "0.55992913", "0.5597738", "0.55918694", "0.5590024", "0.55888397", "0.55692166", "0.55682606", "0.55658346", "0.55389875", "0.55332017", "0.55284375", "0.5527762", "0.5520531", "0.55205226", "0.5518836", "0.5513103", "0.54979414", "0.5494542", "0.54902285", "0.5485389", "0.5484618", "0.54842246", "0.5483383", "0.54800063", "0.54780346", "0.5476254", "0.54754317", "0.5466225", "0.5442579", "0.54408634", "0.5438539", "0.54362196", "0.5431965", "0.5431322", "0.54240966", "0.5419877", "0.5413034", "0.54035515", "0.5397437", "0.5391431", "0.53896105", "0.5388176", "0.5386378", "0.5384105", "0.5382334", "0.5379242", "0.53727514", "0.5372485", "0.5371758", "0.537136", "0.53679276", "0.5366305", "0.53629786", "0.5355431", "0.53509784", "0.5350173", "0.5346552", "0.53430426", "0.5342933", "0.53370124", "0.53296095", "0.53278756", "0.5326549" ]
0.77244335
0
Test of isApellido_Materno method, of class Entradas.
@Test public void testIsApellido_Materno() { System.out.println("isApellido_Materno"); String AM = "Proud"; Entradas instance = new Entradas(); boolean expResult = false; boolean result = instance.isApellido_Materno(AM); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testIsApellido_Paterno() {\n System.out.println(\"isApellido_Paterno\");\n String AP = \"ulfric\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Paterno(AP);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void testLecturaNombre() {\n\t\tassertTrue(!esquemaReal.getNombrePatron().equals(\"\"));\n\t}", "public void setApellidoMaterno(String apellidoMaterno);", "@Test\n\tpublic void testAjouterMatiere() {\n\t\tf.ajouterMatiere(\"Mathématiques\", 5);\n\t\tf.ajouterMatiere(\"Français\", 3);\n\t\tf.ajouterMatiere(\"Mathématiques\", 3);\n\t\t\n\t\tassertEquals(\"La liste de matiere devrait contenir 2 éléments\", 2, f.getMatiere().size());\n\t\tassertTrue(\"La liste de matiere devrait contenir les mathématiques\", f.getMatiere().containsKey(\"Mathématiques\"));\n\t\tassertTrue(\"La liste de matiere devrait contenir le français\", f.getMatiere().containsKey(\"Français\"));\n\t\tassertEquals(\"La liste de matiere devrait contenir le coeff de 3 pour les mathématiques\", 3, f.getMatiere().get(\"Mathématiques\"), 5);\n\t\tassertEquals(\"La liste de matiere devrait contenir le coeff de 3 pour le français\", 3, f.getMatiere().get(\"Français\"), 5);\n\t}", "@Test\n public void testNuevaLr() {\n System.out.println(\"nuevaLr\");\n Alimento a = new Alimento(\"nom1\", \"inst1\", \"tempC1\");\n String uMedida = \"u1\";\n float cantidad = 3.0F;\n Receta instance = new Receta();\n boolean expResult = true;\n boolean result = instance.nuevaLr(a, uMedida, cantidad);\n assertEquals(expResult, result);\n }", "@AutoEscape\n\tpublic String getApellidoMaterno();", "@Test\n public void nao_deve_aceitar_descricao_com_menos_de_15_caracteres() {\n telefone.setDescricao(random(35, true, false));\n assertFalse(isValid(telefone, \"A descrição não pode ter menos de 15 e mais de 30 caracteres.\", Find.class));\n }", "@Test\n public void testMueve()\n throws MenorQueUnoException {\n Tablero tablero4 = new Tablero(2);\n\n boolean obtenido = false;\n\n assertEquals(tablero4.mueve(3), false);\n assertEquals(tablero4.mueve(4), false);\n assertEquals(tablero4.mueve(1), true);\n\n assertEquals(tablero4.mueve(1), false);\n assertEquals(tablero4.mueve(4), false);\n assertEquals(tablero4.mueve(2), true);\n\n assertEquals(tablero4.mueve(1), false);\n assertEquals(tablero4.mueve(2), false);\n assertEquals(tablero4.mueve(3), true);\n\n assertEquals(tablero4.mueve(2), false);\n assertEquals(tablero4.mueve(3), false);\n assertEquals(tablero4.mueve(4), true);\n\n assertEquals(tablero4.mueve(2), true);\n\n }", "public void testColumnaDerechaLlena( )\n {\n setupEscenario1( );\n triqui.limpiarTablero( );\n triqui.marcarCasilla( 3, marcaJugador1 );\n triqui.marcarCasilla( 6, marcaJugador1 );\n triqui.marcarCasilla( 9, marcaJugador1 );\n assertTrue( triqui.columnaDerechaLlena( marcaJugador1 ) );\n assertTrue( triqui.ganoJuego( marcaJugador1 ) );\n }", "@Test\n\tpublic void testDarApellido()\n\t{\n\t\tassertEquals(\"El apellido esperado es Romero.\", \"Romero\", paciente.darApellido());\n\t}", "@Test\n public void testIsNombre() {\n System.out.println(\"isNombre\");\n String Nom = \"Alfred\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isNombre(Nom);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void testGetMentee() {\n\t\tassertThat(mentor.getMentees().get(0)).isEqualTo(mentee);\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_mais_de_30_caracteres() {\n telefone.setDescricao(random(35, true, false));\n assertFalse(isValid(telefone, \"A descrição não pode ter menos de 15 e mais de 30 caracteres.\", Find.class));\n }", "public void testModifier() {\n System.out.println(\"modifier\");\n AbstractObjetAffaire instance = new AbstractObjetAffaireImpl();\n boolean expResult = false;\n boolean result = instance.modifier();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testIsTelefono() {\n System.out.println(\"isTelefono\");\n int tel = 123456789;\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isTelefono(tel);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n public void nao_deve_aceitar_descricao_com_a_primeira_letra_minuscula() {\n telefone.setDescricao(\"celular empresarial.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "public void verificarMensagem(String m){\r\n\t\tboolean verificaM =\tmensagem.getText().equals(m);\r\n\t\tAssert.assertTrue(verificaM);\r\n\t\tlogPrint(\"Mensagem apareceu\");\r\n\t}", "public static boolean testDaoLireMedicament() {\n boolean ok = true;\n ArrayList<Medicament> lesMedicaments = new ArrayList<Medicament>();\n try {\n lesMedicaments = daoMedicament.getAll();\n } catch (Exception ex) {\n ok = false;\n }\n System.out.println(\"liste des medicaments\");\n for (Medicament unMedicament: lesMedicaments){\n System.out.println(unMedicament);\n }\n return ok;\n }", "public void testFilaMediaLlena( )\n {\n setupEscenario3( );\n triqui.limpiarTablero( );\n triqui.marcarCasilla( 4, marcaJugador1 );\n triqui.marcarCasilla( 5, marcaJugador1 );\n triqui.marcarCasilla( 6, marcaJugador1 );\n assertTrue( triqui.filaMediaLlena( marcaJugador1 ) );\n assertTrue( triqui.ganoJuego( marcaJugador1 ) );\n }", "@Test\n public void testIsMonto() {\n System.out.println(\"isMonto\");\n int money = 1000000;\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isMonto(money);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Override\n\tpublic boolean verificarMensaje(String mensaje) {\n\t\tboolean reenvio = false;\n\t\tSystem.out.println(mensaje.length());\n\t\tSystem.out.println(\"Mensaje recibido: \"+ mensaje);\n\t\tString lectura = mensaje.substring(0, 12);\n\t\tSystem.out.println(\"Inicio de trama: \"+lectura);\n\t\tif (lectura.equals(inicioTrama)) {\n\t\t\tlectura = mensaje.substring(12, 14);\n\t\t\tSystem.out.println(\"Tpo de trama: \"+lectura);\n\t\t\tif (lectura.equals(\"01\")) {\n\t\t\t\treenvio = tipoTrama01(mensaje);\n\t\t\t}\n\t\t}\n\t\treturn reenvio;\n\t}", "@Test\n public void deve_aceitar_descricao_entre_15_e_30_caracteres_valido() {\n telefone.setDescricao(random(20, true, false));\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }", "@Test\n public void testGetMatricula() {\n System.out.println(\"getMatricula\");\n Usuario instance = null;\n String expResult = \"\";\n String result = instance.getMatricula();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void testaGetMensagem() {\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 1 eh avaliada com 5 minitestes, eliminando 1 dos mais baixos.\",\n\t\t\t\tminitElimBai_1.getMensagem());\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 2 eh avaliada com 10 minitestes, eliminando 2 dos mais baixos.\",\n\t\t\t\tminitElimBai_2.getMensagem());\n\t}", "@Test\n\tpublic void testLecturaFrom(){\n\t\tassertEquals(esquemaEsperado.getExpresionesFrom().toString(), esquemaReal.getExpresionesFrom().toString());\n\t}", "private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }", "public static boolean checkLineLength(String matrice){\r\n String[] lignes = matrice.trim().split(\" {1,}\");\r\n int longeur = lignes[0].length();\r\n int i = 1;\r\n boolean memeLongeur = true;\r\n while(i < lignes.length && memeLongeur){\r\n memeLongeur = (longeur == lignes[i].length());\r\n ++i;\r\n }\r\n\r\n if(! memeLongeur){\r\n System.out.println(\"Matrice invalide, lignes de longueurs differentes !\");\r\n }\r\n\r\n return memeLongeur;\r\n }", "@Test\r\n public void testCaso3_1() {\r\n System.out.println(\"Caso 3.1: Datos de entrada: cadena de 5 caracteres. Resultado esperado (Salida): La\\n\" +\r\n\"aplicación no permite el ingreso del dato y muestra un mensaje de error. \\n\");\r\n Ejercicio1 instance = new Ejercicio1();\r\n String expResult = \"Cadena incorrecta. La longuitud de la cadena es < 6\";\r\n String result = instance.IntroducirCadena(\"cinco\");\r\n assertEquals(expResult, result);\r\n }", "@Test\n\tpublic void testRicercaArticolo1() {\n\t\tString ricerca = \"No\";\n\t\tArrayList<Articolo> trovati = (ArrayList<Articolo>) \n\t\t\t\tb1.ricercaArticolo(ricerca);\n\t\tassertTrue(\"La lista deve essere vuota\", trovati.isEmpty());\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_numeros() {\n telefone.setDescricao(random(10, true, true));\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "public boolean esmenor(){\n //este metodo no aplica en la resolución del caso de uso planteado\n //sólo sirve para determinar si el participante es menor de edad para \n //poner como obligatorio el campo nombreTutor de acuerdo a las reglas\n //del negocio.\n return false;\n }", "@Test\n public void nao_deve_aceitar_descricao_com_caracteres_especiais() {\n telefone.setDescricao(\"celular empresarial: (11)9####-####.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "public void testColumnaIzquierdaLlena( )\n {\n setupEscenario2( );\n triqui.limpiarTablero( );\n triqui.marcarCasilla( 1, marcaJugador1 );\n triqui.marcarCasilla( 4, marcaJugador1 );\n triqui.marcarCasilla( 7, marcaJugador1 );\n assertTrue( triqui.columnaIzquierdaLlena( marcaJugador1 ) );\n assertTrue( triqui.ganoJuego( marcaJugador1 ) );\n }", "private boolean testeCheck(Cor cor) {\n\t\tPosicao reiPosicao = rei(cor).getPosicaoXadrez().paraPosicao();\n\t\t// Lista de pecas do oponente\n\t\tList<Peca> pecasOponente = pecasTabuleiro.stream()\n\t\t\t\t.filter(x -> ((PecaXadrez)x).getCor() == oponente(cor))\n\t\t\t\t.collect(Collectors.toList());\n\t\t// para cada peca do oponente verifica seus possiveis movimentos\n\t\tfor (Peca p : pecasOponente) {\n\t\t\tboolean[][] mat = p.movimentosPossiveis();\n\t\t\t//Se for essa posicao for verdadeiro (possivel movimento do oponente)\n\t\t\tif (mat[reiPosicao.getLin()][reiPosicao.getCol()]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test\n\tpublic void testDarMotivoIngreso()\n\t{\n\t\tassertEquals(\"El motivo de ingreso esperado es: Accidente\", Motivo.ACCIDENTE, paciente.darMotivoIngreso());\n\t}", "@Test\n public void testAnalisarMes() throws Exception {\n System.out.println(\"analisarMes\");\n int[][] dadosFicheiro = null;\n int linhas = 0;\n int[] expResult = null;\n int[] result = ProjetoV1.analisarMes(dadosFicheiro, linhas);\n assertArrayEquals(expResult, result);\n\n }", "@Test\r\n\t\tpublic void testMovimientoTorreNegra0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "@Test\r\n public void testGetApellido() {\r\n System.out.println(\"getApellido\");\r\n Usuario instance = new Usuario();\r\n String expResult = null;\r\n String result = instance.getApellido();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "private boolean verificaDados() {\n if (!txtNome.getText().equals(\"\") && !txtProprietario.getText().equals(\"\")) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"Falta campos a ser preenchido\", \"Informação\", 2);\n return false;\n }\n }", "private boolean camposNumCorrectos() {\n\t\t return Utilidades.isPositiveNumber(anioText.getText().trim());\n\t}", "public boolean metti(Casella cas, int pezzo)\n { return metti(cas.riga, cas.colonna, pezzo); }", "@Test\n public void testValida() {\n System.out.println(\"valida\");\n Simulacao simulacao = new Simulacao();\n Material mat = new Material();\n mat.setCoeficienteConducao(0.5);\n mat.setCoeficienteConveccao(0.002);\n mat.setCoeficienteRadiacao(0.07);\n mat.setNome(\"Material XPTO\");\n mat.setDescricao(\"Descricao XPTO\");\n mat.setImagem(new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB));\n Sala sala = new Sala(20, 20, 20, 20, 20, 20, 20, 20, mat);\n simulacao.setSala(sala);\n\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n boolean expResult = true;\n boolean result = instance.valida();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testMaj() {\n\t\tprofesseurServiceEmp.maj(prof);\n\t}", "@AssertTrue(message=\"La clave debe ser alfanumerica \")\r\n\tpublic boolean validarClave(){\r\n\t\tboolean a=StringUtils.isAlphanumeric(clave);\r\n\t\tboolean b=StringUtils.isNotBlank(clave);\r\n\t\treturn (a && b);\r\n\t}", "boolean esMovimientoLegal(Jugada jugada) throws CeldasFueraTableroException;", "public void testModifierUtilisateur() {\n System.out.println(\"modifierUtilisateur\");\n Utilisateur putilisateur = null;\n boolean expResult = false;\n boolean result = Utilisateur.modifierUtilisateur(putilisateur);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static boolean verificaMatricolaDipendente(String matricola){\r\n\t\tif (Pattern.matches(\"[0-9]{7}\", matricola)) return true;\r\n\t\treturn false;\r\n\t}", "@Test\r\n\t\tpublic void testMovimientoTorreNegra0() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8a. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "public boolean validadorDeCedula(String cedula) {\n boolean cedulaCorrecta = false;\n\n try {\n\n if (cedula.length() == 10) // ConstantesApp.LongitudCedula\n {\n int tercerDigito = Integer.parseInt(cedula.substring(2, 3));\n if (tercerDigito < 6) {\n // Coeficientes de validación cédula\n // El decimo digito se lo considera dígito verificador\n int[] coefValCedula = {2, 1, 2, 1, 2, 1, 2, 1, 2};\n int verificador = Integer.parseInt(cedula.substring(9, 10));\n int suma = 0;\n int digito = 0;\n for (int i = 0; i < (cedula.length() - 1); i++) {\n digito = Integer.parseInt(cedula.substring(i, i + 1)) * coefValCedula[i];\n suma += ((digito % 10) + (digito / 10));\n }\n\n if ((suma % 10 == 0) && (suma % 10 == verificador)) {\n cedulaCorrecta = true;\n } else if ((10 - (suma % 10)) == verificador) {\n cedulaCorrecta = true;\n } else {\n cedulaCorrecta = false;\n }\n } else {\n cedulaCorrecta = false;\n }\n } else {\n cedulaCorrecta = false;\n }\n } catch (NumberFormatException nfe) {\n cedulaCorrecta = false;\n } catch (Exception err) {\n System.out.println(\"Una excepcion ocurrio en el proceso de validadcion\");\n cedulaCorrecta = false;\n }\n\n if (!cedulaCorrecta) {\n System.out.println(\"La Cédula ingresada es Incorrecta\");\n }\n return cedulaCorrecta;\n }", "private boolean verificarText(String text,String campo) {\n\t\tif(text.length()==0) {\n\t\t\tJOptionPane.showMessageDialog(null,\"Error \"+campo +\": campo vacio\");\n\t\t\treturn false;\n\t\t}\n\t\t//\n\t\tfor(int i =0;i<text.length();i++) {\n\t\t\tif(text.charAt(i)!=' ') {\n\t\t\t\tif((text.charAt(i)<'a' || text.charAt(i)>'z'&& (text.charAt(i)<'A' || text.charAt(i)>'Z') ) ) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Error \"+campo +\": Se ingreso un numero o caracter especial\");\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\t\n\t}", "public boolean entradaValida(String parametro, String entrada) {\n\t\tString expresion = expresiones(parametro);\n\t\tBoolean todoBien = true;\n\t\tPattern pattern;\n\t\tMatcher matcher;\n\t\tpattern = Pattern.compile(expresion);\n\t\tmatcher = pattern.matcher(entrada);\n\t\tif (!matcher.matches()) {\n\t\t\ttodoBien = false;\n\t\t} else {\n\t\t\ttodoBien = true;\n\t\t}\n\t\treturn todoBien;\n\t}", "public boolean validarIngresosUsuario_interno(JTextField motivoTF, JTextField detalleTF,\n\t\t\tJTextField montoTF){\n\t\t\n\t\tif(!validarDouble(montoTF.getText())) return false;\n\t\tif(montoTF.getText().length() >30) return false;\n\t\tif(!validarInt(motivoTF.getText())) return false;\n\t\tif(motivoTF.getText().length() >30) return false;\n\t\tif(detalleTF.getText().equals(\"\")) return false;\n\t\tif(detalleTF.getText().length() >100) return false;\n\t\t//if(numero < 0) return false;\n\t\tif(numero_double < 0) return false;\n\t\n\t\treturn true;\n\t}", "@Test\n public void usuarioPreguntaEnPublicacion() {\n Mensaje mp = new Mensaje();\n mp.setPublicacionId(2);\n mp.setPregunta(\"Es jugueton??\");\n mp.guardarPregunta(usuario.getToken());\n assertTrue(mp.getId() > 0);\n\n }", "@Test\n\tpublic void CT04UC01CadastrarLivro_com_autor_invalido() {\n\t\ttry {\n\t\t\tlivro.setAutor(\"\");\n\t\t\tfail(\"deveria lançar uma exceção\");\n\t\t} catch (RuntimeException e) {\n\t\t\tassertEquals(\"Autor invalido\", e.getMessage());\n\t\t}\n\t}", "@Test\n\tpublic void testSupprimerMatiere() {\n\t\tf.ajouterMatiere(\"Français\", 3);\n\t\tf.ajouterMatiere(\"Mathématiques\", 3);\n\t\tf.supprimerMatiere(\"Maths\");\n\t\t\n\t\tassertEquals(\"La liste de matiere devrait contenir 2 éléments\", 2, f.getMatiere().size());\n\t\tassertTrue(\"La liste de matiere devrait contenir les mathématiques\", f.getMatiere().containsKey(\"Mathématiques\"));\n\t\tassertTrue(\"La liste de matiere devrait contenir le français\", f.getMatiere().containsKey(\"Français\"));\n\t\t\n\t\tf.supprimerMatiere(\"Français\");\n\t\t\n\t\tassertEquals(\"La liste de matiere devrait contenir 1 élément\", 1, f.getMatiere().size());\n\t\tassertTrue(\"La liste de matiere devrait contenir les mathématiques\", f.getMatiere().containsKey(\"Mathématiques\"));\n\t\tassertFalse(\"La liste de matiere ne devrait pas contenir le français\", f.getMatiere().containsKey(\"Français\"));\n\t\t\n\t\tf.supprimerMatiere(\"Mathématiques\");\n\t\t\n\t\tassertEquals(\"La liste de matiere devrait contenir 0 élément\", 0, f.getMatiere().size());\n\t\tassertFalse(\"La liste de matiere ne devrait pas contenir les mathématiques\", f.getMatiere().containsKey(\"Mathématiques\"));\n\t\tassertFalse(\"La liste de matiere ne devrait pas contenir le français\", f.getMatiere().containsKey(\"Français\"));\n\t}", "@Test\n public void nao_deve_aceitar_tamanho_telefone_fixo_com_menos_de_8_numeros() {\n telefone.setTamanho(7);\n assertFalse(isValid(telefone, \"O tamanho do telefone não pode ser menor que 8.\", Find.class));\n }", "@Test\n public void testVerifyNome() {\n System.out.println(\"verifyNome\");\n boolean expResult = true;\n boolean result = uv.verifyNome(u);\n assertEquals(expResult, result);\n }", "public boolean studenteIscrittoACorso(int matricola, String nomeCorso) {\n\t\tboolean trovato=false;\n\t\tString sql = \"SELECT studente.matricola, corso.codins FROM studente, iscrizione, corso \" + \n\t\t \t \"WHERE studente.matricola=iscrizione.matricola \" + \n\t\t\t\t \"AND corso.codins=iscrizione.codins \" + \n\t\t\t\t \"AND corso.nome=? \" + \n\t\t\t\t \"AND studente.matricola=? \";\n\t\ttry {\n\t\t\tConnection conn = ConnectDB.getConnection();\n\t\t\tPreparedStatement st = conn.prepareStatement(sql);\n\t\t\tst.setString(1, nomeCorso);\n\t\t\tst.setInt(2, matricola);\n\t\t\tResultSet rs = st.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\ttrovato=true;\n\t\t\t}\n\t\t}\n\t\tcatch(SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t\n\t\treturn trovato;\n\t\t\n\t}", "public Boolean verificarCaracteres(String nome){\n\n this.resultado = false;\n Pattern pattern = Pattern.compile(\"^[a-zA-Z]*$\");\n Matcher matcher = pattern.matcher(nome);\n\n if(matcher.find()){\n this.resultado = true;\n }\n\n return this.resultado;\n }", "public boolean poistaMatkaNimella(String nimi, String kansio) {\n int pois = -1;\n for (int i = 0; i < matkat.size(); i++) {\n if (nimi.equals(matkat.get(i).getMatkanNimi())) {\n pois = i;\n }\n }\n\n if (pois != -1) {\n matkat.remove(pois);\n File poistettava = new File(kansio + \"/\" + nimi + \".txt\");\n boolean ok = poistettava.delete();\n return true;\n }\n\n return false;\n }", "@Test\n public void modifierArticleKO(){\n String nomArticle = \"short\";\n Article articleBD = daoArticle.findByNom(nomArticle); //peut renvoyer null si l'article \"Chaussons\" n'existe pas en BD \n \n Double prixHT = 6.55;\n Integer delaisAppros = 4;\n Integer delaisDeLivraisonArt =6; \n Integer quantiteStock = 25;\n Article articleAvecModifications = new Article(nomArticle, prixHT, delaisAppros, delaisDeLivraisonArt, quantiteStock); //attributs d'instance ayant @Column(nullable = false)\n articleAvecModifications.setDescription(\"très bonne qualitée\");\n articleS.modifierArticle(articleBD, articleAvecModifications);\n \n if(articleBD == null){\n System.out.println();System.out.println();System.out.println();System.out.println(\"=============================================================\");\n System.out.println(\"ARTICLE \" + nomArticle + \" N'EXISTE PAS EN BD : \" + articleBD);\n System.out.println();System.out.println();System.out.println();System.out.println(\"=============================================================\"); \n }\n }", "@Test\n @Disabled\n public void testValidateMatriculaCoche() {\n assertFalse(RegExprMain.validateMatriculaCoche(\"543 JTD\"));\n assertTrue(RegExprMain.validateMatriculaCoche(\"5432 JTD\"));\n assertFalse(RegExprMain.validateMatriculaCoche(\"5433 JAD\"));\n assertFalse(RegExprMain.validateMatriculaCoche(\"54333 JTD\"));\n assertTrue(RegExprMain.validateMatriculaCoche(\"5432 JTD\"));\n assertTrue(RegExprMain.validateMatriculaCoche(\"6784 CLD\"));\n assertTrue(RegExprMain.validateMatriculaCoche(\"4563 BVB\"));\n assertTrue(RegExprMain.validateMatriculaCoche(\"6789 LMN\"));\n assertTrue(RegExprMain.validateMatriculaCoche(\"2435 JKD\"));\n assertTrue(RegExprMain.validateMatriculaCoche(\"4567 GJD\"));\n \n\n }", "@Test\n public void testExecutarAcao() {\n try {\n SBCore.configurar(new ConfiguradorCoreShortMessageService(), SBCore.ESTADO_APP.DESENVOLVIMENTO);\n ItfResposta resposta = FabIntegracaoSMS.ENVIAR_MENSAGEM.getAcao(\"+5531971125577\", \"Teste\").getResposta();\n Assert.notNull(resposta, \"A resposta foi nula\");\n\n if (!resposta.isSucesso()) {\n resposta.dispararMensagens();\n }\n Assert.isTrue(resposta.isSucesso(), \"Falha enviando SMS\");\n\n } catch (Throwable t) {\n SBCore.RelatarErro(FabErro.SOLICITAR_REPARO, \"Erro \" + t.getMessage(), t);\n }\n }", "boolean hasMent();", "@Test\n public void testModificarCamion() {\n try {\n System.out.println(\"modificarCamion\");\n Camion camion = new Camion(6, \"ABC-000\", \"MODELO PRUEBA\", \"COLOR PRUEBA\", \"ESTADO PRUEBA\", 999, 1);\n ControlCamion instance = new ControlCamion();\n boolean expResult = true;\n boolean result = instance.modificarCamion(camion);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n } catch (IOException ex) {\n System.out.println(ex.getMessage());\n }\n }", "@Test\n\tpublic void testResponderEjercicio4(){\n\t\tAlumno oscar = Alumno.CreaAlumno(\"2\", \"Oscar\", \"Password\", \"[email protected]\");\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(1));\n\t\tassertFalse(ej1.responderEjercicio(oscar, array));\n\t\tassertTrue(oscar.getEstadisticas().isEmpty());\n\t}", "@Test\n public void quandoCriaPilhaVazia(){\n // QUANDO (PRE-CONDIÇAO) E FAÇA (EXECUÇAO DO COMPORTAMENTO):\n PilhaString pilha1 = new PilhaString();\n \n // VERIFICAR (CHECK)\n assertTrue(pilha1.isVazia()); //true\n }", "public static boolean verificarLetras(String cadeia) {\n\t\tfor (int i = 0; i < cadeia.length(); i++) {\n\t\t\tif (Character.isDigit(cadeia.charAt(i))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private Boolean esMejor() {\n if(debug) {\n System.out.println(\"**********************esMejor\");\n }\n \n if(this.solOptima == null || (this.sol.pesoEmparejamiento < this.solOptima.pesoEmparejamiento)) return true;\n else return false;\n }", "@Test\n public void deve_aceitar_descricao_valida() {\n telefone.setDescricao(\"Celular pessoal.\");\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }", "@Test\n\tpublic void testMonto1() {\n\n\t\tSystem.out.println(\" la cantidad introducida es menor de 1\"\n\t\t\t\t+ \"monto1: equivalencia: si el monto es menor de 1,ahora 0, el mensaje seria:\\n\");\n\t\tint cantidad = 0;\n\n\t\tString expResult = \"Error: La cantidad introducida es menor de 1\";\n\t\tString result = instance.ingreso(cantidad);\n\t\tassertEquals(expResult, result);\n\n\t}", "@Test\n\tpublic void testActualizaEmp() {\n\n\t\tboolean valor = serv.actualizaEmp(empl, \"tel\", \"55677354\");\n\t\tassertEquals(\"Se esperaba un false\",valor, true);\n\t}", "public void verificarMatriculado() {\r\n\t\ttry {\r\n\t\t\tif (periodo == null)\r\n\t\t\t\tMensaje.crearMensajeERROR(\"ERROR AL BUSCAR PERIODO HABILITADO\");\r\n\t\t\telse {\r\n\t\t\t\tif (mngRes.buscarNegadoPeriodo(getDniEstudiante(), periodo.getPrdId()))\r\n\t\t\t\t\tMensaje.crearMensajeWARN(\r\n\t\t\t\t\t\t\t\"Usted no puede realizar una reserva. Para más información diríjase a las oficinas de Bienestar Estudiantil.\");\r\n\t\t\t\telse {\r\n\t\t\t\t\testudiante = mngRes.buscarMatriculadoPeriodo(getDniEstudiante(), periodo.getPrdId());\r\n\t\t\t\t\tif (estudiante == null) {\r\n\t\t\t\t\t\tMensaje.crearMensajeWARN(\r\n\t\t\t\t\t\t\t\t\"Usted no esta registrado. Para más información diríjase a las oficinas de Bienestar Universitario.\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmngRes.generarEnviarToken(getEstudiante());\r\n\t\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('dlgtoken').show();\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tMensaje.crearMensajeERROR(\"Error verificar matrícula: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public boolean asignarMascota(Perro perro){\n boolean bandera = false;\n Persona[] miembros_familia;\n familia_asignada = \"\";\n\n while (!bandera){\n //Recorrer todo el arreglo de Familia\n for (int i = 0; i <= numero_familias; i++){\n //Obtener los miembros de la familia actual \n miembros_familia = familias[i].getMiembros();\n\n //Recorrer cada miembro del arreglo de Persona\n for (int j = 0; j < miembros_familia.length; j++){ \n //Obtener edad del miembro\n int edad = miembros_familia[j].getEdad();\n\n //Verificar si el miembro al que se analiza puede tener la mascota y si esa familia puede tener perro\n if(verificarMascota(perro, edad)){\n if (familias[i].getNumeroMascotas() < 4){\n bandera = true;\n familias[i].setNumeroMascotas();\n familia_asignada = familias[i].getApellido();\n j = miembros_familia.length;\n i = familias.length;\n }\n }\n else{\n j = miembros_familia.length;\n }\n }\n }\n break;\n }\n return bandera;\n }", "@Test\r\n public void testGetMaterial() {\r\n String expResult = \"Materialprueba\";\r\n articuloPrueba.setMaterial(expResult);\r\n String result = articuloPrueba.getMaterial();\r\n assertEquals(expResult, result);\r\n }", "@Test\r\n public void testGetValorValido() {\r\n PapelMoeda instance = new PapelMoeda(100, 100);\r\n int expResult = 100;\r\n int result = instance.getValor();\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void publicadorPreguntaEnPublicacionAPostulante() {\n Mensaje mp = new Mensaje();\n mp.setPublicacionId(7);\n mp.setPregunta(\"Tenes jardin?\");\n mp.setUsuarioPreguntaId(usuario.getId());\n mp.setUsuarioRespuestaId(3);\n mp.guardarPregunta(usuario.getToken());\n assertTrue(mp.getId() > 0);\n\n }", "@Test\n\tpublic void deveEntenderLancesEmOrdemCrescente() {\n\t\tLeilao leilao = new LeilaoDataBuilder().leilao(\"Playstation 3 Novo\")\n\t\t\t\t.lance(maria, 250.0)\n\t\t\t\t.lance(joao, 300.0)\n\t\t\t\t.lance(jose, 400.0).constroi();\n\n\t\t// Parte 2: executando a acao\n\t\t// Avaliador leiloeiro = new Avaliador(); // invocado no método auxiliar @Before\n\t\tleiloeiro.avalia(leilao);\n\n\t\t// Parte 3: comparando a saida com o esperado\n//\t\tdouble maiorEsperado = 400;\n//\t\tdouble menorEsperado = 250;\n\t\t// afirmar iqualdade do maior esperado com o que o leiloeiro retorna\n//\t\tassertEquals(maiorEsperado, leiloeiro.getMaiorLance(), 0.0001);\n//\t\tassertEquals(menorEsperado, leiloeiro.getMenorLance(), 0.0001);\n\n\t\t//com Hamcrest - mais legível\n\t\t// afirmar que o retorno de leiloeiro é igual a 400.0\n\t\tassertThat(leiloeiro.getMaiorLance(), equalTo(400.0));\n\t\tassertThat(leiloeiro.getMenorLance(), equalTo(250.0));\n\n\t}", "@Test\n public void testModificarEjemplar() {\n System.out.println(\"ModificarEjemplar\");\n Ejemplar ejemplar = new EjemplaresList().getEjemplares().get(0);;\n BibliotecarioController instance = new BibliotecarioController();\n Ejemplar expResult = new EjemplaresList().getEjemplares().get(0);;\n Ejemplar result = instance.ModificarEjemplar(ejemplar);\n assertEquals(expResult, result);\n System.out.println(\"Ejemplar dado de baja\\nid:\" + result.getIdEjemplar());\n }", "@Test\n public void nao_deve_aceitar_tamanho_telefone_fixo_com_mais_de_9_numeros() {\n telefone.setTamanho(10);\n assertFalse(isValid(telefone, \"O tamanho do telefone não pode ser maior que 9.\", Find.class));\n }", "public static boolean altaGama(String marca) {\n\t\tboolean esAltaGama = false;\n\t\t// Se define en un array las marcas consideradas alta gama\n\t\tString marcaAltaGama[] = { \"BMW\", \"AUDI\", \"VOLVO\" };\n\t\t// Se busca el auto ingresado dentro del array\n\t\tfor (String indice : marcaAltaGama) {\n\t\t\tif (indice.equals(marca)) {\n\t\t\t\tesAltaGama = true;\n\t\t\t}\n\t\t}\n\t\treturn esAltaGama;\n\t}", "public boolean validarNombre() {\n\t\treturn validadores.validarLongitud(nombre, 50);\n\t}", "@Test\r\n\t\tpublic void testMovimientoTorreBlanca0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "@Test\r\n public void testVerificaPossibilidade2() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public Cliente[] findWhereApellidoMaternoClienteEquals(String apellidoMaternoCliente) throws ClienteDaoException;", "@Test\r\n public void testVerificaPossibilidade3() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@org.junit.Test\n public void testGetMssgErreur() {\n System.out.println(\"getMssgErreur\");\n Contact instance = new Contact(\"\", \"\", \"\", \"\", \"\", \"\", \"\");\n String expResult = \"Il a pas de nom ce ptit coquinou ?!\";\n String result = instance.getMssgErreur();\n assertEquals(expResult, result);\n instance = new Contact(\"TestAvecNom\", \"\", \"\", \"\", \"\", \"\", \"\");\n expResult = \"Grande folle ! Pas de prénom, pas de contact !\";\n result = instance.getMssgErreur();\n assertEquals(expResult, result);\n }", "@Test\r\n public void testVerificaPossibilidade() {\r\n usucapiao.setAnimusDomini(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public boolean modifierCompte(int id, String nom, String prenom, String mdp, String email, String numrue, String codeP, String ville);", "@Test\n public void deve_aceitar_tamanho_com_9_numeros() {\n telefone.setTamanho(9);\n assertTrue(isValid(telefone, String.valueOf(telefone.getTamanho()), Find.class));\n }", "@Test\r\n\t\tpublic void testMovimientoTorreBlanca0() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1a. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "public void ValidarLetra() {\n\t\t\n\t\tString valorCampo = \"\";\n\t\t\n\t\tif (campo == 1) {\n\t\t\t\n\t\t\tvalorCampo = textCampo1.getText();\n\t\t}\n\t\telse if (campo == 2) {\n\t\t\t\n\t\t\t valorCampo = textCampo2.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 3) {\n\t\t\t\n\t\t\tvalorCampo = textCampo3.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 4) {\n\t\t\t\n\t\t\tvalorCampo = textCampo4.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 5) {\n\t\t\t\n\t\t\tvalorCampo = textCampo5.getText();\n\t\t}\n\n\t\telse if (campo == 6) {\n\t\t\t\n\t\t\tvalorCampo = textCampo6.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 7) {\n\t\t\t\n\t\t\tvalorCampo = textCampo7.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 8) {\n\t\t\t\n\t\t\tvalorCampo = textCampo8.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 9) {\n\t\t\t\n\t\t\tvalorCampo = textCampo9.getText();\n\t\t}\n\t\t\n\t\telse if (campo == 10) {\n\t\t\t\n\t\t\tvalorCampo = textCampo10.getText();\n\t\t}\n\n\t\t \n\t\tboolean existe = palabra.contains(valorCampo);\n\t\t \n\t\t System.out.println(\" \"+existe);\n\n\n\t\t\n\t\t\n\t\tSystem.out.println(\"probando campo \"+campo);\n\t\t\n\t\t/*campo = 0;*/\n\t\t\n\t\t//System.out.println(\" inicializa \"+campo);\n\n\t}", "@Test\r\n public void testIsMatin() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : isMatin\");\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setMatin(false);\r\n boolean expResult = false;\r\n boolean result = instance.isMatin();\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void nao_deve_aceitar_descricao_nula() {\n telefone.setDescricao(null);\n assertFalse(isValid(telefone, \"A descrição não pode ser nula ou vazia.\", Find.class));\n }", "private boolean validarNombre (String nombre){\n Pattern pattern = Pattern.compile(\"[a-zA-Z-ZñÑáéíóúÁÉÍÓÚ]+\\\\s[a-zA-Z-ZñÑáéíóúÁÉÍÓÚ\\\\s]+\");\n if (!nombre.matches(String.valueOf(pattern))){\n errorDu.setText(\"Debe cargar Nombre y Apellido y solo se permiten letras\");\n errorDu.setVisibility(View.VISIBLE);\n\n }\n return nombre.matches(String.valueOf(pattern));\n }", "public void exibeMatriculaJaExiste() {\n JOptionPane.showMessageDialog(\n null,\n Constantes.GERENCIAR_FUNCIONARIO_MATRICULA_JA_EXISTENTE,\n Constantes.GERENCIAR_FUNCIONARIO_TITULO,\n JOptionPane.PLAIN_MESSAGE\n );\n }", "@Test\n public void nao_deve_aceitar_descricao_vazia() {\n telefone.setDescricao(EMPTY);\n assertFalse(isValid(telefone, \"A descrição não pode ser nula ou vazia.\", Find.class));\n }", "@Test\n public void testCheckPlaceVerticaleMembreDehors() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n try {\n j.checkPlace(\"A8\", g, 5, false);\n fail(\"Une exception devrai etre lancée\");\n }\n catch (Exception e) {\n assertTrue(\"L'exception n'est pas bonne\", e instanceof BateauxMembreInvalide);\n }\n }", "private boolean jaTemDono(int posicao) {\n String nomeDono = Donos.get(posicao).toString();\n return (this.isUmJogador(nomeDono));\n\n }", "public boolean validateMetaCaracteres(String MetaCaracteres){\n Pattern pattern;\n Matcher matcher; \n// pattern = Pattern.compile(\"^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ]+$\");\n pattern = Pattern.compile(\"^[a-zA-ZñÑáéíóúÁÉÍÓÚ]+$\");\n matcher = pattern.matcher(MetaCaracteres);\n return matcher.matches();\n }" ]
[ "0.6679932", "0.65841174", "0.6476518", "0.6451673", "0.62969905", "0.62313503", "0.60451174", "0.6029969", "0.6018097", "0.6013956", "0.59560007", "0.59081894", "0.5889298", "0.5887064", "0.58830017", "0.58753604", "0.58696735", "0.5867998", "0.5832595", "0.5831391", "0.5796392", "0.57552034", "0.5752726", "0.5745063", "0.5729338", "0.5729107", "0.5726281", "0.5709088", "0.56939745", "0.56888145", "0.5679061", "0.5677757", "0.5661941", "0.56474787", "0.5626962", "0.5616306", "0.5587533", "0.55856496", "0.5581966", "0.5574207", "0.55734205", "0.55721414", "0.55690193", "0.55612415", "0.55559295", "0.5540747", "0.5539348", "0.5532234", "0.55155516", "0.55154985", "0.55145544", "0.5513227", "0.5506756", "0.5498983", "0.54879594", "0.5481818", "0.5476142", "0.54750913", "0.54714864", "0.54664534", "0.5459697", "0.5456655", "0.5449519", "0.5443635", "0.5440136", "0.5437838", "0.5416336", "0.5408787", "0.54050404", "0.54018146", "0.5398908", "0.53948075", "0.53911775", "0.5387582", "0.53855485", "0.5384358", "0.5384114", "0.5381274", "0.5367095", "0.53664875", "0.5366348", "0.5357963", "0.5355981", "0.53439355", "0.5343866", "0.53426266", "0.5336311", "0.53351516", "0.5321588", "0.531643", "0.53155077", "0.530452", "0.52897197", "0.528081", "0.5279713", "0.5271063", "0.52690774", "0.52654934", "0.5262217", "0.52579254" ]
0.7140544
0
Test of isEmail method, of class Entradas.
@Test public void testIsEmail() { System.out.println("isEmail"); String em = "[email protected]"; Entradas instance = new Entradas(); boolean expResult = false; boolean result = instance.isEmail(em); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean isEmailRequired();", "boolean hasUserEmail();", "@Test\n\t\tvoid givenEmail_CheckForValidationForEmail_RetrunTrue() {\n\t\t\tboolean result = ValidateUserDetails.validateEmails(\"[email protected]\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "@Test\n\t void testEmail() {\n\t\tString expected=\"[email protected]\";\n\t\tString actual=user.getEmail();\n\t\tassertEquals(expected, actual);\n\t}", "boolean validateEmail(String email) {\n\t\treturn true;\n\n\t}", "private boolean isEmailValid(String email) {\n return true;\r\n }", "private boolean isValidEmail(final String theEmail) {\n return theEmail.contains(\"@\");\n }", "private boolean verificaEmail(String cadena) {\n if (validate.esVacio(cadena)) {\n setErrorEmail(getMsjVacio());\n return false;\n }\n if (!validate.esEmailValido(cadena)) {\n setErrorEmail(getMsjEmailInvalido());\n return false;\n }\n setErrorEmail(null);\n return true;\n }", "@Override\n\tpublic boolean emailisValid(String email) \n\t{\n\t\treturn false;\n\t}", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "public boolean isRegisteredEmail(String email);", "public boolean isEmailCorrect() {\n return (CustomerModel.emailTest(emailTextField.getText()));\n }", "protected void validateEmail(){\n\n //Creating Boolean Value And checking More Accurate Email Validator Added\n\n Boolean email = Pattern.matches(\"^[A-Za-z]+([.+-]?[a-z A-z0-9]+)?@[a-zA-z0-9]{1,6}\\\\.[a-zA-Z]{2,6},?([.][a-zA-z+,]{2,6})?$\",getEmail());\n System.out.println(emailResult(email));\n }", "boolean isEmail(String s) {\n return (!TextUtils.isEmpty(s) && Patterns.EMAIL_ADDRESS.matcher(s).matches());\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean comprobar_email() {\n\t\tString mail = email.getText().toString();\n\n\t\tif (mail.matches(\".*@.*\\\\.upv.es\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Test\n\t\tvoid givenEmail_CheckForValidationForEmail_RetrunFalse() {\n\t\t\tboolean result =ValidateUserDetails.validateEmails(\"abc.xyz@bl\");\n\t\t\tAssertions.assertFalse(result);\n\t\t}", "private boolean isValidEmail(TextInputLayout tiEmail, EditText etEmail) {\n String email = etEmail.getText().toString().trim();\n boolean result = false;\n\n if (email.length() == 0)\n tiEmail.setError(c.getString(R.string.required));\n else {\n Pattern emailPattern = Patterns.EMAIL_ADDRESS;\n if (!emailPattern.matcher(email).matches())\n tiEmail.setError(c.getString(R.string.invalid));\n else {\n tiEmail.setError(null);\n result = true;\n }\n }\n\n return result;\n }", "private boolean isEmailValid(String email){\n return email.contains(\"@\");\n }", "@Test\n\tpublic void validEmailIdIsTested() throws InValidEmailException {\n\t\tString emailId = \"[email protected]\";\n\t\tboolean isValidMail = EmailValidatorUtil.isValidEmailId(emailId, \"InValid EmailId Format\");\n\t\tassertTrue(isValidMail);\n\t}", "private boolean checkEmail() throws IOException {\n String email = getEmail.getText();\n \n if(email.contains(\"@\")) { \n UserDatabase db = new UserDatabase();\n \n if(db.emailExists(email)) {\n errorMessage.setText(\"This email address has already been registered.\");\n return false;\n }\n \n return true;\n }\n else {\n errorMessage.setText(\"Please enter a valid email. This email will be \"+\n \"used for verification and account retrieval.\");\n return false;\n }\n }", "public boolean hasEmail() {\n return deliveryMethodCase_ == 1;\n }", "boolean isEmailExist(String email);", "public boolean findEmail(String email);", "public boolean isValidNewEmail(TextInputLayout tiEmail, EditText etEmail) {\n boolean result = isValidEmail(tiEmail, etEmail);\n\n if (result) {\n String email = etEmail.getText().toString().trim();\n UserRepository userRepository = new UserRepository(c.getApplicationContext());\n if (userRepository.getUserByEmail(email) != null) {\n tiEmail.setError(c.getString(R.string.emailExist));\n result = false;\n } else {\n tiEmail.setError(null);\n result = true;\n }\n }\n\n return result;\n }", "public abstract void arhivare(Email email);", "@Test(priority=1)\n\tpublic void testEmailValidity() {\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"123@abc\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\tAssert.assertTrue(TestHelper.isStringPresent(errors, \"Please enter a valid email address in the format [email protected].\"));\n\t}", "@Test\n //@Disabled\n public void testValidateEmail() {\n assertTrue(RegExprMain.validateEmail(\"[email protected]\"));\n assertTrue(RegExprMain.validateEmail(\"[email protected]\"));\n assertTrue(RegExprMain.validateEmail(\"[email protected]\"));\n assertTrue(RegExprMain.validateEmail(\"[email protected]\"));\n assertFalse(RegExprMain.validateEmail(\"[email protected]\"));\n assertFalse(RegExprMain.validateEmail(\"luna@gmail\"));\n assertFalse(RegExprMain.validateEmail(\"[email protected]\"));\n assertFalse(RegExprMain.validateEmail(\"lubo.xaviluna@gmai_l.com\"));\n assertTrue(RegExprMain.validateEmail(\"luna#[email protected]\"));\n assertTrue(RegExprMain.validateEmail(\"[email protected]\"));\n \n \n\n }", "private boolean CheckEmail() {\n\t\tString email = Email_textBox.getText();\n\n\t\t// if field is empty\n\t\tif (email.equals(\"\")) {\n\t\t\tif (!Email_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tEmail_textBox.getStyleClass().add(\"error\");\n\t\t\tEmailNote.setText(\"* Enter Email\");\n\t\t\treturn false;\n\t\t}\n\n\t\tString emailFormat = \"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\\\.[a-zA-Z0-9-]+)+$\";\n\n\t\t// if field is not in wanted format\n\t\tif (!email.matches(emailFormat)) {\n\t\t\tif (!Email_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tEmail_textBox.getStyleClass().add(\"error\");\n\t\t\tEmailNote.setText(\"* Wrong Format\");\n\t\t\treturn false;\n\t\t}\n\n\t\tEmail_textBox.getStyleClass().remove(\"error\");\n\t\tEmailNote.setText(\"*\");\n\t\treturn true;\n\t}", "@Test\n public void emailTest() {\n // TODO: test email\n }", "@Test\n public void emailTest() {\n // TODO: test email\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "public boolean isSetEmail() {\n return this.email != null;\n }", "public boolean emailAvailability (String desiredEmail) {\n\t\t\n\t\tArrayList<User> companyMembers = myCompany.getCompanyMembers();\n\t\tfor(User companyMember: companyMembers) {\n\t\t\tif (companyMember.myAccount.getEmail().equalsIgnoreCase(desiredEmail))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "@Test\n public void testIsValidEmailAddress() {\n System.out.println(\"isValidEmailAddress\");\n String email = \"hg5\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidEmailAddress(email);\n assertEquals(expResult, result);\n }", "public boolean checkEmail() {\n return !this.emailAddress.isEmpty() && validEmail(this.emailAddress);\n }", "private static boolean isEmail(String string) {\r\n if (string == null) return false;\r\n String regEx1 = \"^([a-z0-9A-Z]+[-|\\\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\\\.)+[a-zA-Z]{2,}$\";\r\n Pattern p;\r\n Matcher m;\r\n p = Pattern.compile(regEx1);\r\n m = p.matcher(string);\r\n if (m.matches()) return true;\r\n else\r\n return false;\r\n }", "protected boolean isEmail(String userId) {\n \t\tif (StringUtil.isEmpty(userId)) {\n \t\t\treturn false;\n \t\t}\n \t\treturn userId.contains(\"@\");\n \t}", "@Test\n public void Email_WhenValid_ShouldReturnTrue(){\n RegexTest valid = new RegexTest();\n boolean result = valid.Email(\"[email protected]\");\n Assert.assertEquals(true,result);\n }", "@java.lang.Override\n public boolean hasEmail() {\n return deliveryMethodCase_ == 1;\n }", "@Override\n public boolean checkEmail(User user) {\n String email = user.getEmail();\n User userEx = findByEmail(email);\n return userEx != null;\n }", "@Test\n public void test_IsEmailValid(){\n UserRegistration obj = new UserRegistration();\n boolean result = obj.checkEmailValidation(\"[email protected]\");\n assertThat(result, is(true));\n }", "Boolean checkEmailAlready(String email);", "@Test\r\n public void testEmailAnomalies() {\r\n Assert.assertEquals(emailValidator.isValid(\"[email protected]\", constraintValidatorContext), false);\r\n Assert.assertEquals(emailValidator.isValid(\"aa@testcom\", constraintValidatorContext), false);\r\n\r\n }", "private boolean isEmail(String email)\n {\n Pattern pat = null;\n Matcher mat = null;\n pat = Pattern.compile(\"^[\\\\w\\\\\\\\\\\\+]+(\\\\.[\\\\w\\\\\\\\]+)*@([A-Za-z0-9-]+\\\\.)+[A-Za-z]{2,4}$\");\n mat = pat.matcher(email);\n if (mat.find()) {\n return true;\n }\n else\n {\n return false;\n }\n }", "private boolean isEmailValid(String email) {\n return email.equals(\"[email protected]\");\n }", "void validate(String email);", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "@Test\n public void testCheckEmail() {\n System.out.println(\"checkEmail\");\n String email = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n boolean expResult = false;\n boolean result = instance.checkEmail(email);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetByMail() throws Exception {\n System.out.println(\"getByMail\");\n Connection con = ConnexionMySQL.newConnexion();\n Inscription result = Inscription.getByMail(con, \"[email protected]\");\n assertEquals(\"[email protected]\", result.getMail());\n }", "@Override\n public void validaEmailInteractor(CharSequence charSequence) {\n verificaEmail(charToString(charSequence));\n }", "private void emailExistCheck() {\n usernameFromEmail(email.getText().toString());\n }", "private boolean isValidEmail(EditText edtEmail) {\n FIELD_STATUS status = validateEmail(edtEmail.getText().toString());\n\n switch (status) {\n case EMPTY:\n edtEmail.setError(getString(R.string.required_field));\n return false;\n case INVALID:\n edtEmail.setError(getString(R.string.email_invalid));\n return false;\n case VALID:\n return true;\n default:\n return false;\n }\n }", "private boolean isEmailValid(String email) {\r\n //TODO: Replace this with your own logic\r\n return email.contains(\"@\");\r\n }", "@Test\n public void test_isNotValidEmail(){\n UserRegistration obj = new UserRegistration();\n boolean result = obj.checkEmailValidation(\"robert.com\");\n assertThat(result, is(false));\n }", "public boolean isValidExistingEmail(TextInputLayout tiEmail, EditText etEmail) {\n return (validExistingEmail(tiEmail, etEmail) != null);\n }", "private static boolean isEmailFormat(final String str)\n {\n return str.matches(\"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,6}\");\n }", "public boolean validateEmail() {\n\t\tString emailString = emailValidity.getText();\n\t\tString errorMsg = \"Email in use.\";\n\t\tboolean result = emailString.contains(errorMsg);\n\t\tif (result) {\n\t\t\tstoreVerificationResults(true, \"Email in use\");\n\t\t\tresult = true;\n\t\t} else {\n\t\t\tstoreVerificationResults(false, \"User able to reuse email id\");\n\t\t}\n\t\treturn result;\n\t}", "public boolean validarEmail(String email) { \r\n\t\tPattern p = Pattern.compile(\"[a-zA-Z0-9]+[.[a-zA-Z0-9_-]+]*@[a-z0-9][\\\\w\\\\.-]*[a-z0-9]\\\\.[a-z][a-z\\\\.]*[a-z]$\");\r\n\t\tMatcher m = p.matcher(email); \r\n\t\treturn m.matches(); \r\n\t}", "private boolean isEmailValid(String email) {\n //TODO: Replace this with your own logic\n return email.contains(\"@\");\n }", "public boolean verificaEmail(String correo) {\n Pattern pat = null;\r\n Matcher mat = null;\r\n pat = Pattern.compile(\"^([0-9a-zA-Z]([_.w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-w]*[0-9a-zA-Z].)+([a-zA-Z]{2,9}.)+[a-zA-Z]{2,3})$\");\r\n mat = pat.matcher(correo);\r\n if (mat.find()) {\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public boolean isEmailValid(String email) {\n return true;\n }", "public static boolean checkEmail(String email) {\r\n\t\tboolean result = false;\r\n\t\tif (check(email) && email.matches(CommandParameter.REG_EXP_EMAIL)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Test\r\n public void testGetEmail() {\r\n System.out.println(\"getEmail\");\r\n Integrante instance = new Integrante();\r\n String expResult = \"\";\r\n String result = instance.getEmail();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\tpublic void inValidEmailIdIsTested() {\n\t\ttry {\n\t\t\tString emailId = \"divyagmail.com\";\n\t\t\tboolean isValidMail = EmailValidatorUtil.isValidEmailId(emailId, \"InValid EmailID Format\");\n\t\t\tassertFalse(isValidMail);\n\t\t} catch (Exception e) {\n\t\t\tassertEquals(\"InValid EmailID Format\", e.getMessage());\n\n\t\t}\n\t}", "protected boolean checkCompanyEmail() {\n\t\tif (this.getForm().getInteractionManager().getModifiedFieldAttributes().contains(CompanyNaming.EMAIL)) {\r\n\t\t\tMessageManager.getMessageManager().showMessage(this.getForm(), \"W_UNSAVED_EMAIL_MANDATORY\", MessageType.WARNING, new Object[] {});\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tString emailValue = (String) this.emailField.getValue();\r\n\t\tif (StringTools.isEmpty(emailValue) || !UEmailDataField.isValidEmail(emailValue)) {\r\n\t\t\tMessageManager.getMessageManager().showMessage(this.getForm(), \"W_INVALID_EMAIL_MANDATORY\", MessageType.WARNING, new Object[] {});\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private void validationEmail(String email) throws Exception {\r\n\t\tif (email != null && email.trim().length() != 0) {\r\n\t\t\tif (!email.matches(\"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\")) {\r\n\t\t\t\tthrow new Exception(\"Merci de saisir une adresse mail valide.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Exception(\"Merci de saisir une adresse mail.\");\r\n\t\t}\r\n\t}" ]
[ "0.79313123", "0.79313123", "0.79313123", "0.79313123", "0.79313123", "0.76316", "0.7353981", "0.72750676", "0.72708446", "0.72268367", "0.71987593", "0.71743566", "0.7158544", "0.7156733", "0.7023853", "0.7023853", "0.7023853", "0.7023853", "0.7011804", "0.6988904", "0.69706637", "0.69262797", "0.6914234", "0.6914234", "0.6914234", "0.6914234", "0.6907751", "0.6898394", "0.68353415", "0.6828902", "0.68249476", "0.6810467", "0.6809036", "0.680769", "0.675392", "0.6742682", "0.673705", "0.6735219", "0.67346954", "0.6706192", "0.67051595", "0.67051595", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.6702012", "0.66783106", "0.66743976", "0.66604763", "0.6660115", "0.6650898", "0.6638306", "0.6633479", "0.6633299", "0.6632031", "0.66243917", "0.6610826", "0.6609684", "0.66065973", "0.66057706", "0.66010857", "0.65900946", "0.65900946", "0.65900946", "0.65900946", "0.65900946", "0.65900946", "0.6589145", "0.65849984", "0.65766996", "0.65729356", "0.6571417", "0.6552316", "0.65221804", "0.6499503", "0.6498208", "0.6494426", "0.64928436", "0.64880055", "0.6483408", "0.64763904", "0.645604", "0.6453984", "0.64389014", "0.6432161", "0.6428287" ]
0.838604
0
Test of isTelefono method, of class Entradas.
@Test public void testIsTelefono() { System.out.println("isTelefono"); int tel = 123456789; Entradas instance = new Entradas(); boolean expResult = false; boolean result = instance.isTelefono(tel); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean validarTelefonos() {\n\t\treturn telefonos != null && telefonos.length == 2;\n\t}", "public boolean validarTelefono(String telefono){\n boolean isTelefono = true;\n isTelefono = validarLong(telefono);\n if(isTelefono){\n isTelefono = telefono.length()<15 && telefono.length()>7?true:false;\n }\n return isTelefono;\n }", "public static boolean validarTelefono(String telefono) {\n return validar(\"[0-9]{9}\", telefono);\n }", "public static boolean verificaRecapitoTelefonico (String recapito){\r\n\t\t\r\n\t\tif (Pattern.matches(\"[0-9]{5,}\", recapito )) return true;\r\n\t\t\r\n\t\tSystem.out.println(\"Telefono non valido\"); \r\n\t\treturn false;\r\n\t\t\r\n\t}", "public boolean validarTelefono1() {\n\t\treturn validadores.validarLongitud(telefonos[0], 15);\n\t}", "public boolean validarTel(String text) {\n if (text.length() == 9) {\n return true;\n } else {\n return false;\n }\n }", "public boolean validarTelefono2() {\n\t\treturn validadores.validarLongitud(telefonos[1], 15);\n\t}", "@Test\n public void nao_deve_aceitar_tamanho_telefone_fixo_com_mais_de_9_numeros() {\n telefone.setTamanho(10);\n assertFalse(isValid(telefone, \"O tamanho do telefone não pode ser maior que 9.\", Find.class));\n }", "@Test\n public void nao_deve_aceitar_tamanho_telefone_fixo_com_menos_de_8_numeros() {\n telefone.setTamanho(7);\n assertFalse(isValid(telefone, \"O tamanho do telefone não pode ser menor que 8.\", Find.class));\n }", "@Test\n public void deve_aceitar_tamanho_com_9_numeros() {\n telefone.setTamanho(9);\n assertTrue(isValid(telefone, String.valueOf(telefone.getTamanho()), Find.class));\n }", "public void setTelefono(String telefono) {\n this.telefono = telefono;\n }", "public void setTelefono(String telefono) {\r\n\t\tthis.telefono = telefono;\r\n\t}", "public boolean validaEditText(int texto) {\n\t\tfor (int i = 0, count = mitaxiregistermanually_ll_contactos.getChildCount(); i < count; ++i) {\n \t LinearLayout ll = (LinearLayout) mitaxiregistermanually_ll_contactos.getChildAt(i);\n \t LinearLayout ll2 = (LinearLayout) ll.getChildAt(0);\n \t LinearLayout ll3 = (LinearLayout) ll2.getChildAt(0);\n \t EditText et = (EditText) ll3.getChildAt(0);\n \t EditText et2 = (EditText) ll3.getChildAt(1);\n \t //validamos que no esten vacios\n \t if(et.getText().toString().equals(\"\")){\n \t\t Dialogos.Toast(RegistroContactosEmergenciaActivity.this, getResources().getString(texto), Toast.LENGTH_LONG);\n \t\t return false;\n \t }\n \t if(et2.getText().toString().equals(\"\")){\n \t\t Dialogos.Toast(RegistroContactosEmergenciaActivity.this, getResources().getString(texto), Toast.LENGTH_LONG);\n \t\t return false;\n \t }\n \t //validamos que esten bien escritos\n \t if(et.getText().toString().length()!=10){\n \t\t Dialogos.Toast(RegistroContactosEmergenciaActivity.this,getResources().getString(R.string.Registro_manual_llena_bien_el_celular), Toast.LENGTH_LONG);\n \t\t return false;\n \t }\n \t if(Utils.isNumeric(et.getText().toString())){\n \t\t Dialogos.Toast(RegistroContactosEmergenciaActivity.this,getResources().getString(R.string.Registro_manual_llena_bien_el_celular_signo), Toast.LENGTH_LONG);\n \t\t return false; \n \t }\n \t \n \t if(!EditTextValidator.esCorreo(et2)){\n\t\t\t et2.setError(getResources().getString(R.string.edittext_error_email));\n\t\t\t return false;\n\t\t }\n }\n\t\t\n\t\t\n\t\treturn true;\n\t}", "public String validarTelefono(String tel) {\n int lon = tel.length();\n if (lon == 9) {\n if (isNumeric(tel)) {\n return tel;\n } else {\n return \"\";\n }\n } else if (lon == 8) {\n return \"0\" + tel;\n } else if (lon == 7) {\n return \"07\" + tel;\n } else if (lon == 6) {\n return \"072\" + tel;\n } else {\n return \"\";\n }\n }", "@Test\r\n public void testGetTelefoneComercial() {\r\n System.out.println(\"getTelefoneComercial\");\r\n Integrante instance = new Integrante();\r\n String expResult = \"\";\r\n String result = instance.getTelefoneComercial();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void setTelefono(String aTelefono) {\n telefono = aTelefono;\n }", "@Test\r\n public void testGetTelefoneCelular() {\r\n System.out.println(\"getTelefoneCelular\");\r\n Integrante instance = new Integrante();\r\n String expResult = \"\";\r\n String result = instance.getTelefoneCelular();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void setTelefono(String telefono)\r\n {\r\n this.telefono = telefono;\r\n }", "@Test\n public void deve_aceitar_tamanho_com_8_numeros() {\n telefone.setTamanho(8);\n assertTrue(isValid(telefone, String.valueOf(telefone.getTamanho()), Find.class));\n }", "public void tocarTelefone() {\n System.out.println(\"Telefone \" + getNumero() + \" está tocando!\");\n notificarTodos();\n }", "@Test\n\tpublic void testLecturaNombre() {\n\t\tassertTrue(!esquemaReal.getNombrePatron().equals(\"\"));\n\t}", "boolean hasPhone();", "public String getTelefono() {\r\n\t\treturn telefono;\r\n\t}", "@Override\n\tpublic boolean validare(Client t) {\n\t\tboolean ok = true;\n\t\tif (!this.validareEmail(t))\n\t\t\tok = false;\n\t\tif (!this.validareNume(t))\n\t\t\tok = false;\n\n\t\treturn ok;\n\t}", "public boolean verifisTel(String text) {\n if (text.matches(\"^[0-9]+$\")&& text.length()==8) {\n return true;\n } else {\n return false;\n }\n }", "public boolean verificaNumero() {\n if (contemSomenteNumeros(jTextFieldDeposita.getText()) || contemSomenteNumeros(jTextFieldSaca.getText())\n || contemSomenteNumeros(jTextFieldTransfere.getText())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(this, \"Digite somente números, por favor. \", \"Atenção !!\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }", "@Override\n public void verifyHasPhone() {\n }", "public void setTelefono(String telefono) {\r\n\t\tif(telefono.length() == 9){\r\n\t\tthis.telefono = telefono;\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"Error telefono\");\r\n\t\t}\r\n\t}", "boolean hasPhoneNumber();", "boolean hasUserPhone();", "@Override\r\n\tpublic boolean checktoken(String telephone, String accesstoken) {\n\t\tUserCustomer checktoken = userCustomerMapper.checktoken(telephone ,accesstoken );\r\n\t\tif (checktoken == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public String getTelefono() {\n return telefono;\n }", "public String getTelefono() {\n return telefono;\n }", "@Test\n public void testIsApellido_Paterno() {\n System.out.println(\"isApellido_Paterno\");\n String AP = \"ulfric\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Paterno(AP);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public void atenderTelefone() {\n System.out.println(\"Telefone \" + getNumero() + \" atendido!\");\n notificarTodos();\n }", "abstract void telephoneValidity();", "@Test\n public void testIsNombre() {\n System.out.println(\"isNombre\");\n String Nom = \"Alfred\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isNombre(Nom);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public boolean validarIngresosUsuario_interno(JTextField motivoTF, JTextField detalleTF,\n\t\t\tJTextField montoTF){\n\t\t\n\t\tif(!validarDouble(montoTF.getText())) return false;\n\t\tif(montoTF.getText().length() >30) return false;\n\t\tif(!validarInt(motivoTF.getText())) return false;\n\t\tif(motivoTF.getText().length() >30) return false;\n\t\tif(detalleTF.getText().equals(\"\")) return false;\n\t\tif(detalleTF.getText().length() >100) return false;\n\t\t//if(numero < 0) return false;\n\t\tif(numero_double < 0) return false;\n\t\n\t\treturn true;\n\t}", "public String getTelefono()\r\n {\r\n return telefono;\r\n }", "public void setTelefonoTI(String telefonoTI) {\n this.telefonoTI = telefonoTI;\n }", "@AutoEscape\n\tpublic String getTelefono();", "public void setTelefono(String telefono);", "java.lang.String getTelefon();", "private boolean campararCorreo () {\n\t\tlistaUsuarios = UsuarioDAO.readTodos(this.mainApp.getConnection());\n\t\tString correoE = this.campoCorreo.getText();\n\t\tfor (Usuario correo : listaUsuarios) {\n\t\t\tif (correo.getCorreoElectronico().equals(correoE))\n\t\t\t\treturn false;\n\t\t}//FIN FOR\n\t\treturn true;\n\t}", "@Test\n public void testIsEmail() {\n System.out.println(\"isEmail\");\n String em = \"[email protected]\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isEmail(em);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public boolean validarForm() throws Exception {\n\t\tString mensaje = \"Los campos marcados con (*) son obligatorios\";\n\t\tboolean valida = true;\n\n\t\ttry {\n\t\t\tFormularioUtil.validarCamposObligatorios(tbxAcompaniante,\n\t\t\t\t\tlbxRelacion, tbxTel_acompaniante, tbxMotivo_consulta,\n\t\t\t\t\ttbxEnfermedad_actual);\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!tbxTel_acompaniante.getValue().trim().isEmpty()\n\t\t\t\t&& !tbxTel_acompaniante.getValue().matches(\"[0-9]*$\")) {\n\t\t\tvalida = false;\n\t\t\tmensaje = \"El valor del número de telefono no es valido\";\n\t\t\tClients.scrollIntoView(tbxTel_acompaniante);\n\t\t}\n\n\t\tif (!valida) {\n\t\t\tMensajesUtil.mensajeAlerta(usuarios.getNombres()\n\t\t\t\t\t+ \" recuerde que...\", mensaje);\n\t\t}\n\n\t\treturn valida;\n\t}", "public void setTelefono(String telefono) {\n\t\tthis.telefono.set(telefono);\n\t}", "@Test\r\n public void testSetTelefoneCelular() {\r\n System.out.println(\"setTelefoneCelular\");\r\n String telefoneCelular = \"\";\r\n Integrante instance = new Integrante();\r\n instance.setTelefoneCelular(telefoneCelular);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "void telephoneValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n person.setTelephone(\"+391111111111\");\n assertDoesNotThrow(person::checkDataValidity);\n person.setTelephone(\"1111111111\");\n assertDoesNotThrow(person::checkDataValidity);\n person.setTelephone(\"111 1111111\");\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data\n person.setTelephone(\"AAA\");\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }", "@Test\n public void testIsMonto() {\n System.out.println(\"isMonto\");\n int money = 1000000;\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isMonto(money);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public void setTelefono(Integer telefono) {\r\n this.telefono = telefono;\r\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void criaContatoTelefoneInvalido() {\n\t\tcontato = new Contato(\"Jardely\", \"Maris\", \"\");\n\t}", "@Test\r\n public void testGetTelefoneResidencial() {\r\n System.out.println(\"getTelefoneResidencial\");\r\n Integrante instance = new Integrante();\r\n String expResult = \"\";\r\n String result = instance.getTelefoneResidencial();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public boolean validar() {\n if (getUsuario().length() <= 8) {\n if (getSenha().length() > 7 && getSenha().length() < 17) {\n return true;\n }\n }\n return false;\n }", "public long getTelefono() {\r\n return telefono;\r\n }", "public String getTelefonoTI() {\n return this.telefonoTI;\n }", "@Test\n\tpublic void testActualizaEmp() {\n\n\t\tboolean valor = serv.actualizaEmp(empl, \"tel\", \"55677354\");\n\t\tassertEquals(\"Se esperaba un false\",valor, true);\n\t}", "@Test\n public void testIsApellido_Materno() {\n System.out.println(\"isApellido_Materno\");\n String AM = \"Proud\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Materno(AM);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n\n }", "public static boolean validarTipoOperacion(String tipoOperacion) {\n return validar(\"Entrada|Salida\", tipoOperacion);\n }", "public final boolean checkPhoneNum() {\n EditText editText = (EditText) _$_findCachedViewById(R.id.etPhoneNum);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etPhoneNum\");\n CharSequence text = editText.getText();\n if (text == null || text.length() == 0) {\n showMsg(\"请输入手机号\");\n return false;\n }\n EditText editText2 = (EditText) _$_findCachedViewById(R.id.etPhoneNum);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPhoneNum\");\n if (editText2.getText().length() == 11) {\n return true;\n }\n showMsg(\"请输入正确的手机号\");\n return false;\n }", "public java.lang.String getNumeroTelefono() {\n\t\treturn _telefonoSolicitudProducto.getNumeroTelefono();\n\t}", "public void setTelefono(long value) {\r\n this.telefono = value;\r\n }", "@Test\n public void testDelecaoTelefones() {\n System.out.println(\"delecaoTelefones\");\n String idPessoa = \"\";\n AdministradorDAO instance = new AdministradorDAO();\n instance.delecaoTelefones(idPessoa);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public boolean existeUsuario(String telefono) {\n\t\treturn this.usuarios.get(telefono) != null;\n\t}", "private boolean camposNumCorrectos() {\n\t\t return Utilidades.isPositiveNumber(anioText.getText().trim());\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_numeros() {\n telefone.setDescricao(random(10, true, true));\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "private boolean checkPhoneNum() {\n\t\tphoneNum = et_phone.getText().toString().trim();\r\n\t\tif(isMobileNO(phoneNum)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_a_primeira_letra_minuscula() {\n telefone.setDescricao(\"celular empresarial.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "@Test\n public void practicaTDDPasswordValidarMayusculas() {\n boolean respuesta = ValidadorPassword.validar(\"AA\");\n Assert.assertFalse(respuesta);\n }", "private boolean checkLengthDeviceSerialEditText (EditText text, TextInputLayout TFB, String massage) {\n if(text.getText().toString().length() > 10 || text.getText().toString().length() < 10)\n {\n TFB.setErrorEnabled(true);\n TFB.setError(massage);\n return false;\n }\n else\n {\n TFB.setErrorEnabled(false);\n return true;\n }\n\n\n }", "public static boolean verificarLetras(String cadeia) {\n\t\tfor (int i = 0; i < cadeia.length(); i++) {\n\t\t\tif (Character.isDigit(cadeia.charAt(i))) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean Validate() \r\n {\n return phoneNumber.matcher(getText()).matches();\r\n }", "public boolean validarCampos() {\n\t\tboolean valid = true;\n\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getNome())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getPaciente().getDataCadastro())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getSexo())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getRG())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(Util.isObjectNotNull(this.getPaciente().getRG()) && this.getPaciente().getRG() < 0) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG015\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getCPF())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isCPFValido(this.getPaciente().getCPF())) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG006\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(Util.isCPFValido(this.getPaciente().getCPF()) && isPacienteCadastrado(this.getPaciente())) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG017\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getEndereco())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getBairro())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getCidade())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getUF())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getPaciente().getDataNascimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getTelefone())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isTelefoneValido(this.getPaciente().getTelefone())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\t\n\t\treturn valid;\n\t}", "@Override\n public boolean isTipoValido() {\n return true;\n }", "protected void pontoVerificacao(boolean validacao, Object check) {\n Log.info(\"Status: \" + validacao + \" | \" + check);\n getSoft().assertTrue(validacao, (String) check);\n }", "public boolean entradaValida(String parametro, String entrada) {\n\t\tString expresion = expresiones(parametro);\n\t\tBoolean todoBien = true;\n\t\tPattern pattern;\n\t\tMatcher matcher;\n\t\tpattern = Pattern.compile(expresion);\n\t\tmatcher = pattern.matcher(entrada);\n\t\tif (!matcher.matches()) {\n\t\t\ttodoBien = false;\n\t\t} else {\n\t\t\ttodoBien = true;\n\t\t}\n\t\treturn todoBien;\n\t}", "public boolean isValidPhone(TextInputLayout tiPhone, EditText etPhone) {\n String phone = etPhone.getText().toString().trim();\n boolean result = false;\n\n if (phone.length() == 0)\n tiPhone.setError(c.getString(R.string.required));\n else if (phone.length() != PHONE_SIZE)\n tiPhone.setError(c.getString(R.string.specificLength, Integer.toString(PHONE_SIZE)));\n else if (!phone.matches(\"\\\\d{10}\"))\n tiPhone.setError(c.getString(R.string.onlyNumbers));\n else {\n result = true;\n tiPhone.setError(null);\n }\n return result;\n }", "private boolean checkPhoneStatusOK() {\n return true;\n }", "@Test\r\n public void testSetTelefoneComercial() {\r\n System.out.println(\"setTelefoneComercial\");\r\n String telefoneComercial = \"\";\r\n Integrante instance = new Integrante();\r\n instance.setTelefoneComercial(telefoneComercial);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Override\n\tpublic boolean verificarMensaje(String mensaje) {\n\t\tboolean reenvio = false;\n\t\tSystem.out.println(mensaje.length());\n\t\tSystem.out.println(\"Mensaje recibido: \"+ mensaje);\n\t\tString lectura = mensaje.substring(0, 12);\n\t\tSystem.out.println(\"Inicio de trama: \"+lectura);\n\t\tif (lectura.equals(inicioTrama)) {\n\t\t\tlectura = mensaje.substring(12, 14);\n\t\t\tSystem.out.println(\"Tpo de trama: \"+lectura);\n\t\t\tif (lectura.equals(\"01\")) {\n\t\t\t\treenvio = tipoTrama01(mensaje);\n\t\t\t}\n\t\t}\n\t\treturn reenvio;\n\t}", "@Test\n public void testValiderNumeroSoin() {\n \n assertTrue(soin1.validerNumeroSoin());\n assertFalse(soin4.validerNumeroSoin());\n assertTrue(soin2.validerNumeroSoin());\n }", "public static boolean isEntero(String valor) {\n boolean valido = false;\n\n try {\n int cantidad = Integer.parseInt(valor);\n if (cantidad > 0) {\n valido = true;\n }\n } catch (NumberFormatException e) {\n System.out.println(\"No es un caracter entero\");\n }\n\n return valido;\n }", "private boolean isPhoneValid(String password) {\n return password.length() == 10;\r\n }", "public static boolean HasTelephony(Context context){\r\n PackageManager packageManager = context.getPackageManager();\r\n\r\n if(packageManager == null){\r\n return false;\r\n }\r\n\r\n return packageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);\r\n }", "@Test\n\tpublic void testResponderEjercicio4(){\n\t\tAlumno oscar = Alumno.CreaAlumno(\"2\", \"Oscar\", \"Password\", \"[email protected]\");\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(1));\n\t\tassertFalse(ej1.responderEjercicio(oscar, array));\n\t\tassertTrue(oscar.getEstadisticas().isEmpty());\n\t}", "@Test\n public void telnyxFeeTest() {\n // TODO: test telnyxFee\n }", "public String getTel() {\r\n return tel;\r\n }", "private boolean verificarCliente(int cedulaCliente) {\n for (int i = 0; i < posicionActual; i++) { //Recorre hasta la posicon actual en la que se estan agregando datos, osea en la ultima en que se registro.\n if (getCedulaCliente(i) == cedulaCliente) { //Pregunta si la cedula pasada por parametro exite en la posicon que va recorriendo el for actualmente\n return true; //Si la condicion se da, retorna verdadero para informar que si el cliente si se encuentra\n }\n }\n return false; //si al final no encontro ninguna coincidencia retorna falso para avisar que el cliente no se encuentra registrado\n }", "public boolean validarUsuarioActivo(Long idUsuario);", "public boolean findAdminTelephone(String telephone) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tran = session.beginTransaction();\n\n\t\tQuery<Admin> query = session.createQuery(\"from Admin where admin_phone=:telephone\");\n\t\tquery.setParameter(\"telephone\", telephone);\n\t\tList<Admin> list = query.list();\n\t\ttran.commit();\n\t\tsession.close();\n\t\tif (list.size() == 0) {\n\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean validarFichaEpidemiologia() {\n\t\t\n\t\tboolean valida = true;\n\t\t\n\t\tif(!valida){\n\t\t\tMensajesUtil.mensajeAlerta(usuarios.getNombres()+\" recuerde que...\",\"Los campos marcados con (*) son obligatorios\");\n\t\t}\n\t\t\n\t\treturn valida;\n\t}", "@Test\n public void deve_aceitar_descricao_entre_15_e_30_caracteres_valido() {\n telefone.setDescricao(random(20, true, false));\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }", "@AssertTrue(message=\"La clave debe ser alfanumerica \")\r\n\tpublic boolean validarClave(){\r\n\t\tboolean a=StringUtils.isAlphanumeric(clave);\r\n\t\tboolean b=StringUtils.isNotBlank(clave);\r\n\t\treturn (a && b);\r\n\t}", "public boolean verificaTrasicaoVazia(){\n\n //verifica se dentro das transicoes tem alguma saindo com valor vazio;\n for (int i = 0; i < this.transicoes.size(); i++) {\n if(this.transicoes.get(i).simbolo.equals(Automato_Servico.valorVazio)){\n return true;\n }\n }\n return false;\n }", "@Override\n public boolean valida() {\n mediatorCredito m = new mediatorCredito();\n try{\n BigInteger dit = new BigInteger(JOptionPane.showInputDialog(null,\"Digite su número de \"\n + \"tarjeta de crédito\",\"\"));\n String pag = JOptionPane.showInputDialog(null,\"Ingrese su medio de pago: (Visa, master Card\"\n + \", American Express)\",\"\");\n if(m.verificarForm(dit, pag)==false){\n JOptionPane.showMessageDialog(null,\"ups, el medio de pago o la tarjeta de crédito no es válido\"\n ,\"Error\",0);\n }\n return m.verificarForm(dit, pag);\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null,\"Acción cancelada\",\"Advertencia\",2);\n return false;\n }\n }", "@Test\n\t\tvoid givenEmail_CheckForValidationForMobile_RetrunTrue() {\n\t\t\tboolean result = ValidateUserDetails.validateMobile(\"98 9808229348\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "@Test\n public void testeCadastrarSenhaFraca(){\n String senha3 = \"12345\";\n TestToolsCadUser.preencherEclicar(this.mNome,this.mEmail, senha3, senha3);\n TestTools.checarToast(R.string.erro_cadastro_senha_invalida_Toast);\n }", "public Boolean validarUsuarioActivo(String idUsuario);", "public String getTel() {\n return tel;\n }", "public String getTel() {\n return tel;\n }" ]
[ "0.69667006", "0.6908689", "0.6734715", "0.6722924", "0.67033964", "0.6640122", "0.6551431", "0.6513007", "0.63710284", "0.6355595", "0.6325817", "0.6294061", "0.6276765", "0.62695414", "0.62592757", "0.62530416", "0.62365127", "0.6195709", "0.6129969", "0.6105351", "0.60973364", "0.6093339", "0.60706586", "0.606326", "0.6004836", "0.6003966", "0.596315", "0.5945505", "0.5924352", "0.5913649", "0.5885765", "0.58665186", "0.58665186", "0.5864211", "0.5862749", "0.58394283", "0.5809158", "0.57990414", "0.57979804", "0.57933456", "0.57866305", "0.578464", "0.5770295", "0.5750774", "0.5725358", "0.57179445", "0.5706223", "0.57051873", "0.56896824", "0.5681376", "0.56638145", "0.566111", "0.5653991", "0.56430244", "0.5627022", "0.56195474", "0.56084144", "0.5582735", "0.5581786", "0.5570423", "0.55674314", "0.55565226", "0.5541096", "0.55333775", "0.55121595", "0.54990405", "0.54987144", "0.5476791", "0.54712045", "0.5468534", "0.5464196", "0.5458406", "0.5455139", "0.54449326", "0.54392266", "0.5418812", "0.54164", "0.5415219", "0.5410093", "0.54007846", "0.5392044", "0.5389709", "0.5378771", "0.5372294", "0.53692174", "0.53659993", "0.53626174", "0.5359724", "0.5357041", "0.5354355", "0.5353374", "0.53444", "0.53388417", "0.5335549", "0.5331835", "0.5329281", "0.5324505", "0.5317002", "0.5315225", "0.5315225" ]
0.80055165
0
Test of isMonto method, of class Entradas.
@Test public void testIsMonto() { System.out.println("isMonto"); int money = 1000000; Entradas instance = new Entradas(); boolean expResult = false; boolean result = instance.isMonto(money); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testMonto1() {\n\n\t\tSystem.out.println(\" la cantidad introducida es menor de 1\"\n\t\t\t\t+ \"monto1: equivalencia: si el monto es menor de 1,ahora 0, el mensaje seria:\\n\");\n\t\tint cantidad = 0;\n\n\t\tString expResult = \"Error: La cantidad introducida es menor de 1\";\n\t\tString result = instance.ingreso(cantidad);\n\t\tassertEquals(expResult, result);\n\n\t}", "public synchronized boolean atesorar(double monto){\n if (this.tesoro + monto < 0){\n return false;\n } else {\n tesoro +=monto;\n return true;\n }\n }", "@Override\r\n\tprotected boolean puedeExtraer(double monto) {\n\t\treturn ((super.getSaldo() - monto) >= 0) ? true : false;\r\n\t}", "@Test\r\n public void testIsMatin() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : isMatin\");\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setMatin(false);\r\n boolean expResult = false;\r\n boolean result = instance.isMatin();\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testIsTelefono() {\n System.out.println(\"isTelefono\");\n int tel = 123456789;\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isTelefono(tel);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public boolean validarIngresosUsuario_interno(JTextField motivoTF, JTextField detalleTF,\n\t\t\tJTextField montoTF){\n\t\t\n\t\tif(!validarDouble(montoTF.getText())) return false;\n\t\tif(montoTF.getText().length() >30) return false;\n\t\tif(!validarInt(motivoTF.getText())) return false;\n\t\tif(motivoTF.getText().length() >30) return false;\n\t\tif(detalleTF.getText().equals(\"\")) return false;\n\t\tif(detalleTF.getText().length() >100) return false;\n\t\t//if(numero < 0) return false;\n\t\tif(numero_double < 0) return false;\n\t\n\t\treturn true;\n\t}", "boolean hasMent();", "@Test\n public void testIsApellido_Materno() {\n System.out.println(\"isApellido_Materno\");\n String AM = \"Proud\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Materno(AM);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n\n }", "@Test\n public void testIsNombre() {\n System.out.println(\"isNombre\");\n String Nom = \"Alfred\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isNombre(Nom);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void testGetMentee() {\n\t\tassertThat(mentor.getMentees().get(0)).isEqualTo(mentee);\n\t}", "@Override\r\n\tpublic void solicitarMonto(int monto) {\n\t\tSystem.out.println(\"Comprobar dinero dentro de la cuenta\");\r\n\t\tSystem.out.println(\"Leer monto\");\r\n\t}", "public boolean validarIngresosUsuario_proveedor(JTextField proveedorTF, JTextField detalleTF,\n\t\t\tJTextField montoTF){\n\t\t\n\t\tif(!validarDouble(montoTF.getText())) return false;\n\t\tif(montoTF.getText().length() >30) return false;\n\t\tif(!validarInt(proveedorTF.getText())) return false;\n\t\tif(proveedorTF.getText().length() >30) return false;\n\t\tif(detalleTF.getText().equals(\"\")) return false;\n\t\tif(detalleTF.getText().length() >100) return false;\n\t\t//if(numero < 0) return false;\n\t\tif(numero_double < 0) return false;\n\t\n\t\treturn true;\n\t}", "private boolean temMunicao() {\n\t\t\n\t\tif (round<1) {\n\t\t\tsetSemMunicao(true);\n\t\t\treturn false;\n\t\t\t\n\t\t}else \n\t\t\tsetSemMunicao(false);\n\t\t\n\t\t\n\t\treturn true;\n\t}", "@Test\n public void nao_deve_aceitar_tamanho_telefone_fixo_com_menos_de_8_numeros() {\n telefone.setTamanho(7);\n assertFalse(isValid(telefone, \"O tamanho do telefone não pode ser menor que 8.\", Find.class));\n }", "@Test\n\tpublic void testaGetMensagem() {\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 1 eh avaliada com 5 minitestes, eliminando 1 dos mais baixos.\",\n\t\t\t\tminitElimBai_1.getMensagem());\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 2 eh avaliada com 10 minitestes, eliminando 2 dos mais baixos.\",\n\t\t\t\tminitElimBai_2.getMensagem());\n\t}", "@Test\r\n public void testGetMois() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : getMois\");\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setMois(\"octobre\");\r\n String expResult = \"octobre\";\r\n String result = instance.getMois();\r\n assertEquals(expResult, result);\r\n }", "public void setMonto(double monto) {\r\n\t\tthis.monto = monto;\r\n\t}", "@Test\n\tpublic void testLecturaNombre() {\n\t\tassertTrue(!esquemaReal.getNombrePatron().equals(\"\"));\n\t}", "@Test\n\tpublic void testActualizaEmp() {\n\n\t\tboolean valor = serv.actualizaEmp(empl, \"tel\", \"55677354\");\n\t\tassertEquals(\"Se esperaba un false\",valor, true);\n\t}", "@Test\n public void testIsEmail() {\n System.out.println(\"isEmail\");\n String em = \"[email protected]\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isEmail(em);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\r\n public void testSetMatin() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : setMatin\");\r\n boolean matin = false;\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setMatin(matin);\r\n assertEquals(matin, instance.isMatin());\r\n }", "@Test\r\n public void testVerificaPossibilidade2() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\r\n public void testVerificaPossibilidade() {\r\n usucapiao.setAnimusDomini(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public boolean verificaTrasicaoVazia(){\n\n //verifica se dentro das transicoes tem alguma saindo com valor vazio;\n for (int i = 0; i < this.transicoes.size(); i++) {\n if(this.transicoes.get(i).simbolo.equals(Automato_Servico.valorVazio)){\n return true;\n }\n }\n return false;\n }", "public void verificarMensagem(String m){\r\n\t\tboolean verificaM =\tmensagem.getText().equals(m);\r\n\t\tAssert.assertTrue(verificaM);\r\n\t\tlogPrint(\"Mensagem apareceu\");\r\n\t}", "@Test\r\n\t\tpublic void testMovimientoTorreNegra0() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8a. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "public boolean hasMunicipality() {\n\t\tif (this.settlement == null && this.city == null) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "@Test\r\n public void testSetMois() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : setMois\");\r\n String mois = \"octobre\";\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setMois(mois);\r\n assertEquals(instance.getMois(), mois);\r\n }", "@Test\n public void testExecutarAcao() {\n try {\n SBCore.configurar(new ConfiguradorCoreShortMessageService(), SBCore.ESTADO_APP.DESENVOLVIMENTO);\n ItfResposta resposta = FabIntegracaoSMS.ENVIAR_MENSAGEM.getAcao(\"+5531971125577\", \"Teste\").getResposta();\n Assert.notNull(resposta, \"A resposta foi nula\");\n\n if (!resposta.isSucesso()) {\n resposta.dispararMensagens();\n }\n Assert.isTrue(resposta.isSucesso(), \"Falha enviando SMS\");\n\n } catch (Throwable t) {\n SBCore.RelatarErro(FabErro.SOLICITAR_REPARO, \"Erro \" + t.getMessage(), t);\n }\n }", "@Test\n public void testIsApellido_Paterno() {\n System.out.println(\"isApellido_Paterno\");\n String AP = \"ulfric\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Paterno(AP);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "private void checkAttoAmministrativoNonAbbinato() {\n\t\tAllegatoAtto aa = allegatoAttoDad.findAllegatoAttoByAttoAmministrativo(allegatoAtto.getAttoAmministrativo());\n\t\tif(aa!=null){\n\t\t\tres.setAllegatoAtto(aa);\n\t\t\tthrow new BusinessException(ErroreFin.ATTO_GIA_ABBINATO.getErrore(\"\"));\n\t\t}\n\t}", "@Test\r\n public void testGetValorValido() {\r\n PapelMoeda instance = new PapelMoeda(100, 100);\r\n int expResult = 100;\r\n int result = instance.getValor();\r\n assertEquals(expResult, result);\r\n }", "boolean hasMoney();", "@Override public int conocerMonto(){\n\treturn 120;\n }", "@Test\r\n\t\tpublic void testMovimientoTorreNegra0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreNegra0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos del rey negro en el inicio de una aprtida en la posición 8h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "private boolean isPosicaoEstatal(int posicao) {\n\n boolean estatal = false;\n if (posicao == 12 || posicao == 28) {\n return true;\n } else {\n return false;\n }\n }", "double getMonto();", "double getMonto();", "@Test\r\n public void testGetMicentro() {\r\n System.out.println(\"getMicentro\");\r\n Servicio_CentroEcu instance = new Servicio_CentroEcu();\r\n CentroEcu_Observado expResult = new CentroEcu_Observado();\r\n instance.setMicentro(expResult);\r\n assertEquals(expResult, instance.getMicentro());\r\n }", "public boolean depositarB(Double monto) {\n if(paractual.cuentaB.getEstado() == \"Activo\" && paractual.cuentaA.getSaldo() > 0) {\n // Pasamos saldo a B\n paractual.setSaldoB(paractual.cuentaB.getSaldo() + monto);\n return true;\n }\n return false;\n }", "public double getMonto() {\r\n\t\treturn monto;\r\n\t}", "public boolean validarIngresosUsuario_sueldo(JTextField empleadoTF, JTextField montoTF){\n\t\t\tif(!validarDouble(montoTF.getText())) return false;\n\t\t\tif(montoTF.getText().length() >30) return false;\n\t\t\tif(!validarInt(empleadoTF.getText())) return false;\n\t\t\tif(numero==33) return false; //codigo halcones\n\t\t\tif(empleadoTF.getText().length() >30) return false;\n\t\t\t//if(numero < 0) return false;\n\t\t\tif(numero_double < 0) return false;\n\t\t\n\t\t\treturn true;\n\t}", "protected void pontoVerificacao(boolean validacao, Object check) {\n Log.info(\"Status: \" + validacao + \" | \" + check);\n getSoft().assertTrue(validacao, (String) check);\n }", "@Test\n\tpublic void testDarMotivoIngreso()\n\t{\n\t\tassertEquals(\"El motivo de ingreso esperado es: Accidente\", Motivo.ACCIDENTE, paciente.darMotivoIngreso());\n\t}", "@Test\n public void testPartieFinie() {\n Joueur NORD = new Joueur(\"NORD\");\n assertFalse(Regles.partieFinie(NORD));\n NORD.jeu.clear();\n for (int i = 0; i < NORD.getNbPioche();) {\n NORD.piocherCarte();\n NORD.jeu.clear();\n }\n assertTrue(Regles.partieFinie(NORD));\n }", "@Test\n public void nao_deve_aceitar_tamanho_telefone_fixo_com_mais_de_9_numeros() {\n telefone.setTamanho(10);\n assertFalse(isValid(telefone, \"O tamanho do telefone não pode ser maior que 9.\", Find.class));\n }", "public boolean baterPonto(Date dataHora) {\n\t\tSystem.out\n\t\t\t\t.println(\"Vou bater o ponto do Diretor de matricula: \" + this.matricula + \"-\" + dataHora.toString());\n\t\treturn true;\n\t}", "@Test\r\n\t\tpublic void testMovimientoTorreBlanca0() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1a. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "@Test\n public void testMueve()\n throws MenorQueUnoException {\n Tablero tablero4 = new Tablero(2);\n\n boolean obtenido = false;\n\n assertEquals(tablero4.mueve(3), false);\n assertEquals(tablero4.mueve(4), false);\n assertEquals(tablero4.mueve(1), true);\n\n assertEquals(tablero4.mueve(1), false);\n assertEquals(tablero4.mueve(4), false);\n assertEquals(tablero4.mueve(2), true);\n\n assertEquals(tablero4.mueve(1), false);\n assertEquals(tablero4.mueve(2), false);\n assertEquals(tablero4.mueve(3), true);\n\n assertEquals(tablero4.mueve(2), false);\n assertEquals(tablero4.mueve(3), false);\n assertEquals(tablero4.mueve(4), true);\n\n assertEquals(tablero4.mueve(2), true);\n\n }", "boolean hasAmount();", "boolean hasAmount();", "public boolean esMorosa() {\r\n\t\tboolean esMorosa = false;\r\n\t\tfor (Cuenta c : cuentas) {\r\n\t\t\tif (c != null) {\r\n\t\t\t\tif (c.getSaldo() < 0) {\r\n\t\t\t\t\tesMorosa = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esMorosa;\r\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_menos_de_15_caracteres() {\n telefone.setDescricao(random(35, true, false));\n assertFalse(isValid(telefone, \"A descrição não pode ter menos de 15 e mais de 30 caracteres.\", Find.class));\n }", "@Test\r\n\t\tpublic void testMovimientoTorreBlanca0a() {\r\n\t\t \r\n\t\t\tDatosPrueba prueba = new DatosPrueba(torreBlanca0a,\r\n\t\t\t\t\t\"Error al comprobar los movimientos de la torre blanca en el inicio de una aprtida en la posición 1h. \");\r\n\t\t\tboolean res = this.testMovimientos(prueba); \r\n\t\t\tassertTrue(prueba.getMensaje(), res);\r\n\t\t \r\n\t\t}", "public boolean verificaNumero() {\n if (contemSomenteNumeros(jTextFieldDeposita.getText()) || contemSomenteNumeros(jTextFieldSaca.getText())\n || contemSomenteNumeros(jTextFieldTransfere.getText())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(this, \"Digite somente números, por favor. \", \"Atenção !!\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }", "@Test\n public void testVerifyNome() {\n System.out.println(\"verifyNome\");\n boolean expResult = true;\n boolean result = uv.verifyNome(u);\n assertEquals(expResult, result);\n }", "public void consultaDinero(){\r\n System.out.println(this.getMonto());\r\n }", "@Test\r\n public void CriterioTipoNoCumple()\r\n {\r\n CriterioDeCorreccion criterio = new UnoDeCadaTipoCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoNoAprobado(criterio);\r\n \r\n assertFalse(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 0); \r\n }", "@Test\n\tpublic void testLecturaFrom(){\n\t\tassertEquals(esquemaEsperado.getExpresionesFrom().toString(), esquemaReal.getExpresionesFrom().toString());\n\t}", "boolean getEntrench(Unit unit);", "@Test\r\n public void testVerificaPossibilidade3() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\n public void testCheckPlaceVerticaleMembreDehors() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n try {\n j.checkPlace(\"A8\", g, 5, false);\n fail(\"Une exception devrai etre lancée\");\n }\n catch (Exception e) {\n assertTrue(\"L'exception n'est pas bonne\", e instanceof BateauxMembreInvalide);\n }\n }", "@Test\n public void testSalaire() {\n Assert.assertTrue(e.calculSalaire() == 15 * 20 + e.getSalaire());\n }", "@Test\n public void proveraTransfera() {\n Account ivana = mobi.openAccount(\"Ivana\");\n Account pera = mobi.openAccount(\"Pera\");\n\n mobi.payInMoney(ivana.getNumber(), 5000.0);\n mobi.transferMoney(ivana.getNumber(), pera.getNumber(), 2000.0);\n //ocekujemo da nakon ovoga ivana ima 3000, a pera 2000\n\n SoftAssert sa = new SoftAssert();\n sa.assertEquals(ivana.getAmount(), 3000.0);\n sa.assertEquals(pera.getAmount(), 2000.0);\n\n sa.assertAll();\n }", "boolean getMovimentoPassante();", "@Test\n public void nao_deve_aceitar_descricao_com_a_primeira_letra_minuscula() {\n telefone.setDescricao(\"celular empresarial.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "public boolean esMayorDeEdad(){\r\n \t\tboolean mayor=false;\r\n \t\tif (obtenerAnios()>=18){\r\n\t\t\tmayor=true;\r\n\t\t}\r\n\t\treturn mayor;\r\n\t}", "boolean isSetAmount();", "public boolean vacio() {\r\n return (tamaño == 0);\r\n }", "@Test\n\tpublic void vero_se_e_solo_se_un_prestito_uguale_a_se_stesso() {\n\t\tassertTrue(prestito.equals(prestito),\"Prestito uguale sse uguale a se stesso\");\n\t}", "private boolean verificaDados() {\n if (!txtNome.getText().equals(\"\") && !txtProprietario.getText().equals(\"\")) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"Falta campos a ser preenchido\", \"Informação\", 2);\n return false;\n }\n }", "@Test\n public void usuarioPreguntaEnPublicacion() {\n Mensaje mp = new Mensaje();\n mp.setPublicacionId(2);\n mp.setPregunta(\"Es jugueton??\");\n mp.guardarPregunta(usuario.getToken());\n assertTrue(mp.getId() > 0);\n\n }", "@Test\r\n public void CriterioTipoSiCumple()\r\n {\r\n CriterioDeCorreccion criterio = new UnoDeCadaTipoCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoAprobado(criterio);\r\n \r\n assertTrue(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 4); \r\n }", "@Test\r\n public void testVerificaPossibilidade4() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n usucapiao.setPosseIninterrupta(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\n public void nao_deve_aceitar_descricao_vazia() {\n telefone.setDescricao(EMPTY);\n assertFalse(isValid(telefone, \"A descrição não pode ser nula ou vazia.\", Find.class));\n }", "@Test\n\tvoid testeEquals() \n\t{\n\t\tContato outro = new Contato(\"Matheus\", \"Gaudencio\", \"1234\");\n\t\tassertTrue(outro.equals(contatoBasico));\n\t}", "@Test\r\n public void testisMenber1() {\r\n Assert.assertEquals(true, set1.isMember(4));\r\n }", "public boolean esmenor(){\n //este metodo no aplica en la resolución del caso de uso planteado\n //sólo sirve para determinar si el participante es menor de edad para \n //poner como obligatorio el campo nombreTutor de acuerdo a las reglas\n //del negocio.\n return false;\n }", "private Boolean esMejor() {\n if(debug) {\n System.out.println(\"**********************esMejor\");\n }\n \n if(this.solOptima == null || (this.sol.pesoEmparejamiento < this.solOptima.pesoEmparejamiento)) return true;\n else return false;\n }", "@Test\n public void test1() throws Throwable {\n SitNFe sitNFe0 = SitNFe.COM_DANFE;\n boolean boolean0 = sitNFe0.isReenviar();\n assertEquals(false, boolean0);\n }", "private boolean jaTemDono(int posicao) {\n String nomeDono = Donos.get(posicao).toString();\n return (this.isUmJogador(nomeDono));\n\n }", "public void checkbatiment(int numerobatiment) throws BatimentInconnuException{\n\t\tBatiment B = rechercheBatimentnum(numerobatiment);\n\t\tboolean result;\n\t\tint i;\n\t\tresult=true;\n\t\ti=0;\n\t\tList<Organe> organes = rechercheOrganeBatiment(numerobatiment);\n\t\tif(organes!=null){\n\t\t\twhile(result==true && i<organes.size()){\n\t\t\t\tif(organes.get(i).isMarche()==false){\n\t\t\t\t\tresult=false;\n\t\t\t}\n\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tB.setMarche(result);\n\t\tem.merge(B);\n\t}", "@Test\n\tvoid testeContato()\n\t{\n\t\tString msg = \"Esperando obter nome completo\";\n\t\tassertEquals(\"Matheus Gaudencio\", contatoBasico.nomeCompleto(), msg);\n\t}", "@Test\n public void publicadorPreguntaEnPublicacionAPostulante() {\n Mensaje mp = new Mensaje();\n mp.setPublicacionId(7);\n mp.setPregunta(\"Tenes jardin?\");\n mp.setUsuarioPreguntaId(usuario.getId());\n mp.setUsuarioRespuestaId(3);\n mp.guardarPregunta(usuario.getToken());\n assertTrue(mp.getId() > 0);\n\n }", "@Test\r\n public void testGetQuantidadeValido() {\r\n PapelMoeda instance = new PapelMoeda(100, 100);\r\n int expResult = 100;\r\n int result = instance.getQuantidade();\r\n assertEquals(expResult, result);\r\n }", "@Test\n void gelijkeTelefoonNrsHebbenHetzelfdeNummerBis() {\n assertThat( nummer1.getNummer() ).isEqualTo( nogEensNummer1.getNummer() );\n }", "@Test\n public void nao_deve_aceitar_descricao_com_mais_de_30_caracteres() {\n telefone.setDescricao(random(35, true, false));\n assertFalse(isValid(telefone, \"A descrição não pode ter menos de 15 e mais de 30 caracteres.\", Find.class));\n }", "private boolean evaluarEntrada(Date fechaPoliza, AnalisisDeFlete det) {\r\n\t\treturn true;\r\n\t}", "public Mensaje (double monto) {\n this.respuesta = true;\n this.monto = monto;\n }", "@Test\r\n public void testIsMidi() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : isMidi\");\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setMidi(false);\r\n boolean expResult = false;\r\n boolean result = instance.isMidi();\r\n assertEquals(expResult, result);\r\n }", "@Test\n\tpublic void testIsAccountNonExpired() {\n\t\tassertTrue(user.isAccountNonExpired());\n\t}", "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 }", "@Test\n\t void testAccountNonExpired() {\n\t\tassertTrue(user.isAccountNonExpired());\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_numeros() {\n telefone.setDescricao(random(10, true, true));\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "public static boolean testPokemomGetSet() {\r\n Pokemon inst = new Pokemon(\"name\", \"type1\", \"type2\", 2, 3, 4, 5, 6, 7, 8, false, false);\r\n if (!Objects.equals(inst.getName(), \"name\") || !Objects.equals(inst.getType1(), \"type1\")\r\n || !Objects.equals(inst.getType2(), \"type2\") || !Objects.equals(inst.getHp(), 2)\r\n || !Objects.equals(inst.getAttack(), 3) || !Objects.equals(inst.getDefense(), 4)\r\n || !Objects.equals(inst.getSpAttack(), 5) || !Objects.equals(inst.getSpDefense(), 6)\r\n || !Objects.equals(inst.getSpeed(), 7) || !Objects.equals(inst.getTotal(), 8)\r\n || !Objects.equals(inst.isLegendary(), false) || !Objects\r\n .equals(inst.getFavorite(), false)) {\r\n return false;\r\n }\r\n inst.setName(\"sName\");\r\n inst.setType1(\"ttype1\");\r\n inst.setType2(\"ttype2\");\r\n inst.setHp(11);\r\n inst.setAttack(10);\r\n inst.setDefense(33);\r\n inst.setSpAttack(44);\r\n inst.setSpDefense(41);\r\n inst.setSpeed(1);\r\n inst.setTotal(222);\r\n inst.setLegendary(true);\r\n inst.setFavorite(true);\r\n if (!Objects.equals(inst.getName(), \"sName\") || !Objects.equals(inst.getType1(), \"ttype1\")\r\n || !Objects.equals(inst.getType2(), \"ttype2\") || !Objects.equals(inst.getHp(), 11)\r\n || !Objects.equals(inst.getAttack(), 10) || !Objects.equals(inst.getDefense(), 33)\r\n || !Objects.equals(inst.getSpAttack(), 44) || !Objects.equals(inst.getSpDefense(), 41)\r\n || !Objects.equals(inst.getSpeed(), 1) || !Objects.equals(inst.getTotal(), 222)\r\n || !Objects.equals(inst.isLegendary(), true) || !Objects\r\n .equals(inst.getFavorite(), true)) {\r\n return false;\r\n }\r\n return true;\r\n }", "public void testtraduciraOSM()\n\t\t{\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.6\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.7\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo3= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.8\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())!=tipo1.traduciraOSM(tipo1.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.9\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())!=tipo2.traduciraOSM(tipo2.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.10\")); //$NON-NLS-1$\n\t\t\tif (tipo1.traduciraOSM(tipo1.getValorTipo())==tipo3.traduciraOSM(tipo3.getValorTipo()))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.11\")); //$NON-NLS-1$\n\t\t}", "boolean hasMoneyValue();", "boolean hasMoneyValue();", "@Test\r\n public void CriterioUnidadSiCumple()\r\n {\r\n CriterioDeCorreccion criterio = new UnaDeCadaUnidadCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoAprobado(criterio);\r\n \r\n assertTrue(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 4); \r\n }", "@Override\n\tpublic boolean validare(Client t) {\n\t\tboolean ok = true;\n\t\tif (!this.validareEmail(t))\n\t\t\tok = false;\n\t\tif (!this.validareNume(t))\n\t\t\tok = false;\n\n\t\treturn ok;\n\t}" ]
[ "0.695648", "0.6621337", "0.64287585", "0.62928915", "0.62492996", "0.6133738", "0.61177355", "0.603015", "0.592576", "0.58206266", "0.5786982", "0.5770768", "0.57647234", "0.57630587", "0.5751455", "0.5740243", "0.57184577", "0.5714145", "0.57108694", "0.5703117", "0.5682123", "0.56547374", "0.5639382", "0.5629533", "0.56288177", "0.56229925", "0.5620304", "0.56196463", "0.56088513", "0.5608552", "0.56022424", "0.5599848", "0.55990034", "0.55923814", "0.5589941", "0.5575139", "0.55749357", "0.55749357", "0.55522984", "0.5551471", "0.5550329", "0.5547832", "0.55475813", "0.5547254", "0.5547023", "0.5510216", "0.5499795", "0.5499475", "0.5497836", "0.5494786", "0.5494786", "0.5491488", "0.54881924", "0.5479732", "0.54778945", "0.5469436", "0.5459712", "0.54585826", "0.5447255", "0.54465455", "0.54409754", "0.5438252", "0.54371375", "0.54357576", "0.54302", "0.54264295", "0.54220426", "0.5419191", "0.5409758", "0.5408437", "0.5395783", "0.5391686", "0.53704387", "0.53661966", "0.53642875", "0.5360552", "0.535912", "0.5355506", "0.53549165", "0.53527135", "0.5351368", "0.5349402", "0.534376", "0.53385824", "0.5337016", "0.5334378", "0.5333726", "0.53336275", "0.53324926", "0.5324835", "0.5307252", "0.53033733", "0.529558", "0.52932054", "0.52871114", "0.52870846", "0.5286153", "0.5286153", "0.5285346", "0.5283463" ]
0.80690217
0
Test of isValidarFecha method, of class Entradas.
@Test public void testIsValidarFecha() { System.out.println("isValidarFecha"); String fecha = "06/09/2018"; boolean expResult = true; boolean result = Entradas.isValidarFecha(fecha); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean validarFecha(LocalDate fechaIngresada);", "public boolean validarFecha(LocalDate fecha) { \n // se comprueba que la fecha sea anterior o igual a la actual\n return fecha.isBefore(LocalDate.now()) || fecha.isEqual(LocalDate.now());\n }", "public boolean validarFecha(Date fecha) {\n\t\tif(!fecha.before(Calendar.getInstance().getTime())) {\n\t\t\tJOptionPane.showMessageDialog(null, \"La fecha introducida es invalida\",\"Fecha invalida\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\treturn false;\n\t\t}else return true; \n\t}", "@Test\n @Disabled\n public void testValidateFecha() {\n assertTrue(RegExprMain.validateFecha(\"10/06/2022\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2011\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2015\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2016\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2021\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/1999\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2007\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2000\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2002\"));\n assertFalse(RegExprMain.validateFecha(\"38/06/2009\"));\n assertFalse(RegExprMain.validateFecha(\"10/20/2010\"));\n \n \n\n }", "public static boolean validarFecha(String fecha)\n\t{\n\t\tCalendar calendario = Calendar.getInstance();\n\t \tint hora,minutos,segundos,dia,mes,ano;\n\t \thora =calendario.get(Calendar.HOUR_OF_DAY);\n\t \tminutos = calendario.get(Calendar.MINUTE);\n\t \tsegundos = calendario.get(Calendar.SECOND);\t \t\n\t \t\n\t \tdia = calendario.get(Calendar.DAY_OF_MONTH);\n\t \tmes = calendario.get(Calendar.MONTH);\n\t \tmes=mes+1;\n\t\tano = calendario.get(Calendar.YEAR);\t\t\n\t\tString diaFecha;\n\t\tString mesFecha;\n\t\tString anoFecha = null;\n\t\t\n\t\tint pos = 0;\n\t\tpos = fecha.indexOf('/');\n\t\tSystem.out.println(\"la posicion del primer slash es: \"+pos);\n\t\tdiaFecha = fecha.substring(0,pos);\n\t\tString resto = fecha.substring(pos+1,fecha.length());\n\t\tint pos2 = 0;\n\t\tpos2 = resto.indexOf('/');\n\t\tmesFecha = resto.substring(0,pos2);\n\t\tString resto2 = resto.substring(pos2+1,resto.length());//resto 3 es el ano\t\t\n\t\tSystem.out.println(\"la fecha es:\"+diaFecha+\",\"+mesFecha+\",\"+resto2);\t\t\n\t\tint diaInt,mesInt,anoInt;\n\t\tdiaInt=Integer.parseInt(diaFecha);\n\t\tmesInt=Integer.parseInt(mesFecha);\n\t\tanoInt=Integer.parseInt(resto2);\t\t\n\t\tSystem.out.println(\"fechaSistema:\"+dia+\"/\"+mes+\"/\"+ano);\n\t\tSystem.out.println(\"fechaEntrada:\"+diaInt+\"/\"+mesInt+\"/\"+anoInt);\n\t\tif ((anoInt<ano))\n\t\t{\n\t\t\tSystem.out.println(\"fecha de entrada es menor\");\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (mesInt<mes)\n\t\t\t{\t\t\t\t\n\t\t\t\tSystem.out.println(\"fecha de entrada es menor\");\n\t\t\t\treturn true;\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (diaInt < dia)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"fecha de entrada es menor\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n \t\n\t}", "public void validar(Date fechaDesde, Date fechaHasta, int idOrganizacion)\r\n/* 43: */ throws ExcepcionAS2Financiero\r\n/* 44: */ {\r\n/* 45: 86 */ this.periodoDao.validar(fechaDesde, fechaHasta, idOrganizacion);\r\n/* 46: */ }", "@Test\n public void testconvertDateYearsLongueurPasValide() {\n FieldVerifier projet = new FieldVerifier();\n boolean longueurInvalideTest = projet.isValidDate(\"01/05/102\");\n assertEquals(false, longueurInvalideTest);\n }", "public boolean verificarFechaEspecifica(Date fecha){\n if(fecha==null|| fecha.equals(\"\")){\n return false;\n }else{\n return true;\n }\n }", "public boolean validarCampos() {\n\t\tboolean valid = true;\n\t\t\n\t\tif(!Util.isDateNotNull(this.getAgendaMedico().getData())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getAgendaMedico().getHorarioInicioAtendimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getAgendaMedico().getHorarioFimAtendimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\t\n\t\tif(valid) {\n\t\t\tif(this.getAgendaMedicoDAO().verificaAgendamentoHorario(this.getMedicoSessao(), this.getAgendaMedico())) {\n\t\t\t\tthis.tratarMensagemErro(null, \"MSG014\");\n\t\t\t\tvalid = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn valid;\n\t}", "public void isFechaCorrecta(Date fecha, UIComponent componente){\n\t\tif(TratamientoFechas.esFechaValida(fecha)){\n\t\t\tFacesUtils.cambiarAtributoComponente(componente.getClientId(), \"styleClass\", \"\");\n\t\t}else{ \n\t\t\tFacesUtils.cambiarAtributoComponente(componente.getClientId(), \"styleClass\", Constantes.CSS_CALENDAR_ERROR);\n\t\t}\n\t\tRequestContext.getCurrentInstance().update(componente.getClientId());\n\t}", "private boolean evaluarEntrada(Date fechaPoliza, AnalisisDeFlete det) {\r\n\t\treturn true;\r\n\t}", "public boolean validarFechaNac() {\n\t\treturn fecha_nac != null;\n\t}", "private boolean validarDados(String dados) throws ParseException, SQLException {\n\t\ttry {\r\n\t\t\tString licencaFull = SystemManager.getProperty(\"licenca.sistema\");\r\n\t\t\tlicencaFull = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).decripto(licencaFull);\r\n\t\t\tif (licencaFull != null && licencaFull.equals(\"ENTERPRISE EDITION\")) {\r\n\t\t\t\twrite(\"ok\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (Exception ex) {\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\tCalendar dataAtual = Calendar.getInstance();\r\n\t\t\r\n\t\t// Checa os dados\r\n\t\tString dataStr = dados.substring(0, 10);\r\n\t\tCalendar data = Calendar.getInstance(); \r\n\t\tdata.setTime(sdf.parse(dataStr));\r\n\t\t\r\n\t\t// Verifica se já está vencido...\r\n\t\tif (data.before(dataAtual)) {\r\n\t\t\t// o campo fieldname indica se podera ou nao fechar a janela\r\n\t\t\tint diasAtual = (dataAtual.get(Calendar.YEAR) * 365) + dataAtual.get(Calendar.DAY_OF_YEAR); \r\n\t\t\tint dias = (data.get(Calendar.YEAR) * 365) + data.get(Calendar.DAY_OF_YEAR);\r\n\t\t\tint diferenca = diasAtual - dias;\r\n\t\t\twriteErrorMessage(\"Sistema vencido à \" + diferenca + \" dias!\", diferenca>30?\"N\":\"S\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Verifica o CNPJ da loja\r\n\t\tString cnpj = dados.substring(11, 25);\r\n\t\tif (!cnpj.equals(lojasessao.getCNPJLoja())) {\r\n\t\t\twriteErrorMessage(\"Cnpj da licença difere do Cnpj desta loja!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tint quantidadeUsuariosLicenca = Integer.parseInt(dados.substring(26, 31));\r\n\t\t\r\n\t\t// Verifica numero de usuarios\r\n\t\tUsuarioDAO usuDao = new UsuarioDAO();\r\n\t\tList<UsuarioVO> list = usuDao.getList();\r\n\t\t\r\n\t\t// Verifica quantos estao ativos\r\n\t\tint quantidadeAtivos = 0;\r\n\t\tfor (UsuarioVO usuario : list) {\r\n\t\t\tif (usuario.isAtivo()) {\r\n\t\t\t\tquantidadeAtivos++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (quantidadeUsuariosLicenca < quantidadeAtivos) {\r\n\t\t\twriteErrorMessage(\"Licença inválida para a quantidade de usuários ativos no sistema!\", \"N\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t// Salva a data de hoje\r\n\t\tParametroLojaVO parmData = new ParametroLojaVO();\r\n\t\tparmData.setChaveParametro(Constants.Parameters.Licenca.DATA_SISTEMA);\r\n\t\tparmData.setCodigoEmpresa(empresasessao.getCodigoEmpresa());\r\n\t\tparmData.setCodigoLoja(lojasessao.getCodigoLoja());\r\n\t\t\r\n\t\tParametroLojaDAO dao = new ParametroLojaDAO();\r\n\t\tparmData = dao .get(parmData);\r\n\t\t\r\n\t\tif (parmData == null) {\r\n\t\t\tparmData = new ParametroLojaVO();\r\n\t\t\tparmData.setChaveParametro(Constants.Parameters.Licenca.DATA_SISTEMA);\r\n\t\t\tparmData.setCodigoEmpresa(empresasessao.getCodigoEmpresa());\r\n\t\t\tparmData.setCodigoLoja(lojasessao.getCodigoLoja());\r\n\t\t\tparmData.setNewRecord(true);\r\n\t\t}\r\n\t\t\r\n\t\tString dataHojeStr = sdf.format(Utils.getToday());\r\n\t\t\r\n\t\ttry {\r\n\t\t\tdataHojeStr = Criptografia.newInstance(SystemManager.getProperty(Constants.Parameters.Licenca.LICENCA_KEY)).cripto(dataHojeStr);\r\n\t\t} catch (Exception e) { }\r\n\t\t\r\n\t\tparmData.setValorParametro(dataHojeStr);\r\n\t\tdao.persist(parmData);\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Test\n public void testGetFechaPago() {\n System.out.println(\"getFechaPago\");\n DateFormat format = new SimpleDateFormat(\"dd/mm/yyyy\"); // Creamos un formato de fecha\n Date expResult = null;\n try {\n expResult = format.parse(\"1/10/2019\");\n } catch (ParseException ex) {\n Logger.getLogger(PersonaTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n Date result = detalleAhorro.getFechaPago();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public boolean isValid() {\n if (this.month >= 1 && this.month <= 12 && this.day >= 1 && this.day < 32) {\n\n if ((this.month == 1 || this.month == 3 || this.month == 5 || this.month == 7 || this.month == 8\n || this.month == 10 || this.month == 12) && this.day > 30) {\n return false;\n } else if (this.month == 2 && this.day > 29) {\n return false;\n } else if (this.month == 2 && this.day > 28 && !isLeap(this.year)) {\n return false;\n } else {\n return true;\n }\n\n } else {\n return false;\n }\n }", "boolean isValidFor (@Nonnull DATATYPE aDate);", "public void validarFechas(AjaxBehaviorEvent evento)\n\t {\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\tUIInput theInput = (UIInput)evento.getSource();\n\t CalendarViogen a=(CalendarViogen)theInput;\n\t isFechaCorrecta((Date) a.getValue(), evento.getComponent());\n\t }", "public static boolean validarFecha(String fecha) {\n return validar(\"[0-9]{4}[-/][0-9]{2}[-/][0-9]{2}|[0-9]{2}[-/][0-9]{2}[-/][0-9]{4}\", fecha);\n }", "public void validar(View v) {\r\n //Compruebo que se hayan insertado todos los datos\r\n SimpleDateFormat formatoFecha = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n if(!nombre.getText().toString().equals(\"\")\r\n &&!mail.getText().toString().equals(\"\")\r\n &&!fecha.getText().toString().equals(\"\")) {\r\n //Si se han introducido todos los datos compruebo la edad\r\n fNac = null;\r\n fActual = null;\r\n\r\n try {\r\n fNac = formatoFecha.parse(fecha.getText().toString());\r\n fActual = new Date();\r\n edad = (int) ((fActual.getTime() - fNac.getTime()) / 1000 / 60 / 60 / 24 / 360);//Calculo la edad\r\n //Compruebo si es mayor de edad\r\n if (edad < 18)\r\n //Error si es menor de edad\r\n Toast.makeText(getApplicationContext(), R.string.menorDeEdad, Toast.LENGTH_LONG).show();\r\n else {//Si todo es correcto devuelve los datos introcucidos a la pantalla principal.\r\n Toast.makeText(getApplicationContext(), R.string.registroCompletado, Toast.LENGTH_LONG).show();\r\n Intent i = new Intent();\r\n i.putExtra(\"REGISTRADO\", true);\r\n i.putExtra(\"NOMBRE\", nombre.getText().toString());\r\n i.putExtra(\"MAIL\", mail.getText().toString());\r\n i.putExtra(\"FECHA\", fecha.getText().toString());\r\n setResult(RESULT_OK,i);\r\n finish();\r\n }\r\n } catch (Exception e) {\r\n Toast.makeText(getApplicationContext(), \"Error\", Toast.LENGTH_LONG).show();//Si no se ha introducido ninguna fecha\r\n }\r\n }else\r\n Toast.makeText(getApplicationContext(), R.string.toastFaltanDatos, Toast.LENGTH_LONG).show();\r\n }", "@Test\n public void testGetFecha() {\n System.out.println(\"getFecha\");\n Reserva instance = new Reserva();\n Date expResult = null;\n Date result = instance.getFecha();\n assertEquals(expResult, result);\n \n }", "public Date validarFechaFinGarantia(Date fechaFinGarantia) {\r\n\r\n\r\n try {\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.setTime(fechaFinGarantia);\r\n if (calendar.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {\r\n List<Date> festivos = Utils.calcularFestivosCol(String.valueOf(calendar.get(Calendar.YEAR)));\r\n do {\r\n calendar.add(Calendar.DAY_OF_MONTH, 1);\r\n } while (festivos.contains(calendar.getTime()));\r\n\r\n fechaFinGarantia = calendar.getTime();\r\n }\r\n\r\n } catch (ParseException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return fechaFinGarantia;\r\n\r\n }", "public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}", "@Test\n public void testGetFechaFin() {\n System.out.println(\"getFechaFin\");\n Reserva instance = new Reserva();\n Date expResult = null;\n Date result = instance.getFechaFin();\n assertEquals(expResult, result);\n \n }", "@Test\n public void testIsValidateDate() {\n System.out.println(\"isValidateDate\");\n String dateString = \"2016-03-23T10:25:01Z\";\n boolean expResult = true;\n boolean result = DateUtil.isValidateDate(dateString);\n assertEquals(expResult, result);\n }", "public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}", "public boolean isValidDate() {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(mDate.getDate());\n int yearNow = cal.get(Calendar.YEAR);\n int monthNow = cal.get(Calendar.MONTH);\n int dayNow = cal.get(Calendar.DAY_OF_MONTH);\n cal.setTimeInMillis(selectedDate.getTimeInMillis());\n int yearSelected = cal.get(Calendar.YEAR);\n int monthSelected = cal.get(Calendar.MONTH);\n int daySelected = cal.get(Calendar.DAY_OF_MONTH);\n if (yearSelected <= yearNow) {\n if (monthSelected <= monthNow) {\n return daySelected >= dayNow;\n }\n }\n return true;\n }", "private boolean compararFechaActualCon(String fecha_obtenida) {\n boolean fecha_valida = false;\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n Date date = new Date();\n String fecha_actual = dateFormat.format(date);\n\n try {\n Date date2 = dateFormat.parse(fecha_obtenida);\n Date date1 = dateFormat.parse(fecha_actual);\n\n Log.i(\"COMPARANDO FECHAS\", \"F_ACTUAL: \" + date1 + \", F_OBTENIDA: \" + date2);\n\n if (date2.after(date1) ) {\n fecha_valida = true;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: TRUE\");\n } else {\n fecha_valida = false;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: FALSE\");\n\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return fecha_valida;\n }", "private boolean compararFechaActualCon(String fecha_obtenida) {\n boolean fecha_valida = false;\n\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n Date date = new Date();\n String fecha_actual = dateFormat.format(date);\n\n try {\n Date date2 = dateFormat.parse(fecha_obtenida);\n Date date1 = dateFormat.parse(fecha_actual);\n\n Log.i(\"COMPARANDO FECHAS\", \"F_ACTUAL: \" + date1 + \", F_OBTENIDA: \" + date2);\n\n if (date2.after(date1) ) {\n fecha_valida = true;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: TRUE\");\n } else {\n fecha_valida = false;\n Log.i(\"COMPARANDO FECHAS\", \"F_VALIDA: FALSE\");\n\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return fecha_valida;\n }", "public boolean validarCampos() {\n\t\tboolean valid = true;\n\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getNome())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getPaciente().getDataCadastro())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getSexo())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getRG())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(Util.isObjectNotNull(this.getPaciente().getRG()) && this.getPaciente().getRG() < 0) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG015\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getCPF())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isCPFValido(this.getPaciente().getCPF())) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG006\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(Util.isCPFValido(this.getPaciente().getCPF()) && isPacienteCadastrado(this.getPaciente())) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG017\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getEndereco())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getBairro())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getCidade())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getUF())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getPaciente().getDataNascimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getTelefone())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isTelefoneValido(this.getPaciente().getTelefone())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\t\n\t\treturn valid;\n\t}", "@Test\n\tpublic void testRespondible4(){\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(20));\n\t\tassertFalse(ej1.sePuedeResponder());\n\t}", "@Test\r\n\tpublic void CT01CadastrarUsuarioComDadosValidos() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\tUsuario usuario = new Usuario();\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comDadosValidos();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tfail(\"nao deve falhar\");\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testSetFecha8(){\n\t\tPlataforma.closePlataforma();\n\t\t\n\t\tfile = new File(\"./data/plataforma\");\n\t\tfile.delete();\n\t\tPlataforma.openPlataforma();\n\t\tPlataforma.login(\"1\", \"contraseniaprofe\");\n\t\t\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(5));\n\t\tej1.enPlazo();\n\t\t\n\t\tassertEquals(ej1.getEstado(), EstadoEjercicio.TERMINADO);\n\t\t\t\t\n\t\tLocalDate fin = Plataforma.fechaActual.plusDays(6);\n\t\tLocalDate ini = Plataforma.fechaActual.plusDays(10);\n\t\tassertFalse(ej1.setFechaFin(fin));\n\t\tassertFalse(ej1.setFechaIni(ini));\n\t}", "public static boolean validDate(String fechaString) {\n // Try to parse the String.\n return DateUtil.parse(fechaString) != null;\n }", "private boolean validarEntradaDeDados() {\n\t\tString errorMessage = \"\";\n\n\t\tif (textFieldProdutoNome.getText() == null || textFieldProdutoNome.getText().length() == 0) {\n\t\t\terrorMessage += \"Nome invalido!\\n\";\n\t\t}\n\t\tif (textFieldProdutoPreco.getText() == null || textFieldProdutoPreco.getText().length() == 0) {\n\t\t\terrorMessage += \"Preço invalido!\\n\";\n\t\t}\n\t\tif (textFieldProdutoQuantidade.getText() == null || textFieldProdutoQuantidade.getText().length() == 0) {\n\t\t\terrorMessage += \"Quantidade invalido!\\n\";\n\t\t}\n\t\tif (comboBoxProdutoCategoria.getSelectionModel().getSelectedItem() == null) {\n\t\t\terrorMessage += \"Categoria invalido!\\n\";\n\t\t}\n\t\tif (errorMessage.length() == 0) {\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\t/** Mostrar a mensagem de erro. */\n\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t\t\talert.setTitle(\"Erro no registo\");\n\t\t\talert.setHeaderText(\"Campos invalidos, corrija...\");\n\t\t\talert.setContentText(errorMessage);\n\t\t\talert.show();\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Test\n\tpublic void testSetFecha2(){\n\t\tPlataforma.logout();\n\t\tPlataforma.login(Plataforma.alumnos.get(0).getNia(), Plataforma.alumnos.get(0).getPassword());\n\t\tLocalDate fin = Plataforma.fechaActual.plusDays(10);\n\t\tLocalDate ini = Plataforma.fechaActual.plusDays(2);\n\t\tassertFalse(ej1.setFechaFin(fin));\n\t\tassertFalse(ej1.setFechaIni(ini));\n\t}", "@Test\n public void isValidFormat() {\n assertFalse(Deadline.isValidFormat(VALID_DAY_1));\n\n // Deadline with day and month dd/mm -> true\n assertTrue(Deadline.isValidFormat(VALID_1ST_JAN_WITHOUT_YEAR.toString()));\n\n // Deadline with all 3 fields dd/mm/yyyy -> true\n assertTrue(Deadline.isValidFormat(VALID_1ST_JAN_2018.toString()));\n }", "@Test\n public void teste_setdtFundacao_e_getDtFundacao_correto() {\n String data = fixtureData;\n emp.setDtFundacao(data);\n assertThat(\"Os valores deveriam ser iguais\", DataJoda.cadastraData(data), equalTo(emp.getDtFundacao()));\n }", "@Test\n\tpublic void testRespondible3(){\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(20));\n\t\tassertFalse(ej1.sePuedeResponder());\n\t}", "public static boolean valido(Certificado certificado) throws NfeException {\r\n\r\n\t\tif (DataValidade(certificado) != null && DataValidade(certificado).after(new Date())) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "private boolean checkValidDay() {\n return numDays >= 0 && numDays <= 7;\n }", "@Test\n\tpublic void testResponderEjercicio3(){\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(20));\n\t\tassertFalse(ej1.responderEjercicio(nacho, array));\n\t\tassertTrue(nacho.getEstadisticas().isEmpty());\n\t}", "@Test\n\tpublic void testResponderEjercicio4(){\n\t\tAlumno oscar = Alumno.CreaAlumno(\"2\", \"Oscar\", \"Password\", \"[email protected]\");\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(1));\n\t\tassertFalse(ej1.responderEjercicio(oscar, array));\n\t\tassertTrue(oscar.getEstadisticas().isEmpty());\n\t}", "@Test\n\tpublic void testResponderEjercicio2(){\n\t\tPlataforma.setFechaActual(Plataforma.getFechaActual().plusDays(0));\n\t\tassertFalse(ej1.responderEjercicio(nacho, array));\n\t\tassertTrue(nacho.getEstadisticas().isEmpty());\n\t}", "@Test (expected = java.lang.IllegalArgumentException.class)\n public void testDatumKorrekt() throws ParseException{\n //letzten testTermin1 entfernen\n testTerminsatz.tEntfernen(testTermin1);\n //test ob ungültige Zeiten erkannt werden (Ende < Start)\n testTermin1.setStt(sdf.parse(\"2011.02.15-11:15:00\"));\n testTermin1.setStp(sdf.parse(\"2011.02.15-09:45:00\"));\n testTerminsatz.tAnlegen(testTermin1);\n System.out.println(\"Datum vertauscht wirft Exception\");\n\n }", "@Test\n public void isValidDeadline() {\n assertFalse(Deadline.isValidDeadline(INVALID_0_JAN_2018.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_0_2018.toString()));\n\n // Valid deadline -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_2018.toString()));\n\n // Valid deadline for february -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_28TH_FEB_2018.toString()));\n\n // Invalid deadline for february in common year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_29TH_FEB_2018.toString()));\n\n // Valid deadline for february during leap year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_29TH_FEB_2020.toString()));\n\n // Invalid deadline for february during leap year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_30TH_FEB_2020.toString()));\n\n // Valid deadline for months with 30 days -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_30TH_APR_2018.toString()));\n\n // Invalid deadline for months with 30 days -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_31ST_APR_2018.toString()));\n\n // Valid deadline for months with 31 days -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_31ST_JAN_2018.toString()));\n\n // Invalid deadline for months with 31 days -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_32ND_JAN_2018.toString()));\n\n // Invalid month -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_0_2018.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_13_2018.toString()));\n\n // Valid month -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_APR_2018.toString()));\n\n // Valid year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_9999.toString()));\n\n // Invalid year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_JAN_2017.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_JAN_10000.toString()));\n\n // Valid date without year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_WITHOUT_YEAR.toString()));\n\n // Invalid date without year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_32ND_JAN_WITHOUT_YEAR.toString()));\n }", "private boolean validarDatos() {\n boolean result = true; // variable para saber si los datos son validos para su envio a la DAL de Rol y despues a la base de datos \n // verificar si la caja de texto txtNombre esta vacia \n if (this.txtNombre.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (this.txtApellido.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (this.txtDui.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (this.txtNumero.getText().trim().isEmpty()) {\n result = false; // en el caso que la caja de texto txtNombre este vacia se colocara la variable resul en false\n }\n\n if (result == false) {\n // mostrar un mensaje al usuario de la pantalla que los campos son obligatorios en el caso que la variable result sea false\n JOptionPane.showMessageDialog(this, \"Los campos con * son obligatorios\");\n }\n return result; // retorna la variable result con el valor true o false para saber si los datos son validos o no\n }", "private boolean validarEntradaDeDados() {\n String errorMessage = \"\";\n\n if (txtFieldHistorico.getText() == null || txtFieldHistorico.getText().length() == 0) {\n errorMessage += \"Nome inválido!\\n\";\n }\n\n if (errorMessage.length() == 0) {\n return true;\n } else {\n // Mostrando a mensagem de erro\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Erro no cadastro\");\n alert.setHeaderText(\"Campos inválidos, por favor, corrija...\");\n alert.setContentText(errorMessage);\n alert.show();\n return false;\n }\n }", "@Test\n\tpublic void testRespondible1(){\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(2));\n\t\tassertTrue(ej1.sePuedeResponder());\n\t}", "boolean isValidForDate(LocalDate date);", "protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }", "@Test\r\n\tpublic void testInvalidEndDate() {\r\n\t\ttry {\r\n\t\t\tfinal BazaarManager manager = BazaarManager.newInstance();\r\n\t\t\tfinal Item item = manager.newItem(\"testInvalidEndDate\", \"testInvalidEndDate\", manager.findRootCategory());\r\n\t\t\tfinal Calendar startDate = Calendar.getInstance();\r\n\t\t\tstartDate.setWeekDate(2020, 2, DayOfWeek.MONDAY.getValue());\r\n\t\t\tfinal Calendar endDate = Calendar.getInstance();\r\n\t\t\tendDate.setWeekDate(2020, 1, DayOfWeek.MONDAY.getValue());\r\n\t\t\tfinal Bazaar bazaar = manager.newBazaar(item, startDate, endDate);\r\n\t\t\tbazaar.persist();\r\n\t\t}\r\n\t\tcatch (final BazaarExpiredException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t}\r\n\t\tcatch (final BazaarException exception) {\r\n\t\t\tAssert.assertNotNull(exception);\r\n\t\t}\r\n\r\n\t}", "public boolean verifyInputCorrectFormatDate(String dateValue, boolean isNewToDoPage) {\n boolean result = true;\n try {\n // If isNewToDoPage = true :verify in add new to-do page | isNewToDoPage = false, verify in to-do list page\n if (isNewToDoPage) {\n waitForClickableOfElement(eleIdDueDate, \"Due date text box\");\n clickElement(eleIdDueDate, \"Due date text box\");\n sendKeyTextBox(eleIdDueDate, dateValue, \"Due date text box\");\n result = validateAttributeElement(eleIdDueDate, \"value\", \"\");\n } else {\n waitForClickableOfElement(eleToDoNewRowDueDateText.get(0), \"Select due date text box\");\n clickElement(eleToDoNewRowDueDateText.get(0), \"Select due date text box\");\n sendKeyTextBox(eleToDoNewRowDueDateText.get(0), dateValue, \"Select due date text box\");\n result = validateAttributeElement(eleToDoNewRowDueDateText.get(0), \"value\", \"\");\n\n }\n //If result = false : before and after value as not same --> can not input correct data into due date control\n if (!result) {\n NXGReports.addStep(\"TestScript Failed: Input correct date format in due date text box \", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return false;\n }\n NXGReports.addStep(\"Input correct date format in due date text box \", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Input correct date format in due date text box \", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return false;\n }\n return result;\n }", "@Override\n public boolean isValid() {\n return dateFrom != null && dateTo != null;\n }", "public static boolean esFecha (int tipoSQL) {\n\t \n\t switch (tipoSQL) {\n\t \tcase Types.DATE :\n\t \tcase Types.TIME :\n\t \tcase Types.TIMESTAMP :\n\t \t return true;\n\t }\n\t return false;\n\t}", "@Test\n\tpublic void testRespondible2(){\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.minusDays(2));\n\t\tassertFalse(ej1.sePuedeResponder());\n\t}", "@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }", "public static boolean isValidDate(String test) {\n if (test.matches(VALIDATION_REGEX)) {\n try {\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd-MM-yyyy\");\n LocalDate date = LocalDate.parse(test, format);\n if (date.format(format).equals(test)) {\n return true;\n }\n return false;\n } catch (DateTimeParseException e) {\n return false;\n }\n }\n return false;\n }", "@Test\r\n\tpublic void CT06ConsultarUsuarioPorDados() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\t// acao\r\n\t\ttry {\r\n\t\t\tSystem.out.println(usuario.getRa());\r\n\t\t\tSystem.out.println(usuario.getNome());\r\n\t\t} catch (Exception e) {\r\n\t\t\tassertEquals(\"Dados inválidos\", e.getMessage());\r\n\t\t}\r\n\t}", "boolean isValidExpTime();", "private boolean validatorForm() {\n\t\tboolean validazione = true;\n\t\tif (!Validator.validaDataInizio(viewInserimento.getTxtFieldDataI().getText())) {\n\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.red);\n\t\t\tvalidazione = false;\n\t\t} else {\n\t\t\tif (viewInserimento.getTxtFieldDataI().getBackground() == Color.red)\n\t\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\t}\n\t\tif (!Validator.validaImporto(viewInserimento.getTxtFieldValore().getText())) {\n\t\t\tviewInserimento.getTxtFieldValore().setBackground(Color.red);\n\t\t\tvalidazione = false;\n\t\t} else {\n\t\t\tif (viewInserimento.getTxtFieldValore().getBackground() == Color.red)\n\t\t\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t\t}\n\n\t\tif (!viewInserimento.getTxtFieldDataI().getText().equals(\"\")\n\t\t\t\t&& !viewInserimento.getTxtFieldDataIPre().getText().equals(\"\")) {\n\t\t\tif (!Date.valueOf(viewInserimento.getTxtFieldDataIPre().getText()).before(Date.valueOf(viewInserimento.getTxtFieldDataI().getText() + \"-01\"))\n\t\t\t\t\t) {\n\t\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.red);\n\t\t\t\tvalidazione = false;\n\t\t\t} else {\n\t\t\t\tif (viewInserimento.getTxtFieldDataI().getBackground() == Color.red)\n\t\t\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\t\t}\n\t\t}\n\t\treturn validazione;\n\t}", "@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 }", "@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}", "@Test\n\tpublic void testSetFecha7(){\n\t\tPlataforma.closePlataforma();\n\t\t\n\t\tfile = new File(\"./data/plataforma\");\n\t\tfile.delete();\n\t\tPlataforma.openPlataforma();\n\t\tPlataforma.login(\"1\", \"contraseniaprofe\");\n\t\t\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(2));\n\t\tej1.responderEjercicio(nacho, array);\n\t\t\t\t\n\t\tLocalDate fin = Plataforma.fechaActual.plusDays(10);\n\t\tLocalDate ini = Plataforma.fechaActual.plusDays(3);\n\t\tassertTrue(ej1.setFechaFin(fin));\n\t\tassertFalse(ej1.setFechaIni(ini));\n\t}", "public boolean verifyDataOfDatePicker(boolean isNewToDoPage) {\n try {\n Calendar cal = Calendar.getInstance();\n int currentDay = cal.get(Calendar.DAY_OF_MONTH);\n int currentMonth = cal.get(Calendar.MONTH);\n int currentYear = cal.get(Calendar.YEAR);\n int focusDay = 0;\n int focusMonth = 0;\n int focusYear = 0;\n // If isNewToDoPage = true, verify in add new to-do page\n if (isNewToDoPage) {\n waitForClickableOfElement(eleIdDueDate, \"Due date text box\");\n clickElement(eleIdDueDate, \"click to eleIdDueDate\");\n waitForClickableOfElement(eleXpathChooseDate, \"Date picker\");\n waitForVisibleElement(eleDataPickerToDate, \"Date picker to date\");\n waitForVisibleElement(eleDataPickerToDay, \"Date picker to day\");\n\n focusDay = Integer.parseInt(eleDataPickerToDay.getAttribute(\"text\").trim());\n focusMonth = Integer.parseInt(eleDataPickerToDate.getAttribute(\"data-month\").trim());\n focusYear = Integer.parseInt(eleDataPickerToDate.getAttribute(\"data-year\").trim());\n getLogger().info(\"Day : \" + eleDataPickerToDay.getAttribute(\"text\") + \"Month :\" + eleDataPickerToDate\n .getAttribute(\"data-month\") + \" Year :\" + eleDataPickerToDate.getAttribute(\"data-year\"));\n\n }\n // Compare focus day, month, year with current day, month, year\n if (focusDay != currentDay || focusMonth != currentMonth || focusYear != currentYear) {\n NXGReports.addStep(\"TestScript Failed: Verify data in date pickerd\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return false;\n }\n NXGReports.addStep(\"Verify data in date picker\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify data in date pickerd\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return true;\n }" ]
[ "0.7849464", "0.75405604", "0.74763864", "0.7330046", "0.730225", "0.72779644", "0.710609", "0.70735997", "0.70118517", "0.6972466", "0.6946893", "0.69318986", "0.68432844", "0.6839012", "0.6776626", "0.67107546", "0.6676161", "0.66395783", "0.65831566", "0.65560335", "0.65556055", "0.65512973", "0.65480185", "0.6505906", "0.65032035", "0.64711297", "0.64698386", "0.64698386", "0.6443954", "0.6421839", "0.63745284", "0.6366783", "0.6363294", "0.6357707", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6355137", "0.6354286", "0.63494796", "0.6348756", "0.63378155", "0.6321903", "0.6282457", "0.628035", "0.62677383", "0.6221027", "0.62178713", "0.6214544", "0.62133807", "0.6207958", "0.61740935", "0.6166356", "0.61433893", "0.6142905", "0.61318105", "0.6115505", "0.60971093", "0.609141", "0.6089676", "0.60854495", "0.6075493", "0.607494", "0.6070664", "0.60568565", "0.6055436", "0.60530835", "0.60446906" ]
0.8252578
0
Use AgentListResponse.newBuilder() to construct.
private AgentListResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setListResponse(edu.usfca.cs.dfs.StorageMessages.ListResponse value) {\n if (listResponseBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n msg_ = value;\n onChanged();\n } else {\n listResponseBuilder_.setMessage(value);\n }\n msgCase_ = 6;\n return this;\n }", "public java.util.List<org.biocatalogue.x2009.xml.rest.Agent> getAgentList()\r\n {\r\n final class AgentList extends java.util.AbstractList<org.biocatalogue.x2009.xml.rest.Agent>\r\n {\r\n public org.biocatalogue.x2009.xml.rest.Agent get(int i)\r\n { return AgentsResultsImpl.this.getAgentArray(i); }\r\n \r\n public org.biocatalogue.x2009.xml.rest.Agent set(int i, org.biocatalogue.x2009.xml.rest.Agent o)\r\n {\r\n org.biocatalogue.x2009.xml.rest.Agent old = AgentsResultsImpl.this.getAgentArray(i);\r\n AgentsResultsImpl.this.setAgentArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.biocatalogue.x2009.xml.rest.Agent o)\r\n { AgentsResultsImpl.this.insertNewAgent(i).set(o); }\r\n \r\n public org.biocatalogue.x2009.xml.rest.Agent remove(int i)\r\n {\r\n org.biocatalogue.x2009.xml.rest.Agent old = AgentsResultsImpl.this.getAgentArray(i);\r\n AgentsResultsImpl.this.removeAgent(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return AgentsResultsImpl.this.sizeOfAgentArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new AgentList();\r\n }\r\n }", "public Builder mergeListResponse(edu.usfca.cs.dfs.StorageMessages.ListResponse value) {\n if (listResponseBuilder_ == null) {\n if (msgCase_ == 6 &&\n msg_ != edu.usfca.cs.dfs.StorageMessages.ListResponse.getDefaultInstance()) {\n msg_ = edu.usfca.cs.dfs.StorageMessages.ListResponse.newBuilder((edu.usfca.cs.dfs.StorageMessages.ListResponse) msg_)\n .mergeFrom(value).buildPartial();\n } else {\n msg_ = value;\n }\n onChanged();\n } else {\n if (msgCase_ == 6) {\n listResponseBuilder_.mergeFrom(value);\n }\n listResponseBuilder_.setMessage(value);\n }\n msgCase_ = 6;\n return this;\n }", "public edu.usfca.cs.dfs.StorageMessages.ListResponse.Builder getListResponseBuilder() {\n return getListResponseFieldBuilder().getBuilder();\n }", "public Agent getAgent(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.agent.v1.Agent res){\n\t\tAgent agent = new Agent();\n\t\t\n\t\tagent.setAgentNo( res.getAgentNo() );\n\t\tagent.setFirstName( res.getFirstName() );\n\t\tagent.setLastName( res.getLastName() );\n\t\tagent.setFullName( res.getFullName() );\n\t\tagent.setEmailId( res.getEmailId() );\n\t\tagent.setRoyaltyNo( res.getRoyaltyNo() );\n\t\tagent.setPrint( res.getPrint() );\n\t\tagent.setFaxInput( res.getFaxInput() );\n\t\t\n\t\treturn agent;\n\t}", "edu.usfca.cs.dfs.StorageMessages.ListResponseOrBuilder getListResponseOrBuilder();", "public void success(Response arg0, Response arg1) {\n\t\t\t\tAgentList agents = DecompressGZIP.fromBody(arg0.getBody(), new TypeToken<AgentList>() {}.getType());\n\t\t\t\tagentList = agents.getAgents();\n\t\t\t\t\n\t\t\t\tLog.i(\"\", \"Agent list: \"+agentList.toString());\n\t\t\t}", "private ListResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private ListResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private ListCompaniesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Builder setListResponse(\n edu.usfca.cs.dfs.StorageMessages.ListResponse.Builder builderForValue) {\n if (listResponseBuilder_ == null) {\n msg_ = builderForValue.build();\n onChanged();\n } else {\n listResponseBuilder_.setMessage(builderForValue.build());\n }\n msgCase_ = 6;\n return this;\n }", "public VirtualMachineVMImageListResponse() {\n super();\n this.setVMImages(new LazyArrayList<VirtualMachineVMImageListResponse.VirtualMachineVMImage>());\n }", "public edu.usfca.cs.dfs.StorageMessages.ListResponseOrBuilder getListResponseOrBuilder() {\n if (msgCase_ == 6) {\n return (edu.usfca.cs.dfs.StorageMessages.ListResponse) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.ListResponse.getDefaultInstance();\n }", "edu.usfca.cs.dfs.StorageMessages.ListResponse getListResponse();", "public java.util.List<com.appscode.api.ci.v1beta1.Agent> getAgentsList() {\n if (agentsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(agents_);\n } else {\n return agentsBuilder_.getMessageList();\n }\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n edu.usfca.cs.dfs.StorageMessages.ListResponse, edu.usfca.cs.dfs.StorageMessages.ListResponse.Builder, edu.usfca.cs.dfs.StorageMessages.ListResponseOrBuilder> \n getListResponseFieldBuilder() {\n if (listResponseBuilder_ == null) {\n if (!(msgCase_ == 6)) {\n msg_ = edu.usfca.cs.dfs.StorageMessages.ListResponse.getDefaultInstance();\n }\n listResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n edu.usfca.cs.dfs.StorageMessages.ListResponse, edu.usfca.cs.dfs.StorageMessages.ListResponse.Builder, edu.usfca.cs.dfs.StorageMessages.ListResponseOrBuilder>(\n (edu.usfca.cs.dfs.StorageMessages.ListResponse) msg_,\n getParentForChildren(),\n isClean());\n msg_ = null;\n }\n msgCase_ = 6;\n onChanged();;\n return listResponseBuilder_;\n }", "public edu.usfca.cs.dfs.StorageMessages.ListResponseOrBuilder getListResponseOrBuilder() {\n if ((msgCase_ == 6) && (listResponseBuilder_ != null)) {\n return listResponseBuilder_.getMessageOrBuilder();\n } else {\n if (msgCase_ == 6) {\n return (edu.usfca.cs.dfs.StorageMessages.ListResponse) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.ListResponse.getDefaultInstance();\n }\n }", "java.util.List<com.google.protobuf.ByteString> getResponseList();", "org.beangle.security.session.protobuf.Model.AgentOrBuilder getAgentOrBuilder();", "public edu.usfca.cs.dfs.StorageMessages.ListResponse getListResponse() {\n if (listResponseBuilder_ == null) {\n if (msgCase_ == 6) {\n return (edu.usfca.cs.dfs.StorageMessages.ListResponse) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.ListResponse.getDefaultInstance();\n } else {\n if (msgCase_ == 6) {\n return listResponseBuilder_.getMessage();\n }\n return edu.usfca.cs.dfs.StorageMessages.ListResponse.getDefaultInstance();\n }\n }", "public Builder setAgent(org.beangle.security.session.protobuf.Model.Agent value) {\n if (agentBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n agent_ = value;\n } else {\n agentBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\n }", "private ListActiveBreakpointsResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public DacGetStatusResponse() {\n super();\n this.setStatusInfoList(new LazyArrayList<StatusInfo>());\n }", "private HelloResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "java.util.concurrent.Future<DescribeAgentsResult> describeAgentsAsync(DescribeAgentsRequest describeAgentsRequest);", "public java.util.List<? extends com.appscode.api.ci.v1beta1.AgentOrBuilder> \n getAgentsOrBuilderList() {\n if (agentsBuilder_ != null) {\n return agentsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(agents_);\n }\n }", "public FipaRequestProtocol(ACLAgent agent){\n\t\tsuper(agent);\n\t\tsetMaximumParticipants((short) 2);\n\t}", "public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.agent.v1.Agent getAgentReq(Agent agent){\n\t\tcom.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.agent.v1.Agent agentReq = \n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.agent.v1.Agent();\n\t\t\n\t\tagentReq.setAgentNo( agent.getAgentNo() );\n\t\tagentReq.setFirstName( agent.getFirstName() );\n\t\tagentReq.setLastName( agent.getLastName() );\n\t\tagentReq.setFullName( agent.getFullName() );\n\t\tagentReq.setEmailId( agent.getEmailId() );\n\t\tagentReq.setRoyaltyNo( agent.getRoyaltyNo() );\n\t\tagentReq.setPrint( agent.getPrint() );\n\t\tagentReq.setFaxInput( agent.getFaxInput() );\n\t\t\n\t\treturn agentReq;\n\t}", "private ListFriendRequestRet(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "List<Loan> listLoanByRequest(String clientCode, String requestId);", "org.beangle.security.session.protobuf.Model.Agent getAgent();", "public java.util.List<? extends com.appscode.api.ci.v1beta1.AgentOrBuilder> \n getAgentsOrBuilderList() {\n return agents_;\n }", "public void setGetArnListResponses(List<arnList> arnLists) {\n\t\tthis.arnList = arnLists;\n\t}", "private LivestockResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public List<Agent> listAgentByAgentType(String code);", "public java.util.List<? extends POGOProtos.Rpc.AssetVersionOutProto.AssetVersionResponseProtoOrBuilder> \n getResponseOrBuilderList() {\n if (responseBuilder_ != null) {\n return responseBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(response_);\n }\n }", "private ListBackupsResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "@java.lang.Override\n public java.util.List<? extends POGOProtos.Rpc.AssetVersionOutProto.AssetVersionResponseProtoOrBuilder> \n getResponseOrBuilderList() {\n return response_;\n }", "public java.util.List<POGOProtos.Rpc.AssetVersionOutProto.AssetVersionResponseProto> getResponseList() {\n if (responseBuilder_ == null) {\n return java.util.Collections.unmodifiableList(response_);\n } else {\n return responseBuilder_.getMessageList();\n }\n }", "public Builder addAgents(com.appscode.api.ci.v1beta1.Agent value) {\n if (agentsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureAgentsIsMutable();\n agents_.add(value);\n onChanged();\n } else {\n agentsBuilder_.addMessage(value);\n }\n return this;\n }", "public POGOProtos.Rpc.AssetVersionOutProto.AssetVersionResponseProto.Builder addResponseBuilder() {\n return getResponseFieldBuilder().addBuilder(\n POGOProtos.Rpc.AssetVersionOutProto.AssetVersionResponseProto.getDefaultInstance());\n }", "void setAgentListDialogWithAgentsList(List<String> agents);", "List<JavaAgent> getJavaAgents();", "protected abstract RemoteFactory.Agent<Msg, Ref> make_Agent();", "List<Agent> listEnrollmentAgentsHaveCredential();", "java.util.List<GoogleGRPC_08.proto.StudentResponse> \n getStudentResponseList();", "public java.util.List<com.appscode.api.ci.v1beta1.Agent> getAgentsList() {\n return agents_;\n }", "public Builder clearListResponse() {\n if (listResponseBuilder_ == null) {\n if (msgCase_ == 6) {\n msgCase_ = 0;\n msg_ = null;\n onChanged();\n }\n } else {\n if (msgCase_ == 6) {\n msgCase_ = 0;\n msg_ = null;\n }\n listResponseBuilder_.clear();\n }\n return this;\n }", "public edu.usfca.cs.dfs.StorageMessages.ListResponse getListResponse() {\n if (msgCase_ == 6) {\n return (edu.usfca.cs.dfs.StorageMessages.ListResponse) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.ListResponse.getDefaultInstance();\n }", "public Builder setFriendlistRes(FriendList.Rsp value) {\n copyOnWrite();\n instance.setFriendlistRes(value);\n return this;\n }", "private LesenRPCResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "Agent getAgent();", "List<Agent> listPOSAgentsHaveCredential();", "private ListFriendRet(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "@java.lang.Override\n public java.util.List<POGOProtos.Rpc.AssetVersionOutProto.AssetVersionResponseProto> getResponseList() {\n return response_;\n }", "protected HttpJsonAgentsStub(\n AgentsStubSettings settings,\n ClientContext clientContext,\n HttpJsonStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.httpJsonOperationsStub =\n HttpJsonOperationsStub.create(\n clientContext,\n callableFactory,\n typeRegistry,\n ImmutableMap.<String, HttpRule>builder()\n .put(\n \"google.longrunning.Operations.CancelOperation\",\n HttpRule.newBuilder()\n .setPost(\"/v3/{name=projects/*/operations/*}:cancel\")\n .addAdditionalBindings(\n HttpRule.newBuilder()\n .setPost(\"/v3/{name=projects/*/locations/*/operations/*}:cancel\")\n .build())\n .build())\n .put(\n \"google.longrunning.Operations.GetOperation\",\n HttpRule.newBuilder()\n .setGet(\"/v3/{name=projects/*/operations/*}\")\n .addAdditionalBindings(\n HttpRule.newBuilder()\n .setGet(\"/v3/{name=projects/*/locations/*/operations/*}\")\n .build())\n .build())\n .put(\n \"google.longrunning.Operations.ListOperations\",\n HttpRule.newBuilder()\n .setGet(\"/v3/{name=projects/*}/operations\")\n .addAdditionalBindings(\n HttpRule.newBuilder()\n .setGet(\"/v3/{name=projects/*/locations/*}/operations\")\n .build())\n .build())\n .build());\n\n HttpJsonCallSettings<ListAgentsRequest, ListAgentsResponse> listAgentsTransportSettings =\n HttpJsonCallSettings.<ListAgentsRequest, ListAgentsResponse>newBuilder()\n .setMethodDescriptor(listAgentsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetAgentRequest, Agent> getAgentTransportSettings =\n HttpJsonCallSettings.<GetAgentRequest, Agent>newBuilder()\n .setMethodDescriptor(getAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateAgentRequest, Agent> createAgentTransportSettings =\n HttpJsonCallSettings.<CreateAgentRequest, Agent>newBuilder()\n .setMethodDescriptor(createAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateAgentRequest, Agent> updateAgentTransportSettings =\n HttpJsonCallSettings.<UpdateAgentRequest, Agent>newBuilder()\n .setMethodDescriptor(updateAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"agent.name\", String.valueOf(request.getAgent().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteAgentRequest, Empty> deleteAgentTransportSettings =\n HttpJsonCallSettings.<DeleteAgentRequest, Empty>newBuilder()\n .setMethodDescriptor(deleteAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ExportAgentRequest, Operation> exportAgentTransportSettings =\n HttpJsonCallSettings.<ExportAgentRequest, Operation>newBuilder()\n .setMethodDescriptor(exportAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<RestoreAgentRequest, Operation> restoreAgentTransportSettings =\n HttpJsonCallSettings.<RestoreAgentRequest, Operation>newBuilder()\n .setMethodDescriptor(restoreAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ValidateAgentRequest, AgentValidationResult>\n validateAgentTransportSettings =\n HttpJsonCallSettings.<ValidateAgentRequest, AgentValidationResult>newBuilder()\n .setMethodDescriptor(validateAgentMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetAgentValidationResultRequest, AgentValidationResult>\n getAgentValidationResultTransportSettings =\n HttpJsonCallSettings\n .<GetAgentValidationResultRequest, AgentValidationResult>newBuilder()\n .setMethodDescriptor(getAgentValidationResultMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetGenerativeSettingsRequest, GenerativeSettings>\n getGenerativeSettingsTransportSettings =\n HttpJsonCallSettings.<GetGenerativeSettingsRequest, GenerativeSettings>newBuilder()\n .setMethodDescriptor(getGenerativeSettingsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateGenerativeSettingsRequest, GenerativeSettings>\n updateGenerativeSettingsTransportSettings =\n HttpJsonCallSettings.<UpdateGenerativeSettingsRequest, GenerativeSettings>newBuilder()\n .setMethodDescriptor(updateGenerativeSettingsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\n \"generative_settings.name\",\n String.valueOf(request.getGenerativeSettings().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListLocationsRequest, ListLocationsResponse>\n listLocationsTransportSettings =\n HttpJsonCallSettings.<ListLocationsRequest, ListLocationsResponse>newBuilder()\n .setMethodDescriptor(listLocationsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetLocationRequest, Location> getLocationTransportSettings =\n HttpJsonCallSettings.<GetLocationRequest, Location>newBuilder()\n .setMethodDescriptor(getLocationMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n\n this.listAgentsCallable =\n callableFactory.createUnaryCallable(\n listAgentsTransportSettings, settings.listAgentsSettings(), clientContext);\n this.listAgentsPagedCallable =\n callableFactory.createPagedCallable(\n listAgentsTransportSettings, settings.listAgentsSettings(), clientContext);\n this.getAgentCallable =\n callableFactory.createUnaryCallable(\n getAgentTransportSettings, settings.getAgentSettings(), clientContext);\n this.createAgentCallable =\n callableFactory.createUnaryCallable(\n createAgentTransportSettings, settings.createAgentSettings(), clientContext);\n this.updateAgentCallable =\n callableFactory.createUnaryCallable(\n updateAgentTransportSettings, settings.updateAgentSettings(), clientContext);\n this.deleteAgentCallable =\n callableFactory.createUnaryCallable(\n deleteAgentTransportSettings, settings.deleteAgentSettings(), clientContext);\n this.exportAgentCallable =\n callableFactory.createUnaryCallable(\n exportAgentTransportSettings, settings.exportAgentSettings(), clientContext);\n this.exportAgentOperationCallable =\n callableFactory.createOperationCallable(\n exportAgentTransportSettings,\n settings.exportAgentOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.restoreAgentCallable =\n callableFactory.createUnaryCallable(\n restoreAgentTransportSettings, settings.restoreAgentSettings(), clientContext);\n this.restoreAgentOperationCallable =\n callableFactory.createOperationCallable(\n restoreAgentTransportSettings,\n settings.restoreAgentOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.validateAgentCallable =\n callableFactory.createUnaryCallable(\n validateAgentTransportSettings, settings.validateAgentSettings(), clientContext);\n this.getAgentValidationResultCallable =\n callableFactory.createUnaryCallable(\n getAgentValidationResultTransportSettings,\n settings.getAgentValidationResultSettings(),\n clientContext);\n this.getGenerativeSettingsCallable =\n callableFactory.createUnaryCallable(\n getGenerativeSettingsTransportSettings,\n settings.getGenerativeSettingsSettings(),\n clientContext);\n this.updateGenerativeSettingsCallable =\n callableFactory.createUnaryCallable(\n updateGenerativeSettingsTransportSettings,\n settings.updateGenerativeSettingsSettings(),\n clientContext);\n this.listLocationsCallable =\n callableFactory.createUnaryCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.listLocationsPagedCallable =\n callableFactory.createPagedCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.getLocationCallable =\n callableFactory.createUnaryCallable(\n getLocationTransportSettings, settings.getLocationSettings(), clientContext);\n\n this.backgroundResources =\n new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }", "public Builder addResponse(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureResponseIsMutable();\n response_.add(value);\n onChanged();\n return this;\n }", "public List<Agent> listAgentNotMappedwithDevice();", "public Builder addResponse(POGOProtos.Rpc.AssetVersionOutProto.AssetVersionResponseProto value) {\n if (responseBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureResponseIsMutable();\n response_.add(value);\n onChanged();\n } else {\n responseBuilder_.addMessage(value);\n }\n return this;\n }", "public org.beangle.security.session.protobuf.Model.Agent getAgent() {\n if (agentBuilder_ == null) {\n return agent_ == null ? org.beangle.security.session.protobuf.Model.Agent.getDefaultInstance() : agent_;\n } else {\n return agentBuilder_.getMessage();\n }\n }", "public java.util.List<com.google.protobuf.ByteString>\n getResponseList() {\n return response_;\n }", "public com.appscode.api.ci.v1beta1.AgentOrBuilder getAgentsOrBuilder(\n int index) {\n if (agentsBuilder_ == null) {\n return agents_.get(index); } else {\n return agentsBuilder_.getMessageOrBuilder(index);\n }\n }", "private static AgentInfo newAgent(StringTokenizer in) {\n AgentInfo agent = new AgentInfo();\n agent.setGroupId(Factory.getRandomGroup());\n agent.setName(Factory.getRandomAgentName());\n String agentId = in.nextToken();\n String ip = in.nextToken();\n int port = Integer.parseInt(in.nextToken());\n int agentPort = Integer.parseInt(in.nextToken());\n agent.setAgentId(agentId);\n agent.setCurLocation(new HostInfo(ip, port));\n agent.setPort(agentPort);\n AgentInfoList.add(agent);\n\n /*\n * adds to the tally of how many agents are using the host.\n */\n List<HostInfo> hosts = HostInfoList.getList();\n\n for (HostInfo h : hosts) {\n if (h.equals(agent.getCurLocation())) {\n h.incNumAgents();\n }\n }\n\n return agent;\n\n\n }", "@POST(\"listedVenues\")\n Call<Map<String, Venue>> listedVenues();", "public RequestResponseBehaviour(BoatCoordinator myAgent, MessageTemplate mt) {\n super(myAgent, mt);\n showMessage(\"Waiting REQUESTs from authorized agents\");\n this.receiver = receiver;\n }", "@Override\n public String toString() {\n return \"Agent{\" +\n \"name='\" + this.name + '\\'' +\n \", collectionOfCurrentListings=\" + this.collectionOfCurrentListings +\n \", commissionRate=\" + this.commissionRate +\n \", totalEarnings=\" + this.totalEarnings +\n '}';\n }", "public interface Agent {\n void search(String keyword,Result<List<LyricCandidate>> callback);\n void topLyric(Result<List<Lyric>> callback);\n void lyric(String url,Result<Lyric> callback);\n}", "private TeamInfoRespMsg(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public abstract Response[] collectResponse();", "private List<Agent> ConvertAgentT(List<AgentT> listT) {\r\n\t\tList<Agent> listerep = new ArrayList<Agent>();\r\n\t\tfor (AgentT at : listT) {\r\n\t\t\tAgent agent = new Agent();\r\n\t\t\tagent.setAgentT(at);\r\n\t\t\tlisterep.add(agent);\r\n\t\t}\r\n\t\treturn listerep;\r\n\t}", "public GetAllTagsResponseBuilder() {\r\n getAllTagsResponse = new GetAllTagsResponse();\r\n }", "public java.util.List<com.google.protobuf.ByteString>\n getResponseList() {\n return java.util.Collections.unmodifiableList(response_);\n }", "public OpenNotifyDataViewAdapter(List<Response> responseList) {\n\n this.responseList=responseList;\n }", "public Builder mergeFriendlistRes(FriendList.Rsp value) {\n copyOnWrite();\n instance.mergeFriendlistRes(value);\n return this;\n }", "@Override\n public void onResponse(String response) {\n listTeams(response);\n\n }", "public void getAllAvengers(HttpServletResponse resp) throws IOException {\n\t\tList<Avenger> list = avService.avengersAssemble();\n\n\t\t// Convert Java object into a JSON string that can be written to the body of an\n\t\t// HTTP response\n\t\tString json = om.writeValueAsString(list);\n\t\tSystem.out.println(json);\n\t\tPrintWriter pw = resp.getWriter();\n\t\tpw.print(json);\n\t\tresp.setStatus(200);\n\t}", "public List<arnList> getGetArnListResponses() {\n\t\treturn arnList;\n\t}", "public static void helloAgent(){\n\t\tHelloAgent agent = new HelloAgent();\r\n\t\r\n\t}", "public DescribeLoadBalancerOverviewResponse(DescribeLoadBalancerOverviewResponse source) {\n if (source.TotalCount != null) {\n this.TotalCount = new Long(source.TotalCount);\n }\n if (source.RunningCount != null) {\n this.RunningCount = new Long(source.RunningCount);\n }\n if (source.IsolationCount != null) {\n this.IsolationCount = new Long(source.IsolationCount);\n }\n if (source.WillExpireCount != null) {\n this.WillExpireCount = new Long(source.WillExpireCount);\n }\n if (source.RequestId != null) {\n this.RequestId = new String(source.RequestId);\n }\n }", "public com.appscode.api.ci.v1beta1.Agent getAgents(int index) {\n if (agentsBuilder_ == null) {\n return agents_.get(index);\n } else {\n return agentsBuilder_.getMessage(index);\n }\n }", "List<AgentReference> getCurrentAgents();", "private ListCouponsResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public com.appscode.api.ci.v1beta1.AgentOrBuilder getAgentsOrBuilder(\n int index) {\n return agents_.get(index);\n }", "public AppInstanceResp() {\n super();\n }", "private Agent(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SyncResultsResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private MsgInstantiateContractResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "@Override\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\t\tfor (int i = 0; i < response.length(); i++) {\n\t\t\t\t\t\t\t\tLog.d(\"off\", response.toString());\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tofferte.add(Offerta.decodeJSON(response\n\t\t\t\t\t\t\t\t\t\t\t.getJSONObject(i)));\n\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tadapter = new OffertaAdapterRV(DetPlaActivity.this,\n\t\t\t\t\t\t\t\t\tofferte);\n\t\t\t\t\t\t\tif (adapter != null)\n\t\t\t\t\t\t\t\trvofferte.setAdapter(adapter);\n\t\t\t\t\t\t}", "HarvestResponseType createHarvestResponseType();", "Response createResponse();", "public interface ListResponse<T> {\n void onResponse(List<T> response);\n }", "private CallResponse() {\n initFields();\n }", "public org.beangle.security.session.protobuf.Model.AgentOrBuilder getAgentOrBuilder() {\n if (agentBuilder_ != null) {\n return agentBuilder_.getMessageOrBuilder();\n } else {\n return agent_ == null ?\n org.beangle.security.session.protobuf.Model.Agent.getDefaultInstance() : agent_;\n }\n }", "public Builder addResponse(\n int index, POGOProtos.Rpc.AssetVersionOutProto.AssetVersionResponseProto value) {\n if (responseBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureResponseIsMutable();\n response_.add(index, value);\n onChanged();\n } else {\n responseBuilder_.addMessage(index, value);\n }\n return this;\n }", "private SignatureStatusResponse(Builder builder) {\n requestId = builder.requestId;\n organizations = builder.organizations;\n }", "private FetchResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Builder addAllResponse(\n java.lang.Iterable<? extends POGOProtos.Rpc.AssetVersionOutProto.AssetVersionResponseProto> values) {\n if (responseBuilder_ == null) {\n ensureResponseIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, response_);\n onChanged();\n } else {\n responseBuilder_.addAllMessages(values);\n }\n return this;\n }", "default void listAzureClients(\n com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAzureClientsMethod(), responseObserver);\n }", "java.util.List<? extends GoogleGRPC_08.proto.StudentResponseOrBuilder> \n getStudentResponseOrBuilderList();", "private LocalSearchResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }" ]
[ "0.5830577", "0.5824203", "0.5763317", "0.5728772", "0.54754245", "0.53072184", "0.524849", "0.5211073", "0.5211073", "0.5160566", "0.51238847", "0.4986003", "0.49839762", "0.49735034", "0.4931963", "0.4914954", "0.4904375", "0.48860452", "0.4865652", "0.48244134", "0.4813584", "0.480023", "0.47951162", "0.4776931", "0.4743796", "0.47363013", "0.47341022", "0.46886772", "0.46874553", "0.46830198", "0.4682111", "0.4681194", "0.4670044", "0.46674636", "0.4652393", "0.46353418", "0.46273997", "0.4617293", "0.46110362", "0.46051458", "0.45991018", "0.45865038", "0.45800298", "0.45762607", "0.45705074", "0.45554084", "0.45488346", "0.45479742", "0.45396626", "0.45055366", "0.45028", "0.4494438", "0.4493055", "0.44911435", "0.44835195", "0.44795084", "0.4471002", "0.4462325", "0.44553676", "0.44531292", "0.44519702", "0.44509724", "0.4448481", "0.44464323", "0.4441369", "0.44320318", "0.44307408", "0.4426041", "0.4424623", "0.44244692", "0.44235557", "0.43957683", "0.4387059", "0.4385043", "0.43802372", "0.43797284", "0.4375631", "0.43717435", "0.43711847", "0.4359927", "0.43509182", "0.43396008", "0.43372065", "0.43244943", "0.43189037", "0.43109834", "0.4296717", "0.42933217", "0.42895472", "0.4289259", "0.42866278", "0.4280826", "0.42800492", "0.42741793", "0.42730302", "0.42713523", "0.42644528", "0.42589182", "0.4253469", "0.42511195" ]
0.7676625
0